Patent ID: 8531560

Claim:
A focus detection apparatus that detects a focusing status on an image plane obtained using an imaging optical system, comprising: a focus detection sensor that includes a plurality of first focus detection pixels and a plurality of second focus detection pixels, and that has a plurality of focus detection pixel pairs each including a first focus detection pixel and a second focus detection pixel; a storage unit that stores defect information indicating a defective pixel of the focus detection sensor; a correction unit that corrects a value of the defective pixel indicated by the detect information and a value of one of the first focus detection pixel and the second focus detection pixel that forms the focus detection pixel pair with the defective pixel based on a value of a focus detection pixel of a same type that is not the defective pixel; a calculation unit that obtains an amount of image shift when a correlation amount becomes a maximum by repeatedly performing the image shift between a first focus detection image obtained from the first focus detection pixels and a second focus detection image obtained from the second focus detection pixels and calculation of the correlation amount between the first focus detection image obtained from the first focus detection pixels and the second focus detection image obtained from the second focus detection pixels; a determination unit that determines the first focus detection pixel or the second focus detection pixel that forms the focus detection pixel pair with the defective pixel as a focus detection pixel to be corrected when the image shift is performed with the amount of image shift obtained by said calculation unit; and a detecting unit that detects the focusing status based on a phase difference between a first focus detection image obtained from the first focus detection pixels and a second focus detection image obtained from the second focus detection pixels of the plurality of focus detection pixel pairs after the correction performed by the correction unit.