Patent ID: 8648940

Claim:
An image processing apparatus that performs a pupil division of a light beam from an image pickup optical system to obtain a first light beam and a second light beam, and processes an image that is obtained by using an image pickup element that includes a plurality of first pixels that perform a photoelectric conversion of the first light beam and a plurality of second pixels that perform a photoelectric conversion of the second light beam, the image processing apparatus comprising: a first defect interpolation unit configured to interpolate a defective pixel using a pixel value of a first pixel near a specific first pixel when the specific first pixel is the defective pixel or using a pixel value of a second pixel near a specific second pixel when the specific second pixel is the defective pixel; a second defect interpolation unit configured to interpolate the defective pixel using a rate of pixel values of a first pixel and a second pixel in a same micro lens near the specific first pixel and the specific second pixel; an in-focus level evaluation unit configured to evaluate an in-focus level using outputs of the plurality of first pixels and the plurality of second pixels; a synthesis rate switching unit configured to switch a synthesis rate of an output of the first defect interpolation unit and an output of the second defect interpolation unit so that the rate of the output of the second defect interpolation unit increases as the in-focus level that is evaluated by the in-focus level evaluation unit is heightened and the rate of the output of the first defect interpolation unit increases as the in-focus level is lowered; and a signal processing unit configured to generate a shot image using an output of the synthesis rate switching unit.