Page 1 of 1

Bayer output for OV7725

Posted: Mon Nov 26, 2018 4:23 pm
by ragbagger
Hi Guys
Whats the difference between the Bayer RAW and Bayer processed RAW on the OV7725 sensor? For getting a 640x480 image, you guys mentioned in a previous discussion that because the SRAM is too small to store the RGB, you use the Bayer RAW output from the sensor and then de-bayer it.
So have a bunch of questions here

1. So do you work with Bayer RAW or processed Bayer RAW?
2. Is de-bayer the same as demosiac'ing?
3. How many FPS would be possible if we did this is the F7 processor, if the final goal is to store a jpeg image in the SD card?
4. What c file do you guys have your de-bayer code in?

I would appreciate any feedback :)

Re: Bayer output for OV7725

Posted: Mon Nov 26, 2018 6:24 pm
by iabdalkader
1. So do you work with Bayer RAW or processed Bayer RAW?
Processed Bayer
2. Is de-bayer the same as demosiac'ing?
Yes https://en.wikipedia.org/wiki/Demosaicing
3. How many FPS would be possible if we did this is the F7 processor, if the final goal is to store a jpeg image in the SD card?
Debayer, compress and write to SD VGA frames will be slow, definitely less than 10FPS
4. What c file do you guys have your de-bayer code in?
omv/img/imlib.c

Re: Bayer output for OV7725

Posted: Mon Nov 26, 2018 9:15 pm
by ragbagger
Thank a ton for the quick reply! :)

Re: Bayer output for OV7725

Posted: Tue Nov 27, 2018 11:54 am
by ragbagger
Hi Ibrahim
Quick follow up question. Do you have a link for the algorithm you use for the conversion of Bayer to RGB/YUV image? Im trying to learn the theory of the conversion and then work with the code. Right now the code is a bit overwhelming for me.
-Thanks

Re: Bayer output for OV7725

Posted: Tue Nov 27, 2018 11:57 am
by kwagyeman

Re: Bayer output for OV7725

Posted: Tue Nov 27, 2018 12:00 pm
by ragbagger
wow! holy cow! thanks for the lightning fast reply!!!!!

Re: Bayer output for OV7725

Posted: Thu Dec 06, 2018 7:58 pm
by ragbagger
have a follow up question here. When we de-mosiac a 640x480 bayer image (size of 307KB) to RGB565 or RGB888 or YUV, its size would increase to more than 512KB (size of SRAM). So I feel it does not seem to be possible to do this de-mosiacing within the F7 itself. Am I wrong here.
How do you guys do it? Or do you just transfer the raw image over USB to the computer and perform the processing in your openMV software?

Re: Bayer output for OV7725

Posted: Thu Dec 06, 2018 8:50 pm
by kwagyeman
We turn it into a jpg image while doing the operation. So, the full image never is stored in RAM.

Re: Bayer output for OV7725

Posted: Thu Dec 06, 2018 10:19 pm
by ragbagger
hmmm... so you guys are going from raw bayer to jpg directly? When you de-mosiac, you are adding the all three RGB values to each pixel. So 24bit/pixel

So are you just converting each 8x8 macro blocks to jpeg before moving on to the next macro block? Am I in the right direction here?

Re: Bayer output for OV7725

Posted: Sat Dec 08, 2018 11:23 pm
by kwagyeman
Yup, that's exactly what we are doing.