Automatic pattern matching and shape measurement are enabled by adjusting
a brightness level of a microscope image based on information of a local region
of the image so that a magnified image of the local region takes on an appropriate
brightness and is not affected by brighter peripheral portions of the image, thereby
enabling feature extraction of a desired pattern. By using the inventive method
in an energized beam apparatus having a sample stage capable of linear and tilting
movement, a series of operations including cross section forming, sample tilting,
cross section observation, and pattern recognition, may be performed on an automated basis.