Abstract
A method for defect compensation in a color image sensor having pixels. The method comprises the steps of predetermining a first and second threshold, and defining a window, identifying peak and normal pixels, wherein the peak is one of the pixels that has a color difference larger than the first threshold from two adjacent pixels of the same color, and the normal pixels are those other than the peak, identifying the peak as a defect if each of the two pixels immediately adjacent to the peak has a color difference smaller than the second threshold from two adjacent pixels of the same color, and all the pixels in the window positioned according to the location of the peak are normal pixels, and correcting a color value of the defect.