Title: Automatic%20Color%20Balancing
1Automatic Color Balancing
2Outline
- Motivation
- Problem Statement
- Algorithms Attempted
- Solution
- Lessons Learnt
3Motivation
- Mosaicing images using cameras arranged to give
omni direction view results in color mismatch. - Each camera is capturing a different scene
4(No Transcript)
5Problem Statement
- To extract the parameters used by the FireWire
Camera (it uses 2 channels) for color balancing
an acquired image.
6(No Transcript)
7Problem in extracting these parameters
- Fire Wire APIs Provide for setting and
recovering the color channel parameters. - APIs for recovering color balancing parameters
are non-existent.
8Algorithms Attempted
- To use an algorithm which would give similar
results to that used by the cameras algorithm. - Algorithms attempted
- Gray world, White patch
- hybrid of gray world and white patch assumption
- Polynomial Mapping
9Description of Gray world Algorithm
- Assumes average color of image predefined value
of grey. - Rn Ro mean(Intensity)/ mean(Ro)
- Gn Go mean(Intensity)/ mean(Go)
- Bn Bo mean(Intensity)/ mean(Bo)
10(No Transcript)
11Results
- Dependant - average Intensity and means of
respective channels in non color balanced image - For high intensity pixels, for lower intensity
pixels algorithm over corrects.
12Description of White Patch
- Assumes that maximum value of each channel
corresponds to 255 - RnRo255/max(Ro)
- GnGo255/max(Go)
- BnBo255/max(Bo)
13(No Transcript)
14Results
- Very poor color correction.
- Used along with gray world, much better
- color correction.
15Description of Polynomial mapping method
Polynomial Coefficients
Non color balanced image
Cameras Color balanced image
Coefficients
a1Mean ( Pixels(Meancb /- sdcb)) /
Mean(Pixels(Meanncb /- sdncb))
a2Mean( Pixels(Meancb/- 2sdcb)) /
Mean(Pixels(Meanncb /- 2sdncb))
a3Mean ( Pixels(Meancb /- 3sdcb)) /
Mean(Pixels(Meanncb/- 3sdncb))
16Results
- In case of a good distribution of colors
-resultant image similar to cameras color
balanced image
17(No Transcript)
18Results (contd.)
- If the distribution of colors is less, then
resultant image - Has out of gamut pixels
- Not similar to that of color balanced image
19(No Transcript)
20The solution
- Properties of Color Balanced Image (cameras
Algorithm) - Means of the channels (corresponding to color
space) converge -similar value. - value dependant on illuminant of the scene.
21(No Transcript)
22Mean (red)-0.5888 Mean (green)-0.5719 Mean
(blue)-0.5965
Color balanced Image
23Reverse Engineering to Obtain Parameters
- Using Fire Wire APIs
- Set parameters for the color channels
- Scan through range of all the possible
parameters. - Find the 2 mean channel ratios
- redavg/greenavg,
- blueavg/greenavg for each set value.
- Find the combinations of the parameters which
make the 2 mean ratios to lie within the
threshold of 0.9 1.1. - Choose those values whose mean ratios are nearest
to one. - Retrieve these values, as the camera balancing
parameters
24Demo
25Lessons Learnt
- In any project what ever be its nature.
- Spend enough time in the problem space,
understanding the problem. - Understanding why it is a problem.
- Clients way of viewing the problem- need not be
right. - For instance, U/B V/R was mistaken to be U
over B V over R rather than U or B and V or R - Y 0.299R0.587G0.114B
- U/B 0.492(1-Y/B)
- 0.3780-0.1471(R/B) -0.2888(G/B)
- V/R 0.877(1-Y/R)
- 0.6148-0.5148(G/R) -0.1006(B/R)
26References
- Fast color correction using principal regions
mapping in different color spaces - Maojun Zhang, Nicolas D. Georganas
Distributed and Collaborative Virtual
Environments Research Laboratory (DISCOVER),
University of Ottawa, Ottawa, Canada - www.poynton.com
- http//www.vision.ee.ethz.ch/buc/brechbuehler/mir
ror/color/Poynton-color.html - A new algorithm for unsupervised global and local
color correction Alessandro Rizzi, Carlo Gatta,
Daniele Marini July 2003 Pattern Recognition
Letters, Volume 24 Issue 11 - Comparison of the accuracy of different white
balancing options as - quantified by their color constancy J A
Stephen Viggiano, jasv_at_acolyte-color.comAcolyte
Color Research,West Henrietta, NY, USA - A Comparison of Algorithms for Mapping Color
Between Media of Differing - Luminance Ranges ,J. A. Stephen Viggiano
and C. Jeffrey Wang,Imaging Division RIT
Research Corporation