Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the fastest Android camera image format?

I'm grabbing images from an Android camera using onPreviewFrame(). I only really need the grayscale portion of the image, which I'm passing as a byte array to some native code.

On the newer OS versions that I'm supporting, both YV12 and NV21 preview formats are supported, with NV21 as the default.

Is one of these likely to be faster (i.e., matching the hardware format and requiring no extra processing by the OS) on most devices? Is it something entirely dependent on the device manufacturer?

like image 892
squidpickles Avatar asked Dec 07 '25 06:12

squidpickles


1 Answers

The manufacturer might matter depending on camera type and hardware. The NV21 format is android default. As far as speed, Im doubting you'll notice a difference regardless of format. Personally i would use NV21 YCrCb. Here is a link on different formats - Types of Android Image Formatting

like image 87
JayD Avatar answered Dec 09 '25 22:12

JayD



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!