-
Notifications
You must be signed in to change notification settings - Fork 1k
Added preview callback #123
base: master
Are you sure you want to change the base?
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
|
I signed it! |
bba0e00 to
f90580b
Compare
| } | ||
|
|
||
| mCallbackImageDataReader = ImageReader.newInstance(width, height, | ||
| ImageFormat.NV21, /* maxImages */ 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I don't think NV21 is supported in Camera2. It should be YUV_420_888 in Camera2 case. It cashed on my N5X with Caused by: java.lang.IllegalArgumentException: NV21 format is not supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Camera1 on device HTC Butterfly 4.3 API 18 not call |
|
I fix it @OverRide |
| } | ||
| return data; | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some image formats have multiple planes, including YUV420_888 (the default for Camera2). All planes need to be included in the output byte array.
|
Any progress on this? I'm trying to get ML Kit to work but the example code uses Camera 1 API and lags terribly and this here seems like the perfect match but is not yet included 😭. |
Callback to get preview byte data