Reputation: 1033
I have a bitmap and i want to process this bitmap with ML-kit face recognition. When I give this bitmap directly to ML kit i see this message : "StreamingFormatChecker: ML Kit has detected that you seem to pass camera frames to the detector as a Bitmap object. This is inefficient. Please use YUV_420_888 format for camera2 API or NV21 format for (legacy) camera API and directly pass down the byte array to ML Kit."
So my question is how can I convert a bitmap to "YUV_420_888" format?
Upvotes: 2
Views: 1206
Reputation: 1418
You can try using the InputImage.fromBitmap method and pass the result into the API you want to call.
Upvotes: 1