An image is composed of three channels, namely: red, green and blue. These three channels can be described by the following equations.
whereIn these equations, S(λ) represents the spectral power distribution of the incident light, p(λ) is the surface reflectance while n(λ) for each channel are the spectral sensitivity of the camera. Observe that in the RGB equations, a factor K is present. This factor is termed as the white balancing constant that is equal to the inverse of the camera output when shown a white object.
White balancing can be thought as the process of finding and applying the right white balancing constant such that a white patch in an image is visually seen as white.
There are two known methods in achieving automatic white balance: the White patch Algorithm and the Gray World Algorithm. In the White patch algorithm, given an unbalanced image, the RGB values of a known white in the image is used as the coeffient K. On the other hand, the Gray world algorithm assumes that the average color of the world is gray. Thus in this algorithm, the balancing constant is equal to the average R, G and B multiplied by some constant since gray is a family of white.
For this exercise, the two methods: White Patch algorithm and Gray World Algorithm were applied to images of varying white balancing conditions.
The resulting images when the White patch algorithm was implemented. Each column in the images above denotes a white balancing condition. The images in the first column has an auto white balance setting, second column has a cloudy setting, third column has a daylight setting and finally the last column was taken with a fluorescent white balancing setting.
When the gray world algorithm was applied, the resulting images are as follows.
When the gray world algorithm was applied, the resulting images are as follows.
The order of the images is the same as descried in the previous one. It can be obseved that for the gray world algorithm, the result shows that the rendered images are generally whitish. Also notice that in the images rendered using gray world, part of the image is somewhat saturated. This maybe due to the possibility that the cropped white object in the image is saturated. On the other hand, it can be observed that for both of the algorithm, images with white objects appearing as white were able to be reconstructed.
Images of varying brightness were also captured with a white balancing setting of daylight.
The image rendered using the White Balancing Patch algorithm,
On the other hand, that of the gray world algorithm,
Again, it can be observed that the rendered image using the WPA is better than that rendered by the GWA.
For this activity I give myself a grade of 8. This is because The patch that I used for the GWA is saturated.
Please correct your saturated images. Before displaying the image, multiply by a number less than 1.0 to avoid saturation.
ReplyDelete