A colored digital image is an array of pixels each having red, green and blue light overlaid in various proportions. Per pixel, the color captured by a digital color camera is an integral of the product of the spectral power distribution of the incident light source S(l), the surface reflectance r(l), and the spectral sensitivity of the camera h(l). That is, if the color camera has spectral sensitivity hR(l), hG(l) , hB(l) for the red, green, and blue channels respectively, then the color of the pixel is given by
is a balancing constant equal to the inverse of the camera output when shown a white object (r(l) = 1.0). Equations (1) to (4) explain why sometimes the colors captured by a digital camera appear unsatisfactory.In this activity, we aim to observe the differences between images obtained using several white balancing settings in a camera and compare two white balancing algorithms: Reference White and Gray World. We capture an obviously wrongly white balanced image, apply the two algorithms, and comment on their white balancing quality.
In the Reference White Algorithm, you capture an image using an unbalanced camera and use the RGB values of a known white object as the divisor. In the Gray World Algorithm, it is assumed that the average color of the world is gray. Gray is part of the family of white, as is black. Therefore, if you know the RGB of a gray object, it is essentially the RGB of white up to a constant factor. Thus, to get the balancing constants, you take the average red, green and blue value of the captured image and utilize them as the balancing constants.
source: M. Soriano, A15 - Color Image Processing.pdf
____________________________________________________________________
The following images were taken using an Olympus Stylus 770SW digital camera with an exposure of -2 under a fluorescent light source. I utilized a Macbeth chart since the major hues were represented and white was also present.
(order of images from left to right, top to bottom: auto WB, daylight, cloudy, tungsten, fluorescent1, fluorescent2, fluorescent3)
Upon comparison, we can observe that the colors are represented in high quality in image 1 and 5, which are the auto white balance and fluorescent1 settings, respectively. The sunlight and cloudy settings made the colors look dimmer, flourescent2 and 3 had a larger blue component, and the tungsten setting was just plain bad. What it did was since a tungsten light source has a low blue component upon looking at its spectra, the camera increased the blue to compensate. I will use this obviously wrongly white balanced image in the next part of the activity.
____________________________________________________________________
Results:
ORIGINAL, REFERENCE WHITE, GRAY WORLD


We can see from the images that the Reference White Algorithm produced a better result. The colors are more vibrant. However, some patches became white, like yellow and light orange. But in comparison with the Gray World algorithm, this is still acceptable. Majority of the colors are now green or white in the last image, showing poor quality. Next, we investigate the effects of these two methods for objects with similar hues.
Again, I use the tungsten white balance setting because it is really not suited for the illumination condition (fluorescent). We implement the two algorithms and the results are shown below.
Results:
ORIGINAL, REFERENCE WHITE, GRAY WORLD


Again, the Reference White Algorithm produced the better result. This is because the red component of white is really red and we use this as the divisor in equations 1-3. In comparison with the Gray World algorithm, the red component of the whole image is not necessarily also red and thus the error is produced. From both the Macbeth chart and the blue objects, we observe that the blue parts become green and those with some red component turns white.
____________________________________________________________________
I give myself 10 points for this activity since both algorithms were implemented and the results were very clear. Thanks to Marge Maallo for her help in this activity.
0 comments:
Post a Comment