Patent ID: 7602961

Claim:
A method of generating reference data for use in a comparison with sensed data obtained by picking up an image of a pattern formed on an object, the method comprising: generating, in a pattern expanding circuit, a two-value or multi-value gradated data of pixels in units of pixels from a design data, and generating first processed data by multiplying a gradated value of a pixel targeted in the gradated data by a first coefficient determined in accordance with gradated values of pixels located at a periphery of the targeted pixel; and generating, in a reference data generation circuit; second processed data by rounding up a gradated value of the pixel in the first processed data by a first threshold value; third processed data by rounding down a gradated value of the pixel in the second processed data by a second threshold value; fourth processed data by raising a gradated value of the pixel in the third processed data to a power of a second coefficient; and reference data based on the fourth processed data.