16bit 640x480 OV7725 read?

Discussion related to "under the hood" OpenMV topics.
User avatar
brunesi
Posts: 3
Joined: Fri Jun 15, 2018 8:21 am

16bit 640x480 OV7725 read?

Postby brunesi » Fri Jun 15, 2018 8:27 am

Hello,

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.

Regards,

Bruno
User avatar
kwagyeman
Posts: 2042
Joined: Sun May 24, 2015 2:10 pm

Re: 16bit 640x480 OV7725 read?

Postby kwagyeman » Fri Jun 15, 2018 12:14 pm

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.
Nyamekye,
User avatar
brunesi
Posts: 3
Joined: Fri Jun 15, 2018 8:21 am

Re: 16bit 640x480 OV7725 read?

Postby brunesi » Fri Jun 15, 2018 1:48 pm

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?

Regards,
Bruno
User avatar
kwagyeman
Posts: 2042
Joined: Sun May 24, 2015 2:10 pm

Re: 16bit 640x480 OV7725 read?

Postby kwagyeman » Fri Jun 15, 2018 2:12 pm

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.
Nyamekye,
User avatar
brunesi
Posts: 3
Joined: Fri Jun 15, 2018 8:21 am

Re: 16bit 640x480 OV7725 read?

Postby brunesi » Tue Jun 26, 2018 5:08 pm

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."
User avatar
kwagyeman
Posts: 2042
Joined: Sun May 24, 2015 2:10 pm

Re: 16bit 640x480 OV7725 read?

Postby kwagyeman » Tue Jun 26, 2018 5:21 pm

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.
Nyamekye,

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests