OV7670 with both arduino uno and now mega

Hello all,

I have found definitive solution to bad colors!

but before WHY there are bad colors:

Quantum Efficiency of OV7670 is not the same for every channel (R,G,B) so sensor is more sensible to specific wavelenghts. Sensor also use OmniPixel technology that is not BSI (Back-Side Illuminated) and so optical crosstalk is more marked. These are the principal problems that cause bad colors so they should be corrected by software, no perfect color is possible without correction.

now HOW to correct colors:

Industry standard technique is using a Color Correction Matrix that compensate color of every pixel, now to calculate this matrix a Color Checker is needed. Color Checker is a reference card with known colors that is used as reference for given illumination conditions. Standard illuminant is D50.

but in practice?

The faster way is buy a Color Checker like X-Rite, Grey White Balance Colour Card, etc.. and buy an app like Color Corrector (Microsoft Apps) to automatically calculate the color correction matrix (CCM) for some different illumination conditions, then just implement the CCM in firmware or in pc software to display image with better colors, correction is just multiplication/ addition as described by the matrix. In firmware is better to disable automatic (digital) color gain and white balance that is also done with CCM.

Please stick these info in the first post if you find it useful

Thank you