Patent ID: 7162073

Claim:
A method for detecting spot defects in an image of an object, the method comprising: acquiring an image of the object at only a single plane of focus; aligning an alignment model with at least one object region within the image so as to provide at least one aligned object region; estimating, using the image, a background image representing allowable and expected appearance within the at least one aligned object region, by using a median filter of a larger spatial scale to provide a mask for use with a median filter of a smaller spatial scale; removing the background image from the image within the at least one aligned object region so as to provide a foreground image having at least one foreground region; computing a threshold image for at least one of the foreground regions in the foreground image; applying the threshold image to the foreground image within at least one of the foreground regions so as to provide a defect image; and using connected component analysis to form candidate defects in the defect image.