Bayer output for OV7725

Discussion related to "under the hood" OpenMV topics.
ragbagger
Posts: 9
Joined: Wed Aug 09, 2017 5:37 pm

Bayer output for OV7725

Postby ragbagger » Mon Nov 26, 2018 4:23 pm

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 :)
User avatar
iabdalkader
Posts: 634
Joined: Sun May 24, 2015 3:53 pm

Re: Bayer output for OV7725

Postby iabdalkader » Mon Nov 26, 2018 6:24 pm

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
ragbagger
Posts: 9
Joined: Wed Aug 09, 2017 5:37 pm

Re: Bayer output for OV7725

Postby ragbagger » Mon Nov 26, 2018 9:15 pm

Thank a ton for the quick reply! :)
ragbagger
Posts: 9
Joined: Wed Aug 09, 2017 5:37 pm

Re: Bayer output for OV7725

Postby ragbagger » Tue Nov 27, 2018 11:54 am

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

Re: Bayer output for OV7725

Postby kwagyeman » Tue Nov 27, 2018 11:57 am

Nyamekye,
ragbagger
Posts: 9
Joined: Wed Aug 09, 2017 5:37 pm

Re: Bayer output for OV7725

Postby ragbagger » Tue Nov 27, 2018 12:00 pm

wow! holy cow! thanks for the lightning fast reply!!!!!
ragbagger
Posts: 9
Joined: Wed Aug 09, 2017 5:37 pm

Re: Bayer output for OV7725

Postby ragbagger » Thu Dec 06, 2018 7:58 pm

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

Re: Bayer output for OV7725

Postby kwagyeman » Thu Dec 06, 2018 8:50 pm

We turn it into a jpg image while doing the operation. So, the full image never is stored in RAM.
Nyamekye,
ragbagger
Posts: 9
Joined: Wed Aug 09, 2017 5:37 pm

Re: Bayer output for OV7725

Postby ragbagger » Thu Dec 06, 2018 10:19 pm

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

Re: Bayer output for OV7725

Postby kwagyeman » Sat Dec 08, 2018 11:23 pm

Yup, that's exactly what we are doing.
Nyamekye,

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests