JP2010193074A - Device and method for adjusting focus - Google Patents

Device and method for adjusting focus Download PDF

Info

Publication number
JP2010193074A
JP2010193074A JP2009034111A JP2009034111A JP2010193074A JP 2010193074 A JP2010193074 A JP 2010193074A JP 2009034111 A JP2009034111 A JP 2009034111A JP 2009034111 A JP2009034111 A JP 2009034111A JP 2010193074 A JP2010193074 A JP 2010193074A
Authority
JP
Japan
Prior art keywords
focus
subject
process proceeds
scan
focus lens
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
JP2009034111A
Other languages
Japanese (ja)
Other versions
JP5406553B2 (en
Inventor
Kenji Kimoto
賢志 木本
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 JP2009034111A priority Critical patent/JP5406553B2/en
Publication of JP2010193074A publication Critical patent/JP2010193074A/en
Application granted granted Critical
Publication of JP5406553B2 publication Critical patent/JP5406553B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide a device and method for adjusting focus capable of rapidly bring an object to be focused into focus by suppressing degradation of detection performance of a main object in a low-illuminance condition. <P>SOLUTION: The device for adjusting focus includes a focus lens, a photoelectric conversion means, an extraction means, and a control means. The photoelectric conversion means converts an object image imaged by the focus lens to an electric signal. The extraction means extracts a signal component of a specific frequency band from an output signal of the photoelectric conversion means. The control means executes a first operation for identifying an object region to be focused by executing an AF scan operation before imaging preparation, and executes a second operation different from the first operation by executing the AF scan operation to execute a focusing operation in the imaging preparation. When the brightness of the object is smaller than a first threshold value before the imaging preparation, a third operation different from the first operation is executed. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、焦点調節機能を有する電子スチルカメラなどの撮像装置等に適用される焦点調節装置、焦点調節方法等に関するものである。 The present invention relates to a focus adjustment device, a focus adjustment method, and the like applied to an imaging device such as an electronic still camera having a focus adjustment function.

従来、電子スチルカメラやビデオカメラなどではオートフォーカス(AFとも記す)を行う場合、CCD(電荷結合素子)などを用いた撮像素子から得られる輝度信号の高域周波数成分が最大になるレンズ位置を合焦位置とする方式が用いられている。この方式の1つとして、次のスキャン方式が知られている。即ち、移動範囲の全域に亘ってレンズを駆動しながら撮像素子から得られる輝度信号の高域周波数成分に基づく評価値(焦点評価値とも記す)をその都度に記憶していき、記憶した値のうち、その最大値に相当するレンズ位置を合焦位置とする。 Conventionally, when performing autofocus (also referred to as AF) in an electronic still camera or a video camera, the lens position where the high frequency component of the luminance signal obtained from an image sensor using a CCD (charge coupled device) is maximized A method of setting the in-focus position is used. As one of these methods, the following scan method is known. That is, an evaluation value (also referred to as a 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 moving range is stored each time. Among these, the lens position corresponding to the maximum value is set as the focus position.

もう1つの方式として、焦点評価値が増加する方向にレンズを動かし、焦点評価値が最大になる位置を合焦位置とする山登り方式(いわゆるContinuous AF。コンティニュアスAFとも記す)が知られている。 As another method, a hill-climbing method (so-called Continuous AF, also referred to as continuous AF) is known in which the lens is moved in the direction in which the focus evaluation value increases and the position where the focus evaluation value is maximized. Yes.

また、これまでに、撮影準備指示前にコンティニュアスAFを行い合焦状態を維持することで、撮影準備指示後に行なうスキャン方式によるAFの移動範囲を制限し、AF動作の時間を短縮する方法がある(特許文献1参照)。 In addition, a method for reducing the AF operation time by limiting the AF moving range by the scanning method performed after the shooting preparation instruction by performing continuous AF before the shooting preparation instruction and maintaining the in-focus state until now. (See Patent Document 1).

特許4106485号公報Japanese Patent No. 4106485

前記コンティニュアスAFにおいて、焦点評価値の増加する方向にレンズを動かそうとした場合、画面内における合焦すべき領域が分からないと、合焦すべき被写体にピントを合わせることができない。特許文献1では、前記コンティニュアスAFにおいて、前記スキャン方式を組み合わせることでより合焦動作を早くしている。しかし、ユーザーがピントを合わせたいと考えている画面内の合焦すべき被写体(主被写体とも記す)を判断していないので、撮影シーンによっては、合焦すべき被写体にピントを合わせることができないという事態が起こり得る。 In the 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. In Patent Document 1, in the continuous AF, the focusing operation is made faster by combining the scan methods. However, since the user does not determine the subject to be focused (also referred to as the main subject) on the screen that the user wants to focus on, the subject to be focused cannot be focused depending on the shooting scene. This can happen.

一方で、被写体が暗く映像信号のレベルが低い場合、映像信号をそのまま用いたのでは、輝度が足りないことに加えて、撮像素子のノイズの影響により焦点評価値の本来の信号成分が得にくくなる。 On the other hand, when the subject is dark and the level of the video signal is low, using the video signal as it is, in addition to lack of brightness, it is difficult to obtain the original signal component of the focus evaluation value due to the influence of noise of the image sensor Become.

上記課題に鑑み、本発明の技術的特徴として、フォーカスレンズを用いて結像された被写体像を電気信号に変換する光電変換手段と、前記光電変換手段の出力信号から焦点検出領域における特定周波数帯域の信号成分を抽出する抽出手段と、装置全体の動作を制御する制御手段と、前記焦点検出領域の明るさを検出する検出手段とを有する撮像装置における焦点調節方法であって、撮影準備前に、フォーカスレンズを移動させると共に、設定された焦点検出領域における抽出手段の出力信号をフォーカスレンズの位置と関連づけて取得するAFスキャン動作を行って、合焦すべき被写体領域を特定する第1の動作を実施する第1の工程と、撮影準備時に、前記AFスキャン動作を行い合焦動作を実施して、前記第1の動作と異なる第2の動作を実施する第2の工程と、撮影準備前において前記検出手段によって得られた明るさが第1の閾値未満の場合には、前記第1の動作とは異なる第3の動作を実施する第3の工程とを含むことを特徴とする。 In view of the above problems, as technical features of the present invention, photoelectric conversion means for converting a subject image formed using a focus lens into an electrical signal, and a specific frequency band in a focus detection region from an output signal of the photoelectric conversion means A focus adjustment method in an imaging apparatus, comprising: an extraction means for extracting the signal component of the image sensor; a control means for controlling the operation of the entire apparatus; and a detection means for detecting the brightness of the focus detection area. First operation of moving the focus lens and specifying an object region to be focused by performing an AF scan operation for acquiring the output signal of the extraction means in the set focus detection region in association with the position of the focus lens And a second operation different from the first operation by performing the AF scan operation and performing a focusing operation during shooting preparation. A second step to be performed, and a third operation that performs a third operation different from the first operation when the brightness obtained by the detection means before the preparation for photographing is less than a first threshold value. And a process.

本発明によれば、低照度状態における主被写体の検出性能の低下を抑え、合焦すべき被写体に素早くピントを合わせることが可能となる。すなわち、例えば、低照度環境下において画面内の合焦すべき被写体領域を判断し、撮影準備前にピントを合わせておく際、焦点評価値のS/N低下による主被写体領域の検出性能の低下を改善する。こうして、撮影準備時において合焦すべき被写体に素早くピントを合わせることができる。 According to the present invention, it is possible to suppress a decrease in detection performance of a main subject in a low illuminance state and quickly focus on a subject to be focused. That is, for example, when determining a subject area to be focused in a screen in a low-light environment and focusing before preparing for shooting, the detection performance of the main subject area is reduced due to the S / N reduction of the focus evaluation value. To improve. In this way, it is possible to quickly focus on the subject to be focused upon when preparing for shooting.

本発明の一実施例である撮像装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an imaging apparatus that is an embodiment of the present invention. 本発明の実施例である焦点調節装置の動作を表すフローチャートである。It is a flowchart showing operation | movement of the focus adjustment apparatus which is an Example of this invention. 図2における安定判断のサブルーチンを説明するフローチャートである。It is a flowchart explaining the subroutine of stability determination in FIG. 図2における顔検出時AFスキャンのサブルーチンを説明するフローチャートである。3 is a flowchart for explaining a face detection AF scan subroutine in FIG. 2; 図4、図11、図14、図21におけるシーン変化判定のサブルーチンを説明するフローチャートである。It is a flowchart explaining the subroutine of the scene change determination in FIG.4, FIG.11, FIG.14 and FIG. 図4、図12、図15における合焦判定のサブルーチンを説明するフローチャートである。16 is a flowchart for explaining a focus determination subroutine in FIGS. 4, 12, and 15. 図6における合焦判定の仕方を説明する図である。It is a figure explaining the method of the focus determination in FIG. 図2における被写体領域特定AFスキャンのサブルーチンを説明するフローチャートである。3 is a flowchart for explaining a sub-routine for subject area specifying AF scanning in FIG. 2. 図8におけるAF枠設定の例を説明する図であるIt is a figure explaining the example of AF frame setting in FIG. 図8における前回参照判定のサブルーチンを説明するフローチャートである。It is a flowchart explaining the subroutine of the last reference determination in FIG. 図8における前回参照AFスキャンのサブルーチンを説明するフローチャートである。10 is a flowchart for explaining a subroutine of a previous reference AF scan in FIG. 8. 図11における主被写体領域判定のサブルーチンを説明するフローチャートである。12 is a flowchart for explaining a main subject area determination subroutine in FIG. 11; 図12における主被写体領域判定を説明するための図である。FIG. 13 is a diagram for explaining main subject region determination in FIG. 12. 図8におけるゾーンAFスキャンのサブルーチンを説明するフローチャートである。FIG. 9 is a flowchart for describing a zone AF scan subroutine in FIG. 8. FIG. 図14におけるゾーン更新判定のサブルーチンを説明するフローチャートである。FIG. 15 is a flowchart illustrating a subroutine for zone update determination in FIG. 14. FIG. 図15におけるゾーン更新判定の例を説明する図である。It is a figure explaining the example of the zone update determination in FIG. 図8における一様面判断のサブルーチンを説明するフローチャートである。It is a flowchart explaining the subroutine of uniform surface determination in FIG. 図17における一様面判定のサブルーチンを説明するフローチャートである。It is a flowchart explaining the subroutine of a uniform surface determination in FIG. 図18における一様面判定の仕方を説明する図である。It is a figure explaining the method of the uniform surface determination in FIG. 図8におけるフォーカス駆動のサブルーチンを説明するフローチャートである。FIG. 9 is a flowchart for explaining a focus driving subroutine in FIG. 8. FIG. 図2におけるコンティニュアスAFのサブルーチンを説明するフローチャートである。3 is a flowchart for explaining a subroutine of continuous AF in FIG. 2. 図2におけるシーン不安定判断のサブルーチンを説明するフローチャートである。3 is a flowchart illustrating a subroutine for determining scene instability in FIG. 2. 図2における撮影処理のサブルーチンを説明するフローチャートである。FIG. 3 is a flowchart for explaining a subroutine of photographing processing in FIG. 2. FIG. 図23における本露光用AFのサブルーチンを説明するフローチャートである。FIG. 24 is a flowchart for explaining a main exposure AF subroutine in FIG. 23. FIG. 図24における本露光用AFスキャンのサブルーチンを説明するフローチャートである。FIG. 25 is a flowchart for explaining a main exposure AF scan subroutine in FIG. 24. FIG. 図23における本露光処理のサブルーチンを説明するフローチャートである。It is a flowchart explaining the subroutine of this exposure process in FIG. 実施例1の図2における被写体領域特定用AF枠設定処理のサブルーチンを説明するフローチャートである。3 is a flowchart for explaining a subroutine of subject area specifying AF frame setting processing in FIG. 2 according to the first embodiment. 図27における被写体領域特定用AF枠設定処理を説明するための図である。FIG. 28 is a diagram for describing subject area specifying AF frame setting processing in FIG. 27; 実施例2の図2における被写体領域特定用AF枠設定処理のサブルーチンを説明するフローチャートである。6 is a flowchart for explaining a subroutine of subject area specifying AF frame setting processing in FIG. 2 according to the second embodiment. 図29における被写体領域特定用AF枠設定処理を説明するための図である。FIG. 30 is a diagram for explaining subject area specifying AF frame setting processing in FIG. 29;

本発明の実施の形態について説明する。
本発明の装置及び方法において重要なことは、次の点である。撮影準備前において、得られた被写体の明るさが第1の閾値未満の場合には、前記AFスキャン動作を行って合焦すべき被写体領域を特定する第1の動作とは異なる第3の動作を実施することである。
Embodiments of the present invention will be described.
The following points are important in the apparatus and method of the present invention. If the brightness of the obtained subject is less than the first threshold before shooting preparation, a third operation different from the first operation for specifying the subject region to be focused by performing the AF scan operation is performed. Is to implement.

上記考え方に基づき、本発明の装置及び方法の基本的な実施形態は、次の様な構成を有する。焦点調節装置は、焦点調節を行うためのフォーカスレンズ及びその駆動手段と、光電変換手段と、抽出手段と、制御手段と、被写体輝度検出手段とを有する。光電変換手段は、フォーカスレンズを用いて結像された被写体像を電気信号に変換するCCD、CMOSなどの撮像素子である。抽出手段は、光電変換手段の出力信号から被写体の輝度に関する特定周波数帯域の信号成分(典型的には高周波成分)を抽出する。被写体輝度検出手段は、焦点検出領域の明るさを検出する。制御手段は、装置全体の動作を制御する。 Based on the above concept, the basic embodiment of the apparatus and method of the present invention has the following configuration. The focus adjustment apparatus includes a focus lens for performing focus adjustment and its driving means, a photoelectric conversion means, an extraction means, a control means, and a subject luminance detection means. The photoelectric conversion means is an image sensor such as a CCD or a CMOS that converts an object image formed using a focus lens into an electric signal. The extraction unit extracts a signal component (typically a high frequency component) in a specific frequency band related to the luminance of the subject from the output signal of the photoelectric conversion unit. The subject luminance detecting means detects the brightness of the focus detection area. The control means controls the operation of the entire apparatus.

制御手段は、駆動手段を制御してフォーカスレンズを移動させると共に、光電変換手段の設定された焦点検出領域における抽出手段の出力信号をフォーカスレンズの位置と関連づけて取得するAFスキャン動作を行うことができる。また、制御手段は、前記取得した抽出手段の出力に基づいてフォーカスレンズをその駆動手段を介して制御して合焦動作を実施することができる。また、制御手段は、撮影準備前にAFスキャン動作を行って合焦すべき被写体領域を特定する第1の動作を実施することができる。また、制御手段は、撮影準備時に前記AFスキャン動作を行い合焦動作を実施して、第1の動作と異なる第2の動作を実施することができる。また、制御手段は、撮影準備前において被写体輝度検出手段によって得られた明るさが第1の閾値未満の場合には、前記第1の動作とは異なる第3の動作を実施する。 The control means may control the driving means to move the focus lens and perform an AF scan operation for acquiring the output signal of the extraction means in the focus detection region set by the photoelectric conversion means in association with the position of the focus lens. it can. Further, the control means can control the focus lens via the driving means based on the acquired output of the extracting means to perform the focusing operation. In addition, the control unit can perform a first operation for specifying a subject area to be focused by performing an AF scan operation before preparation for photographing. In addition, the control unit can perform a second operation different from the first operation by performing the AF scan operation and performing the focusing operation at the time of shooting preparation. Further, the control unit performs a third operation different from the first operation when the brightness obtained by the subject luminance detection unit is less than the first threshold before the preparation for photographing.

また、焦点調節方法は、上記の如き手段を有する撮像装置における焦点調節方法であって、次の第1の工程乃至第3の工程を含む。第1の工程では、撮影準備前に、フォーカスレンズを移動させると共に、設定手段などで設定された焦点検出領域における抽出手段の出力信号をフォーカスレンズの位置と関連づけて取得するAFスキャン動作を行う。そして、合焦すべき被写体領域を特定する第1の動作を実施する。第2の工程では、撮影準備時に、前記AFスキャン動作を行い合焦動作を実施して、前記第1の動作と異なる第2の動作を実施する。第3の工程では、撮影準備前において前記被写体輝度検出手段によって得られた明るさが第1の閾値未満の場合には、前記第1の動作とは異なる第3の動作を実施する。 The focus adjustment method is a focus adjustment method in the image pickup apparatus having the above-described means, and includes the following first to third steps. In the first step, an AF scan operation is performed to acquire the output signal of the extraction unit in the focus detection area set by the setting unit or the like in association with the position of the focus lens, before moving to the preparation for photographing. Then, a first operation for specifying a subject area to be focused is performed. In the second step, at the time of shooting preparation, the AF scan operation is performed to perform the focusing operation, and a second operation different from the first operation is performed. In the third step, a third operation different from the first operation is performed when the brightness obtained by the subject luminance detection means is less than the first threshold before the preparation for photographing.

前記基本的な実施形態において、以下に述べる様なより具体的な実施形態が可能である。
前記第3の動作は、前記光電変換手段の動作モードおよび前記抽出手段における周波数帯域を第1の動作とは異なる様に設定した前記AFスキャン動作を行って合焦すべき被写体領域を特定する動作とすることができる。また、前記第3の動作は、前記焦点検出領域の大きさを第1の動作とは異なる様に設定した前記AFスキャン動作を行って合焦すべき被写体領域を特定する動作とすることができる。また、前記第3の動作は、前記焦点検出領域の数を第1の動作とは異なる様に設定した前記AFスキャン動作を行って合焦すべき被写体領域を特定する動作とすることができる。
In the basic embodiment, more specific embodiments as described below are possible.
The third operation is an operation for specifying a subject area to be focused by performing the AF scan operation in which the operation mode of the photoelectric conversion unit and the frequency band in the extraction unit are set different from the first operation. It can be. The third operation may be an operation for specifying a subject region to be focused by performing the AF scan operation in which the size of the focus detection region is set to be different from that of the first operation. . The third operation may be an operation for specifying a subject region to be focused by performing the AF scan operation in which the number of the focus detection regions is set differently from the first operation.

また、前記制御手段は、特定の被写体距離にピントを固定する様に動作を行うピント固定動作を行える様にできる。この場合、前記第3の動作は、前記被写体輝度検出手段によって得られた明るさが第1の閾値よりも暗い第2の閾値以上の場合には前記AFスキャン動作を行って合焦すべき被写体領域を特定する動作とする。そして、前記被写体輝度検出手段によって得られた明るさが第2の閾値未満の場合には前記ピント固定動作による動作とする。 In addition, the control means can perform a focus fixing operation that operates to fix the focus to a specific subject distance. In this case, the third operation is a subject to be focused by performing the AF scan operation when the brightness obtained by the subject luminance detecting means is equal to or higher than a second threshold that is darker than the first threshold. The operation is to specify the area. Then, when the brightness obtained by the subject brightness detection means is less than the second threshold, the operation is performed by the focus fixing operation.

また、前記制御手段は、次のコンティニュアスAF動作を行える様にできる。コンティニュアスAF動作では、前記フォーカスレンズを所定量移動する前に抽出した前記抽出手段の出力信号とその移動の後に抽出した前記抽出手段の出力信号とから、前記フォーカスレンズを次に移動する時の移動方向を決定する。そして、前記移動方向に前記フォーカスレンズを移動し、この移動動作を繰り返し行うことにより前記フォーカスレンズを前記抽出手段の出力信号のピーク位置に移動する。この場合、前記第3の動作は、前記被写体輝度検出手段によって得られた明るさが第1の閾値よりも暗い第2の閾値以上の場合には前記AFスキャン動作を行って合焦すべき被写体領域を特定する動作とする。そして、前記被写体輝度検出手段によって得られた明るさが第2の閾値未満の場合には前記コンティニュアスAF動作による動作とする。 The control means can perform the following continuous AF operation. In the continuous AF operation, when the focus lens is moved next from the output signal of the extraction means extracted before moving the focus lens by a predetermined amount and the output signal of the extraction means extracted after the movement. Determine the direction of movement. Then, the focus lens is moved in the movement direction, and this movement operation is repeated to move the focus lens to the peak position of the output signal of the extraction means. In this case, the third operation is a subject to be focused by performing the AF scan operation when the brightness obtained by the subject luminance detecting means is equal to or higher than a second threshold that is darker than the first threshold. The operation is to specify the area. When the brightness obtained by the subject brightness detecting means is less than the second threshold, the operation is performed by the continuous AF operation.

また、前記制御手段は、前記ピント固定動作を行うことができると共に、前記コンティニュアスAF動作を行える様にできる。この場合、前記第3の動作は、前記被写体輝度検出手段によって得られた明るさが第1の閾値よりも暗い第2の閾値以上の場合には前記AFスキャン動作を行って合焦すべき被写体領域を特定する動作とする。前記被写体輝度検出手段によって得られた明るさが第2の閾値未満で且つ第2の閾値より暗い第3の閾値以上の場合には前記コンティニュアスAF動作による動作とする。そして、前記被写体輝度検出手段によって得られた明るさが第3の閾値未満の場合には前記ピント固定動作による動作とする。 The control means can perform the focus fixing operation and can perform the continuous AF operation. In this case, the third operation is a subject to be focused by performing the AF scan operation when the brightness obtained by the subject luminance detecting means is equal to or higher than a second threshold that is darker than the first threshold. The operation is to specify the area. When the brightness obtained by the subject brightness detection means is less than the second threshold and greater than or equal to the third threshold that is darker than the second threshold, the operation is performed by the continuous AF operation. When the brightness obtained by the subject brightness detecting means is less than the third threshold value, the operation is performed by the focus fixing operation.

以下、図面を参照しながら本発明の実施例を説明する。図1は本発明の実施例を適用した焦点調節装置を備える撮像装置である電子カメラの構成を示すブロック図である。 Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram illustrating a configuration of an electronic camera that is an imaging apparatus including a focus adjustment apparatus to which an embodiment of the present invention is applied.

図1において、101は、ズーム機構を含む撮影レンズである。102は、入射光量を制御する光量制御手段である絞り及びシャッターである。103は、光量制御手段の駆動手段を含むAE(Automatic Exposure)処理部である。104は、後述する撮像素子上に焦点を合わせるためのフォーカスレンズである。105は、フォーカスレンズ104の駆動手段を含むAF処理部である。106はストロボである。107はEF(フラッシュ調光)処理部である。 In FIG. 1, reference numeral 101 denotes a photographing lens including a zoom mechanism. Reference numeral 102 denotes an aperture and a shutter which are light quantity control means for controlling the incident light quantity. Reference numeral 103 denotes an AE (Automatic Exposure) processing unit including driving means for the light quantity control means. Reference numeral 104 denotes a focus lens for focusing on an image sensor described later. Reference numeral 105 denotes an AF processing unit including a driving unit for the focus lens 104. Reference numeral 106 denotes a strobe. Reference numeral 107 denotes an EF (flash dimming) processing unit.

108は、被写体からの反射光を電気信号に変換する受光手段ないし光電変換手段としての撮像素子である。109は、撮像素子108の出力ノイズを除去するCDS(相関二重サンプリング処理)回路やA/D変換前に処理を行う非線形増幅回路を含むA/D変換部である。110は、光電変換手段の出力信号から被写体の輝度を算出する輝度算出手段と該輝度算出手段の出力から特定周波数帯域の信号成分を抽出する抽出手段とを含む画像処理部である。111はWB(ホワイトバランス)処理部である。112はフォーマット変換部である。 Reference numeral 108 denotes an image sensor as light receiving means or photoelectric conversion means for converting reflected light from the subject into an electrical signal. Reference numeral 109 denotes an A / D converter including a CDS (correlated double sampling processing) circuit that removes output noise of the image sensor 108 and a non-linear amplification circuit that performs processing before A / D conversion. An image processing unit 110 includes a luminance calculation unit that calculates the luminance of the subject from the output signal of the photoelectric conversion unit and an extraction unit that extracts a signal component in a specific frequency band from the output of the luminance calculation unit. Reference numeral 111 denotes a WB (white balance) processing unit. Reference numeral 112 denotes a format conversion unit.

113は、高速な内蔵メモリ(例えばランダムアクセスメモリなど、DRAMとも記す) である。114は、メモリーカードなどの記録媒体とそのインターフェースからなる画像記録部である。115は、装置全体の動作を制御する制御手段として撮影シーケンスなどシステムを制御するシステム制御部(CPUとも記す)である。116は画像表示用メモリ(VRAMとも記す)
である。117は、画像表示、操作補助のための表示やカメラ状態の表示の他、撮影時には撮影画面と焦点検出領域を表示する操作表示部である。118は、カメラを外部から操作するための操作部である。119は、顔検出モードをONまたはOFFに切り替える等の設定を行う撮影モードスイッチである。
Reference numeral 113 denotes a high-speed built-in memory (for example, a random access memory or the like, also referred to as DRAM). An image recording unit 114 includes a recording medium such as a memory card and its interface. Reference numeral 115 denotes a system control unit (also referred to as a CPU) that controls the system such as a photographing sequence as a control unit that controls the operation of the entire apparatus. 116 is an image display memory (also referred to as VRAM).
It is. Reference numeral 117 denotes an operation display unit that displays a shooting screen and a focus detection area at the time of shooting, in addition to image display, display for assisting operations, and display of camera status. Reference numeral 118 denotes an operation unit for operating the camera from the outside. Reference numeral 119 denotes a shooting mode switch for performing settings such as switching the face detection mode to ON or OFF.

120は、システムに電源を投入するためのメインスイッチである。121は、AFやAE等の撮影スタンバイ動作を行うための合焦位置確定指示手段である撮影スタンバイスイッチ(SW1とも記す)
である。このSW1(121)が操作されることにより、フォーカスレンズ104の撮影のための合焦位置が確定される。この確定のための手順は後述する。122は、SW1の操作後、撮影を行う撮影スイッチ(SW2とも記す)である。
Reference numeral 120 denotes a main switch for turning on the system. Reference numeral 121 denotes a shooting standby switch (also referred to as SW1) which is a focus position determination instruction means for performing shooting standby operations such as AF and AE.
It is. By operating SW1 (121), a focus position for photographing of the focus lens 104 is determined. The procedure for this determination will be described later. Reference numeral 122 denotes a photographing switch (also referred to as SW2) that performs photographing after the operation of SW1.

123は、画像処理部110で処理された画像信号を用いて顔検出を行い、検出した1つ又は複数の顔情報(位置・大きさ・信頼度)をCPU115に送る顔検出モジュールである。なお、顔の検出方法は、本発明の主眼点ではないため詳細な説明は省略する。 A face detection module 123 performs face detection using the image signal processed by the image processing unit 110 and sends one or more pieces of detected face information (position / size / reliability) to the CPU 115. Since the face detection method is not the main point of the present invention, detailed description thereof is omitted.

124は、画面内の被写体及び背景が動いているかどうかを検出して動体情報をシステム制御部115に送る動体検出部である。具体的には、画像処理部110で処理された画像信号のうち、時系列的に並んだ2枚の画像を比較し、その差分情報から被写体/背景の動体情報(動作量、位置、範囲)を検出する。125は、カメラ自体の角速度を検出してカメラ動き情報をCPU115に送る角速度センサ部である。この角速度センサ部を用いて、カメラが縦位置の状態で構えられているのか、横位置の状態で構えられているのかを検出することも可能である。 A moving object detection unit 124 detects whether or not the subject and background in the screen are moving and sends moving object information to the system control unit 115. Specifically, among the image signals processed by the image processing unit 110, two images arranged in time series are compared, and subject / background moving body information (motion amount, position, range) is obtained from the difference information. Is detected. An angular velocity sensor unit 125 detects the angular velocity of the camera itself and sends camera motion information to the CPU 115. Using this angular velocity sensor unit, it is also possible to detect whether the camera is held in a vertical position or a horizontal position.

DRAM113は、一時的な画像記憶手段としての高速バッファとして、或いは画像の圧縮・伸張における作業用メモリなどに使用される。前記操作部118は、例えば次の様なものが含まれる。撮像装置の撮影機能や画像再生時の設定などの各種設定を行うメニュースイッチ、撮影レンズのズーム動作を指示するズームレバー、撮影モードと再生モードの動作モード切換えスイッチ、などである。 The DRAM 113 is used as a high-speed buffer as temporary image storage means, or a working memory for image compression / decompression. The operation unit 118 includes, for example, the following. There are a menu switch for performing various settings such as a shooting function of the image pickup apparatus and a setting at the time of image reproduction, a zoom lever for instructing a zoom operation of the shooting lens, an operation mode switching switch between a shooting mode and a playback mode, and the like.

次に、図2のフローチャートを参照しながら本実施例に係る電子カメラの動作について説明する。まず、S201では、CPU115が、撮影準備を指示するSW1の状態(ON/OFF)を判定し、該状態がON(オン)状態ならばS212へ進み、OFF(オフ)状態の場合にはS202へ進む。S202では、後述する手順に従ってシーン安定判断を行う(図3参照)。S203では、S202において撮影シーンが安定したと判断したかどうかを調べ、安定したと判断していればS204へ進み、安定したと判断されていなければS201へ戻る。ここで、撮影シーンが安定した状態とは、撮影する被写体、カメラの状態が安定して維持され、撮影に適した状態になっていることである。 Next, the operation of the electronic camera according to the present embodiment will be described with reference to the flowchart of FIG. First, in S201, the CPU 115 determines the state (ON / OFF) of SW1 instructing to prepare for shooting. If the state is ON (on), the process proceeds to S212, and if it is OFF (off), the process proceeds to S202. move on. In S202, a scene stability determination is performed according to a procedure described later (see FIG. 3). In S203, it is checked whether or not the shooting scene is determined to be stable in S202. If it is determined that the photographing scene is stable, the process proceeds to S204, and if it is not determined that it is stable, the process returns to S201. Here, the state in which the photographing scene is stable means that the state of the subject to be photographed and the camera is stably maintained and is suitable for photographing.

S204では、顔検出モジュール123において顔検出されたかどうかを調べ、顔検出されていればS207へ進み、顔検出されていなければS205へ進む。S207では、後述する手順に従って顔検出時AFスキャンを行い(図4参照)、S209へ進む。 In S204, it is checked whether or not a face is detected by the face detection module 123. If a face is detected, the process proceeds to S207, and if no face is detected, the process proceeds to S205. In S207, a face detection AF scan is performed according to a procedure described later (see FIG. 4), and the process proceeds to S209.

S205では、被写体領域特定用のAF枠設定を行う。ここで、AF枠とは、画面内の焦点評価値を取得する領域のことである。また、焦点評価値とは、撮像素子108から読み出されたアナログ映像信号をA/D変換部109がデジタル信号に変換し、その出力から画像処理部110が輝度信号の高周波成分を抽出した値のことである。この被写体領域特定用のAF枠設定の詳細については図27を用いて後述する。 In S205, AF frame setting for subject area specification is performed. Here, the AF frame 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 108 into a digital signal by the A / D converter 109 and extracting the high frequency component of the luminance signal from the output from the output. That is. Details of the AF frame setting for specifying the subject area will be described later with reference to FIG.

S206では、被写体特定実施フラグがTRUEか否かを判断する。TRUEである場合はS208の被写体領域特定AFスキャンを実施し、FALSEである場合はS209のコンティニュアスAFに進む。S208では、後述する手順に従って被写体領域を特定するためのAFスキャンを行う(図8参照)。S209では、後述する手順に従ってコンティニュアスAFを行う(図21参照)。ここで、コンティニュアスAFを行わずに、単純に1回だけ特定された被写体領域について合焦動作を行ったり、単に被写体領域を特定するのみに止めたりして、次の第2のスキャン動作に引き継がせるということも可能である。なお、図9は図8におけるAF枠設定の例を説明する図である。 In S206, it is determined whether or not the subject specifying execution flag is TRUE. If it is TRUE, the subject area specifying AF scan in S208 is performed, and if it is FALSE, the process proceeds to continuous AF in S209. In S208, an AF scan for specifying a subject area is performed according to a procedure described later (see FIG. 8). In S209, continuous AF is performed according to the procedure described later (see FIG. 21). Here, without performing the continuous AF, a focusing operation is simply performed on the subject area that is specified only once, or only the subject area is specified, and the next second scanning operation is performed. It is also possible to take over. FIG. 9 is a diagram for explaining an example of AF frame setting in FIG.

S210では、後述する手順に従ってシーン不安定判断を行う(図22参照)。S211では、S210において撮影シーンが不安定と判断されたかどうかを調べ、不安定となっていればS201へ進み、不安定となっていなければS209へ進む。ここで、撮影シーンが不安定とは、撮影する被写体の状態、カメラの状態が不安定となり、撮影に適した状態ではなくなることである。 In S210, the scene instability determination is performed according to the procedure described later (see FIG. 22). In S211, it is checked whether or not the shooting scene is determined to be unstable in S210. If it is unstable, the process proceeds to S201, and if it is not unstable, the process proceeds to S209. 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.

S212では、合焦度判定フラグをFALSEにする。S213では、後述する手順に従って撮影処理を行う(図23参照)。 In S212, the focus degree determination flag is set to FALSE. In S213, photographing processing is performed according to a procedure described later (see FIG. 23).

また、上述した動作と並行して、常にCPU115からの制御信号に基づきAE処理部103により、絞り及びシャッター102を制御して操作表示部117に表示される画像の明るさが適正になる様にAE動作を行っている。 In parallel with the operation described above, the AE processing unit 103 always controls the aperture and the shutter 102 based on the control signal from the CPU 115 so that the brightness of the image displayed on the operation display unit 117 is appropriate. An AE operation is performed.

図3は、図2におけるS202のシーン安定判断を説明するフローチャートである。S301では、角速度センサ部125で検出したカメラ動作量が所定量以下となっているかどうかを調べ、所定量以下であればS302へ進み、そうでなければS304へ進む。ここではカメラ動作量が所定量以下になっていることを調べることにより、カメラの状態が安定しているかを判断する。 FIG. 3 is a flowchart for explaining the scene stability determination of S202 in FIG. In S301, it is checked whether or not the camera movement amount detected by the angular velocity sensor unit 125 is equal to or less than a predetermined amount. If it is equal to or less than the predetermined amount, the process proceeds to S302, and if not, the process proceeds to S304. Here, it is determined whether the camera state is stable by checking that the camera operation amount is equal to or less than a predetermined amount.

S302では、前回からの輝度変化量が所定量以下かどうかを調べ、所定量以下であればS303へ進み、そうでなければS304へ進む。ここでは輝度変化量が所定値以下になっていることを調べることにより、撮影する被写体が変化していないことを判断する。S303では、撮影シーンが安定状態となったと判断して本処理を終了する。S304では、撮影シーンが安定状態ではないと判断して本処理を終了する。 In S302, it is checked whether or not the luminance change amount from the previous time is equal to or smaller than the predetermined amount. If the luminance change amount is equal to or smaller than the predetermined amount, the process proceeds to S303. Here, it is determined that the subject to be photographed has not changed by checking that the luminance change amount is not more than a predetermined value. In S303, it is determined that the shooting scene is in a stable state, and this process is terminated. In S304, it is determined that the shooting scene is not in a stable state, and this process is terminated.

図4は、図2におけるS207の顔検出時AFスキャンを説明するフローチャートである。S401では、顔検出モジュール123で検出した顔情報(位置・大きさ)に基づいてAF枠設定を行う。S402では、AF処理部105がフォーカスレンズ104をスキャン開始位置へと移動させる。ここで、スキャン開始位置は、例えば、検出した顔の大きさより推定した人物の距離に基づいて決定する。S403では、CPU115は、現在のフォーカスレンズ位置における焦点評価値をDRAM113へ記憶させる。S404では、フォーカスレンズ104の現在位置を取得してCPU115が該位置のデータをDRAM113へ記憶させる。 FIG. 4 is a flowchart for explaining the face detection AF scan in S207 in FIG. In S401, AF frame setting is performed based on the face information (position / size) detected by the face detection module 123. In S402, the AF processing unit 105 moves the focus lens 104 to the scan start position. Here, the scan start position is determined based on the distance of the person estimated from the detected face size, for example. In S403, the CPU 115 stores the focus evaluation value at the current focus lens position in the DRAM 113. In S <b> 404, the current position of the focus lens 104 is acquired, and the CPU 115 stores the data of the position in the DRAM 113.

S405では、CPU115が、撮影準備を指示するSW1の状態(ON/OFF)を判定し、該状態がON(オン)状態なら本処理を終了して図2に示すS212へ進み、OFF(オフ)状態の場合にはS406へ進む。S406では、後述する手順に従ってシーン変化判定を行う(図5参照)。シーン変化判定とは、撮影するシーンが変わったかを、カメラの状態、被写体の状態から判定する処理である。 In S405, the CPU 115 determines the state (ON / OFF) of SW1 that instructs to prepare for photographing. If the state is ON, the process ends and the process proceeds to S212 shown in FIG. If so, the process proceeds to S406. In S406, scene change determination is performed according to a procedure described later (see FIG. 5). The scene change determination is a process for determining whether the scene to be photographed has changed from the state of the camera and the state of the subject.

S407では、CPU115がフォーカスレンズ104の現在位置がスキャン終了位置と等しいかを調べ、両者が等しい場合にはS409へ進み、そうでなければS408へ進む。ここで、スキャン終了位置は、例えば、検出した顔の大きさより推定した人物の距離に基づいて決定する。S408では、AF処理部105がフォーカスレンズ104をスキャン終了方向へ向かって所定量だけ移動させた後、S403に戻る。S409では、後述する手順に従って合焦判定を行う(図6参照)。 In S407, the CPU 115 checks whether the current position of the focus lens 104 is equal to the scan end position. If both are equal, the process proceeds to S409, and if not, the process proceeds to S408. Here, the scan end position is determined based on, for example, the distance of the person estimated from the detected face size. In S408, the AF processing unit 105 moves the focus lens 104 by a predetermined amount in the scan end direction, and then returns to S403. In step S409, focus determination is performed according to a procedure described later (see FIG. 6).

S410では、S409における合焦判定で○判定となったかどうかを調べ、○判定となっていればS411へ進み、そうでなければS414へ進む。ここで○判定とは、被写体のコントラストが十分にあり、且つスキャンした距離範囲内に被写体が存在する場合のことである。 In S410, it is checked whether or not the in-focus determination in S409 is “good”. If yes, the process proceeds to S411, and if not, the process proceeds to S414. Here, “◯” is a case where the contrast of the subject is sufficient and the subject exists within the scanned distance range.

S411では、S403で取得した焦点評価値がピークとなる合焦位置を算出する。S412では、AF処理部105がフォーカスレンズ104を、S411で算出した合焦位置へと移動させる。S413では、ピーク検出フラグをTRUEにする。 In S411, an in-focus position where the focus evaluation value acquired in S403 reaches a peak is calculated. In S412, the AF processing unit 105 moves the focus lens 104 to the in-focus position calculated in S411. In S413, the peak detection flag is set to TRUE.

S414では、○判定ではない、つまり被写体のコントラストが不十分、若しくはスキャンした距離範囲外に被写体が存在するので、AF処理部105がフォーカスレンズ104を、予めDRAM113に記憶している位置(定点)へと移動させる。ここで、定点は被写体の存在確率の高い距離に設定する。例えば、顔が検出されていれば、検出した顔の大きさより推定した人物の距離とする。 In S414, the determination is not “good”, that is, the contrast of the subject is insufficient, or the subject exists outside the scanned distance range, and the AF processing unit 105 stores the focus lens 104 in the DRAM 113 in advance (fixed point). Move to. 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のS1105、図14のS1405、図21のS2107におけるシーン変化判定を説明するフローチャートである。S501では、顔検出モジュール123で検出した顔検出状態が変化したかどうかを調べ、顔検出状態が変化していれば本判定処理を終了して図2に示すS201へ戻り、そうでなければS502へ進む。ここで、顔検出状態とは、顔検出されているかどうかである。つまり、前回のシーン変化判定時に顔検出されていて今回のシーン変化判定時に顔検出されていなければ、顔検出状態が変化したことになる。 FIG. 5 is a flowchart for explaining scene change determination in S406 of FIG. 4, S1105 of FIG. 11 described later, S1405 of FIG. 14, and S2107 of FIG. In S501, it is checked whether or not the face detection state detected by the face detection module 123 has changed. If the face detection state has changed, this determination process is terminated and the process returns to S201 shown in FIG. Proceed to Here, the face detection state is whether or not a face is detected. That is, if the face is detected at the previous scene change determination and the face is not detected at the current scene change determination, the face detection state has changed.

S502では、角速度センサ部125で検出したカメラ動作量が所定量以上となっているかどうかを調べ、所定量以上であれば、本判定処理を終了して図2のS201へ戻り、そうでなければS503へ進む。 In S502, it is checked whether or not the camera movement amount detected by the angular velocity sensor unit 125 is equal to or greater than a predetermined amount. If it is equal to or larger than the predetermined amount, this determination process is terminated and the process returns to S201 in FIG. The process proceeds to S503.

S503では、後述するコンティニュアスAF中であるかどうかを調べ、コンティニュアスAF中であればS504へ進む。S504では、被写体輝度差が所定値以下かを判断する。被写体輝度差とは、前回のシーン変化判定時に取得した被写体輝度値と、今回のシーン変化判定時に検出された被写体輝度値との差である。被写体輝度値の差が大きい場合は、シーンが変化したと判断する。被写体輝度差が、所定値以下であれば、本判定処理を終了し、所定値より大きい場合は、本判定処理を終了して図2のS201へ戻る。 In S503, it is checked whether or not continuous AF, which will be described later, is being performed. If continuous AF is being performed, the process proceeds to S504. In S504, it is determined whether the subject brightness difference is equal to or smaller than a predetermined value. 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. If the subject luminance difference is equal to or smaller than the predetermined value, the determination process ends. If the subject luminance difference is larger than the predetermined value, the determination process ends and the process returns to S201 in FIG.

コンティニュアスAF中でなければ、S505へ進む。S505では、露光時間が所定時間以上であるかどうかを調べ、露光時間が所定時間以上であれば、本判定処理を終了して図2のS201へ戻る。これは、露光時間が所定時間以上の場合、焦点評価値を取得する間隔が延びてしまう為、AFの精度を確保できなくなるからである。そうでなければS506へ進む。 If it is not in continuous AF, the process proceeds to S505. In S505, it is checked 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, this determination process is terminated and the process returns to S201 in FIG. This is because 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. Otherwise, the process proceeds to S506.

S506では、絞り102の状態が変化したかどうかを調べ、状態が変化していればS507へ進み、そうでなければ本判定処理を終了する。なお、本実施例では、絞り制御を用いた場合について説明しているが、絞り制御の替わりにNDフィルタによって露出制御を行った場合は、NDフィルタの状態の変化を見てもよい。これは、絞り、若しくはNDフィルタの状態が変化した場合は、焦点評価値のピーク位置が変化する為である。 In S506, it is checked whether or not the state of the diaphragm 102 has changed. If the state has changed, the process proceeds to S507, and if not, this determination process ends. In this embodiment, the case of using the aperture control is described. However, when the exposure control is performed by the ND filter instead of the aperture control, a change in the state of the ND filter may be observed. This is because the peak position of the focus evaluation value changes when the state of the aperture or the ND filter changes.

S507では、顔検出モジュール123で顔を検出しているかどうかを調べ、顔を検出していれば本判定処理を終了して図4のS402へ進み、そうでなければ本判定処理を終了して後述する図8のS809へ進む。 In S507, it is checked whether or not the face is detected by the face detection module 123. If a face is detected, the determination process ends and the process proceeds to S402 in FIG. 4, otherwise the determination process ends. The process proceeds to S809 in FIG.

次に、図4のS409、後述する図12のS1201、図15のS1501における合焦判定のサブルーチンについて図6と図7を用いて説明する。 Next, the focus determination subroutine in step S409 in FIG. 4, step S1201 in FIG. 12 to be described later, and step S1501 in FIG. 15 will be described with reference to FIGS.

焦点評価値は、遠近競合などの場合を除けば、横軸にフォーカスレンズ位置、縦軸に焦点評価値をとると、その形は図7に示す様な山状になる。そこで、焦点評価値の、最大値と最小値の差、一定値(Slope Thr)以上の傾きで傾斜している部分の長さ、傾斜している部分の勾配から、山の形状を判断することにより、合焦判定を行うことができる。 The focus evaluation value takes a mountain shape as shown in FIG. 7 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, the shape of the mountain is judged from the difference between the maximum and minimum focus evaluation values, the length of the sloped portion with a slope greater than a certain value (Slope Thr), and the slope of the sloped portion. Therefore, it is possible to perform in-focus determination.

合焦判定における判定結果は、以下に示す様に○判定、×判定で出力される。
○判定:被写体のコントラストが十分、且つスキャンした距離範囲内の距離に被写体が存在する。
×判定:被写体のコントラストが不十分、若しくはスキャンした距離範囲外の距離に被写体が位置する。
The determination result in the focus determination is output as “◯” or “×” as shown below.
○ Determination: 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.

また、×判定のうち、至近側方向のスキャンした距離範囲外に被写体が位置する場合を△判定とする。 Further, in the x determination, a case where the subject is located outside the scanned distance range in the near side direction is determined as Δ determination.

山の形状を判断する為の、一定値以上の傾きで傾斜している部分の長さL、傾斜している部分の勾配SL/Lを、図7を用いて説明する。SLは傾斜している部分の山の高さを示す。山の頂上(A点)から傾斜が続いていると認められる点をD点、E点とし、D点とE点の幅を山の幅Lとする。傾斜が続いていると認める範囲は、A点から、所定量(Slope Thr)以上、焦点評価値が下がったスキャンポイントが続く範囲とする。スキャンポイントとは、連続的にフォーカスレンズを動かして、スキャン開始点からスキャン終了点まで移動する間に、焦点評価値を取得するポイントのことである。A点とD点の焦点評価値の差SL1とA点とE点の焦点評価値の差SL2の和SL1+SL2をSLとする。 The length L of the inclined part and the slope SL / L of the inclined part for judging the shape of the mountain will be described with reference to FIG. SL indicates the height of the sloped portion of the mountain. 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 a range in which a scan point having a focus evaluation value lowered from a point A by a predetermined amount (Slope Thr) or more continues. A scan point is a point at which a focus evaluation value is acquired while moving a focus lens continuously and moving from a scan start point to a scan end point. 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.

図6のフローチャートにおいて、S601では、焦点評価値の最大値と最小値を求め、次にS602では焦点評価値が最大となるスキャンポイントを求め、S603へ進む。S603では、スキャンポイント、焦点評価値から、山の形状を判断する為のL、SLを求め、S604へ進む。 In the flowchart of FIG. 6, in S601, the maximum value and the minimum value of the focus evaluation value are obtained. Next, in S602, the scan point having the maximum focus evaluation value is obtained, and the process proceeds to S603. In S603, L and SL for determining the shape of the mountain are obtained from the scan point and the focus evaluation value, and the process proceeds to S604.

S604では、山の形状が至近側登り止まりかを判断する。至近側登り止まりだと判断するのは、次の2つの条件を満たす場合である。1つの条件は、焦点評価値が最大値となるスキャンポイントがスキャンを行った所定範囲における至近端であることである。もう1つの条件は、至近端のスキャンポイントでの焦点評価値と、至近端のスキャンポイントより1ポイント分無限遠よりのスキャンポイントでの焦点評価値との差が、所定値以上であることである。至近側登り止まりだと判断した場合は、S609へ進み、そうでなければS605へ進む。 In S604, it is determined whether the mountain shape stops climbing on the near side. Judging that the closest side climb is stopped is when the following two conditions are satisfied. One condition is that the scan point with the maximum focus evaluation value is the closest end in the predetermined range in which scanning was performed. Another condition is that the difference between the focus evaluation value at the closest scan point and the focus evaluation value at a scan point that is one point away from infinity from the closest scan point is a predetermined value or more. That is. If it is determined that the near-side climb has stopped, the process proceeds to S609, and if not, the process proceeds to S605.

S605では、山の形状が無限遠側登り止まりかを判断する。無限遠側登り止まりだと判断するのは、次の2つの条件を満たす場合である。1つの条件は、焦点評価値の最大値となるスキャンポイントがスキャンを行った所定範囲における無限遠端であることである。もう1つの条件は、無限遠端スキャンポイントにおける焦点評価値と、無限遠端スキャンポイントより1ポイント分至近端よりのスキャンポイントにおける焦点評価値との差が、所定値以上であることである。無限遠側登り止まりだと判断した場合は、S608へ進み、そうでなければS606へ進む。 In S605, it is determined whether the mountain shape stops climbing on the infinity side. It is determined that the infinity side has stopped climbing when the following two conditions are satisfied. One condition is that the scan point having the maximum focus evaluation value is the infinity end in a predetermined range in which scanning is performed. Another condition is that the difference between the focus evaluation value at the infinity end scan point and the focus evaluation value at the scan point from the nearest end by one point from the infinity end scan point is greater than or equal to a predetermined value. . If it is determined that the infinity-side climb has stopped, the process proceeds to S608, and if not, the process proceeds to S606.

S606では、一定値以上の傾きで傾斜している部分の長さLが所定値以上、且つ傾斜している部分の傾斜の平均値SL/Lが所定値以上、且つ焦点評価値の最大値(Max)と最小値(Min)の差が所定値以上であれば、S607へ進む。そうでなければ、S608へ進む。S607では、得られた焦点評価値が山状となっていて、被写体にコントラストがあり、焦点調節が可能である為、判定結果を○判定としている。S608では、得られた焦点評価値が山状となっておらず、被写体にコントラストがなく、焦点調節が不可能である為、判定結果を×判定としている。S609では、得られた焦点評価値が山状となってはいないが、至近側方向に登り続けている状態となっており、更に至近側に被写体ピークが存在している可能性がある為、判定結果を△判定としている。以上の様にして、合焦判定を行う。 In step S606, the length L of the portion inclined at an inclination equal to or greater than a predetermined value is equal to or greater than the predetermined value, the average value SL / L of the inclination of the inclined portion is equal to or greater than the predetermined value, and the maximum focus evaluation value ( If the difference between Max) and the minimum value (Min) is greater than or equal to a predetermined value, the process proceeds to S607. Otherwise, the process proceeds to S608. In S607, the obtained focus evaluation value has a mountain shape, the subject has contrast, and the focus can be adjusted, so the determination result is “good”. In S608, since the obtained focus evaluation value is not mountain-shaped, the subject has no contrast, and focus adjustment is impossible, the determination result is x determination. In S609, the obtained focus evaluation value is not mountain-shaped, but it is in a state where it continues to climb in the close-up direction, and there is a possibility that a subject peak exists on the close-up side. The determination result is Δ. In-focus determination is performed as described above.

次に、図27のフローチャートを参照しながら本実施例における被写体領域特定用AF枠設定処理について説明する。 Next, subject area specifying AF frame setting processing in the present embodiment will be described with reference to the flowchart of FIG.

まず、S2701では、電子ズームをしているかどうかを調べ、電子ズームをしていればS2705へ進み、そうでなければS2702へ進む。S2705では、電子ズーム時用のAF枠設定を行う。ここで電子ズームとは画面中央領域を拡大して操作表示部117に表示することである。この時、撮像素子108上の狭い領域を拡大するため、操作表示部117に表示される画像は、電子ズームしない時に比べて少ない画素数から生成されたものとなる。従って、電子ズーム時に操作表示部117に表示される画像に対して、電子ズームをしない時と同じ割合になる様にAF枠を設定すると、電子ズームしない時に比べてAF枠内の画素数も少なくなり、焦点評価値のS/Nが低下する。そのため、電子ズーム時と電子ズームをしない時とで、AF枠設定の仕方を変える必要がある。本実施例では、電子ズーム時は、画面中央付近に所定の大きさのAF枠を1枠設定することとする。 First, in S2701, it is checked whether or not the electronic zoom is performed. If the electronic zoom is performed, the process proceeds to S2705, and if not, the process proceeds to S2702. In S2705, AF frame setting for electronic zoom is performed. Here, the electronic zoom is to enlarge the center area of the screen and display it on the operation display unit 117. At this time, in order to enlarge a narrow area on the image sensor 108, the image displayed on the operation display unit 117 is generated from a smaller number of pixels than when electronic zooming is not performed. Therefore, when the AF frame is set so that the image displayed on the operation display unit 117 during the electronic zoom has the same ratio 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 when the electronic zoom is performed and when the electronic zoom is not performed. In this embodiment, at the time of electronic zooming, one AF frame of a predetermined size is set near the center of the screen.

次に、S2702にて、現在の被写体輝度を取得する。本実施例の説明の都合上、この値を被写体輝度Bとする。この被写体輝度自体は、図2で示した処理と平行して実施されているAE動作の結果として得られるものであり、被写体輝度検出手段を含むAE処理部によって算出される。 Next, in S2702, the current subject brightness is acquired. For convenience of explanation of the present embodiment, this value is assumed to be subject brightness B. The subject brightness itself is obtained as a result of the AE operation performed in parallel with the processing shown in FIG. 2, and is calculated by an AE processing unit including subject brightness detection means.

次に、S2703にて、先に取得した被写体輝度Bと低照度閾値1とを比較する。この低照度閾値1とは被写体が十分に明るいか否かを示す閾値であり、この条件に該当する場合にはS2706に進む。S2706では、N1×N1のAF枠設定を行う。本実施例中では、図28(a)に示す様に、高輝度な状況ではAF枠の大きさを縦横の長さ共に画面の10%とし、N1=5で5×5のAF枠設定を実施するものとする。次に、S2709にて、被写体領域特定実施フラグをTRUEに設定し、処理を終了する。 In step S2703, the previously acquired subject brightness B is compared with the low illuminance threshold 1. The low illuminance threshold value 1 is a threshold value indicating whether or not the subject is sufficiently bright. If this condition is satisfied, the process proceeds to S2706. In step S2706, N1 × N1 AF frame setting is performed. In this embodiment, as shown in FIG. 28A, in a high luminance situation, the size of the AF frame is set to 10% of the screen in both vertical and horizontal lengths, and N1 = 5 and 5 × 5 AF frame setting is performed. Shall be implemented. In step S2709, the subject area specifying execution flag is set to TRUE, and the process ends.

先に図2を用いて説明した通り、このフラグ値の状態に基づいて図2のS208の被写体領域特定スキャンを実施するか、S209のコンティニュアスAFを実施するかが切り替わる。 As described above with reference to FIG. 2, based on the state of the flag value, the subject area specifying scan in S208 in FIG. 2 or the continuous AF in S209 is switched.

一方で、被写体輝度Bが低照度閾値1未満の場合にはS2704に進む。S2704では、更に被写体輝度Bが低照度閾値1未満且つ低照度閾値2以上であるか否かを判断する。このとき、上記の条件に該当する場合にはS2707に進み、該当しない場合にはS2708に進む。S2707では、N2×N2のAF枠設定を行う。本実施例では、図28(b)に示す様に一定の暗さの状況ではAF枠の大きさを縦横の長さ共に画面の18%とし、N2=3で3×3のAF枠設定を実施するものとする。次に、S2709にて被写体領域特定実施フラグをTRUEに設定し、処理を終了する。 On the other hand, if the subject brightness B is less than the low illuminance threshold 1, the process proceeds to S2704. In S2704, it is further determined whether or not the subject brightness B is less than the low illuminance threshold 1 and is equal to or greater than the low illuminance threshold 2. At this time, if the above condition is met, the process proceeds to S2707, and if not, the process proceeds to S2708. In S2707, N2 × N2 AF frame setting is performed. In this embodiment, as shown in FIG. 28 (b), in a certain dark situation, the size of the AF frame is 18% of the screen in both vertical and horizontal lengths, and N2 = 3 and 3 × 3 AF frame setting is performed. Shall be implemented. In step S2709, the subject area specifying execution flag is set to TRUE, and the process ends.

また、被写体輝度Bが低照度閾値2未満の場合にはS2708に進む。S2708では、図28(c)に示す様に焦点評価値の算出が困難になるような明るさでは、AF枠の大きさを縦横の長さ共に画面の25%とし、1×1のAF枠設定を実施するものとする。次に、S2710に進み、被写体領域特定実施フラグをFALSEに設定し処理を終了する。 If the subject brightness B is less than the low illuminance threshold 2, the process proceeds to S2708. In S2708, as shown in FIG. 28C, at a brightness that makes it difficult to calculate the focus evaluation value, the size of the AF frame is set to 25% of the screen in both vertical and horizontal directions, and a 1 × 1 AF frame. Settings shall be implemented. Next, proceeding to S2710, the subject area specifying execution flag is set to FALSE, and the process ends.

以上説明してきた通り、本実施例における被写体領域特定用AF枠設定処理では、被写体の明るさに基づいて被写体領域特定用AFスキャンで使用するAF枠の大きさを切り替えることを特徴としている。一般的に被写体が暗く映像信号のレベルが低い場合、映像信号をそのまま用いたのでは輝度が足りないことに加えて、撮像素子のノイズの影響により焦点評価値の本来の信号成分が得にくくなる。そのため、本実施例の様にAF枠を構成する画素数を被写体の明るさに基づいて切り替えることで、低照度時であっても適切な焦点評価値の算出が可能となる。 As described above, the subject area specifying AF frame setting process in this embodiment is characterized in that the size of the AF frame used in the subject area specifying AF scan is switched based on the brightness of the subject. In general, when the subject is dark and the level of the video signal is low, using the video signal as it is does not have enough brightness, and it is difficult to obtain the original signal component of the focus evaluation value due to the noise of the image sensor . Therefore, by switching the number of pixels constituting the AF frame based on the brightness of the subject as in the present embodiment, it is possible to calculate an appropriate focus evaluation value even at low illuminance.

なお、AF枠の大きさと数に関して、本発明は本実施例により限定されるものではない。例えば、AF枠の大きさは画面内の主被写体の存在確率を考慮して設定してもよいし、また横方向と縦方向でAF枠数を異なる様な設定であってもよい。 It should be noted that the present invention is not limited to this embodiment with respect to the size and number of AF frames. For example, the size of the AF frame may be set in consideration of the existence probability of the main subject in the screen, or may be set so that the number of AF frames is different between the horizontal direction and the vertical direction.

次に、図8は図2におけるS208の被写体領域特定AFスキャンを説明するフローチャートである。ここでは、画面内の主被写体の領域を特定するためのAFスキャンを行う。 Next, FIG. 8 is a flowchart for explaining the subject area specifying AF scan of S208 in FIG. Here, AF scanning is performed to identify the area of the main subject in the screen.

まず、S801では、後述する手順に従って前回参照判定を行う(図10参照)。S802では、S801において前回参照判定した結果、前回と撮影シーンがあまり変わらないと判定された場合はS803へ進み、そうでなければS806へ進む。S803では、後述する手順に従って前回参照AFスキャンを行う(図11参照)。S804では、S803の前回参照AFスキャンにおいて主被写体領域が特定できたかどうかを調べ、主被写体領域が特定できたいればS805へ進み、そうでなければS806へ進む。 First, in S801, a previous reference determination is performed according to a procedure described later (see FIG. 10). In S802, as a result of the previous reference determination in S801, if it is determined that the shooting scene does not change much from the previous time, the process proceeds to S803. Otherwise, the process proceeds to S806. In step S803, a previous reference AF scan is performed according to a procedure described later (see FIG. 11). In S804, it is checked whether or not the main subject area can be specified in the previous reference AF scan in S803. If it is desired to specify the main subject area, the process proceeds to S805.

S805では、ピーク検出フラグをTRUEにする。S806では、後述する手順に従ってゾーンAFスキャンを行う(図14参照)。S807では、S806のゾーンAFスキャンにおいて主被写体領域が特定できたかどうかを調べ、主被写体領域が特定できていればS805へ進み、そうでなければS808へ進む。S808では、後述する手順に従って一様面判断を行う(図17参照)。S809では、S806のゾーンAFスキャンにおいて主被写体領域が特定できなかったので、画面内に予め設定してある所定領域にAF枠を設定する。ここで、所定領域は、例えば画面の中央領域に1枠設定するなど、主被写体が存在しそうな領域に設定する。S810では、後述する手順に従ってフォーカス駆動を行う(図20参照)。 In S805, the peak detection flag is set to TRUE. In step S806, zone AF scanning is performed according to a procedure described later (see FIG. 14). In S807, it is checked whether or not the main subject area can be specified in the zone AF scan in S806. In S808, uniform surface determination is performed according to the procedure described later (see FIG. 17). In S809, since the main subject area could not be specified in the zone AF scan of S806, an AF frame is set in a predetermined area set in advance on the screen. 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 S810, focus drive is performed according to the procedure described later (see FIG. 20).

図10は、上述の図8におけるS804の前回参照判定を説明するフローチャートである。ここでは、前回AFスキャンを行った撮影シーンに対して、今回、撮影シーンがあまり変化していないかどうかを判定する。 FIG. 10 is a flowchart for explaining the previous reference determination in S804 in FIG. 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.

まず、S1001では、前回のAFスキャンにおいて主被写体領域を特定できていたかどうかを調べ、主被写体領域を特定できていればS1002へ進み、そうでなければS1006へ進む。S1002では、現在のフォーカスレンズ104の位置が所定位置より至近側にあるかどうかを調べ、至近側にあればS1003へ進み、そうでなければS1006へ進む。ここでは所定位置よりも至近側かどうかの判定を行ったが、所定位置より無限遠側かどうかの判定にしてもよい。 First, in S1001, it is checked whether or not the main subject area can be specified in the previous AF scan. If the main subject area can be specified, the process proceeds to S1002, and if not, the process proceeds to S1006. In S1002, it is checked 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 S1003, and if not, the process proceeds to S1006. Here, it is determined whether or not it is closer to the predetermined position, but it may be determined whether or not it is on the infinity side from the predetermined position.

S1003では、前回AFスキャンを行った時間と今回の時間差が所定時間以内かどうかを調べ、所定時間以内であればS1004へ進み、そうでなければS1006へ進む。S1004では、前回のAFスキャン時のカメラの向きと同じかどうかを調べ、同じであればS1005へ進み、そうでなければS1006へ進む。ここで、カメラの向きとは例えばカメラの縦横位置のことであり、角速度センサ部125により検出する。S1005では、前回のAFスキャンでの撮影シーンとあまり変わらないと判定して本判定処理を終了する。S1006では、前回のAFスキャンと撮影シーンが大きく変わったと判定して本判定処理を終了する。 In S1003, it is checked whether or not the time difference between the previous AF scan and the current time is within a predetermined time. If it is within the predetermined time, the process proceeds to S1004. Otherwise, the process proceeds to S1006. In S1004, it is checked whether or not the camera direction is the same as that in the previous AF scan, and if it is the same, the process proceeds to S1005, and if not, the process proceeds to S1006. Here, the direction of the camera is, for example, the vertical and horizontal positions of the camera, and is detected by the angular velocity sensor unit 125. In S1005, it is determined that there is not much difference from the shooting scene in the previous AF scan, and this determination process ends. In S1006, it is determined that the shooting scene has changed significantly from the previous AF scan, and this determination process ends.

図11は、図8におけるS806の前回参照AFスキャンを説明するフローチャートである。まず、S1101では、現在のフォーカスレンズ104の位置を中心にスキャン範囲を第1の範囲に設定する。ここでは前回の撮影シーンとあまり変わらないと判断されているので、第1のスキャン範囲は狭い範囲とする。S1102では、フォーカスレンズ104をスキャン開始位置へと移動させる。S1103では、撮像素子108から読み出されたアナログ映像信号をA/D変換部109がデジタル信号に変換し、その出力から画像処理部110が輝度信号の高周波成分を抽出し、CPU115はこれを焦点評価値として記憶させる。S1104では、フォーカスレンズ104の現在位置を取得してCPU115が該位置のデータを記憶させる。 FIG. 11 is a flowchart for explaining the previous reference AF scan in S806 in FIG. First, in S1101, the scan range is set to the first range around the current position of the focus lens 104. Here, since it is determined that there is not much difference from the previous shooting scene, the first scan range is a narrow range. In step S1102, the focus lens 104 is moved to the scan start position. In S1103, the analog video signal read from the image sensor 108 is converted into a digital signal by the A / D conversion unit 109, and the image processing unit 110 extracts a high-frequency component of the luminance signal from the output, and the CPU 115 focuses on this. Store as an evaluation value. In S1104, the current position of the focus lens 104 is acquired, and the CPU 115 stores the data of the position.

S1105では、CPU115が、撮影準備を指示するSW1の状態(ON/OFF)を判定し、該状態がON(オン)状態なら本処理を終了して図2のS212へ進み、OFF(オフ)状態の場合にはS1106へ進む。S1106では、前述した図5のシーン変化判定を行う。S1107では、CPU115がフォーカスレンズ104の現在位置がスキャン終了位置と等しいかを調べ、両者が等しい場合にはS1108へ進み、そうでなければS1109へ進む。S1108では、後述する主被写体領域判定を行う(図12参照)。S1109では、AF処理部105がフォーカスレンズ104をスキャン終了方向へ向かって所定量だけ移動させた後、S1103に戻る。 In S1105, the CPU 115 determines the state (ON / OFF) of SW1 instructing to prepare for photographing. If the state is ON (on), the process is terminated, and the process proceeds to S212 in FIG. In this case, the process proceeds to S1106. In S1106, the scene change determination of FIG. 5 described above is performed. In S1107, the CPU 115 checks whether or not the current position of the focus lens 104 is equal to the scan end position. If the two are equal, the process proceeds to S1108; otherwise, the process proceeds to S1109. In step S1108, a main subject area determination described later is performed (see FIG. 12). In S1109, the AF processing unit 105 moves the focus lens 104 by a predetermined amount in the scan end direction, and then returns to S1103.

図12は、図11におけるS1108、後述する図14におけるS1411の主被写体領域判定を説明するフローチャートである。ここでは、画面内の主被写体領域が特定できたかどうかを判定する。図13は、図12における主被写体領域判定の例を説明する図である。この例では、AF枠サイズの大きさを画面の10%、N=5、スキャン範囲を0〜500、所定深度範囲を±10とする。なお、スキャン範囲及び所定深度範囲の数値はフォーカスレンズ104の位置を表す数値である。これは、図示しないフォーカスレンズ104の駆動用モータにステッピングモータを使用する場合のパルス数に相当し、値が大きい方が至近側とする。 FIG. 12 is a flowchart for explaining main subject area determination in S1108 in FIG. 11 and S1411 in FIG. 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. Note that the numerical values of 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 the driving motor for the focus lens 104 (not shown), and the larger value is the closest side.

まず、S1201では、設定した各AF枠すべてにおいて、前述した図6の合焦判定を行う。例えば、各AF枠において図13(a)に示す様な合焦判定結果となるとする。S1202では、各AF枠における焦点評価値のピーク位置(以下PeakPosと記す)を算出して記憶しておく。例えば、各AF枠において図13(b)に示す様なピーク位置算出結果になるとする。S1203では、設定しているAF枠が1枠かどうかを調べ、設定しているAF枠が1枠であればS1214へ進み、そうでなければS1204へ進む。 First, in S1201, the above-described in-focus determination of FIG. 6 is performed for all the set AF frames. For example, it is assumed that the focus determination result as shown in FIG. In S1202, the peak position of the focus evaluation value (hereinafter referred to as PeakPos) in each AF frame is calculated and stored. For example, it is assumed that the peak position calculation result as shown in FIG. In S1203, it is checked whether or not the set AF frame is one frame. If the set AF frame is one frame, the process proceeds to S1214. Otherwise, the process proceeds to S1204.

S1204では、中央M×M枠の各AF枠のPeakPosを至近順にソートし、ソートされた数をSとする。以下の説明ではM=3とする。図13の太線で囲んだ縦3枠、横3枠の合計9枠がこれを示す。ここで、S1201の合焦判定で×判定のAF枠ではピーク位置が算出できないのでソートの対象としない。例えば、図13(b)の場合は、至近順に410、400、400、400、100、100、100、90とソートされ、ソート数S=8となる。 In S1204, PeakPos of each AF frame of the center M × M frame is sorted in ascending order, and the sorted number is S. In the following description, M = 3. This is shown by a total of nine frames including three vertical frames and three horizontal frames surrounded by a thick line in FIG. Here, since the peak position cannot be calculated in the AF frame of X determination in the focus determination of S1201, it is not a sorting target. 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.

S1205では、S1202で算出したM×M枠内のピーク位置の至近順を示すカウンタPを1に設定する。S1206では、ソート順でP番目のPeakPosをPeakPosPとする。例えば、図13(b)の例はP=1の場合、PeakPosP=410となる。S1207では、中央のM×M個のAF枠中において○判定であって且つPeakPosPの枠に対して所定深度範囲内のAF枠の「かたまり」を検出し、「かたまり」を構成するAF枠の数と各AF枠の位置を記憶しておく。ここで、「かたまり」とは、例えば、条件を満たすAF枠が上下左右に隣接している状態のものである。また、「かたまり」が複数存在する場合には、「かたまり」を構成するAF枠の数や「かたまり」の位置に基づいて、複数の「かたまり」のうちの1つを選択してもよい。 In S1205, a counter P indicating the closest order of the peak positions in the M × M frame calculated in S1202 is set to 1. In S1206, the P-th PeakPos in the sort order is set as PeakPosP. For example, in the example of FIG. 13B, when P = 1, PeakPosP = 410. In step S1207, an AF frame “complex” is detected in the AF frame within the predetermined depth range with respect to the PeakPosP frame that is ○ in the M × M AF frames at the center, and the AF frames constituting the “cluster” are detected. The number and the position of each AF frame are stored. 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では、中央のN×N個のAF枠中において、中央のM×M個のAF枠中の枠を1枠以上含む様に、○判定であって且つPeakPosPに対して所定深度内の「かたまり」を検出する。そして、「かたまり」を構成するAF枠の数と各AF枠の位置を記憶しておく。例えば、図13(a)、(b)の様な判定結果に対して、図13(c)に灰色の枠で示す様な「かたまり」が検出される。 In S1208, in the center N × N AF frames, “○” is determined so that one or more frames in the center M × M AF frames are included, and “PeakPosP” is within a predetermined depth. Detect a “chunk”. Then, the number of AF frames constituting the “chunk” and the position of each AF frame are stored. For example, with respect to the determination results as shown in FIGS. 13A and 13B, a “chunk” as indicated by a gray frame in FIG. 13C is detected.

S1209では、S1207またはS1208で検出した「かたまり」が中央枠を含む「かたまり」であるかどうかを調べ、中央枠を含む「かたまり」であればS1215へ進み、そうでなければS1210へ進む。S1210では、S1207またはS1208で検出した「かたまり」が、M×M枠内に所定枠数以上含む「かたまり」であるかどうかを調べ、あればS1215へ進み、そうでなければS1211へ進む。S1211では、S1207またはS1208で検出した「かたまり」が、中央M×M枠のうちの枠を1枠は含み、N×N枠内のAF枠を所定数以上含む「かたまり」であるかどうかを調べ、そうであればS1215へ進む。そうでなければS1212へ進む。S1212では、カウンタPに1を加える。S1213では、カウンタPがソート数Sよりも大きいどうかを調べ、カウンタPがソート数Sよりも大きければS1217へ進み、そうでなければS1206に戻る。 In S1209, it is checked whether or not the “chunk” detected in S1207 or S1208 is a “chunk” including the central frame. If the “chunk” includes the central frame, the process proceeds to S1215. Otherwise, the process proceeds to S1210. In S1210, it is checked whether or not the “chunk” detected in S1207 or S1208 is a “chunk” that includes at least a predetermined number of frames in the M × M frame. If so, the process proceeds to S1215, and if not, the process proceeds to S1211. In S1211, whether or not the “chunk” detected in S1207 or S1208 is a “chunk” that includes one frame of the central M × M frames and includes a predetermined number or more of the AF frames in the N × N frame. If yes, go to S1215. Otherwise, the process proceeds to S1212. In S1212, 1 is added to the counter P. In S1213, it is checked 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 process proceeds to S1217. Otherwise, the process returns to S1206.

S1214では、S1201での合焦判定結果が○判定かどうかを調べ、○判定であればS1215へ進み、そうでなければS1217へ進む。S1215では、主被写体領域が特定できたと判定する。S1216では、かたまりを構成する各AF枠を主被写体領域と判断して選択して本判定処理を終了する。ここで設定しているAF枠が1枠の場合はその1枠を選択する。S1217では、主被写体領域の特定ができなかったと判定して本判定処理を終了する。 In S1214, it is checked whether or not the in-focus determination result in S1201 is ◯. If YES, the process proceeds to S1215. If not, the process proceeds to S1217. In S1215, it is determined that the main subject area has been identified. In S1216, each AF frame constituting the cluster is determined to be the main subject area and selected, and this determination process ends. If one AF frame is set here, that one frame is selected. In step S1217, it is determined that the main subject area has not been specified, and the determination process ends.

次に、図14は、図8におけるS809のゾーンAFスキャンを説明するフローチャートである。ここでゾーンとは、合焦可能距離範囲を複数の範囲に分割した際の1つ1つの範囲のことを指す。 Next, FIG. 14 is a flowchart for explaining the zone AF scan of S809 in FIG. Here, the zone refers to each range when the focusable distance range is divided into a plurality of ranges.

まず、S1401では、フォーカスレンズ104をスキャン開始位置へと移動させる。ここで、スキャン開始位置は、例えば、無限遠端位置とする。S1402では、撮像素子108から読み出されたアナログ映像信号をA/D変換部109がデジタル信号に変換し、その出力から画像処理部110が輝度信号の高周波成分を抽出し、CPU115はこれを焦点評価値として記憶させる。S1403では、フォーカスレンズ104の現在位置を取得してCPU115が該位置のデータを記憶させる。 First, in S1401, the focus lens 104 is moved to the scan start position. Here, the scan start position is, for example, the infinity end position. In S1402, the analog video signal read from the image sensor 108 is converted into a digital signal by the A / D conversion unit 109, and the image processing unit 110 extracts a high-frequency component of the luminance signal from the output, and the CPU 115 focuses on this. Store as an evaluation value. In S1403, the current position of the focus lens 104 is acquired, and the CPU 115 stores the data of the position.

S1404では、CPU115が、撮影準備を指示するSW1の状態(ON/OFF)を判定し、該状態がON(オン)状態なら本処理を終了して図2のS212へ進み、OFF(オフ)状態の場合にはS1405へ進む。S1405では、前述した図5のシーン変化判定を行う。S1406では、フォーカスレンズ104が予め設定したゾーンの境界位置にあるかどうかを調べ、そうであればS1407へ進み、そうでなければS1409へ進む。S1407では、後述する手順に従ってゾーン更新判定を行う(図15参照)。ここでゾーン更新とは、或るゾーンをスキャンした後、引き続き隣接するゾーンをスキャンすることを指す。 In S1404, the CPU 115 determines the state (ON / OFF) of SW1 instructing to prepare for photographing. If the state is ON (on), the process is terminated and the process proceeds to S212 in FIG. In this case, the process proceeds to S1405. In S1405, the scene change determination of FIG. 5 described above is performed. In S1406, it is checked whether or not the focus lens 104 is at a preset zone boundary position. If so, the process proceeds to S1407; otherwise, the process proceeds to S1409. In S1407, zone update determination is performed according to the procedure described later (see FIG. 15). Here, zone update refers to scanning an adjacent zone after scanning a certain zone.

S1408では、S1407で判定した結果、ゾーン更新すると判定されたかどうかを調べ、ゾーン更新すると判定されていればS1409へ進み、そうでなければS1411へ進む。S1409では、CPU115がフォーカスレンズ104の現在位置がスキャン終了位置と等しいかを調べ、両者が等しい場合にはS1411へ進み、そうでなければS1410へ進む。S1410では、フォーカスレンズ104をスキャン終了方向へ向かって所定量だけ移動させた後、S1402に戻る。S1411では、前述した図12の主被写体領域判定を行う。 In S1408, whether or not it is determined to update the zone as a result of the determination in S1407 is checked. If it is determined to update the zone, the process proceeds to S1409, and if not, the process proceeds to S1411. In S1409, the CPU 115 checks whether or not the current position of the focus lens 104 is equal to the scan end position. If both are equal, the process proceeds to S1411. Otherwise, the process proceeds to S1410. In step S1410, the focus lens 104 is moved by a predetermined amount in the scan end direction, and then the process returns to step S1402. In S1411, the main subject area determination of FIG. 12 described above is performed.

図15は、図14におけるS1407のゾーン更新判定を説明するフローチャートである。ここでは、スキャン方向の先に主被写体が存在していそうかどうか、つまりAFスキャンを続けるかどうかを判定する。図16は、図15におけるゾーン更新判定の例を説明する図である。この例では、AF枠の大きさを画面の10%、N=5、M=3とする。 FIG. 15 is a flowchart illustrating the zone update determination in S1407 in FIG. Here, it is determined whether or not the main subject is likely to exist ahead of the scanning direction, that is, whether or not to continue AF scanning. FIG. 16 is a diagram illustrating an example of zone update determination in FIG. In this example, the size of the AF frame is 10% of the screen, N = 5, and M = 3.

まず、S1501では、設定した各AF枠すべてにおいて前述した図6の合焦判定を行う。例えば、各AF枠において図16(a)に示す様な合焦判定結果となるとする。S1502では、最終ゾーンまでスキャンをしたかどうかを調べ、最終ゾーンまでスキャンしていればS1512へ進み、そうでなければS1503へ進む。S1503では、○判定枠があるかどうかを調べ、○判定枠があればS1504へ進み、そうでなければS1511へ進む。 First, in S1501, the above-described in-focus determination in FIG. 6 is performed in all the set AF frames. For example, it is assumed that the focus determination result as shown in FIG. In S1502, it is checked 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 S1512. Otherwise, the process proceeds to S1503. In S1503, it is checked whether or not there is a ○ determination frame. If there is a ○ determination frame, the process proceeds to S1504, and if not, the process proceeds to S1511.

S1504では、中央枠が△判定かどうかを調べ、中央枠が△判定であればS1511へ進み、そうでなければS1505へ進む。S1505では、中央M×M枠の中で△判定枠が所定枠数以上の「かたまり」としてあるかどうかを調べ、あればS1511へ進み、そうでなければS1506へ進む。図16では、例として所定数を2とする。S1506では、中央M×M枠のうちの枠を1枠以上含む様にN×N枠のAF枠中に△判定枠が所定枠数以上の「かたまり」としてあるかどうかを調べ、そうあればS1511へ進み、そうでなければS1507へ進む。図16では、例として所定数を4とする。S1507では、中央M×M枠中に○判定枠が所定数以上の「かたまり」としてあるかどうかを調べ、そうであればS1512へ進み、そうでなければS1508へ進む。図16では、例として所定数を5とする。 In S1504, it is checked whether or not the center frame is Δ. If the center frame is Δ, the process proceeds to S1511. Otherwise, the process proceeds to S1505. In S1505, it is checked whether or not the Δ judgment frame is a “cluster” of the predetermined number of frames or more in the center M × M frame, and if it is, the process proceeds to S1511, and if not, the process proceeds to S1506. In FIG. 16, the predetermined number is 2 as an example. In S1506, it is checked whether or not the Δ judgment frame is a “cluster” of a predetermined number of frames or more in the AF frame of N × N frames so as to include one or more of the central M × M frames. The process proceeds to S1511. Otherwise, the process proceeds to S1507. In FIG. 16, the predetermined number is 4 as an example. In step S1507, it is checked whether or not the “O” determination frame is more than a predetermined number of “chunks” in the center M × M frame. If so, the process proceeds to step S1512. In FIG. 16, the predetermined number is 5 as an example.

S1508では、中央枠が×判定かどうかを調べ、中央枠が×判定であればS1511へ進み、そうでなければS1509へ進む。S1509では、中央M×M枠の中で△判定枠または×判定枠が所定枠数以上の「かたまり」としてあればS1511へ進み、そうでなければS1510へ進む。図16では、例として所定数を2とする。S1510では、中央M×M枠のうちの枠を1枠以上含む様にN×N枠の全ての枠中に△判定枠または×判定枠が所定数以上の「かたまり」としてあるかどうかを調べ、そうであればS1511へ進み、そうでなければS1512へ進む。図16では、例として所定数を4とする。S1511では、「ゾーン更新する」と判定して本判定処理を終了する。S1512では、「ゾーン更新しない」と判定して本判定処理を終了する。 In S1508, it is checked whether or not the center frame is X determination. If the center frame is X determination, the process proceeds to S1511. Otherwise, the process proceeds to S1509. In S1509, if the Δ determination frame or the × determination frame is a “cluster” of the predetermined number of frames or more in the center M × M frame, the process proceeds to S1511. Otherwise, the process proceeds to S1510. In FIG. 16, the predetermined number is 2 as an example. In S1510, it is checked whether or not there are more than a predetermined number of “chunks” of Δ judgment frames or X judgment frames in all of the N × N frames so as to include one or more of the central M × M frames. If so, the process proceeds to S1511. Otherwise, the process proceeds to S1512. In FIG. 16, the predetermined number is 4 as an example. In step S1511, it is determined that “the zone is to be updated”, and the determination process ends. In S1512, it is determined that “zone update is not performed”, and this determination process ends.

例えばN=5、M=3としたとき、図16(b)に示している灰色の領域の「かたまり」となり、「ゾーン更新する」と判定される。 For example, when N = 5 and M = 3, the gray area shown in FIG. 16B becomes a “cluster”, and it is determined that the zone is to be updated.

図17は、図8におけるS811の一様面判断を説明するフローチャートである。ここで「一様面である状態」とは画面内に輝度差がなく、コントラストがないため、AFを行っても焦点評価値ピークが充分に得られない状態のことである。「一様面である状態」において撮影シーンが安定するたびに図2のS208の被写体領域特定AFスキャンが繰り返されると、画面のピント変動が無駄に繰り返されるため、煩わしい。そのため、この一様面判断フローでは、「一様面である状態」を判定した場合には、「一様面である状態」を判定しなくなるまでフォーカスレンズ104を停止する動作を行う。 FIG. 17 is a flowchart for explaining the uniform surface determination in S811 in FIG. Here, “a state that is a uniform surface” is a state in which there is no difference in brightness in the screen and there is no contrast, so that a focus evaluation value peak cannot be obtained sufficiently even when AF is performed. If the subject area specific AF scan of S208 in FIG. 2 is repeated every time the photographic scene is stabilized in the “uniform surface state”, the focus variation on the screen is repeated unnecessarily, which is troublesome. Therefore, in this uniform surface determination flow, 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.

まず、S1701では、後述する手順に従って一様面判定を行う(図18参照)。S1702では、S1701で判定した結果、撮影シーンが一様面であると判定したかどうかを調べ、一様面と判定していればS1703へと進み、そうでなければ本判断処理を終了する。S1703では、AF処理部105がフォーカスレンズ104を所定位置へと移動させる。ここで所定位置とは、例えば無限遠を被写界深度の無限遠側に含む過焦点距離とする。 First, in S1701, uniform surface determination is performed according to a procedure described later (see FIG. 18). In S1702, it is checked whether or not it is determined that the shooting scene is a uniform plane as a result of the determination in S1701, and if it is determined that it is a uniform plane, the process proceeds to S1703, and if not, this determination process ends. In step S1703, the AF processing unit 105 moves the focus lens 104 to a predetermined position. Here, the predetermined position is, for example, a hyperfocal distance including infinity on the infinity side of the depth of field.

S1704では、CPU115が、撮影準備を指示するSW1の状態(ON/OFF)を判定し、該状態がON(オン)状態なら本処理を終了して図2のS212へ進み、OFF(オフ)状態の場合にはS1705へ進む。S1705では、後述する一様面判定を行う。S1706では、S1705で判定した結果、撮影シーンが一様面であると判定したかどうかを調べ、一様面と判定していればS1704に戻り、そうでなければ本判断処理を終了して図2のS201に戻る。 In S1704, the CPU 115 determines the state (ON / OFF) of SW1 that instructs to prepare for photographing. If the state is ON (on), the process is terminated, and the process proceeds to S212 in FIG. In this case, the process proceeds to S1705. In S1705, the uniform surface determination described later is performed. In S1706, it is checked whether or not it is determined that the shooting scene is a uniform plane as a result of the determination in S1705. If it is determined that the shooting scene is a uniform plane, the process returns to S1704. Return to S201 of 2.

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

図18は、図17におけるS1701、S1705の一様面判定を説明するフローチャートである。ここでは、画面内の輝度情報及び焦点評価値に基づいて「一様面である状態」かどうかを判定する。図19は、図18の一様面判定について図で説明したものである。図19(a)の[1]部分は、「一様面である状態」を示しており、図19(a)の[2]部分は、「一様面でない状態」を示している。 FIG. 18 is a flowchart for explaining uniform surface determination in S1701 and S1705 in FIG. Here, it is determined whether or not the state is a “uniform surface” based on the luminance information in the screen and the focus evaluation value. FIG. 19 illustrates the uniform surface determination of FIG. The [1] portion in FIG. 19A shows a “state that is a uniform surface”, and the [2] portion in FIG. 19A shows a “state that is not a uniform surface”.

まず、S1801では、設定しているAF枠が1枠かどうかを調べ、設定しているAF枠が1枠であればS1805へ進み、そうでなければS1802へ進む。S1802では、「画面中央M×M枠と、画面全体N×N枠中の4隅M×M枠それぞれとの輝度積分値の差分」を算出する。例えば、枠サイズ10%、N=5、M=3とすると、図19(a)の風景の中で[1]部分の領域を撮影シーンとした場合、画面中央M×M枠の輝度積分値は図19(b)のAに示す灰色の領域の輝度値を積分したものとなる。また、画面全体N×N枠中の4隅M×M枠それぞれの輝度積分値は図19(b)のB、C、D、Eに示すそれぞれの灰色の領域の輝度値を積分したものとなる。それぞれの輝度積分値を、A、B、C、D、Eとすると、A−B、A−C、A−D、A−Eの絶対値が、「画面中央M×M枠と、画面全体N×N枠中の4隅M×M枠それぞれの輝度積分値の差分」となる。 First, in S1801, it is checked whether or not the set AF frame is one frame. If the set AF frame is one frame, the process proceeds to S1805. Otherwise, the process proceeds to S1802. In S1802, “difference in luminance integrated values between the screen center M × M frame and each of the four corner M × M frames in the entire screen N × N frame” is calculated. For example, assuming that the frame size is 10%, N = 5, and M = 3, when the area of [1] in the landscape of FIG. Is obtained by integrating the luminance values of the gray area indicated by A in FIG. Further, the luminance integral values of the four corner M × M frames in the entire screen N × N frame are obtained by integrating the luminance values of the gray areas shown in B, C, D, and E in FIG. Become. Assuming that the integrated luminance values are A, B, C, D, and E, the absolute values of AB, AC, AD, and AE are “the screen center M × M frame and the entire screen. The difference between the luminance integration values of the four corner M × M frames in the N × N frame ”.

S1803では、S1802で算出した「画面中央M×M枠と、画面全体N×N枠中の4隅M×M枠それぞれの輝度積分値の差分」のうち所定値以上の輝度差分となるものがあるかどうを調べ、そうであればS1807へ進む。そうでなければS1804へ進む。S1804では、中央M×M枠の各AF枠の焦点評価値を演算したものを新たな焦点評価値とする。演算の仕方は例えば加算する。S1805では、焦点評価値が所定値以上かどうかを調べ、所定値以上であればS1807へ進み、そうでなければS1806へ進む。S1806では、撮影シーンが「一様面である」と判定して本判定処理を終了する。S1807では、撮影シーンが「一様面ではない」と判定して本判定処理を終了する。 In S1803, among the “differences between the integrated luminance values of the screen center M × M frame and the four corner M × M frames in the entire screen N × N frame” calculated in S1802, a luminance difference equal to or greater than a predetermined value is obtained. If there is, it proceeds to S1807. Otherwise, the process proceeds to S1804. In step S1804, the focus evaluation value of each AF frame of the center M × M frame is calculated as a new focus evaluation value. For example, addition is performed as a calculation method. In S1805, it is determined whether or not the focus evaluation value is equal to or greater than a predetermined value. If the focus evaluation value is equal to or greater than the predetermined value, the process proceeds to S1807, and if not, the process proceeds to S1806. In step S1806, it is determined that the shooting scene is “a uniform surface”, and the determination process ends. In step S1807, it is determined that the shooting scene is “not a uniform surface”, and the determination process ends.

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

図20は、図8におけるS813のフォーカス駆動を説明するフローチャートである。まず、S2001では、主被写体領域が特定できたかどうかを調べ、特定できていればS2002へ進み、そうでなければS2003へ進む。S2002では、選択したAF枠中の最至近位置にフォーカスを駆動して本処理を終了する。S2003では、中央M×M枠中に○判定があるかどうかを調べ、○判定があればS2004へ進み、そうでなければS2005へ進む。S2004では、中央M×M枠中の○判定のうち最至近位置にフォーカスを駆動して本処理を終了する。S2005では、予め記憶している位置(定点)へと移動させて本処理を終了する。ここで、定点は、例えば、被写体の存在確率の高い距離に設定する。 FIG. 20 is a flowchart for explaining the focus drive in S813 in FIG. First, in S2001, it is checked whether or not the main subject area can be specified. If it can be specified, the process proceeds to S2002, and if not, the process proceeds to S2003. In S2002, the focus is driven to the closest position in the selected AF frame, and this process is terminated. In S2003, it is checked whether or not there is a ○ determination in the center M × M frame. If there is a ○ determination, the process proceeds to S2004, and if not, the process proceeds to S2005. In S2004, the focus is driven to the closest position among the ◯ determinations in the center M × M frame, and the process is terminated. In S2005, it moves to the position (fixed point) memorize | stored previously, and complete | finishes this process. Here, for example, the fixed point is set to a distance having a high probability of existence of the subject.

次に、図21は、図2におけるS209のコンティニュアスAFを説明するフローチャートである。まず、S2101では、合焦度判定フラグをTRUEにする。S2102では、設定した各AF枠で焦点評価値を取得する。 Next, FIG. 21 is a flowchart for explaining the continuous AF in S209 in FIG. First, in S2101, the focus degree determination flag is set to TRUE. In step S2102, the focus evaluation value is acquired for each set AF frame.

S2103では、設定しているAF枠が1枠かどうかを調べ、設定しているAF枠が1枠の場合はS2105へ進み、そうでない場合はS2104へ進む。S2104では、主被写体領域として選択したAF枠の焦点評価値を用いて演算した評価値をS2105以降に用いる焦点評価値として設定し直す。これにより、撮影シーンが変化して画面内の主被写体領域が変化しても、常に画面内の主被写体領域の焦点評価値を算出することができる。 In step S2103, it is checked whether the set AF frame is one frame. If the set AF frame is one frame, the process proceeds to step S2105. Otherwise, the process proceeds to step S2104. In S2104, the evaluation value calculated using the focus evaluation value of the AF frame selected as the main subject region is reset as the focus evaluation value used in S2105 and thereafter. 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では焦点評価値に基づいて合焦度を算出する。本実施例では、焦点評価値に基づいて、合焦度を高、中、低の3段階で決定することにする。S2106では、CPU115が、撮影準備を指示するSW1の状態(ON/OFF)を判定し、該状態がON(オン)状態ならば本処理を終了して図2のS213へ進み、OFF(オフ)状態の場合にはS2107へ進む。S2107では前述した図5のシーン変化判定を行う。 In S2105, the degree of focus is calculated based on the focus evaluation value. In this embodiment, the degree of focus is determined in three stages of high, medium, and low based on the focus evaluation value. In S2106, the CPU 115 determines the state (ON / OFF) of SW1 instructing to prepare for photographing. If the state is ON (on), the process is terminated and the process proceeds to S213 in FIG. If so, the process advances to step S2107. In step S2107, the scene change determination shown in FIG. 5 is performed.

S2108では、ピーク検出フラグがTRUEであるかどうかを調べ、TRUEであればS2125へ進み、FALSEであればS2109へ進む。S2109では、フォーカスレンズ104の現在位置を取得する。S2110では、焦点評価値の取得及びフォーカスレンズ104の現在位置の取得をカウントするための取得カウンタに1を加える。この取得カウンタは、初期化動作(図示略)において予め0に設定されているものとする。S2111では、取得カウンタの値が1かどうかを調べ、取得カウンタの値が1ならばS2114へ進み、取得カウンタの値が1でなければS2112へ進む。 In S2108, it is checked whether or not the peak detection flag is TRUE. If it is TRUE, the process proceeds to S2125, and if it is FALSE, the process proceeds to S2109. In step S2109, the current position of the focus lens 104 is acquired. In S2110, 1 is added to the acquisition counter for counting the acquisition of the focus evaluation value and the acquisition of the current position of the focus lens 104. This acquisition counter is set to 0 in advance in an initialization operation (not shown). In S2111, it is checked whether or not the value of the acquisition counter is 1. If the value of the acquisition counter is 1, the process proceeds to S2114. If the value of the acquisition counter is not 1, the process proceeds to S2112.

S2112では、「今回の焦点評価値」が「前回の焦点評価値」よりも大きいかどうかを調べ、そうであればS2113へ進み、そうでなければS2120へ進む。S2113では、増加カウンタに1を加える。S2114では、今回の焦点評価値を焦点評価値の最大値としてCPU115に内蔵される図示しない演算メモリに記憶する。S2115では、フォーカスレンズ104の現在の位置を焦点評価値のピーク位置としてCPU115に内蔵される図示しない演算メモリに記憶する。S2116では、今回の焦点評価値を前回の焦点評価値としてCPU115に内蔵される図示しない演算メモリに記憶する。S2117では、フォーカスレンズ104の現在位置が移動範囲の端にあるかどうかを調べ、そうであれば、S2118へ進み、そうでなければS2119へ進む。S2118では、フォーカスレンズ104の移動方向を反転する。S2119では、フォーカスレンズ104を所定量移動する。 In S2112, it is checked whether or not “current focus evaluation value” is larger than “previous focus evaluation value”. If so, the process proceeds to S2113; otherwise, the process proceeds to S2120. In S2113, 1 is added to the increase counter. In S2114, the current focus evaluation value is stored as a maximum focus evaluation value in a calculation memory (not shown) built in the CPU 115. In step S2115, the current position of the focus lens 104 is stored in a calculation memory (not shown) built in the CPU 115 as the peak position of the focus evaluation value. In step S2116, the current focus evaluation value is stored as a previous focus evaluation value in a calculation memory (not shown) built in the CPU 115. In S2117, it is checked whether or not the current position of the focus lens 104 is at the end of the movement range. If so, the process proceeds to S2118; otherwise, the process proceeds to S2119. In S2118, the moving direction of the focus lens 104 is reversed. In step S2119, the focus lens 104 is moved by a predetermined amount.

S2120では、「焦点評価値の最大値−今回の焦点評価値」が所定量より大きいかどうかを調べ、「焦点評価値の最大値−今回の焦点評価値」が所定量より大きければステップS2121へ進み、そうでなければステップS2116へ進む。ここで「焦点評価値の最大値−今回の焦点評価値」が所定量より大きいこと、即ち最大値から所定量減少していれば、その最大値をピントのピーク位置での値とみなす。S2121では、増加カウンタが0より大きいかどうかを調べ、0より大きければS2122へ進み、0より小さければS2116へ進む。S2122では、フォーカスレンズ104を前記S2115で記憶した焦点評価値が最大値となったピーク位置へ移動させる。S2123では、ピーク検出フラグをTRUEとする。S2124では、取得カウンタを0とする。 In S2120, it is checked whether “the maximum value of the focus evaluation value—the current focus evaluation value” is greater than a predetermined amount. If “the maximum value of the focus evaluation value—the current focus evaluation value” is greater than the predetermined amount, the process proceeds to step S2121. If not, the process proceeds to step S2116. Here, if “the maximum value of the focus evaluation value−the current focus evaluation value” is larger than a predetermined amount, that is, if the predetermined value is decreased from the maximum value, the maximum value is regarded as a value at the focus peak position. In S2121, whether or not the increment counter is greater than 0 is checked. If it is greater than 0, the process proceeds to S2122, and if it is less than 0, the process proceeds to S2116. In S2122, the focus lens 104 is moved to the peak position where the focus evaluation value stored in S2115 is the maximum value. In S2123, the peak detection flag is set to TRUE. In S2124, the acquisition counter is set to zero.

S2125では、今回の焦点評価値が焦点評価値の最大値に対して所定割合以上変動したかどうかを調べ、所定割合以上の大きな変動をしていればS2127へ進み、小さな変動であればS2126へ進む。S2126では、フォーカスレンズ104の位置をそのまま保持する。S2127では、焦点評価値が最大となるフォーカスレンズ位置を再び求め直すため、ピーク検出フラグをFALSEとし、焦点評価値の最大値及びピーク位置をリセットする。S2128では、増加カウンタをリセットする。 In S2125, it is checked 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. If there has been a large fluctuation of a predetermined ratio or more, the process proceeds to S2127. move on. In step S2126, the position of the focus lens 104 is held as it is. In S2127, the peak detection flag is set to FALSE to reset the focus lens position at which the focus evaluation value is maximized, and the maximum focus evaluation value and the peak position are reset. In S2128, the increment counter is reset.

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

図22は、図2におけるS211のシーン不安定判断を説明するフローチャートである。まず、S2201では、角速度センサ部125で検出したカメラ動作量が所定量以上となっているかどうかを調べ、所定量以上であればS2205へ進み、そうでなければS2202でへ進む。S2202では、前回からの輝度変化量が所定量以上かどうかを調べ、所定量以上であればS2205へ進み、そうでなければS2203へ進む。S2203では、顔検出モジュール123で検出した顔検出状態が変化したかどうかを調べ、顔検出状態が変化していればS2205へ進み、そうでなければS2204へ進む。ここで、顔検出状態とは、例えば、顔検出されているかどうかである。つまり、前回のシーン不安定判断で顔検出されていて今回のシーン不安定判断で顔検出されていなければ、顔検出状態が変化したことになる。S2204では、撮影シーンが変化していない(シーンが不安定でない)と判断して本処理を終了する。S2205では、撮影シーンが変化した(シーンが不安定である)と判断して本処理を終了する。 FIG. 22 is a flowchart for explaining the scene instability determination of S211 in FIG. First, in S2201, it is checked whether or not the camera motion detected by the angular velocity sensor unit 125 is greater than or equal to a predetermined amount. If it is greater than or equal to the predetermined amount, the process proceeds to S2205; In S2202, it is checked whether or not the luminance change amount from the previous time is equal to or greater than a predetermined amount. If it is equal to or greater than the predetermined amount, the process proceeds to S2205; In S2203, it is checked whether or not the face detection state detected by the face detection module 123 has changed. If the face detection state has changed, the process proceeds to S2205; otherwise, the process proceeds to S2204. Here, the face 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. In step S2204, it is determined that the shooting scene has not changed (the scene is not unstable), and the process ends. In step S2205, it is determined that the shooting scene has changed (the scene is unstable), and the process ends.

次に、図23は、図2におけるS213の撮影処理を説明するフローチャートである。まず、S2301では、AE処理部103で本露光用のAE処理を行う。S2302では、後述する手順に従って本露光用のAFを行う(図24参照)。S2303では、CPU115は撮影スイッチSW2(122)の状態(ON/OFF)を判定し、該状態がONならばS2305へ進むが、OFF状態の場合にはS2304へ進む。S2304では、撮影準備を指示するSW1の状態(ON/OFF)を判定し、該状態がON(オン)状態ならS2303へ進み、OFF(オフ)状態の場合には本処理を終了する。S2305では、後述する手順に従って本露光処理を行い(図26参照)、本処理を終了する。 Next, FIG. 23 is a flowchart for describing the photographing process of S213 in FIG. First, in S2301, the AE processing unit 103 performs AE processing for main exposure. In step S2302, AF for main exposure is performed according to the procedure described later (see FIG. 24). In S2303, the CPU 115 determines the state (ON / OFF) of the photographing switch SW2 (122). If the state is ON, the process proceeds to S2305. If the state is OFF, the process proceeds to S2304. In S2304, the state (ON / OFF) of SW1 instructing the preparation for photographing is determined. If the state is ON (on), the process proceeds to S2303. If the state is OFF (off), the process ends. In step S2305, the main exposure process is performed according to the procedure described later (see FIG. 26), and the process ends.

図24は、図23におけるS2302の本露光用AFを説明するフローチャートである。まず、S2401では、本露光用のAF枠設定を行う。本露光用のAF枠設定は、中央領域に所定の大きさで1枠設定しても、N×N枠の複数枠で設定してもよい。S2402では、主被写体検出フラグがTRUEであるかどうかを調べ、TRUEであればS2403へ進み、そうでなければS2409へ進む。S2403では、図21におけるS2105で算出した合焦度が「高」であるかどうかを調べ、合焦度が「高」であればS2404へ進み、そうでなければS2405へ進む。 FIG. 24 is a flowchart for explaining the main-exposure AF in S2302 in FIG. First, in S2401, AF frame setting for main exposure is performed. The AF frame setting for the main exposure may be set with one frame having a predetermined size in the central region or may be set with a plurality of N × N frames. In S2402, it is checked whether or not the main subject detection flag is TRUE. If TRUE, the process proceeds to S2403, and if not, the process proceeds to S2409. In S2403, it is checked whether or not the focus degree calculated in S2105 in FIG. 21 is “high”. If the focus degree is “high”, the process proceeds to S2404; otherwise, the process proceeds to S2405.

S2404では、現在のフォーカスレンズ104の位置を中心にスキャン範囲を第1の範囲(1)に設定する。ここではコンティニュアスAF動作により主被写体にほぼピントが合っている状態、つまり焦点評価値がピークを示す合焦位置付近にフォーカスレンズが位置すると判断して、狭いスキャン範囲を設定する。S2405では、S2105で算出した合焦度が「中」であるかどうかを調べ、合焦度が「中」であればS2406へ進み、そうでなければS2407へ進む。S2406では、現在のフォーカスレンズ104の位置を中心にスキャン範囲を第2の範囲(2)に設定する。ここではコンティニュアスAF動作により合焦位置付近にフォーカスレンズが位置しているが、合焦度が「高」状態ほどではないと判断して第1のスキャン範囲より範囲を広げた狭い範囲とする。S2407では、フォーカスレンズ104の現在位置がマクロ領域かどうかを調べ、マクロ領域であればS2408へ進み、そうでなければS2409へ進む。S2408では、予め記憶してあるマクロ領域であるスキャン範囲を第3の範囲(3)に設定する。S2409では、スキャン範囲を予め記憶してある焦点検出可能範囲全域である第4のスキャン範囲(4)に設定する。 In step S2404, the scan range is set to the first range (1) around the current position of the focus lens 104. Here, a narrow scan range is set by determining that the focus lens is positioned near the focus position where the main subject is substantially focused by the continuous AF operation, that is, near the focus position where the focus evaluation value shows a peak. In S2405, it is checked whether or not the degree of focus calculated in S2105 is “medium”. If the degree of focus is “medium”, the process proceeds to S2406, and if not, the process proceeds to S2407. In S2406, the scan range is set to the second range (2) around the current position of the focus lens 104. Here, the focus lens is positioned in the vicinity of the in-focus position by the continuous AF operation, but it is determined that the in-focus degree is not as high as the “high” state, and the narrow range is wider than the first scan range. To do. In S2407, it is checked 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 S2408; otherwise, the process proceeds to S2409. In S2408, the scan range which is a macro area stored in advance is set to the third range (3). In step S2409, the scan range is set to a fourth scan range (4) which is the entire focus detectable range stored in advance.

S2410では、後述する手順に従って本露光用AFスキャンを行う(図25参照)。S2411では、後述する図25のS2506で算出したピーク位置にフォーカスレンズ104を移動させる。 In step S2410, a main exposure AF scan is performed according to a procedure described later (see FIG. 25). In step S2411, the focus lens 104 is moved to the peak position calculated in step S2506 in FIG.

図25は、図24におけるS2405の本露光用AFスキャンを説明するフローチャートである。まず、S2501では、フォーカスレンズ104をスキャン開始位置へと移動させる。ここでスキャン開始位置とは、図24のS2404又はS2406又はS2408又はS2409で設定したスキャン範囲の端位置とする。S2502では、撮像素子108から読み出されたアナログ映像信号をA/D変換部109がデジタル信号に変換し、その出力から画像処理部110が輝度信号の高周波成分を抽出し、CPU115はこれを焦点評価値として記憶させる。S2503では、フォーカスレンズ104の現在位置を取得してCPU115が該位置のデータを記憶させる。S2504では、CPU115がフォーカスレンズ104の現在位置がスキャン終了位置と等しいかを調べ、両者が等しい場合にはS2506へ進み、そうでなければS2505へ進む。S2505では、フォーカスレンズ104をスキャン終了方向へ向かって所定量だけ移動させた後、S2502に戻る。S2506では、S2502で記憶した焦点評価値とそのレンズ位置から、焦点評価値のピーク位置を計算する。焦点評価値のピーク位置を計算するにあたって、AF枠を複数枠設定した場合は、図12で説明した主被写体領域判定により決定した主被写体領域の最至近ピーク位置に基づいて計算してもよいし、別の判断の仕方をしてピーク位置計算を行ってもよい。 FIG. 25 is a flowchart for explaining the main-exposure AF scan in S2405 in FIG. First, in S2501, the focus lens 104 is moved to the scan start position. Here, the scan start position is the end position of the scan range set in S2404, S2406, S2408, or S2409 in FIG. In S2502, the analog video signal read from the image sensor 108 is converted into a digital signal by the A / D conversion unit 109, and the image processing unit 110 extracts a high-frequency component of the luminance signal from the output. Store as an evaluation value. In step S2503, the current position of the focus lens 104 is acquired, and the CPU 115 stores data on the position. In S2504, the CPU 115 checks whether or not the current position of the focus lens 104 is equal to the scan end position. If both are equal, the process proceeds to S2506, and if not, the process proceeds to S2505. In step S2505, the focus lens 104 is moved by a predetermined amount in the scan end direction, and the process returns to step S2502. In S2506, the peak position of the focus evaluation value is calculated from the focus evaluation value stored in S2502 and its lens position. In calculating the peak position of the focus evaluation value, when a plurality of AF frames are set, the calculation may be 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 in another way of determination.

図26は、図23におけるS2305の本露光処理を説明するフローチャートである。まず、S2601における撮像素子108の露光後に、S2602では撮像素子108に蓄積されたデータを読み出す。S2603では、A/D変換部109で撮像素子108から読み出したアナログ信号をデジタル信号に変換する。S2604では、画像処理部110で、A/D変換部109から出力されるデジタル信号に対して各種画像処理を施す。S2605では、S2604で処理した画像をCPU115の制御下でJPEGなどのフォーマットにしたがって圧縮する。S2606では、S2605で圧縮したデータを画像記録部114に送り、記録させる様にCPU115が制御を行う。 FIG. 26 is a flowchart for explaining the main exposure processing in S2305 in FIG. First, after the exposure of the image sensor 108 in S2601, data accumulated in the image sensor 108 is read in S2602. In step S2603, the analog signal read from the image sensor 108 by the A / D converter 109 is converted into a digital signal. In step S2604, the image processing unit 110 performs various types of image processing on the digital signal output from the A / D conversion unit 109. In step S2605, the image processed in step S2604 is compressed according to a format such as JPEG under the control of the CPU 115. In step S2606, the CPU 115 performs control so that the data compressed in step S2605 is sent to the image recording unit 114 and recorded.

以上説明した様に、本実施例によれば、撮影シーンが低照度であっても主被写体の検出性能の低下を抑えることが可能となり、撮影準備指示前に主被写体領域を特定してピントを合わせ続ける。このことで、撮影準備指示後に主被写体に素早くピントを合わせることが可能となる。 As described above, according to the present embodiment, it is possible to suppress a decrease in the detection performance of the main subject even when the shooting scene is low illuminance, and the main subject area is specified and focused before the shooting preparation instruction is given. Keep matching. This makes it possible to quickly focus on the main subject after the shooting preparation instruction.

図面を参照しながら本発明の実施例2について説明する。実施例2では、実施例1における図2のS205の被写体特定用AF枠設定に関して、被写体輝度に基づいて撮像素子の駆動、AF枠の設定、焦点評価値を算出する際の抽出する周波数帯域を切り替える。このことにより、低照度時の焦点評価値の算出を改善するものである。 Embodiment 2 of the present invention will be described with reference to the drawings. In the second embodiment, regarding the AF frame setting for subject identification in S205 of FIG. 2 in the first embodiment, the frequency band to be extracted when calculating the driving of the image sensor, the setting of the AF frame, and the focus evaluation value based on the subject luminance is set. Switch. This improves the calculation of the focus evaluation value at low illuminance.

図29のフローチャートを参照しながら本実施例における被写体領域特定用AF枠設定処理について説明する。まず、S2901にて、現在の被写体輝度を取得する。本実施例の説明の都合上、この値を被写体輝度Bとする。この被写体輝度自体は、図2で示した処理と平行して実施されているAE動作の結果として得られるものであり、AE処理部によって算出される。 The subject area specifying AF frame setting process in the present embodiment will be described with reference to the flowchart of FIG. First, in S2901, the current subject brightness is acquired. For convenience of explanation of the present embodiment, this value is assumed to be subject brightness B. The subject luminance itself is obtained as a result of the AE operation performed in parallel with the processing shown in FIG. 2, and is calculated by the AE processing unit.

次に、S2902にて、先に取得した被写体輝度Bと低照度閾値1とを比較する。この低照度閾値1とは、被写体が十分に明るいか否かを示す閾値であり、この条件に該当する場合にはS2904に進む。S2904では、センサの駆動Aに切り替える。このセンサ駆動Aとは、センサからの信号の読み出し時間を優先し、垂直方向のライン数が低照度時と比べて少なくなる様に設定された駆動とする。 Next, in S2902, the previously obtained subject luminance B and the low illuminance threshold 1 are compared. The low illuminance threshold value 1 is a threshold value indicating whether or not the subject is sufficiently bright. If this condition is satisfied, the process proceeds to S2904. In step S2904, the sensor driving mode is switched to A. This sensor drive A is a drive set so that the signal readout time from the sensor is prioritized and the number of lines in the vertical direction is reduced as compared to when the illumination is low.

次に、S2907では、バンドパスフィルタの設定を、抽出する周波数帯域Aとなる様に設定する。これは、本実施例では水平方向の輝度の高周波成分を抽出して焦点評価値を算出するものとし、センサ駆動Aの水平方向の画素数に応じて、適切な周波数帯域の成分を抽出するためである。 In step S2907, the band pass filter is set to be the frequency band A to be extracted. This is because, in this embodiment, a high-frequency component of luminance in the horizontal direction is extracted to calculate a focus evaluation value, and components in an appropriate frequency band are extracted according to the number of pixels in the horizontal direction of the sensor drive A. It is.

次に、S2910にて、電子ズームをしているかどうかを調べ、電子ズームをしていればS2912へ進み、そうでなければS2913へ進む。S2912では、電子ズーム時用のAF枠設定を行う。ここで、電子ズームとは、画面中央領域を拡大して操作表示部117に表示することである。拡大するため操作表示部に表示される画像の画素数は電子ズームしない時に比べて少なくなる。従って、電子ズーム時に操作表示部117に表示される画像に対して電子ズームをしない時と同じ割合になる様にAF枠を設定すると、電子ズームしない時に比べてAF枠内の画素数が少なくなり、焦点評価値のS/Nが低下する。そのため、電子ズーム時と電子ズームをしない時とで、AF枠設定の仕方を変える必要がある。本実施例では、電子ズーム時は、画面中央付近に所定の大きさのAF枠を1枠設定することとする。 Next, in S2910, it is checked whether or not the electronic zoom is performed. If the electronic zoom is performed, the process proceeds to S2912, and if not, the process proceeds to S2913. In step S2912, AF frame setting for electronic zoom is performed. Here, the electronic zoom is to enlarge the center area of the screen and display it on the operation display unit 117. Since the image is enlarged, the number of pixels of the image displayed on the operation display unit is smaller than when the electronic zoom is not performed. Therefore, when the AF frame is set so that the ratio of the image displayed on the operation display unit 117 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. The S / N of the focus evaluation value decreases. For this reason, it is necessary to change the AF frame setting method between when the electronic zoom is performed and when the electronic zoom is not performed. In this embodiment, at the time of electronic zooming, one AF frame of a predetermined size is set near the center of the screen.

一方、電子ズームでない場合にはS2913に進み、N×NのAF枠設定を行う。本実施例では、図30(a)に示す様に、高輝度な状況ではAF枠の大きさを縦横の長さ共に画面の10%とし、N=5で5×5のAF枠設定を実施するものとする。次に、S2918にて、被写体領域特定実施フラグをTRUEに設定し処理を終了する。 On the other hand, if it is not the electronic zoom, the process proceeds to S2913, where N × N AF frame setting is performed. In this embodiment, as shown in FIG. 30 (a), in a high luminance situation, the size of the AF frame is set to 10% of the screen in both vertical and horizontal lengths, and 5 × 5 AF frame setting is performed with N = 5. It shall be. In step S2918, the subject area specifying execution flag is set to TRUE, and the process ends.

また、被写体輝度Bが低照度閾値1未満の場合にはS2903に進む。S2903では、更に被写体輝度Bが低照度閾値1未満且つ低照度閾値2以上であるか否かを判断する。このとき上記の条件に該当する場合にはS2905に進み、該当しない場合にはS2906に進む。 If the subject brightness B is less than the low illuminance threshold 1, the process proceeds to S2903. In S2903, it is further determined whether or not the subject luminance B is less than the low illuminance threshold 1 and is equal to or higher than the low illuminance threshold 2. At this time, if the above condition is met, the process proceeds to S2905, and if not, the process proceeds to S2906.

S2905では、センサ駆動Bに切り替える。このセンサ駆動BとはS/Nの向上優先し、垂直方向のライン数が高輝度時より多く設定された駆動とする。次に、S2908では、バンドパスフィルタの設定を、抽出する周波数帯域Bとなる様に設定する。この様に、低輝度時にあわせてセンサ駆動と抽出する周波数帯域を決定し、低照度時のS/N向上を図る。S2910以降の処理については、先に述べたものと同様である。ただし、S2913におけるAF枠の設定に関して、図30(b)の様にAF枠の数は高輝度時の図30(a)と同じであるが、センサ駆動の違いによりAF枠を構成する画素の数は異なる。これは、S2912における電子ズーム時のAF枠設定も同様である。 In step S2905, the sensor driving B is switched. This sensor drive B is given priority to the improvement of S / N, and is a drive in which the number of lines in the vertical direction is set higher than that at the time of high luminance. In step S2908, the band pass filter is set to be the frequency band B to be extracted. In this way, the frequency band for sensor driving and extraction is determined according to the low luminance, and the S / N improvement at the time of low illuminance is achieved. The processing after S2910 is the same as described above. However, regarding the AF frame setting in S2913, the number of AF frames is the same as that in FIG. 30A when the luminance is high as shown in FIG. 30B, but the pixels constituting the AF frame are different due to the difference in sensor drive. The number is different. The same applies to the AF frame setting at the time of electronic zoom in S2912.

一方で、S2903にて被写体輝度Bが低照度閾値2未満の場合にはS2906に進む。S2906では、センサの駆動Bに切り替える。このセンサ駆動Bとは、S/Nの向上を優先し、垂直方向のライン数が高輝度時より多く設定された駆動とする。次に、S2909では、バンドパスフィルタの設定を、抽出する周波数帯域Bとなる様に設定する。S2911では、電子ズームをしているかどうかを調べ、電子ズームをしていればS2915へ進み、そうでなければS2914へ進む。S2914では、図30(c)に示す様に、焦点評価値の算出が困難になるような明るさでは、AF枠の大きさを縦横の長さ共に画面の25%とし、1×1のAF枠設定を実施するものとする。 On the other hand, if the subject brightness B is less than the low illuminance threshold 2 in S2903, the process proceeds to S2906. In step S <b> 2906, the sensor driving is switched to B. This sensor drive B gives priority to the improvement of S / N, and is a drive in which the number of lines in the vertical direction is set larger than that at the time of high luminance. In step S2909, the band pass filter is set to be the frequency band B to be extracted. In S2911, it is checked whether or not electronic zooming is being performed. If electronic zooming is being performed, the process proceeds to S2915; otherwise, the process proceeds to S2914. In S2914, as shown in FIG. 30C, at a brightness that makes it difficult to calculate the focus evaluation value, the size of the AF frame is 25% of the screen both vertically and horizontally, and 1 × 1 AF Frame setting shall be performed.

一方で、電子ズーム時には、S2915にて画面中央付近に所定の大きさのAF枠を1枠設定することとする。S2916では、フォーカスレンズを所定の位置に移動させる。本実施例では過焦点距離とする。 On the other hand, when electronic zooming is performed, one AF frame having a predetermined size is set near the center of the screen in S2915. In S2916, the focus lens is moved to a predetermined position. In this embodiment, the hyperfocal distance is used.

次に、S2917にて、被写体領域特定実施フラグをFALSEに設定する。これにより被写体領域特定用AF枠設定処理の後、図2のS208の被写体領域特定AFスキャンを実施せず、直接S209のコンティニュアスAFを実施する様にする。 In step S2917, the subject area specifying execution flag is set to FALSE. Thus, after subject area specifying AF frame setting processing, the subject area specifying AF scan of S208 in FIG. 2 is not executed, but the continuous AF of S209 is directly executed.

次に、S2919に進み、ピーク検出フラグをTRUEに設定する。このピーク検出フラグは、図21のS2108にて参照されるフラグであり、この場合は現在のフォーカスレンズ位置にて停止し、図21のS2102で得られた焦点評価値を基準値としてS215以降の焦点評価値の変化を監視することになる。つまり、焦点評価値の算出が困難な被写体の明るさが継続する限り、以後無駄なピント調整はさせない様にすることが可能となる。 Next, proceeding to S2919, the peak detection flag is set to TRUE. This peak detection flag is a flag referred to in S2108 in FIG. 21. In this case, the peak detection flag is stopped at the current focus lens position, and the focus evaluation value obtained in S2102 in FIG. Changes in focus evaluation values will be monitored. In other words, as long as the brightness of the subject for which it is difficult to calculate the focus evaluation value continues, it is possible to prevent unnecessary focus adjustment thereafter.

なお、本実施例では、センサ駆動の違いに関して、画素の間引きを前提とした水平方向の画素数、垂直方向のライン数の違いとして説明してきた。しかし、本実施例はこれに限定されるものではなく、例えば、センサのS/Nを向上する方法としてセンサ内での画素加算等の技術が知られており、明るさに応じたセンサ駆動の切り替えとは、この様な技術の組み合わせを含んでもよい。 In the present embodiment, the difference in sensor driving has been described as the difference in the number of pixels in the horizontal direction and the number of lines in the vertical direction on the premise of pixel thinning. However, the present embodiment is not limited to this. For example, a technique such as pixel addition in the sensor is known as a method for improving the S / N of the sensor. Switching may include such a combination of techniques.

以上説明した様に、本実施例によれば、撮影シーンが低照度であっても主被写体の検出性能の低下を抑えることが可能となり、撮影準備指示前に主被写体領域を特定してピントを合わせ続ける。このことで、撮影準備指示後に主被写体に素早くピントを合わせることが可能となる。 As described above, according to the present embodiment, it is possible to suppress a decrease in the detection performance of the main subject even when the shooting scene is low illuminance, and the main subject area is specified and focused before the shooting preparation instruction is given. Keep matching. This makes it possible to quickly focus on the main subject after the shooting preparation instruction.

本発明の焦点調節装置や方法は、焦点調節機能を有する電子スチルカメラなどの撮像装置等に適用することができる。 The focus adjustment apparatus and method of the present invention can be applied to an imaging apparatus such as an electronic still camera having a focus adjustment function.

101:撮影レンズ
102:絞り及びシャッター
103:AE処理部
104:フォーカスレンズ
105:AF処理部
108:撮像素子
109:A/D変換部
110:画像処理部
114:画像記録部
115:システム制御部
120:メインスイッチ
121:撮影スタンバイスイッチ
122:撮影スイッチ
123:顔検出モジュール
124:動体検出部
125:角速度センサ部
101: photographing lens 102: aperture and shutter 103: AE processing unit 104: focus lens 105: AF processing unit 108: image sensor 109: A / D conversion unit 110: image processing unit 114: image recording unit 115: system control unit 120 : Main switch 121: Shooting standby switch 122: Shooting switch 123: Face detection module 124: Moving object detection unit 125: Angular velocity sensor unit

Claims (8)

フォーカスレンズを用いて結像された被写体像を電気信号に変換する光電変換手段と、
前記光電変換手段の出力信号から焦点検出領域における特定周波数帯域の信号成分を抽出する抽出手段と、
撮影準備前に、前記フォーカスレンズを移動させると共に、設定された焦点検出領域における前記抽出手段の出力信号を前記フォーカスレンズの位置と関連づけて取得するAFスキャン動作を行うことにより合焦すべき被写体領域を特定する第1の動作を実施し、撮影準備時に、前記AFスキャン動作を行って合焦動作をする第2の動作を実施するよう制御する制御手段と、
前記焦点検出領域の明るさを検出する検出手段とを有し、
前記制御手段は、
撮影準備前において前記検出手段によって得られた明るさが第1の閾値未満の場合には、前記第1の動作とは異なる第3の動作を実施するよう制御することを特徴とする焦点調節装置。
Photoelectric conversion means for converting a subject image formed using a focus lens into an electrical signal;
Extraction means for extracting a signal component of a specific frequency band in a focus detection region from an output signal of the photoelectric conversion means;
Prior to photographing preparation, the focus lens is moved, and an object region to be focused is performed by performing an AF scan operation for acquiring an output signal of the extraction means in a set focus detection region in association with the position of the focus lens. A control means for performing a first operation for specifying the image and performing a second operation for performing a focusing operation by performing the AF scan operation at the time of shooting preparation;
Detecting means for detecting the brightness of the focus detection area;
The control means includes
When the brightness obtained by the detection means before preparation for photographing is less than a first threshold, control is performed so as to perform a third operation different from the first operation. .
前記第3の動作は、前記光電変換手段の動作モードおよび前記抽出手段における周波数帯域を前記第1の動作とは異なる様に設定した前記AFスキャン動作を行って合焦すべき被写体領域を特定する動作であること特徴とする請求項1に記載の焦点調節装置。 In the third operation, the subject region to be focused is specified by performing the AF scan operation in which the operation mode of the photoelectric conversion unit and the frequency band in the extraction unit are set different from the first operation. The focus adjustment apparatus according to claim 1, wherein the focus adjustment apparatus is an operation. 前記第3の動作は、前記焦点検出領域の大きさを前記第1の動作とは異なる様に設定した前記AFスキャン動作を行って合焦すべき被写体領域を特定する動作であることを特徴とする請求項1又は2に記載の焦点調節装置。 The third operation is an operation for specifying a subject region to be focused by performing the AF scan operation in which the size of the focus detection region is set to be different from that of the first operation. The focus adjusting apparatus according to claim 1 or 2. 前記第3の動作は、前記焦点検出領域の数を第1の動作とは異なる様に設定した前記AFスキャン動作を行って合焦すべき被写体領域を特定する動作であることを特徴とする請求項1から3の何れか1項に記載の焦点調節装置。 The third operation is an operation for specifying a subject region to be focused by performing the AF scan operation in which the number of focus detection regions is set to be different from that of the first operation. Item 4. The focus adjustment apparatus according to any one of Items 1 to 3. 前記第3の動作は、前記検出手段によって得られた明るさが前記第1の閾値よりも暗い第2の閾値以上の場合には前記AFスキャン動作を行って合焦すべき被写体領域を特定する動作であり、前記検出手段によって得られた明るさが前記第2の閾値未満の場合には特定の被写体距離にピントを固定する動作であることを特徴とする請求項1から4の何れか1項に記載の焦点調節装置。 In the third operation, when the brightness obtained by the detection unit is equal to or higher than a second threshold value that is darker than the first threshold value, the AF scan operation is performed to identify a subject area to be focused. 5. The operation according to claim 1, wherein the focus is fixed to a specific subject distance when the brightness obtained by the detection unit is less than the second threshold value. The focusing device according to item. 前記第3の動作は、前記検出手段によって得られた明るさが前記第1の閾値よりも暗い第2の閾値以上の場合には前記AFスキャン動作を行って合焦すべき被写体領域を特定する動作であり、前記検出手段によって得られた明るさが前記第2の閾値未満の場合には前記フォーカスレンズを所定量移動する前に抽出した前記抽出手段の出力信号と移動の後に抽出した前記抽出手段の出力信号に基づいて、前記フォーカスレンズを次に移動する際の移動方向を決定して、当該移動方向に前記フォーカスレンズを移動し、前記移動動作を繰り返し行うことにより前記フォーカスレンズを前記抽出手段の出力信号のピーク位置に移動するコンティニュアスAF動作であることを特徴とする請求項1から4の何れか1項に記載の焦点調節装置。 In the third operation, when the brightness obtained by the detection unit is equal to or higher than a second threshold value that is darker than the first threshold value, the AF scan operation is performed to identify a subject area to be focused. And when the brightness obtained by the detection means is less than the second threshold value, the output signal of the extraction means extracted before moving the focus lens by a predetermined amount and the extraction extracted after the movement Based on the output signal of the means, the movement direction for the next movement of the focus lens is determined, the focus lens is moved in the movement direction, and the focus lens is extracted by repeating the movement operation. 5. The focus adjustment apparatus according to claim 1, wherein the focus adjustment apparatus is a continuous AF operation that moves to a peak position of the output signal of the means. 前記第3の動作は、前記検出手段によって得られた明るさが前記第1の閾値よりも暗い第2の閾値以上の場合には前記AFスキャン動作を行って合焦すべき被写体領域を特定する動作であり、前記検出手段によって得られた明るさが前記第2の閾値未満で且つ前記第2の閾値より暗い第3の閾値以上の場合には前記フォーカスレンズを所定量移動する前に抽出した前記抽出手段の出力信号と移動の後に抽出した前記抽出手段の出力信号に基づいて、前記フォーカスレンズを次に移動する際の移動方向を決定して、当該移動方向に前記フォーカスレンズを移動し、前記移動動作を繰り返し行うことにより前記フォーカスレンズを前記抽出手段の出力信号のピーク位置に移動するコンティニュアスAF動作であり、前記検出手段によって得られた明るさが前記第3の閾値未満の場合には特定の被写体距離にピントを固定する様に動作を行うピント固定動作であることを特徴とした請求項1から4の何れか1項に記載の焦点調節装置。 In the third operation, when the brightness obtained by the detection unit is equal to or higher than a second threshold value that is darker than the first threshold value, the AF scan operation is performed to identify a subject area to be focused. If the brightness obtained by the detection means is less than the second threshold and greater than or equal to a third threshold that is darker than the second threshold, the focus lens is extracted before moving by a predetermined amount. Based on the output signal of the extraction means and the output signal of the extraction means extracted after movement, determine the movement direction when the focus lens is moved next, and move the focus lens in the movement direction; It is a continuous AF operation in which the focus lens is moved to the peak position of the output signal of the extraction unit by repeatedly performing the movement operation, and obtained by the detection unit 5. The focus fixing operation according to claim 1, wherein a focus fixing operation is performed so as to fix the focus to a specific subject distance when the threshold is less than the third threshold value. 6. Focus adjustment device. フォーカスレンズを用いて結像された被写体像を電気信号に変換する光電変換手段と、前記光電変換手段の出力信号から焦点検出領域における特定周波数帯域の信号成分を抽出する抽出手段と、装置全体の動作を制御する制御手段と、前記焦点検出領域の明るさを検出する検出手段とを有する撮像装置における焦点調節方法であって、
撮影準備前に、フォーカスレンズを移動させると共に、設定された焦点検出領域における抽出手段の出力信号をフォーカスレンズの位置と関連づけて取得するAFスキャン動作を行って、合焦すべき被写体領域を特定する第1の動作を実施する第1の工程と、
撮影準備時に、前記AFスキャン動作を行い合焦動作を実施して、前記第1の動作と異なる第2の動作を実施する第2の工程と、
撮影準備前において前記検出手段によって得られた明るさが第1の閾値未満の場合には、前記第1の動作とは異なる第3の動作を実施する第3の工程とを含むことを特徴とする焦点調節方法。
A photoelectric conversion unit that converts an object image formed using a focus lens into an electrical signal; an extraction unit that extracts a signal component in a specific frequency band in a focus detection region from an output signal of the photoelectric conversion unit; A focus adjustment method in an imaging apparatus, comprising: control means for controlling operation; and detection means for detecting brightness of the focus detection area,
Prior to shooting preparation, the focus lens is moved, and an AF scan operation is performed to acquire the output signal of the extraction means in the set focus detection area in association with the position of the focus lens, and the subject area to be focused is specified. A first step of performing a first operation;
A second step of performing a second operation different from the first operation by performing the AF scan operation and performing a focusing operation at the time of shooting preparation;
And a third step of performing a third operation different from the first operation when the brightness obtained by the detection means is less than a first threshold value before preparation for photographing. Focus adjustment method.
JP2009034111A 2009-02-17 2009-02-17 Focus adjustment device and focus adjustment method Expired - Fee Related JP5406553B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009034111A JP5406553B2 (en) 2009-02-17 2009-02-17 Focus adjustment device and focus adjustment method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009034111A JP5406553B2 (en) 2009-02-17 2009-02-17 Focus adjustment device and focus adjustment method

Publications (2)

Publication Number Publication Date
JP2010193074A true JP2010193074A (en) 2010-09-02
JP5406553B2 JP5406553B2 (en) 2014-02-05

Family

ID=42818658

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009034111A Expired - Fee Related JP5406553B2 (en) 2009-02-17 2009-02-17 Focus adjustment device and focus adjustment method

Country Status (1)

Country Link
JP (1) JP5406553B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013057915A (en) * 2011-09-09 2013-03-28 Canon Inc Imaging device and control method of the same
JP2014038288A (en) * 2012-08-20 2014-02-27 Canon Inc Focus adjustment device and control method therefor
JP2014182241A (en) * 2013-03-19 2014-09-29 Canon Inc Imaging apparatus
JP2016061798A (en) * 2014-09-12 2016-04-25 キヤノン株式会社 Automatic focusing apparatus and automatic focusing method
JP2016170319A (en) * 2015-03-13 2016-09-23 キヤノン株式会社 Imaging device, control method of the same and program thereof

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60143068A (en) * 1983-12-29 1985-07-29 Matsushita Electric Ind Co Ltd Automatic focus matching device
JPH02163714A (en) * 1988-12-16 1990-06-25 Kyocera Corp Automatic focus adjustor
JPH09312797A (en) * 1996-05-24 1997-12-02 Canon Inc Automatic focusing device
JPH1184228A (en) * 1997-09-08 1999-03-26 Olympus Optical Co Ltd Automaticfocusing device
JP2000155257A (en) * 1998-11-19 2000-06-06 Fuji Photo Film Co Ltd Method and device for autofocusing
JP4106485B2 (en) * 2002-03-29 2008-06-25 株式会社ニコン camera
JP2008175995A (en) * 2007-01-18 2008-07-31 Ricoh Co Ltd Imaging apparatus
JP2008176152A (en) * 2007-01-19 2008-07-31 Canon Inc Imaging apparatus

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60143068A (en) * 1983-12-29 1985-07-29 Matsushita Electric Ind Co Ltd Automatic focus matching device
JPH02163714A (en) * 1988-12-16 1990-06-25 Kyocera Corp Automatic focus adjustor
JPH09312797A (en) * 1996-05-24 1997-12-02 Canon Inc Automatic focusing device
JPH1184228A (en) * 1997-09-08 1999-03-26 Olympus Optical Co Ltd Automaticfocusing device
JP2000155257A (en) * 1998-11-19 2000-06-06 Fuji Photo Film Co Ltd Method and device for autofocusing
JP4106485B2 (en) * 2002-03-29 2008-06-25 株式会社ニコン camera
JP2008175995A (en) * 2007-01-18 2008-07-31 Ricoh Co Ltd Imaging apparatus
JP2008176152A (en) * 2007-01-19 2008-07-31 Canon Inc Imaging apparatus

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013057915A (en) * 2011-09-09 2013-03-28 Canon Inc Imaging device and control method of the same
JP2014038288A (en) * 2012-08-20 2014-02-27 Canon Inc Focus adjustment device and control method therefor
JP2014182241A (en) * 2013-03-19 2014-09-29 Canon Inc Imaging apparatus
JP2016061798A (en) * 2014-09-12 2016-04-25 キヤノン株式会社 Automatic focusing apparatus and automatic focusing method
JP2016170319A (en) * 2015-03-13 2016-09-23 キヤノン株式会社 Imaging device, control method of the same and program thereof

Also Published As

Publication number Publication date
JP5406553B2 (en) 2014-02-05

Similar Documents

Publication Publication Date Title
JP5376986B2 (en) Focus adjustment device and focus adjustment method
JP5339954B2 (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
KR20150065566A (en) Image capturing apparatus and control method thereof
JP5406553B2 (en) Focus adjustment device and focus adjustment method
US9122125B2 (en) Image-capturing apparatus and method of controlling the same
JP5300521B2 (en) Focus adjustment device and focus adjustment method
JP6139960B2 (en) Imaging apparatus and control method thereof
JP4997043B2 (en) Imaging apparatus, method and program
JP5855054B2 (en) Focus adjustment device and focus adjustment method
JP7289714B2 (en) FOCUS ADJUSTMENT DEVICE, IMAGING DEVICE, FOCUS ADJUSTMENT METHOD, AND PROGRAM
JP5355381B2 (en) Imaging apparatus and focus control method thereof
JP6590496B2 (en) Imaging device, control method thereof, and program
JP2011043633A (en) Focus adjustment device and focus adjustment method
JP2011043632A (en) Focus-adjusting device and focus-adjusting method
JP7191680B2 (en) Image processing device and imaging device
JP6463053B2 (en) Automatic focusing device and automatic focusing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120216

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130307

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130314

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130509

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131101

R151 Written notification of patent or utility model registration

Ref document number: 5406553

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: R3D03

LAPS Cancellation because of no payment of annual fees