Preparation steps are taken before a substrate with components is
inspected and a whole image of a standard substrate is prepared
preliminarily and inspection areas are determined for target portions to
be inspected on this whole image. At the time of the inspection, a camera
is positioned corresponding to a target portion to obtain a target image
and an area corresponding to the target image is extracted from the whole
image and displacement values of this area are calculated relative to the
target image. The setting position of the inspection area is corrected by
the calculated displacement values and an inspection area is set on the
target image based on the corrected coordinates.