I have an Android application that captures images from the Android camera and does some processing with them.
There are native parts to it and therefore I capture the images using the
ImageFormat.YUV_420_888 format and I convert them to something OpenCV can use via
libyuv::Android420ToI420 in the native code.
This is working on every Android phone that I have tested so far.
Attaching a USB camera (Logitech BRIO) to Rockpi4C works just fine and the camera reports that it does know the
ImageFormat.YUV_420_888 format (via
cameraManager.getCameraCharacteristics(cameraId) , and yet when it gets to the native part,
libyuv::Android420ToI420 produces just a green image.
My impression is that the image is not captured using YUV_420_888 but something else, some other format.
Does anyone have any idea what kind of format could this be? Is there a bug in Android 10 (which doesn’t appear to exist on the phones) that somehow is causing the image format to used to be different than YUV_420_888?