Patent ID: 6900836

Claim:
A method for correcting for defects in a digital image taken by an image sensor when there is a pre-existing line of defective pixels in the digital image which have corrupted data, comprising the steps of: (a) providing a defect map which identifies the position of the defective pixels in the line and specifies the line of pixels which during readout will be caused to have corrupted data; (b) capturing the digital image in the image sensor and reading out such digital image to provide the digital image with the line of pixels in the digital image having corrupted data; (c) computing classifiers based on adjacent non-corrupted pixel data not in the defective line of pixels which indicate that there is a horizontal or vertical edge or a diagonal edge feature which passes through the defective line of pixels, wherein none of the pixels in the defective line of pixels are used to compute the classifiers; and (d) adaptively replacing the data in the corrupted image pixels by selecting an algorithm which corresponds to the edge feature identified by the classifier and using the valid data in the neighboring non-corrupted pixels of the selected edge feature.