An image processing device for producing a restored image from an input degraded image, the input degraded image comprising motion blur resulting from camera motion during exposure, the restored image having smaller blur than the degraded image, the device comprising: an initial image setting section that sets a provisional restored image which has been produced from the degraded image using a provisional point spread function, PSF, wherein the provisional PSF is set based on data that represents the camera trajectory during exposure; characterized by an image block selection section that selects a plurality of image block pairs from the degraded image and the provisional restored image, each of the image block pairs being formed by two image blocks at identical coordinates in the degraded image and the provisional restored image; a PSF estimation section that estimates a plurality of point spread functions respectively based on the plurality of image block pairs; a PSF selection section that selects a candidate point spread function which defines blur of the degraded image from among the plurality of point spread functions estimated by the PSF estimation section by selecting a PSF which has a small error, the error being based on the closeness of an image obtained by a convolution of the PSF and a provisional restored image to the degraded image; and an image restoration section that produces a restored image from the degraded image using the candidate point spread function, wherein the provisional restored image is an n th provisional restored image, and the restored image is an n th restored image, where n=1, 2,..., N (N is an integer not less than 2), after production of the n th restored image, the initial image setting section updates the n th provisional restored image with the n th restored image, the updated restored image being used as a (n+1) th provisional restored image, and the image block selection section selects, from the degraded image and the (n+1) th provisional restored image, another plurality of image block pairs at least some of which are different from said plurality of image block pairs, whereby updating of the candidate point spread function and the restored image is repeated. an initial image setting section that sets a provisional restored image which has been produced from the degraded image using a provisional point spread function, PSF, wherein the provisional PSF is set based on data that represents the camera trajectory during exposure; characterized by an image block selection section that selects a plurality of image block pairs from the degraded image and the provisional restored image, each of the image block pairs being formed by two image blocks at identical coordinates in the degraded image and the provisional restored image; a PSF estimation section that estimates a plurality of point spread functions respectively based on the plurality of image block pairs; a PSF selection section that selects a candidate point spread function which defines blur of the degraded image from among the plurality of point spread functions estimated by the PSF estimation section by selecting a PSF which has a small error, the error being based on the closeness of an image obtained by a convolution of the PSF and a provisional restored image to the degraded image; and an image restoration section that produces a restored image from the degraded image using the candidate point spread function, wherein the provisional restored image is an n th provisional restored image, and the restored image is an n th restored image, where n=1, 2,..., N (N is an integer not less than 2), after production of the n th restored image, the initial image setting section updates the n th provisional restored image with the n th restored image, the updated restored image being used as a (n+1) th provisional restored image, and the image block selection section selects, from the degraded image and the (n+1) th provisional restored image, another plurality of image block pairs at least some of which are different from said plurality of image block pairs, whereby updating of the candidate point spread function and the restored image is repeated.