1. An image processing apparatus comprising: an input section, configured to input a plurality of images captured by an image capturing unit; a restoration unit, configured to correct image blur of each of the plurality of images by coded exposure processing; a calculator, configured to calculate relative moving amounts between the plurality of deblurred images obtained by said restoration unit; and a synthesizing unit, configured to correct positions of the plurality of deblurred images based on the calculated relative moving amounts, and to synthesize the plurality of images on which the position correction is performed.