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);
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, 0xE7) (0x6F, 0x9F) // Simple AWB
(0x13, 0xE5) (0x01, 0x5A) (0x02, 0x5C)
(0x13, 0xE5) (0x01, 0x58) (0x02, 0x60)
(0x13, 0xE5) (0x01, 0x84) (0x02, 0x4C)
(0x13, 0xE5) (0x01, 0x96) (0x02, 0x40)