Patent ID: 7671332

Claim:
An autofocus method adapted to be implemented in a scanning charged-particle beam instrument for obtaining an image of a specimen based on data obtained by scanning a charged-particle beam over the specimen, said autofocus method comprising the steps of: causing focal condition of the charged-particle beam to be varied in steps over the specimen; scanning a given region over the specimen with the charged-particle beam whenever the focal condition is varied; storing data obtained concomitantly with the scanning and a focus value corresponding to this focal condition into a memory as image data; reading the image data from the memory and dividing the data into plural sets of data on a data domain such that the sets of data correspond to plural subregions; finding characteristics of brightness at plural kinds of focus values for each of the plural sets of data; accumulating characteristics of a certain kind among the plural kinds of characteristics for each focus value; averaging the accumulated characteristics and taking the averaged characteristics as a focus function; approximating the focus function by an arbitrary function; finding a focus value at a peak point from the arbitrary function; and setting the focal condition of the charged-particle beam based on the found focus value.