Provide a pattern inspection method that can detect defects properly and accurately and an exclusive logical sum as a pixel value is obtained for each pixel.
Provide a pattern inspection method that can detect defects properly and accurately. The inspected image I1 having the inspected pattern and the normalized image I1 are overlapped, an exclusive logical sum is obtained for each pixel, and an upper image Ie1 having this exclusive logical sum as a pixel value is obtained. The window W1 is set on the upper image Ie1, and the upper image Ie1 is scanned on the window W1 in units of pixels. The sum (window feature amount) of the pixel values of the pixels in the window W1 at each position of the window W1 is obtained, and this value is compared with a predetermined determination reference value. When the window feature amount at any one position of the window W1 exceeds the determination reference value, it is determined that a defect exists in the inspected image 1.