A digital camera 100 includes a photographic optical system (21) for
projecting an image of a subject; a CCD (24) for converting the projected
image into an image signal and outputting it; a focus driving system (25)
which changes a focusing condition of the image projected to the CCD (24)
by relatively moving at least one of the photographic optical system (21)
and the CCD (24) to the other; a CCDAF portion (82) which sequentially
evaluates the image signal obtained in each focusing condition while
subsequently changes the focusing condition by controlling the focus
driving system (25), and which obtains a predetermined focusing condition
based on the evaluation; an AF controlling portion (83) for controlling
an operation of the CCDAF portion (82); and a ranging sensor (31) for
measuring a subject distance. In addition, the AF controlling portion
(83) controls the operation of the CCDAF portion (82) according to the
subject distance to prioritize either a focusing accuracy or a focusing
speed.