Color signals detected by colored cameras depend on the light source illuminating the scene or the objects. Images captured by camera are usually applied with corrections for objects to appear in their natural color. This is usually done by white balancing. Various white balancing algorithms have already been established. Colored cameras apply white balancing, sometimes automatically. Cameras also provide manual settings for white balancing, which is usually described by common light sources or settings such as sunlight, fluorescent lamps, etc.
In this activity, two automatic white balancing algorithms are implemented: white patch and gray world algorithms. The white patch algorithm basically takes the RGB values of a known white object in the image and subtract these values to each corresponding channel of the image. In effect, the white patched object would be rendered white and the whole image would be white balanced. On the other hand, the gray world algorithm takes the average RGB values of the whole image, and divide the whole image channels using these values. These algorithms make sense because the spectrum or color of light illuminating the scene is basically cancelled out upon division.
The two algorithms were used to white balance a set of images captured using a Motorola V3 camera set to different lighting conditions (white balancing setting; assumed incorrect), namely, cloudy, home, night, office and sunny. Two set of images were taken: (1) for a set of objects with bright colors representing the major hues (red, orange, yellow, green, blue and violet) and (2) for a set objects with the same hue, but different values and saturation (red). A white object was placed with the two sets, which would serve as the white patch. It is important the images are captured with a fixed light source illuminating the objects. Furthermore, images obtained should not be saturated. It can even be taken with very low exposures and it would still contain most , if not all, of the color information. (M. Soriano, AP 186 Activity 11 Manual, 2009)
Resulting white balanced images were obtained and shown below. The original images show that the white object no longer appears white because of the incorrectly set lighting condition of the camera used for capturing. It actually appears with the same color as the assumed setting from the lighting condition. This represents the reflection of the white object of the spectrum of the light source. The white balanced images resulting from the two algorithms correctly rendered the white object white. This should also ensure that the colors of the other objects are accurately obtained and displayed.
***The results are presented with the original unbalanced image at the top and the white patch algorithm result (left) and gray world algorithm result (right) at the bottom.
Major Hues Representation
CloudyIn this activity, two automatic white balancing algorithms are implemented: white patch and gray world algorithms. The white patch algorithm basically takes the RGB values of a known white object in the image and subtract these values to each corresponding channel of the image. In effect, the white patched object would be rendered white and the whole image would be white balanced. On the other hand, the gray world algorithm takes the average RGB values of the whole image, and divide the whole image channels using these values. These algorithms make sense because the spectrum or color of light illuminating the scene is basically cancelled out upon division.
The two algorithms were used to white balance a set of images captured using a Motorola V3 camera set to different lighting conditions (white balancing setting; assumed incorrect), namely, cloudy, home, night, office and sunny. Two set of images were taken: (1) for a set of objects with bright colors representing the major hues (red, orange, yellow, green, blue and violet) and (2) for a set objects with the same hue, but different values and saturation (red). A white object was placed with the two sets, which would serve as the white patch. It is important the images are captured with a fixed light source illuminating the objects. Furthermore, images obtained should not be saturated. It can even be taken with very low exposures and it would still contain most , if not all, of the color information. (M. Soriano, AP 186 Activity 11 Manual, 2009)
Resulting white balanced images were obtained and shown below. The original images show that the white object no longer appears white because of the incorrectly set lighting condition of the camera used for capturing. It actually appears with the same color as the assumed setting from the lighting condition. This represents the reflection of the white object of the spectrum of the light source. The white balanced images resulting from the two algorithms correctly rendered the white object white. This should also ensure that the colors of the other objects are accurately obtained and displayed.
***The results are presented with the original unbalanced image at the top and the white patch algorithm result (left) and gray world algorithm result (right) at the bottom.
Major Hues Representation
Home
Night
Office
Sunny
Single Hue Representation
CloudyHome
Night
Office
Sunny
Intuitively, the white patch algorithm provides a better white balancing compared to the gray world algorithm. This is because the white patch algorithm is much more specific such that the white object is to be made white. The difference is much more evident in the results for the single hue set of objects. Gray world algorithm takes the average of the whole image, which makes it suffer if there is a dominant color in the image. The spectrum of the light source would not have a significant effect on the average because the majority of detected signal belongs to the dominant color. This would not be a problem for the white patch algorithm because there is a reference white patch or object that is much more specific. It would not be affected by any dominant color in the image because it still is based on the white patch.
However, as can be seen in the results for the set of images of the major hues, the gray world algorithm is sufficient enough for white balancing without any dominant color. Without the dominant color, the light source color would be the dominant signal that would account for the average RGB values of the image.
The significance of the gray world algorithm is that it doesn't need any reference white patch. It can be applied to any image directly. The white patch algorithm needs the reference white object making it more inflexible.
For this activity, I would like to give myself a grade of 10 for having relatively pleasing results. Moreover, I think I have provided an extensive analysis of this results.
I would like to thank our professor, Dr. Maricor Soriano for the discussions regarding this activity, and some of my classmates for preliminary images taken (camera and laptop use).
However, as can be seen in the results for the set of images of the major hues, the gray world algorithm is sufficient enough for white balancing without any dominant color. Without the dominant color, the light source color would be the dominant signal that would account for the average RGB values of the image.
The significance of the gray world algorithm is that it doesn't need any reference white patch. It can be applied to any image directly. The white patch algorithm needs the reference white object making it more inflexible.
For this activity, I would like to give myself a grade of 10 for having relatively pleasing results. Moreover, I think I have provided an extensive analysis of this results.
I would like to thank our professor, Dr. Maricor Soriano for the discussions regarding this activity, and some of my classmates for preliminary images taken (camera and laptop use).
An 11 is deserved for the in-depth discussion.
ReplyDelete