Presentation is loading. Please wait.

Presentation is loading. Please wait.

Automatic Color Balancing

Similar presentations


Presentation on theme: "Automatic Color Balancing"— Presentation transcript:

1 Automatic Color Balancing
- Prasanna Venkatesan 1/15/2019

2 Outline Motivation Problem Statement Algorithms Attempted Solution
Lessons Learnt 1/15/2019

3 Motivation Mosaicing images using cameras arranged to give omni direction view results in color mismatch. Each camera is capturing a different scene 1/15/2019

4 1/15/2019

5 Problem Statement To extract the parameters used by the FireWire Camera (it uses 2 channels) for color balancing an acquired image. 1/15/2019

6 1/15/2019

7 Problem 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. 1/15/2019

8 Algorithms 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 1/15/2019

9 Description 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) 1/15/2019

10 1/15/2019

11 Results Dependant - average Intensity and means of respective channels in non color balanced image For high intensity pixels, for lower intensity pixels algorithm over corrects. 1/15/2019

12 Description of White Patch
Assumes that maximum value of each channel – corresponds to 255 Rn=Ro*255/max(Ro) Gn=Go*255/max(Go) Bn=Bo*255/max(Bo) 1/15/2019

13 1/15/2019

14 Results Very poor color correction.
Used along with gray world, much better color correction. 1/15/2019

15 Description of Polynomial mapping method
Polynomial Coefficients Non color balanced image Cameras Color balanced image Coefficients a1=Mean ( Pixels(Meancb +/- sdcb)) / Mean(Pixels(Meanncb +/- sdncb)) a2=Mean( Pixels(Meancb+/- 2*sdcb)) / Mean(Pixels(Meanncb +/- 2*sdncb)) a3=Mean ( Pixels(Meancb +/- 3*sdcb)) / Mean(Pixels(Meanncb+/- 3*sdncb)) 1/15/2019

16 Results In case of a good distribution of colors -resultant image similar to cameras color balanced image 1/15/2019

17 1/15/2019

18 Results (contd.) If the distribution of colors is less, then resultant image Has out of gamut pixels Not similar to that of color balanced image 1/15/2019

19 1/15/2019

20 The 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. 1/15/2019

21 Mean(red)-0.9569 Mean(green)-0.5807 Mean(blue)-1.4180
Color Imbalanced Image 1/15/2019

22 Mean (red)-0.5888 Mean (green)-0.5719 Mean (blue)-0.5965
Color balanced Image 1/15/2019

23 Reverse 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 1/15/2019

24 Demo 1/15/2019

25 Lessons 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 = *R+0.587*G+0.114*B U/B = 0.492*(1-Y/B) = *(R/B) *(G/B) V/R = 0.877*(1-Y/R) = *(G/R) *(B/R) 1/15/2019

26 References 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 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, 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 1/15/2019


Download ppt "Automatic Color Balancing"

Similar presentations


Ads by Google