METHOD AND APPARATUS OF CORRECTING HYBRID FLASH ARTIFACTS IN DIGITAL IMAGES
BACKGROUND [0001] 1. Field of the Invention
[0002] The present invention relates to digital image correction, and particularly to correction of eye artifacts due to flash exposure.
[0003] 2. Description of the Related Art
[0004] U.S. Pat. No. 6,873,743 to Steinberg, which is hereby incorporated by reference, discloses an automatic, red-eye detection and correction system for digital images including a red-eye detector module that determines without user intervention if a red-eye defect exists. If a defect is located in an image the portion of the image surrounding the defect is passed to a correction module that de-saturates the red components of the defect while preserving the other color characteristics of the defect region.
[0005] WO03/071484, Pixology, discloses a method of detecting red-eye features in a digital image comprising identifying highlight i.e. glint regions of the image having pixels with a substantially red hue and higher saturation and lightness values than pixels in the regions therearound. In addition, pupil regions comprising two saturation peaks either side of a saturation trough may be identified. It is then determined whether each highlight or pupil region corresponds to part of a red-eye feature on the basis of further selection criteria, which may include determining whether there is an isolated, substantially circular area of correctable pixels around a reference pixel. Correction of red-eye features involves reducing the lightness and/or saturation of some or all of the pixels in the red-eye feature. In many cases, the eye-artifact that is caused by the use of flash is more complex than a mere combination of red color and a highlight glint. Such artifacts can take the form of a complex pattern of hybrid portions that are red and other portions that are yellow, golden, white or a combination thereof. One example includes the case when the subject does not look directly at the camera when a flash photograph is taken. Light from the flash hits the eye-ball at an angle which may provoke reflections different than retro-reflection, that are white or golden color. Other cases include subjects that may be wearing contact lenses or subjects wearing eye glasses that diffract some portions of the light differently than others. In addition, the location of the flash relative to the lens, e.g. under the lens, may exacerbate a split discoloration of the eyes.
SUMMARY OF THE INVENTION
[0006] A technique is provided for digital image artifact correction as follows. A digital image is acquired. A candidate red-eye defect region is identified in the image. A region of high intensity pixels is identified which has at least a threshold intensity value in a vicinity of said candidate red-eye region. An eye-related characteristic of a combined hybrid region is analyzed. The combined hybrid region includes the candidate red-eye region and the region of high intensity pixels. The combined hybrid region is identified as a flash artifact region based on the analyzing of the eyerelated characteristic. Flash artifact correction is applied to the flash artifact region.
[0007] The flash artifact correction may include red-eye correction of the candidate red-eye region. The flash artifact correction may also include correction of the region of high intensity pixels.
[0008] A bounding box may be defined around the candidate red-eye defect region. The identifying of the region of high intensity pixels may comprise identifying a seed high intensity pixel by locating said seed high intensity pixel within said bounding box. The seed pixel may have a yellowness above a pre-determined threshold and a redness below a pre-determined threshold. The region of high intensity pixels may be defined around the seed pixel.
[0009] The analyzing may include calculating a difference in roundness between the candidate red-eye region and the combined region. The red-eye correction may be applied when the roundness of the combined hybrid region is greater than a threshold value.
[0010] The method may include determining to apply red-eye correction when a roundness of the combined hybrid region is greater than a roundness of the candidate red-eye region by a threshold amount.
[0011] The method may include determining to not apply correction when the region of high intensity pixels includes greater than a threshold area. The area may be determined as a relative function to the size of said bounding box.
[0012] The method may include determining a yellowness and a non-pinkness of the region of high intensity pixels. The acquired image may be in LAB color space, and the method may include measuring an average b value of the region of high intensity pixels and determining a difference between an average a value and the average b value of the region of high intensity pixels.
[0013] The analyzing may include analyzing the combined hybrid region for the presence of a glint, and responsive to detecting a glint, determining to not correct the region of high intensity pixels responsive to the presence of glint.
[0014] The method may include correcting the region of high intensity pixels by selecting one or more pixel values from a corrected red-eye region and employing the pixel values to correct the region of high intensity pixels. The selected pixel values may be taken from pixels having L and b values falling within a median for the corrected red-eye region.
[0015] The method may include determining to not apply correction when an average b value of the region of high intensity pixels exceeds a relatively low threshold or if a difference between average a and b values is lower than a pre-determined threshold.
[0016] The method may include converting the acquired image to one of RGB, YCC or Lab color space formats, or combinations thereof.
[0017] The analyzing of the acquired image may be performed in Luminance chrominance color space and the region of high intensity pixels may have a luminance value greater than a luminance threshold, and blue-yellow chrominance values greater than a chrominance threshold and a red-green value less than a red-green threshold.