Patent ID: 7655904

Claim:
A target workpiece inspection apparatus comprising: an optical image acquiring unit configured to acquire an optical image of a target workpiece to be inspected on which a pattern is formed; a reference image generating unit configured to generate a reference image to be compared with the optical image; a difference judging unit configured to judge whether an absolute value of difference between a pixel value of the optical image and a pixel value of the reference image in each pixel at a preliminary alignment position between the optical image and the reference image is smaller than a predetermined threshold value; a least-squares method displacement calculating unit configured to calculate a displacement amount displaced from the preliminary alignment position, by using a regular matrix for a least-squares method obtained from a result judged by the difference judging unit; a position correcting unit configured to correct an alignment position between the optical image and the reference image to a position displaced from the preliminary alignment position by the displacement amount; and a comparing unit configured to compare the optical image and the reference image whose alignment position has been corrected.