Field of the Invention
The present invention relates to a technology for detecting a subject image from an image and controlling zoom magnification.
Description of the Related Art
In the related art, there are imaging apparatuses that have a function of driving a zoom lens and performing optical magnification (hereinafter referred to as optical zoom) and a function of expanding a part of a photographed image and performing electronic magnification (hereinafter referred to as electronic zoom). The imaging apparatuses also have an automatic zoom function (automatic magnification) of automatically changing a zoom magnification according to detection information of subjects. Hereinafter, an optical zoom operation and an electronic zoom operation are collectively referred to as a zoom operation.
Japanese Patent Laid-Open No. 2012-95019 discloses the configuration of a camera equipped with an automatic zoom function of constantly maintaining the size of a subject. Japanese Patent Laid-Open No. 2012-95019 discloses a method in which a photographer selects a composition among a plurality of options, “face-up,” “bust-up,” and “whole body,” in an automatic zoom function. In automatic zoom control of maintaining the size of a subject image, the size of the subject image serving as a basis of zoom control is decided based on a selected composition. For example, when a photographer selects the composition “whole body,” a zoom operation is performed so that an image of the whole body of a person that is a subject fits in a photographing screen.
However, in Japanese Patent Laid-Open No. 2012-95019, it is necessary for the photographer to select a composition desired to be photographed in advance in an automatic zoom function. Therefore, whenever a photographing scene or a subject state (a motion or a number) changes, it is necessary for the photographer to perform a setting change manipulation. When the setting of the composition is not suitable for the photographing scene, there is a possibility of a subject not being photographed at an appropriate size. For example, when a composition of “face” is set in a scene in which a moving subject or a distant subject is photographed, there is a possibility of the subject falling outside of the frame. When a composition of “whole body” is set in a scene in which a stopped subject is photographed, there is a possibility of the subject being too small in the composition.
Further, in composition matching, an appropriate composition or a composition matching timing differs between a still image and a moving image. When a still image is photographed, it is necessary to set a subject image such that the subject image has an appropriate size instantly before photographing. On the other hand, when a moving image is photographed, it is necessary to set a subject image such that the subject image normally has an appropriate size during the photographing such as continuous tracking of a moving object (subject) or approaching a stopped subject.