Data Analysis
This section deals with the analysis of the data gathered in the Experiment section as well as formulating conclusions as to how the Gray World assumption fits into the camera's color balancing algorithms.
Simply by looking at the images, it is hard to say whether we can determine if Gray World is being enforced by the camera. Thus I extracted some useful data from the images, shown below. All data collections are based on the LINEAR RGB values of the corresponding images.
| Average RGB values /
Corresponding Figure |
Red Average | Green Average | Blue Average |
| Figure 1 (Original) | 0.3997 | 0.3224 | 0.2991 |
| Figure 2 (Gray World) | 0.2991 | 0.2991 | 0.2991 |
| Figure 3 (Camera) | 0.4140 | 0.4396 | 0.4257 |



By looking at the data above, it seems as if the camera increased the intensity of all three color components but favored the Blue Component more. Looking at the averages of the Original Macbeth ColorChecker, we can see that blue has the lowest value. If Gray World assumption was enforced, we would expect for the averages to converge to one value by either increasing the blue values, or decreasing the red and green values. As can be seein in the Gray World Macbeth RGB plot, in comparison to the RGB plot of the original image, we can see that the red and green components were decreased to balance out the lower blue value. In the Camera Macbeth plot, we saw a surplus in the amount of increase for blue, in comparison to the red and green counterparts. This has the same effect of equalizing the average values of the R, G, and B color components. Thus, it does appear that the camera is enforcing the Gray World assumption here. However, further analysis actually contradicts such a conclusion. Please refer the ANALYSIS section below for more details.
In this experiment, there are definitely some visual differences between the camera output and the enforced Gray World output of the filtered images. Visually, it appears that the camera performed fairly well against both the red and yellow casted images. We can clearly notice that the white surface for both red and yellow casted images were rendered almost perfectly. This may suggest evidence of the camera performing some type of Specular-Reflection based, or White-Point based color balancing algorithm. Below are plots of the colored surface RGB values for the Camera output and Gray World output images.



We can see that the Red Filtered image has the RED Component boosted up due to the filter. Looking at the Gray World output, we can see the effects of enforcing the Gray World Assumption by the fact that the RED component is attenuated while that of the GREEN and BLUE are augmented by scale factors of (0.7015, 1.2272, 1.3165), respectively, for all surfaces. This was clearly not the case for the Camera output. From the plot above, the camera seems to have increased all of the color components for each surface. On the average, the camera increase the R, G, and B components of the image by the following factors: (1.0421, 1.2956, 1.4468). If we take the ratios of R/G and R/B for both the Gray World output and the camera output, we can clearly conclude that the camera is not enforcing the Gray World assumption on the red filtered Macbeth image.
| Red Cast | GREEN / RED | BLUE / RED |
| Camera Output | 1.2432 | 1.3884 |
| Gray World Output | 1.7494 | 1.8767 |
More evidence can be found when we compare the average RED, GREEN, and BLUE color components of the different images. The results are shown below:
| Average RGB values /
Corresponding Figure |
Red Average | Green Average | Blue Average |
| Red Filtered Macbeth | 0.3997 | 0.2285 | 0.2130 |
| Camera Macbeth | 0.4541 | 0.3290 | 0.3665 |
| Gray World Macbeth | 0.3131 | 0.3131 | 0.3131 |
Clearly, the Camera's RGB averages do not converge to a common value and thus fails to enforce the Gray World assumption on the image. Below shows the identical set of data for the YELLOW casted image. The same argument can be used to conclude a lack of Gray World Assumption enforcement.



| Yellow Cast | GREEN / RED | BLUE / RED |
| Camera Output | 1.2186 | 1.5408 |
| Gray World Output | 1.2398 | 1.8768 |
| Average RGB values /
Corresponding Figure |
Red Average | Green Average | Blue Average |
| Yellow Filtered Macbeth | 0.3997 | 0.3224 | 0.2130 |
| Camera Macbeth | 0.4446 | 0.4300 | 0.3857 |
| Gray World Macbeth | 0.3131 | 0.3131 | 0.3131 |
Looking at the G/R and B/R ratios between the two filtered images, it seems as if the camera is adjusting the RGB components in a similar fashion for both images. The G/R and B/R ratios are almost the same for the two images, with values of (1.2432, 1.3884) for red cast, and values of (1.2186, 1.5408) for the yellow cast. In comparison to the GrayWorld G/R and B/R ratios between the two filtered images, they are quite different, with values of (1.7494, 1.8767) for the red cast, and values of (1.2398, 1.8768) for the yellow cast. Thus, it seems like the camera is performing the same operations on both the red and yellow filtered images. This is definitely not in agreement with the GrayWorld results.
At this point, I have suspicions that the specular surface, or the white surface may be used by the camera to perform color balancing. To test this assumption, I performed a simliar set of experiments as the above but altered the Macbeth ColorChecker by darkening the three most luminant surfaces and then enforcing the Gray World assumption upon the images. Visually, we can notice an increase in the brightness of the camera output images when compared to those from the previous experiment. By taking away bright patches from the Macbeth ColorChecker, the camera compensates by rendering the images to be brighter. Could this be because the camera is adjusting the colors of its images relative to a selected specular point on the image?
Once again, we can perform the same set of analysis from the above experiment to better understand the situation. I only display the G/R and B/R ratios for the two color casted images below:
| Red Cast | GREEN / RED | BLUE / RED |
| Camera Output | 1.4376 | 1.5014 |
| Gray World Output | 1.5000 | 1.5000 |
| Yellow Cast | GREEN / RED | BLUE / RED |
| Camera Output | 1.3673 | 1.7110 |
| Gray World Output | 1.0000 | 1.4999 |
From the above data, the camera response to the RED cast image appears to have the same results as the Gray World response to the same image. However, if we compare our results with those from the YELLOW cast image, then it becomes clear that the camera indeed, is not enforcing Gray World Assumption.
First of all, the camera's average G/R and B/R ratios are very similar in both the yellow and red casted image. This leads me to believe that the camera is once again performing the same operations to the color components of the two differently casted images. For the Gray World outputs, the operations performed on the RGB color components are drastically different between the two differently color casted images.
Also, the Camera's average G/R and B/R ratios of values (1.4376, 1.5014) for the red casted image, and (1.3673, 1.7110) for the yellow casted image, are slightly higher than those from the previous experiment, with values of (1.2432, 1.3884) for red casted image, and values of (1.2186, 1.5408) for the yellow casted image. In accordance to my suspicion of the camera taking into account specular points in the image for color balancing, the difference seen here could be attributed to the fact that the camera is using different specular points to perform it's color balancing. (Remember, the three brightest surfaces from the previous experiment have been darkened to down cast their specularity).
If the camera does take into account specularity points in the image to perform color balancing, what would the results be if we used dark surfaces of constant color?
The results were fairly surprising to me in that the dark surfaces on the monitor were rendered by the camera to be bright colors of a slightly different, more bluish-shade. I tried different exposure settings, and the results don't really alter the colors of the images too much. With a longer exposure, the images gets more faded while with a shorter exposure, the images seemed more intense in color. I noticed that even when I set the exposure to the lowest allowable level, the camera still seems to wait a while before clicking the shutter. This seems to imply some sort of an automatic exposure mechanism that will adjust to the amount of ambient lighting available. If the ambient lighting is below some threshold, then the exposure time is automatically extended irredgardless of the exposure settings.
Clearly, the camera did not enforce the Gray World Assumption here. Otherwise, the images would have appeared gray in both cases.
The next thing I decided to do was to take a picture of a real image that was dark and constant in color. I chose to use the backrest of a standard ISE BLUE lab chair. The lights were left on and two shots were taken, one with the flash, and one without the flash. The results were quite revealing. The photo that was taken with the flash on retained the blue color of the chair. This is not surprising since we expect the camera to color balance fairly accurately when the exact light source is known. However, when the shot was taken without the flash, the blue chair turned grey. This is strong evidence of the camera enforcing the Gray World assumption on this image. Why did I not see such an effect on the Dark-Constant-Colored surfaces I rendered on the monitor?
I once again tried an experiment by taking shots of the Dark-Constant-Color monitor images with the lights turned on. The images under such a condition, turned to a shade of very light grey, almost white. This stronly suggests an attempt to enforce the Gray World Assumption.
The photo of a blank monitor remained black while that of a rendered black surface on the monitor turned BLUE. This suggests that the monitor, even when displaying black, which has rgb values of (0,0,0), could still be emitting photons in small amounts. If the camera adjusts it's exposure to be long enough to pick up such small amounts of illumination, and the camera happens to have more sensitive blue light detectors, then a black image would surely appear blue. This hypothesis would surely explain the results obtained in this experiment.