Patent ID: 7916192

Claim:
A method for compensating pixel values of defective pixels, suitable for compensating the pixel values of a plurality of defective pixels in an image processing system, comprising: (a) capturing a first image to obtain pixel values of a plurality of pixels, marking the pixel values of the defective pixels as a specific pixel value, wherein if the pixel value of a particular pixel is equal to the specific pixel value, the pixel value of the particular pixel is changed to another close value, wherein the specific pixel value is a maximum value or a minimum value of all of the pixel values; (b) re-calculating the pixel values of all of the pixels to allow the pixel values of the pixels to be smaller than the specific pixel value but not smaller than the minimum value when the specific pixel value is the maximum value, or re-calculating the pixel values of all of the pixels to allow the pixel values of the pixels not to be smaller than the specific pixel value but smaller than the maximum value when the specific pixel value is the minimum value; and (c) locating a plurality of neighboring pixels around locations of the specific pixel value, calculating average pixel values of the neighboring pixels and using the average pixel values as the pixel values of the defective pixels.