摘要 |
The present invention detects backlit images by analysis of the shape of its luminance histogram, and enhances backlit and low contrast images by application of a mask in the frequency, rather than spatial domain. More particularly, the present invention detects backlit images by analysis of a luminance histogram to determine if the histogram is inverse-bell-shaped or double-peaked, by smoothing the histogram, converting the smoothed histogram into a curve function, counting the number of crossings of the curve function at a baseline, and designating the image as backlit if the number of crossings is four or more. The invention preferably adjusts the image's luminance histogram vertically, along the Y-axis, and counts crossings at the X-axis. Additionally, the invention enhances backlit and low contrast images by converting luminance information from the spatial domain to the frequency domain, applying a mask that reduces global contrast and accentuates local contrast, inverting the masked luminance information to obtain manipulated luminance information in the spatial domain, and replacing the original luminance channel with the manipulated luminance information. The invention preferably takes the logarithm of the luminance information calculated in the frequency domain, and takes the inverse logarithm of the inverted, masked luminance information.
|