JP2010060932A - Automatic focusing device and method - Google Patents

Automatic focusing device and method Download PDF

Info

Publication number
JP2010060932A
JP2010060932A JP2008227450A JP2008227450A JP2010060932A JP 2010060932 A JP2010060932 A JP 2010060932A JP 2008227450 A JP2008227450 A JP 2008227450A JP 2008227450 A JP2008227450 A JP 2008227450A JP 2010060932 A JP2010060932 A JP 2010060932A
Authority
JP
Japan
Prior art keywords
evaluation value
focus evaluation
focus
acquisition
acquisition operation
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.)
Withdrawn
Application number
JP2008227450A
Other languages
Japanese (ja)
Inventor
Masaaki Uenishi
正晃 上西
Nobukazu Yoshida
宣和 吉田
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 JP2008227450A priority Critical patent/JP2010060932A/en
Publication of JP2010060932A publication Critical patent/JP2010060932A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To carry out auto-focus processing to automatically focus by using a brightness signal obtained from an imaging element. <P>SOLUTION: This method performs accumulation addition of focal evaluation values obtained by AF scanning when there is no change in photographing conditions between the AF scanning made right before and the current AF scanning, and initializes the accumulated focal evaluation values when detecting a change. Then it carries out focusing by using the accumulated focal evaluation values. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、被写体に対する焦点を自動的に合わせる自動合焦装置および自動合焦方法に関する。   The present invention relates to an automatic focusing apparatus and an automatic focusing method for automatically focusing on a subject.

従来より、電子スチルカメラなどにおいて、フォーカスレンズ位置を動かして被写体に自動的に焦点を合わせるオートフォーカス方法の一つとして、CCDなどの撮像素子から得られる輝度信号を用いて合焦動作を行う方法がある。このオートフォーカス方法では、撮影画面内に設定された測距領域内における信号の高周波成分を積分して評価値(以下、焦点評価値と呼ぶ)を得る。そして、得られた焦点評価値に基づいてフォーカスレンズを所定範囲内で移動させて最もコントラストの高いフォーカスレンズ位置を検出し(以下、AFスキャンと呼ぶ)、合焦点を求めるのが一般的である。   2. Description of the Related Art Conventionally, in an electronic still camera or the like, a focusing operation using a luminance signal obtained from an image sensor such as a CCD is one of autofocus methods for automatically focusing on a subject by moving a focus lens position. There is. In this autofocus method, an evaluation value (hereinafter referred to as a focus evaluation value) is obtained by integrating high-frequency components of a signal in a distance measurement area set in a shooting screen. Then, based on the obtained focus evaluation value, the focus lens is moved within a predetermined range to detect the focus lens position with the highest contrast (hereinafter referred to as AF scan), and the focal point is generally obtained. .

このオートフォーカス方法では、被写体の照度が低かったり被写体のコントラストが低く輝度信号の高周波成分が少ない場合、焦点評価値が小さくなると共に、輝度信号に含まれるノイズ成分の割合が大きくなり、良好な合焦精度を得ることが困難になる。   In this autofocus method, when the illuminance of the subject is low or the contrast of the subject is low and the high-frequency component of the luminance signal is small, the focus evaluation value decreases and the ratio of the noise component contained in the luminance signal increases, resulting in a good match. It becomes difficult to obtain the focus accuracy.

特許文献1には、一回目のAFスキャンによる合焦判定で合焦不可能と判定された場合に、二回目のAFスキャンを行い、二回のAFスキャンで得られた焦点評価値を加算することで合焦能力を向上させ、合焦精度を向上させる技術が記載されている。   In Patent Document 1, when it is determined that focusing cannot be performed by the focusing determination by the first AF scan, the second AF scanning is performed, and the focus evaluation values obtained by the two AF scannings are added. Thus, a technique for improving focusing accuracy and focusing accuracy is described.

特開2000−258681号公報JP 2000-258681 A

ところが、特許文献1に記載される方法では、一回目のAFスキャンと二回目のAFスキャンとで撮影シーンが変化してしまった場合にも焦点評価値を加算してしまうため、加算された焦点評価値が誤った値となってしまうという問題点があった。   However, in the method described in Patent Document 1, since the focus evaluation value is added even when the shooting scene changes between the first AF scan and the second AF scan, the added focus There was a problem that the evaluation value would be an incorrect value.

また、特許文献1の方法では、撮影シーンが変化していなかったとしても、一回目のAFスキャンで合焦不可能と判定された場合でしか二回目のAFスキャンを行わない。そのため、ノイズなどの影響で偽の焦点評価値のピークが検出され、合焦可能と判定されてしまった場合に修正ができないという問題点があった。   Further, in the method of Patent Document 1, even if the shooting scene has not changed, the second AF scan is performed only when it is determined that focusing is impossible in the first AF scan. For this reason, there has been a problem that correction cannot be made when a false focus evaluation value peak is detected due to the influence of noise or the like and it is determined that focusing is possible.

したがって、本発明の目的は、撮像素子から得られる輝度信号を用いて自動的に合焦させるオートフォーカス動作を、より高い精度で行うことが可能な自動合焦装置および自動合焦方法を提供することにある。   Accordingly, an object of the present invention is to provide an automatic focusing device and an automatic focusing method capable of performing an autofocus operation for automatically focusing using a luminance signal obtained from an image sensor with higher accuracy. There is.

本発明は、上述した課題を解決するために、フォーカスレンズを含む撮像光学系を介して撮像素子に入射された光が光電変換された撮像信号に基づき焦点評価値を取得するようにされ、フォーカスレンズを移動させながら各フォーカスレンズ位置で取得した焦点評価値を用いてフォーカスレンズの合焦位置を求める自動合焦装置であって、フォーカスレンズを所定範囲内で移動させながら各移動位置の焦点評価値を取得する焦点評価値取得手段と、焦点評価値取得手段で取得された焦点評価値を移動位置ごとに累積加算する累積手段と、焦点評価値取得手段で焦点評価値の取得を行う第1の取得動作の際の撮影条件が、取得の1回前に焦点評価値取得手段で焦点評価値の取得を行う第2の取得動作の際の撮影条件から変化したか否かを検出する変化検出手段と、累積手段で累積加算された焦点評価値を用いてフォーカスレンズの合焦位置を求める合焦手段と、焦点評価値取得手段を制御してユーザの指示に応じて焦点評価値の取得を行わせ、変化検出手段で変化が検出されたら、累積加算された焦点評価値を初期化する制御手段と
を有することを特徴とする自動合焦装置である。
In order to solve the above-described problem, the present invention is configured to acquire a focus evaluation value based on an imaging signal obtained by photoelectrically converting light incident on an imaging device via an imaging optical system including a focus lens. An automatic focusing device that obtains a focus position of a focus lens using a focus evaluation value acquired at each focus lens position while moving the lens, and focus evaluation of each movement position while moving the focus lens within a predetermined range Focus evaluation value acquisition means for acquiring values, accumulation means for cumulatively adding the focus evaluation values acquired by the focus evaluation value acquisition means for each movement position, and focus evaluation value acquisition means for acquiring focus evaluation values. It is detected whether or not the shooting condition during the acquisition operation has changed from the shooting condition during the second acquisition operation in which the focus evaluation value is acquired by the focus evaluation value acquisition unit one time before the acquisition. A change detection unit, a focusing unit that obtains a focus position of the focus lens using the focus evaluation value accumulated by the accumulation unit, and a focus evaluation value acquisition unit that controls the focus evaluation value according to a user instruction. The automatic focusing device is characterized by having control means for performing acquisition and initializing the accumulated focus evaluation value when a change is detected by the change detecting means.

また、本発明は、フォーカスレンズを含む撮像光学系を介して撮像素子に入射された光が光電変換された撮像信号に基づき焦点評価値を取得するようにされ、フォーカスレンズを移動させながら各フォーカスレンズ位置で取得した焦点評価値を用いてフォーカスレンズの合焦位置を求める自動合焦方法であって、フォーカスレンズを所定範囲内で移動させながら各移動位置の焦点評価値を取得する焦点評価値取得ステップと、焦点評価値取得ステップで取得された焦点評価値を移動位置ごとに累積加算する累積ステップと、焦点評価値取得ステップで焦点評価値の取得を行う第1の取得動作の際の撮影条件が、取得の1回前に焦点評価値取得ステップで焦点評価値の取得を行う第2の取得動作の際の撮影条件から変化したか否かを検出する変化検出ステップと、累積ステップで累積加算された焦点評価値を用いてフォーカスレンズの合焦位置を求める合焦ステップと、焦点評価値取得ステップを制御してユーザの指示に応じて焦点評価値の取得を行わせ、変化検出ステップで変化が検出されたら、累積加算された焦点評価値を初期化する制御ステップとを有することを特徴とする自動合焦方法である。   In addition, the present invention is configured to acquire a focus evaluation value based on an imaging signal obtained by photoelectrically converting light incident on an imaging device via an imaging optical system including a focus lens, and moving each focus lens while moving the focus lens. An automatic focusing method for obtaining a focus lens focus position using a focus evaluation value acquired at a lens position, wherein a focus evaluation value is acquired at each moving position while the focus lens is moved within a predetermined range. Shooting in the acquisition step, the accumulation step of accumulating the focus evaluation value acquired in the focus evaluation value acquisition step for each moving position, and the first acquisition operation for acquiring the focus evaluation value in the focus evaluation value acquisition step A variable for detecting whether or not the condition has changed from the imaging condition in the second acquisition operation in which the focus evaluation value is acquired in the focus evaluation value acquisition step one time before the acquisition. The focus evaluation value obtained by the detection step, the focus evaluation value cumulatively added in the accumulation step, and the focus evaluation value acquisition step according to a user instruction by controlling the focus evaluation value acquisition step by controlling the focus evaluation value acquisition step. And a control step of initializing the cumulatively added focus evaluation value when a change is detected in the change detection step.

本実施例は、上述の構成を有しているために、撮像素子から得られる輝度信号を用いて自動的に合焦させるオートフォーカス動作をより高い精度で行うことが可能である。   Since the present embodiment has the above-described configuration, it is possible to perform an autofocus operation for automatically focusing using a luminance signal obtained from the image sensor with higher accuracy.

以下、本発明の実施形態を、図面を参照しながら説明する。図1は、本発明を適用可能な電子スチルカメラ100の一例の構成を示す。システム制御部115は、例えばCPU、RAMおよびROMを有し、ROMに予め記憶されたプログラムに従い、RAMをワークメモリとして用いて、この電子スチルカメラ100の全体の動作を制御する。   Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 shows an exemplary configuration of an electronic still camera 100 to which the present invention can be applied. The system control unit 115 includes, for example, a CPU, a RAM, and a ROM, and controls the overall operation of the electronic still camera 100 using the RAM as a work memory in accordance with a program stored in advance in the ROM.

ズーム機構を含む撮影レンズ101と、光量を制御する絞りおよびシャッタ102と、撮像素子108上に焦点を合わせるためのフォーカスレンズ104とから撮像光学系が構成される。撮像素子108は、例えばCCDやCMOSイメージャからなり、入射された光を光電変換で電荷に変換し、撮像信号として出力する。   An imaging optical system is configured by a photographing lens 101 including a zoom mechanism, an aperture and shutter 102 for controlling the amount of light, and a focus lens 104 for focusing on the imaging element 108. The image sensor 108 is composed of, for example, a CCD or a CMOS imager, converts incident light into electric charge by photoelectric conversion, and outputs it as an image signal.

撮像素子108から出力された撮像信号は、図示されない信号処理部でCDS回路によりノイズを除去され、さらに非線形増幅回路でゲインを制御されてA/D変換部109に供給される。A/D変換部109は、供給された撮像信号をデジタル信号に変換して出力する。A/D変換部109の出力は、画像処理部110に供給され、ガンマ補正や輪郭補正などの所定の画像処理を施され、画像データとして出力される。また、画像処理部110は、WB処理部111の制御に基づき、画像データのホワイトバランス処理を行う。   The image pickup signal output from the image pickup device 108 is supplied with noise to the A / D conversion unit 109 after the noise is removed by a CDS circuit by a signal processing unit (not shown) and the gain is controlled by a non-linear amplification circuit. The A / D conversion unit 109 converts the supplied imaging signal into a digital signal and outputs it. The output of the A / D conversion unit 109 is supplied to the image processing unit 110, subjected to predetermined image processing such as gamma correction and contour correction, and output as image data. The image processing unit 110 performs white balance processing of image data based on the control of the WB processing unit 111.

画像処理部110から出力された画像データは、フォーマット変換部112に供給されると共に、詳細を後述する顔検出モジュール123および動体検出部124にそれぞれ供給される。フォーマット変換部112は、供給された画像データを、後述する画像記録部114での記録媒体に対する記録や、操作表示部117に供給するのに適した形式に変換する。フォーマット変換部112で形式を変換された画像データは、読み書きを高速に行えるDRAM113に一時的に格納される。   The image data output from the image processing unit 110 is supplied to the format conversion unit 112 and also supplied to the face detection module 123 and the moving object detection unit 124, which will be described in detail later. The format conversion unit 112 converts the supplied image data into a format suitable for recording on a recording medium in an image recording unit 114 (to be described later) and for supplying to the operation display unit 117. The image data whose format has been converted by the format converter 112 is temporarily stored in the DRAM 113 which can be read and written at high speed.

画像記録部114は、例えば脱着可能な不揮発性メモリのためのインターフェイスからなり、装着された当該不揮発性メモリに対してDRAM113に格納された画像データを記録する。また、画像記録部114は、この電子スチルカメラ100に内蔵された記憶媒体に画像データを記録するようにしてもよい。   The image recording unit 114 includes, for example, an interface for a removable nonvolatile memory, and records image data stored in the DRAM 113 in the attached nonvolatile memory. Further, the image recording unit 114 may record image data on a storage medium built in the electronic still camera 100.

また、DRAM113に格納された画像データは、画像表示用のメモリであるVRAM116を介して操作表示部117に供給される。操作表示部117は、例えばLCDからなる表示デバイスとその駆動回路を有し、供給された画像データを表示デバイスに表示させる。操作表示部117は、さらに、この電子スチルカメラ100の操作補助のための表示や、カメラ状態を示す表示を行う。また、操作表示部117は、撮像時には、撮影画面と測距領域を表示する。   The image data stored in the DRAM 113 is supplied to the operation display unit 117 via the VRAM 116 that is a memory for image display. The operation display unit 117 includes a display device made of, for example, an LCD and a driving circuit thereof, and displays the supplied image data on the display device. The operation display unit 117 further performs display for assisting operation of the electronic still camera 100 and display indicating the camera state. In addition, the operation display unit 117 displays a shooting screen and a distance measurement area during imaging.

操作部118は、ユーザの操作を受け付ける複数の操作子が設けられ、操作子に対する操作に応じた制御信号を出力し、システム制御部115に供給する。システム制御部115は、この制御信号に基づき、ユーザ操作に応じた動作を行うように電子スチルカメラ100の各部を制御する。操作部118は、例えば、この電子スチルカメラ100の撮影機能や画像再生時の設定などの各種設定を行うメニュースイッチ、光学系のズーム動作を指示するズームレバー、撮影モードと再生モードの動作モード切換えスイッチなどが設けられる。   The operation unit 118 is provided with a plurality of operation elements that accept user operations, outputs a control signal corresponding to the operation on the operation elements, and supplies the control signal to the system control unit 115. Based on this control signal, the system control unit 115 controls each unit of the electronic still camera 100 so as to perform an operation according to a user operation. The operation unit 118 includes, for example, a menu switch for performing various settings such as a shooting function of the electronic still camera 100 and settings for image playback, a zoom lever for instructing a zoom operation of the optical system, and an operation mode switching between a shooting mode and a playback mode. A switch or the like is provided.

撮影モードSW119は、顔検出モードのONおよびOFFなどの撮影モードを切り換える。メインSW120は、この電子スチルカメラ100のシステムの電源ON/OFFを切り換える。   The shooting mode SW 119 switches shooting modes such as ON and OFF of the face detection mode. The main SW 120 switches the power on / off of the system of the electronic still camera 100.

スイッチSW121は、オートフォーカス(AF)動作や自動露出(AE)動作などの、撮影スタンバイ動作を指示する。スイッチSW122は、スイッチSW121に対する操作の後、撮影を指示する。例えば、スイッチSW121および122でシャッタボタンを形成し、シャッタボタンの半押し状態でスイッチSW121が作動され、シャッタボタンが押し込まれた状態でスイッチSW122が作動される。   The switch SW121 instructs a shooting standby operation such as an autofocus (AF) operation or an automatic exposure (AE) operation. The switch SW122 instructs photographing after an operation on the switch SW121. For example, a shutter button is formed by the switches SW121 and 122, the switch SW121 is operated when the shutter button is half-pressed, and the switch SW122 is operated when the shutter button is pressed.

AF処理部105は、フォーカスレンズ104を光軸方向に駆動する駆動部を有し、システム制御部115の制御に基づきフォーカスレンズ104を光軸方向に前後に移動させる。AE処理部103は、絞りおよびシャッタ102を駆動する駆動部を有し、画像処理部110から供給された画像データなどに基づくシステム制御部115の制御に応じて絞りの開度およびシャッタ速度を制御する。EF処理部107は、システム制御部115の制御に応じてストロボ106の発光を制御する。   The AF processing unit 105 includes a drive unit that drives the focus lens 104 in the optical axis direction, and moves the focus lens 104 back and forth in the optical axis direction based on the control of the system control unit 115. The AE processing unit 103 has a driving unit that drives the aperture and the shutter 102, and controls the aperture opening and the shutter speed according to the control of the system control unit 115 based on the image data supplied from the image processing unit 110. To do. The EF processing unit 107 controls the light emission of the strobe 106 in accordance with the control of the system control unit 115.

顔検出モジュール123は、画像処理部110から供給された画像データを解析して顔検出を行い、検出された1または複数の顔を示す顔情報(位置、大きさおよび信頼度など)をシステム制御部115に供給する。   The face detection module 123 performs face detection by analyzing the image data supplied from the image processing unit 110, and performs system control on face information (position, size, reliability, etc.) indicating one or more detected faces. To the unit 115.

なお、本実施形態における顔検出には、公知の顔検出技術を利用できる。公知の顔検出技術としては、ニューラルネットワークなどを利用した学習に基づく手法、テンプレートマッチングを用いて目、鼻、口等の形状に特徴のある部位を画像から探し出し、類似度が高ければ顔とみなす手法などがある。また、他にも、肌の色や目の形といった画像特徴量を検出し、統計的解析を用いた手法等、多数提案されている。一般的にはこれらの手法を複数組み合わせ、顔検出の精度を向上させている。具体的な例としては特開2002−251380号公報に記載のウェーブレット変換と画像特徴量を利用して顔検出する方法などが挙げられる。   A known face detection technique can be used for face detection in the present embodiment. As a known face detection technique, a method based on learning using a neural network or the like, template matching is used to search a part having a characteristic shape of eyes, nose, mouth, etc. from an image, and if the degree of similarity is high, it is regarded as a face There are methods. In addition, many other methods have been proposed, such as a method that detects image feature amounts such as skin color and eye shape and uses statistical analysis. In general, a plurality of these methods are combined to improve the accuracy of face detection. Specific examples include a face detection method using wavelet transform and image feature amount described in JP-A-2002-251380.

動体検出部124は、画像処理部110から供給された画像データを解析し、当該画像データによる画面内の被写体や背景などが動いているか否かを検出する。一例として、動体検出部124は、画像処理部110から供給された画像データを少なくとも1枚、保持する。そして、保持された画像データと新たに画像処理部110から供給された画像データとを比較して差分情報を取得し、取得された差分情報から被写体や背景などの動体情報(動作量、位置および範囲など)を検出する。検出された動体情報は、システム制御部115に供給される。   The moving object detection unit 124 analyzes the image data supplied from the image processing unit 110, and detects whether or not a subject or background in the screen based on the image data is moving. As an example, the moving object detection unit 124 holds at least one piece of image data supplied from the image processing unit 110. Then, the stored image data and the image data newly supplied from the image processing unit 110 are compared to obtain difference information, and moving object information (motion amount, position, and so on) such as a subject and a background is obtained from the obtained difference information. Range). The detected moving body information is supplied to the system control unit 115.

角速度センサ部125は、当該角速度センサ部125が搭載される電子スチルカメラ100自体の動きを検出する。検出されたカメラの動き情報は、システム制御部115に供給される。   The angular velocity sensor unit 125 detects the movement of the electronic still camera 100 itself on which the angular velocity sensor unit 125 is mounted. The detected camera motion information is supplied to the system control unit 115.

<実施形態>
次に、本発明の実施形態による自動合焦処理について、図2〜図9を用いて詳細に説明する。図2は、本発明の実施形態による自動合焦処理の全体的な流れを示す一例のフローチャートである。なお、図2のフローチャートにおける各処理は、システム制御部115により、プログラムに従い実行される。
<Embodiment>
Next, the automatic focusing process according to the embodiment of the present invention will be described in detail with reference to FIGS. FIG. 2 is an exemplary flowchart showing an overall flow of the automatic focusing process according to the embodiment of the present invention. Each process in the flowchart of FIG. 2 is executed by the system control unit 115 according to a program.

本発明の実施形態では、AFスキャンで取得された焦点評価値を、1回前のAFスキャンと今回のAFスキャンとの間で撮影条件に変化が無ければ累積加算し、変化が検出された場合には、累積加算された焦点評価値を初期化する。そして、累積加算された焦点評価値を用いて合焦処理を行う。撮影条件の変化の検出は、例えば変化検出手段としてのシステム制御部115が行う。   In the embodiment of the present invention, the focus evaluation value acquired by the AF scan is cumulatively added if there is no change in the shooting condition between the previous AF scan and the current AF scan, and the change is detected. , The accumulated focus evaluation value is initialized. Then, focusing processing is performed using the focus evaluation value that has been cumulatively added. For example, the change of the photographing condition is detected by the system control unit 115 as a change detecting unit.

図2において、例えばメインSW120がONになると、ステップS201でスイッチSW121の状態が調べられる。スイッチSW121がON状態ではないと判断されれば、処理はステップS201に戻される。一方、スイッチSW121がON状態であると判断されれば、制御手段としてのシステム制御部115は、現在の時刻を示す情報をレジスタなどに保持すると共に、処理がステップS202に移行される。   In FIG. 2, for example, when the main SW 120 is turned on, the state of the switch SW 121 is checked in step S201. If it is determined that the switch SW121 is not in the ON state, the process returns to step S201. On the other hand, if it is determined that the switch SW121 is in the ON state, the system control unit 115 serving as a control unit holds information indicating the current time in a register or the like, and the process proceeds to step S202.

なお、図2中では、スイッチSW121を第1SW、スイッチSW122を第2SWと記載する。これは、他のフローチャートにおいても同様とする。   In FIG. 2, the switch SW121 is referred to as a first SW, and the switch SW122 is referred to as a second SW. The same applies to other flowcharts.

ステップS202では、AFスキャンが行われ、各フォーカスレンズ位置の焦点評価値が取得される。取得された各フォーカスレンズ位置での焦点評価値は、例えばシステム制御部115が有するRAMに一時的に格納される。一例として、焦点評価値取得手段としてのシステム制御部115は、AF処理部105を制御して、フォーカスレンズ104を光軸方向に沿って所定間隔で所定ステップだけ移動させる。このとき、撮像素子108から出力された撮像信号に基づき画像処理部110から供給された画像データをステップ毎に解析して、ステップ毎すなわち各フォーカスレンズ位置の焦点評価値を得る。すなわちフォーカスレンズ104の移動位置ごとに焦点評価値を得る。焦点評価値は、例えば、既に従来技術として説明したように、撮影画面内に設定された測距領域内における輝度信号の高周波成分を積分して得る。   In step S202, an AF scan is performed, and a focus evaluation value at each focus lens position is acquired. The acquired focus evaluation value at each focus lens position is temporarily stored in, for example, a RAM included in the system control unit 115. As an example, the system control unit 115 as a focus evaluation value acquisition unit controls the AF processing unit 105 to move the focus lens 104 by a predetermined step at predetermined intervals along the optical axis direction. At this time, the image data supplied from the image processing unit 110 is analyzed for each step based on the imaging signal output from the imaging element 108, and a focus evaluation value for each step, that is, each focus lens position is obtained. That is, a focus evaluation value is obtained for each movement position of the focus lens 104. The focus evaluation value is obtained, for example, by integrating the high-frequency component of the luminance signal in the distance measurement area set in the shooting screen, as already described as the prior art.

ステップS202で各フォーカスレンズ位置の焦点評価値が取得されると、処理はステップS203に移行される。ステップS203では、直前のステップS201においてスイッチSW121がONされたときの第1のAF設定と、当該直前のステップS201に対して1回前のステップS201においてスイッチSW121がONされたときの第2のAF設定とを比較する。比較の結果、第2のAF設定と第1のAF設定とが異なっており第2のAF設定に対して第1のAF設定が変更されたと判定されたら、処理がステップS209に移行される。   When the focus evaluation value for each focus lens position is acquired in step S202, the process proceeds to step S203. In step S203, the first AF setting when the switch SW121 is turned on in the immediately preceding step S201 and the second AF setting when the switch SW121 is turned on in the previous step S201 with respect to the immediately preceding step S201 are performed. Compare with AF setting. As a result of the comparison, if it is determined that the second AF setting is different from the first AF setting and the first AF setting is changed with respect to the second AF setting, the process proceeds to step S209.

ステップS209では、制御手段としてのシステム制御部115後述する累積評価値を0に初期化する。ここで累積評価値をリセットすることで、前回までの焦点評価値を加算しないように制御できる。累積評価値がリセットされると、処理はステップS210に移行される。   In step S209, a system control unit 115 serving as a control unit is initialized to 0, which will be described later. Here, by resetting the cumulative evaluation value, it is possible to control so as not to add the previous focus evaluation values. When the cumulative evaluation value is reset, the process proceeds to step S210.

一方、ステップS203において、第2のAF設定と第1のAF設定とが一致しており第2のAF設定に対して第1のAF設定が変更されていないと判定されたら、処理はステップS204に移行される。ここで、AF設定とは、撮影シーンや撮影画角を変える際にユーザの指示に応じて変更されることが想定される、撮影設定である。AF設定として適用可能な電子スチルカメラ100の設定としては、ズームポジション、通常設定やマクロ設定などの撮影距離範囲設定、1点測距や多点測距などの測距領域設定などがある。AF設定は、例えば操作部118に対するユーザ操作に応じてシステム制御部115により設定され、RAMまたは図示されない不揮発性メモリに記憶される。   On the other hand, if it is determined in step S203 that the second AF setting matches the first AF setting and the first AF setting is not changed with respect to the second AF setting, the process proceeds to step S204. It is transferred to. Here, the AF setting is a shooting setting that is assumed to be changed according to a user instruction when changing a shooting scene or a shooting angle of view. Settings of the electronic still camera 100 that can be applied as AF settings include zoom position, shooting distance range settings such as normal settings and macro settings, and distance measurement area settings such as one-point distance measurement and multi-point distance measurement. The AF setting is set by the system control unit 115 according to a user operation on the operation unit 118, for example, and is stored in a RAM or a non-volatile memory (not shown).

なお、以下では、「直前のステップS201においてスイッチSW121がONされた」ことを、適宜、「今回のスイッチSW121のON」と記述する。同様に、「直前のステップS201に対して1回前のステップS201においてスイッチSW121がONされた」ことを、適宜、「前回のスイッチSW121のON」と記述する。   Hereinafter, “the switch SW121 is turned on in the immediately preceding step S201” will be described as “the current switch SW121 is turned on” as appropriate. Similarly, “the switch SW121 was turned on in the previous step S201 with respect to the immediately previous step S201” is described as “the previous switch SW121 was turned on” as appropriate.

ステップS204では、前回のスイッチSW121のONから今回のスイッチSW121のONまでの時間間隔を取得し、取得した時間間隔が所定時間以上であるか否かを判定する。判定の結果、所定時間以上経過していると判定されたら、撮影条件に変化があったと見做し、処理はステップS209に移行される。一方、所定時間以上経過していないと判定されたら、処理はステップS205に移行される。   In step S204, the time interval from the previous switch SW121 being turned on to the current switch SW121 being turned on is acquired, and it is determined whether or not the acquired time interval is equal to or greater than a predetermined time. As a result of the determination, if it is determined that the predetermined time or more has elapsed, it is assumed that there has been a change in the shooting conditions, and the process proceeds to step S209. On the other hand, if it is determined that the predetermined time or more has not elapsed, the process proceeds to step S205.

ステップS205では、前回のスイッチSW121のONと今回のスイッチSW121のONとで撮影シーンが変化したか否かを判定するシーン判定処理が行われ、処理がステップS206に移行される。ステップS205でのシーン判定処理の詳細は、後述する。   In step S205, a scene determination process is performed to determine whether the shooting scene has changed between the previous switch SW121 being turned on and the current switch SW121 being turned on, and the process proceeds to step S206. Details of the scene determination process in step S205 will be described later.

ステップS206では、ステップS205のシーン判定結果に基づき、前回のスイッチSW121のONと今回のスイッチSW121のONとで撮影シーンが変化しているか否かを判断する。若し、変化していると判断されたら、撮影条件が変化しているとされ、処理はステップS209に移行される。一方、変化していないと判断されたら、処理はステップS207に移行される。   In step S206, based on the scene determination result in step S205, it is determined whether or not the shooting scene has changed between the previous switch SW121 being turned on and the current switch SW121 being turned on. If it is determined that it has changed, it is determined that the shooting conditions have changed, and the process proceeds to step S209. On the other hand, if it is determined that there is no change, the process proceeds to step S207.

ステップS207で、前回のスイッチSW121のONの際にステップS202で取得(第2の取得動作)した焦点評価値による形状と、今回のスイッチSW121のONの際にステップS202で取得(第1の取得動作)した焦点評価値による形状とを比較する。より具体的には、例えば縦軸を焦点評価値、横軸をフォーカスレンズ位置として、フォーカスレンズ位置毎に、対応する焦点評価値を並べた際の焦点評価値がなす形状(焦点評価値形状と呼ぶ)を比較する。そして、前回のスイッチSW121のONの際に取得した焦点評価値による焦点評価値形状と、今回のスイッチSW121のONの際に取得した焦点評価値による焦点評価値形状とが異なるか否かを判定する評価値形状判定を行う。ステップS207による焦点評価値形状の判定方法の詳細は、後述する。   In step S207, the shape based on the focus evaluation value acquired in step S202 (second acquisition operation) when the previous switch SW121 was turned on, and the shape acquired in step S202 when the switch SW121 was turned on this time (first acquisition). Compare the shape with the focus evaluation value. More specifically, for example, with the focus evaluation value on the vertical axis and the focus lens position on the horizontal axis, the shape formed by the focus evaluation value when the corresponding focus evaluation values are arranged for each focus lens position (the focus evaluation value shape and Compare). Then, it is determined whether or not the focus evaluation value shape based on the focus evaluation value acquired when the previous switch SW121 was turned on is different from the focus evaluation value shape based on the focus evaluation value acquired when the current switch SW121 was turned on. Perform evaluation value shape determination. Details of the focus evaluation value shape determination method in step S207 will be described later.

次のステップS208では、ステップS207での評価値形状判定の結果に基づき、前回のスイッチSW121のONで取得した焦点評価値形状と、今回のスイッチSW121のONで取得した焦点評価値形状とが異なるか否かを判断する。若し、形状が異なっていると判断されたら、撮影条件が変化したとされ、処理はステップS209に移行される。一方、形状が異なっていないと判断されたら、処理はステップS210に移行される。   In the next step S208, based on the result of the evaluation value shape determination in step S207, the focus evaluation value shape acquired when the previous switch SW121 is turned on is different from the focus evaluation value shape obtained when the current switch SW121 is turned on. Determine whether or not. If it is determined that the shapes are different, it is determined that the shooting conditions have changed, and the process proceeds to step S209. On the other hand, if it is determined that the shapes are not different, the process proceeds to step S210.

ステップS210では、累積手段としてのシステム制御部115が、累積評価値に今回のスイッチSW121のONで取得した焦点評価値を加算し、新たな累積評価値とする。累積評価値上述したステップS209によるリセット処理で0に初期化されている場合には、初期化された値に対して当該焦点評価値が加算され、新たな累積評価値とされる。なお、累積評価値は、メインSW120がONとされた直後のスイッチSW121のON時には、0に初期化されている。さらに、後述するステップS217で撮影動作が行われた際に0に初期化してもよい。   In step S210, the system control unit 115 as an accumulation unit adds the focus evaluation value acquired when the switch SW121 is turned on to the accumulated evaluation value to obtain a new accumulated evaluation value. Cumulative evaluation value When it is initialized to 0 by the reset process in step S209 described above, the focus evaluation value is added to the initialized value to obtain a new cumulative evaluation value. The cumulative evaluation value is initialized to 0 when the switch SW121 is turned on immediately after the main SW 120 is turned on. Further, it may be initialized to 0 when a photographing operation is performed in step S217 described later.

次のステップS211では、累積評価値を用いて後述する合焦判定を行い、次のステップS212で、ステップS211の判定結果に基づき合焦可能か否かを判断する。若し、合焦可能であると判断されたら、処理はステップS213に移行する。   In the next step S211, focusing determination described later is performed using the accumulated evaluation value, and in the next step S212, it is determined whether or not focusing is possible based on the determination result in step S211. If it is determined that focusing is possible, the process proceeds to step S213.

ステップS213では、累積評価値がピーク値を取るフォーカスレンズ位置にフォーカスレンズ104を移動させるように、合焦手段としてのシステム制御部115がAF処理部105を制御する。AF処理部105は、システム制御部115の制御に従いフォーカスレンズ104を駆動し、フォーカスレンズ104を当該フォーカスレンズ位置に移動させる。フォーカスレンズ104が移動されると、処理はステップS215に移行される。   In step S213, the system control unit 115 as a focusing unit controls the AF processing unit 105 so that the focus lens 104 is moved to the focus lens position where the cumulative evaluation value takes the peak value. The AF processing unit 105 drives the focus lens 104 according to the control of the system control unit 115, and moves the focus lens 104 to the focus lens position. When the focus lens 104 is moved, the process proceeds to step S215.

一方、ステップS212で、ステップS211の判定結果に基づき合焦可能ではないと判断されたら、処理はステップS214に移行する。ステップS214では、定点へフォーカスレンズ104を移動させるように、システム制御部115がAF処理部105を制御する。なお、ステップS214において、定点は、例えば被写体が存在しそうな距離に予め設定しておく。一例として、近距離撮影モード、中距離撮影モード、遠距離撮影モードなど、撮影距離に応じて設けられる撮影モード毎に定点を設定することが考えられる。フォーカスレンズ104が移動されると、処理はステップS215に移行される。   On the other hand, if it is determined in step S212 that focusing is not possible based on the determination result in step S211, the process proceeds to step S214. In step S214, the system control unit 115 controls the AF processing unit 105 so as to move the focus lens 104 to a fixed point. In step S214, the fixed point is set in advance to a distance where a subject is likely to exist, for example. As an example, it is conceivable to set a fixed point for each shooting mode provided according to the shooting distance, such as a short-distance shooting mode, a medium-distance shooting mode, and a long-distance shooting mode. When the focus lens 104 is moved, the process proceeds to step S215.

ステップS215では、スイッチSW122の状態が調べられる。若し、スイッチSW122の状態がONとなっていると判断されれば、処理はステップS217に移行され、撮影動作が開始される。ステップS217の撮影動作の詳細については、後述する。一方、スイッチSW122の状態がONとなっていないと判断されれば、処理はステップS216に移行され、スイッチSW121の状態が調べられる。若し、スイッチSW121の状態がONとされていれば、処理はステップS215に戻される。一方、スイッチSW121の状態がONとされていなければ、処理はステップS201に戻される。   In step S215, the state of the switch SW122 is checked. If it is determined that the state of the switch SW122 is ON, the process proceeds to step S217, and the photographing operation is started. Details of the photographing operation in step S217 will be described later. On the other hand, if it is determined that the state of the switch SW122 is not ON, the process proceeds to step S216, and the state of the switch SW121 is examined. If the state of switch SW121 is ON, the process returns to step S215. On the other hand, if the state of the switch SW121 is not ON, the process returns to step S201.

次に、上述したステップS205によるシーン判定処理の例について、図3のフローチャートを用いて説明する。先ず、ステップS301では、前回のスイッチSW121のONの際と、今回のスイッチSW121のONの際とで、撮像信号に基づく画像データの輝度成分が比較される。例えば、システム制御部115は、画像処理部110から取り込んだ画像データをRAMなどに保持すると共に、取り込んだ画像データと、前回のスイッチSW121のONの際に保持された画像データとで輝度成分を比較する。   Next, an example of the scene determination process in step S205 described above will be described using the flowchart of FIG. First, in step S301, the luminance component of the image data based on the imaging signal is compared when the previous switch SW121 is turned on and when the current switch SW121 is turned on. For example, the system control unit 115 holds the image data fetched from the image processing unit 110 in a RAM or the like, and calculates the luminance component between the fetched image data and the image data held when the switch SW121 was turned on last time. Compare.

輝度成分の比較の結果、若し、輝度成分が所定値以上変化したと判断されたら、処理はステップS306に移行され、判定結果が撮影シーンが変化したことを示すものとされ、処理が図2のフローチャートのステップS206に戻される。一方、輝度成分が所定値以上変化していないと判断されたら、処理はステップS302に移行される。   If it is determined that the luminance component has changed by a predetermined value or more as a result of the comparison of the luminance components, the process proceeds to step S306, and the determination result indicates that the shooting scene has changed, and the processing is as shown in FIG. It returns to step S206 of the flowchart. On the other hand, if it is determined that the luminance component has not changed by a predetermined value or more, the process proceeds to step S302.

ステップS302では、前回のスイッチSW121のON時からの画像の動き量が調べられ、当該動き量が所定量以上であるか否かが判断される。ここで、動き量は、例えば、画像動き量検出手段としての動体検出部124で、画像処理部110から取り込んだ画像データをメモリなどに保持する。それと共に、取り込んだ画像データと前回のスイッチSW121のONの際にメモリに保持された画像データとを比較し、差分を求める。そして、求められたこの差分量を、動き量とする。比較する画像領域は、画面全体でもよいし、被写体だと思われる領域(顔検出モジュール123で顔検出した位置や大きさに基づいた領域など)に限定してもよい。   In step S302, the amount of motion of the image since the previous switch SW121 was turned on is checked to determine whether the amount of motion is greater than or equal to a predetermined amount. Here, the amount of motion is, for example, the moving object detection unit 124 as image motion amount detection means, and the image data captured from the image processing unit 110 is held in a memory or the like. At the same time, the acquired image data is compared with the image data held in the memory when the switch SW121 was previously turned on, and a difference is obtained. Then, the obtained difference amount is set as a motion amount. The image area to be compared may be the entire screen, or may be limited to an area that seems to be a subject (such as an area based on the position or size detected by the face detection module 123).

若し、ステップS302で動き量が所定量以上であると判断されたら、処理はステップS306に移行される。一方、動き量が所定量以下であると判断されたら、処理はステップS303に移行される。   If it is determined in step S302 that the amount of motion is greater than or equal to the predetermined amount, the process proceeds to step S306. On the other hand, if it is determined that the amount of movement is equal to or less than the predetermined amount, the process proceeds to step S303.

ステップS303では、装置動き量検出手段としての角速度センサ部125の検出結果に基づき、前回のスイッチSW121のON時からのカメラ動き量が調べられ、当該カメラ動き量が所定量以上かどうかが判断される。若し、カメラ動き量が所定量以上であると判断されたら、処理はステップS306に移行される。一方、カメラ動き量が所定量以上ではないと判断されたら、処理はステップS304に移行する。   In step S303, based on the detection result of the angular velocity sensor unit 125 as the apparatus motion amount detection means, the camera motion amount from when the previous switch SW121 was turned on is checked to determine whether the camera motion amount is greater than or equal to a predetermined amount. The If it is determined that the camera motion amount is greater than or equal to the predetermined amount, the process proceeds to step S306. On the other hand, if it is determined that the camera motion amount is not equal to or greater than the predetermined amount, the process proceeds to step S304.

ステップS304では、前回のスイッチSW121のON時に対して、顔検出手段としての顔検出モジュール123で検出される顔に変化があったか否かが調べられる。例えば、前回のスイッチSW121のON時には顔が検出され、今回のスイッチSW121のON時には顔が検出されなかった場合や、その逆の場合、検出される顔に変化があったと判断される。また、前回のスイッチSW121のON時に検出された顔と、今回のスイッチSW121のON時に検出された顔とで顔の大きさが所定以上変化した場合も、検出される顔に変化があったと判断される。顔の大きさが所定以上変化した場合、主被写体までの距離が変化していると判断している。   In step S304, it is checked whether or not the face detected by the face detection module 123 as the face detection means has changed since the previous switch SW121 was turned on. For example, a face is detected when the previous switch SW121 is turned on, and when the face is not detected when the current switch SW121 is turned on, or vice versa, it is determined that the detected face has changed. Also, it is determined that there has been a change in the detected face even when the face size detected when the switch SW121 is turned on the previous time and the face size detected when the switch SW121 is turned on this time have changed by a predetermined amount or more. Is done. When the size of the face changes more than a predetermined amount, it is determined that the distance to the main subject has changed.

若し、ステップS304で、顔の検出に変化があったと判断されたら、処理はステップS306に移行される。一方、顔の検出に変化がなかったと判断されたら、処理はステップS305に移行される。ステップS305では、判定結果がシーンが変化していないことを示すものとされ、図2のフローチャートにおけるステップS206に処理が移行される。   If it is determined in step S304 that there has been a change in face detection, the process proceeds to step S306. On the other hand, if it is determined that the face detection has not changed, the process proceeds to step S305. In step S305, the determination result indicates that the scene has not changed, and the process proceeds to step S206 in the flowchart of FIG.

次に、上述した図2のステップS211による合焦判定処理の例について、図4〜6のフローチャートおよび図7を用いて説明する。   Next, an example of the focus determination process in step S211 of FIG. 2 described above will be described with reference to the flowcharts of FIGS.

ここで、焦点評価値は、遠近競合などの特殊な場合を除けば、横軸にフォーカスレンズ位置、縦軸に焦点評価値を取ると、その形状は、図7に例示されるような山状になる。そこで、焦点評価値の形状が山状になっているか否かを、焦点評価値の最大値と最小値の差分と、所定値SlopeThr以上の傾きで傾斜している部分の長さと、傾斜している部分の勾配とから判断することにより、合焦判定を行うことができる。以下では、合焦判定における判定結果は、下記のように「○」または「×」で出力されるものとする。   Here, the focus evaluation value is a mountain shape as illustrated in FIG. 7 when the horizontal axis represents the focus lens position and the vertical axis represents the focus evaluation value, except for special cases such as perspective competition. become. Therefore, whether or not the shape of the focus evaluation value is mountain-shaped is determined by the difference between the maximum value and the minimum value of the focus evaluation value, the length of the inclined portion with an inclination equal to or greater than the predetermined value SlopeThr, and the inclination. It is possible to perform in-focus determination by determining from the gradient of the existing portion. In the following, it is assumed that the determination result in the focus determination is output as “◯” or “×” as follows.

○:焦点評価値のピーク位置から、被写体の焦点調節が可能である。
×:焦点評価値のピーク位置に基づく被写体の焦点調節が不可能である。
○: The focus of the subject can be adjusted from the peak position of the focus evaluation value.
X: Focus adjustment of the subject based on the peak position of the focus evaluation value is impossible.

なお、「×」の、焦点評価値のピーク位置に基づく被写体の焦点調節が不可能である場合とは、例えば、被写体画像のコントラストが不十分である場合や、AFスキャンを行った合焦距離の範囲外の距離に被写体が位置する場合である。   The case where the focus adjustment of the subject based on the peak position of the focus evaluation value of “×” is impossible means, for example, the case where the contrast of the subject image is insufficient or the focus distance where the AF scan is performed This is a case where the subject is located at a distance outside the range.

ここで、図7に示すように、山の頂上(点A)から傾斜が続いていると認められる範囲の境界点を点Dおよび点Eとし、点Dから点Eまでの距離を山の幅Lとする。また、点Aおよび点Dの焦点評価値の差分SL1と、点Aおよび点Eの焦点評価値の差分SL2との和(SL1+SL2)を値SLとする。   Here, as shown in FIG. 7, the boundary points in the range where the slope is recognized to continue from the top of the mountain (point A) are point D and point E, and the distance from point D to point E is the width of the mountain. Let L be. The sum (SL1 + SL2) of the difference SL1 between the focus evaluation values at points A and D and the difference SL2 between the focus evaluation values at points A and E is defined as a value SL.

図4は、ステップS211による合焦判定処理の全体的な流れを示す一例のフローチャートである。先ず、ステップS401において、焦点評価値の最大値maxおよび最小値minと、最大値maxを与えるフォーカスレンズ位置(以下、スキャンポイントio)とを求める。次にステップS402では、焦点評価値の山の幅を表す変数L、山の勾配を表す変数SLをそれぞれ0に初期化する。   FIG. 4 is a flowchart of an example showing the overall flow of the focus determination process in step S211. First, in step S401, the maximum value max and the minimum value min of the focus evaluation value and the focus lens position (hereinafter, the scan point io) that gives the maximum value max are obtained. Next, in step S402, a variable L representing the peak width of the focus evaluation value and a variable SL representing the mountain gradient are each initialized to zero.

なお、フォーカスレンズ位置すなわちスキャンポイントは、AFスキャンを行う所定範囲の遠側端を0、至近側端をN(>0)とし、遠側端から至近側端に向けて所定間隔毎に1ずつ増加する値iで示されるものとする。以下、値iに対応する位置のスキャンポイントを適宜、スキャンポイントiと記述する。例えば、上述した最大値を与えるフォーカスレンズ位置は、値ioに対応する。   Note that the focus lens position, that is, the scan point, is set to 0 at a far end of a predetermined range where AF scanning is performed, N (> 0) at a close end, and one at a predetermined interval from the far end to the close end. It is assumed to be indicated by an increasing value i. Hereinafter, the scan point at the position corresponding to the value i is appropriately described as the scan point i. For example, the focus lens position that gives the maximum value described above corresponds to the value io.

次のステップS403では、最大値を与えるスキャンポイントioがAFスキャンを行った所定範囲における遠側端の位置か否かを調べ、遠側端位置でないと判断されたら、処理はステップS404へ移行され、無限遠方向への単調減少を調べる。一方、遠側端位置であったと判断されたら、処理はステップS405に移行される。   In the next step S403, it is checked whether or not the scan point io giving the maximum value is the position of the far end in the predetermined range where the AF scan is performed. If it is determined that it is not the far end position, the process proceeds to step S404. Investigate monotonic decrease toward infinity. On the other hand, if it is determined that the position is the far end position, the process proceeds to step S405.

ステップS404における無限遠方向への単調減少を調べる一例の処理について、図5のフローチャートを用いて説明する。先ず、ステップS501において、カウンタ変数としての値iを、スキャンポイントioを示す値ioに初期化する。   An example of the process for checking the monotonic decrease toward the infinity in step S404 will be described with reference to the flowchart of FIG. First, in step S501, a value i as a counter variable is initialized to a value io indicating a scan point io.

次のステップS502では、スキャンポイントiにおける焦点評価値の値d[i]から、スキャンポイントiより1スキャンポイント分無限遠寄りのスキャンポイントi−1における焦点評価値の値d[i−1]を減じた値を、所定値SlopeThrと比較する。その結果、若し、d[i]−d[i−1]<SlopeThrであれば、無限遠方向への単調減少は生じていないと判断し、無限遠方向への単調減少をチェックする処理を終了し、処理は図4のフローチャートにおけるステップS405に移行される。   In the next step S502, the focus evaluation value d [i-1] at the scan point i-1 that is infinity from the scan point i by one scan point from the focus evaluation value d [i] at the scan point i. The value obtained by subtracting is compared with a predetermined value SlopeThr. As a result, if d [i] −d [i−1] <SlopeThr, it is determined that no monotonic decrease in the infinity direction has occurred, and a process of checking the monotonic decrease in the infinity direction is performed. The process ends, and the process proceeds to step S405 in the flowchart of FIG.

一方、ステップS502で、d[i]−d[i−1]≧SlopeThrであれば、無限遠方向への単調減少が生じていると判断し、処理はステップS503に移行される。ステップS503では、焦点評価値が一定値以上の傾きで傾斜している部分の長さ(山の幅)を表す変数Lと、単調減少区間における減少量を表す変数SLとを、以下の式(1)および式(2)に従い更新する。   On the other hand, if d [i] −d [i−1] ≧ SlopeThr in step S502, it is determined that a monotonic decrease in the infinity direction has occurred, and the process proceeds to step S503. In step S503, a variable L that represents the length (mountain width) of the portion where the focus evaluation value is inclined with a slope equal to or greater than a certain value and a variable SL that represents the amount of decrease in the monotonically decreasing section are expressed by the following equations ( Update according to 1) and equation (2).

L = L+1 …(1)
SL= SL+(d[i]−d[i−1]) …(2)
L = L + 1 (1)
SL = SL + (d [i] -d [i-1]) (2)

次のステップS504で、値iから1を減じた値を新たな値iとして、検出をする点を1スキャンポイント分、無限遠側に移す。ステップS505では、スキャンポイントiがAFスキャンを行った所定範囲における遠側端位置になったか否かをチェックする。値iが0、すなわち単調減少を検出する開始点がAFスキャンを行った所定範囲における遠側端位置に達したと判断されたら(ステップS505)、無限遠方向への単調減少をチェックする処理を終了する。   In the next step S504, a value obtained by subtracting 1 from the value i is set as a new value i, and the point to be detected is moved to the infinity side by one scan point. In step S505, it is checked whether or not the scan point i has reached the far end position in the predetermined range where the AF scan has been performed. When it is determined that the value i is 0, that is, the start point for detecting the monotonic decrease has reached the far end position in the predetermined range where the AF scan has been performed (step S505), the process of checking the monotonic decrease toward the infinity direction is performed. finish.

ステップS404では、以上のようにして、スキャンポイントioから無限遠方向への単調減少をチェックする。ステップS404の処理が終了したら、処理はステップS405に移行する。   In step S404, the monotonous decrease from the scan point io in the infinity direction is checked as described above. When the process of step S404 ends, the process proceeds to step S405.

説明は図4に戻り、ステップS405では、最大値を与えるスキャンポイントioがAFスキャンを行った所定範囲における至近端の位置か否かを調べ、至近端位置でないと判断されたら、処理はステップS406にに移行され、至近端方向への単調減少を調べる。一方、至近端位置であったと判断されたら、処理はステップS407に移行される。   Returning to FIG. 4, in step S405, it is checked whether or not the scan point io giving the maximum value is the closest end position in the predetermined range where the AF scan is performed. The process proceeds to step S406, and the monotonic decrease toward the closest end is checked. On the other hand, if it is determined that the position is the closest end position, the process proceeds to step S407.

ステップS406における至近端方向への単調減少を調べる一例の処理について、図6のフローチャートを用いて説明する。先ず、ステップS601において、カウンタ変数としての値iを、スキャンポイントioを示す値ioに初期化する。   An example of the process for checking the monotonic decrease toward the closest end in step S406 will be described with reference to the flowchart of FIG. First, in step S601, a value i as a counter variable is initialized to a value io indicating a scan point io.

次のステップS602では、スキャンポイントiにおける焦点評価値の値d[i]から、スキャンポイントiより1スキャンポイント分至近端寄りのスキャンポイントi+1における焦点評価値の値d[i+1]を減じた値を、所定値SlopeThrと比較する。その結果、若し、d[i]−d[i+1]<SlopeThrであれば、至近端方向への単調減少は生じていないと判断し、至近端方向への単調減少をチェックする処理を終了し、処理は図4のステップS407に移行される。   In the next step S602, the focus evaluation value d [i + 1] at the scan point i + 1 that is closer to the nearest end from the scan point i by one scan point is subtracted from the focus evaluation value d [i] at the scan point i. The value is compared with a predetermined value SlopeThr. As a result, if d [i] −d [i + 1] <SlopeThr, it is determined that there is no monotonic decrease in the closest end direction, and a process of checking the monotonic decrease in the close end direction is performed. The process ends, and the process proceeds to step S407 in FIG.

一方、ステップS602で、d[i]−d[i+1]≧SlopeThrであれば、至近端方向への単調減少が生じていると判断し、処理はステップS603に移行される。ステップS603では、焦点評価値が一定値以上の傾きで傾斜している部分の長さ(山の幅)を表す変数Lと、単調減少区間における減少量を表す変数SLとを、以下の式(3)および式(4)に従い更新する。   On the other hand, if d [i] −d [i + 1] ≧ SlopeThr in step S602, it is determined that a monotonic decrease in the closest end direction has occurred, and the process proceeds to step S603. In step S603, a variable L that represents the length (mountain width) of the portion where the focus evaluation value is inclined with a slope equal to or greater than a certain value and a variable SL that represents the amount of decrease in the monotonically decreasing section are expressed by the following equations ( Update according to 3) and equation (4).

L = L+1 …(3)
SL= SL+(d[i]−d[i+1]) …(4)
L = L + 1 (3)
SL = SL + (d [i] -d [i + 1]) (4)

次のステップS604で、値iに1を加えた値を新たな値iとして、検出をする点を1スキャンポイント分、至近端側に移す。ステップS605では、スキャンポイントiがAFスキャンを行った所定範囲における至近端位置になったか否かをチェックする。値iがN、すなわち単調減少を検出する開始点がAFスキャンを行った所定範囲における至近端位置に達したと判断されたら(ステップS605)、至近端方向への単調減少をチェックする処理を終了する。   In the next step S604, a value obtained by adding 1 to the value i is set as a new value i, and the point to be detected is moved to the closest end by one scan point. In step S605, it is checked whether or not the scan point i has reached the closest end position in a predetermined range where the AF scan has been performed. When it is determined that the value i is N, that is, the start point for detecting the monotonic decrease has reached the closest end position in the predetermined range where the AF scan has been performed (step S605), a process for checking the monotonic decrease toward the close end Exit.

ステップS406では、以上のようにして、スキャンポイントioから至近端方向への単調減少をチェックする。ステップS406での処理が終了したら、処理はステップS407に移行される。   In step S406, the monotonic decrease from the scan point io toward the closest end is checked as described above. When the process in step S406 ends, the process proceeds to step S407.

説明は図4に戻り、ステップS407以降では、得られた焦点評価値が山状になっているか否かをステップS403〜ステップS406による処理の結果に基づき判断し、焦点評価値のピーク位置に基づき被写体の焦点調節が可能か否かを判定する。   Returning to FIG. 4, in step S407 and subsequent steps, it is determined whether or not the obtained focus evaluation value has a mountain shape based on the processing results in steps S403 to S406, and based on the peak position of the focus evaluation value. It is determined whether or not the subject can be focused.

ステップS407では、AFスキャンを行った所定範囲における至近端スキャンポイントnでの焦点評価値の値d[n]から、スキャンポイントnより1スキャンポイント分無限遠寄りのスキャンポイントn−1での焦点評価値の値d[n−1]が減じられる。そして、この減算結果が所定値SlopeThr以上であり、且つ、焦点評価値の最大値を与えるスキャンポイントioがスキャンを行った所定範囲における至近端であるか否かが判断される。   In step S407, from the focus evaluation value d [n] at the nearest end scan point n in the predetermined range in which the AF scan is performed, the scan point n-1 is closer to infinity by one scan point than the scan point n. The focus evaluation value d [n-1] is reduced. Then, it is determined whether or not the subtraction result is equal to or greater than the predetermined value SlopeThr, and the scan point io that gives the maximum focus evaluation value is the closest end in the predetermined range where the scan is performed.

若し、これらの条件を満たしていると判断されたら、焦点評価値のピーク位置に基づく被写体の焦点調節が不可能であるとされ、処理はステップS411に移行される。この場合、合焦位置が、AFスキャンを行った所定範囲よりも至近側の可能性があると考えられる。   If it is determined that these conditions are satisfied, it is determined that focus adjustment of the subject based on the peak position of the focus evaluation value is impossible, and the process proceeds to step S411. In this case, it is considered that the in-focus position may be close to the predetermined range where the AF scan is performed.

一方、当該減算結果が所定値SlopeThr以上でないか、または、スキャンポイントioがスキャンを行った所定範囲における至近端でないと判断されたら、処理はステップS408に移行される。   On the other hand, if it is determined that the subtraction result is not equal to or greater than the predetermined value SlopeThr or that the scan point io is not the closest end in the predetermined range where the scan is performed, the process proceeds to step S408.

ステップS408では、AFスキャンを行った所定範囲における遠側端スキャンポイント0での焦点評価値の値d[0]から、スキャンポイント0より1スキャンポイント分至近端寄りのスキャンポイント1での焦点評価値の値d[1]が減じられる。そして、この減算結果が所定値SlopeThr以上で、且つ、焦点評価値の最大値を与えるスキャンポイントioがスキャンを行った所定範囲における遠側端であるか否かが判断される。   In step S408, the focus at the scan point 1 that is one scan point closer to the near end than the scan point 0 from the focus evaluation value d [0] at the far end scan point 0 in the predetermined range in which the AF scan was performed. The evaluation value d [1] is reduced. Then, it is determined whether or not the subtraction result is equal to or greater than the predetermined value SlopeThr and the scan point io that gives the maximum focus evaluation value is the far end in the predetermined range where the scan is performed.

若し、これらの条件を満たしていると判断されたら、焦点評価値のピーク位置に基づく被写体の焦点調節が不可能であるとされ、処理はステップS411に移行される。この場合、合焦位置が、AFスキャンを行った所定範囲よりも無限遠側の可能性があると考えられる。   If it is determined that these conditions are satisfied, it is determined that focus adjustment of the subject based on the peak position of the focus evaluation value is impossible, and the process proceeds to step S411. In this case, it is considered that the in-focus position may be on the infinity side from the predetermined range where the AF scan is performed.

一方、当該減算結果が所定値SlopeThr以上でないか、または、スキャンポイントioがスキャンを行った所定範囲における遠端側でないと判断されたら、処理はステップS409に移行される。   On the other hand, if it is determined that the subtraction result is not equal to or greater than the predetermined value SlopeThr or that the scan point io is not on the far end side in the predetermined range where the scan is performed, the process proceeds to step S409.

ステップS409では、下記の判断がなされる。すなわち、一定値以上の傾きの傾斜部分の長さLが所定値Lo以上であり、且つ、傾斜している部分の傾斜の平均値SL/Lが所定値SLo/Lo以上であり、且つ、焦点評価値の最大値maxと最小値minとの差が所定値以上であるか否かが判断される。   In step S409, the following determination is made. That is, the length L of the inclined portion having an inclination equal to or greater than a certain value is not less than the predetermined value Lo, the average value SL / L of the inclination of the inclined portion is not less than the predetermined value SLo / Lo, and the focus It is determined whether or not the difference between the maximum value max and the minimum value min of the evaluation value is greater than or equal to a predetermined value.

若し、これらの条件を満たしていると判断されたら、焦点評価値のピーク位置から被写体の焦点調節が可能であるとされ、処理はステップS410に移行される。すなわち、この場合には、得られた焦点評価値がAFスキャンを行った所定範囲内で山状になっていると判断できる。   If it is determined that these conditions are satisfied, the focus of the subject can be adjusted from the peak position of the focus evaluation value, and the process proceeds to step S410. That is, in this case, it can be determined that the obtained focus evaluation value is mountain-shaped within a predetermined range in which AF scanning is performed.

一方、長さLが所定値Lo以上でないか、または、傾斜の平均値SL/Lが所定値SLo/Lo以上でないか、または、焦点評価値の最大値maxと最小値minの差が所定値以上でなければ、次の判断となる。すなわち、この場合、焦点評価値のピーク位置に基づく被写体の焦点調節が不可能であるとされる。この場合、処理はステップS411に移行される。すなわち、この場合には、得られた焦点評価値がAFスキャンを行った所定範囲内で山状になっていない可能性があると判断できる。   On the other hand, the length L is not equal to or greater than the predetermined value Lo, the average value SL / L of the inclination is not equal to or greater than the predetermined value SLo / Lo, or the difference between the maximum value max and the minimum value min of the focus evaluation value is the predetermined value. Otherwise, the next judgment is made. That is, in this case, the focus adjustment of the subject based on the peak position of the focus evaluation value is impossible. In this case, the process proceeds to step S411. That is, in this case, it can be determined that there is a possibility that the obtained focus evaluation value is not mountain-shaped within a predetermined range where AF scanning is performed.

次に、上述した図2のフローチャートにおけるステップS207による、焦点評価値形状判定の一例の処理について、図8のフローチャートを用いて説明する。図8の処理に先立って、今回のスイッチSW121のON時について、上述の図4のフローチャートにおけるステップS401〜ステップS406の処理を行う。これにより、焦点評価値の最大値maxおよび最小値minと、最大値maxを与えるフォーカスレンズ位置とを求めると共に、焦点評価値の山の幅を表す変数Lを求める。   Next, an example of focus evaluation value shape determination processing in step S207 in the flowchart of FIG. 2 described above will be described with reference to the flowchart of FIG. Prior to the processing of FIG. 8, the processing of steps S401 to S406 in the flowchart of FIG. Thereby, the maximum value max and the minimum value min of the focus evaluation value and the focus lens position that gives the maximum value max are obtained, and the variable L that represents the width of the peak of the focus evaluation value is obtained.

また、今回のスイッチSW121のON時について、焦点評価値の最大値と、焦点評価値の最大値の位置から傾斜が続いていると認められる範囲の至近側および遠端側の境界における焦点評価値のとの差分SL1および差分SL2がそれぞれ求められる。これらは、例えば図5または図6で説明した処理に基づき求めることができる。   In addition, when the switch SW121 is turned on this time, the focus evaluation value is the maximum value of the focus evaluation value and the focus evaluation value at the boundary on the near side and the far end side of the range where the inclination is recognized to be continued from the position of the maximum value of the focus evaluation value. A difference SL1 and a difference SL2 are obtained respectively. These can be obtained based on the processing described in FIG. 5 or FIG.

なお、前回のスイッチSW121のON時におけるこれら各値は、当該前回の処理の際に既に求められているので、これを保持しておくことで、今回の処理に用いることができる。   Note that these values when the previous switch SW121 is turned on are already obtained at the time of the previous processing, and can be used for the current processing by holding these values.

図8において、ステップS801で、前回のスイッチSW121のON時における、焦点評価値が一定値以上の傾きで傾斜している部分の長さ幅Lと、今回のスイッチSW121のON時における幅Lとの差分を求める。そして、この差分が所定値以上であるか否かが判断される。若し、所定値以上であると判断されれば、処理がステップS806に移行される。一方、幅Lの差分が所定値以上ではないと判断されれば、処理はステップS802に移行される。   In FIG. 8, in step S801, the length width L of the portion where the focus evaluation value is inclined with an inclination of a certain value or more when the switch SW121 is turned on last time, and the width L when the current switch SW121 is turned on. Find the difference between And it is judged whether this difference is more than predetermined value. If it is determined that the value is equal to or greater than the predetermined value, the process proceeds to step S806. On the other hand, if it is determined that the difference in width L is not greater than or equal to the predetermined value, the process proceeds to step S802.

ステップS802では、前回のスイッチSW121のON時における傾斜している部分の傾斜の平均値SL/Lと、今回のスイッチSW121のON時における平均値SL/Lとの差を求める。そして、この差分が所定値以上であるか否かが判断される。若し、所定値以上であると判断されれば、処理はステップS806に移行される。一方、平均値SL/Lの差分が所定値以上ではないと判断されれば、処理はステップS803に移行される。   In step S802, the difference between the average value SL / L of the inclined portion when the previous switch SW121 was turned on and the average value SL / L when the current switch SW121 was turned on is obtained. And it is judged whether this difference is more than predetermined value. If it is determined that the value is equal to or greater than the predetermined value, the process proceeds to step S806. On the other hand, if it is determined that the difference between the average values SL / L is not greater than or equal to the predetermined value, the process proceeds to step S803.

ステップS803では、前回のスイッチSW121のON時における焦点評価値の最大値maxと最小値minの差分max−minと、今回のスイッチSW121のON時における差分max−minとの差を求める。そして、この差分が所定値以上であるか否かが判断される。若し、所定値以上であると判断されれば、処理はステップS806に移行される。一方、差分max−minの差分が所定値以上ではないと判断されれば、処理はステップS804に移行される。   In step S803, the difference between the difference max-min between the maximum value max and the minimum value min of the focus evaluation value when the switch SW121 was previously turned on and the difference max-min when the switch SW121 was turned on this time is obtained. And it is judged whether this difference is more than predetermined value. If it is determined that the value is equal to or greater than the predetermined value, the process proceeds to step S806. On the other hand, if it is determined that the difference max-min is not greater than or equal to the predetermined value, the process proceeds to step S804.

ステップS804では、前回のスイッチSW121のON時の差分SL1および差分SL2の比SL1/SL2と、今回のスイッチSW121のON時の比SL1/SL2との差分が所定値以上であるか否かが判断される。若し、この差分が所定値以上であると判断されれば、処理はステップS806に移行される。一方、この差分が所定値以上ではないと判断されれば、処理はステップS805に移行される。   In step S804, it is determined whether or not the difference between the ratio SL1 / SL2 of the difference SL1 and the difference SL2 when the previous switch SW121 is ON and the ratio SL1 / SL2 when the current switch SW121 is ON is greater than or equal to a predetermined value. Is done. If it is determined that the difference is greater than or equal to the predetermined value, the process proceeds to step S806. On the other hand, if it is determined that the difference is not greater than or equal to the predetermined value, the process proceeds to step S805.

ステップS805では、今回のスイッチSW121のON時と前回のスイッチSW121のON時とで、焦点評価値の形状が同じであると判定される。一方、ステップS806では、今回のスイッチSW121のON時と前回のスイッチSW121のON時とで、焦点評価値の形状が異なると判定される。   In step S805, it is determined that the shape of the focus evaluation value is the same when the current switch SW121 is turned on and when the previous switch SW121 is turned on. On the other hand, in step S806, it is determined that the shape of the focus evaluation value differs between when the current switch SW121 is turned on and when the previous switch SW121 is turned on.

ステップS805またはステップS806による判定が行われると、処理は図2のステップS208に移行される。   When the determination in step S805 or step S806 is made, the process proceeds to step S208 in FIG.

なお、焦点評価値形状判定は、図8のフローチャートに従い行う方法に限られない。例えば、前回および今回のスイッチSW121のON時について、各フォーカスレンズ位置それぞれで焦点評価値の差分絶対値を取り、これを各フォーカスレンズ位置を通じて加算して焦点評価値の差分絶対値和とする。この差分絶対値和が所定値以上で、焦点評価値形状が異なると判定することが考えられる。   The focus evaluation value shape determination is not limited to the method performed according to the flowchart of FIG. For example, when the switch SW121 of the previous time and this time is ON, the difference absolute value of the focus evaluation value is obtained at each focus lens position, and this is added through each focus lens position to obtain the sum of absolute differences of the focus evaluation values. It may be determined that the sum of absolute differences is equal to or greater than a predetermined value and the focus evaluation value shapes are different.

次に、図2のフローチャートにおけるステップS217の撮影動作について、図9のフローチャートを用いてより具体的に説明する。先ず、ステップS901で、DRAM113の記憶容量がフルになっているか否かを示すフラグBfFlgを、フルになっていないことを示す値「FALSE」に設定する。   Next, the photographing operation in step S217 in the flowchart of FIG. 2 will be described more specifically with reference to the flowchart of FIG. First, in step S901, a flag BfFlg indicating whether or not the storage capacity of the DRAM 113 is full is set to a value “FALSE” indicating that it is not full.

次のステップS902で、システム制御部115は、画像処理部110から供給された画像データに基づき測光を行い、被写体輝度を測定する。次のステップS903で、システム制御部115は、ステップS902で測定した被写体輝度に応じてAE処理部103を制御してシャッタおよび絞りを駆動し、撮像素子108への露光を行う。撮像素子108面上に結像された光は、光電変換されてアナログ信号となり、撮像素子108の出力ノイズ除去や非線形処理などの前処理の後にA/D変換部109に供給され、デジタル信号に変換される(ステップS904)。   In the next step S902, the system control unit 115 performs photometry based on the image data supplied from the image processing unit 110, and measures the subject brightness. In the next step S903, the system control unit 115 controls the AE processing unit 103 in accordance with the subject brightness measured in step S902 to drive the shutter and the diaphragm, thereby performing exposure to the image sensor 108. The light imaged on the surface of the image sensor 108 is photoelectrically converted into an analog signal, which is supplied to the A / D converter 109 after pre-processing such as output noise removal and nonlinear processing of the image sensor 108 to be converted into a digital signal. Conversion is performed (step S904).

A/D変換部109の出力に対して、WB処理部111により画像処理部110でホワイトバランス調整を施し、適正な出力画像データとする(ステップS905)。画像処理部110から出力された画像データは、フォーマット変換部112でJPEGフォーマットなど所定のフォーマットに変換され(ステップS906)、DRAM113に一時的に記憶される。次のステップS907で、DRAM113の記憶容量がフルになっているか否かが調べられる。   The output of the A / D conversion unit 109 is subjected to white balance adjustment by the image processing unit 110 by the WB processing unit 111 to obtain appropriate output image data (step S905). The image data output from the image processing unit 110 is converted into a predetermined format such as a JPEG format by the format conversion unit 112 (step S906) and temporarily stored in the DRAM 113. In the next step S907, it is checked whether or not the storage capacity of the DRAM 113 is full.

若し、DRAM113がフルになっていると判断されたら、処理はステップS908に移行され、上述のフラグBfFlgを、DRAM113の記憶容量がフルになっていることを示す値「TRUE」に設定する。そして、次のステップS909で、DRAM113に一時的に記憶された画像データを、画像記録部114にてこの電子スチルカメラ100の図示されない内蔵メモリや、電子スチルカメラ100装着されたメモリカードなどの外部記憶媒体へと転送し記憶する。   If it is determined that the DRAM 113 is full, the process proceeds to step S908, and the above-described flag BfFlg is set to a value “TRUE” indicating that the storage capacity of the DRAM 113 is full. In the next step S909, the image data temporarily stored in the DRAM 113 is stored in an external memory such as a built-in memory (not shown) of the electronic still camera 100 or a memory card mounted with the electronic still camera 100 in the image recording unit 114. Transfer to a storage medium and store.

一方、ステップS907で、DRAM113の記憶容量がフルになっていないと判断されたら、一連の撮影動作が終了される。この場合、DRAM113に記憶された画像データは、次以降になされた撮影によりDRAM113の記憶容量がフルになった場合や、操作部118に対するユーザ操作に応じて、画像記録部114により所定の記録媒体に記録される。   On the other hand, if it is determined in step S907 that the storage capacity of the DRAM 113 is not full, a series of shooting operations is terminated. In this case, the image data stored in the DRAM 113 is stored in a predetermined recording medium by the image recording unit 114 when the storage capacity of the DRAM 113 becomes full due to the subsequent shooting or according to a user operation on the operation unit 118. To be recorded.

以上説明したように、本発明の実施形態によれば、AFスキャンを行う毎に、前回のAFスキャンによる焦点評価値を加算するかどうかを判断し、加算すべきであると判断したときにのみ焦点評価値を加算するようにしている。そのため、合焦制御を、適切な焦点評価値が累積された累積評価値を用いて行えるため、合焦制御の精度が向上する。また、多数回のAFスキャンによる焦点評価値を累積加算することができるため、S/N比が向上され、これによっても主被写体への合焦精度を向上させることができる。   As described above, according to the embodiment of the present invention, each time an AF scan is performed, it is determined whether or not the focus evaluation value from the previous AF scan is to be added, and only when it is determined that the addition should be performed. The focus evaluation value is added. Therefore, since the focus control can be performed using the accumulated evaluation value obtained by accumulating appropriate focus evaluation values, the accuracy of the focus control is improved. In addition, since the focus evaluation values obtained by many AF scans can be cumulatively added, the S / N ratio is improved, and this can also improve the focusing accuracy on the main subject.

本発明を適用可能な電子スチルカメラの一例の構成を示すブロック図である。It is a block diagram which shows the structure of an example of the electronic still camera which can apply this invention. 本発明の実施形態による自動合焦処理の全体的な流れを示す一例のフローチャートである。It is a flowchart of an example which shows the whole flow of the automatic focusing process by embodiment of this invention. シーン判定処理を示す一例のフローチャートである。It is a flowchart of an example which shows a scene determination process. 合焦判定処理の全体的な流れを示す一例のフローチャートである。It is an example flowchart which shows the whole flow of a focusing determination process. 無限遠方向への単調減少を調べる一例の処理を示すフローチャートである。It is a flowchart which shows an example of a process which investigates the monotonous decrease | decrease to an infinite direction. 至近端方向への単調減少を調べる一例の処理を示すフローチャートである。It is a flowchart which shows an example of a process which investigates the monotone decrease to a near end direction. 焦点評価値の一例の形状を示す図である。It is a figure which shows the shape of an example of a focus evaluation value. 焦点評価値形状判定の一例の処理を示すフローチャートである。It is a flowchart which shows a process of an example of focus evaluation value shape determination. 撮像動作の一例の処理を示すフローチャートである。It is a flowchart which shows the process of an example of imaging operation.

符号の説明Explanation of symbols

100 電子スチルカメラ
104 フォーカスレンズ
105 AF処理部
108 撮像素子
109 A/D変換部
110 画像処理部
113 DRAM
115 システム制御部
121 スイッチSW
122 スイッチSW
123 顔検出モジュール
124 動体検出部
125 角速度センサ部
DESCRIPTION OF SYMBOLS 100 Electronic still camera 104 Focus lens 105 AF process part 108 Image pick-up element 109 A / D conversion part 110 Image processing part 113 DRAM
115 System control unit 121 Switch SW
122 Switch SW
123 face detection module 124 moving object detection unit 125 angular velocity sensor unit

Claims (12)

フォーカスレンズを含む撮像光学系を介して撮像素子に入射された光が光電変換された撮像信号に基づき焦点評価値を取得するようにされ、該焦点評価値を用いて該フォーカスレンズの合焦位置を求める自動合焦装置であって、
前記フォーカスレンズを所定範囲内で移動させながら移動位置ごとの前記焦点評価値を取得する焦点評価値取得手段と、
前記焦点評価値取得手段で取得された前記焦点評価値を前記移動位置ごとに累積加算する累積手段と、
前記累積手段で累積加算された前記焦点評価値を用いて前記フォーカスレンズの合焦位置を求める合焦手段と、
前記焦点評価値取得手段で前記焦点評価値の取得を行う第1の取得動作の際の撮影条件が、該取得の1回前に前記焦点評価値取得手段で前記焦点評価値の取得を行った第2の取得動作の際の撮影条件から変化したか否かを検出する変化検出手段と、
前記変化検出手段で前記撮影条件が変化したことが検出されたら、前記累積手段を制御して、前記累積加算された前記焦点評価値を初期化してから前記第1の取得動作で取得された前記焦点評価値を累積加算させる制御手段と
を有する
ことを特徴とする自動合焦装置。
A focus evaluation value is obtained based on an imaging signal obtained by photoelectrically converting light incident on the image sensor via an imaging optical system including a focus lens, and the focus position of the focus lens is obtained using the focus evaluation value. An automatic focusing device for
Focus evaluation value acquisition means for acquiring the focus evaluation value for each moving position while moving the focus lens within a predetermined range;
Accumulating means for accumulating the focus evaluation value acquired by the focus evaluation value acquiring means for each moving position;
Focusing means for obtaining a focus position of the focus lens using the focus evaluation value cumulatively added by the accumulating means;
In the first acquisition operation in which the focus evaluation value acquisition unit acquires the focus evaluation value, the focus evaluation value is acquired by the focus evaluation value acquisition unit one time before the acquisition. Change detecting means for detecting whether or not the photographing condition during the second acquisition operation has changed;
When the change detecting unit detects that the photographing condition has changed, the accumulating unit is controlled to initialize the cumulatively added focus evaluation value, and then acquired in the first acquisition operation. An automatic focusing apparatus comprising: a control unit that cumulatively adds focus evaluation values.
前記変化検出手段は、
前記第2の取得動作の際の撮影シーンに対して、前記第1の取得動作の際の撮影シーンが変化していると判断される場合に、前記撮影条件が変化したと検出する
ことを特徴とする請求項1に記載の自動合焦装置。
The change detecting means includes
When it is determined that the shooting scene in the first acquisition operation has changed with respect to the shooting scene in the second acquisition operation, it is detected that the shooting condition has changed. The automatic focusing device according to claim 1.
前記変化検出手段は、
前記撮像信号の、前記第1の取得動作の際の輝度成分と前記第2の取得動作の際の輝度成分とに基づき前記撮影シーンの変化を検出する
ことを特徴とする請求項2に記載の自動合焦装置。
The change detecting means includes
The change in the shooting scene is detected based on a luminance component in the first acquisition operation and a luminance component in the second acquisition operation of the imaging signal. Automatic focusing device.
前記撮像信号に基づき該撮像信号による画像の動き量を検出する画像動き量検出手段をさらに有し、
前記変化検出手段は、
前記画像動き量検出手段により検出された、前記第2の取得動作から前記第1の取得動作までの前記動き量に基づき前記撮影シーンの変化を検出する
ことを特徴とする請求項2または請求項3に記載の自動合焦装置。
An image motion amount detecting means for detecting a motion amount of the image based on the image signal based on the image signal;
The change detecting means includes
The change in the photographic scene is detected based on the amount of motion detected by the image motion amount detection unit from the second acquisition operation to the first acquisition operation. 3. The automatic focusing device according to 3.
当該自動合焦装置が搭載される撮像装置の動き量を検出する装置動き量検出手段をさらに有し、
前記変化検出手段は、
前記装置動き量検出手段により検出された前記動き量に基づき前記撮影シーンの変化を検出する
ことを特徴とする請求項2乃至請求項4の何れか1項に記載の自動合焦装置。
It further has a device movement amount detection means for detecting the movement amount of the imaging device on which the automatic focusing device is mounted,
The change detecting means includes
5. The automatic focusing device according to claim 2, wherein a change in the shooting scene is detected based on the amount of motion detected by the device motion amount detection unit. 6.
前記撮像信号による画像に対して顔検出を行う顔検出手段をさらに有し、
前記変化検出手段は、
前記顔検出手段による前記第1の取得動作の際の前記顔検出の結果と前記第2の取得動作の際の前記顔検出の結果とに基づき前記撮影シーンの変化を検出する
ことを特徴とする請求項2乃至請求項5の何れか1項に記載の自動合焦装置。
Further comprising face detection means for performing face detection on an image based on the imaging signal;
The change detecting means includes
A change in the photographing scene is detected based on the result of the face detection during the first acquisition operation by the face detection unit and the result of the face detection during the second acquisition operation. The automatic focusing device according to any one of claims 2 to 5.
前記変化検出手段は、撮影に際してユーザの指示に応じてなされる撮影設定が、前記第2の取得動作を行ったときと、前記第1の取得動作を行ったときとで変化している場合に、前記撮影条件が変化したと検出する
ことを特徴とする請求項1乃至請求項6の何れか1項に記載の自動合焦装置。
The change detection unit is configured to change a shooting setting according to a user instruction during shooting between the time when the second acquisition operation is performed and the time when the first acquisition operation is performed. The automatic focusing device according to claim 1, wherein it is detected that the photographing condition has changed.
前記変化検出手段は、
前記第2の取得動作を行ってから、前記第1の取得動作を行うまでの時間間隔が所定時間以上であれば、前記撮影条件が変化したと見なす
ことを特徴とする請求項1乃至請求項7の何れか1項に記載の自動合焦装置。
The change detecting means includes
The imaging condition is considered to have changed if a time interval from the execution of the second acquisition operation to the execution of the first acquisition operation is a predetermined time or more. 8. The automatic focusing device according to any one of 7 above.
前記変化検出手段は、
前記第2の取得動作で取得された前記焦点評価値による形状に対して、前記第1の取得動作で取得された前記焦点評価値による形状が変化していると判断した場合に、前記撮影条件が変化したと検出する
ことを特徴とする請求項1乃至請求項8の何れか1項に記載の自動合焦装置。
The change detecting means includes
When it is determined that the shape based on the focus evaluation value acquired in the first acquisition operation has changed with respect to the shape based on the focus evaluation value acquired in the second acquisition operation, the imaging condition The automatic focusing device according to claim 1, wherein it is detected that the change has occurred.
前記制御手段は、
前記焦点評価値取得手段を制御して当該自動合焦装置が搭載される撮像装置に対するユーザの指示に応じて前記焦点評価値の取得を行わせる
ことを特徴とする請求項1乃至請求項9の何れか1項に記載の自動合焦装置。
The control means includes
10. The focus evaluation value acquisition unit is controlled to cause the focus evaluation value to be acquired in accordance with a user instruction to an imaging apparatus on which the automatic focusing device is mounted. The automatic focusing device according to any one of claims.
フォーカスレンズを含む撮像光学系を介して撮像素子に入射された光が光電変換された撮像信号に基づき焦点評価値を取得するようにされ、該焦点評価値を用いて該フォーカスレンズの合焦位置を求める自動合焦方法であって、
前記フォーカスレンズを所定範囲内で移動させながら移動位置ごとの前記焦点評価値を取得する焦点評価値取得ステップと、
前記焦点評価値取得ステップで取得された前記焦点評価値を前記移動位置ごとに累積加算する累積ステップと、
前記累積ステップで累積加算された前記焦点評価値を用いて前記フォーカスレンズの合焦位置を求める合焦ステップと、
前記焦点評価値取得ステップで前記焦点評価値の取得を行う第1の取得動作の際の撮影条件が、該取得の1回前に前記焦点評価値取得ステップで前記焦点評価値の取得を行った第2の取得動作の際の撮影条件から変化したか否かを検出する変化検出ステップと、
前記変化検出ステップで前記撮影条件が変化したことが検出されたら、前記累積ステップを制御して、前記累積加算された前記焦点評価値を初期化してから前記第1の取得動作で取得された前記焦点評価値を累積加算させる制御ステップと
を有する
ことを特徴とする自動合焦方法。
A focus evaluation value is obtained based on an imaging signal obtained by photoelectrically converting light incident on the image sensor via an imaging optical system including a focus lens, and the focus position of the focus lens is obtained using the focus evaluation value. An automatic focusing method for
A focus evaluation value acquisition step of acquiring the focus evaluation value for each moving position while moving the focus lens within a predetermined range;
A cumulative step of cumulatively adding the focus evaluation value acquired in the focus evaluation value acquisition step for each moving position;
A focusing step for obtaining a focus position of the focus lens using the focus evaluation value accumulated and added in the accumulation step;
In the first acquisition operation for acquiring the focus evaluation value in the focus evaluation value acquisition step, the focus evaluation value is acquired in the focus evaluation value acquisition step one time before the acquisition. A change detection step for detecting whether or not the shooting condition during the second acquisition operation has changed;
If it is detected in the change detection step that the photographing condition has changed, the accumulation step is controlled to initialize the cumulatively added focus evaluation value, and then acquired in the first acquisition operation. And a control step for accumulating and adding focus evaluation values.
請求項1乃至請求項10の何れか1項に記載の自動合焦装置を搭載したことを特徴とする撮像装置。   An imaging apparatus comprising the automatic focusing device according to any one of claims 1 to 10.
JP2008227450A 2008-09-04 2008-09-04 Automatic focusing device and method Withdrawn JP2010060932A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008227450A JP2010060932A (en) 2008-09-04 2008-09-04 Automatic focusing device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008227450A JP2010060932A (en) 2008-09-04 2008-09-04 Automatic focusing device and method

Publications (1)

Publication Number Publication Date
JP2010060932A true JP2010060932A (en) 2010-03-18

Family

ID=42187789

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008227450A Withdrawn JP2010060932A (en) 2008-09-04 2008-09-04 Automatic focusing device and method

Country Status (1)

Country Link
JP (1) JP2010060932A (en)

Similar Documents

Publication Publication Date Title
US20190086768A1 (en) Automatic focusing apparatus and control method therefor
JP4979507B2 (en) Imaging apparatus and imaging method
US8300137B2 (en) Image sensing apparatus providing driving direction of focus lens for attaining in-focus state and control method therefor
US7991280B2 (en) Focus adjusting apparatus and focus adjusting method
JP2010015024A (en) Image pickup apparatus, control method thereof, program and storage medium
JP6518452B2 (en) Imaging apparatus and imaging method
US8103158B2 (en) Image sensing apparatus and control method thereof
US20030197803A1 (en) Camera
JP5056168B2 (en) Focus adjustment device and imaging device
JP3820076B2 (en) Automatic focusing device, digital camera, portable information input device, focusing position detection method, and computer-readable recording medium
US20080018777A1 (en) Image pickup apparatus and image pickup control method
JP2018137613A (en) Image processing apparatus, imaging apparatus and control method for image processing apparatus
JP2007057974A (en) Photographing device
JP4871231B2 (en) Imaging apparatus and imaging method
JP2007328360A (en) Automatic focusing camera and photographing method
JP5169542B2 (en) Electronic camera
JP2006293383A (en) Automatic focusing device, digital camera, portable information input device, method for detecting focusing position, and computer-readable storage medium
JP2006157604A (en) Camera apparatus and automatic photographing control program
JP5030883B2 (en) Digital still camera and control method thereof
JP2006065337A (en) Automatic focusing device, camera, portable information input device, focused position detecting method, and recording medium readable by computer
JP2010060932A (en) Automatic focusing device and method
JP4779383B2 (en) Digital camera
JP5069076B2 (en) Imaging apparatus and continuous imaging method
JP5420034B2 (en) Imaging apparatus, control method therefor, program, and storage medium
JP4574726B2 (en) Imaging apparatus and automatic focusing control method

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20111206