A pair of edges that are located at ends as viewed in the widthwise
direction of a design pattern are recognized. On the basis of the edge
direction in which the paired edges are recognized, edge points on the
design pattern are detected as sub-pixels. The widthwise dimension of the
design pattern is calculated on the basis of the edge points. In
addition, the widthwise dimension of a circuit pattern is calculated at
the same position as the widthwise dimension of the design pattern. On
the basis of the calculated widthwise dimensions, the semiconductor wafer
circuit pattern is checked.