BACKGROUND OF THE INVENTION

Field of the Invention

The present invention relates to a technique for correcting image blur in an image capturing apparatus.

DESCRIPTION OF THE RELATED ART

For image blur occurring on a subject of the captured image, there is blur caused by movement of an image capturing apparatus such as camera shake and blur caused by movement of the subject. In order to provide a stable composition by correcting image blur and tracking the intended subject (main subject) of the photographer, it is necessary to identify the main subject and detect the movement of the main subject separated from the movement of other subjects such as the background. Also, it is necessary to correct so that the main subject can be continuously captured at substantially the same position of the screen.

Various proposals have been made in order to achieve this purpose; Japanese Patent Laid-Open No. 8-9227 discloses that “a means for changing the angle of view is controlled based on position information of an extracted object so that and identified object to be tracked is positioned in the center of an image capture screen in order to provide highly stable control when a subject that being tracked is lost, or a plurality of subjects approach or cross each other, etc., and when an object is lost from the screen, the appearance of the object is awaited at its position before it was lost.”

In Japanese Patent Laid-Open No, 2007-201534, “If face detection is performed but no face is detected, when the shutter button is fully pressed, the correction lens is moved in a direction and speed that cancel the detected camera shake at the same time that an actual image capture is performed. In a case where a face is detected, a shutter button is half-pressed and a motion vector detection circuit44detects a subject shake. When the shutter button is fully pressed, the correction lens is moved in a direction and speed that cancel the subject shake, and at the same time, an actual image capture is performed” is recited.

However, in control of waiting for an object to appear at the position where it was lost as in Japanese Patent Laid-Open No. 8-9227, in a case where the object is lost, it is impossible to correct image blur before the subject appears.

In addition, in a case where the control for switching camera shake correction and subject shake correction according to capturing conditions such as the presence or absence of face detection is adopted during moving image recording, it is expected that a video that gives the viewer a sense of unnaturalness, such as when a sudden increase in image blur in the portion where shake correction has been performed so far at the time of switching, will be captured.

SUMMARY OF THE INVENTION

The present invention has been made in view of the aforementioned problems, and provides a video in which a sudden change in image stabilization is suppressed and a viewer can view the video without feeling a sense of unnaturalness.

According to a first aspect of the present invention, there is provided an image stabilization apparatus, comprising: at least one processor or circuit configured to function as: a subject detection unit configured to detect a main subject; a motion vector detection unit configured to detect a motion vector within a screen; a separation unit configured to separate a motion vector of a main subject and a motion vector of a background; a calculation unit configured to calculate a correction amount for correcting image blur of a subject within a screen; and a control unit configured to, in a case where a second main subject, which is a new moving body, is detected by the subject detection unit in a state in which a target of image stabilization is set as a first main subject detected by the subject detection unit, perform control so as to transition from a state in which the calculation unit calculates the correction amount based on a first motion vector of the first main subject, via a state in which the correction amount is calculated based on a third motion vector, which is a motion vector of the background, to a state in which the correction amount is calculated based on a second motion vector of the second main subject.

According to a second aspect of the present invention, there is provided a method of controlling an image stabilization apparatus, the method comprising: detecting a main subject; detecting a motion vector within a screen; separating a motion vector of a main subject and a motion vector of a background; calculating a correction amount for correcting image blur of a subject within a screen; and controlling, in a case where a second main subject, which is a new moving body, is detected by the subject detection in a state in which a target of image stabilization is set as a first main subject detected by the subject detection, so as to transition from a state in which the calculation calculates the correction amount based on a first motion vector of the first main subject, via a state in which the correction amount is calculated based on the third motion vector, which is a motion vector of the background, to a state in which the correction amount is calculated based on a second motion vector of the second main subject.

Further features of the present invention will become apparent from the following description of exemplary embodiments with reference to the attached drawings.

