Patent ID: 7248732

Claim:
A pattern inspection method for judging non-matching parts to be defects by making a comparison between the same patterns having a line part in which a line extending in the longitudinal or transverse direction appears repetitively at a fixed pitch, wherein gray level data is generated by capturing the image of the pattern, wherein difference data is generated by calculating the difference in the gray level data between corresponding pixels of patterns to be compared, wherein average gray level data is generated by calculating the average level of the gray level data for each pixel column in the direction in which the line extends in a fixed range in the line part, wherein a type of the area to which each pixel column belongs is determined by statistically processing the average gray level data, wherein a threshold value is determined for each area according to the statistical processing result of the type of the area and the difference data of each pixel column, and wherein the difference data of each area is compared with the threshold value and the part where the difference data is larger than the threshold value is judged to be a defect.