Patent ID: 7864221

Claim:
A method for adjusting an image by classifying pixels in the image into different ranges, comprising: storing a plurality of pixel values in a memory; comparing a first pixel value of the plurality of pixel values to at least one luminance range, wherein said comparing determines if the first pixel value is within the at least one luminance range; comparing the first pixel value to at least one chrominance range in response to determining that the first pixel value is within the at least one luminance range, wherein the at least one chrominance range is determined based on the at least one luminance range, and wherein said comparing determines if the first pixel value is within the at least one chrominance range; storing information indicating that the first pixel is within the at least one luminance range and the at least one chrominance range; wherein said steps of comparing and said storing information are performed a plurality of times for a plurality of pixel values; wherein the information indicates how many pixel values of the plurality of pixel values are within the at least one luminance range and the at least one chrominance range; determining whether the information indicates that greater than a predetermined percentage of the plurality of pixel values are in the at least one luminance range and the at least one chrominance range; adjusting, in response to determining that greater than the predetermined percentage of the plurality of pixel values are in the at least one luminance range and the at least one chrominance range, at least one pixel value in the memory by a ratio which results in at least one chrominance value of the adjusted pixel value being closer to a predetermined chrominance value.