Focus detecting methods and focus detecting mechanisms of an image
measuring device able to execute focus detection at high speed with high
accuracy, and image measuring device having the focus detecting
mechanisms are provided. A rotation driving device rotates and operates a
grating filter for projecting a grating pattern to a measured object. A
distance driving device adjusts the interval distance between an image
pickup device and the measured object. The image of the measured object
projecting the grating pattern thereto every predetermined rotating angle
is picked up by the image pickup device via multiple exposure by
operating the rotation driving device and the distance driving device in
association with each other. A focus position is determined from a
contrast value of the grating pattern within the picked-up image
information. Accordingly, it is not necessary to pick-up plural images in
plural distance positions and process the plural images. Therefore, times
taken in the image picking-up and the image processing can be shortened
and a focus detecting speed can be increased. Further, the focus
detection can be performed with high accuracy since the contrast value is
determined on the basis of frequency area information.