Patent ID: 8675948

Claim:
A mask inspection apparatus comprising: irradiation means for irradiating a sample with an electron beam; electron detection means for detecting a quantity of electrons generated from the sample having a pattern formed thereon by the irradiation with the electron beam; image processing means for generating image data of the pattern on the basis of the quantity of the electrons; and control means for creating a line profile, a first differential profile and a second differential profile of the pattern formed on the sample on the basis of the quantity of the electrons detected by the electron detection means, where the line profile is created based on the image data of the pattern, the first differential profile is created via a first differentiation processing on the line profile, and the second differential is created via second differentiation processing on the line profile; wherein the control means detects an edge position on the basis of the first differential profile, determines rising and falling of the edge on the basis of two peaks appearing near the edge position of the second differential profile, and then generates mask data of a multi-level structure on the basis of data of the edges and the image data created by the image processing means, and wherein the controller determines the edge of the pattern to be rising if P 1 >P 2 , or to be falling if P 1 <P 2 , where P 1 is a peak value at a peak position X 1 and P 2 is a peak value at a peak position X 2 (>X 1 ) at the two peak position of the second differential profile appearing near the edge position.