White Balance control with OV7670


OV7670 sensor have White Balance support. Several White Balance modes can be implemented programming the sensor through SSCB. WIll not go in details on how SSCB works or how should be implemented, there are plenty of sources online, however, I could not find details on how to add a While Balance control.

Available modes are:

  • No White Balance;
  • AWB (simple or advanced, switched through 0x6f register);
  • Sunny;
  • Cloudy;
  • Office;
  • Home.

Implementation is done by changing the colour temperature playing with the RED and BLUE values.

NOTE: for each mode, the register ID and value will be provided. These values need to be changed through your own code to enable the respective modes.

 

No White Balance

(0x13, 0xE5)

 

AWB on

(0x13, 0xE7)
(0x6F, 0x9F)   // Simple AWB

 

Sunny

(0x13, 0xE5)
(0x01, 0x5A)
(0x02, 0x5C)

 

Cloudy

(0x13, 0xE5)
(0x01, 0x58)
(0x02, 0x60)

 

Office

(0x13, 0xE5)
(0x01, 0x84)
(0x02, 0x4C)

 

Home

(0x13, 0xE5)
(0x01, 0x96)
(0x02, 0x40)

 

Advertisements

2 thoughts on “White Balance control with OV7670

  1. Where you find out how to turn off auto white balance? The datasheet doesn’t give description on register 0x6F

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s