1. An image processing apparatus comprising: an image obtaining unit configured to obtain a plurality of images of an in-focus first object via an optical system, each of the plurality of images having in-focus a different one of a plurality of light wavelength regions; an image pickup information obtaining unit configured to obtain an image pickup state associated with the obtaining of each of the plurality of images by the image obtaining unit; an optical transfer function obtaining unit configured to obtain an amount corresponding to an optical transfer function of the optical system at each image pickup state; an image restoration unit configured to restore each respective image of the plurality of images based at least upon the amount corresponding to the optical transfer function of the optical system at the image pickup state associated with the obtaining of the respective image of the plurality of images by the image obtaining unit; and an image synthesizer configured to synthesize a plurality of images that have been restored by the image restoration unit, wherein, when the plurality of images includes a second object in addition to the in-focus first object, the image restoration unit is configured to perform the restoring at least by using the amount corresponding to the optical transfer function for each light wavelength region used to obtain the plurality of images of the in-focus first object to restore images of both the first object and the second object.