Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process Camera Image Issue when using Face Detection & Pose Detection,etc with camera_android_camerax: any instead of camera_android:any #626

Open
mrwebbeast opened this issue May 7, 2024 · 8 comments
Labels
Face Detection Issues corresponding to Face Detection API InputImage Issues related to InputImage Pose Detection Issues corresponding to Pose Detection API

Comments

@mrwebbeast
Copy link

Title: Process Camera Image Issue

Describe the bug
Process Camera Image Issue when using Face Detection & Pose Detection,etc with camera_android_camerax: any

To Reproduce
Steps to reproduce the behavior:

  1. Use default Example Code
  2. Use camera: ^0.10.6 & Add camera_android_camerax: ^0.6.4+1
  3. Run The App and Face Detection & Pose Detection will not work

Expected behavior
It should work same as camera_android: ^any so it will process and return processed data according to mlkit plugin
Expected InputImageFormat is nv21 but when using camera_android_camerax: any then its returning yuv_420_888 InputImageFormat

Need support for yuv_420_888 InputImageFormat when using camera_android_camerax:any

Platform (please complete the following information):

  • OS: Android 14
  • Device: Redmi Note 12 Pro Plus
  • Flutter/Dart Version 3.19.6 • channel stable | Dart 3.3.4
  • Plugin version
  1. google_mlkit_face_detection: ^0.11.0
  2. google_mlkit_pose_detection: ^0.12.0
@fbernaly fbernaly added Pose Detection Issues corresponding to Pose Detection API Face Detection Issues corresponding to Face Detection API labels May 7, 2024
@fbernaly
Copy link
Collaborator

fbernaly commented May 7, 2024

@fbernaly fbernaly added the InputImage Issues related to InputImage label May 7, 2024
@FantaMagier
Copy link

CameraX is now the default Android camera in the Camera Package. It would be great if we could get the update.

@AndreiMisiukevich
Copy link

I believe yuv_420_888 format can have more than a single plane.
It's unclear how to build an InputImage then. (In previous versions, probably 0.0.6 it worked with multiple planes, but it seems not anymore).

Also, the documentation of this plugin states to use `.nv21 for android.

@fbernaly
Copy link
Collaborator

@AndreiMisiukevich : feel free to fork the repo and add multiple planes and add yuv_420_888 for Android. Then send your PR. We always welcome contributions.

@fbernaly
Copy link
Collaborator

@FantaMagier
Copy link

This topic is also linked to this CameraX issue: flutter/flutter#145961

@FantaMagier
Copy link

Isn't it possible to use the ML KIT API with yuv_420_888 InputImageFormat? Maybe it is easier to support this third image format in the Flutter SDK?

https://developers.google.com/android/reference/com/google/mlkit/vision/common/InputImage.ImageFormat

@fbernaly
Copy link
Collaborator

@FantaMagier : yes, it is possible. I do not have an ETA for that change. We need a volunteer to work on that. Contributions are always welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Face Detection Issues corresponding to Face Detection API InputImage Issues related to InputImage Pose Detection Issues corresponding to Pose Detection API
Projects
None yet
Development

No branches or pull requests

4 participants