摘要 |
The present invention provides a defect detection apparatus for detecting a defect even on a uniformly continuous background pattern, a method used in the apparatus, and a computer program for making a computer execute processing in the method. A defect size is set and stored, and an instruction to a first direction in which a background pattern is uniformly continuous is accepted. A reduced image reduced in the first direction using an image reduction ratio according to the defect size is generated. A filter processing is executed in the first direction for removing a defect, and the reduced image that is subjected to the filter processing is enlarged in the first direction with an image enlargement ratio corresponding to the reciprocal of the reduction ratio to generate a first enlarged image. A difference image is generated by calculating a difference between the multi-valued image and the first enlarged image. |