EE 362 Final Project

Color Balancing:

The Battle of the Algorithms

 

Laura Diaz

 Jessica Heyman

Gustav Rydbeck

 

Introduction

Background

Algorithms

Test Images

Testing Interface

Image Comparison
Methods

Results

Conclusion

Possible Extensions

References

Appendix I

Appendix II

 

Algorithms

For this project, we focused on five main color balancing algorithms.  Each of the algorithms makes a different assumption about the image and then color balances accordingly.  Below is a discussion about how the different algorithms work.

 

 

Gray World

The Gray World assumption is that in a given image the red, green and blue color channels of the image will have the same mean value.  Thus, to implement this assumption, the mean of the red, green and blue channels are calculated and then adjusted so that the means of the blue and red channel are that of the green, since our eyes are most sensitive to this region of the spectrum.  Thus, the average intensity of each of the channels is made gray.

 

 

White World (Perfect Reflector)

The White World color balancing algorithm takes an image and determines the highest intensity present in an image and then defines that intensity to be white. The highest intensity point is determined by finding the point with the minimum Euclidean distance from white, where white is defined as where all channels are saturated or equal to one. Each of the red, green and blue channels are then normalized with respect to the found white point.

 

 

Scale by Max

The Scale by Max algorithm is very similar to the White world algorithm except that it considers each of the color channels independently.  By looking at the values, it determines the maximum value of each the channels and then scales each value in that channel such that the maximum is one.

 

 

Standard Deviation

Noticing that some images had histograms that were highly concentrated around a small range of values, we decided that it would be better to increase the dynamic range of the color intensities.  Thus, the Standard Deviation algorithm calculates the standard deviation of each color channel and then re-adjusts each to be 0.27 (or 70 on a 256 value scale), a value that we found gave perceptually pleasing results.  Contrary to the previous algorithms, though, the Standard Deviation algorithm does not do anything to the mean of the image, thereby not unrealistically skewing a particularly bright or dark image.

 

 

Mean and Standard Deviation

We noticed that many of the images seemed to be lacking in contrast, making them appear hazy.  They also appeared to be quite dark in color, an indication of low mean channel values.  Therefore, in addition to adjusting the standard deviation values we adjusted the mean of each channel as well.  To compensate for these shortcomings in the original image, we adjust the mean of each channel to be 0.5, and we also set the standard deviation of each to be roughly 0.27 (or 70 on a 256 value scale). 

 

 

Combinations of Algorithms

In addition to these five main algorithms, we also color balanced by using a combination of various algorithms. We processed the image with one algorithm, and then performed a second algorithm on the result.  The combinations that we used were:  Gray World/Standard Deviation, Scale By Max/Mean and Standard Deviation, Mean and Standard Deviation/ Scale By Max, Perfect Reflector/Mean and standard Deviation, Mean and Standard Deviation/Perfect Reflector, and Perfect Reflector/Standard Deviation.