Abstract: An image processing unit of an image pickup apparatus acquires a plurality of sets of image data that have different shooting times. A defocus map generating unit generates each of a plurality of defocus maps that represent a spatial distribution of a defocus amount by using two or more sets of image data. A positional deviation correction unit performs alignment of a plurality of defocus maps through the geometrical deformation processing by using a control parameter that has been acquired from a positional deviation correction control parameter calculation unit. A composing unit composes the plurality of defocus maps that have undergone alignment. A defocus map shaping unit performs the shaping processing on the defocus map after the composing processing, and outputs defocus map data that smoothly changes along the outline of an object.