An image-capturing unit generates an image signal corresponding to an
image of a subject formed by a photographing optical system. A point
spread function generating unit generates varying point spread functions
corresponding to various distances based upon two-dimensional distance
distribution information indicating the two-dimensional distance
distribution of the subject detected by a distance detection unit and an
image blur signal indicating an image blur occurring during the exposure
period which is detected by a blur detection unit. An image repair unit
divides the image signal into partial images based upon the distance
distribution information, executes image processing to repair the blur in
the individual partial images by using the point spread functions
corresponding to the various distances and creates a whole image by
synthesizing the partial images in which the blur has been repaired.