16bit 640x480 OV7725 read?


From our testings we believe the raw format is based on a 4:2:2 packed pixel, hence 8bit.
From OV7725, it should be possible to receive each pixel as RGB565, or 16bit pixel depth.

Is this possible within the current version (mine is 1.9.0) of OpenMV IDE ?

Speed is not the top priority, but the more information we could extract from a capture.
If we could save to disc 1 image per second, that would be interesting.



Hi, when you set the camera to RGB565 at 640x480 there’s not enough RAM onboard to store the image so we switch to BAYER format and then debayer the image for JPG file saving support. You can get more than 1 FPS and easily get above 10 FPS.

Thanks for the quick reply.

I’ve Matlabed it and found that indeed the raw format is Bayer bggr with offset 32.
Not sure this is documented, I’ve not found this info.

So, from OpenMV docs, it states:

  • Bayer can be used for capturing, not processing
  • All algorithms runs faster on grayscale
  • All algorihms runs slower on RGB565

What all this means is that, in order to use onboard processing, one should use subres (for instance 160x120) color images for algorithms,
or fullres (640x480) but grayscale images, but never fullres RGB565 color images, nor fullres Bayer encoded ones. Is this correct?


Hi, we technically don’t really support RGB565 VGA images. Everything else is supported normally. Just for RGB565 VGA images we don’t have the RAM.

(And Bayer images are just not supported for processing in general except for jpeg compression. However, we do provide raw byte access to the Bayer image).

Now, that said, using windowing it would be possible to support cropped VGA RGB565 images. I believe the conversation to Bayer is done when snapshot is called. But, I don’t think it’s smart enough right now to determine that a cropped image will fit in the frame buffer. Right now I think it just checks if the uncropped image will fit and if not makes the image bayer.

We choose the above behavior so you could set the sensor to RGB565 and then use VGA without having to know about he Bayer issue.

I see.

Wouldn’t you agree that this text on the product web page is, at least, very misleading,
since it says nothing about further compression, or inability of onboard processing?

“The OV7725 image sensor is capable of taking 640x480 8-bit Grayscale images or 640x480
16-bit RGB565 images
at 60 FPS when the resolution is above 320x240 and 120 FPS when it is below.
Most simple algorithms will run at above 30 FPS.”

Hi, when I wrote that I was thinking only about it in regards to the picture taking capability. Yes, you are right however. I will change the text. Originally it didn’t say we had VGA RGB565 support but I added that after Ibrahim put in the Bayer image processing mode that allows VGA RGB565 video capture.