JP2016170319A - Imaging device, control method of the same and program thereof - Google Patents

Imaging device, control method of the same and program thereof Download PDF

Info

Publication number
JP2016170319A
JP2016170319A JP2015050796A JP2015050796A JP2016170319A JP 2016170319 A JP2016170319 A JP 2016170319A JP 2015050796 A JP2015050796 A JP 2015050796A JP 2015050796 A JP2015050796 A JP 2015050796A JP 2016170319 A JP2016170319 A JP 2016170319A
Authority
JP
Japan
Prior art keywords
control unit
system control
focus
subject area
proceeds
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
JP2015050796A
Other languages
Japanese (ja)
Other versions
JP6590496B2 (en
Inventor
直樹 岩▲崎▼
Naoki Iwasaki
直樹 岩▲崎▼
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 JP2015050796A priority Critical patent/JP6590496B2/en
Publication of JP2016170319A publication Critical patent/JP2016170319A/en
Application granted granted Critical
Publication of JP6590496B2 publication Critical patent/JP6590496B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Focusing (AREA)
  • Indication In Cameras, And Counting Of Exposures (AREA)
  • Automatic Focus Adjustment (AREA)
  • Studio Devices (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an automatic focusing technology that can focus on a subject to be focused at high speed.SOLUTION: An imaging device comprises: specification means that implements a scan operation for specifying a subject area to be focused from a plurality of subject areas prior to reception of a picture-taking preparation instruction; focusing control means that when reception means receives the picture-taking preparation instruction, drives a focus lens so that the subject area to be focused is put into a focusing state on the basis of a scan operation different from the scan operation by the specification means; and display means that displays the subject area put into the focusing state by the focusing control means on a display unit. When the reception means receives the picture-taking preparation instruction in a state where a picture-taking scene does not change after the picture-taking preparation instruction put into the focusing state is displayed on the display unit, the focusing control means is configured to select the subject area different from the subject area displayed on the display unit, and drive the focusing lens so that the selected subject area is put into the focusing state.SELECTED DRAWING: Figure 2

Description

本発明は、例えばデジタルスチルカメラやデジタルビデオカメラ等の撮像装置における自動合焦技術の改良に関する。   The present invention relates to an improvement of an automatic focusing technique in an imaging apparatus such as a digital still camera or a digital video camera.

デジタルスチルカメラやデジタルビデオカメラ等では、オートフォーカス(AF)を行う場合、CCD(電荷結合素子)センサ等を用いた撮像素子から得られる輝度信号の高域周波数成分が最大になるレンズ位置を合焦位置とする方式が用いられている。   In digital still cameras, digital video cameras, etc., when performing autofocus (AF), the lens position where the high frequency component of the luminance signal obtained from the image sensor using a CCD (Charge Coupled Device) sensor is maximized is aligned. A method of setting a focal position is used.

例えば、測距範囲の全域に亘ってレンズを駆動しながら撮像素子から得られる輝度信号の高域周波数成分に基づく評価値(焦点評価値)をその都度に記憶していき、記憶した値のうちの最大値に相当するレンズ位置を合焦位置とするスキャン方式が知られている。   For example, the evaluation value (focus evaluation value) based on the high frequency component of the luminance signal obtained from the image sensor while driving the lens over the entire distance measurement range is stored each time. There is known a scanning method in which the lens position corresponding to the maximum value of is the in-focus position.

また、焦点評価値が増加する方向にレンズを駆動し、焦点評価値が最大になる位置を合焦位置とする山登り方式(以下、コンティニュアスAFという)が知られている。   Further, a hill-climbing method (hereinafter referred to as “continuous AF”) is known in which the lens is driven in a direction in which the focus evaluation value increases, and the position where the focus evaluation value is maximized is the focus position.

従来、撮影準備指示前に、コンティニュアスAFを行い、合焦状態を維持することで、撮影準備指示後に行なうスキャン方式おけるAFの測距範囲を制限し、AF動作の時間を短縮する技術が提案されている(特許文献1)。   Conventionally, there has been a technology that limits the AF distance measurement range in the scanning method performed after the shooting preparation instruction and shortens the time of the AF operation by performing continuous AF before the shooting preparation instruction and maintaining the focused state. It has been proposed (Patent Document 1).

また、焦点検出領域を選択可能な領域選択部材を設けることによって、撮影者が意図する位置にピントを合わせた画像が得られる技術が提案されている(特許文献2及び3)。   In addition, a technique has been proposed in which an area selection member capable of selecting a focus detection area is provided to obtain an image focused on a position intended by a photographer (Patent Documents 2 and 3).

特許第14106485号公報Japanese Patent No. 14106485 特開平7−199320号公報JP-A-7-199320 特開2007−286118号公報JP 2007-286118 A

前述したコンティニュアスAFにおいて、焦点評価値の増加する方向にレンズを動かそうとした場合、画面内における合焦すべき領域が分からないと、合焦すべき被写体にピントを合わせることができない。   In the above-described continuous AF, when an attempt is made to move the lens in the direction in which the focus evaluation value increases, the subject to be focused cannot be focused unless the region to be focused in the screen is known.

上記特許文献1では、コンティニュアスAFにおいて、焦点評価値の最大値に相当するレンズ位置を合焦位置とするスキャン方式を組み合わせることで、より合焦動作を速くしている。しかし、ユーザがピントを合わせたいと考えている画面内の合焦すべき被写体(主被写体)を判断していないので、撮影シーンによっては合焦すべき被写体にピントを合わせることができないという問題がある。   In the above-mentioned Patent Document 1, in continuous AF, the focusing operation is made faster by combining a scanning method in which the lens position corresponding to the maximum focus evaluation value is the in-focus position. However, since the user does not determine the subject (main subject) to be focused in the screen that the user wants to focus on, there is a problem that the subject to be focused cannot be focused depending on the shooting scene. is there.

上記特許文献2及び3では、焦点検出領域を選択可能な領域選択部材を設けると、主被写体の領域を選択する手間と時間、さらには部材にコストがかかるという問題がある。   In the above Patent Documents 2 and 3, when an area selection member capable of selecting a focus detection area is provided, there is a problem that labor and time for selecting the area of the main subject, and cost for the member are required.

そこで、本発明は、合焦すべき被写体に高速でピントを合わせることができる自動合焦技術を提供することを目的とする。   Therefore, an object of the present invention is to provide an automatic focusing technique that can focus at high speed on a subject to be focused.

上記目的を達成するために、本発明は、撮像手段から出力される画像データに基づいて、被写体が合焦状態となる位置にフォーカスレンズを駆動する撮像装置であって、撮影準備指示を受け付ける受け付け手段と、前記受け付け手段が前記撮影準備指示を受け付ける前に複数の被写体領域から合焦すべき被写体領域を特定するスキャン動作を行う特定手段と、前記受け付け手段が前記撮影準備指示を受け付けたとき、前記特定手段による前記スキャン動作と異なるスキャン動作に基づき、前記合焦すべき前記被写体領域が合焦状態となるように前記フォーカスレンズを駆動する合焦制御手段と、前記合焦制御手段により合焦状態となった被写体領域を表示部に表示する表示手段と、を備え、前記合焦制御手段は、前記表示手段により合焦状態となった被写体領域を前記表示部に表示した後、撮影シーンが変化しない状態で前記受け付け手段が前記撮影準備指示を受け付けたとき、前記表示部に表示した被写体領域と異なった被写体領域を選択して、選択した被写体領域が合焦状態となるように前記フォーカスレンズを駆動することを特徴とする。   In order to achieve the above object, the present invention provides an imaging apparatus for driving a focus lens to a position where a subject is in focus based on image data output from an imaging means, and accepting an imaging preparation instruction. Means for performing a scanning operation for specifying a subject area to be focused from a plurality of subject areas before the accepting means accepts the photographing preparation instruction, and when the accepting means accepts the photographing preparation instruction, Based on a scanning operation different from the scanning operation by the specifying unit, a focus control unit that drives the focus lens so that the subject area to be focused is in focus, and the focus control unit performs focusing. Display means for displaying the subject area in the state on the display unit, and the focus control means is in a focused state by the display means. When the accepting unit accepts the shooting preparation instruction in a state where the shooting scene does not change after the displayed subject area is displayed on the display unit, the subject area different from the subject area displayed on the display unit is selected. The focus lens is driven so that the selected subject region is in focus.

本発明によれば、合焦すべき被写体に高速でピントを合わせることができる自動合焦技術を提供することができる。   According to the present invention, it is possible to provide an automatic focusing technique capable of focusing at high speed on a subject to be focused.

本発明の撮像装置の実施形態の一例であるデジタルスチルカメラのシステム構成を示すブロック図である。1 is a block diagram illustrating a system configuration of a digital still camera that is an example of an embodiment of an imaging apparatus of the present invention. 図1に示すデジタルスチルカメラの撮影動作について説明するフローチャート図である。It is a flowchart figure explaining imaging | photography operation | movement of the digital still camera shown in FIG. 図2のステップS202におけるシーン安定判断の処理を説明するフローチャート図である。It is a flowchart figure explaining the process of the scene stability determination in step S202 of FIG. 図2のステップS208における被写体検出時AFスキャンを説明するフローチャート図である。FIG. 6 is a flowchart for explaining subject detection AF scan in step S208 of FIG. 2; 図4のステップS406におけるシーン変化判定の処理について説明するフローチャート図である。FIG. 5 is a flowchart illustrating a scene change determination process in step S406 of FIG. フォーカスレンズの光軸方向の位置と焦点評価値との関係について説明するグラフ図である。It is a graph explaining the relationship between the position of the optical axis direction of a focus lens, and a focus evaluation value. 図4のステップS409における合焦判定処理について説明するフローチャート図である。It is a flowchart figure explaining the focus determination process in FIG.4 S409. 図2のステップS209における被写体領域特定AFスキャンの処理を説明するフローチャート図である。FIG. 5 is a flowchart for explaining subject area specific AF scan processing in step S209 in FIG. 2; 図8におけるAF枠設定の例を説明する図である。It is a figure explaining the example of AF frame setting in FIG. 図8のステップS804における前回参照判定処理を説明するフローチャート図である。It is a flowchart figure explaining the last reference determination process in step S804 of FIG. 図8のステップS806における前回参照AFスキャン処理を説明するフローチャート図である。FIG. 9 is a flowchart for explaining a previous reference AF scan process in step S806 of FIG. 図11のステップS1108における主被写体領域判定について説明するフローチャート図である。FIG. 12 is a flowchart for explaining main subject area determination in step S1108 of FIG. 図12における主被写体領域判定の例を説明する図である。FIG. 13 is a diagram illustrating an example of main subject area determination in FIG. 12. 図8のステップS809におけるゾーンAFスキャンの処理を説明するフローチャート図である。FIG. 9 is a flowchart for explaining zone AF scan processing in step S809 in FIG. 8; 図14のステップS1407におけるゾーン更新判定の処理を説明するフローチャート図である。It is a flowchart figure explaining the process of zone update determination in step S1407 of FIG. 図15に示すゾーン更新判定処理の例を説明する図である。It is a figure explaining the example of the zone update determination process shown in FIG. 図8のステップS811における一様面判断の処理を説明するフローチャート図である。It is a flowchart figure explaining the process of uniform surface determination in step S811 of FIG. 図17のステップS1701及びS1705における一様面判定の処理を説明するフローチャート図である。It is a flowchart figure explaining the process of uniform surface determination in step S1701 and S1705 of FIG. 図18の一様面判定について説明する図である。It is a figure explaining the uniform surface determination of FIG. 図8のステップS813におけるフォーカス駆動の処理を説明するフローチャート図である。FIG. 9 is a flowchart for explaining focus drive processing in step S813 in FIG. 図2のステップS211におけるコンティニュアスAFの処理を説明するフローチャート図である。FIG. 3 is a flowchart for explaining continuous AF processing in step S211 of FIG. 2. 図2のステップS211におけるコンティニュアスAFの処理を説明するフローチャート図である。FIG. 3 is a flowchart for explaining continuous AF processing in step S211 of FIG. 2. 図2のステップ212におけるシーン不安定判断の処理を説明するフローチャート図である。It is a flowchart explaining the process of the scene instability judgment in step 212 of FIG. 図2のステップS215における撮影処理を説明するフローチャート図である。It is a flowchart figure explaining the imaging | photography process in step S215 of FIG. 図23のステップS2311における主被写体領域更新の処理を説明するフローチャート図である。FIG. 24 is a flowchart for explaining main subject region update processing in step S2311 of FIG. 図23のステップS2302における本露光用AFの処理を説明するフローチャート図である。FIG. 24 is a flowchart for explaining the main-exposure AF process in step S2302 of FIG. AF枠設定で枠数を増減する例を示す図である。It is a figure which shows the example which increases / decreases the number of frames by AF frame setting. AF枠設定で枠数を増減する例を示す図である。It is a figure which shows the example which increases / decreases the number of frames by AF frame setting. AF枠設定で枠数を増減する例を示す図である。It is a figure which shows the example which increases / decreases the number of frames by AF frame setting. 図25のステップS2411における本露光用AFスキャンの処理を説明するフローチャート図である。FIG. 26 is a flowchart for explaining a main-exposure AF scan process in step S2411 of FIG. 図23のステップS2306における本露光処理について説明するフローチャート図である。FIG. 24 is a flowchart for explaining the main exposure process in step S2306 of FIG.

以下、図面を参照して、本発明の実施形態の一例を説明する。   Hereinafter, an example of an embodiment of the present invention will be described with reference to the drawings.

図1は、本発明の撮像装置の実施形態の一例であるデジタルスチルカメラのシステム構成を示すブロック図である。   FIG. 1 is a block diagram showing a system configuration of a digital still camera which is an example of an embodiment of an imaging apparatus of the present invention.

本実施形態のデジタルスチルカメラは、図1に示すように、撮影レンズ101、絞り/シャッタ102及びフォーカスレンズ104を通過した被写体光束が撮像素子106の撮像面に結像して光電変換される。撮像素子106は、CCDセンサやCMOSセンサ等で構成され、光電変換したアナログ画像信号をA/D変換部107に出力する。A/D変換部107は、撮像素子106から出力されたアナログ画像信号をデジタル画像信号に変換する他、撮像素子106の出力ノイズを除去するCDS回路や非線形増幅回路を含む。   In the digital still camera of this embodiment, as shown in FIG. 1, the subject light flux that has passed through the photographing lens 101, the aperture / shutter 102 and the focus lens 104 forms an image on the imaging surface of the image sensor 106 and is photoelectrically converted. The image sensor 106 is composed of a CCD sensor, a CMOS sensor, or the like, and outputs an analog image signal obtained by photoelectric conversion to the A / D converter 107. The A / D conversion unit 107 includes a CDS circuit and a non-linear amplification circuit that removes output noise of the image sensor 106 in addition to converting an analog image signal output from the image sensor 106 into a digital image signal.

A/D変換部107から出力されたデジタル画像信号は、画像処理部108に出力されて所定の画像処理が施される。画像処理後の画像データは、フォーマット変換部109及びDRAM110を介して画像記録部111に記録されるとともに、フォーマット変換部109、DRAM110及びVRAM113を介して画像表示部114に表示される。   The digital image signal output from the A / D conversion unit 107 is output to the image processing unit 108 and subjected to predetermined image processing. The image data after the image processing is recorded on the image recording unit 111 via the format conversion unit 109 and the DRAM 110 and is displayed on the image display unit 114 via the format conversion unit 109, the DRAM 110 and the VRAM 113.

画像記録部111は、メモリカードなどの記録媒体とそのインタフェースから構成される。DRAM110は、一時的な画像記憶手段としての高速バッファとして、あるいは画像の圧縮伸張における作業用メモリなどに使用される。画像表示部114は、画像表示の他、操作補助のための表示やカメラ状態の表示の他、撮影時には撮影画面と測距領域を表示する。   The image recording unit 111 includes a recording medium such as a memory card and its interface. The DRAM 110 is used as a high-speed buffer as temporary image storage means, or a working memory for image compression / decompression. In addition to image display, the image display unit 114 displays a shooting screen and a distance measurement area at the time of shooting, in addition to display for assisting operations and display of the camera state.

システム制御部112は、撮影シーケンス等のカメラ全体の制御を司る。AE処理部103は、画像処理部108と絞り/シャッタ102に接続され、絞り/シャッタ102の駆動を制御する。AF処理部105は、不図示のモータを介してフォーカスレンズ104を光軸方向に駆動して合焦制御を行う。   The system control unit 112 controls the entire camera such as a shooting sequence. The AE processing unit 103 is connected to the image processing unit 108 and the aperture / shutter 102 and controls the driving of the aperture / shutter 102. The AF processing unit 105 performs focus control by driving the focus lens 104 in the optical axis direction via a motor (not shown).

操作部115は、ユーザにより操作されるレリーズボタン、電源ボタン、ズームレバー、モード切換えダイアル等により構成される。撮影モードスイッチ116は、マクロモード、遠景モード、スポーツモードなどの撮影モードを選択するためのスイッチであり、ユーザが選択した撮影モードに応じて測距距離範囲やAF動作などを変更する。   The operation unit 115 includes a release button, a power button, a zoom lever, a mode switching dial, and the like operated by the user. The shooting mode switch 116 is a switch for selecting a shooting mode such as a macro mode, a distant view mode, and a sports mode, and changes a distance measuring distance range, an AF operation, and the like according to the shooting mode selected by the user.

電源スイッチ117は、電源ボタンが操作されると、オンしてシステムに電源を投入するためのスイッチである。レリーズスイッチ(SW1)118は、レリーズボタンの半押し操作等によりオンしてAFやAE等の撮影準備指示を行うためのスイッチである。レリーズスイッチ(SW2)119は、レリーズボタンの全押し操作等によりオンして、撮影指示を行うためのスイッチである。   The power switch 117 is a switch for turning on and powering on the system when the power button is operated. A release switch (SW1) 118 is a switch that is turned on by a half-press operation of a release button or the like to give a shooting preparation instruction such as AF or AE. A release switch (SW2) 119 is a switch that is turned on by a full-press operation of a release button or the like to give a shooting instruction.

被写体検出モジュール120は、画像処理部108で処理された画像信号を用いて被写体を検出し、検出した一つ又は複数の被写体情報(被写体が顔の場合は、位置・大きさ/顔以外の被写体の場合は、位置)をシステム制御部112に送る。   The subject detection module 120 detects a subject using the image signal processed by the image processing unit 108, and detects one or more pieces of subject information (if the subject is a face, subject other than the position / size / face) In this case, the position) is sent to the system control unit 112.

次に、図2乃至図30を参照して、図1に示すデジタルスチルカメラの撮影動作について説明する。図2での各処理は、不図示の記憶部に記憶されたプログラムに従ってシステム制御部112のCPU等により実行される。   Next, the photographing operation of the digital still camera shown in FIG. 1 will be described with reference to FIGS. Each process in FIG. 2 is executed by the CPU of the system control unit 112 according to a program stored in a storage unit (not shown).

図2において、ステップS201では、システム制御部112は、撮影準備を指示するレリーズスイッチ(SW1)118がオンかオフかを判定し、オンの場合は、ステップS214に進み、オフの場合は、ステップS202に進む。   In FIG. 2, in step S201, the system control unit 112 determines whether or not the release switch (SW1) 118 for instructing shooting preparation is on or off. If it is on, the system control unit 112 proceeds to step S214. The process proceeds to S202.

ステップS202では、システム制御部112は、シーン安定判断を行い、ステップS203に進む。なお、ここでのシーン安定判断の処理の詳細は、図3を用いて後述する。   In step S202, the system control unit 112 performs scene stability determination, and proceeds to step S203. Details of the scene stability determination process will be described later with reference to FIG.

ステップS203では、システム制御部112は、ステップS202において撮影シーンが安定したと判断したか否かを判定し、安定したと判断した場合は、ステップS204へ進み、そうでなければ、ステップS205に進む。ここで、撮影シーンが安定した状態とは、撮影する被写体、カメラの状態が安定して維持され、撮影に適した状態になっていることをいう。   In step S203, the system control unit 112 determines whether or not the shooting scene is determined to be stable in step S202. If it is determined that the shooting scene is stable, the system control unit 112 proceeds to step S204, otherwise proceeds to step S205. . Here, the state in which the photographing scene is stable means that the state of the subject to be photographed and the camera are stably maintained and are suitable for photographing.

ステップS205では、システム制御部112は、PeakPos更新フラグをクリアし、ステップS201に戻る。   In step S205, the system control unit 112 clears the PeakPos update flag and returns to step S201.

ステップS204では、システム制御部112は、後述する図23におけるPeakPos更新フラグがTRUEになっているか、又は後述する図8における主被写体領域特定AFスキャンにて選択された領域で撮影が行われたか否かを判定する。   In step S204, the system control unit 112 determines whether the PeakPos update flag in FIG. 23, which will be described later, is TRUE, or whether imaging has been performed in the region selected by the main subject region specific AF scan in FIG. 8, which will be described later. Determine whether.

そして、システム制御部112は、PeakPos更新フラグがTRUE、又は主被写体領域特定AFスキャンにて選択された領域で撮影が行われた場合は、ステップS211に進む。また、システム制御部112は、PeakPos更新フラグがFALSE、又は主被写体領域特定AFスキャンにて選択された領域で撮影が行われていない場合は、ステップS206に進む。   If the PeakPos update flag is TRUE, or the image is shot in the area selected by the main subject area specific AF scan, the system control unit 112 proceeds to step S211. If the PeakPos update flag is FALSE or the area selected by the main subject area specific AF scan is not being shot, the system control unit 112 proceeds to step S206.

ステップS206では、システム制御部112は、被写体輝度が所定値以下か否かを判定し、被写体輝度が所定値以下であれば、ステップS210に進み、そうでなければ、ステップS207に進む。   In step S206, the system control unit 112 determines whether the subject brightness is equal to or lower than a predetermined value. If the subject brightness is equal to or lower than the predetermined value, the process proceeds to step S210. Otherwise, the process proceeds to step S207.

ステップS210では、システム制御部112は、低照度時用のAF枠を設定し、ステップS211に進む。ここでのAF枠とは、画面内の焦点評価値を取得する領域のことである。焦点評価値とは、撮像素子106から読み出されたアナログ映像信号をA/D変換部107がデジタル信号に変換し、その出力から画像処理部108が輝度信号の高周波成分を抽出した値である。焦点評価値は、フォーカスレンズ104の位置とAF枠位置とを対応づけてDRAM110に記憶しておく。   In step S210, the system control unit 112 sets an AF frame for low illuminance, and the process proceeds to step S211. The AF frame here is an area for acquiring a focus evaluation value in the screen. The focus evaluation value is a value obtained by converting the analog video signal read from the image sensor 106 into a digital signal by the A / D converter 107 and extracting the high-frequency component of the luminance signal from the output from the output. . The focus evaluation value is stored in the DRAM 110 in association with the position of the focus lens 104 and the AF frame position.

また、焦点評価値を取得するとは、AF処理部105がAF制御における判断のために、DRAM110に記憶している焦点評価値を読み出すことである。低照度時は、露光時間が延びるため、スキャンでのAF精度を確保することができない。このため、本実施形態では、低照度時は、被写体領域特定や被写体検出時のスキャン動作は行わず、画面中央付近に所定の大きさのAF枠を1枠設定することとする。   The acquisition of the focus evaluation value means that the AF processing unit 105 reads out the focus evaluation value stored in the DRAM 110 for determination in AF control. At low illuminance, since the exposure time is extended, AF accuracy in scanning cannot be ensured. For this reason, in the present embodiment, at low illuminance, a scanning operation at the time of subject area specification or subject detection is not performed, and one AF frame of a predetermined size is set near the center of the screen.

ステップS207では、システム制御部112は、被写体検出モジュール120にて被写体が検出されたか否かを判定し、被写体検出がされていれば,ステップS208へ進み、被写体検出されていなければS209へ進む。   In step S207, the system control unit 112 determines whether or not a subject has been detected by the subject detection module 120. If the subject has been detected, the process proceeds to step S208, and if the subject has not been detected, the process proceeds to S209.

ステップS208では、システム制御部112は、後述する図4で説明する被写体検出時AFスキャンを行い、ステップS211に進む。ステップS209では、システム制御部112は、後述する図8で説明する被写体領域を特定するためのAFスキャンを行い、ステップS211に進む。ステップS211では、システム制御部112は、後述する図21で説明するコンティニュアスAFを行い、ステップS212に進む。ステップS212では、システム制御部112は、後述する図22で説明するシーン不安定判断を行い、ステップS213に進む。   In step S208, the system control unit 112 performs a subject detection AF scan, which will be described later with reference to FIG. 4, and proceeds to step S211. In step S209, the system control unit 112 performs an AF scan for specifying a subject area, which will be described later with reference to FIG. 8, and proceeds to step S211. In step S211, the system control unit 112 performs continuous AF, which will be described later with reference to FIG. 21, and proceeds to step S212. In step S212, the system control unit 112 performs a scene instability determination described later with reference to FIG. 22, and proceeds to step S213.

ステップS213では、システム制御部112は、ステップS212において撮影シーンが不安定と判断されたか否かを判定し、不安定と判断された場合は、ステップS201に戻り、不安定と判断されない場合は、ステップS211に戻る。ここで、撮影シーンが不安定とは、撮影する被写体の状態やカメラの状態が不安定となり、撮影に適した状態ではなくなることである。   In step S213, the system control unit 112 determines whether or not the shooting scene is determined to be unstable in step S212. If it is determined that the shooting scene is unstable, the process returns to step S201. The process returns to step S211. Here, the shooting scene is unstable means that the state of the subject to be shot and the state of the camera become unstable and are not suitable for shooting.

ステップS214では、システム制御部112は、合焦度判定フラグをFALSEにし、ステップS215に進む。ステップS215では、システム制御部112は、後述する図23で説明する撮影処理を行い、ステップS201に戻る。なお、上述した動作と並行して、常にシステム制御部112からの制御信号に基づき、AE処理部103により絞り及びシャッタ102を制御して画像表示部114に表示される画像の明るさが適正になるようにAE動作を行っている。   In step S214, the system control unit 112 sets the focus degree determination flag to FALSE, and proceeds to step S215. In step S215, the system control unit 112 performs imaging processing described with reference to FIG. 23 described later, and returns to step S201. In parallel with the above-described operation, the brightness of the image displayed on the image display unit 114 is controlled appropriately by controlling the aperture and shutter 102 by the AE processing unit 103 based on the control signal from the system control unit 112 at all times. The AE operation is performed as follows.

次に、図3を参照して、図2のステップS202におけるシーン安定判断の処理を説明する。   Next, with reference to FIG. 3, the scene stability determination process in step S202 of FIG. 2 will be described.

図3において、ステップS301では、システム制御部112は、不図示の角速度センサで検出したカメラ動作量が所定量以下か否かを判定し、所定量以下であれば、ステップS302に進み、所定値を超える場合は、ステップS304に進む。ここでは、カメラ動作量が所定量以下になっているか否かにより、カメラの状態が安定しているか否かを判断する。   In FIG. 3, in step S301, the system control unit 112 determines whether or not the camera operation amount detected by an angular velocity sensor (not shown) is equal to or less than a predetermined amount. If it exceeds, the process proceeds to step S304. Here, whether or not the camera state is stable is determined based on whether or not the camera operation amount is equal to or less than a predetermined amount.

ステップS302では、システム制御部112は、前回からの輝度変化量が所定量以下か否かを判定し、所定量以下であれば、ステップS303に進み、所定値を超える場合は、ステップS304に進む。ここでは、輝度変化量が所定値以下になっていることで、撮影する被写体が変化していないことを判断する。   In step S302, the system control unit 112 determines whether or not the luminance change amount from the previous time is equal to or less than a predetermined amount. If the amount is less than the predetermined amount, the system control unit 112 proceeds to step S303, and if it exceeds the predetermined value, proceeds to step S304. . Here, it is determined that the subject to be photographed has not changed because the luminance change amount is not more than a predetermined value.

そして、ステップS303では、システム制御部112は、撮影シーンが安定状態となったと判断して処理を終了し、ステップS304では、システム制御部112は、撮影シーンが安定状態ではないと判断して処理を終了する。   In step S303, the system control unit 112 determines that the shooting scene is in a stable state and ends the process. In step S304, the system control unit 112 determines that the shooting scene is not in a stable state and performs processing. Exit.

次に、図4を参照して、図2のステップS208における被写体検出時AFスキャンについて説明する。   Next, the subject detection AF scan in step S208 of FIG. 2 will be described with reference to FIG.

図4において、ステップS401では、システム制御部112は、被写体検出モジュール120で検出した顔情報(位置・大きさ)に基づいてAF枠設定を行い、ステップS402に進む。   In FIG. 4, in step S401, the system control unit 112 performs AF frame setting based on the face information (position / size) detected by the subject detection module 120, and the process proceeds to step S402.

ステップS402では、システム制御部112は、AF処理部105によりフォーカスレンズ104をスキャン開始位置へと移動させ、ステップS403に進む。ここで、スキャン開始位置は、例えば、検出した顔の大きさより推定した人物の距離に基づいて決定する。   In step S402, the system control unit 112 causes the AF processing unit 105 to move the focus lens 104 to the scan start position, and proceeds to step S403. Here, the scan start position is determined based on the distance of the person estimated from the detected face size, for example.

ステップS403では、システム制御部112は、現在のフォーカスレンズ位置における焦点評価値をDRAM110に記憶し、ステップS404に進む。ステップS404では、システム制御部112は、フォーカスレンズ104の現在位置を取得し、取得した位置データをDRAM110に記憶して、ステップS405に進む。   In step S403, the system control unit 112 stores the focus evaluation value at the current focus lens position in the DRAM 110, and proceeds to step S404. In step S404, the system control unit 112 acquires the current position of the focus lens 104, stores the acquired position data in the DRAM 110, and proceeds to step S405.

ステップS405では、システム制御部112は、撮影準備を指示するレリーズスイッチ(SW1)118がオンかオフかを判定し、オンの場合は、図2のステップS214に進み、オフの場合は、ステップS406に進む。ステップS406では、システム制御部112は、図5で後述するシーン変化判定を行い、ステップS407に進む。ここで、シーン変化判定とは、撮影するシーンが変わったか否かをカメラの状態や被写体の状態から判定する処理である。   In step S405, the system control unit 112 determines whether the release switch (SW1) 118 for instructing shooting preparation is on or off. If it is on, the process proceeds to step S214 in FIG. 2, and if it is off, step S406 is performed. Proceed to In step S406, the system control unit 112 performs scene change determination, which will be described later with reference to FIG. 5, and proceeds to step S407. Here, the scene change determination is a process of determining whether or not the scene to be photographed has changed from the state of the camera or the state of the subject.

ステップS407では、システム制御部112は、フォーカスレンズ104の現在位置がスキャン終了位置と同一か否かを判定し、両者の位置が同一の場合は、ステップS409に進み、異なる場合は、ステップS408に進む。ここで、スキャン終了位置は、例えば、検出した顔の大きさより推定した人物の距離に基づいて決定する。   In step S407, the system control unit 112 determines whether or not the current position of the focus lens 104 is the same as the scan end position. If both positions are the same, the process proceeds to step S409, and if different, the process proceeds to step S408. move on. Here, the scan end position is determined based on, for example, the distance of the person estimated from the detected face size.

ステップS408では、システム制御部112は、AF処理部105によりフォーカスレンズ104をスキャン終了方向へ向けて所定量移動させ、ステップS403に戻る。ステップS409では、システム制御部112は、後述する図6及び図7で説明する合焦判定を行い、ステップS410に進む。   In step S408, the system control unit 112 causes the AF processing unit 105 to move the focus lens 104 by a predetermined amount in the scan end direction, and returns to step S403. In step S409, the system control unit 112 performs in-focus determination described with reference to FIGS. 6 and 7 described later, and proceeds to step S410.

ステップS410では、システム制御部112は、ステップS409での合焦判定で○判定となったか否かを判定し、○判定となっていれば、ステップS411に進み、そうでなければ、ステップS414に進む。ここでの○判定とは、被写体のコントラストが十分にあり、かつスキャンした距離範囲内に被写体が存在する場合のことである。   In step S410, the system control unit 112 determines whether or not the in-focus determination in step S409 is “good”, and if it is “good”, the process proceeds to step S411. Otherwise, the process proceeds to step S414. move on. Here, “◯” is a case where the subject has sufficient contrast and the subject exists within the scanned distance range.

ステップS411では、システム制御部112は、ステップS403で取得した焦点評価値がピークとなる合焦位置を算出し、ステップS412に進む。ステップS412では、システム制御部112は、AF処理部105によりフォーカスレンズ104をステップS411で算出した合焦位置に移動させ、ステップS413に進む。ステップS413では、システム制御部112は、ピーク検出フラグをTRUEにし、本AFスキャン処理を終了する。   In step S411, the system control unit 112 calculates an in-focus position where the focus evaluation value acquired in step S403 reaches a peak, and the process proceeds to step S412. In step S412, the system control unit 112 causes the AF processing unit 105 to move the focus lens 104 to the in-focus position calculated in step S411, and proceeds to step S413. In step S413, the system control unit 112 sets the peak detection flag to TRUE and ends the AF scan process.

ステップS414では、ステップS409での合焦判定が○判定でない場合、つまり、被写体のコントラストが不十分、又はスキャンした距離範囲外に被写体が存在する場合である。このため、システム制御部112は、AF処理部105によりフォーカスレンズ104をあらかじめDRAM110に記憶している位置(定点)に移動させ、本AFスキャン処理を終了する。ここで、定点は、被写体の存在確率の高い距離に設定する。例えば、顔が検出されていれば、検出した顔の大きさより推定した人物の距離とする。   In step S414, the focus determination in step S409 is not a “good” determination, that is, the subject has insufficient contrast, or the subject exists outside the scanned distance range. Therefore, the system control unit 112 causes the AF processing unit 105 to move the focus lens 104 to a position (fixed point) stored in advance in the DRAM 110, and ends the AF scan processing. Here, the fixed point is set to a distance with a high probability of existence of the subject. For example, if a face is detected, the distance of the person estimated from the size of the detected face is used.

次に、図5を参照して、図4のステップS406におけるシーン変化判定の処理について説明する。なお、後述する図11のステップS1106、図14のステップS1405、及び図21のステップS2107におけるシーン変化判定ついても図5と同様の処理である。   Next, the scene change determination process in step S406 of FIG. 4 will be described with reference to FIG. Note that the scene change determination in step S1106 in FIG. 11, step S1405 in FIG. 14, and step S2107 in FIG. 21, which will be described later, is the same process as in FIG.

図5において、ステップS501では、システム制御部112は、被写体検出モジュール120で検出した被写体検出状態(例えば顔検出状態)が変化したか否かを判定する。そして、システム制御部112は、被写体検出状態が変化していれば、本判定処理を終了して図2のステップS201に戻り、変化してなければ、ステップS502に進む。ここで、被写体検出状態とは、被写体検出されているかどうかである。つまり、前回のシーン変化判定時に被写体が検出されていて今回のシーン変化判定時に被写体が検出されていなければ、被写体検出状態が変化したことになる。   In FIG. 5, in step S501, the system control unit 112 determines whether or not the subject detection state (for example, the face detection state) detected by the subject detection module 120 has changed. If the subject detection state has changed, the system control unit 112 ends the determination process and returns to step S201 in FIG. 2, and if not, proceeds to step S502. Here, the subject detection state is whether or not a subject is detected. That is, if the subject has been detected at the previous scene change determination and no subject has been detected at the current scene change determination, the subject detection state has changed.

ステップS502では、システム制御部112は、不図示の角速度センサで検出したカメラ動作量が所定量以上か否かを判定し、所定量以上であれば、本判定処理を終了して図2のステップS201へ戻り、所定量を超える場合は、ステップS503に進む。   In step S502, the system control unit 112 determines whether or not the amount of camera motion detected by an angular velocity sensor (not shown) is greater than or equal to a predetermined amount. Returning to S201, if the predetermined amount is exceeded, the process proceeds to step S503.

ステップS503では、システム制御部112は、後述する図21で説明するコンティニュアスAF中であるか否かを判定し、コンティニュアスAF中であれば、ステップS504に進み、コンティニュアスAF中でなければ、ステップS505に進む。   In step S503, the system control unit 112 determines whether or not continuous AF, which will be described later with reference to FIG. 21, is being performed. If continuous AF is being performed, the process proceeds to step S504, and continuous AF is being performed. Otherwise, the process proceeds to step S505.

ステップSS504では、システム制御部112は、被写体輝度差が所定値以下か否かを判定し、被写体輝度差が、所定値以下であれば、本判定処理を終了し、所定値を超える場合は、本判定処理を終了して図2のステップS201に戻る。ここで、被写体輝度差とは、前回のシーン変化判定時に取得した被写体輝度値と今回のシーン変化判定時に検出した被写体輝度値との差である。被写体輝度値の差が大きい場合は、シーンが変化したと判断する。   In step SS504, the system control unit 112 determines whether or not the subject luminance difference is equal to or smaller than a predetermined value. If the subject luminance difference is equal to or smaller than the predetermined value, the system control unit 112 ends the determination process. This determination process is terminated, and the process returns to step S201 in FIG. Here, the subject brightness difference is a difference between the subject brightness value acquired at the previous scene change determination and the subject brightness value detected at the current scene change determination. If the difference in the subject luminance values is large, it is determined that the scene has changed.

ステップS505では、システム制御部112は、露光時間が所定時間以上であるか否かを判定し、露光時間が所定時間以上であれば、本判定処理を終了して図2のステップS201に戻り、露光時間が所定時間未満の場合は、ステップS506に進む。露光時間が所定時間以上の場合に本判定処理を終了するのは、露光時間が所定時間以上の場合は、焦点評価値取得する間隔が延びてしまうため、AFの精度を確保できなくなるからである。   In step S505, the system control unit 112 determines whether or not the exposure time is equal to or longer than the predetermined time. If the exposure time is equal to or longer than the predetermined time, the system control unit 112 ends the determination process and returns to step S201 in FIG. If the exposure time is less than the predetermined time, the process proceeds to step S506. The reason why this determination process is terminated when the exposure time is equal to or longer than the predetermined time is that when the exposure time is equal to or longer than the predetermined time, the interval for acquiring the focus evaluation value is extended, so that the AF accuracy cannot be ensured. .

ステップS506では、システム制御部112は、絞り及びシャッタ102の絞りの状態が変化したか否かを判定し、絞りの状態が変化していれば、ステップS507に進み、絞りの状態が変化していなければ、本判定処理を終了する。なお、本実施形態では、絞り制御を用いた場合を例示したが、絞り制御の代わりにNDフィルタによって露出制御を行った場合は、NDフィルタ状態の変化の有無を判定してもよい。これは、絞り又はNDフィルタの状態が変化した場合は、焦点評価値のピーク位置が変化するためである。   In step S506, the system control unit 112 determines whether or not the aperture state of the aperture and the shutter 102 has changed. If the aperture state has changed, the system control unit 112 proceeds to step S507, and the aperture state has changed. If not, the determination process ends. In the present embodiment, the case where the aperture control is used has been exemplified. However, when the exposure control is performed using the ND filter instead of the aperture control, it may be determined whether or not the ND filter state has changed. This is because the peak position of the focus evaluation value changes when the state of the aperture or the ND filter changes.

ステップS507では、システム制御部112は、被写体検出モジュール120で被写体を検出しているか否かを判定する。そして、システム制御部112は、被写体を検出していれば、本判定処理を終了して図4のステップS402に戻り、被写体を検出していなければ、本判定処理を終了して後述する図8のステップS809に進む。   In step S507, the system control unit 112 determines whether the subject is detected by the subject detection module 120. If the subject has been detected, the system control unit 112 ends the determination process and returns to step S402 in FIG. 4. If the subject has not been detected, the system control unit 112 ends the determination process, and will be described later with reference to FIG. The process proceeds to step S809.

次に、図6及び図7を参照して、図4のステップS409における合焦判定処理について説明する。まず、図6を参照して、フォーカスレンズ104の光軸方向の位置と焦点評価値との関係について説明する。   Next, with reference to FIGS. 6 and 7, the focus determination process in step S409 in FIG. 4 will be described. First, the relationship between the position of the focus lens 104 in the optical axis direction and the focus evaluation value will be described with reference to FIG.

図6に示すように、焦点評価値は、遠近競合などの場合を除けば、横軸にフォーカスレンズ位置、縦軸に焦点評価値をとると、山形状になる。そこで、焦点評価値の最大値と最小値の差、一定値(SlopeThr)以上の傾きで傾斜している部分の長さ、傾斜している部分の勾配から山形状を判断することにより、合焦判定を行うことができる。合焦判定における判定結果は、次に示す○判定、×判定又は△判定で出力される。   As shown in FIG. 6, the focus evaluation value has a mountain shape when the horizontal axis represents the focus lens position and the vertical axis represents the focus evaluation value, except in the case of distance competition. Therefore, focusing is performed by judging the mountain shape from the difference between the maximum value and the minimum value of the focus evaluation value, the length of the inclined portion with a slope equal to or greater than a certain value (SlopeThr), and the slope of the inclined portion. Judgment can be made. The determination result in the focus determination is output by the following ○ determination, × determination, or Δ determination.

○判定:被写体のコントラストが十分、かつスキャンした距離範囲内の距離に被写体が存在する。   ○ Judgment: The subject has sufficient contrast and the subject exists at a distance within the scanned distance range.

×判定:被写体のコントラストが不十分、もしくはスキャンした距離範囲外の距離に被写体が位置する。   X: The subject contrast is insufficient, or the subject is located at a distance outside the scanned distance range.

△判定:×判定のうち、至近側方向のスキャンした距離範囲外に被写体が位置する。   Δ Determination: In the X determination, the subject is located outside the scanned distance range in the closest direction.

図6を参照して、焦点評価値の山形状を判断するための一定値以上の傾きで傾斜している部分の長さLと傾斜している部分の勾配SL/Lを説明する。   With reference to FIG. 6, the length L of the inclined portion and the gradient SL / L of the inclined portion with an inclination equal to or greater than a certain value for determining the peak shape of the focus evaluation value will be described.

山の頂上(A点)から傾斜が続いていると認められる点をD点,E点とし、D点とE点の幅を山の幅Lとする。傾斜が続いていると認める範囲は、A点から、所定量(SlopeThr)以上、焦点評価値が下がったスキャンポイントが続く範囲とする。スキャンポイントとは、連続的にフォーカスレンズ104を光軸方向に駆動してスキャン開始点からスキャン終了点まで移動する間に、焦点評価値を取得するポイントのことである。   Points that are recognized to be inclined from the top of the mountain (point A) are defined as points D and E, and the width between points D and E is defined as the width L of the mountain. The range in which the inclination is recognized to be continued is the range in which the scan point having the focus evaluation value decreased from the point A by a predetermined amount (SlopeThr) or more continues. The scan point is a point at which a focus evaluation value is acquired while the focus lens 104 is continuously driven in the optical axis direction and moved from the scan start point to the scan end point.

A点とD点の焦点評価値の差SL1とA点とE点の焦点評価値の差SL2の和SL1+SL2をSLとする。   The sum SL1 + SL2 of the difference SL1 between the focus evaluation values of the points A and D and the difference SL2 of the focus evaluation values between the points A and E is defined as SL.

次に、図7を参照して、図4のステップS409における合焦判定処理について説明する。なお、図4のステップS409における合焦判定処理は、後述する図12のステップS1201、及び図15のステップS1501における合焦判定処理と同様である。   Next, the focus determination process in step S409 in FIG. 4 will be described with reference to FIG. The focus determination process in step S409 in FIG. 4 is the same as the focus determination process in step S1201 in FIG. 12 and step S1501 in FIG.

図7において、ステップS701では、システム制御部112は、焦点評価値の最大値と最小値を求め、ステップS702に進む。ステップS702では、システム制御部112は、焦点評価値が最大となるスキャンポイントを求め、ステップS703に進む。ステップS703では、システム制御部112は、スキャンポイントと焦点評価値から山形状を判断するためのLとSLを求め、ステップS704に進む。   In FIG. 7, in step S701, the system control unit 112 obtains the maximum value and the minimum value of the focus evaluation value, and proceeds to step S702. In step S702, the system control unit 112 obtains a scan point that maximizes the focus evaluation value, and proceeds to step S703. In step S703, the system control unit 112 obtains L and SL for determining the mountain shape from the scan point and the focus evaluation value, and proceeds to step S704.

ステップS704では、システム制御部112は、山形状が至近側登り止まりか否かを判定する。ここでは、次の場合に、山形状が至近側登り止まりと判定する。即ち、焦点評価値が最大値となるスキャンポイントがスキャンを行った所定範囲における近端であり、かつ近端のスキャンポイントの焦点評価値と近端のスキャンポイントより1ポイント分無限遠よりのスキャンポイントの焦点評価値の差が所定値以上の場合である。そして、システム制御部112は、至近側の登り止まりだと判定した場合は、ステップS709に進み、そうでなければ、ステップS705に進む。   In step S <b> 704, the system control unit 112 determines whether or not the mountain shape is stopped on the closest side. Here, in the following case, it is determined that the mountain shape has stopped climbing on the near side. That is, the scan point with the maximum focus evaluation value is the near end in the predetermined range where the scan was performed, and the focus evaluation value of the near end scan point and the scan from the near end scan point by one point at infinity This is a case where the difference in the point focus evaluation values is equal to or greater than a predetermined value. If the system control unit 112 determines that the climbing stop is on the near side, the process proceeds to step S709; otherwise, the process proceeds to step S705.

ステップS705では、システム制御部112は、山形状が無限遠側への登り止まりか否かを判定する。無限遠側への登り止まりと判定するのは、次に場合である。即ち、焦点評価値の最大値となるスキャンポイントがスキャンを行った所定範囲の無限遠端で、かつ無限遠端スキャンポイントの焦点評価値と無限遠端スキャンポイントより1ポイント分至近端よりのスキャンポイントの焦点評価値との差が所定値以上の場合である。そして、システム制御部112は、無限遠側への登り止まりと判定した場合は、ステップS708に進み、そうでなければ、ステップS706に進む。   In step S705, the system control unit 112 determines whether or not the mountain shape stops climbing to the infinity side. Next, it is determined that the climb to the infinity side is stopped. That is, the scan point having the maximum focus evaluation value is at the infinity end of the predetermined range where the scan was performed, and from the focus evaluation value of the infinity end scan point and the infinity end scan point by one point from the nearest end. This is a case where the difference from the focus evaluation value of the scan point is a predetermined value or more. If the system control unit 112 determines that the climb to the infinity side is stopped, the system control unit 112 proceeds to step S708; otherwise, the process proceeds to step S706.

ステップS706では、システム制御部112は、一定値以上の傾きで傾斜している部分の長さLが所定値以上、かつ傾斜している部分の傾斜の平均値SL/Lが所定値以上、かつ焦点評価値の最大値と最小値との差が所定値以上か否かを判定する。そして、システム制御部112は、 長さLが所定値以上、かつ傾斜している部分の傾斜の平均値SL/Lが所定値以上、かつ焦点評価値の最大値と最小値との差が所定値以上であれば、ステップS707に進み、そうでなければ、ステップS708に進む。   In step S706, the system control unit 112 determines that the length L of the portion that is inclined with a certain inclination or more is a predetermined value or more, and the average value SL / L of the inclination of the inclined portion is a predetermined value or more. It is determined whether or not the difference between the maximum and minimum focus evaluation values is greater than or equal to a predetermined value. Then, the system control unit 112 determines that the length L is equal to or greater than a predetermined value, the average slope SL / L of the inclined portion is equal to or greater than the predetermined value, and the difference between the maximum value and the minimum value of the focus evaluation value is predetermined If it is equal to or greater than the value, the process proceeds to step S707; otherwise, the process proceeds to step S708.

ステップS707では、システム制御部112は、得られた焦点評価値が山形状で被写体にコントラストがあり、焦点調節が可能であるため、合焦判定結果を○判定とし、本判定処理を終了する。   In step S707, since the obtained focus evaluation value is a mountain shape and the subject has contrast and the focus can be adjusted, the system control unit 112 sets the focus determination result as “good” and ends this determination processing.

ステップS708では、システム制御部112は、得られた焦点評価値が山形状ではなく、被写体にコントラストがなく、焦点調節が不可能であるため、合焦判定結果を×判定とし、本判定処理を終了する。   In step S708, since the obtained focus evaluation value is not a mountain shape, the subject has no contrast, and focus adjustment is impossible, the focus determination result is determined as x determination, and this determination processing is performed. finish.

ステップS709では、システム制御部112は、得られた焦点評価値が山形状となってはいないが近端方向に登り続けている状態となっており、さらに至近側に被写体ピークが存在している可能性があるため、合焦判定結果を△判定とし、本判定処理を終了する。   In step S709, the system control unit 112 is in a state where the obtained focus evaluation value does not have a mountain shape but continues to climb in the near end direction, and a subject peak exists on the close side. Since there is a possibility, the in-focus determination result is set as Δ determination, and this determination processing ends.

次に、図8を参照して、図2のステップS209における被写体領域特定AFスキャンの処理について説明する。ここでは、画面内の主被写体の領域を特定するためのAFスキャンを行う。   Next, the subject area specifying AF scan process in step S209 of FIG. 2 will be described with reference to FIG. Here, AF scanning is performed to identify the area of the main subject in the screen.

図8において、ステップS801では、システム制御部112は、電子ズームをしているか否かを判定し、電子ズームをしていれば、ステップS802へ進み、そうでなければ、ステップS803に進む。   In FIG. 8, in step S801, the system control unit 112 determines whether or not electronic zooming is being performed. If electronic zooming is being performed, the process proceeds to step S802. Otherwise, the process proceeds to step S803.

ステップS802では、システム制御部112は、電子ズーム時用のAF枠設定を行い、ステップS804に進む。ここで、電子ズームとは、画面中央領域を拡大して画像表示部114に表示することである。画面中央領域を拡大するため、画像表示部114に表示される画像の画素数は、電子ズームをしない場合に比べて少なくなる。   In step S802, the system control unit 112 performs AF frame setting for electronic zoom, and the process proceeds to step S804. Here, the electronic zoom is to enlarge the center area of the screen and display it on the image display unit 114. Since the center area of the screen is enlarged, the number of pixels of the image displayed on the image display unit 114 is reduced as compared with the case where the electronic zoom is not performed.

従って、電子ズーム時に画像表示部114に表示される画像に対して電子ズームをしない場合と同じ割合になるようにAF枠を設定すると、電子ズームしない場合に比べてAF枠内の画素数が少なくなり、焦点評価値のS/Nが低下する。そのため、電子ズーム時と電子ズームをしない場合とでAF枠設定の仕方を変える必要がある。本実施形態では、電子ズーム時は、画面中央付近に所定の大きさのAF枠を1枠設定する。   Therefore, when the AF frame is set so that the ratio of the image displayed on the image display unit 114 during the electronic zoom is the same as when the electronic zoom is not performed, the number of pixels in the AF frame is smaller than when the electronic zoom is not performed. As a result, the S / N of the focus evaluation value decreases. For this reason, it is necessary to change the AF frame setting method between electronic zoom and non-electronic zoom. In the present embodiment, at the time of electronic zoom, one AF frame having a predetermined size is set near the center of the screen.

ステップS803では、システム制御部112は、画面内にN×N個のAF枠を設定し、ステップS804に進む。例えば、N=5とし、AF枠の大きさを縦横の長さ共に画面の10%とした場合、図9に示すAF枠設定となる。N又はAF枠の大きさは、画面内の主被写体の存在確率を考慮して設定してもよいし、横方向と縦方向でAF枠数を異ならせてもよい。   In step S803, the system control unit 112 sets N × N AF frames in the screen, and the process advances to step S804. For example, when N = 5 and the size of the AF frame is 10% of the screen in both vertical and horizontal lengths, the AF frame setting shown in FIG. 9 is obtained. The size of N or the AF frame may be set in consideration of the existence probability of the main subject in the screen, or the number of AF frames may be different between the horizontal direction and the vertical direction.

ステップS804では、システム制御部112は、後述する図10で説明する前回参照判定処理を行い、ステップS805に進む。ステップS805では、システム制御部112は、ステップS804において前回参照判定した結果、前回と撮影シーンがあまり変わらないと判定された場合は、ステップS806へ進み、そうでなければ、ステップS809に進む。ステップS806では、システム制御部112は、後述する図11で説明する前回参照AFスキャン処理を行い、ステップS807に進む。   In step S804, the system control unit 112 performs a previous reference determination process described later with reference to FIG. 10, and the process proceeds to step S805. In step S805, the system control unit 112 proceeds to step S806 if it is determined that the shooting scene does not change much from the previous time as a result of the previous reference determination in step S804, and otherwise proceeds to step S809. In step S806, the system control unit 112 performs a previous reference AF scan process described later with reference to FIG. 11, and proceeds to step S807.

ステップS807では、システム制御部112は、ステップS806の前回参照AFスキャンにおいて主被写体領域が特定できたか否かを判定し、主被写体領域が特定できていれば、ステップS808に進み、そうでなければ、ステップS809に進む。ステップS808では、システム制御部112は、ピーク検出フラグをTRUEにし、ステップS809に進む。ステップS809では、システム制御部112は、後述する図14で説明するゾーンAFスキャンを行い、ステップS810に進む。   In step S807, the system control unit 112 determines whether or not the main subject area has been specified in the previous reference AF scan in step S806. If the main subject area has been specified, the process proceeds to step S808. The process proceeds to step S809. In step S808, the system control unit 112 sets the peak detection flag to TRUE, and proceeds to step S809. In step S809, the system control unit 112 performs a zone AF scan, which will be described later with reference to FIG. 14, and proceeds to step S810.

ステップS810では、システム制御部112は、ステップS809のゾーンAFスキャンにおいて主被写体領域が特定できたか否かを判定し、主被写体領域が特定できていれば、ステップS808へ進み、そうでなければ、ステップS811に進む。ステップS811では、システム制御部112は、後述する図17及び図18等で説明する一様面判断を行い、ステップS812に進む。     In step S810, the system control unit 112 determines whether or not the main subject area can be specified in the zone AF scan of step S809. If the main subject area can be specified, the process proceeds to step S808. The process proceeds to step S811. In step S811, the system control unit 112 performs uniform surface determination described with reference to FIGS. 17 and 18 described later, and proceeds to step S812.

ステップS812では、ステップS809のゾーンAFスキャンにおいて主被写体領域が特定できなかったので、システム制御部112は、画面内に予め設定してある所定領域にAF枠を設定し、ステップS813に進む。ここで、所定領域は、例えば画面の中央領域に1枠設定するなど、主被写体が存在しそうな領域に設定する。ステップS813では、システム制御部112は、後述する図20で説明するフォーカス駆動を行い、被写体領域特定AFスキャンの処理を終了する。   In step S812, since the main subject area could not be specified in the zone AF scan of step S809, the system control unit 112 sets an AF frame in a predetermined area set in advance on the screen, and the process proceeds to step S813. Here, the predetermined area is set to an area where the main subject is likely to exist, for example, one frame is set in the central area of the screen. In step S813, the system control unit 112 performs focus driving, which will be described later with reference to FIG. 20, and ends the subject area specifying AF scan process.

次に、図10を参照して、図8のステップS804における前回参照判定処理を説明する。ここでは、前回AFスキャンを行った撮影シーンに対して、今回、撮影シーンがあまり変化していないかどうかを判定する。   Next, with reference to FIG. 10, the previous reference determination process in step S804 of FIG. 8 will be described. Here, it is determined whether or not the photographic scene has changed much this time with respect to the photographic scene in which the previous AF scan was performed.

図10において、ステップS1001では、システム制御部112は、前回のAFスキャンにおいて主被写体領域を特定できていたか否かを判定し、主被写体領域を特定できていれば、ステップS1002へ進み、そうでなければ、ステップS1006に進む。   In FIG. 10, in step S1001, the system control unit 112 determines whether or not the main subject area can be specified in the previous AF scan, and if the main subject area can be specified, the process proceeds to step S1002. If not, the process proceeds to step S1006.

ステップS1002では、システム制御部112は、現在のフォーカスレンズ104の位置が所定位置より至近側にあるか否かを判定し、至近側にあれば、ステップS1003に進み、そうでなければ、ステップS1006に進む。ここでは、所定位置よりも至近側か否かの判定を行ったが、所定位置より無限遠側か否かを判定するようにしてもよい。   In step S1002, the system control unit 112 determines whether or not the current position of the focus lens 104 is closer to the predetermined position. If it is closer, the process proceeds to step S1003. If not, step S1006 is performed. Proceed to Here, it is determined whether or not it is closer to the predetermined position, but it may be determined whether or not it is at infinity from the predetermined position.

ステップS1003では、システム制御部112は、前回のAFスキャンからの時間差が所定時間以内か否かを判定し、所定時間以内であれば、ステップS1004に進み、そうでなければ、ステップS1006に進む。ステップS1004では、システム制御部112は、前回のAFスキャン時のカメラの向きと同じか否かを判定し、同じであれば、ステップS1005に進み、異なっていれば、ステップS1006に進む。ここで、カメラの向きとは、例えばカメラの縦横位置のことであり、角速度センサにより検出する。   In step S1003, the system control unit 112 determines whether the time difference from the previous AF scan is within a predetermined time. If the time difference is within the predetermined time, the process proceeds to step S1004. Otherwise, the process proceeds to step S1006. In step S1004, the system control unit 112 determines whether or not the camera direction is the same as that in the previous AF scan, the process proceeds to step S1005 if it is the same, and the process proceeds to step S1006 if it is different. Here, the direction of the camera refers to, for example, the vertical and horizontal positions of the camera, and is detected by an angular velocity sensor.

ステップS1005では、システム制御部112は、前回AFスキャンでの撮影シーンとあまり変わらないと判定して本判定処理を終了する。ステップS1006では、システム制御部112は、前回のAFスキャンと撮影シーンが大きく変わったと判定して本判定処理を終了する。   In step S1005, the system control unit 112 determines that there is not much difference from the shooting scene in the previous AF scan, and ends this determination process. In step S1006, the system control unit 112 determines that the previous AF scan and the shooting scene have changed significantly, and ends this determination process.

次に、図11を参照して、図8のステップS806における前回参照AFスキャン処理を説明する。   Next, referring to FIG. 11, the previous reference AF scan process in step S806 in FIG. 8 will be described.

図11において、ステップS1101では、システム制御部112は、現在のフォーカスレンズ104の位置を中心にスキャン範囲を範囲1に設定し、ステップS1102に進む。ここでは前回の撮影シーンとあまり変わらないと判断されているので、第1の範囲は、狭い範囲とする。   In FIG. 11, in step S <b> 1101, the system control unit 112 sets the scan range to range 1 around the current position of the focus lens 104, and proceeds to step S <b> 1102. Here, since it is determined that there is not much difference from the previous shooting scene, the first range is a narrow range.

ステップS1102では、システム制御部112は、フォーカスレンズ104をスキャン開始位置へと移動させ、ステップS1103に進む。ステップS1103では、システム制御部112は、撮像素子106から読み出したアナログ映像信号をA/D変換部107によりデジタル信号に変換する。そして、システム制御部112は、A/D変換部107の出力に基づいて画像処理部108により抽出された輝度信号の高周波成分を焦点評価値としてDRAM110に記憶し、ステップS1104に進む。   In step S1102, the system control unit 112 moves the focus lens 104 to the scan start position, and proceeds to step S1103. In step S <b> 1103, the system control unit 112 converts the analog video signal read from the image sensor 106 into a digital signal by the A / D conversion unit 107. Then, the system control unit 112 stores the high frequency component of the luminance signal extracted by the image processing unit 108 based on the output of the A / D conversion unit 107 as a focus evaluation value in the DRAM 110, and proceeds to step S1104.

ステップS1104では、システム制御部112は、フォーカスレンズ104の現在位置を取得して取得した位置データをDRAM110に記憶し、ステップS1105に進む。システム制御部112は、撮影準備を指示するレリーズスイッチ(SW1)118がオンかオフかを判定し、オンの場合は、本処理を終了して図2のステップS214に進み、オフの場合は、ステップS1106に進む。   In step S1104, the system control unit 112 acquires the current position of the focus lens 104 and stores the acquired position data in the DRAM 110, and the process proceeds to step S1105. The system control unit 112 determines whether the release switch (SW1) 118 that instructs to prepare for shooting is on or off. If the release switch (SW1) 118 is on, the system control unit 112 ends the process and proceeds to step S214 in FIG. The process proceeds to step S1106.

ステップS1106では、システム制御部112は、前述したシーン変化判定処理を行い、ステップS1107に進む。ステップS1107では、システム制御部112は、フォーカスレンズ104の現在位置がスキャン終了位置と等しいか否かを判定し、両者の位置が等しい場合は、ステップS1108に進み、そうでなければ、ステップS1109に進む。ステップS1108では、システム制御部112は、後述する図12及び図13で説明する主被写体領域判定を行い、本処理を終了する。ステップS1109では、システム制御部112は、AF処理部105によりフォーカスレンズ104をスキャン終了方向へ向けて所定量移動させた後、ステップS1103に戻る。   In step S1106, the system control unit 112 performs the scene change determination process described above, and proceeds to step S1107. In step S1107, the system control unit 112 determines whether or not the current position of the focus lens 104 is equal to the scan end position. If both positions are equal, the process proceeds to step S1108; otherwise, the process proceeds to step S1109. move on. In step S1108, the system control unit 112 performs main subject area determination described with reference to FIGS. 12 and 13 described later, and ends this process. In step S1109, the system control unit 112 causes the AF processing unit 105 to move the focus lens 104 by a predetermined amount in the scan end direction, and then returns to step S1103.

次に、図12及び図13を参照して、図11のステップS1108における主被写体領域判定について説明する。なお、ここで説明する主被写体領域判定の処理は、後述する図14のステップS1411における主被写体領域判定の処理と同様である。   Next, the main subject area determination in step S1108 in FIG. 11 will be described with reference to FIGS. The main subject area determination process described here is the same as the main subject area determination process in step S1411 of FIG.

ここでは、画面内の主被写体領域が特定できたか否かを判定する。図13は、図12における主被写体領域判定の例を説明する図である。この例では、AF枠サイズの大きさを画面の10%、N=5、スキャン範囲を0〜500、所定深度範囲を±10とする。なおスキャン範囲及び所定深度範囲の数値は、フォーカスレンズ104の位置を表す数値である。これは、フォーカスレンズ104の不図示の駆動用モータにステッピングモータを使用する場合のパルス数に相当し、値が大きい方が至近側とする。   Here, it is determined whether or not the main subject area in the screen has been identified. FIG. 13 is a diagram for explaining an example of main subject area determination in FIG. In this example, the AF frame size is 10% of the screen, N = 5, the scan range is 0 to 500, and the predetermined depth range is ± 10. The numerical values for the scan range and the predetermined depth range are numerical values representing the position of the focus lens 104. This corresponds to the number of pulses when a stepping motor is used as a driving motor (not shown) of the focus lens 104, and the larger value is the closest side.

図12において、ステップS1201では、システム制御部112は、設定した各AF枠のすべてにおいて、前述した合焦判定(図7参照)を行い、ステップS1202に進む。ここでは、例えば、各AF枠において図13(a)に示すような合焦判定結果となるとする。   In FIG. 12, in step S1201, the system control unit 112 performs the above-described focus determination (see FIG. 7) for all the set AF frames, and the process proceeds to step S1202. Here, for example, it is assumed that the focus determination result as shown in FIG.

ステップS1202では、システム制御部112は、各AF枠における焦点評価値のピーク位置(以下、PeakPosと記す)を算出してDRAM110に記憶し、ステップS1203に進む。ここでは、例えば、各AF枠において、図13(b)に示すようなピーク位置算出結果になるものとする。   In step S1202, the system control unit 112 calculates the peak position of the focus evaluation value in each AF frame (hereinafter referred to as PeakPos), stores it in the DRAM 110, and proceeds to step S1203. Here, for example, in each AF frame, the peak position calculation result as shown in FIG.

ステップS1203では、システム制御部112は、設定しているAF枠が1枠か否かを判定し、設定しているAF枠が1枠であれば、ステップS1214に進み、そうでなければ、ステップS1204に進む。ステップS1204では、システム制御部112は、中央M×M枠の各AF枠のPeakPosを至近順にソートしてソートされた数をSとすし、ステップS1205に進む。   In step S1203, the system control unit 112 determines whether or not the set AF frame is one frame. If the set AF frame is one frame, the system control unit 112 proceeds to step S1214; The process proceeds to S1204. In step S1204, the system control unit 112 sorts PeakPos of each AF frame of the center M × M frame in ascending order and sets the sorted number as S, and proceeds to step S1205.

以下の説明では、M=3とし、中央M×M枠は、図13の太線で囲んだ縦3枠と横3枠の合計9枠が相当する。例えば、図13(b)の場合は、至近順に410、400、400、400、100、100、100、90とソートされ、ソート数S=8となる。なお、ステップS1201の合焦判定において×判定のAF枠ではピーク位置が算出できないので、ソートの対象としない。   In the following description, M = 3, and the center M × M frame corresponds to a total of nine frames including three vertical frames and three horizontal frames surrounded by a thick line in FIG. For example, in the case of FIG. 13B, the sort numbers 410, 400, 400, 400, 100, 100, 100, and 90 are sorted in the closest order, and the sort number S = 8. Note that in the focus determination in step S1201, the peak position cannot be calculated with the AF frame of x determination, and thus is not subject to sorting.

ステップS1205では、システム制御部112は、ステップS1202で算出したM×M枠内のピーク位置の至近順を示すカウンタPを1に設定し、ステップS1206に進む。ステップS1206では、システム制御部112は、ソート順でP番目のPeakPosをPeakPosPとし、ステップS1207に進む。ここでは、例えば、図13(b)では、P=1の場合、PeakPosP=410となる。   In step S1205, the system control unit 112 sets a counter P indicating the closest order of peak positions in the M × M frame calculated in step S1202 to 1, and the process proceeds to step S1206. In step S1206, the system control unit 112 sets the P-th PeakPos in the sort order as PeakPosP, and proceeds to step S1207. Here, for example, in FIG. 13B, when P = 1, PeakPosP = 410.

ステップS1207では、システム制御部112は、中央のM×M個のAF枠中において○判定、かつPeakPosPに対して所定深度範囲内のAF枠の「かたまり」を検出する。そして、システム制御部112は、「かたまり」を構成するAF枠の数と各AF枠の位置をDRAM110に記憶し、ステップS1208に進む。   In step S <b> 1207, the system control unit 112 determines ◯ in the center M × M AF frames, and detects “a lump” of AF frames within a predetermined depth range with respect to PeakPosP. Then, the system control unit 112 stores the number of AF frames constituting the “chunk” and the position of each AF frame in the DRAM 110, and proceeds to step S1208.

ここで、「かたまり」とは、例えば、条件を満たすAF枠が上下左右に隣接している状態のものである。なお、「かたまり」が複数存在する場合には、「かたまり」を構成するAF枠の数や「かたまり」の位置に基づいて、複数の「かたまり」のうちの1つを選択してもよい。   Here, “a lump” is, for example, a state in which AF frames satisfying a condition are adjacent vertically and horizontally. When there are a plurality of “chunks”, one of the “chunks” may be selected based on the number of AF frames constituting the “chunk” and the position of the “chunks”.

ステップS1208では、システム制御部112は、中央のN×N個のAF枠中において、中央のM×M個のAF枠中を1枠以上含むように○判定、かつPeakPosPに対して所定深度範囲内の「かたまり」を検出する。そして、システム制御部112は、「かたまり」を構成するAF枠の数と各AF枠の位置をDRAM110に記憶し、ステップS1209に進む。ここでは、例えば、図13(a)及び図13(b)に示すような判定結果に対して、図13(c)のハッチングで示すような「かたまり」が検出される。   In step S1208, the system control unit 112 makes a ◯ determination so that one or more of the central M × M AF frames are included in the central N × N AF frames, and a predetermined depth range with respect to PeakPosP. Detects “chunks” inside. Then, the system control unit 112 stores the number of AF frames constituting the “chunk” and the position of each AF frame in the DRAM 110, and the process proceeds to step S1209. Here, for example, “chunks” as indicated by hatching in FIG. 13C are detected from the determination results as shown in FIGS. 13A and 13B.

ステップS1209では、システム制御部112は、ステップS1207又はステップS1208で検出した「かたまり」が中央枠を含む「かたまり」であるか否かを判定する。そして、システム制御部112は、中央枠を含む「かたまり」であれば、ステップS1215に進み、そうでなければ、ステップS1210に進む。   In step S1209, the system control unit 112 determines whether or not the “chunk” detected in step S1207 or step S1208 is a “chunk” including the center frame. If the system control unit 112 includes a central frame, the system control unit 112 proceeds to step S1215; otherwise, the system control unit 112 proceeds to step S1210.

ステップS1210では、システム制御部112は、ステップS1207又はステップS1208で検出した「かたまり」がM×M枠内に所定枠数以上含む「かたまり」であるか否かを判定する。そして、システム制御部112は、検出した「かたまり」がM×M枠内に所定枠数以上含む「かたまり」であれば、ステップS1215に進み、そうでなければ、ステップS1211に進む。   In step S <b> 1210, the system control unit 112 determines whether the “chunk” detected in step S <b> 1207 or step S <b> 1208 is a “chunk” that includes a predetermined number of frames or more in the M × M frame. The system control unit 112 proceeds to step S1215 if the detected “chunk” is a “chunk” including a predetermined number of frames or more in the M × M frame, and proceeds to step S1211 otherwise.

ステップS1211では、システム制御部112は、ステップS1207又はステップS1208で検出した「かたまり」が中央M×M枠のうち1枠を含み、N×N枠内のAF枠を所定数以上含む「かたまり」であるか否かを判定する。そして、システム制御部112は、検出した「かたまり」が中央M×M枠のうち1枠を含み、N×N枠内のAF枠を所定数以上含む「かたまり」であれば、ステップS1215に進み、そうでなければ、ステップS1212に進む。   In step S1211, the system control unit 112 determines that the “chunk” detected in step S1207 or step S1208 includes one frame of the central M × M frame and includes a predetermined number or more of the AF frames in the N × N frame. It is determined whether or not. The system control unit 112 proceeds to step S1215 if the detected “chunk” is a “chunk” including one frame out of the central M × M frames and a predetermined number or more of the AF frames in the N × N frame. Otherwise, the process proceeds to step S1212.

ステップS1212では、システム制御部112は、カウンタPに1を加え、ステップS1213に進む。ステップS1213では、システム制御部112は、カウンタPがソート数Sよりも大きいか否かを判定し、カウンタPがソート数Sより大きければ、ステップS1217に進み、そうでなければ、ステップS1206に戻る。ステップS1214では、システム制御部112は、ステップS1201での合焦判定結果が○判定か否かを判定し、○判定であれば、ステップS1215に進み、そうでなければ、ステップS1217に進む。   In step S <b> 1212, the system control unit 112 adds 1 to the counter P and proceeds to step S <b> 1213. In step S1213, the system control unit 112 determines whether or not the counter P is greater than the sort number S. If the counter P is greater than the sort number S, the process proceeds to step S1217; otherwise, the process returns to step S1206. . In step S1214, the system control unit 112 determines whether or not the in-focus determination result in step S1201 is “good”. If yes, the process proceeds to step S1215; otherwise, the process proceeds to step S1217.

ステップS1215では、システム制御部112は、主被写体領域が特定できたと判定し、ステップS1216に進む。ステップS1216では、システム制御部112は、かたまりを構成する各AF枠を主被写体領域と判断して選択し、本判定処理を終了する。なお、ここで設定しているAF枠が1枠の場合は、その1枠を選択する。ステップS1217では、システム制御部112は、主被写体領域の特定ができなかったと判定して本判定処理を終了する。   In step S1215, the system control unit 112 determines that the main subject area has been identified, and the process proceeds to step S1216. In step S1216, the system control unit 112 determines and selects each AF frame constituting the cluster as a main subject area, and ends the determination process. If one AF frame is set here, that one frame is selected. In step S1217, the system control unit 112 determines that the main subject area has not been specified, and ends the determination process.

次に、図14を参照して、図8のステップS809におけるゾーンAFスキャンの処理を説明する。ここで、ゾーンとは、合焦可能距離範囲を複数の範囲に分割した場合の1つ1つの範囲のことを指す。   Next, the zone AF scan process in step S809 in FIG. 8 will be described with reference to FIG. Here, the zone refers to each of the ranges when the focusable distance range is divided into a plurality of ranges.

図14において、ステップS1401では、システム制御部112は、AF処理部105によりフォーカスレンズ104をスキャン開始位置へと移動させ、ステップS1402に進む。ここで、スキャン開始位置は、例えば、無限遠端位置とする。ステップS1402では、システム制御部112は、撮像素子106から読み出したアナログ映像信号をA/D変換部107によりデジタル信号に変換する。そして、システム制御部112は、A/D変換部107の出力から画像処理部108により抽出した輝度信号の高周波成分を焦点評価値としてDRAM110に記憶し、ステップS1403に進む。   In FIG. 14, in step S1401, the system control unit 112 causes the AF processing unit 105 to move the focus lens 104 to the scan start position, and proceeds to step S1402. Here, the scan start position is, for example, the infinity end position. In step S1402, the system control unit 112 converts the analog video signal read from the image sensor 106 into a digital signal by the A / D conversion unit 107. The system control unit 112 stores the high-frequency component of the luminance signal extracted from the output of the A / D conversion unit 107 by the image processing unit 108 in the DRAM 110 as a focus evaluation value, and the process proceeds to step S1403.

ステップS1403では、システム制御部112は、フォーカスレンズ104の現在位置を取得して、取得した位置のデータをDRAM110に記憶し、ステップS1404に進む。ステップS1404では、システム制御部112は、撮影準備を指示するレリーズスイッチ(SW1)118の状態がオンかオフかを判定し、オンであれば、本処理を終了して図2のステップS214に進み、オフであれば、ステップS1405に進む。   In step S1403, the system control unit 112 acquires the current position of the focus lens 104, stores the acquired position data in the DRAM 110, and proceeds to step S1404. In step S1404, the system control unit 112 determines whether the state of the release switch (SW1) 118 that instructs to prepare for shooting is on or off. If the switch is on, the process is terminated and the process proceeds to step S214 in FIG. If it is off, the process proceeds to step S1405.

ステップS1405では、システム制御部112は、前述したシーン変化判定(図5参照)を行い、ステップS1406に進む。ステップS1406では、システム制御部112は、フォーカスレンズ104があらかじめ設定したゾーンの境界位置にあるか否かを判定し、ゾーンの境界位置にある場合は、ステップS1407に進み、そうでなければ、ステップS1409に進む。ステップS1407では、システム制御部112は、後述する図15で説明するゾーン更新判定を行い、ステップS1408に進む。ここで、ゾーン更新とは、あるゾーンをスキャンした後、引き続き隣接するゾーンをスキャンすることを指す。   In step S1405, the system control unit 112 performs the scene change determination (see FIG. 5) described above, and proceeds to step S1406. In step S1406, the system control unit 112 determines whether or not the focus lens 104 is in a preset zone boundary position. If the focus lens 104 is in the zone boundary position, the process proceeds to step S1407; The process proceeds to S1409. In step S1407, the system control unit 112 performs zone update determination described with reference to FIG. 15 described later, and proceeds to step S1408. Here, zone update refers to scanning an adjacent zone after scanning a certain zone.

ステップS1408では、システム制御部112は、ステップS1407においてゾーンを更新すると判定されたか否かを判定し、ゾーンを更新すると判定されていれば、ステップS1409に進み、そうでなければ、ステップS1411に進む。ステップS1409では、システム制御部112は、フォーカスレンズ104の現在位置がスキャン終了位置と等しいか否かを判定し、両者の位置が等しい場合は、ステップS1411に進み、そうでなければ、ステップS1411に進む。ステップS1410では、システム制御部112は、AF処理部105によりフォーカスレンズ104をスキャン終了位置に向けて所定量移動させた後、ステップS1402に戻る。ステップS1411では、システム制御部112は、前述した主被写体領域判定(図12及び図13参照)を行い、本処理を終了する。   In step S1408, the system control unit 112 determines whether or not it is determined to update the zone in step S1407. If it is determined to update the zone, the process proceeds to step S1409; otherwise, the process proceeds to step S1411. . In step S1409, the system control unit 112 determines whether or not the current position of the focus lens 104 is equal to the scan end position. If both positions are equal, the process proceeds to step S1411. Otherwise, the process proceeds to step S1411. move on. In step S1410, the system control unit 112 causes the AF processing unit 105 to move the focus lens 104 by a predetermined amount toward the scan end position, and then returns to step S1402. In step S1411, the system control unit 112 performs the above-described main subject area determination (see FIGS. 12 and 13), and ends this process.

次に、図15を参照して、図14のステップS1407におけるゾーン更新判定の処理を説明する。ここでは、スキャン方向の先に主被写体が存在していそうか否か、つまりAFスキャンを続けるか否かを判定する。図16は、図15に示すゾーン更新判定処理の例を説明する図である。図16に示す例では、AF枠の大きさを画面の10%、N=5、M=3とする。   Next, the zone update determination process in step S1407 of FIG. 14 will be described with reference to FIG. Here, it is determined whether or not the main subject is likely to exist ahead in the scanning direction, that is, whether or not to continue AF scanning. FIG. 16 is a diagram for explaining an example of the zone update determination process shown in FIG. In the example shown in FIG. 16, the size of the AF frame is 10% of the screen, N = 5, and M = 3.

図15において、ステップS1501では、システム制御部112は、設定した各AF枠のすべてにおいて前述した合焦判定(図7参照)を行い、ステップS1502に進む。ここでは、例えば、各AF枠において図16(a)に示すような合焦判定結果となるものとする。   In FIG. 15, in step S1501, the system control unit 112 performs the above-described focus determination (see FIG. 7) for all the set AF frames, and the process proceeds to step S1502. Here, for example, it is assumed that the focus determination result as shown in FIG.

ステップS1502では、システム制御部112は、最終ゾーンまでスキャンをしたか否かを判定し、最終ゾーンまでスキャンしていれば、ステップS1512に進み、そうでなければ、ステップS1503に進む。ステップS1503では、システム制御部112は、○判定枠があるか否かを判定し、○判定枠があれば、ステップS1504に進み、そうでなければ、ステップS1511に進む。   In step S1502, the system control unit 112 determines whether or not scanning has been performed up to the final zone. If scanning has been performed up to the final zone, the process proceeds to step S1512. Otherwise, the process proceeds to step S1503. In step S1503, the system control unit 112 determines whether or not there is a circle determination frame. If there is a circle determination frame, the process proceeds to step S1504. Otherwise, the process proceeds to step S1511.

ステップS1504では、システム制御部112は、中央枠が△判定か否かを判定し、中央枠が△判定であれば、ステップS1511に進み、そうでなければ、ステップS1505に進む。ステップS1505では、システム制御部112は、中央M×M枠の中に△判定枠が所定数以上の「かたまり」があるか否かを判定し、△判定枠が所定数以上の「かたまり」がある場合は、ステップ1511に進み、そうでなければ、ステップS1506に進む。なお、図16では、ここでの所定数を例えば2とする。   In step S1504, the system control unit 112 determines whether or not the center frame is Δ. If the center frame is Δ, the process proceeds to step S1511. Otherwise, the process proceeds to step S1505. In step S1505, the system control unit 112 determines whether or not there is a “chunk” having a predetermined number or more of Δ judgment frames in the central M × M frame. If there is, the process proceeds to step 1511; otherwise, the process proceeds to step S1506. In FIG. 16, the predetermined number here is set to 2, for example.

ステップS1506では、システム制御部112は、中央M×M枠のうち1枠以上を含むようにN×N枠のAF枠中に△判定枠が所定数以上の「かたまり」があるか否かを判定する。そして、システム制御部112は、N×N枠のAF枠中に△判定枠が所定数以上の「かたまり」がある場合は、ステップS1511に進み、そうでなければ、ステップS1507に進む。なお、図16では、ここでの所定数を例えば4とする。   In step S <b> 1506, the system control unit 112 determines whether or not there is a “chunk” of a predetermined number or more of Δ determination frames in the N × N AF frames so as to include one or more of the central M × M frames. judge. Then, the system control unit 112 proceeds to step S1511 when there are “a lump” of Δ determination frames equal to or larger than the predetermined number in the N × N AF frames, and proceeds to step S1507 otherwise. In FIG. 16, it is assumed that the predetermined number here is 4, for example.

ステップS1507では、システム制御部112は、中央M×M枠中に○判定枠が所定数以上の「かたまり」があるか否かを判定し、○判定枠が所定数以上の「かたまり」がある場合は、ステップS1512に進み、そうでなければ、ステップS1508に進む。なお、図16では、ここでの所定数を例えば5とする。ステップS1508では、システム制御部112は、中央枠が×判定か否かを判定し、中央枠が×判定であれば、ステップS1511に進み、そうでなければ、ステップS1509に進む。   In step S <b> 1507, the system control unit 112 determines whether or not there are “a lump” of a predetermined number or more of “◯” determination frames in the central M × M frame, and “a lump” of “O” determination frames is a predetermined number or more. If so, the process proceeds to step S1512; otherwise, the process proceeds to step S1508. In FIG. 16, the predetermined number here is set to 5, for example. In step S1508, the system control unit 112 determines whether or not the center frame is “x” determination. If the center frame is “x” determination, the process proceeds to step S1511; otherwise, the process proceeds to step S1509.

ステップS1509では、システム制御部112は、中央M×M枠の中で△判定枠又は×判定枠が所定数以上の「かたまり」があるか否かを判定する。そして、システム制御部112は、△判定枠又は×判定枠が所定数以上の「かたまり」があれば、ステップS1511に進み、そうでなければ、ステップS1510に進む。なお、図16では、ここでの所定数を例えば2とする。   In step S <b> 1509, the system control unit 112 determines whether or not there is a “chunk” that is greater than or equal to a predetermined number of Δ determination frames or × determination frames in the central M × M frame. Then, the system control unit 112 proceeds to step S1511 if there is a “chunk” having a predetermined number or more of Δ judgment frames or x judgment frames, and proceeds to step S1510 otherwise. In FIG. 16, the predetermined number here is set to 2, for example.

ステップS1510では、システム制御部112は、中央M×M枠の1枠以上を含むようにN×N枠の全ての枠中に△判定枠又は×判定枠が所定数以上「かたまり」があるか否かを判定する。そして、システム制御部112は、△判定枠又は×判定枠が所定数以上「かたまり」があれば、ステップS1511に進み、そうでなければ、ステップS1512に進む。図16では、例として所定数を4とする。   In step S1510, the system control unit 112 determines whether or not there is a “chunk” of a predetermined number or more of Δ judgment frames or × judgment frames in all the N × N frames so as to include one or more central M × M frames. Determine whether or not. Then, the system control unit 112 proceeds to step S1511 if there is a “chunk” of Δ determination frames or x determination frames at a predetermined number or more, and otherwise proceeds to step S1512. In FIG. 16, the predetermined number is 4 as an example.

ステップS1511では、システム制御部112は、「ゾーン更新する」と判定して本判定処理を終了する。ステップS1512では、システム制御部112は、「ゾーン更新しない」と判定して本判定処理を終了する。   In step S1511, the system control unit 112 determines that “the zone is to be updated” and ends the determination process. In step S1512, the system control unit 112 determines that “zone update is not performed” and ends the determination process.

例えば、N=5、M=3としたとき、図16(b)のハッチングで示す領域の「かたまり」となり、「ゾーン更新する」と判定される。   For example, when N = 5 and M = 3, the area shown by hatching in FIG.

次に、図17を参照して、図8のステップS811における一様面判断の処理を説明する。ここで、「一様面である状態」とは、画面内に輝度差がなく、コントラストがないため、AFを行っても焦点評価値ピークが充分に得られない状態のことである。「一様面である状態」において、撮影シーンが安定するごとに、図2のステップS209の被写体領域特定AFスキャンが繰り返されると、画面のピント変動が無駄に繰り返されるため、煩わしい。そのため、この一様面判断処理では、「一様面である状態」を判定した場合には、「一様面である状態」を判定しなくなるまでフォーカスレンズ104を停止する動作を行う。   Next, with reference to FIG. 17, the uniform surface determination process in step S811 of FIG. 8 will be described. Here, the “state that is a uniform surface” is a state in which a focus evaluation value peak cannot be sufficiently obtained even when AF is performed because there is no luminance difference in the screen and no contrast. If the subject area specifying AF scan in step S209 in FIG. 2 is repeated every time the photographing scene is stabilized in the “uniform surface state”, the focus change on the screen is repeated unnecessarily, which is troublesome. Therefore, in this uniform surface determination process, when “a state of a uniform surface” is determined, an operation of stopping the focus lens 104 is performed until “a state of a uniform surface” is not determined.

図17において、ステップS1701では、システム制御部112は、後述する図18で説明する一様面判定を行い、ステップS1702に進む。ステップS1702では、ステップS1701での一様面判定において、撮影シーンが一様面と判定されたか否かを判断し、一様面と判定されていれば、ステップS1703に進み、そうでなければ、本判断処理を終了する。ステップS1703では、システム制御部112は、AF処理部105によりフォーカスレンズ104を所定位置へ移動させ、ステップS1704に進む。ここで、所定位置とは、例えば無限遠を被写体深度の無限遠側に含む過焦点距離とする。   In FIG. 17, in step S1701, the system control unit 112 performs uniform surface determination described in FIG. 18 to be described later, and proceeds to step S1702. In step S1702, in the uniform surface determination in step S1701, it is determined whether or not the shooting scene is determined to be a uniform surface. If it is determined to be a uniform surface, the process proceeds to step S1703; This determination process is terminated. In step S1703, the system control unit 112 causes the AF processing unit 105 to move the focus lens 104 to a predetermined position, and proceeds to step S1704. Here, the predetermined position is, for example, a hyperfocal distance including infinity on the infinity side of the subject depth.

ステップS1704では、システム制御部112は、撮影準備を指示するレリーズスイッチ(SW1)118の状態がオンかオフかを判定し、オンであれば、本判断処理を終了して図2のステップS214に進み、オフであれば、ステップS1705に進む。ステップS1705では、後述する図18で説明する一様面判定を行い、ステップS1706に進む。ステップS1706では、ステップS1705での一様面判定において、撮影シーンが一様面と判定されたか否かを判断し、一様面と判定されていれば、ステップS1704に戻り、そうでなければ、本判断処理を終了し、図2のステップS201に戻る。   In step S1704, the system control unit 112 determines whether the state of the release switch (SW1) 118 that instructs to prepare for shooting is on or off. If it is on, the system control unit 112 ends the determination process and proceeds to step S214 in FIG. If YES in step S1705, the flow advances to step S1705. In step S1705, the uniform surface determination described later with reference to FIG. 18 is performed, and the process proceeds to step S1706. In step S1706, in the uniform plane determination in step S1705, it is determined whether or not the shooting scene is determined to be a uniform plane. If it is determined to be a uniform plane, the process returns to step S1704. This determination process ends, and the process returns to step S201 in FIG.

以上の処理により、「一様面である状態」でなくなるまでフォーカスレンズ104を停止することができる。   With the above processing, the focus lens 104 can be stopped until the “uniform surface” is not reached.

次に、図18及び図19を参照して、図17のステップS1701及びS1705における一様面判定の処理を説明する。ここでは、画面内の輝度情報及び焦点評価値に基づいて「一様面である状態」か否かを判定する。図19は、図18の一様面判定について説明する図である。図19(a)において、X部分は、「一様面である状態」を示しており、Y部分は、「一様面でない状態」を示している。   Next, the uniform surface determination processing in steps S1701 and S1705 of FIG. 17 will be described with reference to FIGS. Here, based on the luminance information in the screen and the focus evaluation value, it is determined whether or not the state is a “uniform surface”. FIG. 19 is a diagram illustrating the uniform surface determination of FIG. In FIG. 19A, the X portion indicates a “state that is a uniform surface”, and the Y portion indicates a “state that is not a uniform surface”.

図18において、ステップS1801では、システム制御部112は、設定しているAF枠が1枠か否かを判定し、1枠であれば、ステップS1805に進み、1枠でなければ、ステップS1802に進む。   In FIG. 18, in step S1801, the system control unit 112 determines whether or not the set AF frame is one frame. If it is one frame, the process proceeds to step S1805. If not, the system control unit 112 proceeds to step S1802. move on.

ステップS1802では、システム制御部112は、「画面中央M×M枠の輝度積分値と、画面全体N×N枠中の4隅M×M枠それぞれの輝度積分値との差分」を算出し、ステップS1802に進む。   In step S1802, the system control unit 112 calculates “the difference between the luminance integrated value of the screen center M × M frame and the luminance integrated values of the four corner M × M frames in the entire screen N × N frame”. The process proceeds to step S1802.

具体的に説明すると、例えば、枠サイズ10%、N=5、M=3とすると、図19(a)の風景のX部分の領域を撮影シーンとした場合、画面中央M×M枠の輝度積分値は、図19(b)のAに示すハッチング領域の輝度値を積分したものとなる。また、画面全体N×N枠中の4隅M×M枠それぞれの輝度積分値は、図19(b)のB、C、D、Eに示すそれぞれのハッチング領域の輝度値を積分したものとなる。画面中央M×M枠の輝度積分値Aとし、4隅M×M枠それぞれの輝度積分値をB、C、D、Eとすると、A−B、A−C、A−D、A−Eの絶対値が、「画面中央M×M枠の輝度積分値と、画面全体N×N枠中の4隅M×M枠それぞれの輝度積分値との差分」となる。   More specifically, for example, assuming that the frame size is 10%, N = 5, and M = 3, when the X portion of the landscape in FIG. The integral value is obtained by integrating the luminance values in the hatched area indicated by A in FIG. Further, the integrated luminance value of each of the four corner M × M frames in the entire screen N × N frame is obtained by integrating the luminance values of the hatched areas shown in B, C, D, and E in FIG. Become. Assuming that the luminance integration value A of the center M × M frame of the screen is B, C, D, and E, the luminance integration values of the four corner M × M frames are AB, AC, AD, and AE. Is the difference between the integrated luminance value of the screen center M × M frame and the integrated luminance values of the four corner M × M frames in the entire screen N × N frame.

ステップS1803では、システム制御部112は、ステップS1802で算出した「画面中央M×M枠の輝度積分値と、画面全体N×N枠中の4隅M×M枠それぞれの輝度積分値との差分」のうち所定値以上の輝度差分となるものがあるか否かを判定する。そして、システム制御部112は、所定値以上の輝度差分となるものがあれば、ステップS1807に進み、そうでなければ、ステップS1804に進む。ステップS1804では、システム制御部112は、中央M×M枠の各AF枠の焦点評価値を演算(例えば加算)したものを新たな焦点評価値とし、ステップ1805に進む。   In step S1803, the system control unit 112 calculates the difference between “the luminance integrated value of the screen center M × M frame and the luminance integrated values of the four corner M × M frames in the entire screen N × N frame” calculated in step S1802. ”Is determined whether there is a luminance difference greater than or equal to a predetermined value. The system control unit 112 proceeds to step S1807 if there is a luminance difference greater than or equal to a predetermined value, otherwise proceeds to step S1804. In step S1804, the system control unit 112 calculates (for example, adds) the focus evaluation value of each AF frame of the center M × M frame as a new focus evaluation value, and proceeds to step 1805.

ステップS1805では、システム制御部112は、焦点評価値が所定値以上か否かを判定し、焦点評価値が所定値以上であれば、ステップS1807に進み、そうでなければ、ステップS1806に進む。ステップS1806では、システム制御部112は、撮影シーンが「一様面である」と判定して本判定処理を終了する。ステップS1807では、システム制御部112は、撮影シーンが「一様面ではない」と判定して本判定処理を終了する。   In step S1805, the system control unit 112 determines whether or not the focus evaluation value is greater than or equal to a predetermined value. If the focus evaluation value is greater than or equal to the predetermined value, the process proceeds to step S1807; otherwise, the process proceeds to step S1806. In step S1806, the system control unit 112 determines that the shooting scene is “a uniform surface” and ends the determination process. In step S <b> 1807, the system control unit 112 determines that the shooting scene is “not a uniform surface” and ends the determination process.

これにより、図19(a)X部分のような「一様面である状態」では、「一様面である」と判定することができ、図19(a)のY部分のような「一様面ではない状態」では、「一様面ではない」と判定することができる。   Accordingly, in the “state that is a uniform surface” as in the X portion of FIG. 19A, it can be determined that it is “uniform surface”, and “one” as in the Y portion of FIG. 19A. In the “non-surface state”, it can be determined that “the surface is not uniform”.

次に、図20を参照して、図8のステップS813におけるフォーカス駆動の処理を説明する。   Next, the focus driving process in step S813 of FIG. 8 will be described with reference to FIG.

図20において、ステップS2001では、システム制御部112は、主被写体領域が特定できたか否かを判定し、特定できていれば、ステップS2002に進み、そうでなければ、ステップS2003に進む。ステップS2002では、システム制御部112は、AF処理部105により、選択したAF枠中の最至近位置にフォーカスレンズ104を駆動して本処理を終了する。ステップS2003では、システム制御部112は、中央M×M枠中に○判定があるか否かを判定し、○判定があれば、ステップS2004に進み、そうでなければ、ステップS2005へ進む。   In FIG. 20, in step S2001, the system control unit 112 determines whether or not the main subject area has been specified. If the main subject area has been specified, the process proceeds to step S2002. Otherwise, the process proceeds to step S2003. In step S2002, the system control unit 112 causes the AF processing unit 105 to drive the focus lens 104 to the closest position in the selected AF frame, and ends this processing. In step S2003, the system control unit 112 determines whether or not there is a ◯ determination in the center M × M frame. If there is a ◯ determination, the process proceeds to step S2004, and if not, the process proceeds to step S2005.

ステップS2004では、システム制御部112は、AF処理部105により、中央M×M枠中の○判定のうち最至近位置にフォーカスレンズ104を駆動して本処理を終了する。ステップS2005では、システム制御部112は、AF処理部105により、あらかじめDRAM110に記憶している位置(定点)へフォーカスレンズ104を移動させて本処理を終了する。ここで定点は、例えば、被写体の存在確率の高い距離に設定する。   In step S2004, the system control unit 112 causes the AF processing unit 105 to drive the focus lens 104 to the closest position among the ◯ determinations in the center M × M frame, and ends this processing. In step S2005, the system control unit 112 causes the AF processing unit 105 to move the focus lens 104 to a position (fixed point) stored in advance in the DRAM 110, and ends this processing. Here, for example, the fixed point is set to a distance having a high probability of existence of the subject.

次に、図21を参照して、図2のステップS211におけるコンティニュアスAFの処理を説明する。   Next, the continuous AF processing in step S211 of FIG. 2 will be described with reference to FIG.

図21において、ステップS2101では、システム制御部112は、合焦度判定フラグをTRUEにし、ステップS2102に進む。ステップS2102では、システム制御部112は、設定した各AF枠で焦点評価値を取得し、ステップS2103に進む。   In FIG. 21, in step S2101, the system control unit 112 sets the focus degree determination flag to TRUE, and the process proceeds to step S2102. In step S2102, the system control unit 112 acquires a focus evaluation value for each set AF frame, and the process advances to step S2103.

ステップS2103では、システム制御部112は、設定しているAF枠が1枠か否かを判定し、設定しているAF枠が1枠の場合は、ステップS2105へ進み、そうでない場合は、ステップS2104へ進む。ステップS2104では、システム制御部112は、主被写体領域として選択したAF枠の焦点評価値を用いて演算した評価値をステップS2105以降に用いる焦点評価値として再設定し、ステップ1205に進む。これにより、撮影シーンが変化して画面内の主被写体領域が変化しても、常に画面内の主被写体領域の焦点評価値を算出することができる。   In step S2103, the system control unit 112 determines whether or not the set AF frame is one frame. If the set AF frame is one frame, the process proceeds to step S2105; The process proceeds to S2104. In step S2104, the system control unit 112 resets the evaluation value calculated using the focus evaluation value of the AF frame selected as the main subject area as the focus evaluation value used in step S2105 and thereafter, and the process proceeds to step 1205. Thereby, even if the photographing scene changes and the main subject area in the screen changes, the focus evaluation value of the main subject area in the screen can always be calculated.

ステップS2105では、システム制御部112は、焦点評価値に基づいて合焦度を算出し、ステップS2106に進む。本実施形態では、焦点評価値に基づいて、合焦度を高、中、低の3段階で決定することにする。ステップS2106では、システム制御部112は、撮影準備を指示するレリーズスイッチ(SW1)118の状態がオンかオフかを判定し、オンであれば、本判断処理を終了して図2のステップS215に進み、オフであれば、ステップS2107に進む。   In step S2105, the system control unit 112 calculates the degree of focus based on the focus evaluation value, and proceeds to step S2106. In the present embodiment, the degree of focus is determined in three stages of high, medium, and low based on the focus evaluation value. In step S2106, the system control unit 112 determines whether the state of the release switch (SW1) 118 that instructs to prepare for shooting is on or off. If the switch is on, the system control unit 112 ends the determination process and proceeds to step S215 in FIG. If the process proceeds and is off, the process proceeds to step S2107.

ステップS2107では、システム制御部112は、前述したシーン変化判定(図5参照)を行い、ステップS2108に進む。ステップS2108では、システム制御部112は、ピーク検出フラグがTRUEであるか否かを判定し、TRUEであれば、ステップS2125へ進み、FALSEであれば、ステップS2109へ進む。   In step S2107, the system control unit 112 performs the scene change determination (see FIG. 5) described above, and proceeds to step S2108. In step S2108, the system control unit 112 determines whether or not the peak detection flag is TRUE. If it is TRUE, the system control unit 112 proceeds to step S2125, and if it is FALSE, the system control unit 112 proceeds to step S2109.

ステップS2109では、システム制御部112は、フォーカスレンズ104の現在位置を取得し、ステップS2110に進む。ステップS2110では、システム制御部112は、焦点評価値の取得及びフォーカスレンズ104の現在位置の取得をカウントするための取得カウンタに1を加え、ステップS2111に進む。この取得カウンタは、初期化動作(図示略)においてあらかじめ0に設定されているものとする。ステップS2111では、システム制御部112は、取得カウンタの値が1か否かを判定し、取得カウンタの値が1であれば、ステップS2114へ進み、取得カウンタの値が1でなければ、ステップS2112へ進む。   In step S2109, the system control unit 112 acquires the current position of the focus lens 104, and proceeds to step S2110. In step S2110, the system control unit 112 adds 1 to an acquisition counter for counting acquisition of the focus evaluation value and acquisition of the current position of the focus lens 104, and the process proceeds to step S2111. This acquisition counter is set to 0 in advance in an initialization operation (not shown). In step S2111, the system control unit 112 determines whether or not the value of the acquisition counter is 1. If the value of the acquisition counter is 1, the process proceeds to step S2114. If the value of the acquisition counter is not 1, the system control unit 112 proceeds to step S2112. Proceed to

ステップS2112では、システム制御部112は、「今回の焦点評価値」が「前回の焦点評価値」よりも大きいか否かを判定し、大きい場合は、ステップS2113へ進み、そうでなければ、ステップS2120へ進む。ステップS2113では、システム制御部112は、増加カウンタに1を加え、ステップS2114に進む。ステップS2114では、システム制御部112は、今回の焦点評価値を焦点評価値の最大値としてシステム制御部112に内蔵される演算メモリ(以下、内蔵メモリという)に記憶し、ステップS2115に進む。   In step S2112, the system control unit 112 determines whether or not “current focus evaluation value” is larger than “previous focus evaluation value”. If larger, the process proceeds to step S2113; The process proceeds to S2120. In step S2113, the system control unit 112 adds 1 to the increase counter and proceeds to step S2114. In step S2114, the system control unit 112 stores the current focus evaluation value as the maximum value of the focus evaluation value in a calculation memory (hereinafter referred to as a built-in memory) built in the system control unit 112, and the process proceeds to step S2115.

ステップS2115では、システム制御部112は、フォーカスレンズ104の現在の位置を焦点評価値のピーク位置として内蔵メモリに記憶し、ステップS2116に進む。ステップS2116では、システム制御部112は、今回の焦点評価値を前回の焦点評価値として内蔵メモリに記憶し、ステップS2117に進む。ステップS2117では、システム制御部112は、フォーカスレンズ104の現在位置が測距範囲の端にあるか否かを判定し、測距範囲の端にあれば、ステップS2118へ進み、そうでなければ、ステップS2119へ進む。   In step S2115, the system control unit 112 stores the current position of the focus lens 104 in the built-in memory as the peak position of the focus evaluation value, and proceeds to step S2116. In step S2116, the system control unit 112 stores the current focus evaluation value in the built-in memory as the previous focus evaluation value, and proceeds to step S2117. In step S2117, the system control unit 112 determines whether or not the current position of the focus lens 104 is at the end of the distance measurement range. If it is at the end of the distance measurement range, the system control unit 112 proceeds to step S2118; The process proceeds to step S2119.

ステップS2118では、システム制御部112は、AF処理部105により、フォーカスレンズ104の移動方向を反転し、ステップS2119に進む。ステップS2119では、AF処理部105によりフォーカスレンズ104を所定量移動させ、本処理を終了する。   In step S2118, the system control unit 112 reverses the moving direction of the focus lens 104 by the AF processing unit 105, and the process proceeds to step S2119. In step S2119, the AF processing unit 105 moves the focus lens 104 by a predetermined amount, and the process ends.

ステップS2120では、システム制御部112は、「焦点評価値の最大値−今回の焦点評価値」が所定量より大きいか否かを判定し、所定量より大きければ、ステップS2121へ進み、そうでなければ、ステップS2116へ進む。ここで「焦点評価値の最大値−今回の焦点評価値」が所定量より大きい場合、即ち最大値から所定量減少している場合は、その最大値をピントのピーク位置での値とみなす。   In step S2120, the system control unit 112 determines whether or not “the maximum value of the focus evaluation value−the current focus evaluation value” is greater than a predetermined amount, and if greater than the predetermined amount, the system control unit 112 proceeds to step S2121. If so, the process proceeds to step S2116. Here, when “the maximum value of the focus evaluation value−the current focus evaluation value” is larger than the predetermined amount, that is, when the predetermined value is decreased from the maximum value, the maximum value is regarded as a value at the focus peak position.

ステップS2121では、システム制御部112は、増加カウンタが0より大きいか否かを判定し、0より大きければ、ステップS2122へ進み、そうでなければ、ステップS2116へ進む。ステップS2122では、システム制御部112は、AF処理部105により、フォーカスレンズ104をステップS2115で記憶した焦点評価値が最大値となったピーク位置へ移動させ、ステップS2123に進む。ステップS2123では、システム制御部112は、ピーク検出フラグをTRUEとし、ステップS2124に進む。ステップS2124では、システム制御部112は、取得カウンタを0とし、ステップS2119に進む。   In step S2121, the system control unit 112 determines whether or not the increase counter is greater than 0. If the increase counter is greater than 0, the process proceeds to step S2122; otherwise, the process proceeds to step S2116. In step S2122, the system control unit 112 causes the AF processing unit 105 to move the focus lens 104 to the peak position where the focus evaluation value stored in step S2115 is the maximum value, and the process proceeds to step S2123. In step S2123, the system control unit 112 sets the peak detection flag to TRUE and proceeds to step S2124. In step S2124, the system control unit 112 sets the acquisition counter to 0, and proceeds to step S2119.

ステップS2125では、システム制御部112は、今回の焦点評価値が焦点評価値の最大値に対して所定割合以上変動したか否かを判定し、所定割合以上の大きな変動をしていれば、ステップS2127へ進み、そうでなければ、ステップS2126へ進む。ステップS2126ではAF処理部105によりフォーカスレンズ104を停止させて停止位置に保持し、ステップS2119に進む。   In step S2125, the system control unit 112 determines whether or not the current focus evaluation value has fluctuated by a predetermined ratio or more with respect to the maximum value of the focus evaluation value. The process proceeds to S2127, and if not, the process proceeds to Step S2126. In step S2126, the AF processing unit 105 stops the focus lens 104 and holds it at the stop position, and the process proceeds to step S2119.

ステップS2127では、システム制御部112は、焦点評価値が最大となるフォーカスレンズ位置を再び算出し直すため、ピーク検出フラグをFALSEとして焦点評価値の最大値及びピーク位置をリセットし、ステップS2128に進む。ステップS2128では、システム制御部112は、増加カウンタをリセットし、ステップS2119に進む。   In step S2127, the system control unit 112 resets the maximum value and peak position of the focus evaluation value by setting the peak detection flag to FALSE to recalculate the focus lens position where the focus evaluation value is maximized, and the process proceeds to step S2128. . In step S2128, the system control unit 112 resets the increase counter and proceeds to step S2119.

以上のように、コンティニュアスAFでは、常に主被写体が合焦状態となるようにフォーカスレンズ104を駆動する。   As described above, in continuous AF, the focus lens 104 is driven so that the main subject is always in focus.

次に、図22を参照して、図2のステップ212におけるシーン不安定判断の処理を説明する。   Next, with reference to FIG. 22, the process of determining scene instability in step 212 of FIG. 2 will be described.

図22において、ステップS2201では、システム制御部112は、角速度センサで検出したカメラ動作量が所定量以上となっているか否かを判定し、所定量以上であれば、ステップS2205へ進み、そうでなければ、ステップS2202へ進む。ステップS2202では、システム制御部112は、前回からの輝度変化量が所定量以上か否かを判定し、所定量以上であれば、ステップS2205へ進み、そうでなければ、ステップS2203へ進む。   In FIG. 22, in step S2201, the system control unit 112 determines whether or not the camera operation amount detected by the angular velocity sensor is equal to or greater than a predetermined amount. If it is equal to or greater than the predetermined amount, the process proceeds to step S2205. If not, the process proceeds to step S2202. In step S2202, the system control unit 112 determines whether or not the luminance change amount from the previous time is greater than or equal to a predetermined amount. If it is greater than or equal to the predetermined amount, the system control unit 112 proceeds to step S2205, otherwise proceeds to step S2203.

ステップS2203では、システム制御部112は、被写体検出モジュール120で検出した被写体検出状態(例えば顔検出状態)が変化したか否かを判定し、変化していれば、ステップS2205へ進み、変化していなければ、ステップS2204へ進む。ここで、被写体検出状態とは、例えば顔検出されているかどうかである。つまり、前回のシーン不安定判断で顔検出されていて今回のシーン不安定判断で顔検出されていなければ、顔検出状態が変化したことになる。   In step S2203, the system control unit 112 determines whether or not the subject detection state (for example, the face detection state) detected by the subject detection module 120 has changed. If the subject detection state has changed, the process proceeds to step S2205. If not, the process proceeds to step S2204. Here, the subject detection state is, for example, whether or not a face is detected. That is, if the face is detected in the previous scene instability determination and the face is not detected in the current scene instability determination, the face detection state has changed.

ステップS2204では、システム制御部112は、撮影シーンが変化していないと判断して本処理を終了する。ステップS2205では、システム制御部112は、撮影シーンが変化したと判断して本処理を終了する。   In step S2204, the system control unit 112 determines that the shooting scene has not changed, and ends this process. In step S2205, the system control unit 112 determines that the shooting scene has changed, and ends this process.

次に、図23を参照して、図2のステップS215における撮影処理を説明する。   Next, with reference to FIG. 23, the photographing process in step S215 of FIG. 2 will be described.

図23において、ステップS2301では、システム制御部112は、AE処理部103により本露光用のAE処理を行い、ステップS2302に進む。ステップS2302では、システム制御部112は、後述する図25で説明する本露光用のAFを行い、ステップ2303に進む。   In FIG. 23, in step S2301, the system control unit 112 performs AE processing for main exposure by the AE processing unit 103, and the process proceeds to step S2302. In step S2302, the system control unit 112 performs AF for main exposure described later with reference to FIG. 25, and the process proceeds to step 2303.

ステップS2303では、システム制御部112は、撮影動作を指示するレリーズスイッチ(SW2)119の状態がオンかオフかを判定し、オンの場合は、ステップS2305へ進み、オフの場合は、ステップS2304へ進む。ステップS2304では、システム制御部112は、撮影準備を指示するレリーズスイッチ(SW1)118の状態がオンかオフかを判定し、オンの場合は、ステップS2303へ戻り、オフの場合は、ステップS2307へ進む。   In step S2303, the system control unit 112 determines whether the state of the release switch (SW2) 119 instructing the photographing operation is on or off. If it is on, the process proceeds to step S2305. If it is off, the process proceeds to step S2304. move on. In step S2304, the system control unit 112 determines whether the state of the release switch (SW1) 118 for instructing shooting preparation is on or off. If it is on, the process returns to step S2303. If it is off, the process returns to step S2307. move on.

ステップS2305では、システム制御部112は、PeakPos更新フラグをFALSEとし、ステップS2306に進む。ステップS2306では、システム制御部112は、後述する図30で説明する本露光処理を行い、ステップS2313に進む。ステップS2313では、システム制御部112は、レリーズスイッチ(SW1)118をオンになったこと、即ちレリーズボタンが半押し操作されたことを表す変数Sw1Conterを0にクリアし、本処理を終了する。   In step S2305, the system control unit 112 sets the PeakPos update flag to FALSE, and proceeds to step S2306. In step S2306, the system control unit 112 performs main exposure processing described with reference to FIG. 30 described later, and proceeds to step S2313. In step S2313, the system control unit 112 clears the variable Sw1Contour indicating that the release switch (SW1) 118 is turned on, that is, the release button has been pressed halfway, and ends this processing.

ステップS2307では、システム制御部112は、Sw1Counterをインクリメントし、ステップS2308に進む。なお、Sw1Counterは、カメラ起動時に0で初期化されているものとする。ステップS2308では、システム制御部112は、Sw1Counterと所定閾値と比較することで、レリーズスイッチ(SW1)118が所定閾値を超える回数オンになったか否かを判定する。即ち、レリーズボタンが所定閾値を超える回数半押し操作されたか否かを判定する。そして、システム制御部112は、レリーズスイッチ(SW1)118が所定閾値を超える回数オンになっていれば、ステップS2309に進み、そうでなければ、本処理を終了する。   In step S2307, the system control unit 112 increments Sw1Counter and proceeds to step S2308. Note that Sw1Counter is initialized to 0 when the camera is activated. In step S2308, the system control unit 112 determines whether or not the release switch (SW1) 118 has been turned on the number of times exceeding the predetermined threshold value by comparing Sw1Counter with the predetermined threshold value. That is, it is determined whether or not the release button has been pressed halfway a number of times exceeding a predetermined threshold. Then, the system control unit 112 proceeds to step S2309 if the release switch (SW1) 118 has been turned on the number of times exceeding the predetermined threshold, and ends this process otherwise.

ステップS2309では、システム制御部112は、レリーズスイッチ(SW1)118がオンする前に求めた主被写体領域のピーク位置と後述するレリーズスイッチ(SW1)118のオン時の本露光AFのピーク位置とを比較して両ピーク位置の差を算出する。そして、システム制御部112は、両ピーク位置の差が所定値以上であれば、ステップS2310へ進み、所定値未満であれば、本処理を終了する。ここでの処理は、レリーズスイッチ(SW1)118がオン時に被写体が動いたことを考慮したものである。   In step S2309, the system control unit 112 obtains the peak position of the main subject area obtained before the release switch (SW1) 118 is turned on and the peak position of the main exposure AF when the release switch (SW1) 118 described later is turned on. The difference between both peak positions is calculated by comparison. If the difference between the two peak positions is equal to or greater than the predetermined value, the system control unit 112 proceeds to step S2310. This processing takes into consideration that the subject has moved when the release switch (SW1) 118 is on.

ステップS2310では、システム制御部112は、PeakPos更新フラグをTRUEとし、ステップ2311に進む。ステップS2311では、システム制御部112は、後述する図24で説明する主被写体領域更新を行い、ステップS2312に進む。ステップS2312では、システム制御部112は、前述したフォーカス駆動(図20参照)を行い、本処理を終了する。   In step S2310, the system control unit 112 sets the PeakPos update flag to TRUE, and proceeds to step 2311. In step S2311, the system control unit 112 performs main subject region update described with reference to FIG. 24 described later, and proceeds to step S2312. In step S2312, the system control unit 112 performs the above-described focus drive (see FIG. 20), and ends this process.

次に、図24を参照して、図23のステップS2311における主被写体領域更新の処理を説明する。   Next, with reference to FIG. 24, the main subject area update process in step S2311 of FIG. 23 will be described.

図24において、ステップS2701では、システム制御部112は、設定しているAF枠が1枠か否かを判定し、設定しているAF枠が1枠であれば、ステップS2712へ進み、そうでなければ、ステップS2702へ進む。ステップS2702では、システム制御部112は、図12のステップS1202で算出したM×M枠内のピーク位置の至近順を示すカウンタPをインクリメントし、ステップ2703に進む。ステップS2703では、システム制御部112は、カウンタPがソート数Sよりも大きい否かを判定し、カウンタPがソート数Sよりも大きければ、ステップS2711へ進み、そうでなければ、ステップS2704へ進む。   In FIG. 24, in step S2701, the system control unit 112 determines whether or not the set AF frame is one frame. If the set AF frame is one frame, the process proceeds to step S2712, and so on. If not, the process proceeds to step S2702. In step S2702, the system control unit 112 increments the counter P indicating the closest order of the peak positions in the M × M frame calculated in step S1202 of FIG. 12, and proceeds to step 2703. In step S2703, the system control unit 112 determines whether or not the counter P is larger than the sort number S. If the counter P is larger than the sort number S, the system control unit 112 proceeds to step S2711. Otherwise, the process proceeds to step S2704. .

ステップS2704では、システム制御部112は、ソート順でP番目のPeakPosをPeakPosPとし、ステップS2705に進む。ステップS2705では、システム制御部112は、中央のM×M個のAF枠中において○判定、かつPeakPosPに対して所定深度範囲内のAF枠の「かたまり」を検出する。そして、システム制御部112は、「かたまり」を構成するAF枠の数と各AF枠の位置をDRAM110に記憶し、ステップS2706に進む。なお、前述したように、「かたまり」が複数存在する場合には、「かたまり」を構成するAF枠の数や「かたまり」の位置に基づいて、複数の「かたまり」のうちの1つを選択してもよい。   In step S2704, the system control unit 112 sets the P-th PeakPos as PeakPosP in the sort order, and proceeds to step S2705. In step S2705, the system control unit 112 determines ◯ in the center M × M AF frames, and detects a “chunk” of the AF frames within a predetermined depth range with respect to PeakPosP. Then, the system control unit 112 stores the number of AF frames constituting the “chunk” and the position of each AF frame in the DRAM 110, and the process proceeds to step S2706. As described above, when there are a plurality of “chunks”, one of the “chunks” is selected based on the number of AF frames constituting the “chunk” and the position of the “chunks”. May be.

ステップS2706では、システム制御部112は、中央のN×N個のAF枠中において、中央のM×M個のAF枠中を1枠以上含むように○判定、かつPeakPosPに対して所定深度内の「かたまり」を検出する。そして、システム制御部112は、「かたまり」を構成するAF枠の数と各AF枠の位置をDRAM110に記憶し、ステップS2707に進む。ステップS2707では、システム制御部112は、ステップS2705又はステップS2706で検出した「かたまり」が中央枠を含む「かたまり」であるか否かを判定する。そして、システム制御部112は、中央枠を含む「かたまり」であれば、ステップS2712へ進み、そうでなければ、ステップS2708へ進む。   In step S2706, the system control unit 112 makes a ◯ determination so that one or more of the central M × M AF frames are included in the central N × N AF frames, and within a predetermined depth with respect to PeakPosP. Detects a “chunk”. Then, the system control unit 112 stores the number of AF frames constituting the “chunk” and the position of each AF frame in the DRAM 110, and proceeds to step S2707. In step S2707, the system control unit 112 determines whether the “chunk” detected in step S2705 or step S2706 is a “chunk” including the central frame. If the system control unit 112 includes the central frame, the system control unit 112 proceeds to step S2712. Otherwise, the system control unit 112 proceeds to step S2708.

ステップS2708では、システム制御部112は、ステップS2705又はステップS2706で検出した「かたまり」がM×M枠内に所定数以上含む「かたまり」であるか否かを判定する。そして、システム制御部112は、M×M枠内に所定数以上含む「かたまり」であれば、ステップS2713へ進み、そうでなければ、ステップS2709へ進む。   In step S2708, the system control unit 112 determines whether or not the “chunk” detected in step S2705 or step S2706 is a “chunk” that includes a predetermined number or more in the M × M frame. The system control unit 112 proceeds to step S2713 if it is a “cluster” including a predetermined number or more in the M × M frame, and proceeds to step S2709 otherwise.

ステップS2709では、システム制御部112は、ステップS2705又はステップS2706で検出した「かたまり」が中央M×M枠のうち1枠を含みN×N枠内のAF枠を所定数以上含む「かたまり」であるか否かを判定する。そして、システム制御部112は、中央M×M枠のうち1枠を含みN×N枠内のAF枠を所定数以上含む「かたまり」であれば、ステップS2713へ進み、そうでなければ、ステップS2710へ進む。   In step S <b> 2709, the system control unit 112 determines that the “chunk” detected in step S <b> 2705 or step S <b> 2706 is a “chunk” including one frame out of the central M × M frames and a predetermined number or more of AF frames in the N × N frame. It is determined whether or not there is. The system control unit 112 proceeds to step S2713 if it is a “chunk” including one frame of the central M × M frame and including a predetermined number or more of AF frames in the N × N frame, otherwise proceeds to step S2713. The process proceeds to S2710.

ステップS2710では、システム制御部112は、カウンタPに1を加え(インクリメント)、ステップS2711に進む。ステップS2712では、システム制御部112は、図12のステップS1201での合焦判定結果が○判定か否かを判定し、○判定であれば、ステップS2713へ進み、そうでなければ、ステップS2711へ進む。ステップS2713では、システム制御部112は、主被写体領域が特定できたと判定し、ステップS2714に進む。   In step S2710, the system control unit 112 adds 1 to the counter P (increment), and proceeds to step S2711. In step S2712, the system control unit 112 determines whether or not the in-focus determination result in step S1201 of FIG. 12 is ◯. If yes, the process proceeds to step S2713. If not, the process proceeds to step S2711. move on. In step S2713, the system control unit 112 determines that the main subject area has been identified, and the process proceeds to step S2714.

ステップS2714では、システム制御部112は、かたまりを構成する各AF枠を主被写体領域と判断して選択し、ステップS2715に進む。ここで、設定しているAF枠が1枠の場合は、その1枠を選択する。ステップS2715では、システム制御部112は、ピーク検出フラグをTRUEにし、本更新処理を終了する。ステップS2711では、システム制御部112は、主被写体領域の特定ができなかったと判定して本更新処理を終了する。   In step S2714, the system control unit 112 determines and selects each AF frame constituting the cluster as a main subject area, and the process proceeds to step S2715. Here, when one AF frame is set, that one frame is selected. In step S2715, the system control unit 112 sets the peak detection flag to TRUE and ends the update process. In step S2711, the system control unit 112 determines that the main subject area has not been specified, and ends the update process.

次に、図25を参照して、図23のステップS2302における本露光用AFの処理を説明する。   Next, with reference to FIG. 25, the main exposure AF process in step S2302 of FIG. 23 will be described.

図25において、ステップS2401では、システム制御部112は、主被写体検出フラグがTRUEであるか否かを判定し、TRUEであれば、ステップS2402へ進み、TRUEでなければ、ステップS2403へ進む。ステップS2402では、システム制御部112は、本露光用のAF枠設定を例えば後述するAF枠設定1とし、ステップS2404に進む。一方、ステップS2403では、システム制御部112は、本露光用のAF枠設定を例えば後述するAF枠設定2とし、ステップS2410に進む。   In FIG. 25, in step S2401, the system control unit 112 determines whether or not the main subject detection flag is TRUE. If it is TRUE, the system control unit 112 proceeds to step S2402, and if not TRUE, the system control unit 112 proceeds to step S2403. In step S2402, the system control unit 112 sets the AF frame setting for main exposure to, for example, AF frame setting 1 described later, and proceeds to step S2404. On the other hand, in step S2403, the system control unit 112 sets the AF frame setting for main exposure to, for example, AF frame setting 2 described later, and proceeds to step S2410.

ここでの枠数設定は、図8のステップS803で設定したN×Nと異ならせる。本実施形態では、AF評価値の演算量を低減させる為、N>Lとなるような枠設定L×Lで設定する。また、枠サイズとしては、S/N比を向上させるため、SizeN<SizeLとなるような枠サイズを設定する。   The frame number setting here is different from N × N set in step S803 in FIG. In this embodiment, in order to reduce the calculation amount of the AF evaluation value, the frame setting L × L is set such that N> L. As the frame size, a frame size that satisfies SizeN <SizeL is set in order to improve the S / N ratio.

また、枠の設定は、主被写体の検出結果に基づいて決定してもよい。主被写体が検出できていた場合は、ステップS2402にて、AF評価値の演算量の低減、S/N比を向上させる為、N>L、SizeN<SizeLとなるAF枠設定1を設定する。主被写体が検出できていない場合は、主被写体検出用に設定した枠に対して細かな被写体を撮影しており、背景抜けなどの現象が起こっている可能性がある。そこで、主被写体検出の分解能をあげる為、ステップS2403にて、N<L′、SizeN>SizeL′となるようなAF枠設定2を設定してもよい。図26、図27及び図28に、AF枠設定1,2で枠数を増減する例を示す。   The frame setting may be determined based on the detection result of the main subject. If the main subject has been detected, in step S2402, AF frame setting 1 is set such that N> L and SizeN <SizeL in order to reduce the calculation amount of the AF evaluation value and improve the S / N ratio. If the main subject is not detected, a fine subject is photographed in the frame set for main subject detection, and there is a possibility that a phenomenon such as background loss has occurred. Therefore, in order to increase the resolution of main subject detection, AF frame setting 2 may be set in step S2403 such that N <L ′ and SizeN> SizeL ′. 26, 27 and 28 show examples in which the number of frames is increased or decreased with AF frame settings 1 and 2. FIG.

ステップS2404では、システム制御部112は、図21のステップS2105で算出した合焦度が「高」であるか否かを判定し、合焦度が「高」であれば、ステップS2405へ進み、合焦度が「高」でなければ、ステップS2406へ進む。   In step S2404, the system control unit 112 determines whether or not the degree of focus calculated in step S2105 in FIG. 21 is “high”. If the degree of focus is “high”, the process proceeds to step S2405. If the focus level is not “high”, the process proceeds to step S2406.

ステップS2405では、システム制御部112は、現在のフォーカスレンズ104の位置を中心にスキャン範囲1の設定を行い、ステップS2411に進む。ここでは、コンティニュアスAF動作により主被写体にほぼピントが合っている状態、つまり焦点評価値がピークを示す合焦位置付近にフォーカスレンズ104が位置すると判断して、狭いスキャン範囲を設定する。   In step S2405, the system control unit 112 sets the scan range 1 around the current position of the focus lens 104, and proceeds to step S2411. Here, a narrow scan range is set by determining that the focus lens 104 is positioned in a state where the main subject is substantially in focus by the continuous AF operation, that is, in the vicinity of a focus position where the focus evaluation value shows a peak.

ステップS2406では、システム制御部112は、図21のステップS2105で算出した合焦度が「中」であるか否かを判定し、合焦度が「中」であれば、ステップS2407へ進み、合焦度が「中」でなければ、ステップS2408へ進む。   In step S2406, the system control unit 112 determines whether or not the focus degree calculated in step S2105 in FIG. 21 is “medium”. If the focus degree is “medium”, the process proceeds to step S2407. If the degree of focus is not “medium”, the process proceeds to step S2408.

ステップS2407では、システム制御部112は、現在のフォーカスレンズ104の位置を中心にスキャン範囲2の設定を行い、ステップS2411に進む。ここでは、コンティニュアスAF動作により合焦位置付近にフォーカスレンズが位置しているが、合焦度が「高」状態ほどではないと判断してスキャン範囲1より範囲を広げた範囲をスキャン範囲2として設定する。   In step S2407, the system control unit 112 sets the scan range 2 around the current position of the focus lens 104, and proceeds to step S2411. Here, the focus lens is positioned near the in-focus position by the continuous AF operation. However, it is determined that the in-focus degree is not as high as the “high” state, and the range that is wider than the scan range 1 is the scan range. Set as 2.

ステップS2408では、システム制御部112は、フォーカスレンズ104の現在位置がマクロ領域か否かを判定し、マクロ領域であれば、ステップS2409へ進み、マクロ領域でなければ、ステップS2410へ進む。ステップS2409では、システム制御部112は、あらかじめ記憶してあるマクロ領域であるスキャン範囲3を設定し、ステップS2411に進む。ステップS2410では、システム制御部112は、あらかじめ記憶してある測距可能範囲全域であるスキャン範囲4に設定し、ステップS2411に進む。   In step S2408, the system control unit 112 determines whether or not the current position of the focus lens 104 is a macro area. If the current position is the macro area, the process proceeds to step S2409, and if not, the process proceeds to step S2410. In step S2409, the system control unit 112 sets a scan range 3 that is a macro area stored in advance, and the process advances to step S2411. In step S2410, the system control unit 112 sets the scan range 4 that is the entire range of distance measurement stored in advance, and proceeds to step S2411.

ステップS2411では、システム制御部112は、後述する図29で説明する本露光用AFスキャンを行い、ステップS2412に進む。ステップS2412では、システム制御部112は、後述する図29のステップS2506で算出したピーク位置にフォーカスレンズ104を移動させ、本処理を終了する。   In step S2411, the system control unit 112 performs AF for main exposure described later with reference to FIG. 29, and proceeds to step S2412. In step S2412, the system control unit 112 moves the focus lens 104 to the peak position calculated in step S2506 of FIG. 29 described later, and ends this process.

次に、図29を参照して、図25のステップS2411における本露光用AFスキャンの処理を説明する。   Next, with reference to FIG. 29, the main-exposure AF scan process in step S2411 in FIG. 25 will be described.

図29において、ステップS2501では、システム制御部112は、AF処理部105によりフォーカスレンズ104をスキャン開始位置へ移動させ、ステップS2502に進む。ここで、スキャン開始位置とは、図25のステップS2405,S2407,S2409,S2410で設定したスキャン範囲1〜4の端位置とする。ステップS2502では、システム制御部112は、撮像素子106から読み出したアナログ映像信号をA/D変換部107でデジタル信号に変換する。そして、システム制御部112は、A/D変換部107の出力から画像処理部108により抽出されたが輝度信号の高周波成分を焦点評価値としてDRAM110に記憶し、ステップS2503に進む。   In FIG. 29, in step S2501, the system control unit 112 causes the AF processing unit 105 to move the focus lens 104 to the scan start position, and proceeds to step S2502. Here, the scan start position is the end position of the scan ranges 1 to 4 set in steps S2405, S2407, S2409, and S2410 in FIG. In step S2502, the system control unit 112 converts the analog video signal read from the image sensor 106 into a digital signal by the A / D conversion unit 107. The system control unit 112 stores the high-frequency component of the luminance signal extracted from the output of the A / D conversion unit 107 by the image processing unit 108 as a focus evaluation value in the DRAM 110, and proceeds to step S2503.

ステップS2503では、システム制御部112は、フォーカスレンズ104の現在位置を取得して、取得した位置データをDRAM110に記憶し、ステップS2504に進む。ステップS2504では、システム制御部112は、フォーカスレンズ104の現在位置がスキャン終了位置と等しいか否かを判定し、両者の位置が等しい場合は、ステップS2506へ進み、そうでなければ、ステップS2505へ進む。   In step S2503, the system control unit 112 acquires the current position of the focus lens 104, stores the acquired position data in the DRAM 110, and proceeds to step S2504. In step S2504, the system control unit 112 determines whether or not the current position of the focus lens 104 is equal to the scan end position. If both positions are equal, the process proceeds to step S2506; otherwise, the process proceeds to step S2505. move on.

ステップS2505では、システム制御部112は、AF処理部105によりフォーカスレンズ104をスキャン終了位置に向けて所定量移動させた後、ステップS2502に戻る。ステップS2506では、システム制御部112は、ステップS2502で記憶した焦点評価値とそのレンズ位置に基づき焦点評価値のピーク位置を算出し、本処理を終了する。ここで、焦点評価値のピーク位置を算出するにあたって、AF枠を複数枠設定した場合は、図12で説明した主被写体領域判定により決定した主被写体領域の最至近ピーク位置に基づいて算出してもよいし、別の方法でピーク位置を算出してもよい。   In step S2505, the system control unit 112 causes the AF processing unit 105 to move the focus lens 104 by a predetermined amount toward the scan end position, and then returns to step S2502. In step S2506, the system control unit 112 calculates the peak position of the focus evaluation value based on the focus evaluation value stored in step S2502 and its lens position, and ends this process. Here, when calculating the peak position of the focus evaluation value, when a plurality of AF frames are set, the calculation is performed based on the closest peak position of the main subject area determined by the main subject area determination described in FIG. Alternatively, the peak position may be calculated by another method.

次に、図30を参照して、図23のステップS2306における本露光処理について説明する。   Next, with reference to FIG. 30, the main exposure processing in step S2306 in FIG. 23 will be described.

図30において、ステップS2601では、システム制御部112は、撮像素子106の露光を行い、ステップS2602に進む。ステップS2602では、システム制御部112は、撮像素子106に蓄積されたデータを読み出し、ステップS2603に進む。ステップS2603では、システム制御部112は、A/D変換部107で撮像素子106から読み出したアナログ信号をデジタル信号に変換し、ステップS2604に進む。   In FIG. 30, in step S2601, the system control unit 112 exposes the image sensor 106, and the process proceeds to step S2602. In step S2602, the system control unit 112 reads the data accumulated in the image sensor 106, and proceeds to step S2603. In step S2603, the system control unit 112 converts the analog signal read from the image sensor 106 by the A / D conversion unit 107 into a digital signal, and the process proceeds to step S2604.

ステップS2604では、システム制御部112は、画像処理部108により、A/D変換部107から出力されるデジタル信号に対して各種画像処理を施し、ステップS2605に進む。ステップS2605では、システム制御部112は、ステップS2604で画像処理した画像に対してJPEGなどのフォーマットにしたがって圧縮し、ステップS2606進む。ステップS2606では、システム制御部112は、圧縮したデータを画像記録部111に記録し、本露光処理を終了する。   In step S2604, the system control unit 112 performs various image processing on the digital signal output from the A / D conversion unit 107 by the image processing unit 108, and the process proceeds to step S2605. In step S2605, the system control unit 112 compresses the image processed in step S2604 according to a format such as JPEG, and the process advances to step S2606. In step S2606, the system control unit 112 records the compressed data in the image recording unit 111, and ends the main exposure process.

以上説明したように、本実施形態では、合焦すべき被写体に対して高速にピントを合わせることが可能となる。   As described above, in the present embodiment, it is possible to focus on the subject to be focused at high speed.

なお、本発明は、上記実施形態に例示したものに限定されるものではなく、本発明の要旨を逸脱しない範囲において適宜変更可能である。   In addition, this invention is not limited to what was illustrated to the said embodiment, In the range which does not deviate from the summary of this invention, it can change suitably.

また、本発明は、以下の処理を実行することによっても実現される。即ち、本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。   The present invention can also be realized by executing the following processing. That is, 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 execute the program. It can also be realized by a process of reading and executing. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

104 フォーカスレンズ
105 AF処理部
106 撮像素子
108 画像処理部
110 DRAM
111 画像記録部
112 システム制御部
118 レリーズスイッチ(SW1)
119 レリーズスイッチ(SW2)
120 被写体検出モジュール
104 Focus lens 105 AF processing unit 106 Image sensor 108 Image processing unit 110 DRAM
111 Image Recording Unit 112 System Control Unit 118 Release Switch (SW1)
119 Release switch (SW2)
120 Subject detection module

Claims (5)

撮像手段から出力される画像データに基づいて、被写体が合焦状態となる位置にフォーカスレンズを駆動する撮像装置であって、
撮影準備指示を受け付ける受け付け手段と、
前記受け付け手段が前記撮影準備指示を受け付ける前に複数の被写体領域から合焦すべき被写体領域を特定するスキャン動作を行う特定手段と、
前記受け付け手段が前記撮影準備指示を受け付けたとき、前記特定手段による前記スキャン動作と異なるスキャン動作に基づき、前記合焦すべき前記被写体領域が合焦状態となるように前記フォーカスレンズを駆動する合焦制御手段と、
前記合焦制御手段により合焦状態となった被写体領域を表示部に表示する表示手段と、を備え、
前記合焦制御手段は、前記表示手段により合焦状態となった被写体領域を前記表示部に表示した後、撮影シーンが変化しない状態で前記受け付け手段が前記撮影準備指示を受け付けたとき、前記表示部に表示した被写体領域と異なった被写体領域を選択して、選択した被写体領域が合焦状態となるように前記フォーカスレンズを駆動することを特徴とする撮像装置。
An imaging device that drives a focus lens to a position where a subject is in focus based on image data output from an imaging means,
Receiving means for receiving a shooting preparation instruction;
Specifying means for performing a scanning operation for specifying a subject area to be focused from a plurality of subject areas before the accepting means accepts the shooting preparation instruction;
When the accepting unit accepts the imaging preparation instruction, the focus lens is driven so that the subject area to be focused is brought into focus based on a scan operation different from the scan operation by the specifying unit. Focus control means,
Display means for displaying on the display unit the subject area brought into focus by the focus control means,
The focus control unit displays the subject area in the focused state by the display unit on the display unit, and then displays the display when the receiving unit receives the shooting preparation instruction in a state where the shooting scene does not change. An imaging apparatus, wherein a subject area different from the subject area displayed on the screen is selected, and the focus lens is driven so that the selected subject area is in focus.
前記合焦制御手段は、前記表示手段により合焦状態となった被写体領域を前記表示部に表示した後、撮影シーンが変化しない状態で前記受け付け手段が複数の前記撮影準備指示を受け付けたとき、前記表示部に表示した被写体領域と異なった被写体領域を選択することを特徴とする請求項1に記載の撮像装置。   The focus control unit displays the subject area in a focused state by the display unit on the display unit, and then when the receiving unit receives a plurality of the shooting preparation instructions in a state where the shooting scene does not change, The imaging apparatus according to claim 1, wherein a subject area different from the subject area displayed on the display unit is selected. 前記合焦制御手段は、前記受け付け手段が前記撮影準備指示を受け付ける前に前記特定手段によるスキャン動作により求めた合焦位置と、前記受け付け手段が前記撮影準備指示を受け付けた後に、前記特定手段による前記スキャン動作と異なるスキャン動作により求めた合焦位置との差が所定値以上の場合に、前記表示部に表示した被写体領域と異なった被写体領域を選択することを特徴とする請求項1又は2に記載の撮像装置。   The focusing control means includes a focusing position obtained by a scanning operation by the specifying means before the accepting means accepts the photographing preparation instruction, and an specifying means after the accepting means accepts the photographing preparation instruction. The subject area different from the subject area displayed on the display unit is selected when the difference between the focus position obtained by the scan operation different from the scan operation is a predetermined value or more. The imaging device described in 1. 撮像手段から出力される画像データに基づいて、被写体が合焦状態となる位置にフォーカスレンズを駆動する撮像装置の制御方法であって、
撮影準備指示を受け付ける受け付けステップと、
前記受け付けステップで前記撮影準備指示を受け付ける前に複数の被写体領域から合焦すべき被写体領域を特定するスキャン動作を行う特定ステップと、
前記受け付けステップで前記撮影準備指示を受け付けたとき、前記特定ステップでの前記スキャン動作と異なるスキャン動作に基づき、前記合焦すべき前記被写体領域が合焦状態となるように前記フォーカスレンズを駆動する合焦制御ステップと、
前記合焦制御ステップで合焦状態となった被写体領域を表示部に表示する表示ステップと、を備え、
前記合焦制御ステップは、前記表示ステップで合焦状態となった被写体領域を前記表示部に表示した後、撮影シーンが変化しない状態で前記受け付けステップで前記撮影準備指示を受け付けたとき、前記表示部に表示した被写体領域と異なった被写体領域を選択して、選択した被写体領域が合焦状態となるように前記フォーカスレンズを駆動することを特徴とする撮像装置の制御方法。
A control method for an imaging apparatus that drives a focus lens to a position where a subject is in focus based on image data output from an imaging means,
A reception step for receiving a shooting preparation instruction;
A specifying step of performing a scanning operation for specifying a subject area to be focused from a plurality of subject areas before receiving the photographing preparation instruction in the receiving step;
When the imaging preparation instruction is received in the receiving step, the focus lens is driven based on a scanning operation different from the scanning operation in the specific step so that the subject area to be focused is in focus. A focusing control step;
A display step of displaying on the display unit the subject area that is in focus in the focus control step, and
The focus control step displays the subject area in the focus state in the display step on the display unit, and then receives the shooting preparation instruction in the reception step in a state where the shooting scene does not change. A method for controlling an imaging apparatus, comprising: selecting a subject area different from the subject area displayed on the screen and driving the focus lens so that the selected subject area is in focus.
請求項4に記載の撮像装置の制御方法の各ステップをコンピュータに実行させることを特徴とするプログラム。   A program for causing a computer to execute each step of the method for controlling an imaging apparatus according to claim 4.
JP2015050796A 2015-03-13 2015-03-13 Imaging device, control method thereof, and program Expired - Fee Related JP6590496B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015050796A JP6590496B2 (en) 2015-03-13 2015-03-13 Imaging device, control method thereof, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015050796A JP6590496B2 (en) 2015-03-13 2015-03-13 Imaging device, control method thereof, and program

Publications (2)

Publication Number Publication Date
JP2016170319A true JP2016170319A (en) 2016-09-23
JP6590496B2 JP6590496B2 (en) 2019-10-16

Family

ID=56983750

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015050796A Expired - Fee Related JP6590496B2 (en) 2015-03-13 2015-03-13 Imaging device, control method thereof, and program

Country Status (1)

Country Link
JP (1) JP6590496B2 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009080458A (en) * 2007-09-04 2009-04-16 Ricoh Co Ltd Imaging device and imaging method
JP2010193074A (en) * 2009-02-17 2010-09-02 Canon Inc Device and method for adjusting focus
JP2011018070A (en) * 2010-09-03 2011-01-27 Casio Computer Co Ltd Camera, camera control program and camera control method
JP2013054375A (en) * 2012-11-01 2013-03-21 Casio Comput Co Ltd Camera, camera control program, and camera control method
JP2013254218A (en) * 2013-08-08 2013-12-19 Canon Inc Focus adjustment apparatus and focus adjustment method
JP2014038288A (en) * 2012-08-20 2014-02-27 Canon Inc Focus adjustment device and control method therefor
JP2014126612A (en) * 2012-12-25 2014-07-07 Canon Inc Imaging device and control method therefore

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009080458A (en) * 2007-09-04 2009-04-16 Ricoh Co Ltd Imaging device and imaging method
JP2010193074A (en) * 2009-02-17 2010-09-02 Canon Inc Device and method for adjusting focus
JP2011018070A (en) * 2010-09-03 2011-01-27 Casio Computer Co Ltd Camera, camera control program and camera control method
JP2014038288A (en) * 2012-08-20 2014-02-27 Canon Inc Focus adjustment device and control method therefor
JP2013054375A (en) * 2012-11-01 2013-03-21 Casio Comput Co Ltd Camera, camera control program, and camera control method
JP2014126612A (en) * 2012-12-25 2014-07-07 Canon Inc Imaging device and control method therefore
JP2013254218A (en) * 2013-08-08 2013-12-19 Canon Inc Focus adjustment apparatus and focus adjustment method

Also Published As

Publication number Publication date
JP6590496B2 (en) 2019-10-16

Similar Documents

Publication Publication Date Title
JP5339954B2 (en) Focus adjustment device and focus adjustment method
JP5376986B2 (en) Focus adjustment device and focus adjustment method
JP5300520B2 (en) Focus adjustment device and focus adjustment method
JP5297222B2 (en) Focus adjustment device and focus adjustment method
JP5406552B2 (en) Focus adjustment device and focus adjustment method
JP5339955B2 (en) Focus adjustment device and focus adjustment method
JP2007219389A (en) Imaging apparatus
JP5406553B2 (en) Focus adjustment device and focus adjustment method
JP6877920B2 (en) Lens control device, its control method
JP6971692B2 (en) Control device, image pickup device, control method, program, and storage medium
JP4997043B2 (en) Imaging apparatus, method and program
JP5300521B2 (en) Focus adjustment device and focus adjustment method
JP6139960B2 (en) Imaging apparatus and control method thereof
JP7289714B2 (en) FOCUS ADJUSTMENT DEVICE, IMAGING DEVICE, FOCUS ADJUSTMENT METHOD, AND PROGRAM
JP5855054B2 (en) Focus adjustment device and focus adjustment method
JP6590496B2 (en) Imaging device, control method thereof, and program
JP5355381B2 (en) Imaging apparatus and focus control method thereof
JP2015194648A (en) Imaging apparatus, method for controlling imaging apparatus, program, and storage medium
JP2008046556A (en) Camera
JP6843558B2 (en) Lens control device, its control method
JP5780723B2 (en) Imaging apparatus, control method therefor, program, and storage medium
JP2011043633A (en) Focus adjustment device and focus adjustment method
JP4967930B2 (en) Focus detection device
JP2011043632A (en) Focus-adjusting device and focus-adjusting method
JP6581362B2 (en) AUTOFOCUS DEVICE, ITS CONTROL METHOD, PROGRAM, AND RECORDING MEDIUM

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180307

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180928

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20181106

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181228

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190604

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190730

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: 20190820

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190917

R151 Written notification of patent or utility model registration

Ref document number: 6590496

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees