mediapipe/mediapipe
definability 4c21321775 Android. Process ARGB and Grayscale input packets
Issue https://github.com/google/mediapipe/issues/5017
points to the issue of incorrect bitmap conversion in
Android when RGBA or Grayscale images are used.
As far as the library allows the creation of ALPHA8 bitmaps,
it is not enough to use only `getBitmapFromRgb` and `getBitmapFromRgba`,
so the new `getBitmapFromAlpha` method is needed.
Otherwise, existing users relying on the 8-bit input but not using the
input packet would catch errors despite their code operating as
intended.

Add correct processing of images with 1, 3, and 4 channels
to `FaceDetector`, `FaceLandmarker`, `FaceStylizer`,
`GestureRecognizer`, `HandLandmarker`, `HolisticLandmarker`,
`ImageClassifier`, `ImageEmbedder`, `ImageSegmenter`,
`InteractiveSegmenter`, `ObjectDetector`, and `PoseLandmarker`.
If the number of channels is not 1, 3, or 4,
throw MediaPipeException with `INVALID_ARGUMENT` status code.

Implement methods and functions needed to convert single-channel images
to RGBA bitmaps.
The native function `AlphaToRGBA` uses `memset`
to set all bytes of the resulting buffer to zeros
and then copies the alpha values of the input image to the alpha values
of the corresponding output pixels.

Perform a slight refactoring:
use `operator[i]` instead of `*(array + i)` for clarity.
2023-12-10 16:30:04 +00:00
..
calculators No public description 2023-12-03 17:53:22 -08:00
docs Project import generated by Copybara. 2020-06-12 15:44:38 -04:00
examples Upgrade to use Gradle 8.4 2023-10-31 12:07:37 -07:00
framework internal-only change 2023-12-08 17:23:55 -08:00
gpu Internal change. 2023-11-21 12:33:58 -08:00
graphs Convert CHECK macro to ABSL_CHECK. 2023-08-31 13:20:29 -07:00
java/com/google/mediapipe Android. Process ARGB and Grayscale input packets 2023-12-10 16:30:04 +00:00
MediaPipe.tulsiproj Project import generated by Copybara. 2021-06-03 17:04:35 -04:00
model_maker No public description 2023-11-27 12:01:38 -08:00
models Project import generated by Copybara. 2022-09-06 21:46:17 +00:00
modules ...internal change... 2023-11-10 14:46:01 -08:00
objc No public description 2023-10-24 09:34:24 -07:00
python internal change. 2023-11-28 18:07:30 -08:00
tasks Android. Process ARGB and Grayscale input packets 2023-12-10 16:30:04 +00:00
util internal-only change 2023-12-08 17:23:55 -08:00
web/graph_runner Access document via self.document 2023-11-01 14:08:09 -07:00
__init__.py Fix comment for mediapipe license. 2022-11-10 18:06:35 -08:00
BUILD No public description 2023-08-28 02:50:07 -07:00
platforms.bzl No public description 2023-08-28 02:50:07 -07:00