Patent ID: 7382928

Claim:
A method of processing a digital image comprising: detecting pixel color values of pixels in said digital image; determining whether or not a defect exists in said digital image by comparing detected pixel color values with a predetermined value; and correcting said defect by adjusting said detected pixel color values if said defect exists, so as to output said digital image via a digital image processing device after said defect has been corrected; wherein said correcting comprises: determining a first color casting factor of pixels in a highlight region based on a predetermined largest color value and a predetermined smallest pixel color value among maximum values of red, green and blue histograms of the pixels of said digital image; and transforming pixel color values of pixels in a highlight region to a larger pixel color value in accordance with said first color casting factor based on the following quotations, respectively: R′=R max+(BrightMax− R max)× CC Bright G′=G max+(BrightMax− G max)× CC Bright B′=B max+(BrightMax− B max)× CC Bright wherein: Rmax, Gmax and Bmax are largest color values in red, green and blue color channels of histograms of said digital image, respectively; BrightMax is the maximum among Rmax, Gmax and Bmax; CCBright is said first color casting factor in said highlight region of said digital image; and R′, G′, and B′ are respectively a color values of Rmax, Gmax and Bmax colors after processed.