1. Field of the Invention
The present invention relates to an image processing device that performs white balance control, a method of controlling the same, and an image pickup apparatus, and more particularly to white balance processing performed by the image processing device.
2. Description of the Related Art
In recent years, in automatic white balance processing performed by an image processing device, such as an image pickup apparatus, a so-called TTL (Through The Lens) method is widely used. In automatic white balance processing using the TTL method, the color of light from a light source is estimated according to an image obtained by photographing. Further, to calculate a white balance correction value (hereinafter referred to as a WB correction value), it is necessary to accurately distinguish, on the image, between the color of light from the light source and the color of the object.
For example, there has been proposed an image pickup apparatus that divides an image into a plurality of areas (block areas), and applies color information obtained from each divided area to detection frames each indicative of a range of color distribution corresponding to the light source type (see Japanese Patent Laid-Open Publication No. 2003-163944). In this image pickup apparatus, the light source is determined, on a detection frame-by-detection frame basis, according to the number of applicable areas, the luminance level of an object, and an infrared light amount, and white balance control is performed based on the result of the determination.
Further, there has been proposed an image pickup apparatus that is configured to perform proper white balance control with respect to a green object included in a white extraction range, on which an action for converting green to an achromatic color works (e.g. in a case where green trees or grasses are photographed in a dark place, such as a place in the shade) (see Japanese Patent Laid-Open Publication No. 2006-174281). In this image pickup apparatus, white balance is controlled by determining, based on distribution of data on a three-dimensional coordinate system having an illuminance, an amount of green, and an R gain, as coordinate axes, whether an image has been photographed indoors using indoor fluorescent lamps as a light source, or has been photographed outdoors in the sun/shade.
However, in the image pickup apparatuses described in Japanese Patent Laid-Open Publication No. 2003-163944 and Japanese Patent Laid-Open Publication No. 2006-174281, even under the light from the same light source, if the color of an object in an image changes, it is difficult to perform white balance control using the same WB correction value.
For example, the image pickup apparatus described in Japanese Patent Laid-Open Publication No. 2003-163944 considers using an intermediate value of the WB correction values associated with the respective light sources, by changing a gain value according to an evaluation value of each light source. However, in Japanese Patent Laid-Open Publication No. 2003-163944, since the light source is detected based on the color distribution, if the color of an object in the image changes, it is difficult to stably continue application of the WB correction value.
Further, the image pickup apparatus described in Japanese Patent Laid-Open Publication No. 2006-174281 considers stepwise changing the white balance control according to a distance from a light source identification boundary on a three-dimensional coordinate plane. However, also in Japanese Patent Laid-Open Publication No. 2006-174281, if the color of an object changes, it is difficult to stably continue application of the WB correction value, similarly to the image pickup apparatus described in Japanese Patent Laid-Open Publication No. 2003-163944.