A subject is imaged while an imaging lens is moved along the optic axis in
incremental distances, and a graph of focus evaluations representing
degree of focus of the subject image is obtained. Processing for
detecting a face is executed at positions of the imaging lens where the
focus evaluation value is equal to or greater than a threshold value. If
a face is detected from the image of the subject obtained at positions of
the imaging lens, then this range of positions is set as a focusing range
and the subject is imaged while the imaging lens is moved within this
focusing range. A graph of face-area focus evaluations representing
degree of focus of the face detected from among the obtained images of
the subject is obtained and the position at which this graph is maximum
is decided upon as the in-focus position of the imaging lens.