1. A pattern inspection method which scans the inspected pattern formed on a substrate according to the design data with the laser beam and receives the light passing through said substrate with the light receiving device and, from the pattern information obtained by said light receiving device, generates the image of the inspected pattern and, for coincidence between this image and the reference data obtained by imaging of said design data, corrects said reference data to generate the reference image and compares the image of said inspected pattern and the reference image to detect any defects of the inspected pattern wherein said reference image generation being executed by determination of the edge boundary condition showing the gray level corresponding to the pattern edge position through convolution operation of the optical point spread function corresponding to the laser beam strength and said inspected pattern image as well as detection according to said edge boundary condition of the edge position in said inspected pattern by the unit of sub-pixels.