To optimally perform pixel interpolation for focus detection even if lens information cannot be obtained.
An imaging element 14 has a phase difference AF pixel and obtains a Bayer array image by imaging a subject image formed by a photographic lens 24. A non-volatile memory 12 stores the position of a pixel for focus detection and also stores a parameter group determined per lens condition. A lens communication detection unit 17 detects whether data communication with an interchangeable lens 15 is possible or not. An AF pixel interpolation unit 50 interpolates, if communication is not possible, a pixel value for focus detection with a pixel value for interpolation imaging corresponding to a pixel value for imaging for each of a plurality of parameters selected from the parameter group relative to reference image data imaging a surface light source with uniform luminance. A parameter estimation unit 19 estimates as an optimum a parameter corresponding to a pixel value for interpolation imaging with the minimum error between them by comparing a pixel value for interpolation imaging and a pixel value for peripheral imaging per parameter. The AF pixel interpolation unit 50 interpolates the pixel value for focus detection with the pixel value for interpolation imaging by use of the estimated parameter at the time of real photographing.
Toshihide Mori