1. Field of the Invention
The present invention relates to an image processing technique for adjusting brightness of an image, and more particularly to a technique for adjusting luminance of an image using an estimated illumination light distribution of an image.
2. Description of the Related Art
According to the spread of digitized photographic images, users of personal computers and printers can correct images using such apparatuses. Nowadays, personal computer users adjust tint and contrast of a photographed image (photographic image) using applications. Further, many techniques have been developed which are useful in automatically correcting overall image brightness when an image is output by a printer.
Generally, conventional photograph correction is used for mainly correcting the overall image according to its feature. Thus, it has been difficult to correct the brightness of a local dark portion like a backlight image. As a method for correcting brightness of a local portion, there is a method that estimates an illumination light distribution of an image and corrects the luminance according to the distribution.
According to the local brightness correction (hereinafter referred to as local luminance correction) method based on the estimated illumination light distribution, the distribution of the illumination light is assumed to change gradually. Thus, the luminance distribution is estimated by extracting a low frequency component from a luminance component of the image. However, when an image is corrected using the local luminance correction, the contrast becomes partially low depending on the feature of the input image. Japanese Patent Application Laid-Open No. 2008-011286 discusses a method for obtaining a high quality (high contrast) image by generating a histogram of a pixel value distribution of all the pixels of a local luminance corrected image, and expanding a dynamic range of the local luminance corrected image by changing the generated histogram.
However, if the dynamic range is expanded by histogram processing for changing the pixel distribution of the histogram, the expansion may cancel an effect of the local luminance correction depending on a feature of the input image. For example, assuming a case that a dark portion of an input image is corrected to be brighter according to the local luminance correction, the corrected portion is distributed in the dark portion of the dynamic range, and the dynamic range has room for the dark side. In this case, the dynamic range will be expanded to the maximum when a level of such an image is corrected. Since the distribution is expanded toward the dark side, the portion which has been corrected to be bright according to the local luminance correction will be dark again.
This correction is described with reference to FIGS. 16A to 16C. FIG. 16A is an example of a histogram of an input luminance image. FIG. 16B is an example of a histogram of a local luminance corrected image. FIG. 16C is an example of a histogram of the local luminance corrected image which has undergone the dynamic range expansion processing. As is shown by a line 1160, pixel values of the dark portion of an input luminance image histogram are moved to the bright side after the local luminance correction processing. However, as is shown by a line 1161, when the dynamic range expansion of the local luminance corrected image is performed, the pixel values which have moved to the bright side are moved back to the dark side. As a result, the effect of the local luminance correction is cancelled.