Patent ID: 7881554

Claim:
A method for correcting a luminance intensity of pixels of an input digital image for generating a corrected digital image, a luminance of each pixel being calculated as a function of the luminance of a corresponding pixel in an original image according to a parametric function, the method comprising: generating a mask of the input digital image to be corrected according to a bilateral filtering technique; for each pixel of the input digital image, establishing a respective value of at least one parameter of the parametric function based upon the luminance of a corresponding pixel of the mask; establishing a number of dark pixels in the corrected digital image and in the input digital image; if there are dark pixels in the input digital image, performing a stretching operation on the corrected digital image to have a same percentage of dark pixels as in the input digital image, then performing a clipping operation based upon a first percentage; if there are no dark pixels in the input digital image, performing the stretching operation and the clipping operation to clip a second percentage of the darkest pixels; establishing a number of bright pixels in the corrected digital image and in the input digital image; if there are bright pixels in the input digital image, performing a stretching operation on the corrected digital image to have a same percentage of bright pixels as in the input digital image, then performing a clipping operation based upon the second percentage; and if there are no bright pixels in the input digital image, performing the stretching operation and the clipping operation to clip the second percentage of the brightest pixels.