JP2016122030A - Zoom control device, imaging device, zoom control device control method, zoom control device control program, and storage medium - Google Patents

Zoom control device, imaging device, zoom control device control method, zoom control device control program, and storage medium Download PDF

Info

Publication number
JP2016122030A
JP2016122030A JP2014260112A JP2014260112A JP2016122030A JP 2016122030 A JP2016122030 A JP 2016122030A JP 2014260112 A JP2014260112 A JP 2014260112A JP 2014260112 A JP2014260112 A JP 2014260112A JP 2016122030 A JP2016122030 A JP 2016122030A
Authority
JP
Japan
Prior art keywords
subject
zoom
image
size
composition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2014260112A
Other languages
Japanese (ja)
Other versions
JP2016122030A5 (en
JP6463123B2 (en
Inventor
昭洋 粒崎
Akihiro Ryuzaki
昭洋 粒崎
孝 綾部
Takashi Ayabe
孝 綾部
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2014260112A priority Critical patent/JP6463123B2/en
Publication of JP2016122030A publication Critical patent/JP2016122030A/en
Publication of JP2016122030A5 publication Critical patent/JP2016122030A5/en
Application granted granted Critical
Publication of JP6463123B2 publication Critical patent/JP6463123B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To exert an auto-zoom control such that a detected subject image has a reference size set relatively to the number of subjects and a position of the subject in an image plane on the basis of the reference size and a selected composition.SOLUTION: A subject detection unit of an imaging device detects a subject image from an image, and an auto-zoom control unit automatically selects a specific composition from among a plurality of compositions, calculates a position of the subject image relative to a center of the image, and calculates a ratio occupied by the position of the subject image to a predetermined field angle in a horizontal direction or a perpendicular direction. The auto-zoom control unit determines a ratio occupied by the position of the subject located most closely around the field angle in the horizontal direction or the perpendicular direction to a plurality of subject images. A reference size of the subject image for use to control a zoom magnification is set from the determined ratio, the selected composition, and a size of a main subject image selected from among the plurality of subject images, and an auto-zoom control is exerted.SELECTED DRAWING: Figure 16

Description

本発明は、画像から被写体像を検出してズーム倍率を制御する技術に関するものである。   The present invention relates to a technique for detecting a subject image from an image and controlling a zoom magnification.

従来から、ズームレンズを駆動して光学的な変倍(以下、光学ズームという)を行う機能、及び、撮影画像の一部を拡大して電子的な変倍(以下、電子ズームという)を行う機能を有する撮像装置がある。さらに、被写体の検出情報に応じて自動でズーム倍率を変更するオートズーム(自動変倍)機能がある。以下、光学ズーム動作と電子ズーム動作を総称してズーム動作という。   Conventionally, a zoom lens is driven to perform optical zooming (hereinafter referred to as optical zoom), and a part of a captured image is enlarged to perform electronic zooming (hereinafter referred to as electronic zoom). There is an imaging device having a function. In addition, there is an auto-zoom (automatic scaling) function that automatically changes the zoom magnification in accordance with subject detection information. Hereinafter, the optical zoom operation and the electronic zoom operation are collectively referred to as a zoom operation.

特許文献1では、被写体の大きさを一定に維持するオートズーム機能を搭載するカメラの構成が開示されている。特許文献1では、オートズーム機能において「顔アップ」、「バストアップ」、「全身」といった複数の選択肢の中から撮影者が構図を選択する方法が開示されている。被写体像の大きさを維持するオートズーム制御では、選択された構図に基づいて、ズーム制御の基準となる被写体像の大きさが決定される。例えば撮影者が「全身」の構図を選択した場合、被写体である人物の全身の像を撮影画面内に収めるようにズーム動作が行われる。特許文献2では、複数の被写体を撮影画面内に収めるオートズーム機能を搭載するカメラの構成が開示されている。特許文献2では、複数の被写体を囲むように自動ズーム枠を設定し、自動ズーム枠の長辺が対応する画面の大きさに占める割合を所定の割合とすることで被写体を画面内に収める方法が開示されている。   Patent Document 1 discloses a configuration of a camera equipped with an auto-zoom function that keeps the size of a subject constant. Patent Document 1 discloses a method in which a photographer selects a composition from a plurality of options such as “face up”, “bust up”, and “whole body” in an auto zoom function. In the auto zoom control that maintains the size of the subject image, the size of the subject image serving as a reference for zoom control is determined based on the selected composition. For example, when the photographer selects the “whole body” composition, the zoom operation is performed so that the whole body image of the person who is the subject falls within the shooting screen. Patent Document 2 discloses a configuration of a camera equipped with an auto zoom function for accommodating a plurality of subjects within a shooting screen. In Patent Document 2, a method for setting an automatic zoom frame so as to enclose a plurality of subjects and setting the ratio of the long side of the automatic zoom frame to the size of the corresponding screen to a predetermined ratio to fit the subject in the screen Is disclosed.

特開2012−95019号公報JP 2012-95019 A 特開2011−130382号公報JP 2011-130382 A

しかしながら、特許文献1では、オートズーム機能にて撮影者が撮影したい構図をあらかじめ選択しておく必要がある。そのため、撮影シーンや被写体の状態(動きや数等)が変わるごとに撮影者が設定変更の操作を行う必要がある。また、撮影するシーンに対して構図の設定が適切でない場合、適切な大きさで被写体を撮影できない可能性がある。例えば、動き回る被写体や遠くの被写体を撮影するシーンで「顔」の構図に設定された場合、被写体がフレームアウトしてしまう可能性がある。また、静止している被写体を撮影するシーンで「全身」の構図に設定された場合には、被写体が小さすぎる構図になってしまう可能性がある。   However, in Patent Document 1, it is necessary to select in advance the composition that the photographer wants to shoot with the auto zoom function. For this reason, it is necessary for the photographer to perform a setting change operation each time the shooting scene or the state of the subject (movement, number, etc.) changes. Further, if the composition setting is not appropriate for the scene to be shot, there is a possibility that the subject cannot be shot with an appropriate size. For example, if a “face” composition is set in a scene where a moving subject or a distant subject is photographed, the subject may be out of frame. In addition, when the composition of “whole body” is set in a scene for shooting a stationary subject, the subject may be too small.

特許文献2では、複数の被写体間の距離と画面の大きさとの割合に基づいてズーム動作が行われるため、複数の被写体が画面の中で対称的な位置にいない場合、撮影者の意図した画角とならない可能性がある。また、被写体を画面中央から外して背景の建物やオブジェなどを含めた構図を撮影者が意図する場合には、画面周辺の被写体が画面内に収まらない可能性がある。
上記課題に鑑みて、本発明は、被写体の数や画面内の被写体の位置に対して設定される基準サイズと選択された構図に基づき、検出した被写体像が基準サイズとなるようにオートズーム制御を行うことを目的とする。
In Patent Document 2, a zoom operation is performed based on the ratio between the distance between a plurality of subjects and the size of the screen. Therefore, when the plurality of subjects are not in a symmetric position on the screen, the image intended by the photographer is taken. There may be no corners. Further, when the photographer intends to compose a composition including a background building or object by removing the subject from the center of the screen, the subject around the screen may not fit within the screen.
In view of the above problems, the present invention provides an automatic zoom control based on the reference size set for the number of subjects and the position of the subject in the screen and the selected composition so that the detected subject image becomes the reference size. The purpose is to do.

本発明に係る装置は、画像から被写体像を検出する被写体検出手段と、複数の構図の中から特定の構図を自動で選択する構図選択手段と、前記画像の中心を基準として前記被写体像の位置を算出する第1の処理と、前記画像の画角に対して水平方向または垂直方向にて前記被写体像の位置が占める比率を算出する第2の処理とを行う算出手段と、前記被写体検出手段により複数の被写体像が検出された場合、前記複数の被写体像に対して、前記算出手段が前記第2の処理で算出した被写体像ごとの前記比率を判定して、前記画像の画角に対して水平方向または垂直方向にて最も周辺に位置する被写体像の位置が占める比率を決定する判定手段と、前記構図選択手段により選択された構図と、前記判定手段により決定された比率と、前記被写体検出手段により検出された前記複数の被写体像から選択される主被写体像のサイズから、ズーム倍率の制御に用いる被写体像の基準サイズを設定する設定手段と、前記設定手段により設定された基準サイズに基づいて、前記被写体検出手段により検出される被写体像のサイズの変化に応じて前記ズーム倍率の制御を行う制御手段と、を有する。   An apparatus according to the present invention includes a subject detection unit that detects a subject image from an image, a composition selection unit that automatically selects a specific composition from a plurality of compositions, and a position of the subject image based on the center of the image. Calculating means for calculating the ratio of the position of the subject image in the horizontal or vertical direction with respect to the angle of view of the image, and the subject detecting means When a plurality of subject images are detected by the above, the calculation unit determines the ratio for each subject image calculated in the second process with respect to the plurality of subject images, and the angle of view of the image is determined. Determining means for determining the ratio of the position of the subject image located closest to the periphery in the horizontal or vertical direction, the composition selected by the composition selecting means, the ratio determined by the determining means, and the subject Setting means for setting a reference size of the subject image used for controlling the zoom magnification from the size of the main subject image selected from the plurality of subject images detected by the output means; and a reference size set by the setting means. And a control means for controlling the zoom magnification in accordance with a change in the size of the subject image detected by the subject detection means.

本発明によれば、被写体の数や画面内の被写体の位置に対して設定される基準サイズと選択された構図に基づき、検出した被写体像が基準サイズとなるようにオートズーム制御を行うことができる。   According to the present invention, based on the reference size set for the number of subjects and the position of the subject in the screen and the selected composition, the auto zoom control can be performed so that the detected subject image becomes the reference size. it can.

本発明の実施形態に係るデジタルカメラの構成例を示すブロック図である。It is a block diagram which shows the structural example of the digital camera which concerns on embodiment of this invention. 焦点距離と、被写体距離ごとのフォーカスレンズ位置との関係を例示した図である。It is the figure which illustrated the relationship between a focal distance and a focus lens position for every subject distance. 被写体(物体)の画面外へのフレームアウトを防止する処理の説明図である。It is explanatory drawing of the process which prevents the frame out of the screen of a to-be-photographed object (object). 被写体(人物)の画面外へのフレームアウトを防止する処理の説明図である。It is explanatory drawing of the process which prevents the frame out of the screen of a to-be-photographed object (person). 被写体(人物)の画面内でのサイズ変化を防止する処理の説明図である。It is explanatory drawing of the process which prevents the size change in the screen of a to-be-photographed object (person). 被写体が人物の場合の構図設定を説明する図である。It is a figure explaining composition setting when a subject is a person. オートズーム機能の処理の流れを説明するフローチャートである。It is a flowchart explaining the flow of a process of an auto zoom function. 被写体探索処理を説明するフローチャートである。It is a flowchart explaining a subject search process. 被写体探索処理の探索終了領域を説明する図である。It is a figure explaining the search end field of subject search processing. 被写体指定処理を説明するフローチャートである。It is a flowchart explaining a subject designation process. 被写体指定処理の別例を説明するフローチャートである。It is a flowchart explaining another example of subject specification processing. 基準サイズの設定処理を説明するフローチャートである。It is a flowchart explaining the setting process of a reference | standard size. 画面サイズの算出処理を説明するフローチャートである。It is a flowchart explaining the calculation process of a screen size. 構図設定「オート」における自動構図判定を説明する遷移図である。FIG. 6 is a transition diagram for explaining automatic composition determination in composition setting “auto”. 最周辺の被写体位置と画面サイズとを示す図である。It is a figure which shows the outermost subject position and screen size. 構図設定「オート」における基準サイズの算出処理を説明するフローチャートである。10 is a flowchart for explaining a reference size calculation process in composition setting “auto”. 水平方向被写体位置比率の算出処理を説明するフローチャートである。It is a flowchart explaining the calculation process of a horizontal direction subject position ratio. 垂直方向被写体位置比率の算出処理を説明するフローチャートである。It is a flowchart explaining the calculation process of a vertical direction subject position ratio. 被写体位置を推定する顔個数を示す表である。It is a table | surface which shows the number of faces which estimates a to-be-photographed object position. オートズーム制御の処理を説明するフローチャートである。It is a flowchart explaining the process of auto zoom control. ズーム動作を説明するフローチャートである。It is a flowchart explaining a zoom operation.

以下に、本発明の一実施形態を添付図面に基づいて詳細に説明する。図1は、本実施形態におけるズーム制御装置を備えた撮像装置の一例として、オートズーム機能を有するデジタルカメラ100の構成例を示すブロック図である。   Hereinafter, an embodiment of the present invention will be described in detail with reference to the accompanying drawings. FIG. 1 is a block diagram illustrating a configuration example of a digital camera 100 having an auto zoom function as an example of an imaging apparatus including a zoom control device according to the present embodiment.

レンズ鏡筒101は、その内部にレンズ群を保持している。ズームレンズ102は、レンズ鏡筒101の光軸方向に移動することで焦点距離を調節し、光学的に画角を変更(ズーム位置を移動)する。フォーカスレンズ103は、レンズ鏡筒101の光軸方向に移動することで焦点調節を行う。防振レンズ(像ブレ補正用レンズ)104は、手ぶれ等に起因する像ブレを補正する。光量調節を行う絞り及びシャッタ105は、露出制御に用いられる。なお、本実施形態において、デジタルカメラ100は、レンズ鏡筒101とカメラ本体部とが一体的に構成された撮像装置であるが、これに限定されるものではない。本実施形態は、カメラ本体部と、カメラ本体部に着脱可能な交換レンズとから構成される撮像システムにも適用可能である。   The lens barrel 101 holds a lens group therein. The zoom lens 102 adjusts the focal length by moving in the optical axis direction of the lens barrel 101, and optically changes the angle of view (moves the zoom position). The focus lens 103 performs focus adjustment by moving in the optical axis direction of the lens barrel 101. The anti-vibration lens (image blur correction lens) 104 corrects image blur caused by camera shake or the like. A diaphragm and shutter 105 for adjusting the amount of light are used for exposure control. In the present embodiment, the digital camera 100 is an imaging device in which the lens barrel 101 and the camera main body are integrally configured, but is not limited thereto. The present embodiment can also be applied to an imaging system including a camera body and an interchangeable lens that can be attached to and detached from the camera body.

撮像素子106は、レンズ鏡筒101を通過した光を受光し、光電変換によって被写体像を電気信号に変換することで撮像信号を生成する。撮像素子106はCCD(電荷結合素子)型またはCMOS(相補型金属酸化膜半導体)型のイメージセンサ等である。撮像素子106による撮像信号は、画像処理回路107に入力されて、画素補間処理や色変換処理等の各種処理が行われる。各種処理後の画像データは画像メモリ108に記憶される。画像メモリ108は、DRAM(Dynamic Random Access Memory)やSRAM(Static Random Access Memory)等の記憶デバイスである。   The image sensor 106 receives light that has passed through the lens barrel 101, and generates an imaging signal by converting a subject image into an electrical signal by photoelectric conversion. The image sensor 106 is a CCD (Charge Coupled Device) type or CMOS (Complementary Metal Oxide Semiconductor) type image sensor or the like. An imaging signal from the imaging element 106 is input to the image processing circuit 107, and various processes such as a pixel interpolation process and a color conversion process are performed. The image data after various processing is stored in the image memory 108. The image memory 108 is a storage device such as a DRAM (Dynamic Random Access Memory) or an SRAM (Static Random Access Memory).

表示部109は、TFT型LCD(薄膜トランジスタ駆動型液晶表示器)等を備えて構成され、撮影画像(画像データ)や、特定の情報(例えば、撮影情報等)を表示する。撮影画像に係るライブビュー等の情報表示により、撮影者が画角合わせを行うための電子ビューファインダ(EVF)機能を提供できる。   The display unit 109 includes a TFT type LCD (Thin Film Transistor Driven Liquid Crystal Display) and the like, and displays captured images (image data) and specific information (for example, captured information). An electronic viewfinder (EVF) function for the photographer to adjust the angle of view can be provided by displaying information such as a live view related to the photographed image.

絞りシャッタ駆動部110は、画像処理回路107での画像処理によって得られた輝度情報に基づいて露出制御値(絞り値及びシャッタ速度)を演算し、演算結果に基づいて絞り及びシャッタ105を駆動する。これにより、自動露出(AE)制御が行われる。防振レンズ駆動部111は、ジャイロセンサ等の角速度センサによる振れ検出情報に基づいてデジタルカメラ100に加わる振れ量を演算する。演算結果にしたがって、デジタルカメラ100に加わる振れ量を打ち消す(低減する)ように防振レンズ104が駆動される。   The aperture shutter driver 110 calculates an exposure control value (aperture value and shutter speed) based on the luminance information obtained by the image processing in the image processing circuit 107, and drives the aperture and shutter 105 based on the calculation result. . Thereby, automatic exposure (AE) control is performed. The anti-vibration lens driving unit 111 calculates a shake amount applied to the digital camera 100 based on shake detection information obtained by an angular velocity sensor such as a gyro sensor. The anti-vibration lens 104 is driven so as to cancel (reduce) the shake amount applied to the digital camera 100 according to the calculation result.

フォーカスレンズ駆動部112は、フォーカスレンズ103を駆動する。本実施形態において、デジタルカメラ100は、コントラスト方式で自動焦点調節(AF)制御を行う。つまりフォーカスレンズ駆動部112は、画像処理回路107での画像処理により得られた撮影光学系の焦点調節情報(コントラスト評価値)に基づいて、被写体に焦点が合うようにフォーカスレンズ103を駆動する。ただし、これに限定されるものではなく、コントラスト方式以外のAF制御として、位相差AF方式でもよいし、また、コントラスト方式と他の方式との組み合わせのように、複数の方式でAF制御を行う構成でもよい。   The focus lens driving unit 112 drives the focus lens 103. In the present embodiment, the digital camera 100 performs automatic focus adjustment (AF) control by a contrast method. That is, the focus lens driving unit 112 drives the focus lens 103 so that the subject is focused based on the focus adjustment information (contrast evaluation value) of the photographing optical system obtained by the image processing in the image processing circuit 107. However, the present invention is not limited to this, and a phase difference AF method may be used as AF control other than the contrast method, and AF control is performed by a plurality of methods such as a combination of the contrast method and another method. It may be configured.

ズームレンズ駆動部113は、ズーム操作指示に従ってズームレンズ102を駆動する。操作部117は、撮影者がカメラにズーミングを指示するためのズーム操作部材としてのズームレバーまたはズームボタン等を備える。システム制御部114は、ズーム指示操作に用いるズーム操作部材の操作量及び操作方向を検知して、ズーム駆動速度やズーム駆動方向を演算し、演算結果に従ってズームレンズ102を光軸に沿って移動させる制御を行う。   The zoom lens driving unit 113 drives the zoom lens 102 in accordance with a zoom operation instruction. The operation unit 117 includes a zoom lever or a zoom button as a zoom operation member for the photographer to instruct the camera to perform zooming. The system control unit 114 detects the operation amount and operation direction of the zoom operation member used for the zoom instruction operation, calculates the zoom drive speed and the zoom drive direction, and moves the zoom lens 102 along the optical axis according to the calculation result. Take control.

撮影動作によって生成された画像データは、インターフェース(I/F)部115を介して記録部116に送られて記録される。画像データは、外部記録媒体、または不揮発性のメモリ118、あるいはそれらの両方に記録される。外部記録媒体は、デジタルカメラ100に装着して使用されるメモリカード等である。不揮発性のメモリ118は、デジタルカメラ100に内蔵されている記憶媒体である。メモリ118は、プログラムデータや画像データの他に、デジタルカメラ100の設定情報や、後述するオートズーム機能におけるズームイン位置等の情報を記憶する。
操作部117は、前記ズーム操作部材に加えて、撮影開始を指示するレリーズスイッチ、オートズーム機能の開始や終了を指示するオートズーム操作スイッチ等を含む。操作部117からの信号は、システム制御部114に送られる。
The image data generated by the shooting operation is sent to the recording unit 116 via the interface (I / F) unit 115 and recorded. The image data is recorded on an external recording medium, a nonvolatile memory 118, or both. The external recording medium is a memory card or the like used by being attached to the digital camera 100. The nonvolatile memory 118 is a storage medium built in the digital camera 100. In addition to program data and image data, the memory 118 stores setting information of the digital camera 100 and information such as a zoom-in position in an auto zoom function described later.
In addition to the zoom operation member, the operation unit 117 includes a release switch for instructing start of photographing, an auto zoom operation switch for instructing start and end of an auto zoom function, and the like. A signal from the operation unit 117 is sent to the system control unit 114.

システム制御部114は、CPU(中央演算処理装置)等の演算装置を備える。システム制御部114は、撮影者の操作に応じて各部に制御命令を送ることによりデジタルカメラ100全体を制御する。システム制御部114は、メモリ118に記憶されている各種の制御プログラム、例えば撮像素子106の制御やAE/AF制御、ズーム制御(オートズーム処理を含む)等を行うためのプログラムを実行する。   The system control unit 114 includes an arithmetic device such as a CPU (Central Processing Unit). The system control unit 114 controls the entire digital camera 100 by sending a control command to each unit in accordance with a photographer's operation. The system control unit 114 executes various control programs stored in the memory 118, for example, programs for performing control of the image sensor 106, AE / AF control, zoom control (including auto zoom processing), and the like.

光学ズームによる画角変更時に合焦状態を維持するには、レンズ鏡筒101がリアフォーカスタイプである場合、ズームレンズ102の位置に応じてフォーカスレンズ103を適正なフォーカス位置へ移動させる必要がある。このような制御をコンピュータズーム(CZ)制御といい、システム制御部114におけるCZ制御部119が行う。図2は、ズームレンズの焦点距離と、被写体距離ごとのフォーカス位置との関係を例示する図である。図2では、ズームレンズの焦点距離と、ピントが合うフォーカス位置との関係を、被写体までの距離ごとに示すデータテーブルとしてグラフ化して示す。本実施形態において、このテーブルをフォーカスカムテーブルと称する。図2において、横軸はズーム位置に対応する焦点距離を示し、縦軸はフォーカス位置を示す。各グラフ線の横には、デジタルカメラ100から被写体までの距離(被写体距離)を例示する。   In order to maintain the in-focus state when the angle of view is changed by the optical zoom, when the lens barrel 101 is a rear focus type, it is necessary to move the focus lens 103 to an appropriate focus position according to the position of the zoom lens 102. . Such control is called computer zoom (CZ) control, and is performed by the CZ control unit 119 in the system control unit 114. FIG. 2 is a diagram illustrating the relationship between the focal length of the zoom lens and the focus position for each subject distance. In FIG. 2, the relationship between the focal length of the zoom lens and the focus position in focus is shown as a graph as a data table for each distance to the subject. In the present embodiment, this table is referred to as a focus cam table. In FIG. 2, the horizontal axis indicates the focal length corresponding to the zoom position, and the vertical axis indicates the focus position. Next to each graph line, the distance from the digital camera 100 to the subject (subject distance) is illustrated.

システム制御部114は、AF制御を行う際にフォーカスレンズ駆動部112を制御して、フォーカスレンズ103を所定の範囲において移動させることによりスキャン動作を行う。スキャン動作中に得られるコントラスト評価値等を用いて既知の方法により、合焦点であるフォーカス位置が検出される。そのときのズーム位置及びフォーカス位置を用い、フォーカスカムテーブルを参照することにより、被写体距離が計測される。   The system control unit 114 controls the focus lens driving unit 112 when performing AF control, and performs a scanning operation by moving the focus lens 103 within a predetermined range. A focus position which is a focal point is detected by a known method using a contrast evaluation value or the like obtained during the scanning operation. The subject distance is measured by referring to the focus cam table using the zoom position and the focus position at that time.

次に、システム制御部114におけるオートズーム機能に関連する制御について説明する。図1に示すように、システム制御部114は、CZ制御部119、電子ズーム制御部120、オートズーム制御部(以下、AZ制御部という)122、被写体検出部123を備える。   Next, control related to the auto zoom function in the system control unit 114 will be described. As shown in FIG. 1, the system control unit 114 includes a CZ control unit 119, an electronic zoom control unit 120, an auto zoom control unit (hereinafter referred to as AZ control unit) 122, and a subject detection unit 123.

デジタルカメラ100は、光学ズーム機能及び電子ズーム機能を有しており、CZ制御部119及びズームレンズ駆動部113が光学ズームの制御を担当する。CZ制御部119は、ズーム動作時に、所定の制御周期ごとにズームレンズ102のズーム位置を検出する。そしてCZ制御部119は、検出したズーム位置に応じたAF制御にて計測された被写体距離でのフォーカスカムテーブルに追従するように、フォーカスレンズ103を駆動させる制御を行う。これにより、合焦状態を維持したまま光学ズーム動作を行うことが可能となる。   The digital camera 100 has an optical zoom function and an electronic zoom function, and the CZ control unit 119 and the zoom lens driving unit 113 are in charge of controlling the optical zoom. The CZ control unit 119 detects the zoom position of the zoom lens 102 at every predetermined control period during the zoom operation. The CZ control unit 119 performs control to drive the focus lens 103 so as to follow the focus cam table at the subject distance measured by the AF control according to the detected zoom position. This makes it possible to perform an optical zoom operation while maintaining the in-focus state.

一方、電子ズーム制御部120及び画像メモリ108は電子ズームの制御を担当する。電子ズーム制御部120は、画像メモリ108に転送された画像データから対象領域内のデータを切り出すことにより、電子ズーム機能を実現する。また、電子ズーム制御部120は、撮像素子106に取り込む画像のフレームレート周期で切り出す範囲を徐々に大きくしながら表示部109に表示させることにより、滑らかな電子ズーム表示を実現する。
被写体検出部123は、画像メモリ108に記憶された画像データから所望の被写体領域を検出する。本実施形態では、画像データに含まれる顔情報または色情報に基づいて被写体(人物等の顔、または物体)を検出する被写体検出方法(顔検出処理、色検出処理)について説明する。
On the other hand, the electronic zoom control unit 120 and the image memory 108 are in charge of controlling the electronic zoom. The electronic zoom control unit 120 implements an electronic zoom function by cutting out data in the target area from the image data transferred to the image memory 108. In addition, the electronic zoom control unit 120 realizes a smooth electronic zoom display by displaying the display unit 109 while gradually increasing the range to be extracted at the frame rate period of the image to be captured by the image sensor 106.
The subject detection unit 123 detects a desired subject region from the image data stored in the image memory 108. In the present embodiment, a subject detection method (face detection process, color detection process) for detecting a subject (a face or object such as a person) based on face information or color information included in image data will be described.

顔検出処理は、画像データ中に存在する顔領域を公知のアルゴリズムにより検出する処理である。例えば、被写体検出部123は、画像データ上での正方形状の部分領域から特徴量を抽出し、その特徴量を予め用意された顔の特徴量と比較する。そして被写体検出部123は、両者の相関値が所定の閾値を超える場合、その部分領域を顔領域であると判定する。この判定処理は、部分領域のサイズ、配置位置、配置角度の組み合わせを変更しながら繰り返されることにより、画像データ中に存在する種々の顔領域を検出できる。   The face detection process is a process for detecting a face area existing in image data by a known algorithm. For example, the subject detection unit 123 extracts a feature amount from a square partial region on the image data, and compares the feature amount with a facial feature amount prepared in advance. If the correlation value between the two exceeds a predetermined threshold, the subject detection unit 123 determines that the partial area is a face area. This determination process is repeated while changing the combination of the size of the partial area, the arrangement position, and the arrangement angle, so that various face areas existing in the image data can be detected.

色検出処理では、後述の被写体指定方法に従って指定された被写体領域の色情報を特徴色として記憶する処理が実行される。色検出処理は、検出対象の被写体が物体(人物以外の「モノ」)である場合に行われる。色情報としては、画像処理回路107からの出力信号であるRGB信号や輝度信号(Y信号)及び色差(R−Y、B−Y)信号等が用いられる。被写体検出時に被写体検出部123は、画像データを複数の部分領域に分割し、部分領域ごとの輝度及び色差の平均値を算出する。また、被写体検出部123は、予め記憶された特徴色情報と被写体検出時の各領域の色情報を比較し、輝度及び色差の差分が所定量以下の部分領域を被写体領域の候補とする。この被写体領域の候補で隣り合う部分領域の一群を同一色領域として、同一色領域が所定のサイズ範囲となる領域を最終的な被写体領域とする処理が行われる。   In the color detection process, a process of storing color information of a subject area designated according to a subject designation method described later as a characteristic color is executed. The color detection process is performed when the subject to be detected is an object (a “thing” other than a person). As the color information, an RGB signal, a luminance signal (Y signal), a color difference (R−Y, B−Y) signal, and the like, which are output signals from the image processing circuit 107 are used. At the time of subject detection, the subject detection unit 123 divides the image data into a plurality of partial areas, and calculates an average value of luminance and color difference for each partial area. In addition, the subject detection unit 123 compares the characteristic color information stored in advance with the color information of each region at the time of subject detection, and sets a partial region in which the difference in luminance and color difference is equal to or less than a predetermined amount as a subject region candidate. A process is performed in which a group of adjacent partial areas as candidates for the subject area is set as the same color area, and an area where the same color area falls within a predetermined size range is set as a final subject area.

被写体検出部123は、顔情報及び色情報とともに、CZ制御部119で計測された被写体距離情報及びズームレンズ102の焦点距離情報を用いることにより、画像データ上での被写体領域の大きさを算出する。姿勢検出部124は、加速度センサの情報に基づいてデジタルカメラ100の姿勢(例えば正位置/グリップ上/グリップ下)を検出する。揺れ検出部125は、ジャイロセンサによる角速度情報等に基づいてデジタルカメラ100の振れ状態を判定により検出する。揺れ検出部125は、ジャイロセンサ等に加わる振れ量(検出値)が所定量(閾値)以上である場合にカメラが手持ち状態であると判定し、所定量未満である場合には三脚等に固定された状態であると判定する。姿勢検出及び揺れ検出に用いる加速度センサ及びジャイロセンサについては、防振レンズ駆動部111の制御情報を取得するための検出部のセンサと兼用する構成でもよい。   The subject detection unit 123 calculates the size of the subject area on the image data by using the subject distance information measured by the CZ control unit 119 and the focal length information of the zoom lens 102 together with the face information and the color information. . The posture detection unit 124 detects the posture of the digital camera 100 (for example, normal position / above grip / below the grip) based on information from the acceleration sensor. The shake detection unit 125 detects the shake state of the digital camera 100 by determination based on angular velocity information or the like by a gyro sensor. The shake detection unit 125 determines that the camera is in a hand-held state when the shake amount (detection value) applied to the gyro sensor or the like is greater than or equal to a predetermined amount (threshold value), and if it is less than the predetermined amount, the shake detection unit 125 is fixed to a tripod or the like. It is determined that it has been performed. The acceleration sensor and the gyro sensor used for the posture detection and the shake detection may be configured to also serve as the sensor of the detection unit for acquiring the control information of the anti-vibration lens driving unit 111.

次に、本実施形態におけるオートズーム機能の概要と、AZ制御部122を説明する。オートズーム機能を搭載していないカメラでは、撮影者が望遠状態でフレーミングしてシャッタチャンスを待っている間に被写体が動いてフレームアウトした場合等において、以下の操作が必要であった。
まず撮影者は、ズーム操作部材の操作によりズームアウト動作を行ってから被写体を探索する。被写体の探索後、撮影者は再び所望の画角になるまでズーム操作を行って画角調整する。また、被写体が動いたために被写体像の大きさが変わった場合等においても、撮影者はズーム操作部材を操作して被写体像の大きさを調整する必要があった。
Next, the outline of the auto zoom function in the present embodiment and the AZ control unit 122 will be described. In a camera not equipped with an auto zoom function, the following operations are required when the subject moves out of the frame while framing in the telephoto state and waiting for a photo opportunity, etc.
First, the photographer searches for a subject after performing a zoom-out operation by operating the zoom operation member. After searching for the subject, the photographer adjusts the angle of view by zooming until the desired angle of view is reached again. Even when the size of the subject image changes due to the movement of the subject, the photographer needs to adjust the size of the subject image by operating the zoom operation member.

一方、オートズーム機能を搭載しているカメラでは、撮影者がオートズーム機能を設定した後、タッチパネル等で被写体を指定する操作を行い、撮影したい被写体を指定しておけばよい。オートズーム機能が設定されると、指定された被写体を画像の中央付近で所定のサイズに収めるように、自動でズーム動作が行われる。なお、被写体の指定方法としてはタッチパネル操作以外に、撮影者が特定のボタンを操作したときに画面中央付近にいる被写体を指定する方法や、カメラが検出した被写体の中から自動的に主被写体を選択する方法等がある。   On the other hand, in a camera equipped with an auto-zoom function, after the photographer sets the auto-zoom function, an operation for designating a subject with a touch panel or the like may be performed to designate the subject to be photographed. When the auto-zoom function is set, the zoom operation is automatically performed so that the designated subject is within a predetermined size near the center of the image. In addition to the touch panel operation, the subject can be specified by specifying the subject near the center of the screen when the photographer operates a specific button, or automatically selecting the main subject from the subjects detected by the camera. There are methods to select.

被写体検出部123は、画像メモリ108から指定された被写体領域の画像データ上での位置や大きさを算出する。この処理を、ライブビューとして画像表示するごとに、サンプリングの画像データに対して連続的に行うことにより、被写体の動きを追尾可能となる。追尾している被写体の画像が後述するズームアウト領域で検出された場合や、検出した被写体の画像が所定の大きさよりも大きくなった場合、AZ制御部122はズームアウト動作を開始する。すなわち、AZ制御部122はCZ制御部119または電子ズーム制御部120に対して、広角方向へのズームアウト指示を行う。被写体をズームイン領域内に検出し、かつ、被写体像が所定の大きさの範囲内に収まった場合には、望遠側へズームイン動作が行われる。このような処理により、撮影者はズーム操作を気にせず、所望の被写体の画像を画面内に収めるようにカメラを動かすだけでよい。仮に、被写体がフレームアウトしそうになった場合でも、自動的にズーム倍率が変更されるため、より簡単に画角合わせを行うことができる。   The subject detection unit 123 calculates the position and size of the subject region designated from the image memory 108 on the image data. By performing this process continuously on the sampled image data each time an image is displayed as a live view, the movement of the subject can be tracked. When an image of the tracked subject is detected in a zoom-out area described later, or when the detected image of the subject becomes larger than a predetermined size, the AZ control unit 122 starts a zoom-out operation. That is, the AZ control unit 122 instructs the CZ control unit 119 or the electronic zoom control unit 120 to zoom out in the wide angle direction. When the subject is detected within the zoom-in area and the subject image falls within a predetermined size range, a zoom-in operation is performed toward the telephoto side. With such a process, the photographer need only move the camera so that the image of the desired subject is within the screen, without worrying about the zoom operation. Even if the subject is about to be out of frame, the zoom magnification is automatically changed, so that the angle of view can be adjusted more easily.

次に、図3から図5を参照して、ズームアウト動作やズームイン動作の開始条件について説明する。図3は、被写体(物体)が画面外へフレームアウトすることを防止する処理の説明図である。図4は、被写体(人物)が画面外へフレームアウトすることを防止する処理の説明図である。   Next, the start conditions for the zoom-out operation and the zoom-in operation will be described with reference to FIGS. FIG. 3 is an explanatory diagram of processing for preventing the subject (object) from being out of the frame. FIG. 4 is an explanatory diagram of processing for preventing a subject (person) from going out of the frame.

図3及び図4において、枠300a及び枠300bは被写体(物体)を追尾する第1の追尾枠(以下、モノ追尾枠という)であり、枠400a〜fは被写体(人物の顔)を追尾する第2の追尾枠(以下、顔追尾枠という)である。以下では、被写体が人物と物体のいずれにも適用可能な場合、モノ追尾枠及び顔追尾枠を総称して被写体追尾枠ということもある。被写体追尾枠は、撮影者が指定した被写体が分かるように、表示部109のEVF画面(電子ビューファインダ画面)にて被写体像を囲むように表示される。被写体追尾枠の画面上での位置及び大きさは、顔情報及び色情報に基づいて被写体検出部123が算出し、フレームレート周期で更新される。   3 and 4, a frame 300a and a frame 300b are first tracking frames (hereinafter referred to as mono tracking frames) that track a subject (object), and frames 400a to 400f track a subject (person's face). This is a second tracking frame (hereinafter referred to as a face tracking frame). Hereinafter, when the subject is applicable to both a person and an object, the mono tracking frame and the face tracking frame may be collectively referred to as a subject tracking frame. The subject tracking frame is displayed so as to surround the subject image on the EVF screen (electronic viewfinder screen) of the display unit 109 so that the subject specified by the photographer can be seen. The position and size of the subject tracking frame on the screen are calculated by the subject detection unit 123 based on the face information and the color information, and are updated at a frame rate cycle.

図3を参照して、被写体(飛行機)が画面外にフレームアウトすることを防止する処理について説明する。図3(A)にてズームアウト領域ZO(以下、ZO領域という)は、EVFで表示される画角全体(画面全体)に対して所定の比率よりも外側の領域を示している。例えば、画面の中心点を0%、画面全体を100%とし、画面全体に対して80%となる位置をZO領域の境界として設定する場合を想定する。この場合、画面全体における80〜100%の領域がZO領域となる。ZO領域にモノ追尾枠300aの一部が進入すると、AZ制御部122は、ズームアウト動作を開始させる制御を行う。また、AZ制御部122は、ズーム移動前のズーム倍率(ズームイン画角に相当)をメモリ118に記憶する。ズームアウト動作中の目標ズーム倍率やズーム速度は、被写体像のサイズや移動速度に応じて予め設定される。また、目標ズーム倍率やズーム速度を被写体像のサイズや移動速度に応じて適宜算出してもよい。ズームアウト動作は、その目標ズーム倍率やズーム速度に従って実行される。これにより、被写体のフレームアウトを効果的に防止することができる。   With reference to FIG. 3, a process for preventing the subject (airplane) from going out of the frame will be described. In FIG. 3A, a zoom-out area ZO (hereinafter referred to as a ZO area) indicates an area outside a predetermined ratio with respect to the entire angle of view (entire screen) displayed by EVF. For example, assume a case where the center point of the screen is 0%, the entire screen is 100%, and a position that is 80% of the entire screen is set as the boundary of the ZO region. In this case, 80% to 100% of the entire screen is the ZO area. When a part of the mono tracking frame 300a enters the ZO area, the AZ control unit 122 performs control to start the zoom-out operation. Further, the AZ control unit 122 stores in the memory 118 the zoom magnification before zoom movement (corresponding to the zoom-in angle of view). The target zoom magnification and zoom speed during the zoom-out operation are set in advance according to the size and movement speed of the subject image. Further, the target zoom magnification and zoom speed may be appropriately calculated according to the size and moving speed of the subject image. The zoom-out operation is executed according to the target zoom magnification and zoom speed. Thereby, it is possible to effectively prevent the subject from being out of frame.

図3(B)は、図3(A)の画角から、所定のズーム変化量分に相当するズームアウト動作が行われたときの画角を示している。図3(B)に示すズームイン領域ZI(以下、ZI領域という)は、被写体探索状態においてズームイン画角(ズームアウト前の画角)301に対して所定の比率よりも内側の領域を示している。例えば、画面の中心点を0%とし、ズームイン画角301を100%とし、ズームイン画角301に対して70%となる位置をZI領域の境界として設定する場合を想定する。この場合、ズームイン画角301の全体における0〜70%の領域がZI領域となる。このとき、例えばズームアウト倍率が1/2倍である場合、ズームイン画角301は画面全体に対して50%の大きさとなる。よって、ZI領域の境界は画面全体に対して70%×(1/2)=35%であり、ZI領域は、画面全体に対して0〜35%の領域であるとも言える。撮影者が、ZI領域の内部にモノ追尾枠300bが収まるようにカメラの向きを変更すると、AZ制御部122は、ズームイン動作を開始させる制御を行う。   FIG. 3B shows the angle of view when a zoom-out operation corresponding to a predetermined zoom change amount is performed from the angle of view of FIG. A zoom-in area ZI (hereinafter referred to as a ZI area) shown in FIG. 3B indicates an area inside a predetermined ratio with respect to the zoom-in angle of view (view angle before zoom-out) 301 in the subject search state. . For example, assume that the center point of the screen is 0%, the zoom-in angle of view 301 is 100%, and a position that is 70% of the zoom-in angle of view 301 is set as the boundary of the ZI region. In this case, an area of 0 to 70% in the entire zoom-in angle of view 301 is the ZI area. At this time, for example, when the zoom-out magnification is ½, the zoom-in angle of view 301 is 50% of the entire screen. Therefore, the boundary of the ZI area is 70% × (½) = 35% with respect to the entire screen, and it can be said that the ZI area is an area of 0 to 35% with respect to the entire screen. When the photographer changes the orientation of the camera so that the mono tracking frame 300b fits inside the ZI area, the AZ control unit 122 performs control to start a zoom-in operation.

次に図4を参照して、被写体(人物)が画面外にフレームアウトすることを防止する処理について説明する。被写体が人物である場合に、顔追尾枠の一部がZO領域に進入するとズームアウト動作が開始し、また顔追尾枠がZI領域の内部に収まるとズームイン動作が行われる。被写体が人物である場合には物体の場合とは異なり、被写体の移動方向をある程度予測できるため、予測される移動方向の領域に応じてZO領域及びZI領域が設定される。また、手持ちでの撮影では、手ぶれ等の影響によって被写体がフレームアウトしてしまう場合がある。しかし、手ぶれ等によって被写体がフレームアウトした場合には、撮影者が被写体をフレームインさせようとする動作によってフレームインし直すことが可能である。ここで、画面の上部にZO領域を設定した場合、人物を中央付近に配置して撮影するときにもZO領域に顔追尾枠が進入してしまい、意図せずズームアウトする場合がある。そこで、被写体が人物であって、かつ手持ち状態(撮影者がカメラを把持した状態)である場合には、撮影者のフレーミング操作を考慮して、画面の上部にはZO領域が設定されない。   Next, with reference to FIG. 4, a process for preventing the subject (person) from going out of the frame will be described. When the subject is a person, the zoom-out operation starts when a part of the face tracking frame enters the ZO region, and the zoom-in operation is performed when the face tracking frame falls within the ZI region. When the subject is a person, unlike the case of the object, the moving direction of the subject can be predicted to some extent, so the ZO region and the ZI region are set according to the region of the predicted moving direction. In hand-held shooting, the subject may be out of frame due to the influence of camera shake or the like. However, when the subject is out of frame due to camera shake or the like, it is possible for the photographer to re-frame in by an operation to try to frame the subject. Here, when the ZO area is set at the top of the screen, the face tracking frame may enter the ZO area and zoom out unintentionally even when a person is placed near the center for shooting. Therefore, when the subject is a person and is in a hand-held state (a state where the photographer is holding the camera), the ZO region is not set at the top of the screen in consideration of the framing operation of the photographer.

このように、本実施形態では、被写体検出部123で顔が検出された場合、AZ制御部122は、カメラの姿勢や揺れ状態に応じてZO領域及びZI領域を変更する。カメラの姿勢については姿勢検出部124により検出され、また、揺れ状態については、揺れ検出部125による検出結果から判定される。揺れ検出部125による検出結果とは、カメラが手持ち状態であるか否かの検出結果である。以下、図4(A)から(C)を参照して具体的に説明する。   As described above, in the present embodiment, when the face is detected by the subject detection unit 123, the AZ control unit 122 changes the ZO region and the ZI region according to the posture and shaking state of the camera. The posture of the camera is detected by the posture detection unit 124, and the shaking state is determined from the detection result by the shaking detection unit 125. The detection result by the shake detection unit 125 is a detection result of whether or not the camera is in a handheld state. Hereinafter, a specific description will be given with reference to FIGS.

図4(A)は、撮影者が手持ちでカメラを正位置に構えたときに設定されるZO領域及びZI領域を示している。このような撮影シーンで、被写体が水平方向に移動してフレームアウトする場合、画面内での被写体の位置は正位置の画面に対して水平方向(長手方向)に移動する。そこで、ZO領域及びZI領域はいずれも、正位置の画面に対して垂直方向(短手方向)の縦帯状に配置される。ZO領域は、横長の長方形の画面にて水平方向の両端寄りに位置する縦帯状に設定され、ZI領域は、画面の中央部に位置する縦帯状に設定される。この場合、顔追尾枠400aがZO領域内に進入すると、AZ制御部122はズームアウト開始を判定し、所定のズーム倍率分に対応するズームアウトの動作制御を行う。また、顔追尾枠400bがZI領域内に包含されると、AZ制御部122はズームイン開始を判定し、ズーム戻り位置まで所定のズーム倍率分に対応するズームインの動作制御を行う。このようにZO領域及びZI領域を設定することで、被写体(人物)のフレームアウトを効果的に防止できる。   FIG. 4A shows a ZO region and a ZI region that are set when the photographer holds the camera in a normal position. In such a shooting scene, when the subject moves in the horizontal direction and goes out of the frame, the position of the subject in the screen moves in the horizontal direction (longitudinal direction) with respect to the screen at the normal position. Therefore, both the ZO region and the ZI region are arranged in a vertical band shape in the vertical direction (short direction) with respect to the screen at the normal position. The ZO area is set in a vertical band shape positioned near both ends in the horizontal direction on a horizontally long rectangular screen, and the ZO area is set in a vertical band shape positioned in the center of the screen. In this case, when the face tracking frame 400a enters the ZO region, the AZ control unit 122 determines the start of zoom-out and performs zoom-out operation control corresponding to a predetermined zoom magnification. When the face tracking frame 400b is included in the ZI region, the AZ control unit 122 determines the start of zoom-in, and performs zoom-in operation control corresponding to a predetermined zoom magnification up to the zoom return position. By setting the ZO region and the ZI region in this way, the subject (person) can be effectively prevented from being out of frame.

図4(B)は、同様の撮影シーンにてカメラ姿勢が変更され、撮影者がグリップ下もしくはグリップ上の縦位置状態にカメラを構えたときに設定されるZO領域及びZI領域を示している。この場合、縦位置の画面に対して垂直方向(長手方向)の縦帯状にZO領域及びZI領域が配置される。つまり、ZO領域は、縦長の長方形の画面にて水平方向の両端寄りに位置する縦帯状に設定され、ZI領域は、画面の中央部に位置する縦帯状に設定される。この場合、顔追尾枠400cがZO領域内に進入すると、AZ制御部122はズームアウト開始を判定し、所定のズーム倍率分に対応するズームアウトの動作制御を行う。また、顔追尾枠400dがZI領域内に包含されると、AZ制御部122はズームイン開始を判定し、ズーム戻り位置まで所定のズーム倍率分に対応するズームインの動作制御を行う。このようにZO領域及びZI領域を設定することで、水平方向への被写体の動きを検出し、フレームアウトを効果的に防止できる。   FIG. 4B shows the ZO region and the ZI region that are set when the camera posture is changed in the same shooting scene and the photographer holds the camera in a vertical position under the grip or on the grip. . In this case, the ZO region and the ZI region are arranged in a vertical band shape in the vertical direction (longitudinal direction) with respect to the screen at the vertical position. In other words, the ZO region is set to a vertical band shape that is positioned near both ends in the horizontal direction on a vertically long rectangular screen, and the ZI region is set to a vertical band shape that is positioned at the center of the screen. In this case, when the face tracking frame 400c enters the ZO region, the AZ control unit 122 determines the start of zoom-out and performs zoom-out operation control corresponding to a predetermined zoom magnification. When the face tracking frame 400d is included in the ZI region, the AZ control unit 122 determines the start of zoom-in, and performs zoom-in operation control corresponding to a predetermined zoom magnification up to the zoom return position. By setting the ZO area and the ZI area in this way, it is possible to detect the movement of the subject in the horizontal direction and effectively prevent frame-out.

図4(C)は、揺れ検出部125での検出状態が固定状態のときに設定されるZO領域及びZI領域を示している。固定状態とは、三脚等によってカメラが固定されている状態であり、手ぶれによるフレームアウトの可能性はない。さらには、画面の中央付近に被写体がフレームインしていないときにズームインすると、その動作によってフレームアウトしてしまう可能性がある。そこで、画面の周辺部全体にZO領域が設定され、ズームイン画角よりも内側にZI領域が設定される。つまり、ZO領域は、画面の縦方向及び横方向の端寄りに位置する矩形帯状に設定され、ZI領域は、画面の中央部に位置する矩形状に設定される。この場合、顔追尾枠400eがZO領域内に進入すると、AZ制御部122は、ズームアウト開始を判定し、所定のズーム倍率分に対応するズームアウトの動作制御を行う。また、顔追尾枠400fがZI領域内に包含されると、AZ制御部122は、ズームイン開始を判定し、ズーム戻り位置まで所定のズーム倍率分に対応するズームインの動作制御を行う。   FIG. 4C illustrates a ZO region and a ZI region that are set when the detection state in the shake detection unit 125 is a fixed state. The fixed state is a state in which the camera is fixed by a tripod or the like, and there is no possibility of frame-out due to camera shake. Furthermore, if the subject zooms in when the subject is not framed in the vicinity of the center of the screen, there is a possibility that the frame will be out due to the operation. Therefore, a ZO region is set for the entire peripheral portion of the screen, and a ZI region is set inside the zoom-in angle of view. That is, the ZO area is set to a rectangular band located near the edges in the vertical and horizontal directions of the screen, and the ZI area is set to a rectangular shape located at the center of the screen. In this case, when the face tracking frame 400e enters the ZO region, the AZ control unit 122 determines the start of zoom-out and performs zoom-out operation control corresponding to a predetermined zoom magnification. When the face tracking frame 400f is included in the ZI region, the AZ control unit 122 determines the zoom-in start and performs zoom-in operation control corresponding to a predetermined zoom magnification up to the zoom return position.

以上のように本実施形態では、カメラの姿勢や撮影状態(手持ち状態/固定状態)の変化に応じてZO領域及びZI領域の各範囲を動的に変更する。これにより、手ぶれ等による誤作動を防止しながら、被写体のフレームアウトを効果的に防止できる。なお、カメラの姿勢と撮影状態(手持ち状態/固定状態)のいずれか一方に応じてZO領域又はZI領域を変更してもよく、またZO領域とZI領域のいずれか一方のみを変更してもよい。   As described above, in the present embodiment, the ranges of the ZO region and the ZI region are dynamically changed according to changes in the posture of the camera and the photographing state (hand-held state / fixed state). Accordingly, it is possible to effectively prevent the subject from being out of frame while preventing malfunction due to camera shake or the like. Note that the ZO area or the ZI area may be changed according to either the camera posture or the shooting state (handheld state / fixed state), or only one of the ZO area and the ZI area may be changed. Good.

次に、被写体像が画面に占める割合を所定の範囲内に保つためのズーム動作について説明する。本実施形態では、検出された被写体像のサイズが基準サイズの所定倍より大きく変化した場合に自動でズーム動作を行うことで、被写体像のサイズを基準サイズから所定の範囲内に保つように制御(サイズ保持制御)が行われる。図5は、画面内における被写体(人物)像のサイズを保つための処理を説明する図である。図6は被写体(人物)の構図設定の説明図である。   Next, a zoom operation for keeping the ratio of the subject image to the screen within a predetermined range will be described. In this embodiment, control is performed so as to keep the size of the subject image within the predetermined range from the reference size by automatically performing a zoom operation when the size of the detected subject image changes more than a predetermined multiple of the reference size. (Size holding control) is performed. FIG. 5 is a diagram illustrating a process for maintaining the size of the subject (person) image in the screen. FIG. 6 is an explanatory diagram of composition setting of a subject (person).

まず、図6を参照して、追尾対象とする被写体を画面内に収める範囲(構図)の設定について説明する。図6(A)は、構図設定が「マニュアル」に設定されている場合の画面表示を例示する。「マニュアル」設定時には、撮影者が画面内の人物の像を見ながらズームレバー操作でマニュアルズーム動作を行って追尾する顔の大きさを変更する。そのときの被写体像のサイズは基準サイズとしてメモリ118に記憶される。図6(B)は構図設定が「顔」に設定されている場合の画面表示を例示する。「顔」の構図設定時には、カメラの姿勢や顔の方向によって顔が画面に収まる大きさが基準サイズとして算出され、メモリ118に記憶される。同様に、図6(C)は構図設定が「上半身」に設定されている場合の画面表示を例示し、図6(D)は構図設定が「全身」に設定されている場合の画面表示を例示する。それぞれ画面上で設定された大きさとなるように基準サイズが算出されてメモリ118に記憶される。   First, with reference to FIG. 6, the setting of a range (composition) in which a subject to be tracked is included in the screen will be described. FIG. 6A illustrates a screen display when the composition setting is set to “manual”. When “manual” is set, the photographer changes the size of the face to be tracked by performing a manual zoom operation by operating the zoom lever while looking at the image of the person on the screen. The size of the subject image at that time is stored in the memory 118 as a reference size. FIG. 6B illustrates a screen display when the composition setting is set to “face”. When the “face” composition is set, the size that fits the face on the screen according to the camera posture and the face direction is calculated as the reference size and stored in the memory 118. Similarly, FIG. 6C illustrates a screen display when the composition setting is set to “upper body”, and FIG. 6D illustrates a screen display when the composition setting is set to “whole body”. Illustrate. A reference size is calculated so as to have a size set on the screen and stored in the memory 118.

図6(E)は構図設定が「オート」に設定されている場合の画面表示を例示する。「オート」設定時には、AZ制御部122が、画面内での被写体位置や被写体サイズ、被写体数、カメラの姿勢等を基づき、適切な構図を判定する。さらに、判定された構図となるように基準サイズが算出されてメモリ118に記憶される。基準サイズの算出方法については図12を用いて後述する。   FIG. 6E illustrates a screen display when the composition setting is set to “auto”. When “Auto” is set, the AZ control unit 122 determines an appropriate composition based on the position of the subject, the size of the subject, the number of subjects, the posture of the camera, and the like. Further, a reference size is calculated and stored in the memory 118 so as to achieve the determined composition. A method for calculating the reference size will be described later with reference to FIG.

撮影者は撮影画面から操作部117の左右ボタン操作や設定メニュー上での選択によって構図設定を変更する操作を行える。構図設定の変更操作が行われると、AZ制御部122は、メモリ118に記憶されている構図設定の情報を更新する。なお、図6では被写体が人物の場合に「マニュアル」、「顔」、「上半身」、「全身」、「オート」の各構図を設定する例を示したが、構図の設定はこれに限定されるものではない。例示した5つの構図の一部のみを設定し、または他の構図を含んでもよい。また、被写体が物体の場合には、例えば「マニュアル」、「大」、「中」、「小」、「オート」の各構図を設定してもよい。   The photographer can perform an operation of changing the composition setting by operating the left and right buttons of the operation unit 117 or selecting on the setting menu from the shooting screen. When the composition setting change operation is performed, the AZ control unit 122 updates the composition setting information stored in the memory 118. FIG. 6 shows an example in which “manual”, “face”, “upper body”, “whole body”, and “auto” composition are set when the subject is a person, but the composition setting is limited to this. It is not something. Only a part of the five illustrated compositions may be set, or other compositions may be included. Further, when the subject is an object, for example, “manual”, “large”, “medium”, “small”, and “auto” compositions may be set.

図5を参照して、被写体像が画面に占める割合を所定の範囲内に保つためのズーム動作について、構図設定が「マニュアル」の場合を例に説明する。図5(A)〜(C)は、被写体(人物)がカメラに近づいてきた場合に、カメラが自動的に行うズーム動作を例示する。これは、被写体像が画面に占める割合を所定の比率内に収めるためのズームアウト動作である。なお、図5では、顔追尾枠500a〜fを、被写体である人物の特徴領域として顔領域を囲むように表示している。したがって、ここでは顔追尾枠の大きさを、被写体サイズとして説明する。   With reference to FIG. 5, the zoom operation for keeping the ratio of the subject image to the screen within a predetermined range will be described as an example in which the composition setting is “manual”. FIGS. 5A to 5C illustrate a zoom operation automatically performed by the camera when a subject (person) approaches the camera. This is a zoom-out operation for keeping the ratio of the subject image on the screen within a predetermined ratio. In FIG. 5, the face tracking frames 500a to 500f are displayed so as to surround the face area as the characteristic area of the person who is the subject. Therefore, here, the size of the face tracking frame will be described as the subject size.

図5(A)は、後述する被写体指定方法に従って被写体が指定されたときの画角を示している。被写体指定時の顔追尾枠500aの大きさは、基準の被写体サイズ(基準サイズ)としてメモリ118に記憶される。図5(B)は、図5(A)の状態からズーム倍率を変更しない状態で、被写体がカメラに向かって近づいてきたときの画角を示している。例えば、基準の被写体サイズである顔追尾枠500aの大きさに対して150%となる大きさをズームアウト動作の開始サイズとする。被写体追尾枠(顔追尾枠)の関係が、「顔追尾枠500b>顔追尾枠500a×150%」となったとき、つまり、基準サイズに対して所定の変化量を超えて追尾枠が変化したときに、AZ制御部122はズームアウト動作の開始を判定する。   FIG. 5A shows the angle of view when a subject is designated according to a subject designation method described later. The size of the face tracking frame 500a at the time of subject designation is stored in the memory 118 as a reference subject size (reference size). FIG. 5B shows an angle of view when the subject approaches the camera without changing the zoom magnification from the state of FIG. For example, a size that is 150% of the size of the face tracking frame 500a that is the reference subject size is set as the start size of the zoom-out operation. When the relationship of the subject tracking frame (face tracking frame) is “face tracking frame 500b> face tracking frame 500a × 150%”, that is, the tracking frame has changed beyond a predetermined change amount with respect to the reference size. Sometimes, the AZ control unit 122 determines the start of the zoom-out operation.

図5(C)は、図5(B)の画角501から所定のズーム倍率分だけズームアウトした画角と、顔追尾枠500cを示している。ここでは、ズームアウト動作を開始するときの顔追尾枠サイズの基準被写体サイズに対する変化率(150%)を考慮して、所定のズーム倍率を1/1.5倍としている。この後、さらに被写体がカメラに近づいてくる場合、さらに広角側へズームアウトを行うことにより、被写体像を所定の比率内に収め続けることができる。したがって、撮影者はレリーズスイッチの操作だけに集中することが可能である。   FIG. 5C shows an angle of view zoomed out from the angle of view 501 of FIG. 5B by a predetermined zoom magnification, and a face tracking frame 500c. Here, the predetermined zoom magnification is set to 1 / 1.5 in consideration of the rate of change (150%) of the face tracking frame size with respect to the reference subject size when starting the zoom-out operation. Thereafter, when the subject further approaches the camera, the subject image can be kept within a predetermined ratio by further zooming out to the wide angle side. Therefore, the photographer can concentrate only on the operation of the release switch.

一方、図5(D)〜(F)は、被写体である人物がカメラから遠ざかる場合に、カメラが自動的に行うズーム動作を例示する。これは、被写体像が画面に占める割合を所定の範囲内に収めるためのズームイン動作である。図5(D)は、後述する被写体指定方法に従って被写体が指定されたときの画角を示している。被写体指定時の顔追尾枠500dの大きさは、基準の被写体サイズとしてメモリ118に記憶される(構図設定が「マニュアル」の場合)。   On the other hand, FIGS. 5D to 5F illustrate a zoom operation that is automatically performed by the camera when a subject person moves away from the camera. This is a zoom-in operation for keeping the ratio of the subject image on the screen within a predetermined range. FIG. 5D shows the angle of view when a subject is designated according to a subject designation method described later. The size of the face tracking frame 500d at the time of subject designation is stored in the memory 118 as a reference subject size (when the composition setting is “manual”).

図5(E)は、図5(D)の状態からズーム倍率を変更しない状態で、被写体がカメラから遠ざかったときの画角を示している。例えば、基準の被写体サイズである顔追尾枠500dの大きさに対して50%となる大きさをズームイン動作の開始サイズとする。顔追尾枠の関係が、「顔追尾枠500e<顔追尾枠500d×50%」となったときに、基準サイズに対して所定の変化量を超えて追尾枠が変化したと判定される。この判定条件を満たし、かつ、顔追尾枠500eがZI領域内に包含されると、AZ制御部122はズームイン動作の開始を判定する。ここで、図5(E)の画角に対して所定のズーム倍率分だけズームインした画角502よりも内側にZI領域が設定される。   FIG. 5E shows the angle of view when the subject moves away from the camera without changing the zoom magnification from the state of FIG. For example, a size that is 50% of the size of the face tracking frame 500d that is the reference subject size is set as the start size of the zoom-in operation. When the relationship of the face tracking frame becomes “face tracking frame 500e <face tracking frame 500d × 50%”, it is determined that the tracking frame has changed beyond a predetermined change amount with respect to the reference size. When this determination condition is satisfied and the face tracking frame 500e is included in the ZI region, the AZ control unit 122 determines the start of the zoom-in operation. Here, the ZI region is set inside the angle of view 502 zoomed in by a predetermined zoom magnification with respect to the angle of view of FIG.

図5(F)は、図5(E)の画角から所定のズーム倍率分だけズームインした画角(画角502に対応)と、顔追尾枠500fを示している。ここでは、ズームイン動作を開始するときの顔追尾枠サイズの基準被写体サイズに対する変化率(50%)を考慮して、所定のズーム倍率を1/0.5倍としている。   FIG. 5F shows an angle of view (corresponding to the angle of view 502) zoomed in by a predetermined zoom magnification from the angle of view of FIG. 5E, and a face tracking frame 500f. Here, the predetermined zoom magnification is set to 1 / 0.5 in consideration of the rate of change (50%) of the face tracking frame size with respect to the reference subject size when starting the zoom-in operation.

図3では被写体が物体である場合、また図4では被写体が人物である場合にフレームアウトを防止する処理について説明した。また、図5では被写体が人物である場合に、画面に占める被写体像の大きさの比率を、所定の範囲内に収める処理について説明した。なお、追尾対象とする被写体が物体である場合にも、被写体が人物である場合と同様に、図5で示した被写体像のサイズ保持の制御のためのズーム動作開始判定を行ってもよい。また、構図設定が「マニュアル」以外の場合においても、それぞれの基準サイズに応じて、図5と同様に自動的にズーム動作が行われる。   In FIG. 3, the processing for preventing frame-out when the subject is an object and FIG. 4 when the subject is a person has been described. Further, FIG. 5 illustrates the processing for keeping the ratio of the size of the subject image in the screen within a predetermined range when the subject is a person. Note that when the subject to be tracked is an object, the zoom operation start determination for controlling the size of the subject image shown in FIG. 5 may be performed as in the case where the subject is a person. Even when the composition setting is other than “manual”, the zoom operation is automatically performed in the same manner as in FIG. 5 according to each reference size.

次に、図7から図21を参照して、オートズーム機能の処理について説明する。図7は、オートズーム機能の全体の処理例を示すフローチャートである。以下のオートズーム機能は、特に明示的な記載がない限り、システム制御部114(AZ制御部122)の指令に基づいて行われるものとする。
まずS700でAZ制御部122は、操作部117のオートズーム操作スイッチの操作状態を判定する。オートズーム操作スイッチが押下された場合、S701に進み、当該スイッチが押下されない場合にはS700の判定処理が繰り返される。S701で被写体探索処理が実行され、さらに、S702の被写体指定処理、S703の基本サイズ設定処理、S704のオートズーム制御が順次に実行される。
Next, processing of the auto zoom function will be described with reference to FIGS. FIG. 7 is a flowchart illustrating an example of overall processing of the auto zoom function. The following auto-zoom functions are performed based on commands from the system control unit 114 (AZ control unit 122) unless otherwise specified.
First, in S <b> 700, the AZ control unit 122 determines the operation state of the auto zoom operation switch of the operation unit 117. When the auto zoom operation switch is pressed, the process proceeds to S701, and when the switch is not pressed, the determination process of S700 is repeated. In step S701, subject search processing is executed, and further subject specification processing in step S702, basic size setting processing in step S703, and auto zoom control in step S704 are sequentially executed.

オートズーム機能の処理が開始された直後、または、操作部117の被写体探索ボタンが押下された場合(S705でyes)に、S701の被写体探索処理が実行される。図8を参照して、S701のステップで実行する被写体探索処理を説明する。撮影対象の被写体がカメラから遠く離れている場合、画面内に被写体像が存在しても被写体の特徴領域が小さすぎると、被写体検出部123で検出できない可能性がある。このようなシーンでは、被写体情報に基づくオートズーム機能を実行することができない。そこで、所定の焦点距離まで被写体を検出しながらズームイン動作を行う被写体探索処理が実行される。   Immediately after the processing of the auto zoom function is started, or when the subject search button of the operation unit 117 is pressed (Yes in S705), the subject search processing in S701 is executed. With reference to FIG. 8, the subject search process executed in step S701 will be described. When the subject to be photographed is far from the camera, the subject detection unit 123 may not be able to detect if the subject feature area is too small even if the subject image exists in the screen. In such a scene, the auto zoom function based on the subject information cannot be executed. Therefore, subject search processing is performed in which a zoom-in operation is performed while detecting the subject up to a predetermined focal length.

S800では、オートズーム開始の直後であるか、または、オートズーム開始の直後でなく、オートズーム中に被写体探索ボタンが押下されたかの判定処理が行われる。S800で前者の肯定的判定結果(yes)の場合にはS801に進み、否定的判定結果(no)の場合にはS803に移行する。S801では、被写体探索終了焦点距離を取得する処理が実行される。被写体探索終了焦点距離は、画像内での被写体像の探索を終了する際の終了ズーム位置での焦点距離であり、以下、探索終了焦点距離という。本実施形態ではオートズーム開始直後に、探索終了焦点距離は35mm判換算で85mmの焦点距離としている。この焦点距離は一般的に人物を撮影する場合に適しているとされる標準レンズの焦点距離であり、被写体(人物)がいない場合や(後ろ向き状態等で)顔が検出できない場合でも探索終了後に適切な画角で被写体検出の待ち状態とすることができる。ただし、焦点距離は85mmに限らず、他の焦点距離(例えば50mmや100mm等)であってもよい。また、メニュー設定から撮影者が探索終了焦点距離を変更可能な構成や、撮影モードまたは撮影する被写体等に応じて探索終了焦点距離を変更可能な構成としてもよい。S801からS802に進むと、モード開始時の焦点距離が探索終了焦点距離と比較され、当該焦点距離が探索終了焦点距離よりも広角側か望遠側かについて判定される。オートズーム開始時の焦点距離が探索終了焦点距離よりも望遠側である場合(S802でno)には、被写体探索の処理を終了する。また、オートズーム開始時の焦点距離が探索終了焦点距離よりも広角側である場合(S802でyes)には、S805に進む。   In S800, it is determined whether or not the subject search button has been pressed immediately after the start of auto-zoom, or not just after the start of auto-zoom but during auto-zoom. In S800, in the case of the former positive determination result (yes), the process proceeds to S801, and in the case of a negative determination result (no), the process proceeds to S803. In step S801, processing for acquiring the subject search end focal length is executed. The subject search end focal length is a focal length at the end zoom position when the search for the subject image in the image is ended, and is hereinafter referred to as a search end focal length. In this embodiment, immediately after the start of auto zoom, the search end focal length is set to 85 mm in terms of 35 mm. This focal length is the focal length of a standard lens that is generally suitable for photographing a person. Even if there is no subject (person) or a face cannot be detected (such as when facing backwards), after the search is completed. It is possible to enter a subject detection waiting state with an appropriate angle of view. However, the focal length is not limited to 85 mm, and may be other focal lengths (for example, 50 mm, 100 mm, etc.). Further, a configuration in which the photographer can change the search end focal length from the menu setting, or a configuration in which the search end focal length can be changed in accordance with the shooting mode or the subject to be shot or the like. When the processing proceeds from S801 to S802, the focal length at the start of the mode is compared with the search end focal length, and it is determined whether the focal length is wider than the search end focal length or on the telephoto side. If the focal length at the start of auto-zoom is closer to the telephoto side than the search end focal length (no in S802), the subject search process is terminated. If the focal length at the start of auto-zoom is on the wide-angle side from the search end focal length (yes in S802), the process proceeds to S805.

一方、S800で被写体探索ボタンの操作による被写体探索であると判定された場合にS803では、探索終了焦点距離を取得する処理が実行される。本実施形態では、被写体探索ボタンの操作での探索終了焦点距離を、当該操作が実行されたときの焦点距離に対して2.5倍だけ望遠側の焦点距離としている。ただし、この倍率は例示であって、他の倍率でもよい。また、メニュー設定から撮影者が探索終了焦点距離を変更可能な構成や、撮影モードまたは撮影する被写体等に応じて探索終了焦点距離を変更可能な構成としてもよい。S803からS804に進み、S803で取得した探索終了焦点距離がテレ端(望遠端)の焦点距離と比較され、探索終了焦点距離がテレ端の焦点距離よりも広角側か望遠側かについて判定される。探索終了焦点距離がテレ端の焦点距離よりも望遠側である場合には、被写体探索の処理を終了する。探索終了焦点距離がテレ端の焦点距離よりも広角側である場合には、S805に進む。S805でAZ制御部122は、S801またはS803にて取得した探索終了焦点距離に対応するズーム変化量を、CZ制御部119または電子ズーム制御部120に設定し、ズームイン動作を行うように指示する。   On the other hand, when it is determined in S800 that the subject search is performed by operating the subject search button, in S803, a process of acquiring the search end focal length is executed. In the present embodiment, the search end focal length when the subject search button is operated is set to the focal length on the telephoto side by 2.5 times the focal length when the operation is executed. However, this magnification is an example, and other magnifications may be used. Further, a configuration in which the photographer can change the search end focal length from the menu setting, or a configuration in which the search end focal length can be changed in accordance with the shooting mode or the subject to be shot or the like. Proceeding from S803 to S804, the search end focal length acquired in S803 is compared with the telephoto end (telephoto end) focal length, and it is determined whether the search end focal length is wider or telephoto than the telephoto end focal length. . If the search end focal length is closer to the telephoto side than the telephoto end focal length, the subject search processing is ended. If the search end focal length is on the wide-angle side with respect to the telephoto end focal length, the process advances to step S805. In S805, the AZ control unit 122 sets the zoom change amount corresponding to the search end focal length acquired in S801 or S803 in the CZ control unit 119 or the electronic zoom control unit 120, and instructs to perform a zoom-in operation.

次にS806では、現在の焦点距離が探索終了焦点距離に到達したか否かについて判定が行われる。現在の焦点距離が探索終了焦点距離に到達した場合、S809に進み、ズームイン動作を停止した後、被写体探索処理が終了する。また、S806で現在の焦点距離が探索終了焦点距離に到達していないと判定された場合には、S807に処理を進める。S807は、被写体検出部123によって被写体が検出されているか否かの判定処理である。S807で被写体が検出されたと判定された場合にはS808に進み、被写体が検出されたと判定されない場合にはS806に戻る。S808では、被写体を検出した位置が画面の所定の探索終了領域内であるか否かの判定が行われる。所定の探索終了領域については被写体に応じて予め設定された閾値(位置の判定基準値)により決定されるものとする。判定の結果、S807にて検出された被写体の検出位置が画面上の所定の探索終了領域内である場合にはS809に進み、ズームイン動作を停止して被写体探索処理を終了する。また、S808にて被写体の検出位置が画面上の所定の探索終了領域内でないと判定された場合には、S806に戻り、S806からS808の判定処理を継続する。   Next, in S806, it is determined whether or not the current focal length has reached the search end focal length. When the current focal length reaches the search end focal length, the process proceeds to S809, and after the zoom-in operation is stopped, the subject search processing is ended. If it is determined in S806 that the current focal length has not reached the search end focal length, the process proceeds to S807. S807 is a process for determining whether or not a subject has been detected by the subject detection unit 123. If it is determined in S807 that the subject has been detected, the process proceeds to S808. If it is not determined that the subject has been detected, the process returns to S806. In S808, it is determined whether or not the position where the subject is detected is within a predetermined search end area on the screen. The predetermined search end region is determined by a threshold value (position determination reference value) set in advance according to the subject. As a result of the determination, if the subject detection position detected in S807 is within a predetermined search end area on the screen, the process proceeds to S809, the zoom-in operation is stopped, and the subject search process is ended. If it is determined in S808 that the detection position of the subject is not within the predetermined search end area on the screen, the process returns to S806, and the determination processing from S806 to S808 is continued.

ここで、図9を参照して、S808で説明した所定の探索終了領域について説明する。特定の被写体(人物や物体)の撮影にて、撮影対象とする被写体は画面の中央付近に配置される場合が多い。また、画面周辺で撮影対象としない被写体を検出して被写体探索処理を終了した場合、撮影対象とする被写体を検出する前に被写体探索処理が終了する可能性がある。この場合、撮影者の意図通りのオートズーム機能を実行できない。そこで、本実施形態では、画面中央付近の領域内で被写体が検出された場合にのみ、被写体探索処理を終了するように、判定用領域としての探索終了領域が設定される。図9(A)は、被写体が物体(飛行機)である場合に設定される探索終了領域900aを例示する。物体の場合、画面の上下左右のいずれの方向に対しても、画面中央から所定の割合、例えば70%の範囲が被写体の探索終了領域として設定される。一方、図9(B)は、被写体が人物である場合に設定される探索終了領域900bを例示する。人物の場合、画面上部の領域については画面中央から100%の範囲を含み、それ以外の方向(左右方向、下方)では画面中央から所定の割合、例えば70%の範囲を含むように、探索終了領域が設定される。被写体が人物である場合、画面上部にも撮影対象である被写体の顔追尾枠902が配置される可能性がある。そのため、画面上部で被写体を検出した場合でも、被写体探索処理が終了するように探索終了領域の設定が行われる。   Here, the predetermined search end region described in S808 will be described with reference to FIG. When photographing a specific subject (person or object), the subject to be photographed is often arranged near the center of the screen. Further, when a subject not to be photographed is detected around the screen and the subject search process is terminated, the subject search process may be terminated before the subject to be photographed is detected. In this case, the auto zoom function as intended by the photographer cannot be executed. Therefore, in the present embodiment, the search end region is set as the determination region so that the subject search process is ended only when the subject is detected in the region near the center of the screen. FIG. 9A illustrates a search end area 900a that is set when the subject is an object (airplane). In the case of an object, a predetermined ratio, for example, a range of 70% from the center of the screen is set as the subject search end region in any of the top, bottom, left and right directions of the screen. On the other hand, FIG. 9B illustrates the search end area 900b set when the subject is a person. In the case of a person, the search ends so that the area at the top of the screen includes a range of 100% from the center of the screen and the other direction (left and right direction, downward) includes a predetermined ratio from the center of the screen, for example, a range of 70%. An area is set. When the subject is a person, there is a possibility that the face tracking frame 902 of the subject to be photographed is also arranged at the top of the screen. Therefore, even when a subject is detected at the top of the screen, the search end area is set so that the subject search process is completed.

次に図10を参照して、図7にS702のステップで示す被写体指定処理について説明する。図10(A)は、操作部117を構成するタッチパネルを用いてユーザが所望の被写体を指定する処理例を示すフローチャートである。この例では、ユーザが表示部109に表示された被写体像をタッチして指定する操作を行うものとする。S1000でAZ制御部122は、タッチパネルが押下されたか否かを判定する。タッチパネルが押下された場合、S1001に進み、タッチパネルが押下されない場合にはS1000の判定処理が繰り返される。   Next, with reference to FIG. 10, the subject designation process shown in step S702 in FIG. 7 will be described. FIG. 10A is a flowchart illustrating an example of processing in which a user specifies a desired subject using the touch panel constituting the operation unit 117. In this example, it is assumed that the user performs an operation of specifying by touching the subject image displayed on the display unit 109. In S1000, the AZ control unit 122 determines whether the touch panel has been pressed. When the touch panel is pressed, the process proceeds to S1001, and when the touch panel is not pressed, the determination process of S1000 is repeated.

S1001でAZ制御部122は、ユーザがタッチした位置(タッチ位置)の情報を取得する。次のS1002でAZ制御部122は、タッチ位置を被写体検出部123に通知し、被写体検出部123はタッチ位置付近で顔検出を行う。S1002でタッチ位置付近に顔が検出された場合、主被写体は人物であると判定されて、S1003に進む。また、S1002にてタッチ位置付近に顔が検出されなかった場合、主被写体は人物以外の物体であると判定されてS1004に進む。   In S1001, the AZ control unit 122 acquires information on a position touched by the user (touch position). In next step S1002, the AZ control unit 122 notifies the subject detection unit 123 of the touch position, and the subject detection unit 123 performs face detection near the touch position. If a face is detected in the vicinity of the touch position in S1002, it is determined that the main subject is a person, and the process proceeds to S1003. If no face is detected in the vicinity of the touch position in S1002, it is determined that the main subject is an object other than a person, and the process proceeds to S1004.

S1003にてAZ制御部122は、自動追尾の対象である人物の顔情報をメモリ118に記憶させる制御を行う。具体的な顔情報としては、被写体指定時の顔のサイズと顔の検出位置、顔の向き等の情報がある。また、顔認証機能を有するカメラにおいては、認証ID等の識別情報もメモリ118に記憶される。S1004でAZ制御部122は、タッチ位置付近の特徴色を自動追尾対象の色情報としてメモリ118に記憶させる制御を行う。具体的な色情報としては、被写体指定時の特徴色とその輝度、色差の値や同一色領域のサイズ、同一色領域の重心位置等の情報がある。以下の説明では顔情報及び色情報を総称して、被写体情報(被写体サイズ、被写体検出位置等を含む)という。   In S1003, the AZ control unit 122 performs control to store the face information of the person who is the target of automatic tracking in the memory 118. Specific face information includes information such as the face size, face detection position, and face orientation when the subject is designated. In addition, in a camera having a face authentication function, identification information such as an authentication ID is also stored in the memory 118. In step S <b> 1004, the AZ control unit 122 performs control to store the characteristic color in the vicinity of the touch position in the memory 118 as color information for the automatic tracking target. Specific color information includes information such as the characteristic color at the time of subject designation and its luminance, the value of the color difference, the size of the same color area, and the barycentric position of the same color area. In the following description, face information and color information are collectively referred to as subject information (including subject size, subject detection position, etc.).

S1003またはS1004にて被写体情報がメモリ118に記憶された後、S1005に進み、被写体追尾枠が表示される。S1005でAZ制御部122は、被写体検出位置を中心にて、被写体サイズに対応した大きさの被写体追尾枠(モノ追尾枠または顔追尾枠)を表示部109に表示させる制御を行う。その後、被写体指定処理が終了する。
このようにシステム制御部114にて、被写体検出部123は、表示部109において撮影者により指定された位置、または指定された位置の近傍で被写体を検出する。そしてAZ制御部122は、被写体追尾枠を表示部109に表示させる。図10(A)の処理例によれば、撮影者が追尾したい被写体を、直感的な方法で簡単に指定可能となる。ただし、被写体の指定方法はこの方法に限定されない。図10(B)を参照して別の方法を説明する。
After the subject information is stored in the memory 118 in S1003 or S1004, the process proceeds to S1005 and a subject tracking frame is displayed. In step S1005, the AZ control unit 122 performs control for causing the display unit 109 to display a subject tracking frame (mono tracking frame or face tracking frame) having a size corresponding to the subject size around the subject detection position. Thereafter, the subject designation process ends.
As described above, in the system control unit 114, the subject detection unit 123 detects the subject at the position designated by the photographer on the display unit 109 or in the vicinity of the designated position. The AZ control unit 122 displays the subject tracking frame on the display unit 109. According to the processing example in FIG. 10A, the subject that the photographer wants to track can be easily specified by an intuitive method. However, the method for specifying the subject is not limited to this method. Another method will be described with reference to FIG.

図10(B)は、操作部117を構成する操作部材として、オートズーム操作スイッチとは別のスイッチ(被写体指定用スイッチ)を用いて、ユーザが被写体を指定する場合の処理例を示すフローチャートである。まずS1006にてAZ制御部122は、表示部109の画面中央付近に被写体指定の目安となる枠を表示する。撮影者は、この枠を目安として追尾したい被写体の画像を画面中央付近に収めるようにカメラの向きを調整する。次のS1007でAZ制御部122は、被写体指定用スイッチが押下されたか否かを判定する。被写体指定用スイッチが押下された場合、S1008に進み、当該スイッチが押下されない場合には待ち状態でS1007の判定処理が繰り返される。   FIG. 10B is a flowchart showing a processing example when the user designates a subject using a switch (subject designation switch) different from the auto zoom operation switch as an operation member constituting the operation unit 117. is there. First, in step S <b> 1006, the AZ control unit 122 displays a frame serving as a guide for specifying a subject near the center of the screen of the display unit 109. The photographer adjusts the direction of the camera so that the image of the subject to be tracked is placed near the center of the screen using this frame as a guide. In next step S1007, the AZ control unit 122 determines whether or not the subject specifying switch has been pressed. If the subject designation switch is pressed, the process proceeds to S1008. If the switch is not pressed, the determination process of S1007 is repeated in a waiting state.

S1008で被写体検出部123は、画面中央付近で顔検出を行う。画面中央付近に顔が検出した場合、主被写体は人物であると判定され、S1009に進む。一方、画面中央付近に顔が検出されなかった場合、主被写体は人物以外の物体であると判定され、S1010に進む。S1009では図10(A)のS1003と同様の処理が行われ、またS1010では図10(A)のS1004と同様の処理が行われるので、それらの説明を省略する。S1009またはS1010にて被写体情報がメモリ118に記憶された後、S1011に進み、被写体追尾枠(モノ追尾枠または顔追尾枠)が表示され、被写体指定処理は終了となる。   In step S1008, the subject detection unit 123 performs face detection near the center of the screen. If a face is detected near the center of the screen, the main subject is determined to be a person, and the process proceeds to S1009. On the other hand, if no face is detected near the center of the screen, the main subject is determined to be an object other than a person, and the process proceeds to S1010. In S1009, the same processing as S1003 in FIG. 10A is performed, and in S1010, the same processing as S1004 in FIG. 10A is performed. After the subject information is stored in the memory 118 in S1009 or S1010, the process proceeds to S1011 where the subject tracking frame (mono tracking frame or face tracking frame) is displayed, and the subject designation process is terminated.

このように図10(B)の処理例では、被写体検出部123が表示部109の画面中央位置または画面中央位置の近傍で被写体を検出する。そしてAZ制御部122は、被写体の位置を示す被写体追尾枠を表示部109に表示させる。タッチパネル等の操作部材を搭載しないカメラにおいても、ユーザは被写体を簡単に指定可能となる。   10B, the subject detection unit 123 detects the subject at the screen center position of the display unit 109 or in the vicinity of the screen center position. Then, the AZ control unit 122 causes the display unit 109 to display a subject tracking frame indicating the position of the subject. Even in a camera not equipped with an operation member such as a touch panel, the user can easily specify a subject.

図11は、操作部117を構成するオートズーム操作スイッチが押下された時点で検出された顔の中から、追尾する被写体を自動的に選択する処理例を示すフローチャートである。まずS1100で被写体検出部123は、画面全体で顔検出を行い、人物の顔が検出されたか否かを判定する。画面全体で一人でも顔が検出された場合、主被写体は人物であると判定され、S1101に進む。また、画面内にひとつも顔が検出されない場合にはS1105に移行する。   FIG. 11 is a flowchart illustrating an example of processing for automatically selecting a subject to be tracked from faces detected when an auto zoom operation switch constituting the operation unit 117 is pressed. First, in step S1100, the subject detection unit 123 performs face detection on the entire screen and determines whether a human face has been detected. If even one person's face is detected on the entire screen, the main subject is determined to be a person, and the process proceeds to S1101. If no face is detected in the screen, the process proceeds to S1105.

S1101で被写体検出部123は、検出した顔の人物が一人の場合、その顔を主顔として選択する。被写体検出部123は、検出した顔が複数の場合、その顔の中から追尾する被写体とする主顔を選択する。主顔選択の判定基準として、例えば、顔検出位置がより画面中央付近に位置する顔を優先して選択する方法がある。また、同程度の位置に複数の顔がある場合、サイズのより大きい顔を主顔として選択する方法がある。また、顔認証機能を有するカメラの場合には、認証登録されている顔がある場合、その顔を優先して主顔とする方法がある。   In step S1101, the subject detection unit 123 selects the face as the main face when there is only one detected face person. When there are a plurality of detected faces, the subject detection unit 123 selects a main face as a subject to be tracked from the faces. As a determination criterion for main face selection, for example, there is a method of preferentially selecting a face whose face detection position is located near the center of the screen. In addition, when there are a plurality of faces at the same position, there is a method of selecting a larger face as the main face. In the case of a camera having a face authentication function, if there is a face registered for authentication, there is a method in which the face is given priority as a main face.

S1101からS1102に進み、AZ制御部122は、選択された主顔の顔情報をメモリ118に記憶した後、S1103に進んで顔追尾枠を画面上に表示させる。次のS1104において、顔の変更判定が行われる。つまり、複数の顔が検出された場合に自動で選択された主顔が撮影者の意図する顔であるとは限らない。そのために、撮影者が主顔を変更することが可能である。このとき、撮影者が操作部117のスイッチ(オートズーム操作スイッチ等)を押下して所望の顔を指定すると、顔追尾枠が検出された顔の中から主顔として選択されなかった別の顔に主顔を変更する処理が行われる。S1104にて主顔が変更された場合、再度、S1102に戻って、メモリ118に記憶すべき顔情報が更新される。また、S1103にて顔追尾枠が、新たに選択された主顔のサイズ及び検出位置に変更される。   Proceeding from S1101 to S1102, the AZ control unit 122 stores the face information of the selected main face in the memory 118, and then proceeds to S1103 to display a face tracking frame on the screen. In next step S1104, face change determination is performed. That is, when a plurality of faces are detected, the main face automatically selected is not necessarily the face intended by the photographer. Therefore, the photographer can change the main face. At this time, when the photographer presses a switch (such as an auto zoom operation switch) on the operation unit 117 to designate a desired face, another face that is not selected as the main face from the faces in which the face tracking frame is detected. A process of changing the main face is performed. When the main face is changed in S1104, the process returns to S1102 again, and the face information to be stored in the memory 118 is updated. In S1103, the face tracking frame is changed to the size and detection position of the newly selected main face.

一方、S1100からS1105に移行した場合、主被写体は人物以外の物体であると判定され、AZ制御部122は、画面中央付近の特徴色を自動追尾対象の色情報として、メモリ118に記憶する制御を行う。次のS1106ではモノ追尾枠が画面上に表示された後、被写体指定処理が終了する。図11のS1102、S1105、S1103(S1106)における基本的な処理は、図10(A)のS1003、S1004、S1005の場合とそれぞれ同様である。   On the other hand, when the process proceeds from S1100 to S1105, it is determined that the main subject is an object other than a person, and the AZ control unit 122 performs control to store the feature color near the center of the screen in the memory 118 as color information of the automatic tracking target. I do. In the next step S1106, after the mono tracking frame is displayed on the screen, the subject designation process ends. Basic processes in S1102, S1105, and S1103 (S1106) in FIG. 11 are the same as those in S1003, S1004, and S1005 in FIG.

このように図11の処理例では、システム制御部114にて被写体検出部123が表示部109の画面全体において顔検出を行う。AZ制御部122は、複数の顔が検出された場合、複数の顔の中から被写体として第1の顔の位置を示す被写体追尾枠を表示部109に表示させる制御を行う。またAZ制御部122は、被写体として第1の顔が第2の顔に変更された場合、第2の顔の位置を示す被写体追尾枠を表示部109に表示させる制御を行う。撮影者は、より少ない操作回数で所望の被写体を簡単に指定できる。   As described above, in the processing example of FIG. 11, the subject detection unit 123 performs face detection on the entire screen of the display unit 109 in the system control unit 114. When a plurality of faces are detected, the AZ control unit 122 performs control for causing the display unit 109 to display a subject tracking frame indicating the position of the first face as a subject from among the plurality of faces. In addition, when the first face is changed to the second face as the subject, the AZ control unit 122 performs control to display the subject tracking frame indicating the position of the second face on the display unit 109. The photographer can easily specify a desired subject with fewer operations.

被写体指定処理については、操作部117を構成するタッチパネルと被写体指定用スイッチの両方があるカメラの場合には、図10(A)の方法と図10(B)の方法との両方を同時に適用してもよい。また、図7に示すS706での被写体変更の判定がなされた後では、図10(A)または図10(B)の方法で被写体を指定し、S701の被写体探索処理の後では、図11の方法で被写体を指定することもできる。処理の流れに応じて適用する被写体指定処理を変更してもよい。被写体指定処理(図7のS702)が終了すると、図7のS703に進み、追尾する被写体の大きさを基準サイズとして設定する処理が実行される。   For the subject designation process, in the case of a camera having both the touch panel constituting the operation unit 117 and the subject designation switch, both the method of FIG. 10A and the method of FIG. 10B are applied simultaneously. May be. Further, after the subject change determination in S706 shown in FIG. 7 is made, the subject is designated by the method of FIG. 10A or FIG. 10B, and after the subject search processing of S701, FIG. The subject can also be specified by the method. The subject designation process to be applied may be changed according to the process flow. When the subject designation process (S702 in FIG. 7) is completed, the process proceeds to S703 in FIG. 7, and a process for setting the size of the subject to be tracked as a reference size is executed.

図12から図19を参照して、図7に示すS703の基準サイズ設定処理について説明する。図12は被写体が人物である場合の基準サイズの設定処理例を示すフローチャートである。まずS1200でAZ制御部122は、メモリ118に記憶されている構図設定が上述した「マニュアル」であるか否かを判定する。構図設定が「マニュアル」である場合にはS1201に進み、「マニュアル」以外である場合にはS1203に進む。   With reference to FIGS. 12 to 19, the reference size setting process in S <b> 703 illustrated in FIG. 7 will be described. FIG. 12 is a flowchart illustrating an example of a reference size setting process when the subject is a person. First, in S1200, the AZ control unit 122 determines whether or not the composition setting stored in the memory 118 is the above-described “manual”. If the composition setting is “manual”, the process advances to step S1201. If the composition setting is other than “manual”, the process advances to step S1203.

S1201にてAZ制御部122は、被写体検出の判定を行う。AZ制御部122は、被写体検出部123にて、被写体が人物であるときには顔が検出されるか否か、また被写体が物体であるときには同一の特徴色が検出されるか否かを判定する。被写体が検出されるまでS1201の判定処理が繰り返され、被写体が検出された場合にS1202に進む。S1202でAZ制御部122は、検出された被写体像の大きさを基準サイズとして設定し、メモリ118に記憶して処理を終了する。これによって、構図設定が「マニュアル」である場合には、基準サイズ設定処理を開始したときに最初に検出した被写体像の大きさ(検出サイズ)が、基準サイズとしてメモリ118に記憶される。   In step S1201, the AZ control unit 122 determines subject detection. The AZ control unit 122 determines whether or not the subject detection unit 123 detects a face when the subject is a person and whether or not the same characteristic color is detected when the subject is an object. The determination process in S1201 is repeated until a subject is detected, and if a subject is detected, the process proceeds to S1202. In S1202, the AZ control unit 122 sets the size of the detected subject image as a reference size, stores it in the memory 118, and ends the process. Accordingly, when the composition setting is “manual”, the size (detected size) of the subject image detected first when the reference size setting process is started is stored in the memory 118 as the reference size.

一方、S1203でAZ制御部122は、姿勢検出部124によって判定したカメラの姿勢情報に基づいて画面サイズを算出する。この画面サイズは、後述のS1211、S1704、S1705、S1806、S1807にて基準サイズの算出に用いる。図13を参照して、画面サイズの算出処理について説明する。本実施形態では、静止画の画面サイズを長辺×短辺=640×480とし、動画の画面サイズを長辺×短辺=640×360とした場合を例示するが、画面サイズはこれに限定されるものではない。   On the other hand, in S <b> 1203, the AZ control unit 122 calculates the screen size based on the camera posture information determined by the posture detection unit 124. This screen size is used to calculate the reference size in S1211, S1704, S1705, S1806, and S1807, which will be described later. The screen size calculation process will be described with reference to FIG. In this embodiment, the case where the screen size of the still image is long side × short side = 640 × 480 and the screen size of the moving image is long side × short side = 640 × 360 is exemplified, but the screen size is limited to this. Is not to be done.

S1300では、撮影者がカメラを正位置に構えているか、または縦位置に構えているかについて、姿勢検出部124により判定される。撮影者がカメラを正位置に構えていると判定された場合、S1301に進むが、縦位置に構えている場合にはS1306に移行する。S1301では、長辺サイズである640を水平方向の画面サイズに設定する処理が実行される。次のS1302では現在の設定モードが、静止画と動画とを同時に撮影できるモード(静止画/動画同時撮影モード)であるか否かの判定処理が行われる。静止画/動画同時撮影モードとは、動画の撮影中に撮影者が操作部117のレリーズスイッチを押下することで静止画撮影も同時に行えるか、または静止画撮影直前のフレーミング操作の様子を動画として自動的に記録可能なモードのことである。S1302で静止画/動画同時撮影モードであると判定された場合、動画の短辺サイズと静止画の短辺サイズとを比較し、より小さいサイズを垂直画面サイズとして設定する処理が実行される。これは、小さい画面サイズに合わせてオートズームを行うことで、静止画と動画のいずれの画角でも被写体が画面からフレームアウトすることを防止するためである。したがって、本実施形態では静止画/動画同時撮影モードの場合にS1304に進み、動画の短辺サイズである360が垂直画面サイズとして設定される。その後、画面サイズ算出処理が終了する。   In S1300, the posture detection unit 124 determines whether the photographer holds the camera at the normal position or the vertical position. If it is determined that the photographer holds the camera in the normal position, the process proceeds to S1301. If the photographer holds the camera in the vertical position, the process proceeds to S1306. In step S1301, processing for setting the long side size 640 to the horizontal screen size is executed. In next step S1302, it is determined whether or not the current setting mode is a mode (still image / moving image simultaneous shooting mode) in which a still image and a moving image can be simultaneously captured. The still image / video simultaneous shooting mode is a mode in which a photographer can simultaneously take a still image by pressing the release switch of the operation unit 117 during movie shooting, or a framing operation immediately before shooting a still image as a movie. It is a mode that can be recorded automatically. If it is determined in S1302 that the still image / moving image simultaneous shooting mode is set, the processing compares the short side size of the moving image with the short side size of the still image and sets the smaller size as the vertical screen size. This is to prevent the subject from being framed out of the screen at any angle of view of still images and moving images by performing auto-zoom in accordance with the small screen size. Therefore, in this embodiment, in the still image / moving image simultaneous shooting mode, the process proceeds to S1304, and 360, which is the short side size of the moving image, is set as the vertical screen size. Thereafter, the screen size calculation process ends.

S1302で静止画/動画同時撮影モードでないと判定された場合には、S1303へ進む。S1303では、動画記録中であるか、または静止画フレーミング中であるかが判定される。動画記録中であると判定された場合、S1304に進むが、動画記録中でないと判定された場合にはS1305に移行する。S1305では静止画の短辺サイズである480が垂直画面サイズとして設定される。   If it is determined in S1302 that the mode is not the still image / moving image simultaneous shooting mode, the process proceeds to S1303. In step S1303, it is determined whether moving image recording is in progress or still image framing is in progress. If it is determined that the moving image is being recorded, the process proceeds to S1304. If it is determined that the moving image is not being recorded, the process proceeds to S1305. In S1305, the short side size 480 of the still image is set as the vertical screen size.

S1300で撮影者が縦位置に構えていると判定された場合、S1306からS1310の処理が実行される。S1306からS1310の処理はそれぞれ、S1301からS1305の処理に対して、水平画面サイズと垂直画面サイズの設定を逆にした処理である。つまり、前記の説明にて「水平」と「垂直」を入れ替えることで読み替えればよいので詳細な説明を省略する。なお、本実施形態では静止画の画面サイズが4:3であって(図15(A)及び(B)参照)、動画の画面サイズが16:9である例(図15(C)参照)を示すが、アスペクト比の設定に応じて画面サイズを変更してもよい。それによってアスペクト比に依らず、画面に対して人物の画像が占める割合を一定とすることが可能である。また、静止画/動画同時撮影モードとして静止画と動画で画面サイズが異なる例を示したが、異なる画面サイズの複数の静止画や動画を同時に撮影する形態であってもよい。   If it is determined in S1300 that the photographer is in the vertical position, the processing from S1306 to S1310 is executed. The processes of S1306 to S1310 are processes in which the settings of the horizontal screen size and the vertical screen size are reversed with respect to the processes of S1301 to S1305. That is, in the above description, “horizontal” and “vertical” may be interchanged so that the detailed description is omitted. In this embodiment, the still image screen size is 4: 3 (see FIGS. 15A and 15B), and the moving image screen size is 16: 9 (see FIG. 15C). The screen size may be changed according to the aspect ratio setting. Accordingly, it is possible to make the ratio of the person image to the screen constant regardless of the aspect ratio. Further, as an example of the still image / moving image simultaneous shooting mode, an example in which the screen size is different between the still image and the moving image has been shown.

図12のS1203にて画面サイズが決定されると、S1204に処理を進める。メモリ118に記憶されている構図設定が「顔」、「上半身」、「全身」のいずれかである場合、S1204からS1209にてAZ制御部122は、構図設定に応じて画面に占める顔画像のサイズの比率(顔比率という)を決定する。本実施形態の顔比率は、画面に対する顔追尾枠の垂直方向における長さの比率を示すが、水平方向における長さの比率や、面積比などで示してもよい。具体的には例えば、S1204で構図設定が「顔」であるか否かが判定され、「顔」の構図の場合(S1204でyes)、顔比率が27%に決定される(S1207)。また、構図設定が「顔」でない場合にはS1205に進み、構図設定が「上半身」であるか否かが判定され、「上半身」の構図の場合(S1205でyes)、顔比率が16%に決定される(S1208)。構図設定が「上半身」でない場合にはS1206に進み、構図設定が「全身」であるか否かが判定され、「全身」の構図の場合(S1206でyes)、顔比率が7%と決定される(S1209)。S1204からS1209の各ステップにより顔比率が決定された後、S1210に進む。   When the screen size is determined in S1203 of FIG. 12, the process proceeds to S1204. When the composition setting stored in the memory 118 is any one of “face”, “upper body”, and “whole body”, in steps S1204 to S1209, the AZ control unit 122 determines the face image occupied on the screen according to the composition setting. Determine the size ratio (called face ratio). The face ratio of the present embodiment indicates the ratio of the length of the face tracking frame in the vertical direction relative to the screen, but may be indicated by the ratio of the length in the horizontal direction, the area ratio, or the like. Specifically, for example, it is determined whether or not the composition setting is “face” in S1204. If the composition setting is “face” (yes in S1204), the face ratio is determined to be 27% (S1207). If the composition setting is not “face”, the process advances to step S1205 to determine whether the composition setting is “upper body”. If the composition setting is “upper body” (yes in step S1205), the face ratio is 16%. It is determined (S1208). If the composition setting is not “upper body”, the process proceeds to S1206, and it is determined whether or not the composition setting is “whole body”. If the composition setting is “whole body” (yes in S1206), the face ratio is determined to be 7%. (S1209). After the face ratio is determined in steps S1204 to S1209, the process proceeds to S1210.

S1210でAZ制御部122は、S1204からS1209で決定した顔比率と、S1203で算出した垂直画面サイズとを乗算することで基準サイズを算出する。これは、立位姿勢の被写体(人物)を前提として、垂直方向の画面サイズに対する顔比率から基準サイズを算出する方法である。被写体検出部123により顔の方向が判定できる場合には、画面上での顔の上下方向に基づいて画面サイズの方向を決定してもよい。さらに、算出した基準サイズをメモリ118に記憶する処理が実行された後、基準サイズ設定の処理を終了する。これによって、構図設定が「顔」、「上半身」、「全身」のいずれかである場合、画面サイズに対して構図設定に応じた所定の顔比率となるサイズが基準サイズとして設定される。   In S1210, the AZ control unit 122 calculates the reference size by multiplying the face ratio determined in S1204 to S1209 by the vertical screen size calculated in S1203. This is a method of calculating the reference size from the face ratio with respect to the screen size in the vertical direction on the premise of a subject (person) in a standing posture. When the subject detection unit 123 can determine the face direction, the screen size direction may be determined based on the vertical direction of the face on the screen. Further, after the process of storing the calculated reference size in the memory 118 is executed, the reference size setting process is terminated. Accordingly, when the composition setting is any one of “face”, “upper body”, and “whole body”, a size that is a predetermined face ratio corresponding to the composition setting with respect to the screen size is set as the reference size.

S1206にて構図設定が「全身」でない場合、すなわち、構図設定が「オート」であると判定された場合には、S1211に進み、AZ制御部122は、撮影状態や被写体の数、被写体の動き等に応じて適切な構図を自動で判定する。図14を参照して、S1211の構図設定「オート」での自動構図判定及び構図選択処理について説明する。構図設定「オート」は、撮影シーンを判別して適切な構図をカメラが自動で選択する(自動構図選択)ことによって、構図合わせをさらに簡単に行えるモードである。   If the composition setting is not “whole body” in S1206, that is, if it is determined that the composition setting is “auto”, the process proceeds to S1211, and the AZ control unit 122 moves the shooting state, the number of subjects, and the movement of the subject. An appropriate composition is automatically determined according to the above. With reference to FIG. 14, the automatic composition determination and composition selection processing in the composition setting “auto” in S1211 will be described. The composition setting “Auto” is a mode in which the composition can be further easily adjusted by discriminating a shooting scene and automatically selecting an appropriate composition (automatic composition selection).

図14は、本実施形態にて自動で選択される構図の遷移図を示す。本実施形態においては、上半身1400、全身1401、顔1402、複数人1403、マニュアル1404という5つの構図の中から、撮影シーンに応じて適切な構図を選択する構図選択処理が行われる。構図合わせの操作において、静止画撮影時には、撮影前に瞬時に被写体像を適切な大きさとする必要がある。一方、動画撮影時には、動いている被写体を追い続けたり、静止した被写体に寄ったりする等、撮影している間は常に被写体像を適切な大きさとする必要がある。また、動画撮影時には構図の変更によるズームイン動作時やズームアウト動作時の画像データも記録されるため、適切なタイミングで構図を変更することで効果的な映像を撮影できる。このように、静止画と動画とではそれぞれに適切な構図が異なる。そこで、静止画フレーミング中1405と、動画記録中1406とで、撮影状態によって選択する構図を変更する処理が実行される。すなわち、本実施形態では第1の動作状態として静止画の撮影準備状態を例示し、第2の動作状態として動画の記録状態を例示する。静止画フレーミング中1405での第1の構図群に属する選択候補の構図として、上半身1400、全身1401、複数人1403からいずれかの構図が選択される。動画記録中1406での第2の構図群に属する選択候補の構図としては、上半身1400、全身1401、顔1402からいずれかの構図が選択される。つまり、上半身1400、全身1401の各構図が第1の構図群と第2の構図群とで共通し、複数人1403の構図は第1の構図群にのみ包含され、顔1402の構図は第2の構図群にのみ包含される。なお、撮像装置の仕様等に応じて、3以上の動作状態と、それぞれに対応する複数の構図群(各動作状態にて選択可能な構図を含む)を設定可能である。   FIG. 14 shows a transition diagram of the composition automatically selected in the present embodiment. In the present embodiment, composition selection processing is performed in which an appropriate composition is selected from the five compositions of the upper body 1400, the whole body 1401, the face 1402, the plurality of people 1403, and the manual 1404 according to the shooting scene. In the composition adjustment operation, when shooting a still image, it is necessary to instantaneously set the subject image to an appropriate size before shooting. On the other hand, at the time of shooting a moving image, it is necessary to always set the subject image to an appropriate size while shooting, such as following a moving subject or approaching a stationary subject. In addition, since the image data at the time of zoom-in operation or zoom-out operation by changing the composition is recorded at the time of moving image shooting, an effective video can be taken by changing the composition at an appropriate timing. Thus, the appropriate composition differs between the still image and the moving image. Therefore, processing for changing the composition to be selected depending on the shooting state is executed during still image framing 1405 and during moving image recording 1406. That is, in the present embodiment, a still image shooting preparation state is illustrated as the first operation state, and a moving image recording state is illustrated as the second operation state. As a composition of a selection candidate belonging to the first composition group in the still image framing 1405, any composition is selected from the upper body 1400, the whole body 1401, and a plurality of people 1403. As the composition of the selection candidate belonging to the second composition group in the moving image recording 1406, any one of the upper body 1400, the whole body 1401, and the face 1402 is selected. That is, the composition of the upper body 1400 and the whole body 1401 is common to the first composition group and the second composition group, the composition of the plurality of persons 1403 is included only in the first composition group, and the composition of the face 1402 is the second composition group. It is included only in the composition group. Note that three or more operation states and a plurality of composition groups (including compositions that can be selected in each operation state) can be set in accordance with the specifications of the imaging apparatus.

ここで、撮影シーンの判定条件と、各構図の遷移について説明する。構図設定「オート」の自動構図判定処理S1211が開始すると、初期状態の構図として上半身1400が設定される。上半身1400の構図は、静止画フレーミング中1405もしくは動画記録中1406に、静止している単数の被写体を撮影するシーンであると判定された場合に選択される構図である。このようなシーンでは、被写体の上半身を画面内に収める構図とすることで適度に被写体に寄った構図とすることができる。   Here, the determination conditions of the shooting scene and the transition of each composition will be described. When the automatic composition determination process S1211 of the composition setting “auto” starts, the upper body 1400 is set as the composition in the initial state. The composition of the upper body 1400 is a composition that is selected when it is determined during the still image framing 1405 or the moving image recording 1406 that the scene is a single object that is still. In such a scene, by composing the upper body of the subject within the screen, it is possible to achieve a composition that is reasonably close to the subject.

上半身1400の構図で、撮影対象の被写体の動きが検出された場合、または、カメラから被写体までの距離が所定距離D1(第1閾値)よりも大きいと判定された場合には、構図が全身1401に変更される。全身1401の構図は、静止画フレーミング中1405もしくは動画記録中1406に、動いている被写体や遠くの被写体、すなわち、被写体が画面からフレームアウトしやすい被写体を撮影するシーンであると判定された場合に選択される構図である。このようなシーンでは、被写体の全身を収める構図で被写体を追うことによって、できるだけ画面から被写体がフレームアウトしないように設定される。さらに、全身1401の構図で、撮影対象の被写体が所定時間以上に静止したことが検出され、かつ、カメラから被写体までの距離が所定距離D2(第2閾値)よりも小さいと判定された場合には、構図を上半身1400に戻す処理が実行される。所定時間とは予め設定される判定用の基準時間である。   When the movement of the subject to be imaged is detected in the composition of the upper body 1400, or when it is determined that the distance from the camera to the subject is greater than the predetermined distance D1 (first threshold), the composition is the whole body 1401. Changed to When the composition of the whole body 1401 is determined to be a scene for shooting a moving subject or a distant subject, that is, a subject subject to being easily framed out of the screen, during still image framing 1405 or during moving image recording 1406. The composition to be selected. In such a scene, the subject is set so as not to be out of the frame as much as possible by following the subject with a composition that fits the whole body of the subject. Further, when the composition of the whole body 1401 detects that the subject to be photographed is stationary for a predetermined time or more and it is determined that the distance from the camera to the subject is smaller than the predetermined distance D2 (second threshold). The process of returning the composition to the upper body 1400 is executed. The predetermined time is a predetermined reference time for determination.

以下、被写体の動きや静止の判定方法について説明する。被写体検出部123が検出した被写体の位置やサイズの変化量、または、被写体を検出している状態で揺れ検出部125が検出した揺れ量のうち、少なくとも一つが所定量よりも大きい場合には、撮影対象の被写体が動いていると判定される。被写体検出部123が検出した被写体の位置やサイズの変化量、及び、被写体を検出している状態で揺れ検出部125が検出した揺れ量の全てが所定量よりも小さい状態が所定時間以上続いた場合に撮影対象の被写体が静止していると判定される。検出状態の継続時間については、計時用タイマで計測されるものとする。   Hereinafter, a method for determining the movement and stillness of a subject will be described. When at least one of the amount of change in the position and size of the subject detected by the subject detection unit 123 or the amount of shake detected by the shake detection unit 125 while detecting the subject is larger than a predetermined amount, It is determined that the subject to be photographed is moving. The amount of change in the position and size of the subject detected by the subject detection unit 123 and the amount of shake detected by the shake detection unit 125 while detecting the subject all continue to be smaller than a predetermined amount for a predetermined time or more. In this case, it is determined that the subject to be photographed is stationary. The duration of the detection state is measured by a timer for timekeeping.

さらに、カメラから被写体までの距離の算出方法について説明する。まず、基準とする焦点距離と、被写体サイズに対する被写体距離を予め計測しておき、メモリ118に計測データが記憶される。メモリ118に記憶された基準値に対して、「被写体距離=(基準被写体距離×焦点距離×基準被写体サイズ)/(基準焦点距離×検出サイズ)」という演算を行うことで被写体距離が算出される。例えば、基準値が基準被写体距離2m、基準焦点距離24mm、基準被写体サイズ20pix(ピクセル)である場合に、焦点距離120mmで検出サイズ40pixの被写体像を検出した場合を想定する。この場合、被写体距離は、(2m×120mm×20pix)/(24mm×40pix)=5mと算定される。   Further, a method for calculating the distance from the camera to the subject will be described. First, a reference focal length and a subject distance with respect to a subject size are measured in advance, and measurement data is stored in the memory 118. The subject distance is calculated by performing a calculation of “subject distance = (reference subject distance × focal length × reference subject size) / (reference focal length × detection size)” with respect to the reference value stored in the memory 118. . For example, it is assumed that a subject image having a detection size of 40 pix is detected at a focal length of 120 mm when the reference value is a reference subject distance of 2 m, a reference focal length of 24 mm, and a reference subject size of 20 pix (pixel). In this case, the subject distance is calculated as (2 m × 120 mm × 20 pix) / (24 mm × 40 pix) = 5 m.

次に画面内に複数人の被写体を検出した場合の構図について説明する。静止画フレーミング中1405の上半身1400または全身1401の構図で、画面内に複数人の被写体が検出された場合には、構図を複数人1403に変更する処理が行われる。このとき、検出された被写体の数がメモリ118に記憶される。複数人1403の構図は、静止画フレーミング中1405に、複数の全ての被写体を所定の画角に収める集合写真の撮影シーンであると判定された場合に選択される構図である。複数人1403の構図の状態では、検出された被写体の数が変化したか否かの判定処理が行われる。検出された被写体の数が増加した場合には、新しい被写体が画面内に入って来たことで、即座にメモリ118に記憶した被写体の数が更新されて、構図の変更が行われる。一方、検出された被写体の数が減少した場合には、例えば、いずれかの被写体が横を向いたときのように、一時的に検出できない状態となる可能性がある。そのため、即座に構図を変更したのでは、検出できなくなった被写体がフレームアウトしてしまう可能性がある。そこで、被写体の数が減少した場合には、その状態が所定時間以上に亘って継続したか否かが判定される。当該状態が所定時間以上継続した場合、メモリ118に記憶される被写体の数が更新され、構図が変更される。さらに、被写体が一人になった場合には、構図を上半身1400に戻す処理が実行される。   Next, a composition when a plurality of subjects are detected in the screen will be described. When a plurality of subjects are detected in the screen in the composition of the upper body 1400 or the whole body 1401 during the still image framing 1405, processing for changing the composition to the plurality of people 1403 is performed. At this time, the number of detected subjects is stored in the memory 118. The composition of the plurality of persons 1403 is a composition that is selected when it is determined that a group photo shooting scene in which all of a plurality of subjects fall within a predetermined angle of view during 1405 during still image framing. In the composition state of the plurality of people 1403, a determination process is performed as to whether or not the number of detected subjects has changed. When the number of detected subjects increases, a new subject has entered the screen, so the number of subjects stored in the memory 118 is immediately updated, and the composition is changed. On the other hand, when the number of detected subjects decreases, there is a possibility that a state in which the subject cannot be detected temporarily, for example, when any subject faces sideways, may occur. For this reason, if the composition is changed immediately, a subject that can no longer be detected may be out of frame. Therefore, when the number of subjects decreases, it is determined whether or not the state has continued for a predetermined time or more. When the state continues for a predetermined time or more, the number of subjects stored in the memory 118 is updated and the composition is changed. Further, when the subject is alone, a process of returning the composition to the upper body 1400 is executed.

動画記録中1406には、全ての被写体を画角に収める構図にすると、撮影対象以外の被写体が動き回っている場合に、その被写体に反応してズームの誤作動が発生することが懸念される。そこで、動画記録中1406に複数人の被写体が検出された場合でも、主被写体のみを撮影対象として、構図を上半身1400または全身1401のままに維持する処理が行われる。動画記録中1406での上半身1400の構図で、画面の中心付近にて顔が所定時間以上に亘って検出された場合には、構図を顔1402に変更する処理が行われる。顔1402の構図は、動画記録中1406に、撮影者が被写体の顔に注目しているシーンであると判定された場合に選択される構図である。このようなシーンでは、上半身よりもさらに顔に寄った構図とすることで、注目する被写体の顔をより大きなサイズで撮影できる。また、この構図変更によるズームイン動作中に、ズーム速度を通常の速度よりも、著しく低速もしくは高速に変更することで、さらに効果的な映像を撮影できる。さらに、顔1402の構図で、画面の周辺付近にて顔が所定時間以上に亘って検出された場合、または、撮影者がフレーミングを変更したと判定された場合には、構図を上半身1400に戻す処理が行われる。本実施形態では、画面の周辺領域を画像の特定領域として例示し、被写体検出部123の検出した被写体の顔画像の位置が周辺領域である状態の継続時間を計時用タイマが計測する。また、フレーミング変更の判定方法としては、被写体検出部123が被写体を検出していない状態であって、かつ揺れ検出部125の検出した揺れ量が所定量よりも大きい場合に、撮影者がフレーミングを変更したと判定される。   If the composition is such that all the subjects fall within the angle of view during moving image recording 1406, there is a concern that when a subject other than the subject is moving, a zoom malfunction may occur in response to the subject. Therefore, even when a plurality of subjects are detected during moving image recording 1406, processing is performed to keep the composition of the upper body 1400 or the whole body 1401 with only the main subject as the shooting target. In the composition of the upper body 1400 during moving image recording 1406, when a face is detected for a predetermined time or more near the center of the screen, processing for changing the composition to the face 1402 is performed. The composition of the face 1402 is a composition that is selected when it is determined during the moving image recording 1406 that the photographer is paying attention to the face of the subject. In such a scene, the composition of the face closer to the face than the upper body allows the face of the subject of interest to be photographed in a larger size. Further, during the zoom-in operation by this composition change, a more effective image can be taken by changing the zoom speed to a significantly lower speed or higher speed than the normal speed. Furthermore, when the face 1402 is detected in the vicinity of the screen for a predetermined time or more in the composition of the face 1402, or when it is determined that the photographer has changed the framing, the composition is returned to the upper body 1400. Processing is performed. In the present embodiment, the peripheral area of the screen is exemplified as the specific area of the image, and the timer for measuring the duration of the state where the position of the face image of the subject detected by the subject detection unit 123 is the peripheral area. Further, as a method for determining framing change, when the subject detection unit 123 has not detected a subject and the shaking amount detected by the shaking detection unit 125 is larger than a predetermined amount, the photographer performs framing. It is determined that it has changed.

静止画フレーミング中1405に撮影者は、人物の顔の向きや表情が所望の状態となるまで同じ構図でシャッタチャンスを待ち続ける場合がある。この場合、顔に寄った構図とすると撮影者の意図とは違う構図となる可能性がある。したがって、静止画フレーミング中1405の上半身1400の構図で、画面の中心付近にて顔が所定時間以上検出されたとしても、上半身1400の構図を維持する処理が実行される。   During still image framing 1405, the photographer may continue to wait for a photo opportunity with the same composition until the face orientation and facial expression of the person are in a desired state. In this case, a composition close to the face may result in a composition different from the photographer's intention. Therefore, even if a face is detected in the vicinity of the center of the screen for a predetermined time or more in the composition of the upper body 1400 during the still image framing 1405, processing for maintaining the composition of the upper body 1400 is executed.

次に、動画記録の開始/終了によって撮影状態を変更する場合の構図について説明する。上半身1400及び全身1401の各構図は、静止画フレーミング中1405や動画記録中1406のいずれの場合でも選択可能な構図である。したがって、それらの構図では撮影状態を変更しても元の構図が維持される。一方、複数人1403や顔1402の構図は、静止画フレーミング中1405や動画記録中1406のいずれかの場合にのみ選択される構図である。そこで、静止画フレーミング中1405に複数人1403の構図で動画記録が開始された場合や、動画記録中1406に顔1402の構図で動画記録が終了された場合に、共通の構図である上半身1400に変更することが考えられる。しかしながら、この場合、動画記録の開始や終了と共にズーム動作が開始することで、動画の始めにズーム動作による画像が記録されたり、静止画のフレーミングで撮影者が煩わしく感じたりすることが懸念される。そこで、そのような状態で撮影状態が変更された場合には、構図を一時的にマニュアル1404に変更する処理が実行される。マニュアル1404の構図は、構図変更後に最初に検出した主被写体像の大きさを基準サイズとする構図である。したがって、撮影状態を変更しただけで直ちにズーム動作が開始することがなく、撮影者に違和感を与えない。また、被写体が動き出した場合であっても、被写体像の大きさを維持することができる。さらに、マニュアル1404の構図で所定時間が経過した場合、構図を上半身1400に戻す処理が実行される。   Next, a composition in the case where the shooting state is changed by starting / ending moving image recording will be described. Each composition of the upper body 1400 and the whole body 1401 is a composition that can be selected in either case of the still image framing 1405 or the moving image recording 1406. Therefore, in those compositions, the original composition is maintained even if the shooting state is changed. On the other hand, the composition of the plurality of people 1403 and the face 1402 is selected only in any of the cases of the still image framing 1405 and the moving image recording 1406. Therefore, when the moving image recording is started with the composition of a plurality of people 1403 during the still image framing 1405, or when the moving image recording is ended with the composition of the face 1402 during the moving image recording 1406, the upper body 1400, which is a common composition, is displayed. It is possible to change. However, in this case, there is a concern that the zoom operation starts at the start and end of the moving image recording, so that an image by the zoom operation is recorded at the beginning of the moving image, or the photographer feels troublesome due to the framing of the still image. . Therefore, when the shooting state is changed in such a state, processing for temporarily changing the composition to the manual 1404 is executed. The composition of the manual 1404 is a composition in which the size of the main subject image detected first after the composition change is used as a reference size. Therefore, the zoom operation does not start immediately after changing the shooting state, and the photographer does not feel uncomfortable. Even when the subject starts to move, the size of the subject image can be maintained. Further, when a predetermined time elapses in the composition of the manual 1404, processing for returning the composition to the upper body 1400 is executed.

以上のように図12のS1211では、構図設定が「オート」である場合に、撮影状態や被写体の数、被写体の動き等に応じて適切な構図が自動で判定される。判定後の構図を示すデータはメモリ118に記憶され、S1212に進む。   As described above, in S <b> 1211 of FIG. 12, when the composition setting is “auto”, an appropriate composition is automatically determined according to the shooting state, the number of subjects, the movement of subjects, and the like. Data indicating the composition after the determination is stored in the memory 118, and the process proceeds to S1212.

S1212では、S1211にて判定された構図が直前の構図に対して変更されたか(図14で選択された構図が遷移したか、または、複数人1403の状態で被写体数が変化したか)否かが判定される。構図が変更されている場合には、S1213に進み、選択された構図がマニュアル1404の構図であるか否かが判定される。選択された構図がマニュアル1404の構図である場合には、S1201に進み、最初に検出された被写体像の大きさを基準サイズとしてメモリ118に記憶する処理が実行される。選択された構図がマニュアル1404の構図でない場合には、S1215に進み、構図設定「オート」における基準サイズが算出される。S1212で、構図が変更されていないと判定された場合には、S1214に進み、被写体像が画面内で移動したか否かについて判定される。画面内での被写体像の移動量の算出方法としては、S1215で基準サイズが設定された後、その基準サイズとなる画角までズーム動作を行った直後の顔追尾枠の中心位置がメモリ118に記憶される。メモリ118に記憶した位置から、検出された顔追尾枠の中心位置までの距離が移動量として算出される。また、所定の周期ごとに顔追尾枠の中心位置を加算して画面内での移動量を算出してもよい。算出された移動量が所定量以上となった場合に被写体が移動したと判定される。所定量としては、検出された顔追尾枠のサイズで正規化する(顔追尾枠のサイズの所定倍とする)ことで、画面内での被写体像の大きさに依らず実際の被写体の移動量を同程度とすることができる。S1214で、被写体が画面内で移動していると判定された場合にはS1215に進み、構図設定「オート」における基準サイズが算出される。また、S1214で被写体像が画面内で移動していないと判定された場合には、基準サイズを更新することなく、基準サイズの設定処理を終了する。   In S1212, whether the composition determined in S1211 has been changed from the previous composition (whether the composition selected in FIG. 14 has changed, or the number of subjects has changed in the state of multiple people 1403). Is determined. If the composition has been changed, the process advances to step S1213 to determine whether or not the selected composition is the composition of the manual 1404. If the selected composition is the composition of the manual 1404, the process proceeds to S1201, and a process of storing the size of the first detected subject image in the memory 118 as a reference size is executed. If the selected composition is not the composition of the manual 1404, the process proceeds to S1215, and the reference size in the composition setting “auto” is calculated. If it is determined in S1212 that the composition has not been changed, the process proceeds to S1214 to determine whether or not the subject image has moved within the screen. As a method of calculating the amount of movement of the subject image within the screen, the center position of the face tracking frame immediately after the zoom operation is performed up to the angle of view that becomes the reference size in the memory 118 after the reference size is set in S1215. Remembered. The distance from the position stored in the memory 118 to the center position of the detected face tracking frame is calculated as the movement amount. Alternatively, the amount of movement within the screen may be calculated by adding the center position of the face tracking frame at every predetermined period. When the calculated movement amount is equal to or greater than a predetermined amount, it is determined that the subject has moved. The predetermined amount is normalized by the size of the detected face tracking frame (set to a predetermined multiple of the size of the face tracking frame), so that the actual amount of movement of the subject regardless of the size of the subject image on the screen Can be comparable. If it is determined in S1214 that the subject is moving within the screen, the process proceeds to S1215, and a reference size in the composition setting “auto” is calculated. If it is determined in S1214 that the subject image has not moved within the screen, the reference size setting process is terminated without updating the reference size.

以下、図15から図19を参照して、構図設定「オート」における基準サイズの算出処理について説明する。構図設定が「顔」、「上半身」、「全身」のいずれかである場合には、図12のS1210において画面サイズに対して顔が一定の比率となるように、基準サイズが算出される。つまり画面上の被写体像の位置によらずに同じ基準サイズが算出される。そのため、被写体が画面の周辺にいる場合に被写体像が大きくなる(ズームインする)ように構図を変更すると、被写体がフレームアウトしてしまう可能性がある。この方法で基準サイズを算出する場合には、撮影者が被写体を画面の中央付近にフレーミングしている必要がある。したがって、被写体を画面中央からずらして背景と一緒に撮影する場合等には適していない。また、被写体が複数である場合には別の方法で基準サイズを算出する必要がある。そこで、構図設定が「オート」の場合には、S1211で判定された構図に基づいて被写体像の大きさを決定するとともに、検出された被写体の位置によらず被写体が画面内に収まるように基準サイズを算出する処理が行われる。   Hereinafter, with reference to FIGS. 15 to 19, the reference size calculation process in the composition setting “auto” will be described. When the composition setting is any one of “face”, “upper body”, and “whole body”, the reference size is calculated so that the face has a constant ratio to the screen size in S1210 of FIG. That is, the same reference size is calculated regardless of the position of the subject image on the screen. Therefore, if the composition is changed so that the subject image becomes larger (zoom in) when the subject is in the periphery of the screen, the subject may be out of frame. When the reference size is calculated by this method, the photographer needs to frame the subject near the center of the screen. Therefore, it is not suitable for a case where the subject is shifted from the center of the screen and taken together with the background. Further, when there are a plurality of subjects, it is necessary to calculate the reference size by another method. Therefore, when the composition setting is “auto”, the size of the subject image is determined based on the composition determined in step S1211, and the reference is set so that the subject is within the screen regardless of the position of the detected subject. A process of calculating the size is performed.

図15は、複数の被写体のうちで最も画面周辺にいる被写体の位置と、画面サイズとの関係を示す図である。図15(A)及び(B)は静止画撮影の画面例を示し、図15(C)は動画撮影の画面例を示しており、複数人の被写体を例示する。また、図16は構図設定「オート」における基準サイズの算出処理の全体を示すフローチャートである。
まず図16のS1600にて、水平方向の被写体位置比率Rhを算出する処理が実行される。水平方向の被写体位置比率Rhとは、水平方向の画面サイズに対する所定の割合に対して、画面中央から最も周辺にいる被写体の肩部付近の水平位置(以下、肩位置といい、Xsmaxと記す)までの距離×2が占める割合である。所定の割合とは、例えば、水平方向の画面サイズの80%または90%であり、後述するS1703での水平方向の並び人数に応じて変更される。図15(A)では被写体1500a,1501a,1502aのうち、水平方向にて画面中央から最も周辺にいる被写体は被写体1500aである。図17のフローチャートを参照して、水平方向の被写体位置比率Rhの算出処理について説明する。
FIG. 15 is a diagram showing the relationship between the position of the subject closest to the screen among a plurality of subjects and the screen size. 15A and 15B show examples of still image shooting screens, and FIG. 15C shows an example of moving image shooting screens, illustrating a plurality of subjects. FIG. 16 is a flowchart showing the entire reference size calculation process in composition setting “auto”.
First, in S1600 of FIG. 16, processing for calculating the subject position ratio Rh in the horizontal direction is executed. The subject position ratio Rh in the horizontal direction is the horizontal position near the shoulder of the subject closest to the screen center (hereinafter referred to as the shoulder position, referred to as Xsmax) with respect to a predetermined ratio to the screen size in the horizontal direction. It is the ratio which distance x2 occupies. The predetermined ratio is, for example, 80% or 90% of the screen size in the horizontal direction, and is changed according to the number of people arranged in the horizontal direction in S1703 to be described later. In FIG. 15A, among the subjects 1500a, 1501a, and 1502a, the subject that is closest to the screen center in the horizontal direction is the subject 1500a. With reference to the flowchart of FIG. 17, the calculation processing of the subject position ratio Rh in the horizontal direction will be described.

S1700では、被写体の顔追尾枠の中心位置やサイズに基づき、被写体の肩位置(Xsと記す)が算定される。画面中央を原点(0,0)とし、顔追尾枠の中心位置を(Xc,Yc)とし、顔追尾枠のサイズをSとする。顔追尾枠の中心位置から肩位置までの距離に占める顔追尾枠の個数をNsとして、「Xs=|Xc|+S×Ns」により、画面周辺側の肩位置Xsを算出できる。図19にNsの設定例を示す。Nsの値は、図12のS1211で判定された構図にしたがって変更される。例えば、顔1402の構図の場合、Ns=1(この場合は肩位置ではなく耳付近の水平位置)が設定される。それ以外(「上半身」、「全身」、「複数人」)の場合、Ns=2が設定される。   In S1700, the shoulder position of the subject (denoted as Xs) is calculated based on the center position and size of the face tracking frame of the subject. The center of the screen is the origin (0, 0), the center position of the face tracking frame is (Xc, Yc), and the size of the face tracking frame is S. The shoulder position Xs on the peripheral side of the screen can be calculated by “Xs = | Xc | + S × Ns”, where Ns is the number of face tracking frames occupying the distance from the center position of the face tracking frame to the shoulder position. FIG. 19 shows a setting example of Ns. The value of Ns is changed according to the composition determined in S1211 of FIG. For example, in the case of the composition of the face 1402, Ns = 1 (in this case, the horizontal position near the ear, not the shoulder position) is set. In other cases (“upper body”, “whole body”, “multiple people”), Ns = 2 is set.

被写体の肩位置Xsの算出後、S1701に進む。S1701では、メモリ118に肩位置の最大値Xsmaxが記憶されていない場合に、S1700で算出した肩位置Xsが最大肩位置Xsmaxとして記憶される。またメモリ118に最大肩位置Xsmaxが記憶されている場合には、S1700で算出した肩位置Xsと最大肩位置Xsmaxとが比較される。肩位置Xsが最大肩位置Xsmaxよりも大きい場合には、メモリ118の最大肩位置Xsmaxを肩位置Xsで更新する処理が実行される。最大肩位置Xsmaxの更新処理の後、S1702に進む。S1702では、全ての被写体に対して肩位置Xsを算出して最大肩位置Xsmaxを更新する処理が終了したか否かについて判定される。肩位置Xsの算出及び最大肩位置Xsmaxの更新が終了していない場合、S1700に戻る。全ての被写体に対して最大肩位置Xsmaxの判定が終了し、最大肩位置Xsmaxの更新が終了した場合には、S1703に進む。   After calculating the shoulder position Xs of the subject, the process proceeds to S1701. In S1701, when the maximum value Xsmax of the shoulder position is not stored in the memory 118, the shoulder position Xs calculated in S1700 is stored as the maximum shoulder position Xsmax. When the maximum shoulder position Xsmax is stored in the memory 118, the shoulder position Xs calculated in S1700 is compared with the maximum shoulder position Xsmax. When the shoulder position Xs is larger than the maximum shoulder position Xsmax, a process of updating the maximum shoulder position Xsmax in the memory 118 with the shoulder position Xs is executed. After updating the maximum shoulder position Xsmax, the process proceeds to S1702. In S1702, it is determined whether or not the process of calculating the shoulder position Xs and updating the maximum shoulder position Xsmax is completed for all the subjects. If the calculation of the shoulder position Xs and the update of the maximum shoulder position Xsmax are not completed, the process returns to S1700. If the determination of the maximum shoulder position Xsmax is completed for all the subjects and the update of the maximum shoulder position Xsmax is completed, the process proceeds to S1703.

S1703では、水平方向に被写体が並んでいる人数(水平方向の並び人数)の判定処理が行われる。これは、集合写真のように被写体が多い場合には、画面一杯に被写体が入る構図とし、被写体が少ない場合には、画面周辺に余白を残した構図とすることを目的とする。また、水平方向の並び人数のカウント方法としては、垂直方向(画面上下方向)に顔追尾枠が重なっている場合には、重なっている被写体を合わせて一人として計数される。例えば、画面内に四人の被写体が検出され、そのうちの二人の顔追尾枠が画面上下に重なっている場合には三人として計数される。S1703にて水平方向の並び人数が閾値(例えば二人)と比較される。水平方向の並び人数が二人以下と判定された場合にはS1704に進み、三人以上と判定された場合にはS1705に進む。S1704及びS1705では、水平方向の被写体位置比率Rhがそれぞれ算出される。S1704での水平方向被写体位置比率Rhは、水平画面サイズの80%に対する最大肩位置Xsmax×2の比率として算出される。またS1705での水平方向被写体位置比率Rhは、水平画面サイズの90%に対する最大肩位置Xsmax×2の比率として算出される。S1704またはS1705の後、被写体位置比率Rhの算出処理を終了する。   In S1703, determination processing is performed for the number of people whose subjects are arranged in the horizontal direction (the number of people arranged in the horizontal direction). The purpose of this is to create a composition that fills the screen when there are many subjects, such as a group photo, and to leave a margin around the screen when there are few subjects. As a method of counting the number of people arranged in the horizontal direction, if the face tracking frames overlap in the vertical direction (up and down direction of the screen), the overlapping subjects are counted as one person. For example, if four subjects are detected in the screen and the face tracking frames of two of them are overlapped on the top and bottom of the screen, the number is counted as three. In S1703, the number of people arranged in the horizontal direction is compared with a threshold value (for example, two people). If it is determined that the number of people arranged in the horizontal direction is two or less, the process proceeds to S1704. If it is determined that there are three or more persons, the process proceeds to S1705. In S1704 and S1705, the subject position ratio Rh in the horizontal direction is calculated. The horizontal subject position ratio Rh in S1704 is calculated as the ratio of the maximum shoulder position Xsmax × 2 to 80% of the horizontal screen size. The horizontal subject position ratio Rh in S1705 is calculated as the ratio of the maximum shoulder position Xsmax × 2 to 90% of the horizontal screen size. After S1704 or S1705, the subject position ratio Rh calculation process is terminated.

次に図16のS1601にて、垂直方向の被写体位置比率Rvを算出する処理が実行される。垂直方向の被写体位置比率Rvとは、垂直方向の画面サイズの所定の割合に対して、画面中央から最も周辺の被写体の頭部の垂直位置(以下、頭位置という)、または身体部の垂直位置(以下、身体位置という)までの距離×2が占める割合である。所定の割合は、例えば、垂直方向の画面サイズの90%である。以下では、画面中央から最も周辺の被写体の頭位置をYhmaxと記し、画面中央から最も周辺の被写体の身体位置をYbmixと記すことにする。図15(B)では被写体1500b,1501b,1502bのうち、垂直方向にて画面中央から最も周辺に頭部がある被写体は被写体1500bであり、また画面中央から最も周辺の身体位置の被写体は被写体1501bである。図18のフローチャートを参照して、垂直方向の被写体位置比率Rvの算出処理について説明する。   Next, in S1601 of FIG. 16, processing for calculating the subject position ratio Rv in the vertical direction is executed. The subject position ratio Rv in the vertical direction is the vertical position of the head of the most peripheral subject from the center of the screen (hereinafter referred to as the head position) or the vertical position of the body part with respect to a predetermined ratio of the screen size in the vertical direction. It is the ratio occupied by the distance x2 (hereinafter referred to as body position). The predetermined ratio is 90% of the screen size in the vertical direction, for example. Hereinafter, the head position of the most peripheral subject from the center of the screen will be denoted as Yhmax, and the body position of the most peripheral subject from the center of the screen will be denoted as Ybmix. In FIG. 15B, of the subjects 1500b, 1501b, and 1502b, the subject with the head closest to the center from the center of the screen in the vertical direction is the subject 1500b, and the subject at the most peripheral body position from the center of the screen is the subject 1501b. It is. With reference to the flowchart of FIG. 18, the calculation processing of the subject position ratio Rv in the vertical direction will be described.

図18のS1800では、被写体の顔追尾枠の中心位置やサイズに基づいて、被写体の頭位置(Yhと記す)が算出される。「Yh=Yc+S×Nh」により頭位置Yhを算出できる。Nhは、顔追尾枠の中心位置から頭位置までの距離に占める顔追尾枠の個数である。図19にNhの設定例を示す。Nhの値については、図12のS1211で判定された構図によらず、Nh=1.5で設定される。被写体の頭位置Yhの算出後にS1801に進む。   In S1800 of FIG. 18, the head position of the subject (denoted as Yh) is calculated based on the center position and size of the face tracking frame of the subject. The head position Yh can be calculated by “Yh = Yc + S × Nh”. Nh is the number of face tracking frames in the distance from the center position of the face tracking frame to the head position. FIG. 19 shows a setting example of Nh. The value of Nh is set to Nh = 1.5 regardless of the composition determined in S1211 of FIG. After calculating the head position Yh of the subject, the process proceeds to S1801.

S1801では、メモリ118に頭位置の最大値Yhmaxが記憶されていない場合に、S1800で算出された頭位置Yhを最大頭位置Yhmaxとして記憶する処理が実行される。またメモリ118に最大頭位置Yhmaxが記憶されている場合には、S1800で算出された頭位置Yhと最大頭位置Yhmaxとが比較される。頭位置Yhが最大頭位置Yhmaxよりも大きい場合には、メモリ118の最大頭位置Yhmaxを頭位置Yhで更新する処理が行われる。更新処理後にS1802へ進む。   In S1801, when the maximum value Yhmax of the head position is not stored in the memory 118, a process of storing the head position Yh calculated in S1800 as the maximum head position Yhmax is executed. When the maximum head position Yhmax is stored in the memory 118, the head position Yh calculated in S1800 is compared with the maximum head position Yhmax. When the head position Yh is larger than the maximum head position Yhmax, processing for updating the maximum head position Yhmax in the memory 118 with the head position Yh is performed. After the update process, the process proceeds to S1802.

次のS1802では、被写体の顔追尾枠の中心位置やサイズに基づいて、被写体の身体位置(Ybと記す)が算出される。「Yb=Yc−S×Nb」により身体位置Ybを算出できる。Nbは、顔追尾枠の中心位置から身体位置までの距離に占める顔追尾枠の個数である。図19にNbの設定例を示す。Nbの値については、図12のS1211で判定された構図に応じて変更される。例えば、顔1402の構図の場合にはNb=1.5が設定される。上半身1400の構図の場合にはNb=5、全身1401の構図の場合にはNb=10、複数人1403の構図の場合にはNb=3.5がそれぞれ設定される。この設定は、各構図にて画面中央で、顔1402では胸、上半身1400では腰下、全身1401では足、複数人1403では腰上付近の位置となる設定である。被写体の身体位置Ybの算出後、S1803に進む。   In next step S1802, the body position of the subject (denoted as Yb) is calculated based on the center position and size of the face tracking frame of the subject. The body position Yb can be calculated by “Yb = Yc−S × Nb”. Nb is the number of face tracking frames in the distance from the center position of the face tracking frame to the body position. FIG. 19 shows a setting example of Nb. The value of Nb is changed according to the composition determined in S1211 of FIG. For example, in the case of the composition of the face 1402, Nb = 1.5 is set. In the case of the composition of the upper body 1400, Nb = 5 is set, in the case of the composition of the whole body 1401, Nb = 10, and in the case of the composition of a plurality of people 1403, Nb = 3.5 is set. This setting is the center of the screen in each composition, the face 1402 is the chest, the upper body 1400 is below the waist, the whole body 1401 is the foot, and the plurality of people 1403 is near the waist. After calculating the body position Yb of the subject, the process proceeds to S1803.

S1803では、メモリ118に身体位置の最小値Ybminが記憶されていない場合に、S1802で算出された身体位置Ybを最小身体位置Ybminとして記憶する処理が実行される。またメモリ118に最小身体位置Ybminが記憶されている場合には、S1802で算出された身体位置Ybと最小身体位置Ybminとが比較される。身体位置Ybが最小身体位置Ybminよりも小さい場合には、メモリ118の最小身体位置Ybminを身体位置Ybで更新する処理が行われる。更新処理後にS1804へ進む。   In S1803, when the minimum body position value Ybmin is not stored in the memory 118, a process of storing the body position Yb calculated in S1802 as the minimum body position Ybmin is executed. When the minimum body position Ybmin is stored in the memory 118, the body position Yb calculated in S1802 is compared with the minimum body position Ybmin. When the body position Yb is smaller than the minimum body position Ybmin, a process of updating the minimum body position Ybmin in the memory 118 with the body position Yb is performed. After the update process, the process proceeds to S1804.

S1804では、全ての被写体に対して頭位置Yh及び身体位置Ybが算出されて、最大頭位置Yhmax及び最小身体位置Ybminを更新する処理が終了したか否かについて判定される。最大頭位置Yhmax及び最小身体位置Ybminの更新が終了していない場合には、S1800に戻る。全ての被写体に対して最大頭位置Yhmax及び最小身体位置Ybminの判定が終了し、最大頭位置Yhmax及び最小身体位置Ybminの更新が終了した場合には、S1805に進む。S1805では最大頭位置Yhmaxの絶対値と、最小身体位置Ybminの絶対値とが比較され、どちらがより画面周辺に位置するかを判定する処理が行われる。最大頭位置Yhmaxの方がより画面周辺に位置すると判定された場合には、S1806に進む。また、最小身体位置Ybminの方がより画面周辺に位置すると判定された場合には、S1807に進む。S1806及びS1807では、垂直方向の被写体位置比率Rvがそれぞれ算出される。S1806での垂直方向被写体位置比率Rvは、垂直画面サイズの90%に対する最大頭位置Yhmaxの絶対値×2の比率として算出される。またS1807での垂直方向被写体位置比率Rvは、垂直画面サイズの90%に対する最小身体位置Ybminの絶対値×2の比率として算出される。S1806またはS1807の後、垂直方向被写体位置比率Rvの算出処理を終了する。   In step S1804, the head position Yh and the body position Yb are calculated for all the subjects, and it is determined whether or not the processing for updating the maximum head position Yhmax and the minimum body position Ybmin is completed. If the update of the maximum head position Yhmax and the minimum body position Ybmin has not been completed, the process returns to S1800. If the determination of the maximum head position Yhmax and the minimum body position Ybmin is completed for all the subjects and the update of the maximum head position Yhmax and the minimum body position Ybmin is completed, the process proceeds to S1805. In S1805, the absolute value of the maximum head position Yhmax and the absolute value of the minimum body position Ybmin are compared, and processing for determining which is located closer to the periphery of the screen is performed. If it is determined that the maximum head position Yhmax is located closer to the screen periphery, the process proceeds to S1806. If it is determined that the minimum body position Ybmin is located closer to the periphery of the screen, the process proceeds to S1807. In S1806 and S1807, the subject position ratio Rv in the vertical direction is calculated. The vertical subject position ratio Rv in S1806 is calculated as a ratio of the absolute value of the maximum head position Yhmax × 2 with respect to 90% of the vertical screen size. The vertical subject position ratio Rv in S1807 is calculated as a ratio of the absolute value of the minimum body position Ybmin × 2 to 90% of the vertical screen size. After S1806 or S1807, the calculation process of the vertical subject position ratio Rv ends.

続いて図16のS1602にて、水平方向の被写体位置比率Rhと、垂直方向の被写体位置比率Rvとが比較される。これによって、各方向の画面サイズの所定比率に対して、画面中央から被写体の各位置までの距離の比率のうちで、最も比率が大きい位置、すなわち、最も画面周辺となる位置を判定することができる。各位置とは、最大肩位置Xsmax、最大頭位置Yhmax、最小身体位置Ybminである。水平方向被写体位置比率Rhが垂直方向の被写体位置比率Rvより大きいと判定された場合には、S1603に進み、水平方向被写体位置比率Rhが垂直方向の被写体位置比率Rv以下であると判定された場合には、S1604に進む。S1603及びS1604では、主被写体の検出サイズと、S1602で判定した最も画面周辺となる被写体位置の比率に基づいて、基準サイズを算出する処理が実行される。基準サイズは、S1603にて「検出サイズ/水平方向被写体位置比率Rh」により算出され、S1604にて「検出サイズ/垂直方向被写体位置比率Rv」により算出される。すなわち、S1603では、主被写体像がそのサイズに「1/水平方向被写体位置比率Rh」を乗算した基準サイズとなるようにズーム動作が実行される。S1604では、主被写体像がそのサイズに「1/垂直方向被写体位置比率Rv」を乗算した基準サイズとなるようにズーム動作が実行される。こうすることで、画面内の被写体をフレームアウトさせることなく、S1211で判定された構図に基づく画角に設定できる。   Subsequently, in S1602 of FIG. 16, the subject position ratio Rh in the horizontal direction is compared with the subject position ratio Rv in the vertical direction. Thus, it is possible to determine the position having the largest ratio among the ratios of the distance from the center of the screen to each position of the subject, that is, the position closest to the periphery of the screen with respect to the predetermined ratio of the screen size in each direction. it can. Each position is a maximum shoulder position Xsmax, a maximum head position Yhmax, and a minimum body position Ybmin. If it is determined that the horizontal subject position ratio Rh is greater than the vertical subject position ratio Rv, the process proceeds to S1603, and it is determined that the horizontal subject position ratio Rh is less than or equal to the vertical subject position ratio Rv. In step S1604, the process proceeds to step S1604. In S1603 and S1604, a process of calculating a reference size is executed based on the detected size of the main subject and the ratio of the subject position closest to the screen determined in S1602. The reference size is calculated by “detected size / horizontal subject position ratio Rh” in S1603, and calculated by “detected size / vertical direction subject position ratio Rv” in S1604. That is, in S1603, the zoom operation is executed so that the main subject image has a reference size obtained by multiplying the size of the main subject image by “1 / horizontal subject position ratio Rh”. In S1604, the zoom operation is executed so that the main subject image has a reference size obtained by multiplying the size of the main subject image by “1 / vertical subject position ratio Rv”. In this way, the angle of view based on the composition determined in S1211 can be set without causing the subject in the screen to be out of frame.

図12のS1215では、構図設定が「オート」の場合、S1211で判定された構図に基づいて水平方向及び垂直方向で最も画面周辺となる被写体位置が判定され、その位置が画面に収まるように基準サイズが算出される。これによって、被写体像が画面内のどの位置であったとしても、フレームアウトすることなく被写体を適切な画角に収めることができる。また、被写体の数が単数である場合でも複数である場合でも、同じ処理によって基準サイズが算出可能となる。なお、本実施形態では、被写体として立位姿勢の人物を前提に、基準サイズを算出する画面サイズの方向を決定した。これに限らず、被写体検出部123が顔の方向を判定できる場合には、画面上での顔の上下方向に基づいて画面サイズの方向を決定してもよい。さらに、被写体が人物である場合の構図判定や基準サイズの算出例を説明したが、被写体が物体である場合にも適用できる。ただし、この場合には、選択される構図は「顔」、「上半身」、「全身」、「複数人」の代わりに、「大」、「中」、「小」、「複数」とする。それらに応じて被写体位置を算定する場合のモノ追尾枠の個数(人物の場合のNs,Nh,Nbに相当)を設定してもよい。   In S1215 of FIG. 12, when the composition setting is “Auto”, the subject position that is the most peripheral in the horizontal and vertical directions is determined based on the composition determined in S1211, and the reference is set so that the position fits on the screen. The size is calculated. As a result, the subject can be held at an appropriate angle of view without being out of the frame no matter where the subject image is in the screen. In addition, whether the number of subjects is singular or plural, the reference size can be calculated by the same process. In the present embodiment, the direction of the screen size for calculating the reference size is determined on the assumption that the subject is in a standing posture. Not limited to this, when the subject detection unit 123 can determine the face direction, the screen size direction may be determined based on the vertical direction of the face on the screen. Furthermore, the composition determination and the reference size calculation example when the subject is a person have been described, but the present invention can also be applied when the subject is an object. However, in this case, the selected composition is “large”, “medium”, “small”, and “plurality” instead of “face”, “upper body”, “whole body”, and “multiple people”. Accordingly, the number of mono tracking frames when calculating the subject position (corresponding to Ns, Nh, Nb in the case of a person) may be set.

図12に示す基準サイズ設定処理が終了すると、図7のS704に処理を進める。S704でAZ制御部122は、被写体検出部123により検出された被写体情報やメモリ118に記憶された基準サイズに基づいてオートズーム制御を行う。オートズーム制御については、図20を用いて後述する。オートズーム制御の終了後、S705に進み、AZ制御部122は、撮影者による被写体探索指示を判定する。つまり、撮影者が操作部117の被写体探索ボタンを押下したか否かについて判定される。被写体探索ボタンが押下された場合には、S701に戻り、被写体探索処理が実行される。また、被写体探索ボタンが押下されていない場合には、S706に進む。S706では、操作部117のタッチパネルや被写体指定用スイッチ等の操作によって、オートズームの対象とする被写体が変更されたか否かについて判定される。被写体が変更された場合には、S702に戻って被写体指定処理が実行される。また、被写体が変更されていない場合には、S707に進む。   When the reference size setting process illustrated in FIG. 12 is completed, the process proceeds to S704 in FIG. In step S <b> 704, the AZ control unit 122 performs auto zoom control based on the subject information detected by the subject detection unit 123 and the reference size stored in the memory 118. The auto zoom control will be described later with reference to FIG. After completion of the auto zoom control, the process proceeds to S705, where the AZ control unit 122 determines a subject search instruction from the photographer. That is, it is determined whether or not the photographer has pressed the subject search button of the operation unit 117. If the subject search button is pressed, the process returns to S701 and subject search processing is executed. If the subject search button has not been pressed, the process proceeds to S706. In step S <b> 706, it is determined whether or not the subject to be subjected to auto zooming has been changed by the operation of the touch panel of the operation unit 117 or the subject designation switch. If the subject has been changed, the process returns to S702 and subject designation processing is executed. If the subject has not been changed, the process proceeds to S707.

S707では、撮影画面から操作部117の左右ボタンの操作によって構図設定が変更されたか否かについて判定される。構図設定が変更された場合には、メモリ118に記憶されている構図設定のデータが更新された後、S703に戻って基準サイズ設定処理が実行される。また、構図設定が変更されていない場合には、S708に進む。S708では、操作部117のオートズーム操作スイッチが押下されたか否かについて判定される。オートズーム操作スイッチが押下されたと判定された場合、オートズーム機能を終了する。また、オートズーム操作スイッチが押下されていないと判定された場合、S709に進む。S709は、メモリ118に記憶されている構図設定が「オート」であるか否かの判定処理である。構図設定が「オート」である場合には、S703に戻って自動構図判定を含む基準サイズの設定処理が実行される。また、構図設定が「オート」以外である場合には、S704に戻ってオートズーム制御が継続する。   In S707, it is determined whether or not the composition setting has been changed by operating the left and right buttons of the operation unit 117 from the shooting screen. When the composition setting is changed, the composition setting data stored in the memory 118 is updated, and then the process returns to S703 to execute the reference size setting process. If the composition setting has not been changed, the process proceeds to S708. In S708, it is determined whether or not the auto zoom operation switch of the operation unit 117 has been pressed. If it is determined that the auto zoom operation switch has been pressed, the auto zoom function is terminated. If it is determined that the auto zoom operation switch has not been pressed, the process proceeds to S709. S709 is a process for determining whether or not the composition setting stored in the memory 118 is “auto”. When the composition setting is “auto”, the process returns to S703 and the reference size setting process including the automatic composition determination is executed. If the composition setting is other than “auto”, the process returns to S704 and the auto zoom control is continued.

次に図20のフローチャートを参照して、S704のオートズーム制御の処理について説明する。まず、S2000にてAZ制御部122は、被写体検出部123により被写体が検出されたか否かを判定する。S2000で被写体が検出されなかった場合にはオートズーム制御を終了する。S2000で被写体が検出された場合にはS2001へ進む。S2001からS2003の各ステップに示す判定は、フレームアウト防止制御のためのオートズームの開始判定処理である。すなわち、この処理は、図3及び図4で説明したように、被写体が画面の外にフレームアウトすることを防止するために行われる。S2001でAZ制御部122は、追尾対象とする被写体に係る被写体追尾枠が、ZO領域に進入したか否かを判定する。このZO領域は、図3(A)、図4(A)〜(C)で説明したZO領域に相当する。S2001にて被写体追尾枠がZO領域に進入した場合、すなわち、被写体がフレームアウトする可能性が高い場合、S2004に進み、ズームアウト動作を開始する。ここでのズームアウト動作は、フレームアウト防止制御用のズームアウト動作に相当する。ズームアウト動作の後、オートズーム制御を終了する。   Next, the auto zoom control process of S704 will be described with reference to the flowchart of FIG. First, in S2000, the AZ control unit 122 determines whether or not a subject is detected by the subject detection unit 123. If no subject is detected in S2000, the auto zoom control is terminated. If a subject is detected in S2000, the process proceeds to S2001. The determination shown in each step of S2001 to S2003 is an automatic zoom start determination process for frame-out prevention control. That is, this process is performed to prevent the subject from being out of the screen as described with reference to FIGS. In S2001, the AZ control unit 122 determines whether the subject tracking frame related to the subject to be tracked has entered the ZO region. This ZO region corresponds to the ZO region described with reference to FIGS. 3A and 4A to 4C. If the subject tracking frame enters the ZO area in S2001, that is, if the possibility that the subject is out of frame is high, the process proceeds to S2004, and the zoom-out operation is started. The zoom-out operation here corresponds to a zoom-out operation for frame-out prevention control. After the zoom-out operation, the auto zoom control is terminated.

一方、S2001にて被写体追尾枠がZO領域に進入していない場合、すなわち、画面中央付近でカメラが被写体を捉えている場合、S2002に進む。S2002では、直前のズーム動作がS2001でZO領域に進入したことによるズームアウト動作であるか否か、すなわち、フレームアウト防止制御用のズームアウト動作であるか否かが判定される。S2002でフレームアウト防止制御用のズームアウト動作後であると判定された場合、S2003に進む。また、S2002でフレームアウト防止制御用のズームアウト動作後でないと判定された場合、S2006に進む。   On the other hand, if the subject tracking frame has not entered the ZO area in S2001, that is, if the camera catches the subject near the center of the screen, the process proceeds to S2002. In S2002, it is determined whether or not the previous zoom operation is a zoom-out operation due to entering the ZO region in S2001, that is, whether or not it is a zoom-out operation for frame-out prevention control. If it is determined in S2002 that the zoom-out operation for frame-out prevention control has been performed, the process proceeds to S2003. If it is determined in S2002 that the zoom-out operation for the frame-out prevention control has not been performed, the process proceeds to S2006.

S2003にてAZ制御部122は、追尾対象とする被写体に係る被写体追尾枠がZI領域の内部に収まっているか否か(包含されているか否か)を判定する。ここでのZI領域は、図3(B)、図4(A)〜(C)で説明したZI領域に相当する。S2003にて被写体追尾枠がZI領域に収まっていないと判定された場合、オートズーム制御処理を終了する。一方、被写体追尾枠がZI領域に収まっていると判定された場合、S2005に進む。すなわち、画面中央付近であって、かつズーム戻り位置の画角内の被写体サイズとなるようにカメラが被写体を捉えている場合、S2005でズームイン動作を開始する。ここでのズームイン動作は、フレームアウト防止制御用のズームイン動作に相当する。ズームイン動作の後、オートズーム制御を終了する。   In S2003, the AZ control unit 122 determines whether or not the subject tracking frame related to the subject to be tracked is within the ZI area (whether or not included). The ZI region here corresponds to the ZI region described with reference to FIGS. 3B and 4A to 4C. If it is determined in S2003 that the subject tracking frame does not fit in the ZI area, the auto zoom control process ends. On the other hand, if it is determined that the subject tracking frame is within the ZI region, the process proceeds to S2005. That is, if the camera captures the subject so that the subject size is near the center of the screen and within the angle of view at the zoom return position, a zoom-in operation is started in S2005. The zoom-in operation here corresponds to a zoom-in operation for frame-out prevention control. After zooming in, the auto zoom control is terminated.

本実施形態では、オートズームにおけるフレームアウト防止制御とサイズ保持制御を両立させるために、まずフレームアウト防止制御により被写体を画面中央付近に捉えたうえで、サイズ保持制御を実行できるようにする。そのため、フレームアウト防止制御用のズームアウト動作後の状態では、以降で説明する被写体サイズを一定に維持する(サイズ保持制御の)オートズーム処理(以下のS2006〜S2010)を行わないようにしている。換言すると、フレームアウト防止制御が行われた場合には、フレームアウト防止制御用のズームイン動作が完了するまでサイズ保持制御の実行が制限される。   In this embodiment, in order to achieve both frame-out prevention control and size retention control in auto-zoom, first, the subject is captured near the center of the screen by frame-out prevention control, and then size retention control can be executed. For this reason, in the state after the zoom-out operation for the frame-out prevention control, the auto-zoom processing (the following S2006 to S2010) for keeping the subject size constant (the size holding control) described below is not performed. . In other words, when the frame-out prevention control is performed, the execution of the size holding control is limited until the zoom-out operation for the frame-out prevention control is completed.

次に、S2006〜S2010の各処理を説明する。S2002でフレームアウト防止制御用のズームアウト動作後でないと判断された場合、S2006に進み、AZ制御部122は、被写体の検出サイズと、基準サイズに所定倍率(N1と記し、N1>1とする)を乗算したサイズとを比較する。図12のS1202やS1210、S1215で設定される基準被写体情報の被写体サイズと、S2000にて検出された被写体サイズとが比較される。S2000にて検出された被写体のサイズが、基準被写体のサイズに対してN1倍より大きい場合、すなわち被写体像が画面に占める比率が所定値を超える場合、S2009に進む。S2009でAZ制御部122は、ズームアウト動作を開始する。ここでのズームアウト動作は、サイズ保持制御用のズームアウト動作に相当する。ズームアウト動作の後、オートズーム制御を終了する。   Next, each process of S2006 to S2010 will be described. If it is determined in S2002 that the zoom-out operation has not been performed for the frame-out prevention control, the process proceeds to S2006, where the AZ control unit 122 sets a predetermined magnification (N1 and N1> 1 for the detected size of the subject and the reference size). ) And the size multiplied. The subject size of the reference subject information set in S1202, S1210, and S1215 of FIG. 12 is compared with the subject size detected in S2000. If the size of the subject detected in S2000 is larger than N1 times the size of the reference subject, that is, if the ratio of the subject image to the screen exceeds a predetermined value, the process proceeds to S2009. In S2009, the AZ control unit 122 starts a zoom-out operation. The zoom-out operation here corresponds to a zoom-out operation for size retention control. After the zoom-out operation, the auto zoom control is terminated.

一方、S2006において、S2000で検出された被写体のサイズが、基準被写体のサイズに対してN1倍以下である場合、S2007に進む。S2007でAZ制御部122は、基準被写体情報の被写体サイズと、S2000にて検出された被写体のサイズとを比較する。検出された被写体のサイズが、基準被写体のサイズに対して所定倍率(N2と記し、N2<1とする)より小さい場合(N2倍未満の場合)、すなわち被写体像が画面に占める比率が所定値未満である場合、S2008に進む。一方、検出された被写体のサイズが、基準被写体のサイズに対してN2倍以上である場合、オートズーム制御を終了する。   On the other hand, in S2006, when the size of the subject detected in S2000 is N1 times or less than the size of the reference subject, the process proceeds to S2007. In S2007, the AZ control unit 122 compares the subject size of the reference subject information with the size of the subject detected in S2000. When the size of the detected subject is smaller than a predetermined magnification (denoted N2 and N2 <1) with respect to the size of the reference subject (less than N2 times), that is, the ratio of the subject image to the screen is a predetermined value If it is less, the process proceeds to S2008. On the other hand, when the size of the detected subject is N2 times or more than the size of the reference subject, the auto zoom control is terminated.

S2008にてAZ制御部122は、追尾対象とする被写体に係る被写体追尾枠がZI領域の内部に収まっているか否か(包含されているか否か)を判定する。これは、被写体が画面の周辺にいる場合にズームイン動作によってフレームアウトしてしまうことを防ぐためである。ここでのZI領域は、図5(E)で説明したZI領域に相当する。S2008で被写体追尾枠がZI領域に収まっていないと判定された場合、オートズーム制御を終了する。   In S2008, the AZ control unit 122 determines whether or not the subject tracking frame related to the subject to be tracked is within the ZI region (whether or not included). This is to prevent the subject from being out of frame by the zoom-in operation when the subject is in the periphery of the screen. The ZI region here corresponds to the ZI region described with reference to FIG. If it is determined in S2008 that the subject tracking frame is not within the ZI area, the auto zoom control is terminated.

一方、S2008で被写体追尾枠がZI領域に収まっていると判定された場合、S2010に進む。S2010にてAZ制御部122は、ズームイン動作を開始する。ここでのズームイン動作は、サイズ保持制御用のズームイン動作に相当する。このように、本実施形態では、サイズ保持制御用のズームイン動作においても被写体のフレームアウトを防ぐために、被写体像がZI領域の内部に収まってからズームイン動作を開始する。ズームイン動作の後、オートズーム制御を終了する。   On the other hand, if it is determined in S2008 that the subject tracking frame is within the ZI area, the process proceeds to S2010. In S2010, the AZ control unit 122 starts a zoom-in operation. The zoom-in operation here corresponds to a zoom-in operation for size retention control. Thus, in this embodiment, in order to prevent the subject from being out of frame even in the zoom-in operation for size retention control, the zoom-in operation is started after the subject image is within the ZI region. After zooming in, the auto zoom control is terminated.

次に、図21を参照してズーム動作について説明する。図21は、図20のS2004、S2005、S2009、S2010でのズームアウト動作またはズームイン動作を説明するフローチャートである。まずS2100において、AZ制御部122は、メモリ118からズーム変化量(ズーム倍率の変化量)を取得する。フレームアウト防止制御用のズームアウト動作の場合、ズームアウト変化量は検出された被写体情報に応じて設定される。具体的には、フレームアウト防止制御用のズームアウト動作(図20のS2004)では、被写体のサイズが小さいほどズームアウト変化量が小さく設定される。それにより、ズームアウト動作によって被写体のサイズが小さくなりすぎるために被写体が検出できなくなるのを防ぐことができる。なお、被写体検出可能な最小サイズを考慮して、被写体のサイズが所定のサイズより小さい場合は、ズームアウト動作を行わないようにしてもよい。また、フレームアウト防止制御用のズームイン動作では、ズームアウト動作の開始前のズーム倍率がメモリ118に記憶され、ズームアウト動作の開始前と同じズーム倍率となるようにズームイン変化量が設定される。   Next, the zoom operation will be described with reference to FIG. FIG. 21 is a flowchart for explaining the zoom-out operation or zoom-in operation in S2004, S2005, S2009, and S2010 of FIG. First, in step S <b> 2100, the AZ control unit 122 acquires the zoom change amount (change amount of zoom magnification) from the memory 118. In the case of the zoom-out operation for the frame-out prevention control, the zoom-out change amount is set according to the detected subject information. Specifically, in the zoom-out operation for frame-out prevention control (S2004 in FIG. 20), the smaller the subject size, the smaller the zoom-out change amount is set. Thereby, it is possible to prevent the subject from becoming undetectable because the size of the subject becomes too small due to the zoom-out operation. In consideration of the minimum size that can be detected by the subject, the zoom-out operation may not be performed when the size of the subject is smaller than a predetermined size. Also, in the zoom-in operation for frame-out prevention control, the zoom magnification before the start of the zoom-out operation is stored in the memory 118, and the zoom-in change amount is set so as to be the same zoom magnification as that before the start of the zoom-out operation.

また、サイズ保持制御用のズームアウト動作(図20のS2009)においては、S2006の判定に用いる所定のN1倍に対応するズームアウト変化量(1/N1倍)が設定される。それにより、被写体が検出できない場合でも、被写体のサイズが基準被写体のサイズとなるまでの最低限のズームアウト動作を行うことができる。サイズ保持制御用のズームイン動作(図20のS2010)の場合にも同様に、S2007の判定に用いる所定のN2倍に対応するズームイン変化量(1/N2倍)が設定される。   In the zoom-out operation for size retention control (S2009 in FIG. 20), a zoom-out change amount (1 / N1 times) corresponding to the predetermined N1 times used for the determination in S2006 is set. Thereby, even when the subject cannot be detected, a minimum zoom-out operation until the size of the subject reaches the size of the reference subject can be performed. Similarly, in the case of the zoom-in operation for size retention control (S2010 in FIG. 20), the zoom-in change amount (1 / N2 times) corresponding to the predetermined N2 times used for the determination in S2007 is set.

S2101でAZ制御部122は、S2100にて取得したズーム変化量をCZ制御部119または電子ズーム制御部120に設定し、変倍処理を行うように指示する。次のS2102でAZ制御部122は、フレームアウト防止制御用とサイズ保持制御用のうちの、いずれのズーム動作中であるかを判定する。現時点でのズーム動作がフレームアウト防止制御用のズーム動作である場合(図20のS2004、S2005)にはS2105に進む。また、現時点でのズーム動作がサイズ保持制御用のズーム動作である場合(図20のS2009、S2010)にはS2103に進む。   In step S2101, the AZ control unit 122 sets the zoom change amount acquired in step S2100 in the CZ control unit 119 or the electronic zoom control unit 120, and instructs the zoom processing to be performed. In the next step S2102, the AZ control unit 122 determines which zoom operation is being performed for frame-out prevention control or size retention control. If the current zoom operation is a zoom-out prevention zoom operation (S2004, S2005 in FIG. 20), the process proceeds to S2105. If the current zoom operation is a zoom operation for size maintenance control (S2009, S2010 in FIG. 20), the process proceeds to S2103.

S2103でAZ制御部122は、被写体検出部123によって被写体が検出されているか否かを判定する。被写体が検出されている場合にはS2104に進み、被写体が検出されていない場合にはS2105に進む。S2104では、基準被写体情報の示す被写体のサイズと、S2103で検出された被写体のサイズとが比較される。比較の結果、S2103にて検出された被写体のサイズと、基準被写体のサイズとが所定比率の範囲内(所定の変化量以内)に収まらない場合には、再度S2102に進み、ズーム動作の判定を継続する。ズーム動作によって、S2103にて検出された被写体のサイズと、基準被写体のサイズとが、所定比率の範囲内となった場合には、S2106に進む。S2106でAZ制御部122はズーム動作を停止した後、ズーム動作処理を終了する。   In step S <b> 2103, the AZ control unit 122 determines whether the subject is detected by the subject detection unit 123. If a subject has been detected, the process proceeds to S2104. If a subject has not been detected, the process proceeds to S2105. In S2104, the size of the subject indicated by the reference subject information is compared with the size of the subject detected in S2103. As a result of the comparison, if the size of the subject detected in S2103 and the size of the reference subject do not fall within a predetermined ratio range (within a predetermined change amount), the process proceeds to S2102 again to determine the zoom operation. continue. If the size of the subject detected in S2103 and the size of the reference subject are within a predetermined range due to the zoom operation, the process proceeds to S2106. In S2106, the AZ control unit 122 stops the zoom operation, and then ends the zoom operation process.

S2102にて、フレームアウト防止制御用のズーム動作中と判定された場合、または、サイズ保持制御用のズーム動作中でS2103にて被写体が検出されない場合にはS2105に進む。S2105にてAZ制御部122は、S2100で取得したズーム変化量に基づき、各ズーム動作に応じた所定量分のズーム変化量に相当する変倍処理を行ったか否かを判定する。所定のズーム変化量の変倍処理が行われていない場合には、再度S2102に戻って処理を継続する。また所定のズーム変化量の変倍処理が行われた場合には、S2106に進み、AZ制御部122は動作中のズームを停止してズーム動作処理を終了する。   If it is determined in S2102 that the zoom-out operation for frame-out prevention control is being performed, or if the subject is not detected in S2103 during the zoom operation for size retention control, the process proceeds to S2105. In S2105, the AZ control unit 122 determines based on the zoom change amount acquired in S2100 whether or not a scaling process corresponding to a predetermined amount of zoom change amount corresponding to each zoom operation has been performed. If the zooming process for the predetermined zoom change amount has not been performed, the process returns to S2102 again to continue the process. If zoom processing of a predetermined zoom change amount has been performed, the process proceeds to S2106, where the AZ control unit 122 stops zooming in operation and ends the zoom operation processing.

以上のように本実施形態では、以下の算出処理が実行される。
・第1の処理:画像の中心を基準として被写体像の位置を算出する処理。
・第2の処理:所定の画角に対して水平方向または垂直方向にて被写体像の位置が占める比率を算出する処理。
画像内に複数の被写体像が検出された場合には、複数の被写体像に対して、第2の処理で被写体像ごとの比率が算出され、判定処理により、画角に対して水平方向または垂直方向にて最も周辺に位置する被写体像の位置が占める比率が決定される。この比率と、選択された構図と、複数の被写体像から選択される主被写体像の大きさから基準サイズが設定される。つまり、構図選択処理により選択された構図及び被写体の数や画面内の被写体の位置に対して設定される基準サイズに基づき、検出した被写体の画像が基準サイズとなるようにズーム動作が実行される。本実施形態によれば、被写体の数や画面内の被写体の位置によらず、適切な構図となるようなオートズーム制御が可能になる。
As described above, in the present embodiment, the following calculation process is executed.
First process: a process of calculating the position of the subject image with reference to the center of the image.
Second process: a process of calculating the ratio of the position of the subject image in the horizontal direction or the vertical direction with respect to a predetermined angle of view.
When a plurality of subject images are detected in the image, a ratio for each subject image is calculated in the second process for the plurality of subject images, and the horizontal or vertical direction with respect to the angle of view is determined by the determination process. The ratio occupied by the position of the subject image located nearest to the direction is determined. The reference size is set from this ratio, the selected composition, and the size of the main subject image selected from the plurality of subject images. That is, based on the composition selected by the composition selection process, the number of subjects, and the reference size set for the position of the subject in the screen, the zoom operation is executed so that the detected subject image becomes the reference size. . According to the present embodiment, it is possible to perform an automatic zoom control that achieves an appropriate composition regardless of the number of subjects and the position of the subject in the screen.

(その他の実施形態)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other embodiments)
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

100 デジタルカメラ
102 ズームレンズ
109 表示部
113 ズームレンズ駆動部
117 操作部
118 メモリ
119 CZ制御部
120 電子ズーム制御部
122 オートズーム制御部
123 被写体検出部
DESCRIPTION OF SYMBOLS 100 Digital camera 102 Zoom lens 109 Display part 113 Zoom lens drive part 117 Operation part 118 Memory 119 CZ control part 120 Electronic zoom control part 122 Auto zoom control part 123 Subject detection part

Claims (14)

画像から被写体像を検出する被写体検出手段と、
複数の構図の中から特定の構図を自動で選択する構図選択手段と、
前記画像の中心を基準として前記被写体像の位置を算出する第1の処理と、前記画像の画角に対して水平方向または垂直方向にて前記被写体像の位置が占める比率を算出する第2の処理とを行う算出手段と、
前記被写体検出手段により複数の被写体像が検出された場合、前記複数の被写体像に対して、前記算出手段が前記第2の処理で算出した被写体像ごとの前記比率を判定して、前記画像の画角に対して水平方向または垂直方向にて最も周辺に位置する被写体像の位置が占める比率を決定する判定手段と、
前記構図選択手段により選択された構図と、前記判定手段により決定された比率と、前記被写体検出手段により検出された前記複数の被写体像から選択される主被写体像のサイズから、ズーム倍率の制御に用いる被写体像の基準サイズを設定する設定手段と、
前記設定手段により設定された基準サイズに基づいて、前記被写体検出手段により検出される被写体像のサイズの変化に応じて前記ズーム倍率の制御を行う制御手段と、を有することを特徴とするズーム制御装置。
Subject detection means for detecting a subject image from the image;
Composition selecting means for automatically selecting a specific composition from a plurality of compositions;
A first process for calculating the position of the subject image with reference to the center of the image; and a second process for calculating a ratio of the position of the subject image in the horizontal direction or the vertical direction with respect to the angle of view of the image. Calculating means for performing processing;
When a plurality of subject images are detected by the subject detection unit, the calculation unit determines the ratio for each subject image calculated in the second process with respect to the plurality of subject images, and Determination means for determining a ratio occupied by the position of the subject image located closest to the angle of view in the horizontal or vertical direction;
The zoom magnification is controlled from the composition selected by the composition selection means, the ratio determined by the determination means, and the size of the main subject image selected from the plurality of subject images detected by the subject detection means. Setting means for setting a reference size of the subject image to be used;
Zoom control, comprising: control means for controlling the zoom magnification according to a change in the size of the subject image detected by the subject detection means based on the reference size set by the setting means. apparatus.
前記算出手段は、前記第1の処理にて前記被写体像の中心位置とサイズ、および、前記構図選択手段により選択された構図から、前記被写体像の位置を算出することを特徴とする請求項1に記載のズーム制御装置。   The calculation means calculates the position of the subject image from the center position and size of the subject image and the composition selected by the composition selection means in the first processing. The zoom control device described in 1. 前記算出手段は、前記第2の処理にて前記画像の画角に対して水平方向または垂直方向において前記複数の被写体像の位置がそれぞれ占める比率を算出し、
前記判定手段は、前記算出手段により算出された複数の比率から最大の比率を、前記画像の画角に対して最も周辺に位置する被写体像の位置が占める比率として決定することを特徴とする請求項1または2に記載のズーム制御装置。
The calculating unit calculates a ratio of the positions of the plurality of subject images in the horizontal direction or the vertical direction with respect to the angle of view of the image in the second processing;
The determination means determines a maximum ratio from a plurality of ratios calculated by the calculation means as a ratio occupied by a position of a subject image located closest to the angle of view of the image. Item 3. The zoom control device according to Item 1 or 2.
前記算出手段は、前記第2の処理にて前記画像の画角に対して水平方向および垂直方向において前記被写体像の位置が占める比率を算出し、
前記判定手段は、前記画像の画角に対して水平方向において前記被写体像の位置が占める比率と、前記画像の画角に対して垂直方向において前記被写体像の位置が占める比率とを比較して、大きい方の比率を決定することを特徴とする請求項1または2に記載のズーム制御装置。
The calculation means calculates a ratio of the position of the subject image in the horizontal direction and the vertical direction with respect to the angle of view of the image in the second process,
The determination means compares the ratio of the position of the subject image in the horizontal direction with respect to the angle of view of the image to the ratio of the position of the subject image in the direction perpendicular to the angle of view of the image. The zoom control apparatus according to claim 1, wherein the larger ratio is determined.
前記設定手段は、前記構図選択手段により選択された構図が変更された場合、前記基準サイズを変更することを特徴とする請求項1から4のいずれか1項に記載のズーム制御装置。   5. The zoom control apparatus according to claim 1, wherein the setting unit changes the reference size when the composition selected by the composition selection unit is changed. 6. 前記設定手段は、前記被写体検出手段により検出される被写体像の数が増加した場合、前記基準サイズを変更することを特徴とする請求項1から5のいずれか1項に記載のズーム制御装置。   6. The zoom control apparatus according to claim 1, wherein the setting unit changes the reference size when the number of subject images detected by the subject detection unit increases. 前記設定手段は、前記被写体検出手段により検出される被写体の数が減少した状態が設定された時間以上に継続した場合、前記基準サイズを変更することを特徴とする請求項1から6のいずれか1項に記載のズーム制御装置。   The said setting means changes the said reference | standard size, when the state in which the number of the subjects detected by the said subject detection means decreased continues for more than the set time. 2. A zoom control apparatus according to item 1. 前記設定手段は、前記被写体検出手段により検出される被写体像の中心位置が閾値より大きく移動した場合、前記基準サイズを変更することを特徴とする請求項1から7のいずれか1項に記載のズーム制御装置。   The said setting means changes the said reference | standard size, when the center position of the to-be-photographed image detected by the to-be-photographed object detection means moves more than a threshold value, The said reference size is changed. Zoom control device. 前記画角は、前記判定手段により決定された比率が算出された方向と、前記被写体検出手段により検出された被写体像の数から前記制御手段により決定されることを特徴とする請求項1から8のいずれか1項に記載のズーム制御装置。   The angle of view is determined by the control unit from the direction in which the ratio determined by the determination unit is calculated and the number of subject images detected by the subject detection unit. The zoom control device according to any one of the above. 請求項1から9のいずれか1項に記載のズーム制御装置と、
被写体像を光電変換して画像を生成する撮像手段と、
レンズの駆動または画像処理によりズーム倍率を変更するズーム手段を備え、
前記制御手段は前記ズーム手段を制御し、前記設定手段により設定された前記基準サイズに基づいて、前記被写体検出手段により検出される被写体像のサイズの変化に応じてズーム倍率を制御することを特徴とする撮像装置。
A zoom control device according to any one of claims 1 to 9,
Imaging means for photoelectrically converting a subject image to generate an image;
Comprising zoom means for changing the zoom magnification by driving the lens or image processing;
The control means controls the zoom means, and controls a zoom magnification according to a change in the size of the subject image detected by the subject detection means based on the reference size set by the setting means. An imaging device.
アスペクト比が異なる複数の画像を記録するモードを有し、
前記算出手段は、前記比率を算出する際に、前記複数の画像のうち水平方向および垂直方向ごとに画像のサイズが最も小さいサイズを用いて前記比率を算出することを特徴とする請求項10に記載の撮像装置。
It has a mode to record multiple images with different aspect ratios,
The calculation unit according to claim 10, wherein, when calculating the ratio, the ratio is calculated using a size having the smallest image size for each of a horizontal direction and a vertical direction among the plurality of images. The imaging device described.
ズーム制御装置にて実行される制御方法であって、
画像から検出された被写体像の検出情報を取得する取得ステップと、
複数の構図の中から特定の構図を自動で選択する構図選択ステップと、
前記画像の中心を基準として前記被写体像の位置を算出する第1の処理と、前記画像の画角に対して水平方向または垂直方向にて前記被写体像の位置が占める比率を算出する第2の処理とを行う算出ステップと、
前記取得ステップにより取得された検出情報において複数の被写体像が検出された場合、前記複数の被写体像に対して、前記算出ステップにより前記第2の処理で算出された被写体像ごとの前記比率を判定し、前記画像の画角に対して水平方向または垂直方向にて最も周辺に位置する被写体像の位置が占める比率を決定する判定ステップと、
前記構図選択ステップにより選択された構図と、前記判定ステップにより決定された前記比率と、前記複数の被写体像から選択される主被写体像のサイズから、ズーム倍率の制御に用いる被写体像の基準サイズを設定する設定ステップと、
前記設定ステップにより設定された基準サイズに基づいて、前記取得ステップにより取得される検出情報が示す被写体像のサイズの変化に応じてズーム倍率を制御する制御ステップと、を有することを特徴とするズーム制御装置の制御方法。
A control method executed by a zoom control device,
An acquisition step of acquiring detection information of the subject image detected from the image;
A composition selection step for automatically selecting a specific composition from a plurality of compositions;
A first process for calculating the position of the subject image with reference to the center of the image; and a second process for calculating a ratio of the position of the subject image in the horizontal direction or the vertical direction with respect to the angle of view of the image. A calculation step for performing processing;
When a plurality of subject images are detected in the detection information obtained by the obtaining step, the ratio for each subject image calculated in the second process by the calculating step is determined for the plurality of subject images. A determination step of determining a ratio occupied by the position of the subject image located closest to the periphery in the horizontal direction or the vertical direction with respect to the angle of view of the image;
Based on the composition selected in the composition selection step, the ratio determined in the determination step, and the size of the main subject image selected from the plurality of subject images, a reference size of the subject image used for zoom magnification control is determined. A setting step to set;
And a control step of controlling a zoom magnification according to a change in the size of the subject image indicated by the detection information acquired by the acquisition step based on the reference size set by the setting step. Control method of the control device.
請求項12に記載したズーム制御装置の制御方法の各ステップをコンピュータに実行させることを特徴とするズーム制御装置の制御プログラム。   A control program for a zoom control apparatus, which causes a computer to execute each step of the control method for a zoom control apparatus according to claim 12. 請求項13に記載のズーム制御装置の制御プログラムが記憶されていることを特徴とする記憶媒体。
14. A storage medium storing a control program for the zoom control apparatus according to claim 13.
JP2014260112A 2014-12-24 2014-12-24 Zoom control device, imaging device, control method for zoom control device, and control program for zoom control device Active JP6463123B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014260112A JP6463123B2 (en) 2014-12-24 2014-12-24 Zoom control device, imaging device, control method for zoom control device, and control program for zoom control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014260112A JP6463123B2 (en) 2014-12-24 2014-12-24 Zoom control device, imaging device, control method for zoom control device, and control program for zoom control device

Publications (3)

Publication Number Publication Date
JP2016122030A true JP2016122030A (en) 2016-07-07
JP2016122030A5 JP2016122030A5 (en) 2018-02-08
JP6463123B2 JP6463123B2 (en) 2019-01-30

Family

ID=56328291

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014260112A Active JP6463123B2 (en) 2014-12-24 2014-12-24 Zoom control device, imaging device, control method for zoom control device, and control program for zoom control device

Country Status (1)

Country Link
JP (1) JP6463123B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10652473B2 (en) 2017-07-28 2020-05-12 Canon Kabushiki Kaisha Zoom control device, zoom control method, control program, and imaging apparatus equipped with zoom control device
WO2020107372A1 (en) * 2018-11-30 2020-06-04 深圳市大疆创新科技有限公司 Control method and apparatus for photographing device, and device and storage medium
US10930003B2 (en) 2018-05-14 2021-02-23 Canon Kabushiki Kaisha Control apparatus, imaging apparatus, control method, and storage medium
US10999522B2 (en) 2018-05-14 2021-05-04 Canon Kabushiki Kaisha Control apparatus, control method, and computer-readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011130382A (en) * 2009-12-21 2011-06-30 Canon Inc Image-capturing apparatus and control method therefor
JP2011142645A (en) * 2011-02-04 2011-07-21 Sanyo Electric Co Ltd Imaging apparatus
JP2012095019A (en) * 2010-10-26 2012-05-17 Canon Inc Imaging device
JP2014007516A (en) * 2012-06-22 2014-01-16 Olympus Imaging Corp Photographing apparatus and photographing method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011130382A (en) * 2009-12-21 2011-06-30 Canon Inc Image-capturing apparatus and control method therefor
JP2012095019A (en) * 2010-10-26 2012-05-17 Canon Inc Imaging device
JP2011142645A (en) * 2011-02-04 2011-07-21 Sanyo Electric Co Ltd Imaging apparatus
JP2014007516A (en) * 2012-06-22 2014-01-16 Olympus Imaging Corp Photographing apparatus and photographing method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10652473B2 (en) 2017-07-28 2020-05-12 Canon Kabushiki Kaisha Zoom control device, zoom control method, control program, and imaging apparatus equipped with zoom control device
US11128805B2 (en) 2017-07-28 2021-09-21 Canon Kabushiki Kaisha Zoom control device, zoom control method, control program, and imaging apparatus equipped with zoom control device
US10930003B2 (en) 2018-05-14 2021-02-23 Canon Kabushiki Kaisha Control apparatus, imaging apparatus, control method, and storage medium
US10999522B2 (en) 2018-05-14 2021-05-04 Canon Kabushiki Kaisha Control apparatus, control method, and computer-readable storage medium
WO2020107372A1 (en) * 2018-11-30 2020-06-04 深圳市大疆创新科技有限公司 Control method and apparatus for photographing device, and device and storage medium

Also Published As

Publication number Publication date
JP6463123B2 (en) 2019-01-30

Similar Documents

Publication Publication Date Title
JP6436760B2 (en) Zoom control device, imaging device, control method for zoom control device, and control program for zoom control device
JP6618255B2 (en) Zoom control device, imaging device, control method for zoom control device, control program for zoom control device, and storage medium
JP6735583B2 (en) Zoom control device, imaging device and control method thereof, program, and storage medium
CN110536069B (en) Zoom control device, control method of zoom control device, and recording medium
JP6436761B2 (en) Zoom control device, imaging device, control method for zoom control device, and control program for zoom control device
JP7073550B2 (en) Zoom control device, image pickup device, control method of zoom control device, control program of zoom control device
JP6296801B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND IMAGING DEVICE CONTROL PROGRAM
JP6429454B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND IMAGING DEVICE CONTROL PROGRAM
JP6512897B2 (en) Zoom control device, control method of zoom control device
JP6370140B2 (en) Zoom control device, imaging device, control method for zoom control device, control program for zoom control device, and storage medium
US20170104938A1 (en) Image pickup apparatus having zoom function, method of controlling the same, and storage medium
JP6366395B2 (en) Zoom control device, imaging device, control method for zoom control device, control program for subject detection device, and storage medium
JP2019029998A (en) Imaging apparatus, control method of imaging apparatus and control program
JP6463123B2 (en) Zoom control device, imaging device, control method for zoom control device, and control program for zoom control device
JP6224925B2 (en) Control device and angle of view control method
JP6624875B2 (en) Zoom control device, imaging device, control method for zoom control device, control program for zoom control device, and storage medium
JP6335520B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND IMAGING DEVICE CONTROL PROGRAM
JP6188455B2 (en) Control apparatus, imaging system, angle of view control method, program, and storage medium
JP6437066B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND IMAGING DEVICE CONTROL PROGRAM
JP2020101730A (en) Imaging device and control method for the same

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171218

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20171218

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20181031

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20181204

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181228

R151 Written notification of patent or utility model registration

Ref document number: 6463123

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151