Code covered by the BSD License

### Highlights from Gray World Colour Correction

2.0
2.0 | 2 ratings Rate this file 5 Downloads (last 30 days) File Size: 1.18 KB File ID: #40937 Version: 1.0

# Gray World Colour Correction

### Sander Verhaeven (view profile)

A colour correction function based on the gray world assumption algortihm.

File Information
Description

A colour correction function based on the gray world assumption algortihm.
Gray world assumption is based on the principal that on average the world is gray. With this principal in mind we deduce that the average pixel value of an Unsigned 8-bit integer image is 127.5. By
calculating the real average pixel value, the scaling value is computed. This scaling value is used to scale the entire image linearly so that the average of the image is 127.5.
In practice the average of each individual channel is used to calculate a separate scaling value for each channel. This way the illumination on the different channel is eliminated
independent.
When using this algorithm it is important to keep the following in mind. An image in which many similar colors are present gives a bad result because the algorithm needs a wide range of colors. Otherwise the algorithm illuminates this dominant color.
This function can be executed on every image represented by both a one-dimensional and three-dimensional matrix.

MATLAB release MATLAB 7.12 (R2011a)
03 Jun 2015 Maryam Tavakolelahy

### Maryam Tavakolelahy (view profile)

Thank you Sander
If we would like to use grayworld assumption(is it an algorithm or assumption?)for skin detection, it will compensate illumination component.. yes? how it could help for better detection? or is it possible using this grayworld by some improvements, directly as method of skin detection?

Thank you so much
Regards

30 May 2015 Sander Verhaeven

### Sander Verhaeven (view profile)

[2] Color Constancy, Marc Ebner, Wiley, 406 pages, 2007

Color constancy discussed the principal of color constancy. In the introduction of this book one can read what color constancy is. Chapter 6: Algorithms for

Color Constancy under Uniform Illumination (p103-134) explains the gray world assumption colour correction algorithm.

Comment only
30 May 2015 Sander Verhaeven

### Sander Verhaeven (view profile)

see

Comment only
29 May 2015 Maryam Tavakolelahy

### Maryam Tavakolelahy (view profile)

what is the reference paper for this algorithm?