(1) Field of the Invention
This invention relates generally to color image processing and relates more particularly to a method to identify automatically white balance parameters with a good clustering for different illuminants.
(2) Description of the Prior Art
The human eye adapts to the color temperature of the illumination to some extent and thus gives us similar looking images in different lights. This is not the case with image sensors used in digital cameras. Instead of an adaptation a white balance operation has to be performed. The white balance operation is simply a scaling of the color channels to assure that a grey object remains grey even if the color of the illumination changes. To do this properly a grey object is needed in the scene for calibration, but this is usually not available and there is a need for automatic routines that can deal with this scaling based on the content of any image.
The main difficulty is to extract the relevant information from the current image and not to confuse object color with illumination color. Especially difficult are situations where the colored object, for example a blue sky, covers the whole picture.
The color-filter-array (CFA) of a color imager follows often the commonly used “Bayer” pattern. The pattern of said Bayer CFA is showed in
In order to obtain this color information, the color image pixels are covered with a red, a green, or a blue filter, in a repeating pattern. This pattern, or sequence, of filters can vary, but the widely adopted “Bayer” pattern, which was invented at Kodak, is a repeated 2×2 arrangement as shown in
This pattern, showed in
Depending on the “color temperature” of a light source, a white object may generate different values for its R, G and B pixel values. For example, when the camera is pointed at a uniformly diffused white object that fills the entire field of view, the resulting R, G and B values may form the following matrix as shown in
R=110
G=300
and
B=200.
R=200
G=300
and
B=110.
Both cases require correction because a white object should have equal R, G and B data values. The simplest correction would involve “equalizing” the data—if the Green pixel values are kept unchanged and the Red and Blue pixel values are multiplied by appropriate “gain” coefficients.
In the case of the “fluorescent light” example, said gain coefficient Rg (or Red gain) should be 300/110=2.7 and Bg (or Blue Gain) should be 300/200=1.5. In the case of “incandescent light” example, Rg should be 300/200=1.5 and Bg should be 30/110=2.7.
As shown in the above examples, the Rg and Bg coefficients depend on the type or the color temperature of the illumination that is used. Therefore a “white balance” operation is required each time the illumination changes.
A common method in prior art is outlined in
U.S. Pat. No. (5,917,556 to Katayama) describes a method for correcting a colour video signal for white balance comprising the steps of: providing a digital colour image signal having a sequence of mono-color pixels, wherein each of the pixels represents one colour of first, second, and third different colours, which are repeated in a pre-set pattern; coarse white balancing processing each monocolor pixel for a coarse white balance; spatial processing the sequence of mono-color pixels to produce a sequence of tricolour pixels, wherein each of the tricolour pixels represents the first, second, and third different colours; and colour correction and fine white balancing processing each of the tricolour pixels.
U.S. Pat. No. (5,995,142 to Matsufune) discloses an imaging device including an imaging device for converting an image into a plurality of colour signals each having a signal level; a white balance amplifier for adjusting the signal level of at least one colour signal to produce a plurality of amplified colour signals; a calibration device for calibrating the white balance amplifier and for producing at least one calibration parameter; a detecting device for detecting the amplified colour signals; a calculation device for calculating at least one white balance amplification adjustment; a comparing device for comparing at least one white balance calibration parameter; and an automatic adjustment device for automatically adjusting the white balance amplifier.
U.S. Pat. No. (6,201,530 to Thadani et al.) shows a method for displaying an image to a display device. This method includes sequentially the steps of receiving the image in a first data format, performing a white balance correction in combination with a gamma correction for the image in the first data format, performing a colour correction in combination with a colour space conversion to a second data format for the image, and displaying the image in the second data format to the display device.
A principal object of the present invention is to achieve a simple and fast automatic white balancing in digital cameras.
A further object of the present invention is to achieve a method how to get white balance parameters with good clustering for different illuminants.
In accordance with the objects of this invention a method for an automatic white balancing of color images for different illuminants has been achieved. First the average pixel values of the colors of the color array used are determined. The next step is to calculate the ratios of the average pixel values of the previous step, followed by using the ratios of the previous step to categorize the image into different classes according to the prevalent illumination, and, finally, apply predefined white balance factors according to the illumination category of the previous step.
In accordance with the objects of this invention a method for an automatic white balancing of color images for different illuminants has been achieved. First the average pixel values of the colors Red, Green and Blue are determined. The next step is to calculate the ratios of the average pixel values of the previous step, followed by using the ratios of the previous step to categorize the image into one of the classes daylight, indoor tungsten light or indoor fluorescent light according to the prevalent illumination, and, finally, apply predefined white balance factors according to the illumination category of the previous step.
In accordance with the objects of this invention a system for an automatic white balancing of color images has been achieved. Said system is comprising a lens, color sensors for each color of the color array used, a non-volatile memory to store the predefined white balance values for different illuminations, an output device; and a processor to perform the processing of the color images.
In the accompanying drawings forming a material part of this description, there is shown:
The preferred embodiments disclose a method and a system to achieve a simple and fast automatic white balancing in digital cameras. A new algorithm has been developed for said purpose. The principle is the following: The color information from the sensor channels is measured and averaged over all pixels. The result is equivalent to what color a 1-pixel camera would see if pointed at the same scene (Red, Green and Blue). From this “statistical pixel” two color indices, describing the ratios between B/R and G/R, are calculated. Pictures taken in daylight, fluorescent and incandescent light can be separated due to their location in the B/R vs G/R space.
Rave=ΣRij/Nr,
Gave=ΣGij/Ng,
and
Bave=ΣBij/Nb,
wherein Nr equals the total number of red pixels in the image, Ng equals the total number of green pixels and Nb equals the number of blue pixels, Rij equals the Red pixel value of the co-ordinates I, j within the color filter array. Gij and Bij correspond to the Green and Blue pixel values.
In the next step 42 ratios of said average values of the colors according to the color scheme used are calculated. In a preferred embodiment using the R, G and B scheme said ratios are
In the following step 43 said ratios are used to categorize the image into different classes according to the prevalent illumination.
In step 44 of
While the invention has been particularly shown and described with reference to the preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
02368103 | Sep 2002 | EP | regional |
Number | Name | Date | Kind |
---|---|---|---|
5659357 | Miyano | Aug 1997 | A |
5805213 | Spaulding et al. | Sep 1998 | A |
5917556 | Katayama | Jun 1999 | A |
5995142 | Matsufune | Nov 1999 | A |
6181374 | Saito et al. | Jan 2001 | B1 |
6201530 | Thadani et al. | Mar 2001 | B1 |
6573932 | Adams et al. | Jun 2003 | B1 |
6947079 | Parulski et al. | Sep 2005 | B1 |
20020167596 | Suzuki et al. | Nov 2002 | A1 |
Number | Date | Country |
---|---|---|
0519761 | Jun 1992 | EP |
0470769 | Dec 1992 | EP |
06292221 | Feb 1995 | JP |
08322061 | Mar 1996 | JP |
2002 185977 | Jun 2002 | JP |
Number | Date | Country | |
---|---|---|---|
20040057615 A1 | Mar 2004 | US |