First, in step S800, the focus detecting calculation area selecting unit 109 determines whether or not the object image stabilizing area (image stabilizing area) covers the entire angle of view (the entire captured image). If the image stabilizing area covers the entire angle of view, the flow proceeds to step S802. On the other hand, if the image stabilizing area does not cover the entire angle of view, that is, if a specific object is to be corrected, the flow proceeds to step S801.
In step S801, the focus detecting calculation area selecting unit 109 determines whether the image stabilizing area and the focus detecting calculation area indicate the same area. If the image stabilizing area and the focus detecting calculation area indicate the same area, the flow proceeds to step S803. On the other hand, if the image stabilizing area and the focus detecting calculation area do not indicate the same area, the flow proceeds to step S802. Here, the same area includes not only a completely identical area but also a substantially identical area (approximately identical area). In a case where the entire angle of view is not set to the image stabilizing area, the focus detecting calculation area may indicate part of the image stabilizing area.
In step S802, the focus detecting calculation area selecting unit 109 makes the range of the focus detecting calculation area narrower than the object detecting position (object area) acquired by the object detecting unit 108, and this flow ends. Setting the focus detecting calculation area narrower than the object area can restrain objects at a plurality of distances from being mixed in the focus detecting calculation area.