white and cold image colors for M7 (OV7725) => blur image

General discussion about topics related to OpenMV.
User avatar
chrisPyres66
Posts: 108
Joined: Mon Jul 16, 2018 9:22 am
Location: France

white and cold image colors for M7 (OV7725) => blur image

Postby chrisPyres66 » Wed Feb 27, 2019 6:23 am

Dear all,

I have got another camera with OV7725 and the image colors are more hot and more red compare to the M7 which the colors are more white and cold.
This whiteness seems to blur the images like big aperture reduce depth of field.

This other camera uses the OV529 ftom omnivision too, i dont know the dont use special algorythm for AEC, AGC, Gamma correction or whiteblance....
I red the camera datasheet and i tried to modify register to get hotest the camera colors and better quality.

I changed :
  • AEC ROI at address $0D
    AEC before and after Gamma at address $67
but without clear success.

Do you have an idea except to use manual control ?
Thanks,
User avatar
kwagyeman
Posts: 3205
Joined: Sun May 24, 2015 2:10 pm

Re: white and cold image colors for M7 (OV7725) => blur image

Postby kwagyeman » Thu Feb 28, 2019 1:37 am

Hi, we're about to cut a new firmware release with gamma correction onboard as an algorithm. Also, I bought a camera that uses the O7725 and I plan to dump the register settings from it for use.

Anyway, um you can get a lot of benefit but turning auto gain and auto white balance off quickly. Like in 200ms after the camera turns on. This helps make the colors more saturated. However, it also means the image will be darker.
Nyamekye,
User avatar
chrisPyres66
Posts: 108
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: white and cold image colors for M7 (OV7725) => blur image

Postby chrisPyres66 » Fri Mar 08, 2019 6:01 am

Dear,

In place of turning auto gain and auto white balance off after 200ms, i changed the camera registers AEW and AEB in helloworld.py like this :

Code: Select all

import sensor, image, time

sensor.reset()                     
sensor.set_pixformat(sensor.RGB565) 
sensor.set_framesize(sensor.VGA)  

sensor.__write_reg(0x24, 0x40) #New: 0x40 \ default: 0x75 / OPENMV: 0x58
sensor.__write_reg(0x25, 0x30) #New: 0x30 \ default: 0x63 / OPENMV: 0x48

sensor.skip_frames(time = 200)     # Wait for settings take effect.
#sensor.set_auto_gain(False)
#sensor.set_auto_whitebal(False)
clock = time.clock()             


while(True):
    clock.tick()                 
    img = sensor.snapshot()       
    print(clock.fps()) 
    
That are the low and up limits of stable AGC/AEC operating region.
Using this, it seems to do the same work and the image seems as well to be better exposed and white part are less important.

Give me your point ?
Thanks,
User avatar
kwagyeman
Posts: 3205
Joined: Sun May 24, 2015 2:10 pm

Re: white and cold image colors for M7 (OV7725) => blur image

Postby kwagyeman » Fri Mar 08, 2019 2:10 pm

Our register settings aren't the best since Omnivision won't share the golden register settings with us. So, it's possible what you did is better.
Nyamekye,
User avatar
iabdalkader
Posts: 918
Joined: Sun May 24, 2015 3:53 pm

Re: white and cold image colors for M7 (OV7725) => blur image

Postby iabdalkader » Sat Mar 09, 2019 3:37 pm

This just limits AGC/AEC to that range and it should make the image darker. But also note there's another region for fast AGC/AEC controlled by VPT(0x26).
User avatar
iabdalkader
Posts: 918
Joined: Sun May 24, 2015 3:53 pm

Re: white and cold image colors for M7 (OV7725) => blur image

Postby iabdalkader » Sat Mar 09, 2019 3:49 pm

This will help you understand how it works
Screenshot from 2019-03-09 22-44-15.png
User avatar
chrisPyres66
Posts: 108
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: white and cold image colors for M7 (OV7725) => blur image

Postby chrisPyres66 » Mon Mar 11, 2019 4:47 am

Ok i tested this and it seems ok

Code: Select all

sensor.__write_reg(0x24, 0x40) # New: 0x40 \ default: 0x75 / OPENMV: 0x58
sensor.__write_reg(0x25, 0x30) # New: 0x30 \ default: 0x63 / OPENMV: 0x48
sensor.__write_reg(0x26, 0xa1) # New: 0xa1 \ default: 0xD4 / OPENMV: 0xC3
sensor.__write_reg(0x0d, 0x71) # New: 0x71 \ default: 0x41 / OPENMV: 0x41 (0x41/0x51/0x61/0x71 for different AEC/AGC window)
from this datasheet i found from internet (I zipped it because pdf was not accepted).
At the end there is an adviced settings.

Give me your point !
Thanks,
Attachments
OV7725_Settings.7z
(658.04 KiB) Downloaded 83 times

Return to “General Topics”

Who is online

Users browsing this forum: Bing [Bot] and 4 guests