JP2013120273A - Digital camera - Google Patents

Digital camera Download PDF

Info

Publication number
JP2013120273A
JP2013120273A JP2011267901A JP2011267901A JP2013120273A JP 2013120273 A JP2013120273 A JP 2013120273A JP 2011267901 A JP2011267901 A JP 2011267901A JP 2011267901 A JP2011267901 A JP 2011267901A JP 2013120273 A JP2013120273 A JP 2013120273A
Authority
JP
Japan
Prior art keywords
main subject
focus
subject
focus position
digital camera
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.)
Pending
Application number
JP2011267901A
Other languages
Japanese (ja)
Inventor
Naohito Nakahara
尚人 中原
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.)
Nikon Corp
Original Assignee
Nikon Corp
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 Nikon Corp filed Critical Nikon Corp
Priority to JP2011267901A priority Critical patent/JP2013120273A/en
Publication of JP2013120273A publication Critical patent/JP2013120273A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Focusing (AREA)
  • Automatic Focus Adjustment (AREA)
  • Studio Devices (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce consumption power.SOLUTION: A digital camera comprises: automatic photographing means 15 for automatically performing a photographing operation when a determination is made that a distance between a first focusing position relating to a first principle subject and a second focusing position related to a second principle subject is within a predetermined determination threshold; stopping means 15 for stopping a search operation of contrast type focus detecting means when the distance is determined to be out of the determination threshold; size detecting means 15 for detecting a change in the size of an image of at least one of the first and second principle subjects when the distance is determined to be out of the determination threshold; approach determining means 15 for determining based on the detected change in size that whether the first and second principle subjects have approached to each other; and exerting means 15 for cancelling the stop of a search operation when a determination is made that the first and second principle subjects have approached to each other, and exerting the search operation again.

Description

本発明は、デジタルカメラに関する。   The present invention relates to a digital camera.

次のような自動撮像装置が知られている。この自動撮像装置は、自動撮像装置から第1の被写体までの距離を計測して、計測した距離を含む所定の範囲を撮影を許可する範囲として設定し、その後、第2の被写体が設定した範囲内に入ると、自動的に撮影を行う(特許文献1参照)。   The following automatic imaging apparatus is known. The automatic imaging apparatus measures the distance from the automatic imaging apparatus to the first subject, sets a predetermined range including the measured distance as a range where photography is permitted, and then the range set by the second subject. When entering, the image is automatically taken (see Patent Document 1).

特開2010−193423号公報JP 2010-193423 A

従来技術では、第2の被写体が上記設定した範囲内に入ったかを監視するために、常時フォーカス動作を行って自動撮像装置から第2の被写体までの距離を測定しなければならず、消費電力が大きくなるという問題があった。   In the prior art, in order to monitor whether the second subject is within the set range, it is necessary to always perform a focusing operation to measure the distance from the automatic imaging device to the second subject, and to reduce power consumption. There was a problem that became larger.

本発明によるデジタルカメラは、撮影光学系により被写体像を撮像して被写体画像信号を出力する撮像手段と、被写体画像信号から少なくとも第1の主要被写体と第2の主要被写体とを周期的にそれぞれ検出する被写体認識手段と、撮影光学系のフォーカスレンズを光軸方向にサーチして、第1の主要被写体に関する第1の合焦位置と第2の主要被写体に関する第2の合焦位置とをそれぞれ検出するコントラスト式焦点検出手段と、第1の合焦位置および第2の合焦位置の少なくとも一方に基づき焦点調節を行う焦点調節手段と、第1の合焦位置と第2の合焦位置との間の距離が、所定の判定閾値以内か否かを判定する距離判定手段と、距離判定手段によって距離が判定閾値内であると判定された場合に、自動的に撮影動作を実行する自動撮影手段と、距離判定手段によって距離が判定閾値外であると判定された場合に、コントラスト式焦点検出手段のサーチ動作を停止させる停止手段と、距離判定手段によって距離が判定閾値外であると判定された場合に、第1の主要被写体および第2の主要被写体の少なくとも一方の画像のサイズの変化を検出するサイズ検出手段と、サイズ検出手段によって検出されたサイズ変化に基づき、第1の主要被写体と第2の主要被写体とが互いに接近しているか否かを判定する接近判定手段と、接近判定手段により第1の主要被写体と第2の主要被写体が互いに接近していると判定された場合に、停止手段によるサーチ動作の停止を解除してサーチ動作を再実行させる実行手段と、を備えることを特徴とする。   A digital camera according to the present invention periodically detects at least a first main subject and a second main subject from an image pickup unit that picks up a subject image by a photographing optical system and outputs a subject image signal, and the subject image signal. A subject recognizing unit that performs the search and a focus lens of the photographing optical system in the optical axis direction to detect a first in-focus position relating to the first main subject and a second in-focus position relating to the second main subject, respectively. Contrast-type focus detection means, focus adjustment means for performing focus adjustment based on at least one of the first focus position and the second focus position, and the first focus position and the second focus position. A distance determination unit that determines whether or not the distance is within a predetermined determination threshold, and automatic shooting that automatically performs a shooting operation when the distance determination unit determines that the distance is within the determination threshold And the distance determining means determine that the distance is outside the determination threshold, and the distance determining means determines that the distance is outside the determination threshold. The size detection means for detecting a change in the size of at least one of the first main subject and the second main subject, and the first main subject based on the size change detected by the size detection means. When it is determined that the first main subject and the second main subject are approaching each other by the approach determination unit that determines whether or not the second main subject is close to each other, And executing means for releasing the stop of the search operation by the stop means and re-executing the search operation.

本発明によれば、消費電力を低減できる。   According to the present invention, power consumption can be reduced.

本発明の一実施の形態によるデジタルカメラの構成例を説明するブロック図である。It is a block diagram explaining the structural example of the digital camera by one embodiment of this invention. 自動撮影モード処理を説明するフローチャートである。It is a flowchart explaining an automatic imaging | photography mode process. 第1のAF処理を説明するフローチャートである。It is a flowchart explaining a 1st AF process. 第1のAF処理を説明する図である。It is a figure explaining the 1st AF processing. 主要被写体の画像サイズと合焦位置の関係を説明する図である。It is a figure explaining the relationship between the image size of a main subject, and a focus position. 主要被写体の画像サイズと合焦位置の関係を説明する図である。It is a figure explaining the relationship between the image size of a main subject, and a focus position. 第2のAF処理を説明するフローチャートである。It is a flowchart explaining a 2nd AF process. 第2のAF処理におけるサーチ範囲を説明する図である。It is a figure explaining the search range in the 2nd AF processing.

以下、図面を参照して本発明を実施するための形態について説明する。図1は、本発明の一実施の形態によるデジタルカメラの構成例を示すブロック図である。このデジタルカメラは、撮影光学系11と、撮像素子12と、レンズ駆動制御回路13と、画像信号処理回路14と、CPU15と、表示部16と、操作部材17とを含む。   Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings. FIG. 1 is a block diagram illustrating a configuration example of a digital camera according to an embodiment of the present invention. The digital camera includes a photographing optical system 11, an image sensor 12, a lens drive control circuit 13, an image signal processing circuit 14, a CPU 15, a display unit 16, and an operation member 17.

撮影光学系11は、ズームレンズやフォーカシングレンズを含む複数のレンズ群で構成され、被写体像を撮像素子12の受光面に結像させる。なお、図1を簡単にするため、撮影光学系11を単レンズとして図示している。レンズ駆動制御回路13は、CPU15からの指示に応じて光学系駆動機構(不図示)を駆動する。光学系駆動機構に含まれるフォーカシングレンズ駆動部材が撮影光学系11のフォーカシングレンズを光軸方向に進退駆動し、光学系駆動機構に含まれるズームレンズ駆動部材が撮影光学系11のズームレンズを光軸方向に進退駆動する。   The photographing optical system 11 includes a plurality of lens groups including a zoom lens and a focusing lens, and forms a subject image on the light receiving surface of the image sensor 12. In order to simplify FIG. 1, the photographing optical system 11 is shown as a single lens. The lens drive control circuit 13 drives an optical system drive mechanism (not shown) in response to an instruction from the CPU 15. A focusing lens driving member included in the optical system driving mechanism drives the focusing lens of the photographing optical system 11 to advance and retreat in the optical axis direction, and a zoom lens driving member included in the optical system driving mechanism drives the zoom lens of the photographing optical system 11 to the optical axis. Drive forward and backward in the direction.

撮像素子12は、画素を構成する受光素子のフォトダイオードが受光面に二次元配列されたCMOSイメージセンサなどによって構成される。撮像素子12は、撮影光学系11を通過した光束による像を光電変換して、画像信号を出力する。   The imaging element 12 is configured by a CMOS image sensor or the like in which photodiodes of light receiving elements constituting pixels are two-dimensionally arranged on the light receiving surface. The image sensor 12 photoelectrically converts an image of a light beam that has passed through the photographing optical system 11 and outputs an image signal.

撮像素子12から出力された画像信号は、不図示のA/D変換回路によりデジタル画像データに変換された後、画像信号処理回路14に入力される。画像信号処理回路14は、デジタル画像データに対して各種の画像処理(色補間処理、階調変換処理、輪郭強調処理、ホワイトバランス調整処理など)を施す。   The image signal output from the image sensor 12 is converted into digital image data by an A / D conversion circuit (not shown) and then input to the image signal processing circuit 14. The image signal processing circuit 14 performs various types of image processing (color interpolation processing, gradation conversion processing, contour enhancement processing, white balance adjustment processing, etc.) on the digital image data.

CPU15は、デジタルカメラ内の各ブロックから出力される信号を入力して所定の演算を行い、演算結果に基づく制御信号を各ブロックへ出力する。表示部16は液晶パネルなどによって構成される。表示部16は、CPU15からの指示に応じて画像や操作アイコン、メニュー画面などを表示する。   The CPU 15 inputs a signal output from each block in the digital camera, performs a predetermined calculation, and outputs a control signal based on the calculation result to each block. The display unit 16 is configured by a liquid crystal panel or the like. The display unit 16 displays an image, an operation icon, a menu screen, and the like according to an instruction from the CPU 15.

操作部材17は、使用者によって操作される種々の入力部材、例えば電源ボタン、レリーズボタン、撮影モードボタンなどを含み、各ボタンの操作に応じた信号をCPU15へ出力する。なお、撮影モードボタンは、通常撮影モード/自動撮影モード(後述する)を切り替えるためのボタンである。   The operation member 17 includes various input members operated by the user, for example, a power button, a release button, a photographing mode button, and the like, and outputs a signal corresponding to the operation of each button to the CPU 15. The shooting mode button is a button for switching between normal shooting mode / automatic shooting mode (described later).

<フォーカス調節>
CPU15は、撮像素子12が有する画素のうち、AFエリアに対応する画素からのデータに基づいてコントラスト検出方式によるフォーカス調節(コントラストAF)を行う。コントラストAFでは、所定のサーチ範囲(たとえば、至近端から無限端までの範囲)内でフォーカスレンズを移動させながら、コントラストが最大になるレンズ位置を探し、該レンズ位置へフォーカスレンズを移動させることによってデジタルカメラの焦点調節を行う。
<Focus adjustment>
The CPU 15 performs focus adjustment (contrast AF) by a contrast detection method based on data from pixels corresponding to the AF area among the pixels of the image sensor 12. In contrast AF, the focus lens is moved within a predetermined search range (for example, the range from the closest end to the infinite end), and the lens position where the contrast is maximized is searched, and the focus lens is moved to the lens position. To adjust the focus of the digital camera.

具体的には、AFエリアに対応する画像データの低周波数成分、とくに直流成分を除去するようにフィルタ処理を施し、該フィルタ処理後の画像データを積算する。積算処理では、高周波数成分による差分を積算するために、画像データの絶対値を積算する。   Specifically, filter processing is performed so as to remove low-frequency components, particularly DC components, of the image data corresponding to the AF area, and the image data after the filter processing is integrated. In the integration process, the absolute values of the image data are integrated in order to integrate the differences due to the high frequency components.

CPU15は、上記積算値を用いて焦点評価値(コントラスト値)を得る。コントラスト値のピークに対応するレンズ位置が、フォーカスレンズの合焦位置である。CPU15は、コントラスト値のピークを検出すると、レンズ駆動制御回路13に指示を送り、コントラスト値のピークに対応するレンズ位置へフォーカスレンズを移動させる。   The CPU 15 obtains a focus evaluation value (contrast value) using the integrated value. The lens position corresponding to the peak of the contrast value is the focus position of the focus lens. When detecting the peak of the contrast value, the CPU 15 sends an instruction to the lens drive control circuit 13 to move the focus lens to a lens position corresponding to the peak of the contrast value.

<自動撮影モード処理>
本実施形態のデジタルカメラは、レリーズボタンの全押し操作に応じて画像を取得して不図示の記録部に記録する通常撮影モードに加え、レリーズボタンの全押し操作によらず自動で画像を取得して記録部に記録する自動撮影モードを有する。上記デジタルカメラは、この自動撮影モードにおける処理に特徴を有するので、以降の説明はこのモードにおける自動撮影処理を中心に行う。
<Automatic shooting mode processing>
In addition to the normal shooting mode in which the digital camera of this embodiment acquires an image in response to the release button full-press operation and records it in a recording unit (not shown), the image is automatically acquired regardless of the release button full-press operation. And an automatic photographing mode for recording in the recording unit. Since the digital camera has a feature in processing in this automatic shooting mode, the following description will be focused on automatic shooting processing in this mode.

図2は、CPU15が実行する自動撮影モード処理の流れを説明するフローチャートである。CPU15は、撮影モードスイッチからの信号に応じて、撮影モードを通常撮影モードから自動撮影モードに切り替えて、図2の処理を行うプログラムを起動する。または、自動撮影モードに切り替えられた後に、操作部材17を操作することで自動撮影処理を開始するようにしてもよい。なお、このプログラムは、CPU15内のROM(不図示)に格納されている。   FIG. 2 is a flowchart for explaining the flow of automatic shooting mode processing executed by the CPU 15. In response to a signal from the shooting mode switch, the CPU 15 switches the shooting mode from the normal shooting mode to the automatic shooting mode, and starts a program for performing the processing of FIG. Alternatively, the automatic photographing process may be started by operating the operation member 17 after switching to the automatic photographing mode. This program is stored in a ROM (not shown) in the CPU 15.

ステップS10において、CPU15は、被写体認識処理によって主要被写体が検出されたか否かを判定する。被写体認識処理は、周期的にスルー画像信号から主要被写体画像を検出する処理であり、自動撮影モード処理と並行して実行される。被写体認識処理では、例えば、大人、子供、ペットなどを区別して認識する。このような被写体認識処理としては、公知の被写体認識技術を用いることができる。なお、スルー画像信号は、記録用画像の取得(すなわち撮影)前に撮像素子12によって所定時間間隔ごとに繰り返し撮像されて出力される信号である。この信号に基づいて、モニタ用画像が表示部16に逐次表示される。   In step S10, the CPU 15 determines whether or not a main subject has been detected by subject recognition processing. The subject recognition processing is processing for periodically detecting the main subject image from the through image signal, and is executed in parallel with the automatic shooting mode processing. In the subject recognition process, for example, adults, children, pets, etc. are distinguished and recognized. As such subject recognition processing, a known subject recognition technique can be used. Note that the through image signal is a signal that is repeatedly imaged at predetermined time intervals by the image sensor 12 and output before the recording image is acquired (that is, imaged). Based on this signal, the monitor image is sequentially displayed on the display unit 16.

本実施形態の自動撮影モードは、2つの主要被写体を撮影する、いわゆるツーショット撮影に特化したモードである。上記デジタルカメラでは、予め、ユーザにより操作部材17の選択ボタンを介して自動撮影モードにおける2つの主要被写体の組み合わせ(例えば、人&ペット、大人&子供、人&人などの中から一の組み合わせ)が選択される。上記被写体認識処理では、選択された2つの主要被写体について、スルー画像内における各主要被写体画像の位置およびサイズを検出し、不図示のメモリに記憶する。   The automatic shooting mode of the present embodiment is a mode specialized for so-called two-shot shooting in which two main subjects are shot. In the digital camera, a combination of two main subjects in the automatic shooting mode in advance by the user via a selection button of the operation member 17 (for example, one combination among people & pets, adults & children, people & people, etc.) Is selected. In the subject recognition process, the position and size of each main subject image in the through image are detected for the two selected main subjects and stored in a memory (not shown).

CPU15は、上記2つの主要被写体の双方が上記被写体認識処理によって検出された場合にステップS10を肯定判定して、ステップS20へ進む。CPU15は、上記被写体認識処理により、上記2つの主要被写体の双方が検出されない場合、または上記2つの主要被写体のうちどちらか一方のみが検出された場合にはステップS10を否定判定し、当該判定処理を繰り返す。   If both of the two main subjects are detected by the subject recognition process, the CPU 15 makes a positive determination in step S10 and proceeds to step S20. When both of the two main subjects are not detected by the subject recognition process, or when only one of the two main subjects is detected, the CPU 15 makes a negative determination in step S10 and performs the determination process. repeat.

ステップS20においてCPU15は、第1のAF処理を実行する。ここで第1のAF処理の詳細について、図3を用いて説明する。ステップS201においてCPU15は、撮影許可フラグを初期値であるOFFにセットして、ステップS202へ進む。撮影許可フラグは、自動撮影を行うか否かを示すフラグである。   In step S20, the CPU 15 executes a first AF process. Details of the first AF process will be described with reference to FIG. In step S201, the CPU 15 sets the photographing permission flag to OFF, which is an initial value, and proceeds to step S202. The photographing permission flag is a flag indicating whether or not automatic photographing is performed.

ステップS202においてCPU15は、至近端から無限端までの範囲を、コントラストAFにおけるサーチ範囲として設定して、ステップS203へ進む。   In step S202, the CPU 15 sets a range from the closest end to the infinite end as a search range in contrast AF, and proceeds to step S203.

ステップS203においてCPU15は、図4(A)に示すように、被写体認識処理によって検出された2つの主要被写体画像(第1主要被写体画像G1および第2主要被写体画像G2)に対応する領域(例えば各画像を囲む領域)を、それぞれAFエリア(第1被写体AFエリアA1および第2被写体AFエリアA2)として設定して、ステップS204へ進む。   In step S203, as shown in FIG. 4A, the CPU 15 has regions (for example, each of the main subject images G1 and the second main subject image G2) detected by the subject recognition process (for example, each main subject image G2). Each area surrounding the image is set as an AF area (first subject AF area A1 and second subject AF area A2), and the process proceeds to step S204.

ステップS204においてCPU15は、レンズ駆動制御回路13へ指示を送り、フォーカスレンズを初期位置(サーチ開始位置、例えば至近端)へ駆動させて、ステップS205へ進む。   In step S204, the CPU 15 sends an instruction to the lens drive control circuit 13, drives the focus lens to an initial position (search start position, for example, the closest end), and proceeds to step S205.

ステップS205においてCPU15は、初期位置において、第1被写体AFエリアA1および第2被写体AFエリアA2について、それぞれ、フォーカスレンズ位置に対応付けてコントラスト値を取得してステップS206へ進む。   In step S205, the CPU 15 obtains a contrast value in association with the focus lens position for the first subject AF area A1 and the second subject AF area A2 at the initial position, and proceeds to step S206.

ステップS206においてCPU15は、レンズ駆動制御回路13へ指示を送り、フォーカスレンズの所定の速度および所定方向(例えば、至近端から無限端へ向かう方向)へのサーチ駆動を開始させて、ステップS207へ進む。   In step S206, the CPU 15 sends an instruction to the lens drive control circuit 13 to start search drive in a predetermined speed and a predetermined direction (for example, a direction from the closest end to the infinite end) of the focus lens, and then proceeds to step S207. move on.

ステップS207においてCPU15は、所定時間ごとに、第1被写体AFエリアA1および第2被写体AFエリアA2について、それぞれ、フォーカスレンズ位置に対応付けてコントラスト値を取得するとともに、コントラスト値のピークを判定する処理を行ってステップS208へ進む。なお、図4(B)は、フォーカスレンズ位置とコントラスト値との関係(コントラスト曲線)の一例を示す図である。図4(B)において、横軸はフォーカスレンズ位置であり、縦軸はコントラスト値を表す。また、上段は第2被写体AFエリアA2のコントラスト曲線を示し、下段は第1被写体AFエリアA1のコントラスト曲線を示す。   In step S207, the CPU 15 obtains a contrast value in association with the focus lens position for each of the first subject AF area A1 and the second subject AF area A2 at predetermined time intervals, and determines a contrast value peak. To go to step S208. FIG. 4B is a diagram illustrating an example of the relationship (contrast curve) between the focus lens position and the contrast value. In FIG. 4B, the horizontal axis represents the focus lens position, and the vertical axis represents the contrast value. The upper row shows the contrast curve of the second subject AF area A2, and the lower row shows the contrast curve of the first subject AF area A1.

ステップS208においてCPU15は、第1被写体AFエリアA1および第2被写体AFエリアA2の双方において、コントラスト値のピークが検出されたか否かを判定する。CPU15は、これらの双方においてコントラスト値のピークが検出された場合に、ステップS208を肯定判定してステップS210へ進む。一方、いずれか一方のみコントラスト値のピークが検出された場合、または、双方ともコントラスト値のピークが検出されない場合には、ステップS208を否定判定してステップS209へ進む。   In step S208, the CPU 15 determines whether or not a contrast value peak has been detected in both the first subject AF area A1 and the second subject AF area A2. When the peak of the contrast value is detected in both of these, the CPU 15 makes an affirmative decision in step S208 and proceeds to step S210. On the other hand, if only one of the contrast value peaks is detected, or if no contrast value peak is detected for both, a negative determination is made in step S208 and the process proceeds to step S209.

ステップS209において、CPU15は、フォーカスレンズの位置がサーチ終了位置(例えば、無限端)であるか否かを判定する。CPU15は、サーチ終了位置である場合にステップS209を肯定判定してステップS210へ進み、サーチ終了位置でない場合にはステップS209を否定判定してステップS207へ戻る。ステップS207へ戻る場合は、上述した処理を繰り返す。   In step S209, the CPU 15 determines whether or not the position of the focus lens is a search end position (for example, an infinite end). If it is the search end position, the CPU 15 makes an affirmative determination in step S209 and proceeds to step S210. If it is not the search end position, the CPU 15 makes a negative determination in step S209 and returns to step S207. When returning to step S207, the above-described processing is repeated.

ステップS210においてCPU15は、レンズ駆動制御回路13へ指示を送り、フォーカスレンズのサーチ駆動を停止させて、ステップS211へ進む。   In step S210, the CPU 15 sends an instruction to the lens drive control circuit 13, stops the search driving of the focus lens, and proceeds to step S211.

ステップS211においてCPU15は、第1被写体AFエリアA1においてコントラスト値のピークが検出されたか否かを判定する。CPU15は、当該ピークが検出された場合にステップS211を肯定判定してステップS212へ進み、当該ピークが検出されなかった場合にはステップS211を否定判定してステップS218へ進む。   In step S211, the CPU 15 determines whether or not a contrast value peak is detected in the first subject AF area A1. If the peak is detected, the CPU 15 makes an affirmative determination in step S211 and proceeds to step S212. If the peak is not detected, the CPU 15 makes a negative determination in step S211 and proceeds to step S218.

ステップS212においてCPU15は、第1被写体AFエリアのコントラスト値のピークに対応するフォーカスレンズの位置(すなわち第1主要被写体の合焦位置)P1と、被写体認識処理によって得られた第1主要被写体画像G1のサイズとを組み合わせて不図示のメモリに記憶させ、ステップS213へ進む。   In step S212, the CPU 15 determines the position of the focus lens (that is, the focus position of the first main subject) P1 corresponding to the contrast value peak of the first subject AF area, and the first main subject image G1 obtained by subject recognition processing. Are combined and stored in a memory (not shown), and the process proceeds to step S213.

ステップS213においてCPU15は、第2被写体AFエリアA2においてコントラスト値のピークが検出されたか否かを判定する。CPU15は、当該ピークが検出された場合にステップS213を肯定判定してステップS214へ進み、当該ピークが検出されなかった場合にはステップS213を否定判定してステップS220へ進む。   In step S213, the CPU 15 determines whether or not a contrast value peak is detected in the second subject AF area A2. If the peak is detected, the CPU 15 makes an affirmative determination in step S213 and proceeds to step S214. If the peak is not detected, the CPU 15 makes a negative determination in step S213 and proceeds to step S220.

ステップS214においてCPU15は、第2被写体AFエリアA2のコントラスト値のピークに対応するフォーカスレンズの位置(すなわち第2主要被写体の合焦位置)P2と、被写体認識処理によって得られた第2主要被写体画像G2のサイズとを組み合わせて不図示のメモリに記憶させ、ステップS215へ進む。   In step S214, the CPU 15 determines the position of the focus lens (that is, the focus position of the second main subject) P2 corresponding to the contrast value peak of the second subject AF area A2, and the second main subject image obtained by the subject recognition process. The size of G2 is combined and stored in a memory (not shown), and the process proceeds to step S215.

ステップS215においてCPU15は、レンズ駆動制御回路13へ指示を送り、第1主要被写体の合焦位置P1および第2主要被写体の合焦位置P2のうち至近側の方(図4(B)では合焦位置P2)へフォーカスレンズを駆動させてステップS216へ進む。この結果、第1主要被写体および第2主要被写体のうち、撮影距離が短い(すなわちデジタルカメラに近い)方の主要被写体に焦点が合う。なお、第1主要被写体および第2主要被写体のうち、撮影距離が長い方の主要被写体に焦点が合うようにしてもよい。または、焦点を合わせる主要被写体を、ユーザが操作部材17を介して選択できるようにしてもよい。   In step S 215, the CPU 15 sends an instruction to the lens drive control circuit 13, and the in-focus position P 1 of the first main subject and the in-focus position P 2 of the second main subject are in focus (in FIG. 4B, in-focus). The focus lens is driven to position P2), and the process proceeds to step S216. As a result, of the first main subject and the second main subject, the main subject having the shorter shooting distance (that is, closer to the digital camera) is focused. Of the first main subject and the second main subject, the main subject with the longer shooting distance may be focused. Alternatively, the main subject to be focused may be selected by the user via the operation member 17.

ステップS216においてCPU15は、第1主要被写体の合焦位置P1と第2主要被写体の合焦位置P2との間の距離が所定の判定閾値Th内か否かを判定する。判定閾値Thは、例えば、合焦位置P1またはP2のいずれか一方にフォーカスレンズの位置を合わせたときに、第1主要被写体および第2主要被写体の双方に焦点が合うか否かを判定するための値であり、撮影光学系11の焦点深度によって定まる値である。したがって、第1主要被写体および第2主要被写体の合焦位置間(P1〜P2)の距離が判定閾値Th内であることは、例えば、第1主要被写体に焦点を合わせたときに第2主要被写体も焦点が合う(すなわち第1主要被写体および第2主要被写体の双方が撮影光学系11の被写界深度内となる)ことを意味する。一方、第1主要被写体および第2主要被写体の合焦位置間(P1〜P2)の距離が判定閾値Th外であることは、例えば、第1主要被写体に焦点を合わせたときに第2主要被写体の焦点が合わない(すなわち第2主要被写体が撮影光学系11の被写界深度外となる)ことを意味する。   In step S216, the CPU 15 determines whether or not the distance between the focus position P1 of the first main subject and the focus position P2 of the second main subject is within a predetermined determination threshold Th. The determination threshold Th is, for example, for determining whether or not both the first main subject and the second main subject are in focus when the position of the focus lens is aligned with either the in-focus position P1 or P2. Which is determined by the depth of focus of the photographic optical system 11. Therefore, the fact that the distance between the in-focus positions (P1 to P2) of the first main subject and the second main subject is within the determination threshold Th is, for example, that when the first main subject is focused, Is also in focus (that is, both the first main subject and the second main subject are within the depth of field of the photographing optical system 11). On the other hand, the distance between the in-focus positions (P1 to P2) of the first main subject and the second main subject is outside the determination threshold Th, for example, when the second main subject is focused on the first main subject. Is out of focus (that is, the second main subject is outside the depth of field of the photographing optical system 11).

そこでCPU15は、上記距離が判定閾値Th外である場合には、ステップS216を否定判定して、撮影許可フラグをOFFにセットしたまま、図3の処理を終了する。一方、上記距離が判定閾値Th内である場合には、ステップS216を肯定判定してステップS217へ進む。ステップS217においてCPU15は、撮影許可フラグをONにセットして、図3の処理を終了する。   Therefore, if the distance is outside the determination threshold Th, the CPU 15 makes a negative determination in step S216, and ends the process of FIG. 3 while setting the photographing permission flag to OFF. On the other hand, if the distance is within the determination threshold Th, an affirmative determination is made in step S216 and the process proceeds to step S217. In step S217, the CPU 15 sets the photographing permission flag to ON and ends the processing in FIG.

ステップS211を否定判定して進むステップS218では、ステップS213と同様に、CPU15は、第2被写体AFエリアA2においてコントラスト値のピークが検出されたか否かを判定する。CPU15は、当該ピークが検出された場合にステップS218を肯定判定してステップS219へ進み、当該ピークが検出されなかった場合にはステップS218を否定判定してステップS221へ進む。   In step S218, which proceeds after making a negative determination in step S211, the CPU 15 determines whether or not a contrast value peak has been detected in the second subject AF area A2, as in step S213. If the peak is detected, the CPU 15 makes an affirmative decision in step S218 and proceeds to step S219. If the peak is not detected, the CPU 15 makes a negative decision in step S218 and proceeds to step S221.

ステップS219においてCPU15は、第2被写体AFエリアA2のコントラスト値のピークに対応するフォーカスレンズの位置(すなわち第2主要被写体の合焦位置)P2と、被写体認識処理によって得られた第2主要被写体画像G2のサイズとを組み合わせて不図示のメモリに記憶させ、ステップS220へ進む。   In step S219, the CPU 15 determines the focus lens position P2 (that is, the focus position of the second main subject) corresponding to the peak contrast value of the second subject AF area A2, and the second main subject image obtained by subject recognition processing. The size of G2 is combined and stored in a memory (not shown), and the process proceeds to step S220.

ステップS220へ進む場合は、第1主要被写体または第2主要被写体のどちらか一方の合焦位置が検出されている。そこで、ステップS220において、CPU15は、レンズ駆動制御回路13へ指示を送り、検出された合焦位置(P1もしくはP2)へフォーカスレンズを駆動させて、図3の処理を終了する。   When the process proceeds to step S220, the in-focus position of either the first main subject or the second main subject is detected. Therefore, in step S220, the CPU 15 sends an instruction to the lens drive control circuit 13, drives the focus lens to the detected focus position (P1 or P2), and ends the process of FIG.

一方、ステップS221へ進む場合は、第1主要被写体および第2主要被写体のどちらの合焦位置も検出されていない。そこで、ステップS221において、CPU15は、レンズ駆動制御回路13へ指示を送り、フォーカスレンズを所定のレンズ位置へ駆動させて、図3の処理を終了する。ここで、所定のレンズ位置とは、主要被写体を検出しやすい位置であり、例えば、撮影距離2mの被写体にピントが合う位置である。なお、上記所定のレンズ位置は、撮影光学系11の焦点距離およびズーム比に応じて変更するようにしてもよい。   On the other hand, when the process proceeds to step S221, neither in-focus position of the first main subject or the second main subject is detected. Therefore, in step S221, the CPU 15 sends an instruction to the lens drive control circuit 13, drives the focus lens to a predetermined lens position, and ends the process of FIG. Here, the predetermined lens position is a position where the main subject can be easily detected, for example, a position where the subject at the shooting distance of 2 m is focused. The predetermined lens position may be changed according to the focal length and zoom ratio of the photographing optical system 11.

CPU15は、このようにして第1のAF処理を終了すると、ステップS30(図2)へ進む。ステップS30において、CPU15は、撮影許可フラグがONであるか否かを判定する。撮影許可フラグがONである場合、ステップS40へ進む。   When the CPU 15 ends the first AF process in this way, the process proceeds to step S30 (FIG. 2). In step S30, the CPU 15 determines whether or not the photographing permission flag is ON. If the photographing permission flag is ON, the process proceeds to step S40.

ステップS40においてCPU15は、撮影処理を実行する。すなわち、撮像素子12に記録用の光電変換を行わせ、撮像素子12から出力された画像信号に基づく被写体画像データを記録部(不図示)に記録する。その後、図2による処理を終了する。この結果、第1主要被写体および第2主要被写体の双方に焦点が合った画像を撮影できる。   In step S40, the CPU 15 executes a photographing process. That is, the image sensor 12 performs photoelectric conversion for recording, and the subject image data based on the image signal output from the image sensor 12 is recorded in a recording unit (not shown). Thereafter, the processing according to FIG. As a result, an image focused on both the first main subject and the second main subject can be taken.

一方、上記ステップS30において撮影許可フラグがONではない(すなわちOFFである)場合、CPU15は、ステップS50へ進む。ステップS50においてCPU15は、直近の被写体認識処理の結果を基に、スルー画像信号から第1主要被写体画像G1および第2主要被写体画像G2のいずれか一方、または双方が消失したか否かを判定する。CPU15は、被写体認識処理において、第1主要被写体画像G1および第2主要被写体画像G2のいずれか一方、または双方が検出されなくなった場合にはステップS50を肯定判定し、ステップS10へ戻る。一方、双方が検出されている場合にはステップS50を否定判定し、ステップS60へ進む。   On the other hand, if the photographing permission flag is not ON (that is, is OFF) in step S30, the CPU 15 proceeds to step S50. In step S50, the CPU 15 determines whether one or both of the first main subject image G1 and the second main subject image G2 have disappeared from the through image signal based on the result of the latest subject recognition process. . In the subject recognition process, if either one or both of the first main subject image G1 and the second main subject image G2 are not detected, the CPU 15 makes an affirmative decision in step S50 and returns to step S10. On the other hand, if both are detected, a negative determination is made in step S50, and the process proceeds to step S60.

ステップS60においてCPU15は、被写体認識処理によって直近に検出された第1主要被写体画像G1および第2主要被写体画像G2のサイズを取得して、ステップS70へ進む。   In step S60, the CPU 15 acquires the sizes of the first main subject image G1 and the second main subject image G2 most recently detected by the subject recognition process, and proceeds to step S70.

ステップS70においてCPU15は、第1の主要被写体および第2の主要被写体同士が撮影光学系11の光軸方向に互いに接近しているか否かを判定する。具体的に、CPU15は、直近のAF処理(上記第1のAF処理、または後述する第2のAF処理)においてメモリに記憶された、第1主要被写体の合焦位置P1および第1主要被写体画像G1のサイズと、第2主要被写体の合焦位置P2および第2主要被写体画像G2のサイズとを読み出す。CPU15は、読み出した合焦位置P1およびP2を比較し、どちらが至近側でどちらが無限側かを認識する。またCPU15は、読み出した第1主要被写体画像G1のサイズおよび第2主要被写体画像G2のサイズと、直近の被写体認識処理によって検出された第1主要被写体画像G1および第2主要被写体画像G2のサイズとをそれぞれ比較する。   In step S <b> 70, the CPU 15 determines whether or not the first main subject and the second main subject are close to each other in the optical axis direction of the photographing optical system 11. Specifically, the CPU 15 stores the in-focus position P1 of the first main subject and the first main subject image stored in the memory in the most recent AF processing (the first AF processing or the second AF processing described later). The size of G1, the focus position P2 of the second main subject and the size of the second main subject image G2 are read out. The CPU 15 compares the read focus positions P1 and P2, and recognizes which is the closest side and which is the infinite side. Further, the CPU 15 reads the size of the first main subject image G1 and the size of the second main subject image G2, and the sizes of the first main subject image G1 and the second main subject image G2 detected by the latest subject recognition process. Are compared.

例えば、図5(A)に示すように、第1主要被写体の合焦位置P1よりも第2主要被写体の合焦位置P2が無限側にあった場合について説明する。ここで、フォーカスレンズの位置が第1主要被写体の合焦位置P1である場合における第1主要被写体画像G1および第2主要被写体画像G2を含むスルー画像を、図5(B)に示す。   For example, as shown in FIG. 5A, a case where the focus position P2 of the second main subject is on the infinite side with respect to the focus position P1 of the first main subject will be described. Here, FIG. 5B shows a through image including the first main subject image G1 and the second main subject image G2 in the case where the position of the focus lens is the focus position P1 of the first main subject.

図5(B)に示した状態から、図5(D)に示す状態に変化した場合、すなわち、合焦位置P2が無限側にある第2主要被写体画像G2のサイズが大きくなった場合、図5(C)に示すように、第2主要被写体の合焦位置P2が第1主要被写体の合焦位置P1に接近したことを意味する。すなわち、撮影光学系11の光軸方向において、第2主要被写体が第1主要被写体に接近したことを意味する。   When the state shown in FIG. 5B is changed to the state shown in FIG. 5D, that is, when the size of the second main subject image G2 having the in-focus position P2 on the infinite side is increased. As shown in FIG. 5C, this means that the focus position P2 of the second main subject has approached the focus position P1 of the first main subject. That is, it means that the second main subject has approached the first main subject in the optical axis direction of the photographing optical system 11.

また、図6(A)に示すように、第1主要被写体の合焦位置P1よりも第2主要被写体の合焦位置P2が至近側にあった場合について説明する。ここで、フォーカスレンズの位置が第1主要被写体の合焦位置P1である場合における第1主要被写体画像G1および第2主要被写体画像G2を含むスルー画像を、図6(B)に示す。   Further, as shown in FIG. 6A, a case will be described in which the in-focus position P2 of the second main subject is closer to the in-focus side than the in-focus position P1 of the first main subject. Here, FIG. 6B shows a through image including the first main subject image G1 and the second main subject image G2 when the position of the focus lens is the in-focus position P1 of the first main subject.

図6(B)に示した状態から、図6(D)に示す状態に変化した場合、すなわち、合焦位置P2が至近側にある第2主要被写体画像G2のサイズが小さくなった場合、図6(C)に示すように、第2主要被写体の合焦位置P2が第1主要被写体の合焦位置P1に接近したことを意味する。すなわち、撮影光学系11の光軸方向において、第2主要被写体が第1主要被写体に接近したことを意味する。   When the state shown in FIG. 6B is changed to the state shown in FIG. 6D, that is, when the size of the second main subject image G2 having the in-focus position P2 on the close side is reduced, As shown in FIG. 6C, it means that the focus position P2 of the second main subject has approached the focus position P1 of the first main subject. That is, it means that the second main subject has approached the first main subject in the optical axis direction of the photographing optical system 11.

そこでCPU15は、合焦位置が無限側にある主要被写体(以下、無限側被写体とも呼ぶ)の画像サイズが直近のAF処理においてメモリに記憶されたサイズ(以下、メモリサイズとも呼ぶ)と比較して大きくなり、且つ合焦位置が至近側にある主要被写体の画像サイズ(以下、至近側被写体とも呼ぶ)がメモリサイズと比較して小さくなった場合には、2つの主要被写体同士が互いに近づく方向に移動したと認識し、ステップS70を肯定判定する。また、CPU15は、至近側被写体の画像サイズがメモリサイズからほぼ変化せず、且つ無限側被写体の画像サイズがメモリサイズと比較して大きくなった場合にも、2つの主要被写体同士が互いに近づく方向に移動したと認識し、ステップS70を肯定判定する。さらに、CPU15は、無限側被写体の画像サイズがメモリサイズからほぼ変化せず、且つ至近側被写体の画像サイズがメモリサイズと比較して小さくなった場合にも、2つの主要被写体同士が互いに近づく方向に移動したと認識し、ステップS70を肯定判定する。CPU15は、ステップS70を肯定判定するとステップS80へ進む。   Therefore, the CPU 15 compares the image size of the main subject whose focus position is on the infinity side (hereinafter also referred to as the infinity side subject) with the size (hereinafter also referred to as memory size) stored in the memory in the most recent AF process. When the image size of the main subject whose focus position is closer and closer (hereinafter also referred to as the closest subject) is smaller than the memory size, the two main subjects are moved closer to each other. Recognizing that it has moved, affirmative determination is made in step S70. Further, the CPU 15 also moves the two main subjects closer to each other even when the image size of the closest subject does not substantially change from the memory size and the image size of the infinite subject is larger than the memory size. It is recognized that it has moved to step S70, and an affirmative decision is made in step S70. Furthermore, the CPU 15 also moves the two main subjects closer to each other even when the image size of the infinite subject is almost unchanged from the memory size and the image size of the closest subject is smaller than the memory size. It is recognized that it has moved to step S70, and an affirmative decision is made in step S70. If the CPU 15 makes a positive determination in step S70, it proceeds to step S80.

一方CPU15は、無限側被写体の画像サイズがメモリサイズと比較して小さくなり、且つ至近側被写体の画像サイズがメモリサイズと比較して大きくなった場合には、2つの主要被写体同士が互いに離れる方向に移動したと認識し、ステップS70を否定判定する。また、CPU15は、至近側被写体の画像サイズがメモリサイズからほぼ変化せず、且つ無限側被写体の画像サイズがメモリサイズと比較して小さくなった場合にも、2つの主要被写体同士が互いに離れる方向に移動したと認識し、ステップS70を否定判定する。さらに、無限側被写体の画像サイズがメモリサイズと比較してほぼ変化せず、且つ至近側被写体の画像サイズがメモリサイズと比較して大きくなった場合にも、2つの主要被写体同士が互いに離れる方向に移動したと認識し、ステップS70を否定判定する。なおCPU15は、2つの主要被写体の画像サイズが両方ともメモリサイズからほぼ変化しない場合、つまり2つの主要被写体が両方とも静止している場合にも、ステップS70を否定判定する。またCPU15は、無限側被写体の画像サイズがメモリサイズと比較して大きくなり、且つ至近側被写体の画像サイズもメモリサイズと比較して大きくなった場合、つまり2つの主要被写体が両方とも至近側に移動した場合にも、ステップS70を否定判定する。逆の場合、つまり2つの主要被写体が両方とも無限側に移動した場合にも同様にステップS70を否定判定する。CPU15は、ステップS70を否定判定すると、ステップS30へ戻り、上述した処理を繰り返す。   On the other hand, when the image size of the infinite subject is smaller than the memory size and the image size of the closest subject is larger than the memory size, the CPU 15 moves the two main subjects away from each other. It is recognized that it has moved to step S70, and a negative determination is made in step S70. In addition, the CPU 15 determines that the two main subjects are separated from each other even when the image size of the near subject does not substantially change from the memory size and the image size of the infinite subject is smaller than the memory size. It is recognized that it has moved to step S70, and a negative determination is made in step S70. Furthermore, even when the image size of the infinite subject does not substantially change compared to the memory size and the image size of the closest subject increases compared to the memory size, the two main subjects are separated from each other. It is recognized that the movement has been made, and a negative determination is made in step S70. Note that the CPU 15 also makes a negative determination in step S70 when both of the image sizes of the two main subjects are not substantially changed from the memory size, that is, when both of the two main subjects are stationary. The CPU 15 also determines that the image size of the infinite subject is larger than the memory size and the image size of the closest subject is also larger than the memory size, that is, the two main subjects are both closer to the near side. Also when it moves, negative determination is made at step S70. In the opposite case, that is, when both of the two main subjects have moved to the infinite side, a negative determination is also made in step S70. If the CPU 15 makes a negative determination in step S70, it returns to step S30 and repeats the above-described processing.

ステップS80においてCPU15は、第2のAF処理を実行する。ここで第2のAF処理の詳細について図7を用いて説明する。なお、第2のAF処理については、第1のAF処理と異なる箇所のみ説明し、第1のAF処理と共通する箇所については説明を省略する。   In step S80, the CPU 15 executes a second AF process. Details of the second AF processing will be described with reference to FIG. Note that the second AF process will be described only in parts different from the first AF process, and description of parts common to the first AF process will be omitted.

ステップS801においてCPU15は、直近のAF処理(第1のAF処理または第2のAF処理)において検出されメモリに記憶された、第1主要被写体の合焦位置P1および第2主要被写体の合焦位置P2を読み出す。そしてCPU15は、読み出した合焦位置P1から合焦位置P2までの範囲を含む所定の範囲を、コントラストAFのサーチ範囲として設定する。例えば、図8に示すように、合焦位置P1が至近側であり、合焦位置P2が無限側である場合、合焦位置P1よりも所定距離ΔL至近側の位置P3から、合焦位置P2よりも所定距離ΔL無限側の位置P4までの範囲を、コントラストAFのサーチ範囲として設定する。   In step S <b> 801, the CPU 15 detects the focus position P <b> 1 of the first main subject and the focus position of the second main subject, which are detected and stored in the memory in the most recent AF process (first AF process or second AF process). Read P2. Then, the CPU 15 sets a predetermined range including a range from the read focus position P1 to the focus position P2 as a contrast AF search range. For example, as shown in FIG. 8, when the in-focus position P1 is on the near side and the in-focus position P2 is on the infinite side, the in-focus position P2 from the position P3 closer to the predetermined distance ΔL than the in-focus position P1. A range up to a position P4 on the infinite side of the predetermined distance ΔL is set as a contrast AF search range.

このようにサーチ範囲を設定する理由は、以下の通りである。上述したように第2のAF処理は、2つの主要被写体同士が互いに接近した場合に行われる。したがって、第2のAF処理を実行する時点での第1主要被写体および第2主要被写体の合焦位置は、直近のAF処理において検出された第1主要被写体の合焦位置P1から第2主要被写体の合焦位置P2までの範囲内にある可能性が高い。そこで、至近端から無限端までの範囲をサーチ範囲としなくても、上述したようにサーチ範囲を設定することで、第1主要被写体および第2主要被写体の合焦位置を検出することができる。こうすることにより、至近端から無限端までの範囲をサーチ範囲とした場合と比較して、サーチ時間を短縮し消費電力を低減することができる。さらに、合焦位置P1よりも至近側に、また合焦位置P2よりも無限側にそれぞれ所定距離ΔLずつサーチ範囲を広げることで、コントラスト値のピーク値をより正確に検出可能となる。   The reason for setting the search range in this way is as follows. As described above, the second AF process is performed when two main subjects approach each other. Therefore, the in-focus positions of the first main subject and the second main subject at the time when the second AF processing is executed are determined from the in-focus position P1 of the first main subject detected in the most recent AF processing. There is a high possibility of being in the range up to the in-focus position P2. Therefore, even if the range from the closest end to the infinite end is not set as the search range, the in-focus positions of the first main subject and the second main subject can be detected by setting the search range as described above. . By doing so, the search time can be shortened and the power consumption can be reduced compared to the case where the range from the closest end to the infinite end is set as the search range. Furthermore, the peak value of the contrast value can be detected more accurately by expanding the search range by a predetermined distance ΔL closer to the focus position P1 and closer to the infinite side than the focus position P2.

以上のようにしてCPU15は、コントラストAFのサーチ範囲を設定すると、ステップS802へ進む。   When the CPU 15 sets the contrast AF search range as described above, the process proceeds to step S802.

ステップS802においてCPU15は、上記第1のAF処理のステップS203と同様の処理を行う。ステップS803においてCPU15は、レンズ駆動制御回路13へ指示を送り、フォーカスレンズを初期位置(サーチ開始位置、例えば至近側のサーチ端点(上記位置P3))へ駆動させて、ステップS804へ進む。   In step S802, the CPU 15 performs the same process as in step S203 of the first AF process. In step S803, the CPU 15 sends an instruction to the lens drive control circuit 13 to drive the focus lens to an initial position (search start position, for example, the closest search end point (position P3)), and the process proceeds to step S804.

ステップS804〜ステップS807においてCPU15は、それぞれ上記第1のAF処理のステップS205〜ステップS208と同様の処理を行う。ステップS808においてCPU15は、フォーカスレンズの位置がサーチ終了位置(例えば無限側のサーチ端点(上記位置P4))であるか否かを判定する。CPU15は、サーチ終了位置である場合にステップS808を肯定判定してステップS809へ進み、サーチ終了位置でない場合にはステップS808を否定判定してステップS806へ戻る。   In steps S804 to S807, the CPU 15 performs processes similar to those in steps S205 to S208 of the first AF process, respectively. In step S808, the CPU 15 determines whether or not the position of the focus lens is a search end position (for example, an infinite search end point (position P4)). If it is the search end position, the CPU 15 makes a positive determination in step S808 and proceeds to step S809. If it is not the search end position, the CPU 15 makes a negative determination in step S808 and returns to step S806.

ステップS809〜ステップS820においてCPU15は、それぞれ上記第1のAF処理のステップS210〜ステップS221と同様の処理を行う。   In steps S809 to S820, the CPU 15 performs processes similar to those in steps S210 to S221 of the first AF process, respectively.

このようにして第2のAF処理を実行すると、CPU15は、ステップS30(図2)へ戻り、上述した処理を繰り返す。   When the second AF process is thus executed, the CPU 15 returns to step S30 (FIG. 2) and repeats the above-described process.

以上のようにCPU15は、第1のAF処理を実行した後は、2つの主要被写体の画像サイズを監視して2つの主要被写体が接近しているか否かを判定し、接近していると判定すると第2のAF処理を実行する。換言すればCPU15は、第1のAF処理を実行した時点では主要被写体間の距離が離れており自動撮影を行わない場合には、コントラストAFを停止し、その後、2つの主要被写体が互いに接近していると判定した場合にコントラストAFの停止を解除し、コントラストAFを再実行させる。   As described above, after executing the first AF process, the CPU 15 monitors the image sizes of the two main subjects to determine whether the two main subjects are close to each other, and determines that they are close to each other. Then, the second AF process is executed. In other words, the CPU 15 stops the contrast AF when the distance between the main subjects is long and the automatic shooting is not performed at the time when the first AF processing is executed, and then the two main subjects approach each other. If it is determined that the contrast AF is stopped, the stop of the contrast AF is canceled and the contrast AF is executed again.

本実施形態と異なり、仮にコントラストAFを常に周期的に実行する場合、2つの主要被写体が互いに接近していないときに開始したサーチ動作を実行している間に、2つの主要被写体が互いに接近して自動撮影可能な距離となっても、次回のサーチ動作を実行するまで自動撮影可能と判定されず、撮影タイミングを逃してしまう可能性がある。   Unlike the present embodiment, if contrast AF is always executed periodically, the two main subjects approach each other while the search operation started when the two main subjects are not approaching each other. Even if the distance that allows automatic shooting is reached, it is not determined that automatic shooting is possible until the next search operation is executed, and the shooting timing may be missed.

しかしながら、本実施形態では、2つの主要被写体が互いに接近していないときはサーチ動作を行わず、互いに接近していると判定されたときにのみサーチ動作を実行するため、2つの主要被写体が自動撮影可能な距離になったときに、タイミングを逃さずに自動撮影可能の判定を行うことができる。ゆえに、AFタイムラグを短縮して、適切なタイミングで撮影することができる。また、本実施形態では、コントラストAFを常に周期的に実行する場合と比較してサーチ動作を実行する回数が少ないため、消費電力を低減することもできる。   However, in this embodiment, the search operation is not performed when the two main subjects are not close to each other, and the search operation is executed only when it is determined that they are close to each other. When the shooting distance is reached, it is possible to determine whether automatic shooting is possible without missing the timing. Therefore, the AF time lag can be shortened and photographing can be performed at an appropriate timing. Further, in this embodiment, since the number of times that the search operation is executed is smaller than in the case where the contrast AF is always executed periodically, the power consumption can be reduced.

以上説明した実施形態によれば、次の作用効果が得られる。
(1)デジタルカメラは、撮影光学系11による被写体像を撮像して被写体画像信号を出力する撮像素子12と、被写体画像信号から少なくとも第1主要被写体画像G1と第2主要被写体画像G2とを周期的にそれぞれ検出するCPU15と、撮影光学系11のフォーカスレンズを光軸方向にサーチして、第1主要被写体の合焦位置P1と第2主要被写体の合焦位置P2とをそれぞれ検出するレンズ駆動制御回路13およびCPU15と、第1主要被写体の合焦位置P1および第2主要被写体の合焦位置P2の少なくとも一方に基づき焦点調節を行うレンズ駆動制御回路13およびCPU15と、第1主要被写体の合焦位置P1と第2主要被写体の合焦位置P2との間の距離が、所定の判定閾値以内か否かを判定するCPU15と、上記距離が判定閾値内であると判定された場合に、自動的に撮影動作を実行するCPU15と、上記距離が判定閾値外であると判定された場合に、コントラストAFのサーチ動作を停止させるCPU15と、上記距離が判定閾値外であると判定された場合に、第1主要被写体画像G1および第2の主要被写体画像G2のサイズの変化を検出するCPU15と、検出したサイズ変化に基づき、第1主要被写体と第2主要被写体とが互いに接近しているか否かを判定するCPU15と、第1主要被写体と第2主要被写体が互いに接近していると判定した場合に、上記サーチ動作の停止を解除してサーチ動作を再実行させるCPU15と、を備えるので、サーチ動作を常に実行する場合と比較して、消費電力を低減することができる。
According to the embodiment described above, the following operational effects can be obtained.
(1) The digital camera periodically captures an image sensor 12 that captures a subject image by the photographing optical system 11 and outputs a subject image signal, and at least a first main subject image G1 and a second main subject image G2 from the subject image signal. Each of the CPU 15 for detecting the lens and the focus lens of the photographing optical system 11 in the optical axis direction to detect the focusing position P1 of the first main subject and the focusing position P2 of the second main subject, respectively. The control circuit 13 and the CPU 15, the lens drive control circuit 13 and the CPU 15 that perform focus adjustment based on at least one of the focusing position P1 of the first main subject and the focusing position P2 of the second main subject, and the alignment of the first main subject. CPU 15 for determining whether the distance between the focus position P1 and the focus position P2 of the second main subject is within a predetermined determination threshold, and the distance When it is determined that the distance is within the determination threshold, the CPU 15 automatically executes the photographing operation; when the distance is determined to be outside the determination threshold, the CPU 15 stops the contrast AF search operation; and When it is determined that the distance is outside the determination threshold, the CPU 15 that detects a change in the size of the first main subject image G1 and the second main subject image G2, and the first main subject based on the detected size change When the CPU 15 determines whether or not the second main subject is close to each other, and when it is determined that the first main subject and the second main subject are close to each other, the search operation is stopped and the search is stopped. Since the CPU 15 that re-executes the operation is provided, the power consumption can be reduced as compared with the case where the search operation is always executed.

(2)上記(1)のデジタルカメラにおいて、第1主要被写体と第2主要被写体が互いに接近していると判定した場合に再実行するサーチ動作(上記第2のAF処理におけるサーチ動作)においては、フォーカスレンズを第1主要被写体の合焦位置P1に対応するフォーカスレンズ位置P3と第2主要被写体の合焦位置P2に対応するフォーカスレンズ位置P4との間でサーチするように構成したので、至近端から無限端までをサーチ範囲とする場合と比較して、サーチ動作にかかる時間を短くすることができる。したがって、タイミングが遅れることなく撮影を実行でき、且つ消費電力を低減することができる。 (2) In the digital camera of (1) above, in the search operation (search operation in the second AF process) that is re-executed when it is determined that the first main subject and the second main subject are close to each other The focus lens is configured to search between the focus lens position P3 corresponding to the focus position P1 of the first main subject and the focus lens position P4 corresponding to the focus position P2 of the second main subject. Compared with the case where the search range is from the near end to the infinite end, the time required for the search operation can be shortened. Therefore, shooting can be performed without delay in timing, and power consumption can be reduced.

(3)上記(1)または(2)のデジタルカメラにおいて、第1主要被写体の合焦位置P1および第2主要被写体の合焦位置P2のうち、至近側の合焦位置に基づいて焦点調節を行うように構成したので、撮影距離の短い方の被写体に焦点を合わせておくことができる。 (3) In the digital camera of (1) or (2), the focus adjustment is performed based on the closest focus position among the focus position P1 of the first main subject and the focus position P2 of the second main subject. Since it is configured to do so, it is possible to focus on the subject with the shorter shooting distance.

(4)上記(1)〜(3)のデジタルカメラにおいて、上記判定閾値は、撮影光学系11の焦点深度によって定まる値であるように構成したので、2つの主要被写体の双方に焦点が合った画像を撮影できる。 (4) In the digital cameras of the above (1) to (3), the determination threshold is configured to be a value determined by the depth of focus of the photographic optical system 11, and therefore both of the two main subjects are in focus. You can take an image.

(変形例1)
上述した実施の形態では、2つの主要被写体の合焦位置を検出すると、至近側の合焦位置へフォーカスレンズを駆動させ、撮影距離が短い方の主要被写体に焦点を合わせる例について説明した。しかしながら、動きが少ない方の主要被写体に関する合焦位置へフォーカスレンズを駆動させ、動きが少ない方の主要被写体に焦点を合わせるようにしてもよい。
(Modification 1)
In the above-described embodiment, an example has been described in which when the in-focus position of two main subjects is detected, the focus lens is driven to the in-focus position, and the main subject with a shorter shooting distance is focused. However, the focus lens may be driven to an in-focus position with respect to the main subject with less movement so that the main subject with less movement is focused.

例えば、選択された主要被写体の組み合わせが大人&子供である場合には、被写体認識処理によって大人と認識された方の主要被写体に焦点を合わせる。また、選択された主要被写体の組み合わせが人&ペットである場合には、被写体認識処理によってペットと認識された方の主要被写体に焦点を合わせる。また、選択された主要被写体の組み合わせが人&人である場合には、画像サイズが大きい方の主要被写体に焦点を合わせる。   For example, when the selected combination of main subjects is an adult and a child, the main subject that is recognized as an adult by the subject recognition process is focused. When the selected combination of main subjects is a person & pet, the main subject recognized as a pet by the subject recognition process is focused. When the selected combination of main subjects is person & person, the main subject having the larger image size is focused.

なお、2つの主要被写体のうち画像サイズの変化が小さい方の主要被写体を、動きが少ない方の主要被写体として特定し、特定した主要被写体に焦点を合わせるようにしてもよい。   It should be noted that the main subject with the smaller image size change of the two main subjects may be specified as the main subject with less movement, and the specified main subject may be focused.

このように動きが少ない方の主要被写体に焦点を合わせておくことにより、2つの主要被写体同士が互いに接近したときに焦点がずれにくく、すばやく撮影動作を開始することができる。   By focusing on the main subject with less movement in this way, the focus is unlikely to shift when the two main subjects approach each other, and the photographing operation can be started quickly.

(変形例2)
なお、上記ステップS70において2つの主要被写体同士が互いに接近したと判定されない時間が所定時間以上継続した場合には、コントラストAFにおけるサーチ動作の停止を解除して、上記ステップS20に戻りサーチ動作(第1のAF処理)を再実行するようにしてもよい。この所定時間は、例えば3〜5秒であり、被写体認識処理の実行間隔よりも長い間隔とする。こうすることにより、定期的に2つの主要被写体の合焦位置を検出して、いずれか一方の主要被写体に焦点を合わせることができる。
(Modification 2)
If the time during which it is not determined in step S70 that the two main subjects are close to each other continues for a predetermined time or longer, the search operation stop in contrast AF is canceled, and the process returns to step S20 to return to the search operation (first step). 1 AF processing) may be re-executed. The predetermined time is, for example, 3 to 5 seconds, and is longer than the subject recognition processing execution interval. By doing so, it is possible to periodically detect the in-focus position of the two main subjects and focus on one of the main subjects.

(変形例3)
上述した実施の形態では、予めユーザにより主要被写体の組み合わせ(人&ペットなど)を選択させ、選択された主要被写体を検出する例について説明した。しかしながら、デジタルカメラが、主要被写体と推定される被写体を自動的に検出するようにしてもよい。変形例3のCPU15は、主要被写体と推定される被写体を自動的に2つ検出した場合、検出した2つの主要被写体の合焦位置をそれぞれ検出し、これらの合焦位置間の距離が上記判定閾値内となった場合に自動的に撮影動作を実行する。
(Modification 3)
In the above-described embodiment, an example in which a combination of main subjects (such as a person & pet) is selected by a user in advance and the selected main subject is detected has been described. However, the digital camera may automatically detect the subject estimated as the main subject. When the CPU 15 of Modification 3 automatically detects two subjects estimated to be main subjects, it detects the in-focus positions of the two main subjects detected, and the distance between these in-focus positions is determined as described above. When the value falls within the threshold, the photographing operation is automatically executed.

(変形例4)
上述した実施の形態では、2つの主要被写体の合焦位置を検出すると、至近側の合焦位置へフォーカスレンズを駆動させ、撮影距離が短い方の主要被写体に焦点を合わせる例について説明した。しかしながら、2つの主要被写体の合焦位置間における中央の位置を算出し、当該中央の位置へフォーカスレンズを駆動させるようにしてもよい。
(Modification 4)
In the above-described embodiment, an example has been described in which when the in-focus position of two main subjects is detected, the focus lens is driven to the in-focus position, and the main subject with a shorter shooting distance is focused. However, the center position between the in-focus positions of the two main subjects may be calculated, and the focus lens may be driven to the center position.

(変形例5)
上述した実施の形態では、2つの主要被写体画像の画像サイズの変化を検出する例について説明した。しかしながら、2つの主要被写体画像のうちいずれか一方の画像サイズの変化を検出するようにしてもよい。画像サイズの変化を検出する主要被写体は、もう一方の主要被写体と比較して、動きが多い主要被写体であることが好ましい。変形例5のCPU15は、合焦位置が至近側にある主要被写体画像の変化を検出する場合には、直近のAF処理においてメモリに記憶された画像サイズと比較して画像サイズが小さくなった場合に2つの主要被写体が互いに接近していると判定する。また、合焦位置が無限側にある主要被写体画像の変化を検出する場合には、直近のAF処理においてメモリに記憶された画像サイズと比較して画像サイズが大きくなった場合に2つの主要被写体が互いに接近していると判定する。
(Modification 5)
In the above-described embodiment, the example in which the change in the image size of the two main subject images is detected has been described. However, a change in the image size of one of the two main subject images may be detected. It is preferable that the main subject for detecting a change in the image size is a main subject that moves much more than the other main subject. When the CPU 15 of the modification 5 detects a change in the main subject image whose in-focus position is on the closest side, the image size is smaller than the image size stored in the memory in the most recent AF process. It is determined that two main subjects are close to each other. In addition, when detecting a change in the main subject image whose in-focus position is on the infinite side, two main subjects are used when the image size is larger than the image size stored in the memory in the most recent AF process. Are determined to be close to each other.

(変形例6)
上述した実施の形態では、上記第2のAF処理において、第1主要被写体の合焦位置P1から第2主要被写体の合焦位置P2までおよびその前後所定距離を含む範囲(上記位置P3〜位置P4)を、サーチ範囲として設定する例について説明した。しかしながら、第1主要被写体の合焦位置P1から第2主要被写体の合焦位置P2までの範囲を、上記第2のAF処理のサーチ範囲として設定するようにしてもよい。また、至近端から無限端までの範囲を、上記第2のAF処理のサーチ範囲として設定するようにしてもよい。
(Modification 6)
In the above-described embodiment, in the second AF process, a range including the focus position P1 of the first main subject to the focus position P2 of the second main subject and a predetermined distance before and after the focus position P1 (position P3 to position P4). ) Has been described as an example of setting the search range. However, a range from the focus position P1 of the first main subject to the focus position P2 of the second main subject may be set as the search range of the second AF process. Further, a range from the closest end to the infinite end may be set as the search range for the second AF process.

(変形例7)
上述した実施の形態では、2つの主要被写体の画像を検出する例について説明した。しかしながら、3つ以上の主要被写体の画像を検出するようにしてもよい。例えば、3つの主要被写体の画像を検出した場合、3つの主要被写体のうちいずれか2つの主要被写体の合焦位置を検出し、これらの合焦位置間の距離が所定の判定閾値以上となった場合に自動で撮影動作を実行するようにしてもよい。また、3つの主要被写体全ての合焦位置を検出し、これらの合焦位置間の距離が所定の判定閾値以上となった場合に自動で撮影動作を実行するようにしてもよい。
(Modification 7)
In the above-described embodiment, an example in which images of two main subjects are detected has been described. However, three or more main subject images may be detected. For example, when images of three main subjects are detected, in-focus positions of any two main subjects among the three main subjects are detected, and the distance between these in-focus positions is equal to or greater than a predetermined determination threshold. In some cases, the photographing operation may be automatically executed. Alternatively, the in-focus positions of all three main subjects may be detected, and the photographing operation may be automatically executed when the distance between these in-focus positions exceeds a predetermined determination threshold.

以上の説明はあくまで一例であり、上記の実施形態の構成に何ら限定されるものではない。また、上記実施形態に各変形例の構成を適宜組み合わせてもかまわない。   The above description is merely an example, and is not limited to the configuration of the above embodiment. Moreover, you may combine the structure of each modification suitably with the said embodiment.

11…撮影光学系
12…撮像素子
13…レンズ駆動制御回路
14…画像信号処理回路
15…CPU
DESCRIPTION OF SYMBOLS 11 ... Shooting optical system 12 ... Imaging element 13 ... Lens drive control circuit 14 ... Image signal processing circuit 15 ... CPU

Claims (6)

撮影光学系により被写体像を撮像して被写体画像信号を出力する撮像手段と、
前記被写体画像信号から少なくとも第1の主要被写体と第2の主要被写体とを周期的にそれぞれ検出する被写体認識手段と、
前記撮影光学系のフォーカスレンズを光軸方向にサーチして、前記第1の主要被写体に関する第1の合焦位置と前記第2の主要被写体に関する第2の合焦位置とをそれぞれ検出するコントラスト式焦点検出手段と、
前記第1の合焦位置および前記第2の合焦位置の少なくとも一方に基づき焦点調節を行う焦点調節手段と、
前記第1の合焦位置と前記第2の合焦位置との間の距離が、所定の判定閾値以内か否かを判定する距離判定手段と、
前記距離判定手段によって前記距離が前記判定閾値内であると判定された場合に、自動的に撮影動作を実行する自動撮影手段と、
前記距離判定手段によって前記距離が前記判定閾値外であると判定された場合に、前記コントラスト式焦点検出手段のサーチ動作を停止させる停止手段と、
前記距離判定手段によって前記距離が前記判定閾値外であると判定された場合に、前記第1の主要被写体および前記第2の主要被写体の少なくとも一方の画像のサイズの変化を検出するサイズ検出手段と、
前記サイズ検出手段によって検出されたサイズ変化に基づき、前記第1の主要被写体と前記第2の主要被写体とが互いに接近しているか否かを判定する接近判定手段と、
前記接近判定手段により前記第1の主要被写体と前記第2の主要被写体が互いに接近していると判定された場合に、前記停止手段による前記サーチ動作の停止を解除して前記サーチ動作を再実行させる実行手段と、
を備えることを特徴とするデジタルカメラ。
Imaging means for imaging a subject image by a photographing optical system and outputting a subject image signal;
Subject recognition means for periodically detecting at least a first main subject and a second main subject from the subject image signal;
A contrast type for searching the focus lens of the photographing optical system in the optical axis direction to detect a first in-focus position with respect to the first main subject and a second in-focus position with respect to the second main subject. A focus detection means;
Focus adjusting means for performing focus adjustment based on at least one of the first focus position and the second focus position;
Distance determining means for determining whether a distance between the first in-focus position and the second in-focus position is within a predetermined determination threshold;
An automatic photographing unit that automatically performs a photographing operation when the distance determining unit determines that the distance is within the determination threshold;
Stop means for stopping the search operation of the contrast-type focus detection means when the distance determination means determines that the distance is outside the determination threshold;
Size detection means for detecting a change in the size of at least one of the first main subject and the second main subject when the distance determination means determines that the distance is outside the determination threshold; ,
An approach determining means for determining whether or not the first main subject and the second main subject are close to each other based on the size change detected by the size detecting means;
When the approach determining unit determines that the first main subject and the second main subject are close to each other, the stop of the search operation by the stop unit is canceled and the search operation is re-executed. Execution means
A digital camera comprising:
請求項1に記載のデジタルカメラにおいて、
前記コントラスト式焦点検出手段は、前記接近判定手段により前記第1の主要被写体と前記第2の主要被写体が互いに接近していると判定された場合に再実行するサーチ動作においては、前記フォーカスレンズを前記第1の合焦位置に対応するフォーカスレンズ位置と前記第2の合焦位置に対応するフォーカスレンズ位置との間で前記サーチ動作を実行することを特徴とするデジタルカメラ。
The digital camera according to claim 1, wherein
The contrast-type focus detection unit performs the focus lens in a search operation that is re-executed when the approach determination unit determines that the first main subject and the second main subject are close to each other. A digital camera that performs the search operation between a focus lens position corresponding to the first focus position and a focus lens position corresponding to the second focus position.
請求項1または2に記載のデジタルカメラにおいて、
前記焦点調節手段は、前記第1の合焦位置および前記第2の合焦位置のうち、至近側の合焦位置に基づいて焦点調節を行うことを特徴とするデジタルカメラ。
The digital camera according to claim 1 or 2,
The digital camera according to claim 1, wherein the focus adjustment unit performs focus adjustment based on a focus position on a closest side among the first focus position and the second focus position.
請求項1または2に記載のデジタルカメラにおいて、
前記焦点調節手段は、前記第1の主要被写体および前記第2の主要被写体のうち、動きの少ない方の主要被写体に関する合焦位置に基づいて焦点調節を行うことを特徴とするデジタルカメラ。
The digital camera according to claim 1 or 2,
The digital camera according to claim 1, wherein the focus adjustment unit performs focus adjustment based on a focus position related to a main subject with less movement among the first main subject and the second main subject.
請求項1〜4のいずれか一項に記載のデジタルカメラにおいて、
前記実行手段は、前記接近判定手段により前記第1の主要被写体と前記第2の主要被写体とが互いに接近していると判定されない時間が所定時間以上継続した場合は、前記停止手段による前記サーチ動作の停止を解除して前記サーチ動作を再実行させることを特徴とするデジタルカメラ。
In the digital camera according to any one of claims 1 to 4,
The execution means performs the search operation by the stop means when a time during which the first main subject and the second main subject are not determined to be close to each other continues for a predetermined time or longer by the approach determination means. A digital camera, wherein the search operation is released and the search operation is re-executed.
請求項1〜5に記載のデジタルカメラにおいて、
前記判定閾値は、前記撮影光学系の焦点深度によって定まる値であることを特徴とするデジタルカメラ。
The digital camera according to claim 1,
The digital camera according to claim 1, wherein the determination threshold is a value determined by a depth of focus of the photographing optical system.
JP2011267901A 2011-12-07 2011-12-07 Digital camera Pending JP2013120273A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011267901A JP2013120273A (en) 2011-12-07 2011-12-07 Digital camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011267901A JP2013120273A (en) 2011-12-07 2011-12-07 Digital camera

Publications (1)

Publication Number Publication Date
JP2013120273A true JP2013120273A (en) 2013-06-17

Family

ID=48772930

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011267901A Pending JP2013120273A (en) 2011-12-07 2011-12-07 Digital camera

Country Status (1)

Country Link
JP (1) JP2013120273A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017108286A (en) * 2015-12-09 2017-06-15 株式会社ニコン Electronic apparatus, conveyance system, factory, and program
JP2018121305A (en) * 2017-01-27 2018-08-02 京セラドキュメントソリューションズ株式会社 Video processing apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017108286A (en) * 2015-12-09 2017-06-15 株式会社ニコン Electronic apparatus, conveyance system, factory, and program
JP2018121305A (en) * 2017-01-27 2018-08-02 京セラドキュメントソリューションズ株式会社 Video processing apparatus

Similar Documents

Publication Publication Date Title
US20060008265A1 (en) Optical apparatus
JP5753371B2 (en) Imaging apparatus and control method thereof
JP2010015024A (en) Image pickup apparatus, control method thereof, program and storage medium
US9277111B2 (en) Image capture apparatus and control method therefor
JP2007316497A (en) Imaging apparatus and control method therefor
JP2006139256A (en) Camera having focus detection device
JP2010139563A (en) Focus detector, focusing device, and imaging apparatus
US20230034220A1 (en) Focusing apparatus, image pickup apparatus, focusing method, and storage medium
US9609202B2 (en) Image pickup apparatus and control method with focus adjusting modes
JP2007133301A (en) Autofocus camera
US8947583B2 (en) Image pickup apparatus and control method thereof
JP2013120273A (en) Digital camera
JP2011090143A (en) Focal point detecting device and camera
US10175452B2 (en) Focus detection apparatus, control method, and storage medium
JP2009042555A (en) Electronic camera
JP5947489B2 (en) Focus adjustment device and focus adjustment method
JP6624789B2 (en) Focus control device, control method thereof, control program, and imaging device
US20140168467A1 (en) Focus adjustment apparatus and method, and image capturing apparatus
JP2008026787A (en) Imaging apparatus
KR20100085728A (en) Photographing apparatus and focus detecting method using the same
US9402023B2 (en) Image capturing apparatus, control method therefor, and storage medium
JP5743459B2 (en) Imaging device and lens unit
US20180020152A1 (en) Imaging device and focusing evaluation device
JP5927273B2 (en) Focus control device and control method of focus control device
JP2006072005A (en) Automatic focusing device