Patent ID: 7254263

Claim:
A defect detection apparatus comprising: (a) an image capturing part for capturing an image of a substrate; (b) a reference mask generating element for generating a reference mask image from an image of a non-defective substrate captured by said image capturing part; (c) an inspecting mask generating element for generating an inspecting mask image based on an image of an inspection object substrate captured by said image capturing part and said reference mask image, said inspecting mask generating element comprising: (c-1) a smoothing element that traces the contour of a pattern formed on said inspection object substrate (“an inspecting pattern”) by using a first contour sampler made of not less than three pixels, and smoothes the contour of said inspecting pattern based on a tracing trajectory in the contour of said inspecting pattern obtained by said first contour sampler; (d) a candidate region sampling element for sampling a defect candidate region from said image of said inspection object substrate based on said inspecting mask image; and (e) a detecting element for detecting said defect candidate region as a defect of said inspecting pattern based on characteristic features of said defect candidate region, whereby detecting a defect of said inspecting pattern formed on said inspection object substrate.