JP4320767B2 - Automatic focusing apparatus and method - Google Patents

Automatic focusing apparatus and method Download PDF

Info

Publication number
JP4320767B2
JP4320767B2 JP2000263355A JP2000263355A JP4320767B2 JP 4320767 B2 JP4320767 B2 JP 4320767B2 JP 2000263355 A JP2000263355 A JP 2000263355A JP 2000263355 A JP2000263355 A JP 2000263355A JP 4320767 B2 JP4320767 B2 JP 4320767B2
Authority
JP
Japan
Prior art keywords
lens
evaluation value
focus
search
focus adjustment
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.)
Expired - Fee Related
Application number
JP2000263355A
Other languages
Japanese (ja)
Other versions
JP2002072073A (en
Inventor
彰久 山崎
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.)
Fujifilm Corp
Original Assignee
Fujifilm Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2000263355A priority Critical patent/JP4320767B2/en
Publication of JP2002072073A publication Critical patent/JP2002072073A/en
Application granted granted Critical
Publication of JP4320767B2 publication Critical patent/JP4320767B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は自動焦点調節装置及びその方法に係り、特に、撮像素子からの出力信号に基づいて、画像の高周波成分を検出し、その検出結果を利用してオートフォーカス(AF)制御を行う技術に関する。
【0002】
【従来の技術】
被写体を撮像し、その映像信号を出力するビデオカメラでは、撮影光学系のうち焦点調節に作用するフォーカスレンズを移動させながら撮像を行い、その出力映像信号から高周波成分を抽出して合焦のための評価値を算出する。フォーカスレンズの移動の結果、評価値が増加する場合には同方向に駆動し続け、反対にレンズ移動に伴い評価値が減少する場合には、逆方向に駆動して評価値のピークを探すという、いわゆる「山登りサーボ方式」が採用されている。
【0003】
また、デジタルスチルカメラにおいては、被写体の至近から無限遠距離までフォーカスレンズを駆動し、評価値が最大になるところに、フォーカスレンズを駆動して合焦させる「コントラストAF方式」が採用されている。評価値の取得結果から合焦状態を検出するものとして、撮像信号の最大値と最小値からローコントラストであるか否かを判断するもの(特開平6−125493号公報)や、評価値が連続して減少したことを検知して合焦位置(ピーク位置)を決定するもの(特開2000−152065号公報)が提案されている。
【0004】
【発明が解決しようとする課題】
しかしながら、従来提案されている方法では、フォーカスエリア内に距離の異なる複数の被写体が存在した場合に、評価値のピークが複数発生することがあり、評価値のピーク付近の減少傾向からだけでは、正確な合焦位置を判断できないという問題がある。
【0005】
本発明はこのような事情に鑑みてなされたもので、距離の異なる複数の被写体が存在する場合にも高速で正確なピント合わせが可能な自動焦点調節装置及び方法を提供することを目的とする。
【0006】
【課題を解決するための手段】
本発明は前記目的を達成するために、撮像手段から出力される画像信号に基づいて、前記撮像手段に被写体の像を結像させるレンズの焦点位置を調節する自動焦点調節装置において、該装置は、前記レンズを焦点調節領域内で移動させるレンズ移動手段と、前記撮像手段から出力される画像信号から前記被写体のコントラスト成分を抽出し、該コントラスト成分に応じた評価値を前記レンズの各移動位置毎に算出する評価値算出手段と、前記評価値を取得するための各位置に前記レンズを移動させるように前記レンズ移動手段を制御する制御手段と、前記焦点調節領域の端点から所定量w以上離れたレンズ位置での前記評価値の変化を検出する評価値変化検出手段と、前記評価値算出手段で得た各位置での評価値及び前記評価値変化検出手段の検出結果に基づいて合焦状態を判断する判断手段と、を備え、静止画撮影における自動焦点調節において、前記制御手段は、前記焦点調節領域の一方の端点から前記レンズを移動させ、前記レンズの移動とともに取得した評価値の増減からピークがあることが検出された後にさらに評価値の取得を行うために前記レンズを移動させ、該ピークが検出された前記レンズの位置から一定量dだけ離れたレンズ位置での評価値が所定の閾値以下であると前記レンズの移動の中断を決定し、該レンズ位置での評価値が所定の閾値を超えていると前記レンズの移動の継続を決定し、前記レンズの移動を継続する場合には前記焦点調節領域の他方の端点までの残りの検出量が前記所定量w以上であると該評価値取得処理の継続を決定し、前記残りの検出量が前記所定量w未満であり、前記焦点調節領域の端点から所定量w離れた前記レンズ位置における前記評価値の増加傾向が検出されないときには前記レンズの移動の中断を決定し、前記評価値の増加傾向が検出されたときは前記レンズの移動の継続を決定し、前記判断手段は、前記評価値のピークが複数検出されたときには、前記評価値の最大値が検出された前記レンズ位置を合焦位置と判断し、前記レンズ移動手段は該合焦位置に前記レンズを移動させることを特徴としている。
【0007】
すなわち、焦点調節を行うためのレンズ(フォーカスレンズ)を焦点調節範囲内で移動させながら、各位置で評価値を取得する。評価値のピークが検出されてから、そのピーク位置から一定量以上離れたレンズ位置での評価値を基準にして当該ピーク判定の適否を評価することにより、AFの高速化を達成できるとともに、距離の異なる複数の被写体が存在する場合にも正確なピント合わせが可能となり、いわゆる「ピント抜け」を防止できる
【0008】
すなわち、前記判断手段は、前記ピークが得られたレンズ位置から一定量d離れた位置での評価値と、予め定められている所定の閾値とを比較し、当該評価値が前記閾値以下のときは、前記評価値のピークが得られたレンズ位置又はその近傍位置で合焦状態が得られると判断することができる
【0009】
評価値が最大となる位置(ピーク位置)から一定量離れたレンズ位置での評価値が閾値よりも大きいときは、複数の被写体があると判断でき、評価値の取得動作(AFサーチ)を継続することにより、正確な焦点調節が可能になる。また、ピーク位置から一定量離れたレンズ位置での評価値が閾値以下であれば、その先に被写体が存在しないと判断でき、その時点でAFサーチを中断することによってAF処理の高速化を図ることができる。また、焦点調節範囲の端点から所定量w離れた位置における評価値が増加傾向でなければその先に被写体は存在しないと判断して、レンズを合焦位置(評価値の最大値が得られたレンズ位置)に移動させることで、端点までレンズを移動させることなく合焦状態を得ることができ、自動焦点調節の高速化を図ることができる。
【0010】
本発明の他の態様によれば、前記制御手段は、前記焦点調節領域内において前記評価値を取得するレンズ位置の間隔が比較的大きい第1のサーチ動作と、前記第1のサーチ制御時よりも小さい間隔で前記評価値を取得する第2のサーチ動作と、を実行する機能を有し、前記判断手段は、前記第1のサーチ動作時に前記判断を行うことを特徴としている。
【0011】
すなわち、先ず、サーチポイントの間隔(サーチステップ)が大きい第1のサーチ動作(ラフサーチ)を行い、その結果得られたピーク付近をサーチステップの小さい第2のサーチ動作(詳細サーチ)で詳細にサーチすることにより、正確な合焦位置を得る。このような制御方式を採用する場合には、サーチステップの大きな第1のサーチ動作において前記判断手段による合焦判断を行うことにより、不要なサーチ範囲を省略でき、AF処理の高速化を達成できる。
【0012】
また、請求項1に記載の自動焦点調節装置を含む電子カメラも好ましい
【0015】
前記目的を達成する自動焦点調節方法を提供すべく本発明は、撮像手段から出力される画像信号に基づいて、前記撮像手段に被写体の像を結像させるレンズの焦点位置を調節する自動焦点調節方法において、該方法は、前記レンズを焦点調節領域内で移動させるレンズ移動工程と、前記撮像手段から出力される画像信号から前記被写体のコントラスト成分を抽出し、該コントラスト成分に応じた評価値を前記レンズの各移動位置毎に算出する評価値算出工程と、前記評価値を取得するための各位置に前記レンズを移動させるように前記レンズ移動手段を制御する制御工程と、前記焦点調節領域の端点から所定量w以上離れたレンズ位置での前記評価値の変化を検出する評価値変化検出工程と、前記評価値算出手段で得た各位置での評価値及び前記評価値変化検出手段の検出結果に基づいて合焦状態を判断する判断工程と、を含み、静止画撮影における自動焦点調節において、前記制御工程は、前記焦点調節領域の一方の端点から前記レンズを移動させ、前記レンズの移動とともに取得した評価値の増減からピークがあることが検出された後にさらに評価値の取得を行うために前記レンズを移動させ、該ピークが検出された前記レンズの位置から一定量dだけ離れたレンズ位置での評価値が所定の閾値以下であると前記レンズの移動の中断を決定し、該レンズ位置での評価値が所定の閾値を超えていると前記レンズの移動の継続を決定し、前記レンズの移動を継続する場合には前記焦点調節領域の他方の端点までの残りの検出量が前記所定量w以上であると該評価値取得処理の継続を決定し、前記残りの検出量が前記所定量w未満であり、前記焦点調節領域の端点から所定量w離れた前記レンズ位置における前記評価値の増加傾向が検出されないときには前記レンズの移動の中断を決定し、前記評価値の増加傾向が検出されたときは前記レンズの移動の継続を決定し、前記判断工程は、前記評価値のピークが複数検出されたときには、前記評価値の最大値が検出された前記レンズ位置を合焦位置と判断し、該合焦位置に前記レンズを移動させることを特徴としている。
【0016】
【発明の実施の形態】
以下添付図面に従って本発明に係る自動焦点調節装置及び方法の好ましい実施の形態について説明する。
【0017】
図1は、本発明が適用されたデジタルカメラの外観図である。このデジタルカメラ10の前面には、撮影レンズ12、ファインダー窓14、ストロボ発光部16が設けられ、カメラ上面には、シャッターボタン18及び電源スイッチ20が配設されている。また、グリップ部22と反対側のカメラ側面には、メモリカード24を装着するためのカードスロット26が設けられている。
【0018】
撮影レンズ12にはズームレンズが適用され、撮影レンズ12の後方にCCDイメージセンサ(図1中不図示、図3において符号52として記載)が配置されている。シャッターボタン18は2段階式に構成され、シャッターボタン18を軽く押して止める「半押し」の状態で自動ピント合わせ(AF)及び自動露出制御(AE)が作動してAFとAEをロックし、「半押し」から更に押し込む「全押し」の状態で撮影が実行される。
【0019】
電源スイッチ20は、モード切換スイッチと兼用されており、電源OFFとなる「OFF位置」、静止画撮影モードで電源ONとなる「撮影ON位置」、及び再生モードで電源ONとなる「再生ON位置」の3ポジションを切り換えることができる。なお、本例のような電源スイッチ(以下、電源兼用モードスイッチという。)20に代えて、電源ON/OFFのみの電源スイッチと、静止画撮影モード及び再生モードを切り換えるモードダイヤル等のモード切換手段を設けてもよい。
【0020】
図2は、デジタルカメラ10の背面側外観図である。デジタルカメラ10の背面には、ファインダー28、液晶モニタ30、ズームスイッチ32、多機能の十字ボタン34、AEロックボタン36、メニューキー38、実行キー40及びキャンセルキー42が設けられている。液晶モニタ30は、撮影時に画角確認用の電子ファインダーとして使用できるとともに、撮影した画像のプレビュー画やメモリカード24から読み出した再生画像等を表示可能な表示手段である。また、十字ボタン34を使用したメニューの選択や各メニューにおける各種項目の設定なども液晶モニタ30の表示画面を用いて行われる。
【0021】
ズームスイッチ32は、上下方向に操作可能なレバースイッチで構成され、該スイッチを上方向に操作することで望遠(TELE)方向にズーム移動し、下方向に操作することで広角(WIDE)方向にズーム移動する。十字ボタン34は、上下左右のいずれかの縁部を押圧することによって、対応する4方向(上、下、左、右)の指示を入力できるようにしたもので、メニュー画面における各種設定項目の選択や設定内容の変更を指示する操作ボタンとして使用されるとともに、電子ズームの倍率調整や再生コマの送り/戻しを指示する手段として用いられる。
【0022】
メニューキー38は、各モードの通常画面からメニュー画面へ遷移させる時に使用される。実行キー40は、選択内容の確定、処理の実行(確認)指示の時などに使用される。キャンセルキー42は、メニューから選んだ項目の取消(キャンセル)や一つ前の操作状態に戻る時などに使用される。
【0023】
撮影者は、ファインダー28又は液晶モニタ30に映し出されるリアルタイム画像(スルー画)を確認しながら、ズームスイッチ32を操作して画角を決定し、シャッターボタン18を押下して撮影を行う。
【0024】
図3は、デジタルカメラ10の内部構成を示すブロック図である。撮影レンズ12は、固定レンズ44、変倍レンズ46A、補正レンズ46B及びフォーカスレンズ48の4群型インナーフォーカス式ズームレンズで構成されている。
【0025】
変倍レンズ46Aと補正レンズ46Bは、図示せぬカム機構によって両者の位置関係が規制されながら光軸に沿って移動し、焦点距離を変更する。なお、説明の便宜上、変倍レンズ46Aと補正レンズ46Bから成る変倍光学系を「ズームレンズ46」と呼ぶことにする。
【0026】
撮影レンズ12を通過した光は、絞り50により光量が調節された後、CCDイメージセンサ(以下、CCDという。)52に入射する。CCD52の受光面には、フォトセンサが平面的に配列されており、撮影レンズ12を介してCCD52の受光面に結像された被写体像は、各フォトセンサによって入射光量に応じた量の信号電荷に変換される。なお、CCD52は、シャッターゲートパルスのタイミングによって各フォトセンサの電荷蓄積時間(シャッタースピード)を制御する、いわゆる電子シャッター機能を有している。
【0027】
各フォトセンサに蓄積された信号電荷は、CCDドライバ54から与えられるパルスに基づいて信号電荷に応じた電圧信号(画像信号)として順次読み出される。CCD52から出力された画像信号は、アナログ処理部56に送られる。アナログ処理部56は、サンプリングホールド回路、色分離回路、ゲイン調整回路等の信号処理回路を含み、このアナログ処理部56において、相関二重サンプリング(CDS)処理並びにR,G,Bの各色信号に色分離処理され、各色信号の信号レベルの調整(プリホワイトバランス処理)が行われる。
【0028】
アナログ処理部56から出力された信号は、A/D変換器58によりデジタル信号に変換された後、メモリ60に格納される。タイミングジェネレータ(TG)62は、CPU64の指令に従ってCCDドライバ54、アナログ処理部56及びA/D変換器58に対してタイミング信号を与えており、このタイミング信号によって各回路の同期がとられている。
【0029】
メモリ60に格納されたデータは、バス66を介して信号処理部68に送られる。信号処理部68は、輝度・色差信号生成回路、ガンマ補正回路、シャープネス補正回路、コントラスト補正回路、ホワイトバランス補正回路等を含むデジタルシグナルプロセッサ(DSP)で構成された画像処理手段であり、CPU64からのコマンドに従って画像信号を処理する。
【0030】
信号処理部68に入力された画像データは、輝度信号(Y信号)及び色差信号(Cr,Cb 信号)に変換されるとともに、ガンマ補正等の所定の処理が施された後、メモリ60に格納される。撮影画像を表示出力する場合、メモリ60から画像データが読み出され、表示用メモリ70に転送される。表示用メモリ70に記憶されたデータは、表示用の所定方式の信号(例えば、NTSC方式のカラー複合映像信号)に変換された後、D/A変換器72を介して液晶モニタ(LCD)30に出力される。こうして、当該画像データの画像内容が液晶モニタ30の画面上に表示される。
【0031】
CCD52から出力される画像信号によってメモリ60内の画像データが定期的に書き換えられ、その画像データから生成される映像信号が液晶モニタ30に供給されることにより、CCD52を介して入力する画像がリアルタイムに液晶モニタ30に表示される。撮影者は、液晶モニタ30に映し出される画像(スルー画)、或いは光学式のファインダー28によって撮影画角を確認することができる。
【0032】
撮影者がズームスイッチ32を操作すると、その指示信号がCPU64に入力され、CPU64はズームスイッチ32からの信号に基づいてズーム駆動部74を制御してズームレンズ46をテレ(TELE)方向又はワイド(WIDE)方向に移動させる。ズーム駆動部74は図示せぬモータを含み、該モータの駆動力によってズームレンズ46が駆動される。ズームレンズ46の位置(ズーム位置)は、ズーム位置センサ76によって検出され、該センサ76の検出信号はCPU64に入力される。
【0033】
同様に、フォーカス駆動部78は図示せぬモータを含み、該モータの駆動力によってフォーカスレンズ48が光軸に沿って前後動する。フォーカスレンズ48の位置(フォーカス位置)は、フォーカス位置センサ80によって検出され、該センサ80の検出信号はCPU64に入力される。
【0034】
電源兼用モードスイッチ20によって静止画撮影モードが設定され、シャッターボタン18が押下されると、撮影開始指示(レリーズON)信号が発せられる。CPU64は、レリーズON信号を検知して記録用の撮像動作を実行する。すなわち、CPU64は、後述する評価値演算の結果に基づいてフォーカス駆動部78を制御してフォーカスレンズ48を合焦位置に移動させるとともに、絞り50の開口径やCCD52の電子シャッターを制御することにより露出制御を行う。また、CPU64は必要に応じてストロボ制御回路82にコマンドを送り、スロトボ発光部16の発光を制御する。
【0035】
こうして、シャッターボタン18の押下操作に応動して、記録用の画像データの取り込みが開始される。画像データを圧縮記録するモードが選択されている場合、CPU64は圧縮伸張回路84にコマンドを送る。圧縮伸張回路84は、メモリ60に取り込まれた画像データをJPEGその他の所定の形式に従って圧縮する。
【0036】
圧縮された画像データは、カードインターフェース86を介してメモリカード24に記録される。非圧縮の画像データを記録するモード(非圧縮モード)が選択されている場合には、圧縮伸張回路84による圧縮処理は省略され、非圧縮のまま画像データがメモリカード24に記録される。
【0037】
本例のデジタルカメラ10では、画像データを保存する手段として、例えばスマートメディア(Solid-State Floppy Disk Card)が適用される。記録メディアの形態はこれに限定されず、PCカード、コンパクトフラッシュ、磁気ディスク、光ディスク、光磁気ディスク、メモリスティックなどでもよく、電子的、磁気的、若しくは光学的、又はこれらの組み合わせによる方式に従って読み書き可能な種々の媒体を用いることができる。使用される媒体に応じた信号処理手段とインターフェースが適用される。異種、同種の記録メディアを問わず、複数の媒体を装着可能な構成にしてもよい。また、画像ファイルを保存する手段は、カメラ本体に着脱可能なリムーバブルメディアに限らず、デジタルカメラ10に内蔵された記録媒体(内部メモリ)であってもよい。
【0038】
電源兼用モードスイッチ20によって再生モードが設定されると、メモリカード24から画像ファイルが読み出される。読み出された画像データは、必要に応じて圧縮伸張回路84によって伸張処理され、表示メモリ70を介して液晶モニタ30に出力される。
【0039】
CPU64は、本カメラシステムの各回路を統括制御する制御部である。CPU64は、電源兼用モードスイッチ20、シャッターボタン18、ズームスイッチ32その他の操作部から受入する入力信号に基づき、対応する回路の動作を制御するとともに、液晶モニタ30における表示制御、オートフォーカス(AF)制御及び自動露出(AE)制御等を行う。
【0040】
ここでオートフォーカス制御について説明する。A/D変換器58によってデジタル信号に変換された画像信号は、評価値演算部88に入力される。評価値演算部88は、高周波成分抽出回路90と積算回路92を有し、入力される画像信号のうちG成分のデータをサンプリングしてAF検出対象エリア(図4中符号94として記載、以下フォーカスエリアという。)内での高周波成分を抽出するとともにその絶対値をとり、フォーカスエリア94内で絶対値データを積算して得られた値(評価値に相当)をCPU64に提供する。
【0041】
AF検出の対象エリアは、画像領域の全体である必要はなく、図4に示したように、画像の中央部分の一部領域がフォーカスエリア94として設定されている。AF動作時にCPU64は、フォーカスレンズ48を焦点調節領域内で無限遠から至近(又は至近から無限遠)の方向に移動させながら、複数のAF検出ポイント(サーチポイント)で画像中央部分のコントラストを検出し、評価値を算出する。そして、各ポイントで算出された評価値を総合して、評価値が最大となるレンズ位置を合焦位置として決定し、求めた合焦位置にフォーカスレンズ48を移動させるようにフォーカス駆動部78を制御する。
【0042】
撮影レンズ12の焦点距離が長くなるにつれて、また、絞り50の開口径が大きくなるに従って被写界深度が浅くなり、無限遠から至近までのレンズ駆動量が多くなる。図5には撮影レンズ12の焦点距離と焦点調節領域300との関係が示されている。同図は、焦点距離を7mmから21mmまで段階的に変更できる撮影レンズ12の例が示され、撮影レンズ12の焦点距離が長くなるに従ってフォーカスレンズ48による焦点調節領域300が広くなっている。例えば、焦点距離7mmの時には、無限遠から最至近までのフォーカスレンズ48の移動可能範囲は8.17μm、焦点距離21mmのときの焦点調節領域300は735μmである。
【0043】
CPU64は、撮影レンズ12の焦点距離に対応して可変する焦点調節領域300に応じて、評価値を算出するレンズ位置(サーチポイント)の幅を示すAFステップ幅302とステップ段数(検出ポイント数)を設定する。
【0044】
フォーカス段数は、各焦点距離における焦点調節領域300をAFステップ幅302で等分割してもよいし、近距離(至近限界)側のAFステップ幅302を無限遠側よりも短くして、近距離側でのサーチポイントを多くして、焦点精度を高めるように設定してもよい。
【0045】
図5に示したように、撮影レンズ12の焦点距離が長くなるに従って焦点調節領域300が広くなり、その領域内のどこに被写体がいるかの判定が困難になる。そこで、本実施の形態では、図6に示すように、現在のフォーカス位置と焦点調節領域300の関係に応じてAFサーチの初期位置とサーチ方向を変更する。すなわち、同図(a)に示したように、現在位置が焦点調節領域300の中間位置Mよりも遠距離側にあるときは、まず、無限遠にフォーカス駆動し、無限遠から至近に向かってAFサーチを実行して各ポイントで評価値を取得していく。同図(a)の例では、至近方向(NEAR方向)に向かうAFサーチ動作によるフォーカス移動に伴って評価値が次第に上昇する。やがて、評価値のピークを越えて評価値が減少に転じ、所定の条件を満たすとAFサーチが中断される。そして、検出されたピーク位置に対応するフォーカス位置(合焦位置)にフォーカスレンズ48を移動して合焦状態を得る。
【0046】
逆に、図6(b)に示したように、現在のフォーカス位置が中間位置Mよりも近距離側にあるときは、まず、至近側にフォーカス駆動し、至近限界から無限遠に向かってAFサーチを実行して各ポイントで評価値を取得する。同図(b)によれば、無限遠方向(FAR 方向) に向かうサーチ動作によるフォーカス移動に伴って評価値は次第に上昇し、ピークを越えて評価値が減少に転じて所定の条件を満たすとAFサーチが中断される。そして、検出されたピーク位置に対応するフォーカス位置(合焦位置)にフォーカスレンズを移動して合焦状態を得る。
【0047】
このように、現在のフォーカス位置に応じてAFサーチ方向を自動選択したことより、フォーカスレンズ48をサーチ開始位置(初期位置)に駆動する平均時間を短縮することができる。また、シャッターボタン18の半押しが続けて行われるような場合には、この間に被写体距離が大きく変わることは少ないため、繰り返し時のAFサーチ時間は高速となる。
【0048】
図7にAF制御のフローチャートを示す。シャッターボタン18の半押し操作により、AF処理がスタートすると、CPU64は、先ず、フォーカスエリア94の設定を行う(ステップS110)。例えば、撮影画面を等面積で8×8の64個ブロックに分割し、中央部分の所定の複数ブロックが評価値演算対象のフォーカスエリア94に設定される。
【0049】
次いで、「ピーク有りフラグ」の状態をクリアし、初期設定としてピーク有りフラグ=OFFをセットする(ステップS112)。その後、撮影レンズ12の焦点距離の現在値、すなわち現在のズーム位置(ZOOMPOS)の情報を取得する(ステップS114)。ステップS114の後は、ステップS116に進み、AFサーチの初期位置を決定するための演算処理を行う。なお、このフォーカスレンズ初期位置演算処理の内容については図8で後述する。
【0050】
図7のステップS116におけるフォーカスレンズ初期位置演算処理の結果に従い、フォーカスレンズ48は初期位置に移動される(ステップS118)。
【0051】
続くステップS120において、現在のフォーカス段(サーチポイント)における評価値が算出され、得られた評価値はCPU64に入力される。CPU64は、当該サーチポイントにおける評価値を図示せぬメモリに記憶する。
【0052】
次いでステップS122に進み、AFサーチ動作を中断するか否かの判定処理を行う。この中断判定処理の内容については図18で後述する。図7のステップS122における中断判定処理の結果に基づいて、CPU64は、AFサーチ動作の継続/中断を判断する(ステップS124)。「継続」の場合には、ステップS126に進み、フォーカスレンズ48がサーチポイントの最終段の位置に到達したか否かが判定される。
【0053】
ステップS126において、NO判定を得た場合には、ステップS128に進み、現在のフォーカス段からサーチステップの1ステップ分(AFステップ幅302)だけフォーカスレンズ48を移動し、ステップS120に戻る。こうして、次のサーチポイントへ移動され、フォーカス位置の異なるフレーム画像データから評価値が算出される。焦点調節領域300内の各ポイントについてステップS120〜S128の処理が繰り返され、各ポイントの評価値が順次取得される。
【0054】
ステップS126でフォーカスレンズ48が最終段の位置に到達した場合、又はステップS124において「中断」の判定を得た場合にはステップS130に移行する。ステップS130では、各ポイントで得た評価値の結果から、最大の評価値が得られる位置(合焦位置)が求められ、その合焦位置にフォーカスレンズ48が移動される。シャッターボタン18の半押し状態が解除されるまでフォーカスレンズ48はその合焦位置に保持される。それとともに、評価値演算部88の動作が停止され、撮影記録許可の状態となる(ステップS132)。こうして、自動焦点調節処理が終了する。
【0055】
撮影記録許可な状態が得られると、CPU64によってシャッターボタン18の操作状態が確認され、シャッターボタン18の全押しに応動して、現在のズーム位置及び合焦されたフォーカス位置によって被写体が撮像され、所定の信号処理を経た画像データが付属情報とともにメモリカード24に記録される。
【0056】
図8は、初期位置演算処理の手順を示すフローチャートである。図7で説明したステップS114の後、ステップS116として図8のサブルーチンに移行する。この初期位置演算処理では、まず、フォーカスの現在位置(P)の情報が取得される(ステップS210)。次いで、焦点調節領域300を規定する至近側位置(N)及び無限遠側位置(I)の情報を取得した後(ステップS212)、フォーカスサーチ範囲の中間位置Mを次式(1)、
【0057】
【数1】
M=(I+N)/2 …(1)
に従って計算する(ステップS214)。
【0058】
そして、フォーカス現在位置(P)が中間位置Mよりも無限遠側にあるか、至近側にあるかの判定を行う(ステップS216)。現在位置が無限遠側にあるときは、ステップS218に進む。ステップS218では、AFサーチの開始位置となるフォーカス初期位置を「無限遠」に決定するとともに、AFサーチ時の遠レンズ駆動方向を無限遠から至近側へ向かう方向と定める。
【0059】
その一方、ステップS216において、現在位置が至近側にあるときは、ステップS220に進む。ステップS220では、AFサーチの開始位置となるフォーカス初期位置を「至近」に決定するとともに、AFサーチ時の遠レンズ駆動方向を至近から無限遠へ向かう方向と定める。なお、図8では、ステップS216において「P<M」の正否を判定しており、現在位置が中間位置Mに一致している場合にはステップS220に進むことになるが、現在位置が中間位置Mに一致する場合にフォーカス初期位置を無限遠側に設定してもよい。
【0060】
ステップS218又はステップS220によってフォーカス初期位置とサーチ方向が決定したら、本サブルーチンを終了して図7のフローチャートに復帰する。
【0061】
図8で説明した初期位置演算処理に代えて、現在のズーム位置に応じてフォーカス初期位置とサーチ方向を決定する態様も可能である。ズーム機能を搭載したカメラにおいては、撮影距離を考えた場合、テレ側では被写体は遠い距離にある場合が多く、ワイド側では至近側にある場合が多い。かかる観点から、焦点距離によってフォーカスのサーチ方向を変更することにより、高速なフォーカスサーチが可能となる。
【0062】
図9に各ズームポジションにおけるフォーカスサーチ方向の例を示す。同図によれば、撮影レンズ12は、ワイド端からテレ端まで11段階のズームポジションで停止できるものとし、各ズームポジションについてフォーカスサーチ方向が規定されている。現在のズーム位置がワイド側のズームポジション「0」から「4」まで範囲のにあるときは、フォーカス初期位置を至近(NEAR)とし、至近(NEAR)から無限遠(FAR)に向けてサーチ動作を行う。また、現在のズーム位置がテレ側の「5」〜「10」の範囲にあるときは、フォーカス初期位置を無限遠(FAR) とし、無限遠(FAR) から至近(NEAR)に向けてサーチ動作を行う。
【0063】
図9に示したようなテーブルを不揮発性メモリに格納しておき、AFサーチ開始時に当該テーブルを参照してサーチ方向を決定する。すなわち、図7のステップS116として図10のサブルーチンに移行し、ステップS310において、現在の焦点距離の情報に基づいて図9のテーブルを参照してフォーカス初期位置とサーチ方向を決定して、図7のフローチャートに復帰する態様も可能である。
【0064】
次に、初期位置演算処理の更に他の態様について説明する。
【0065】
上述の図6では、フォーカス範囲の中間位置Mを基準にして現在のフォーカス位置が無限遠側にあるか、至近側にあるかを判別したが、フォーカス初期位置の切り換えを判断する基準位置(切換位置)をズーム位置に応じて変動させる態様も可能である。例えば、図11に示すように、切換位置M′は、無限遠を始点として焦点調節領域全体のm%の位置という具合に規定され、この切換位置係数m(%)をズーム位置に応じて定めたテーブルとして予め用意しておく。そして、現在のズーム位置からテーブルを参照して切換位置M′を決定する。
【0066】
同図(a)に示したように、現在位置が切換位置M′よりも無限遠側にあるときは、まず、無限遠にフォーカス駆動し、無限遠から至近に向かってAFサーチを実行して各ポイントで評価値を取得する。
【0067】
逆に、図11(b)に示したように、現在のフォーカス位置が切換位置M′よりも至近側にあるときは、まず、至近にフォーカス駆動し、至近から無限遠に向かってAFサーチを実行して各ポイントで評価値を取得する。
【0068】
例えば、ズームのワイド側では焦点調節領域の中間位置M(m=50%)を切換位置M′とし、ズームがテレ側に移動するに伴い切換位置M′を至近側にシフトさせる。こうすることで、ズームがテレ側にあるほどフォーカス初期位置が無限遠側となる確率が高まる。テレ側での撮影時には被写体が遠距離にある場合が多いと考えられるので、無限遠側からAFサーチを開始することにより、早期に評価値のピークを検出できる可能性が高く、ピーク検出に伴うAFサーチの中断処理と相まって、AF処理の平均時間を一層短縮化できる。
【0069】
図12は、切換位置M′を可変してフォーカス初期位置を決定する演算処理のフローチャートである。図8で説明したフローチャートに代えて、図12に示す初期位置演算処理を適用することができる。同図によれば、まず、フォーカスの現在位置(P)の情報を取得する(ステップS410)。次いで、至近側位置(N)及び無限遠側位置(I)の情報を取得した後(ステップS412)、切換位置M′を次式(2)、
【0070】
【数2】
M′=(I−N)×m …(2)
に従って計算する(ステップS414)。ただし、mは切換位置係数(%)を示す。
【0071】
そして、フォーカス現在位置(P)が切換位置M′よりも無限遠側にあるかそれとも至近側にあるかの判定を行う(ステップS416)。現在位置が無限遠側にあるときは、ステップS418に進む。ステップS418では、AFサーチの開始位置となるフォーカス初期位置を「無限遠」に決定するとともに、AFサーチ時のレンズ駆動方向を無限遠から至近側へ向かう方向と定める。
【0072】
その一方、ステップS416において、現在位置が至近側にあるときは、ステップS420に進む。ステップS420では、AFサーチの開始位置となるフォーカス初期位置を「至近」に決定するとともに、AFサーチ時のレンズ駆動方向を至近から無限遠へ向かう方向と定める。ステップS418又はステップS420によってフォーカス初期位置とサーチ方向が決定したら、本サブルーチンを終了して図7のフローチャートに復帰する。
【0073】
図12で説明した形態の変形例として、図13に示すようなテーブルを用いてもよい。同図によれば、ズームのワイド端ではフォーカスの現在位置によらず、AFサーチ時には必ずNEAR側に駆動して、至近(NEAR)から無限遠(FAR )方向にサーチ動作を行うように設定されている。これにより、ワイド端付近では常にNEAR側からAFサーチが開始される。
【0074】
また、ズームのミドル領域では現在のフォーカス位置が切換位置係数(m)で規定される切換位置M′よりも無限遠側にあるときはFAR 側から、切換位置M′よりも至近側にあるときはNEAR側からAFサーチが開始され、テレ端付近では常にFAR 側からAFサーチが開始される。このように、現在のズーム位置とフォーカス位置を総合的に考慮してAFサーチ方向を決定する方法を採用することにより、より細かな制御が可能になる。
【0075】
次に、AFサーチ動作を中断するときの制御内容について説明する。図14は、AFサーチによって評価値を取得した例が示されている。フォーカスエリア94内に主要な被写体が一つだけ存在する場合には、図14のように評価値のピークは一つだけ現れる。この場合、ピークが検出されたレンズ位置(P)を合焦位置として、ここにフォーカスレンズ48を移動させればよい。これに対し、図15に示すように、フォーカスエリア94内に複数の被写体が存在する場合には、両方の被写体に対して合焦させることができず、どちらか一方の被写体についてピント合わせを行う必要がある。
【0076】
図16は、フォーカスエリア94内に複数の被写体が存在する場合の評価値の取得結果の一例を示す。同図に示すようにフォーカスエリア94内に複数の被写体が存在する場合には、評価値の曲線において複数のピークが存在する。一つの山を検出してAFサーチを終了してしまう場合は、片方の山のみしか検出できず、複数の山を検出できない。例えば、図16において、無限遠側からAFサーチ動作を開始し、無限遠側のピークを検出した時点でAFサーチ動作を終了してしまうと、至近側にある別のピークを検出することができず、至近側の主要被写体にピントを合わせることができない。
【0077】
また、別の方法として、必ず至近側からAFサーチ動作を開始することによって、最初の山で合焦させる方法も考えられるが、高倍率ズームレンズの場合は、遠い距離にある被写体を撮影する状況も多いため、AF処理の高速化を考慮すると、無限遠側からサーチを開始する方が好ましいとも言える。
【0078】
そこで、本実施の形態では、効率的なAFサーチ動作を実現するために、以下のような工夫がなされている。すなわち、図14と図16を比較してみると、図14のグラフでは、無限遠から至近へ向かうAFサーチ動作によって評価値のピークを検出した後、更に同方向のレンズ移動で評価値を取得した場合、フォーカスレンズ48がピーク位置Pから一定の距離dだけ離れると評価値がゼロレベル近くまで下がるのに対し、図16のように複数の被写体が存在するときは、第1のピークを検出した以後、評価値がゼロレベル近くまで下がりきらずに、再度増加に転じている。
【0079】
かかる事実に注目して、評価値のピークを検出したレンズ位置から一定の距離dだけ離れた位置での評価値が所定の閾値T以下ならば、その先に被写体が存在しないと判断し、AFサーチを終了するとともに、検出した最初のピーク位置にフォーカスレンズ48を駆動する。
【0080】
その一方、評価値のピークを検出したレンズ位置から一定の距離dだけ離れた位置での評価値が所定の閾値Tよりも大きい値ならば、その先に別の被写体が存在する可能性があると判断し、同方向のAFサーチ動作を継続する。なお、ピーク位置Pからの距離dは、許容錯乱円の約10倍〜20倍程度に設定することが好ましい。そして、かかるAFサーチ動作によって複数のピークが検出された場合には、最も近距離のピーク位置を合焦位置として決定する。
【0081】
ところで、被写体が暗い場合など、撮像信号のノイズが発生し、図17に示すように、ピークは一つのみでも評価値が閾値T以下にならない状況が起こり得る。しかし、図17と図16を比較すると分かるように、至近側に別の被写体がある場合(図16)は、最至近よりもある程度手前の位置から評価値が増加する傾向が認められる。これに対し、ノイズ等の原因で評価値が低下しない場合(図17)には、最至近よりも一定の距離w以上手前であっても評価値は増加傾向に転じない。
【0082】
したがって、最至近から所定量w以遠で評価値が増加方向にあるか否かを判断することよって至近側に別の被写体が存在するか否かの判別が可能である。最至近から所定量w以遠での評価値が増加方向に無ければ、至近側に被写体が存在しないものとして、AFサーチ動作を終了し、ピークを検出したレンズ位置にフォーカス駆動する。なお、所定量wは、許容錯乱円の約5倍〜10倍程度に設定することが好ましい。図17では至近側を説明したがFAR方向のAFサーチ動作についても同様に無限遠から所定量wだけ離れた位置で評価値が増加傾向になければ、無限遠側に被写体が存在するものと判断できる。
【0083】
図18は、中断判定処理のフローチャートである。図7で説明したステップS120後のステップS122として図18のサブルーチンに移行する。中断判定処理がスタートすると、まず、評価値が増加から減少に転じるピークが検出されたか否かの判定を行う(ステップS510)。この判定は、後述の「ピーク有りフラグ」の状態に基づいて判断される。
【0084】
ステップS510において、ピークが検出されなければ(NO判定時)、ステップS512に進み、評価値が減少したか否かの判定を行う。ステップS512でNO判定を得たときは評価値取得処理の継続を決定し(ステップS518)、本サブルーチンを終了して図7のフローチャートに復帰する。
【0085】
ステップS512において、評価値が減少したことが検出されると、ステップS514に分岐する。ステップS514では、減少する前の評価値が増加傾向にあったか否かの判定を行う。ステップS514でYES判定を得た場合には、「ピーク有りフラグ」をONにセットするととも、ピークを検出したフォーカス位置(ピーク位置)を示す変数Pのデータを更新する(ステップS516)。ステップS516の後、又はステップS514においてNO判定を得た場合には、ステップS518へ進み、評価値取得処理の継続を決定する。
【0086】
「ピーク有りフラグ」がONにセットされると、ステップS510においてYES判定となる。この場合、ステップS520に進み、サーチ方向がNEAR方向であるか否かの判定を行う。サーチ方向がNEAR方向であるとき(YES判定時)は、現在のフォーカス位置(サーチポイント)が、ピーク位置Pから所定の距離(d)を超えて至近側にあるか否かの判定を行う(ステップS522)。現在位置がピーク位置Pから所定距離d以内の範囲にあれば(NO判定時)、ステップS528へ進み、サーチ方向についての残り検出ポイント数が所定の値(w)よりも小さいか否かの判定を行う。この所定値wは図17で説明した距離wに相当する値である。
【0087】
ステップS528において、残り検出ポイント数が所定値w以上であるときは(NO判定時)、評価値取得処理の継続を決定し(ステップS532)、図7のフローチャートに復帰する。その一方、ステップS528でYES判定を得たときは、ステップS530に進み、評価値が増加したか否かを判定する。
【0088】
ステップS530で評価値の増加が検出されると(YES判定時)、ステップS532に進んで評価値取得処理の継続を決定するが(ステップS532)、ステップS530において評価値が増加していなければ(NO判定時)、ステップS536に移行して評価値取得処理の中断を決定し、図7のメインルーチンへ復帰する。
【0089】
また、ステップS522において現在のフォーカス位置がピーク位置Pから所定距離dを超えて至近側にあるとき(YES判定時)は、ステップS524に分岐する。ステップS524では、現在のフォーカス位置における評価値が所定の閾値Tよりも小さい値であるか否かを判定する。
【0090】
ステップS524で評価値が閾値T以上であれば(NO判定時)、現在位置よりも至近側に被写体が存在する可能性に配慮してステップS528に進む。その一方、ステップS524において評価値が閾値Tよりも小さい値のときは(YES判定時)、現在位置よりも至近側に被写体は存在しないものと判断し、評価値取得処理の中断を決定する(ステップS536)。
【0091】
ステップS520でNO判定の場合、すなわち、サーチ方向がFAR 方向であるときは、ステップS526へ進む。ステップS526では、評価値が連続して所定回数減少したか否かの判定を行う。連続減少回数の判断基準となる基準値は被写界深度等を考慮して適宜設定される。
【0092】
ステップS526においてNO判定を得た場合には、ステップS528へ進み、上述したステップS528〜S536によって中断又は継続の決定が行われる。その一方、ステップS526においてYES判定を得た場合には、ステップS538へ進み、評価値取得処理の中断を決定し、図7のフローチャートへ復帰する。
【0093】
図18に示した中断判定処理に従うことでNEAR方向及びFAR 方向の何れのサーチ方向についても、被写体に対応する評価値のピークを正確、かつ高速に検出することができ、AF処理の高速化を実現できる。
【0094】
次に、AF処理の更なる高速化を達成し得る制御例を説明する。撮影レンズ12の焦点距離が長くなるにつれ、焦点調節領域300(無限遠から至近まで)のフォーカス送り量(パルス数)が多くなり、AF時間が長くなることは図5で説明した通りである。そこで、最初にフォーカス送り量を多くしたAFサーチステップで評価値を取得する「ラフサーチ」を行い、ラフサーチによっておよその合焦位置を検出したらその近傍領域について、更にフォーカス送り量を小さくしたサーチステップで評価値を取得する「詳細サーチ」を行うことが好ましい。
【0095】
図19にラフサーチと詳細サーチの概念図を示す。同図では、無限遠から至近までのフォーカス送り量が240パルスであり、ラフサーチ時のフォーカス送りパルス数は20パルス、詳細サーチ時のフォーカス送りパルス数は2パルスに設定されているものとする。
【0096】
同図によれば、まず、無限遠からNEAR方向にラフサーチが開始される。ラフサーチは、20パルス毎にサーチポイントが変更され、各ポイントで評価値の算出を行うとともに、図18で説明したような中断判定処理を行う。
【0097】
ラフサーチにおいてピークが検出され、例えば、100パルスのポジションで評価値取得処理の中断が決定されると、詳細サーチの初期位置(Pds) にフォーカス移動され、ここからFAR 方向に詳細サーチが開始される。詳細サーチでは2パルス毎にサーチポイントが変更され、各ポイントで評価値の算出を行い、ピーク検出後、連続して所定回数評価値が減少したら評価値取得処理の中断を決定し、ピーク位置(合焦位置)にフォーカスレンズ48を駆動する。
【0098】
図20にはラフサーチと詳細サーチを組み合わせたAF制御のフローチャートが示されている。同図において、ラフサーチ部分を含むステップS610〜S628は、図7で説明したフローチャートのステップS110〜S128と同様の処理であり、その説明は省略する。また、図20のステップS622における中断判定(1)処理は、図18で説明した中断判定処理のフローチャートが適用される。
【0099】
図20のステップS624で「中断」との判定を得た場合、又はステップS626においてフォーカス段の最終位置に到達した時は、ステップS640に進む。ステップS640では、ラフサーチの結果を基に詳細サーチの範囲を求める演算を行う。そして、求めた詳細サーチ範囲に従い、フォーカスレンズ48を詳細サーチ開始位置(詳細サーチ初期位置)に駆動する処理を行う(ステップS642)。
【0100】
次いで、CPU64のレジスタnに初期値「0」を設定してから(ステップS644)、ステップS646に進む。ステップS646では、現在のフォーカス位置(サーチポイント)における評価値が算出され、得られた評価値はCPU64に入力される。CPU64は、当該サーチポイントにおける評価値を図示せぬメモリに記憶する。
【0101】
次いで、ステップS648に進み、AFサーチを中断するか否かの判定処理を行う。この「中断判定(2)処理」の内容については図21で後述する。CPU64は、中断判定(2)処理(ステップS648)の結果に基づいて、AFサーチの中断又は継続を判断する(ステップS650)。ステップS650で「継続」との判定を得た時は、ステップS652に進み、サーチポイントの最終位置に到達したか否かが判定される。
【0102】
ステップS625において、NO判定を得た場合には、ステップS654に進み、現在のフォーカス位置からAFサーチステップの1ステップ分(2パルス)だけフォーカスレンズ48を移動し、ステップS646に戻る。こうして、次のサーチポイントへ移動され、フォーカス位置の異なるフレーム画像データから評価値が算出される。詳細サーチ範囲の各ポイントについてステップS646〜S654の処理が繰り返され、各サーチポイントの評価値が取得される。
【0103】
ステップS652でフォーカスレンズ48がサーチポイントの最終位置に到達した場合、又はステップS650において「中断」の判定を得た場合にはステップS660に移行する。ステップS660では、各ポイントで得た評価値の結果から、評価値が最大となる位置が求められ、その位置(合焦位置)にフォーカスレンズ48が移動される。こうして、撮影記録許可の状態となり(ステップS662)、自動焦点調節処理が終了する。
【0104】
図21には、図20のステップS648で示した中断判定(2)処理のフローチャートが示されている。この中断判定(2)処理では、まず、レジスタCに現在の焦点距離[ZOOMPOS] に対応するテーブル値「C _TABLE 」がセットされる(ステップS710)。これは、各フォーカス段(サーチポイント)で算出される評価値が連続して減少した場合に、AFサーチを中断することを決定するための判断基準となる中断判定値Cを設定する処理である。
【0105】
中断判定値Cは、短焦点側(ワイド側)ではフォーカス段数と同じ数値(図5の例では「4」)若しくはそれに近い値が設定され、実質的には中断処理を行わないように設定されている。また、長焦点側(テレ側)に近づくにつれて中断判定値Cは大きな値となり、フォーカス段数の約50%〜30%の整数値に設定される。
【0106】
次いで、ステップS712に進み、取得された評価値が減少したか否かの判定を行う。評価値が減少していないとき(NO判定時)は、AFサーチの継続を決定して(ステップS722)、本サブルーチンを抜け、図20のフローチャートに復帰する。
【0107】
ステップS712において評価値が減少しているとの判定を得たときは(YES判定時)、レジスタnの値に1が加算され(ステップS714)、続くステップS716においてレジスタnの値がレジスタCの値を超えているか否かが判定される。レジスタnの値がレジスタCの値以下の場合(NO判定時)には、ステップS722に進んでAFサーチの継続を決定し、図20のフローチャートに復帰する。これにより、評価値が連続してC回減少するまで、AFサーチが継続される。
【0108】
ステップS716においてYES判定を得た場合、すなわち、評価値が連続してC回減少したことが検出されると、ステップS718に進む。ステップS718では、詳細サーチによって算出された評価値の最大値(AFmax )と最小値(AFmin)との差が所定の値Kよりも大きいか否かが判定される。評価値の差が所定の値Kよりも大きい場合(YES判定時)には、所定のコントラストがあることを示しているので、AFサーチの中断が決定される(ステップS720)。また、評価値の差が所定の値K以下の場合(NO判定時)は、ステップS722に進み、AFサーチの継続が決定される。
【0109】
ステップS720又はステップS722によって「中断」又は「継続」の決定が行われると、本サブルーチンを終了して、図20のフローチャートのステップS650に移行する。その後の処理内容は図20で説明した通りである。
【0110】
上記実施の形態では、光学ズームによって撮影倍率を変更する例を述べたが、光学ズームに代えて、又はこれと併用して電子ズーム機能によってズーム動作を行うカメラについても、本発明を適用することができる。
【0111】
<付記>
上記実施の形態によれば、以下に示す構成の発明(1)〜(7)を得ることができる。そして、これらの発明(1)〜(7)は「特許請求項の範囲」に記載した各請求項の発明と組み合わせることが可能である。
【0112】
発明(1): 撮像手段から出力される画像信号に基づいて前記撮像手段に被写体の像を結像させるレンズの焦点位置を調節する自動焦点調節装置において、該装置は、前記レンズを焦点調節領域内で移動させるレンズ移動手段と、前記レンズの位置を検出するレンズ位置検出手段と、前記撮像手段から出力される画像信号から前記被写体のコントラスト成分を抽出し、該コントラスト成分に応じた評価値を前記レンズの各移動位置毎に算出する評価値算出手段と、前記レンズ位置検出手段で検出した現在のレンズ位置に基づいて焦点調節動作時のレンズ移動方向を決定する方向決定手段と、前記方向決定手段の決定に従って前記評価値を取得するためのレンズ移動を制御するとともに、前記評価値がピークとなる位置に前記レンズを移動させて合焦状態を得るように前記レンズ移動手段を制御する制御手段と、を備えたことを特徴とする自動焦点調節装置。
【0113】
発明(2): 前記方向決定手段は、前記焦点調節領域を近距離領域と遠距離域との2つの領域に区分する切換位置を設定し、現在のレンズ位置と前記切換位置との位置関係を比較して、現在のレンズ位置が前記近距離領域にあるときは前記評価値の取得開始位置を至近側とし、前記評価値を取得する際の前記レンズ移動方向を至近から無限遠に向かう方向に決定する一方、現在のレンズ位置が前記遠距離領域にあるときは前記評価値の取得開始位置を無限遠側とし、前記評価値を取得する際の前記レンズ移動方向を無限遠から至近に向かう方向に決定することを特徴とする発明(1)に記載の自動焦点調節装置。
【0114】
発明(3): 撮像手段から出力される画像信号に基づいて前記撮像手段に被写体の像を結像させるレンズの焦点位置を調節する自動焦点調節装置において、該装置は、
前記レンズを焦点調節領域内で移動させるレンズ移動手段と、
撮影倍率を変化させるズーム手段と、
前記ズーム手段によるズーム位置を検出するズーム位置検出手段と、
前記撮像手段から出力される画像信号から前記被写体のコントラスト成分を抽出し、該コントラスト成分に応じた評価値を前記レンズの各移動位置毎に算出する評価値算出手段と、
前記ズーム位置検出手段で検出した現在のズーム位置に基づいて焦点調節動作時のレンズ移動方向を決定する方向決定手段と、
前記方向決定手段の決定に従って前記評価値を取得するためのレンズ移動を制御するとともに、前記評価値がピークとなる位置に前記レンズを移動させて合焦状態を得るように前記レンズ移動手段を制御する制御手段と、
を備えたことを特徴とする自動焦点調節装置。
【0115】
発明(4): 発明(3)に記載の自動焦点調節装置において、前記方向決定手段は、現在のズーム位置がワイド側にあるときは前記評価値の取得開始位置を至近側とし、前記評価値を取得する際の前記レンズ移動方向を至近から無限遠に向かう方向に決定する一方、現在のズーム位置がテレ側にあるときは前記評価値の取得開始位置を無限遠側とし、前記評価値を取得する際の前記レンズ移動方向を無限遠から至近に向かう方向に決定することを特徴とする自動焦点調節装置。
【0116】
発明(5): 発明(3)に記載の自動焦点調節装置において、該装置は、 前記レンズの位置を検出するレンズ位置検出手段を有し、前記方向決定手段は、前記レンズ位置検出手段から得られるレンズ位置及び前記ズーム位置検出手段から得られるズーム位置に基づいて前記レンズ移動方向を決定することを特徴とする自動焦点調節装置。
【0117】
発明(6): 撮像手段から出力される画像信号に基づいて前記撮像手段に被写体の像を結像させるレンズの焦点位置を調節する自動焦点調節方法において、該方法は、
前記レンズを焦点調節領域内で移動させるレンズ移動工程と、
前記レンズの位置を検出するレンズ位置検出工程と、
前記撮像手段から出力される画像信号から前記被写体のコントラスト成分を抽出し、該コントラスト成分に応じた評価値を前記レンズの各移動位置毎に算出する評価値算出工程と、
前記レンズ位置検出手段で検出した現在のレンズ位置に基づいて焦点調節動作時のレンズ移動方向を決定する方向決定工程と、
前記方向決定工程の決定に従って前記評価値を取得するためのレンズ移動を制御する評価値取得制御工程と、
前記評価値取得制御工程で得た評価値に基づき、前記評価値がピークとなる位置に前記レンズを移動させて合焦状態を得るように前記レンズ移動手段を制御する制御工程と、
を含むことを特徴とする自動焦点調節方法。
【0118】
発明(7): 撮像手段から出力される画像信号に基づいて前記撮像手段に被写体の像を結像させるレンズの焦点位置を調節する自動焦点調節方法において、該方法は、
前記レンズを焦点調節領域内で移動させるレンズ移動工程と、
撮影倍率を変化させるズーム手段によるズーム位置を検出するズーム位置検出工程と、
前記撮像手段から出力される画像信号から前記被写体のコントラスト成分を抽出し、該コントラスト成分に応じた評価値を前記レンズの各移動位置毎に算出する評価値算出工程と、
前記ズーム位置検出手段で検出した現在のズーム位置に基づいて焦点調節動作時のレンズ移動方向を決定する方向決定工程と、
前記方向決定手段の決定に従って前記評価値を取得するためのレンズ移動を制御する評価値取得制御工程と
前記評価値取得制御工程で得た評価値に基づき、前記評価値がピークとなる位置に前記レンズを移動させて合焦状態を得るように前記レンズ移動手段を制御する制御工程と、
を含むことを特徴とする自動焦点調節方法。
【0119】
【発明の効果】
以上説明したように本発明によれば、評価値のピークが検出されたあと、当該ピーク位置から一定量以上離れたレンズ位置での評価値を基準にして当該ピーク判定の適否を判断するようにしたので、AF処理の高速化を達成できるとともに、距離の異なる複数の被写体が存在する場合にも正確なピント合わせが可能となる。
【図面の簡単な説明】
【図1】本発明の実施形態に係るデジタルカメラの正面側外観図
【図2】図1に示したデジタルカメラの背面側外観図
【図3】本例のデジタルカメラの内部構成を示すブロック図
【図4】画面中央部に設定されたフォーカスエリアの例を示す図
【図5】ズーム位置及びフォーカス位置に応じたAFサーチステップ幅の変化を示す図
【図6】AF開始時のフォーカス位置に応じてAFサーチ開始位置とサーチ方向を変更する制御例を示す概念図
【図7】本例の自動焦点調節の制御手順を示すフローチャート
【図8】図7に示したフォーカスレンズ初期位置演算処理の内容を示すフローチャート
【図9】ズーム位置に応じてAFサーチ方向を指定するテーブルの例を示す図表
【図10】図9のテーブルを利用する初期位置演算処理のフローチャート
【図11】AF開始時のフォーカス位置に応じてAFサーチ開始位置とサーチ方向を変更する他の制御例を示す概念図
【図12】図11に示した制御例を実施するための初期位置演算処理のフローチャート
【図13】ズーム位置とフォーカス位置に応じてAFサーチ方向を指定するテーブルの例を示す図表
【図14】フォーカスレンズの移動に伴って変化する評価値の例を示すグラフ
【図15】フォーカスエリア内に複数の被写体が存在する様子を示した図
【図16】複数の被写体が存在する場合にフォーカスレンズの移動に伴って変化する評価値の例を示すグラフ
【図17】ノイズ等の影響によって評価値が下がらない現象を例示したグラフ
【図18】図7に示した中断判定処理の内容を示すフローチャート
【図19】ラフサーチと詳細サーチを組み合わせた自動焦点調節動作の概念図
【図20】ラフサーチと詳細サーチを組み合わせた自動焦点調節の制御手順を示すフローチャート
【図21】図20に示した中断判定(2)処理の内容を示すフローチャート
【符号の説明】
10…デジタルカメラ、12…撮影レンズ、46…ズームレンズ(ズーム手段)、48…フォーカスレンズ、52…CCD(撮像手段)、64…CPU(制御手段、判断手段、評価値変化検出手段)、78…フォーカス駆動部(レンズ移動手段)、88…評価値演算部(評価値算出手段)
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an automatic focus adjustment apparatus and method, and more particularly to a technique for detecting a high-frequency component of an image based on an output signal from an image sensor and performing autofocus (AF) control using the detection result. .
[0002]
[Prior art]
A video camera that picks up an image of a subject and outputs the video signal is picked up while moving the focus lens that affects focus adjustment in the photographic optical system, and extracts high-frequency components from the output video signal for focusing. The evaluation value of is calculated. If the evaluation value increases as a result of the movement of the focus lens, it continues to drive in the same direction. Conversely, if the evaluation value decreases as the lens moves, it is driven in the opposite direction to search for the peak of the evaluation value. The so-called “mountain climbing servo system” is employed.
[0003]
Also, in the digital still camera, a “contrast AF method” is employed in which the focus lens is driven from close to the infinite distance of the subject, and the focus lens is driven and focused at the point where the evaluation value is maximized. . As for detecting the in-focus state from the evaluation value acquisition result, it is determined whether the contrast is low from the maximum value and the minimum value of the imaging signal (JP-A-6-125493), or the evaluation value is continuous. Thus, there has been proposed a method (Japanese Patent Laid-Open No. 2000-152065) that detects a decrease and determines a focus position (peak position).
[0004]
[Problems to be solved by the invention]
However, in the conventionally proposed method, when there are a plurality of subjects having different distances in the focus area, a plurality of evaluation value peaks may occur, and only from the decreasing tendency around the evaluation value peak, There is a problem that an accurate in-focus position cannot be determined.
[0005]
The present invention has been made in view of such circumstances, and it is an object of the present invention to provide an automatic focus adjustment apparatus and method capable of high-speed and accurate focusing even when a plurality of subjects having different distances exist. .
[0006]
[Means for Solving the Problems]
  In order to achieve the above object, the present invention provides an automatic focusing apparatus that adjusts the focal position of a lens that forms an image of a subject on the imaging unit based on an image signal output from the imaging unit. A lens moving means for moving the lens within the focus adjustment region; and a contrast component of the subject is extracted from an image signal output from the imaging means, and an evaluation value corresponding to the contrast component is obtained for each moving position of the lens. An evaluation value calculating means for calculating each lens, a control means for controlling the lens moving means to move the lens to each position for obtaining the evaluation value, and a predetermined amount w or more from an end point of the focus adjustment region Evaluation value change detection means for detecting a change in the evaluation value at a distant lens position, evaluation values at each position obtained by the evaluation value calculation means, and the evaluation value change detection means Determination means for determining the in-focus state based on a detection result, and in automatic focus adjustment in still image shooting, the control means moves the lens from one end point of the focus adjustment area, and After detecting that there is a peak from the increase / decrease in the evaluation value acquired along with the movement, the lens is moved to further acquire the evaluation value, and is separated from the position of the lens where the peak is detected by a certain amount d. When the evaluation value at the lens position is equal to or less than a predetermined threshold, the interruption of the movement of the lens is determined, and when the evaluation value at the lens position exceeds a predetermined threshold, the continuation of the movement of the lens is determined, When the movement of the lens is continued, if the remaining detection amount to the other end point of the focus adjustment area is equal to or greater than the predetermined amount w, it is determined to continue the evaluation value acquisition process, and the remaining detection There wherein less than a predetermined amount w, when the increase of the evaluation value in the lens position distant a predetermined amount w from the end point of the focusing area is not detected in the movement of the lensInterruptionAnd when the increasing tendency of the evaluation value is detected, the movement of the lensContinuedAnd when the plurality of evaluation value peaks are detected, the determination unit determines that the lens position where the maximum value of the evaluation value is detected is an in-focus position, and the lens moving unit determines the in-focus state. The lens is moved to a position.
[0007]
  That is, an evaluation value is acquired at each position while moving a lens (focus lens) for performing focus adjustment within the focus adjustment range. The AF speed can be increased by evaluating the suitability of the peak determination based on the evaluation value at the lens position that is a certain amount or more away from the peak position after the peak of the evaluation value is detected. Accurate focusing is possible even when there are multiple subjects with different sizes, and so-called “out of focus” can be prevented..
[0008]
  That is,The determination means compares an evaluation value at a position away from the lens position where the peak is obtained by a predetermined amount d with a predetermined threshold value, and when the evaluation value is equal to or less than the threshold value, It is determined that the in-focus state can be obtained at the lens position where the peak of the evaluation value is obtained or at a position in the vicinity thereofbe able to.
[0009]
  If the evaluation value at the lens position that is a fixed amount away from the position where the evaluation value is maximum (peak position) is larger than the threshold, it can be determined that there are multiple subjects, and the evaluation value acquisition operation (AF search) is continued. By doing so, accurate focus adjustment becomes possible. If the evaluation value at the lens position that is a certain amount away from the peak position is equal to or less than the threshold value, it can be determined that there is no subject ahead, and the AF search is interrupted at that time to speed up the AF process. be able to.Further, if the evaluation value at a position away from the end point of the focus adjustment range by a predetermined amount w does not tend to increase, it is determined that there is no subject ahead, and the lens is brought into the in-focus position (the maximum evaluation value is obtained). By moving the lens to (lens position), a focused state can be obtained without moving the lens to the end point, and the speed of automatic focus adjustment can be increased.
[0010]
According to another aspect of the present invention, the control means includes a first search operation in which the interval between the lens positions for obtaining the evaluation value in the focus adjustment region is relatively large, and during the first search control. And a second search operation for obtaining the evaluation value at a small interval, and the determination means performs the determination at the time of the first search operation.
[0011]
That is, first, a first search operation (rough search) with a large search point interval (search step) is performed, and the vicinity of the resulting peak is searched in detail by a second search operation (detailed search) with a small search step. By doing so, an accurate in-focus position is obtained. When such a control method is adopted, an unnecessary search range can be omitted and the AF process can be speeded up by performing the focus determination by the determination means in the first search operation with a large search step. .
[0012]
  Also, ContractClaim1Includes the described autofocus deviceElectronic camera is also preferable.
[0015]
  In order to provide an automatic focus adjustment method that achieves the above object, the present invention provides an automatic focus adjustment that adjusts a focus position of a lens that forms an image of a subject on the image pickup means based on an image signal output from the image pickup means. In the method, the method includes a lens moving step of moving the lens within a focus adjustment region, extracting a contrast component of the subject from an image signal output from the imaging unit, and obtaining an evaluation value corresponding to the contrast component. An evaluation value calculating step for calculating for each moving position of the lens; a control step for controlling the lens moving means to move the lens to each position for acquiring the evaluation value; and An evaluation value change detecting step for detecting a change in the evaluation value at a lens position separated by a predetermined amount w or more from the end point; an evaluation value at each position obtained by the evaluation value calculating means; A determination step of determining an in-focus state based on a detection result of the evaluation value change detection means, and in the automatic focus adjustment in still image shooting, the control step starts from one end point of the focus adjustment region. The position of the lens where the peak is detected after moving the lens to further obtain the evaluation value after it is detected that there is a peak from the increase / decrease in the evaluation value acquired along with the movement of the lens. If the evaluation value at a lens position that is a predetermined amount d away from the lens is less than or equal to a predetermined threshold value, interruption of the movement of the lens is determined, and if the evaluation value at the lens position exceeds a predetermined threshold value, When it is determined to continue the movement and the movement of the lens is continued, the evaluation value acquisition process is continued if the remaining detection amount to the other end point of the focus adjustment area is equal to or greater than the predetermined amount w. Constant, and the less than the rest of the detected amount is the predetermined amount w, of the movement of the lens when the increase of the evaluation value in the lens position distant a predetermined amount w from the end point of the focusing area is not detectedInterruptionAnd when the increasing tendency of the evaluation value is detected, the movement of the lensContinuedAnd when the plurality of evaluation value peaks are detected, the determination step determines that the lens position where the maximum value of the evaluation value is detected is an in-focus position, and places the lens at the in-focus position. It is characterized by being moved.
[0016]
DETAILED DESCRIPTION OF THE INVENTION
Preferred embodiments of an automatic focusing apparatus and method according to the present invention will be described below with reference to the accompanying drawings.
[0017]
FIG. 1 is an external view of a digital camera to which the present invention is applied. A photographing lens 12, a finder window 14, and a strobe light emitting unit 16 are provided on the front surface of the digital camera 10, and a shutter button 18 and a power switch 20 are disposed on the upper surface of the camera. A card slot 26 for mounting a memory card 24 is provided on the side of the camera opposite to the grip portion 22.
[0018]
A zoom lens is applied to the photographing lens 12, and a CCD image sensor (not shown in FIG. 1, described as reference numeral 52 in FIG. 3) is disposed behind the photographing lens 12. The shutter button 18 is configured in a two-stage system, and the automatic focus (AF) and automatic exposure control (AE) are activated in a “half-pressed” state in which the shutter button 18 is lightly pressed and stopped to lock AF and AE. Shooting is performed in the state of “full press”, which is further pressed from “half press”.
[0019]
The power switch 20 is also used as a mode switch, and is an “OFF position” where the power is turned off, a “shooting ON position” where the power is turned on in the still image shooting mode, and a “reproduction ON position” where the power is turned on in the playback mode. 3 positions can be switched. In place of the power switch (hereinafter referred to as a power combined mode switch) 20 as in this example, a power switch only for power ON / OFF and mode switching means such as a mode dial for switching between a still image shooting mode and a playback mode. May be provided.
[0020]
FIG. 2 is an external view of the back side of the digital camera 10. On the back of the digital camera 10, a viewfinder 28, a liquid crystal monitor 30, a zoom switch 32, a multifunction cross button 34, an AE lock button 36, a menu key 38, an execution key 40, and a cancel key 42 are provided. The liquid crystal monitor 30 is a display means that can be used as an electronic viewfinder for checking the angle of view at the time of shooting, and can display a preview image of the shot image, a reproduced image read from the memory card 24, and the like. Further, menu selection using the cross button 34 and setting of various items in each menu are also performed using the display screen of the liquid crystal monitor 30.
[0021]
The zoom switch 32 is composed of a lever switch that can be operated in the up / down direction. By operating the switch in the upward direction, the zoom switch 32 is zoomed in the telephoto (TELE) direction, and operated in the downward direction in the wide angle (WIDE) direction. Move the zoom. The cross button 34 can input instructions in the corresponding four directions (up, down, left, right) by pressing one of the top, bottom, left, and right edges. It is used as an operation button for instructing selection and change of setting contents, and as a means for instructing electronic zoom magnification adjustment and playback frame return / return.
[0022]
The menu key 38 is used when transitioning from the normal screen to the menu screen in each mode. The execution key 40 is used for confirming the selection contents and instructing execution (confirmation) of processing. The cancel key 42 is used when canceling (cancelling) an item selected from the menu or returning to the previous operation state.
[0023]
The photographer operates the zoom switch 32 to determine the angle of view while confirming the real-time image (through image) displayed on the finder 28 or the liquid crystal monitor 30, and depresses the shutter button 18 to perform photographing.
[0024]
FIG. 3 is a block diagram showing the internal configuration of the digital camera 10. The photographing lens 12 includes a four-group inner focus zoom lens including a fixed lens 44, a variable power lens 46A, a correction lens 46B, and a focus lens 48.
[0025]
The zoom lens 46A and the correction lens 46B move along the optical axis while the positional relationship between them is regulated by a cam mechanism (not shown) to change the focal length. For convenience of explanation, the variable power optical system including the variable power lens 46A and the correction lens 46B is referred to as a “zoom lens 46”.
[0026]
The light that has passed through the photographing lens 12 is incident on a CCD image sensor (hereinafter referred to as CCD) 52 after the amount of light is adjusted by the diaphragm 50. Photosensors are arranged in a plane on the light receiving surface of the CCD 52, and a subject image formed on the light receiving surface of the CCD 52 via the photographing lens 12 has an amount of signal charge corresponding to the amount of incident light by each photosensor. Is converted to The CCD 52 has a so-called electronic shutter function that controls the charge accumulation time (shutter speed) of each photosensor according to the timing of the shutter gate pulse.
[0027]
The signal charge accumulated in each photosensor is sequentially read out as a voltage signal (image signal) corresponding to the signal charge based on a pulse given from the CCD driver 54. The image signal output from the CCD 52 is sent to the analog processing unit 56. The analog processing unit 56 includes signal processing circuits such as a sampling hold circuit, a color separation circuit, and a gain adjustment circuit. The analog processing unit 56 performs correlated double sampling (CDS) processing and R, G, B color signals. Color separation processing is performed, and signal level adjustment (pre-white balance processing) of each color signal is performed.
[0028]
The signal output from the analog processing unit 56 is converted into a digital signal by the A / D converter 58 and then stored in the memory 60. The timing generator (TG) 62 gives timing signals to the CCD driver 54, the analog processing unit 56, and the A / D converter 58 in accordance with instructions from the CPU 64, and the circuits are synchronized by this timing signal. .
[0029]
The data stored in the memory 60 is sent to the signal processing unit 68 via the bus 66. The signal processing unit 68 is an image processing unit composed of a digital signal processor (DSP) including a luminance / color difference signal generation circuit, a gamma correction circuit, a sharpness correction circuit, a contrast correction circuit, a white balance correction circuit, and the like. The image signal is processed according to the command.
[0030]
The image data input to the signal processing unit 68 is converted into a luminance signal (Y signal) and a color difference signal (Cr, Cb signal) and is subjected to predetermined processing such as gamma correction and then stored in the memory 60. Is done. When the captured image is displayed and output, the image data is read from the memory 60 and transferred to the display memory 70. The data stored in the display memory 70 is converted into a predetermined display signal (for example, an NTSC color composite video signal), and then the liquid crystal monitor (LCD) 30 via the D / A converter 72. Is output. Thus, the image content of the image data is displayed on the screen of the liquid crystal monitor 30.
[0031]
The image data in the memory 60 is periodically rewritten by the image signal output from the CCD 52, and the video signal generated from the image data is supplied to the liquid crystal monitor 30, whereby the image input via the CCD 52 is real-time. Is displayed on the liquid crystal monitor 30. The photographer can confirm the shooting angle of view with an image (through image) displayed on the liquid crystal monitor 30 or the optical viewfinder 28.
[0032]
When the photographer operates the zoom switch 32, the instruction signal is input to the CPU 64, and the CPU 64 controls the zoom drive unit 74 based on the signal from the zoom switch 32 to move the zoom lens 46 in the tele (TELE) direction or wide ( Move in the (WIDE) direction. The zoom driving unit 74 includes a motor (not shown), and the zoom lens 46 is driven by the driving force of the motor. The position (zoom position) of the zoom lens 46 is detected by a zoom position sensor 76, and a detection signal from the sensor 76 is input to the CPU 64.
[0033]
Similarly, the focus driving unit 78 includes a motor (not shown), and the focus lens 48 moves back and forth along the optical axis by the driving force of the motor. The position (focus position) of the focus lens 48 is detected by a focus position sensor 80, and a detection signal from the sensor 80 is input to the CPU 64.
[0034]
When the still image shooting mode is set by the power mode switch 20 and the shutter button 18 is pressed, a shooting start instruction (release ON) signal is issued. The CPU 64 detects the release ON signal and executes a recording imaging operation. That is, the CPU 64 controls the focus drive unit 78 based on the result of evaluation value calculation described later to move the focus lens 48 to the in-focus position, and controls the aperture diameter of the diaphragm 50 and the electronic shutter of the CCD 52. Perform exposure control. Further, the CPU 64 sends a command to the strobe control circuit 82 as necessary to control the light emission of the slot light emitting unit 16.
[0035]
In this way, in response to the pressing operation of the shutter button 18, the capturing of the image data for recording is started. When the mode for compressing and recording image data is selected, the CPU 64 sends a command to the compression / decompression circuit 84. The compression / decompression circuit 84 compresses the image data taken into the memory 60 in accordance with JPEG or another predetermined format.
[0036]
The compressed image data is recorded on the memory card 24 via the card interface 86. When the mode for recording non-compressed image data (non-compression mode) is selected, the compression processing by the compression / decompression circuit 84 is omitted, and the image data is recorded on the memory card 24 without being compressed.
[0037]
In the digital camera 10 of this example, for example, smart media (Solid-State Floppy Disk Card) is applied as means for storing image data. The form of the recording medium is not limited to this, and it may be a PC card, a compact flash, a magnetic disk, an optical disk, a magneto-optical disk, a memory stick, etc., and read / write according to an electronic, magnetic, optical, or a combination thereof. Various possible media can be used. A signal processing means and an interface corresponding to the medium to be used are applied. A configuration in which a plurality of media can be mounted regardless of different types or the same type of recording media may be adopted. The means for storing the image file is not limited to the removable medium that can be attached to and detached from the camera body, but may be a recording medium (internal memory) built in the digital camera 10.
[0038]
When the playback mode is set by the power mode switch 20, the image file is read from the memory card 24. The read image data is decompressed by the compression / decompression circuit 84 as necessary, and is output to the liquid crystal monitor 30 via the display memory 70.
[0039]
The CPU 64 is a control unit that performs overall control of each circuit of the camera system. The CPU 64 controls the operation of the corresponding circuit based on input signals received from the power mode switch 20, shutter button 18, zoom switch 32, and other operation units, and performs display control and autofocus (AF) on the liquid crystal monitor 30. Control and automatic exposure (AE) control are performed.
[0040]
Here, the autofocus control will be described. The image signal converted into a digital signal by the A / D converter 58 is input to the evaluation value calculation unit 88. The evaluation value calculation unit 88 includes a high frequency component extraction circuit 90 and an integration circuit 92. The evaluation value calculation unit 88 samples the G component data in the input image signal and describes an AF detection target area (denoted by reference numeral 94 in FIG. The high-frequency component in the area) is extracted and its absolute value is obtained, and the value (equivalent to the evaluation value) obtained by integrating the absolute value data in the focus area 94 is provided to the CPU 64.
[0041]
The target area for AF detection does not have to be the entire image area, and a partial area at the center of the image is set as the focus area 94 as shown in FIG. During the AF operation, the CPU 64 detects the contrast of the central portion of the image at a plurality of AF detection points (search points) while moving the focus lens 48 from infinity to close (or close to infinity) within the focus adjustment region. The evaluation value is calculated. Then, by combining the evaluation values calculated at each point, the lens position where the evaluation value is maximum is determined as the in-focus position, and the focus driving unit 78 is moved so as to move the focus lens 48 to the obtained in-focus position. Control.
[0042]
As the focal length of the photographic lens 12 becomes longer and the aperture diameter of the stop 50 becomes larger, the depth of field becomes shallower, and the amount of lens driving from infinity to the closest distance increases. FIG. 5 shows the relationship between the focal length of the photographic lens 12 and the focus adjustment region 300. The figure shows an example of the photographing lens 12 whose focal length can be changed stepwise from 7 mm to 21 mm. As the focal length of the photographing lens 12 becomes longer, the focus adjustment region 300 by the focus lens 48 becomes wider. For example, when the focal length is 7 mm, the movable range of the focus lens 48 from infinity to the nearest distance is 8.17 μm, and the focus adjustment region 300 when the focal length is 21 mm is 735 μm.
[0043]
The CPU 64 determines the AF step width 302 indicating the width of the lens position (search point) for calculating the evaluation value and the number of step steps (number of detection points) in accordance with the focus adjustment region 300 that varies in accordance with the focal length of the photographing lens 12. Set.
[0044]
As for the number of focus steps, the focus adjustment region 300 at each focal length may be equally divided by the AF step width 302, or the short-distance (closest limit) side AF step width 302 is shorter than the infinity side, The number of search points on the side may be increased to increase the focus accuracy.
[0045]
As shown in FIG. 5, as the focal length of the photographic lens 12 becomes longer, the focus adjustment area 300 becomes wider, and it becomes difficult to determine where the subject is in that area. Therefore, in the present embodiment, as shown in FIG. 6, the initial position and search direction of the AF search are changed according to the relationship between the current focus position and the focus adjustment area 300. That is, as shown in FIG. 6A, when the current position is on the far side from the intermediate position M of the focus adjustment region 300, first, focus driving is performed at infinity, and AF is performed from infinity toward the nearest. The search is executed and the evaluation value is acquired at each point. In the example of FIG. 9A, the evaluation value gradually increases with the focus movement by the AF search operation toward the closest direction (NEAR direction). Eventually, the evaluation value starts to decrease beyond the peak of the evaluation value, and the AF search is interrupted when a predetermined condition is satisfied. Then, the focus lens 48 is moved to a focus position (focus position) corresponding to the detected peak position to obtain a focus state.
[0046]
Conversely, as shown in FIG. 6B, when the current focus position is closer to the intermediate position M than the intermediate position M, first, the focus is driven to the closest side, and AF from the closest limit toward infinity is performed. Perform a search to obtain an evaluation value at each point. According to FIG. 5B, the evaluation value gradually increases with the focus movement by the search operation toward the infinity direction (FAR direction), and when the evaluation value starts to decrease beyond the peak and satisfies a predetermined condition. AF search is interrupted. Then, the focus lens is moved to a focus position (focus position) corresponding to the detected peak position to obtain an in-focus state.
[0047]
As described above, since the AF search direction is automatically selected according to the current focus position, the average time for driving the focus lens 48 to the search start position (initial position) can be shortened. In addition, when the shutter button 18 is half-pressed continuously, the subject distance hardly changes during this time, and the AF search time at the time of repetition becomes high.
[0048]
FIG. 7 shows a flowchart of AF control. When AF processing is started by half-pressing the shutter button 18, the CPU 64 first sets the focus area 94 (step S110). For example, the shooting screen is divided into 64 blocks of 8 × 8 with the same area, and a predetermined plurality of blocks in the center portion are set as the focus area 94 for evaluation value calculation.
[0049]
Next, the state of the “peak present flag” is cleared, and the peak present flag = OFF is set as an initial setting (step S112). Thereafter, the current value of the focal length of the photographic lens 12, that is, information on the current zoom position (ZOOMPOS) is acquired (step S114). After step S114, the process proceeds to step S116, and calculation processing for determining the initial position of the AF search is performed. The contents of the focus lens initial position calculation process will be described later with reference to FIG.
[0050]
In accordance with the result of the focus lens initial position calculation process in step S116 of FIG. 7, the focus lens 48 is moved to the initial position (step S118).
[0051]
In the subsequent step S120, an evaluation value at the current focus stage (search point) is calculated, and the obtained evaluation value is input to the CPU 64. The CPU 64 stores the evaluation value at the search point in a memory (not shown).
[0052]
Next, the process proceeds to step S122, and a process for determining whether or not to interrupt the AF search operation is performed. The contents of the interruption determination process will be described later with reference to FIG. Based on the result of the interruption determination process in step S122 of FIG. 7, the CPU 64 determines whether the AF search operation is continued / interrupted (step S124). In the case of “Continue”, the process proceeds to step S126, and it is determined whether or not the focus lens 48 has reached the final position of the search point.
[0053]
If NO is determined in step S126, the process proceeds to step S128, the focus lens 48 is moved from the current focus stage by one search step (AF step width 302), and the process returns to step S120. Thus, the evaluation value is calculated from the frame image data that is moved to the next search point and has a different focus position. The processing in steps S120 to S128 is repeated for each point in the focus adjustment area 300, and the evaluation value of each point is sequentially acquired.
[0054]
If the focus lens 48 has reached the final position in step S126, or if a determination of “interruption” is obtained in step S124, the process proceeds to step S130. In step S130, the position (focus position) at which the maximum evaluation value is obtained is obtained from the result of the evaluation value obtained at each point, and the focus lens 48 is moved to the focus position. The focus lens 48 is held at the in-focus position until the half-pressed state of the shutter button 18 is released. At the same time, the operation of the evaluation value calculation unit 88 is stopped, and the photographing / recording permission state is set (step S132). Thus, the automatic focus adjustment process ends.
[0055]
When the photographing and recording permission state is obtained, the operation state of the shutter button 18 is confirmed by the CPU 64, and the subject is imaged by the current zoom position and the focused focus position in response to the full depression of the shutter button 18. Image data that has undergone predetermined signal processing is recorded in the memory card 24 together with the attached information.
[0056]
FIG. 8 is a flowchart showing the procedure of the initial position calculation process. After step S114 described in FIG. 7, the process proceeds to a subroutine of FIG. 8 as step S116. In this initial position calculation process, first, information on the current focus position (P) is acquired (step S210). Next, after acquiring information on the near side position (N) and the infinity side position (I) that define the focus adjustment region 300 (step S212), an intermediate position M in the focus search range is expressed by the following equation (1):
[0057]
[Expression 1]
M = (I + N) / 2 (1)
(Step S214).
[0058]
Then, it is determined whether the current focus position (P) is on the infinity side or the near side with respect to the intermediate position M (step S216). If the current position is on the infinity side, the process proceeds to step S218. In step S218, the focus initial position that is the AF search start position is determined to be “infinity”, and the far lens driving direction during AF search is determined to be the direction from infinity toward the near side.
[0059]
On the other hand, in step S216, when the current position is on the near side, the process proceeds to step S220. In step S220, the focus initial position, which is the AF search start position, is determined to be “close”, and the far lens driving direction at the time of AF search is determined to be a direction from close to infinity. In FIG. 8, whether or not “P <M” is determined in step S216. If the current position matches the intermediate position M, the process proceeds to step S220, but the current position is the intermediate position. When the value coincides with M, the focus initial position may be set to the infinity side.
[0060]
When the focus initial position and the search direction are determined in step S218 or step S220, this subroutine is terminated and the process returns to the flowchart of FIG.
[0061]
Instead of the initial position calculation process described with reference to FIG. 8, a mode in which the initial focus position and the search direction are determined according to the current zoom position is also possible. In a camera equipped with a zoom function, when considering the shooting distance, the subject is often at a far distance on the telephoto side, and is often on the close side on the wide side. From this point of view, it is possible to perform a high-speed focus search by changing the focus search direction according to the focal length.
[0062]
FIG. 9 shows an example of the focus search direction at each zoom position. According to the figure, the photographing lens 12 can be stopped at eleven zoom positions from the wide end to the tele end, and a focus search direction is defined for each zoom position. When the current zoom position is in the range from the wide zoom position “0” to “4”, the initial focus position is set to the nearest (NEAR), and the search operation is performed from the nearest (NEAR) to infinity (FAR). I do. When the current zoom position is in the range of “5” to “10” on the tele side, the initial focus position is set to infinity (FAR), and the search operation is performed from infinity (FAR) to the nearest (NEAR). I do.
[0063]
A table as shown in FIG. 9 is stored in the non-volatile memory, and the search direction is determined with reference to the table at the start of the AF search. That is, the process proceeds to the subroutine shown in FIG. 10 as step S116 in FIG. 7. In step S310, the initial focus position and search direction are determined with reference to the table in FIG. It is also possible to return to the flowchart.
[0064]
Next, still another aspect of the initial position calculation process will be described.
[0065]
In FIG. 6 described above, it is determined whether the current focus position is on the infinity side or the close side with reference to the intermediate position M of the focus range. However, the reference position (switch It is also possible to change the position) according to the zoom position. For example, as shown in FIG. 11, the switching position M ′ is defined as a position of m% of the entire focus adjustment region starting from infinity, and this switching position coefficient m (%) is determined according to the zoom position. Prepare as a table in advance. Then, the switching position M ′ is determined with reference to the table from the current zoom position.
[0066]
As shown in FIG. 5A, when the current position is on the infinity side with respect to the switching position M ′, first, the focus is driven to infinity, and AF search is performed from infinity to the closest position. Get evaluation value with points.
[0067]
On the other hand, as shown in FIG. 11B, when the current focus position is closer to the switching position M ′, first, the focus drive is performed first, and the AF search is performed from the nearest distance to infinity. Run to get an evaluation value at each point.
[0068]
For example, on the wide side of the zoom, the intermediate position M (m = 50%) of the focus adjustment area is set as the switching position M ′, and the switching position M ′ is shifted to the closest side as the zoom moves to the telephoto side. By doing so, the probability that the initial focus position is on the infinity side increases as the zoom is on the tele side. Since it is considered that the subject is often at a long distance when shooting on the tele side, it is highly possible that the peak of the evaluation value can be detected early by starting the AF search from the infinity side. Combined with the AF search interruption process, the average AF process time can be further shortened.
[0069]
FIG. 12 is a flowchart of a calculation process for determining the initial focus position by changing the switching position M ′. Instead of the flowchart described in FIG. 8, the initial position calculation process shown in FIG. 12 can be applied. According to the figure, first, information on the current focus position (P) is acquired (step S410). Next, after acquiring information on the near side position (N) and the infinity side position (I) (step S412), the switching position M ′ is expressed by the following equation (2):
[0070]
[Expression 2]
M ′ = (IN) × m (2)
(Step S414). Here, m represents a switching position coefficient (%).
[0071]
Then, it is determined whether the current focus position (P) is on the infinity side or the near side with respect to the switching position M ′ (step S416). If the current position is on the infinity side, the process proceeds to step S418. In step S418, the initial focus position as the AF search start position is determined to be “infinity”, and the lens driving direction during the AF search is determined to be a direction from infinity toward the closest side.
[0072]
On the other hand, if it is determined in step S416 that the current position is on the near side, the process proceeds to step S420. In step S420, the focus initial position, which is the AF search start position, is determined to be “close”, and the lens driving direction during AF search is determined as a direction from close to infinity. When the focus initial position and the search direction are determined in step S418 or step S420, this subroutine is terminated and the process returns to the flowchart of FIG.
[0073]
As a modification of the form described in FIG. 12, a table as shown in FIG. 13 may be used. According to the figure, at the wide end of the zoom, regardless of the current focus position, it is set to always drive to the NEAR side during AF search and to perform the search operation from the near (NEAR) to infinity (FAR) direction. ing. Thereby, the AF search is always started from the NEAR side near the wide end.
[0074]
Further, in the zoom middle region, when the current focus position is on the infinity side from the switching position M ′ defined by the switching position coefficient (m), the FAR side is closer to the switching position M ′. The AF search is started from the NEAR side, and the AF search is always started from the FAR side near the tele end. As described above, by adopting a method of determining the AF search direction in consideration of the current zoom position and focus position in total, finer control becomes possible.
[0075]
Next, the contents of control when the AF search operation is interrupted will be described. FIG. 14 shows an example in which an evaluation value is acquired by AF search. When there is only one main subject in the focus area 94, only one evaluation value peak appears as shown in FIG. In this case, the focus lens 48 may be moved here with the lens position (P) where the peak is detected as the in-focus position. On the other hand, as shown in FIG. 15, when there are a plurality of subjects in the focus area 94, it is not possible to focus on both subjects, and focus is performed on one of the subjects. There is a need.
[0076]
FIG. 16 shows an example of an evaluation value acquisition result when there are a plurality of subjects in the focus area 94. As shown in the figure, when there are a plurality of subjects in the focus area 94, there are a plurality of peaks in the evaluation value curve. When detecting one mountain and ending the AF search, only one mountain can be detected, and a plurality of mountains cannot be detected. For example, in FIG. 16, when the AF search operation is started from the infinity side and the AF search operation is terminated when the peak at the infinity side is detected, another peak on the near side can be detected. Therefore, it is impossible to focus on the closest main subject.
[0077]
As another method, it is possible to focus on the first mountain by always starting the AF search operation from the closest side, but in the case of a high-power zoom lens, a situation where a subject at a long distance is photographed Therefore, it can be said that it is preferable to start the search from the infinity side in consideration of high speed AF processing.
[0078]
Therefore, in the present embodiment, the following measures are taken in order to realize an efficient AF search operation. That is, comparing FIG. 14 with FIG. 16, in the graph of FIG. 14, after the peak of the evaluation value was detected by the AF search operation from infinity to the closest distance, the evaluation value was further acquired by moving the lens in the same direction. In this case, when the focus lens 48 moves away from the peak position P by a certain distance d, the evaluation value decreases to near zero level. On the other hand, when there are a plurality of subjects as shown in FIG. 16, the first peak is detected. Since then, the evaluation value has started to increase again without falling to near zero level.
[0079]
Focusing on this fact, if the evaluation value at a position that is a fixed distance d away from the lens position where the peak of the evaluation value is detected is equal to or smaller than a predetermined threshold T, it is determined that there is no subject ahead, and AF When the search is finished, the focus lens 48 is driven to the detected first peak position.
[0080]
On the other hand, if the evaluation value at a position that is a certain distance d away from the lens position where the peak of the evaluation value is detected is a value larger than the predetermined threshold T, another subject may exist beyond that. And the AF search operation in the same direction is continued. The distance d from the peak position P is preferably set to about 10 to 20 times the allowable circle of confusion. When a plurality of peaks are detected by the AF search operation, the closest peak position is determined as the focus position.
[0081]
By the way, when the subject is dark, noise of the imaging signal is generated, and as shown in FIG. 17, there may be a situation where the evaluation value does not become the threshold value T or less even if there is only one peak. However, as can be seen from a comparison between FIG. 17 and FIG. 16, when another subject is present on the closest side (FIG. 16), there is a tendency for the evaluation value to increase from a position somewhat before the closest distance. On the other hand, if the evaluation value does not decrease due to noise or the like (FIG. 17), the evaluation value does not turn to an increasing trend even if it is a certain distance w or more before the closest distance.
[0082]
  Therefore, from the nearestPredetermined amountJudging whether the evaluation value is in an increasing direction at a distance greater than wInTherefore, it is possible to determine whether another subject exists on the close side. From the nearestPredetermined amountIf the evaluation value beyond w is not in the increasing direction, it is determined that there is no subject on the close side, and the AF search operation is terminated, and focus driving is performed at the lens position where the peak is detected. In addition,Predetermined amountIt is preferable to set w to about 5 to 10 times the allowable circle of confusion. Although the close side has been described with reference to FIG. 17, the AF search operation in the FAR direction is similarly performed from infinity.Predetermined amountIf the evaluation value does not tend to increase at a position separated by w, it can be determined that the subject exists on the infinity side.
[0083]
FIG. 18 is a flowchart of the interruption determination process. As a step S122 after the step S120 described with reference to FIG. When the interruption determination process starts, first, it is determined whether or not a peak whose evaluation value turns from increasing to decreasing is detected (step S510). This determination is made based on the state of a “peak present flag” described later.
[0084]
If no peak is detected in step S510 (NO determination), the process proceeds to step S512 to determine whether or not the evaluation value has decreased. If NO is obtained in step S512, it is determined to continue the evaluation value acquisition process (step S518), the present subroutine is terminated, and the process returns to the flowchart of FIG.
[0085]
If it is detected in step S512 that the evaluation value has decreased, the process branches to step S514. In step S514, it is determined whether or not the evaluation value before decreasing tends to increase. If YES is obtained in step S514, the “peak present flag” is set to ON and the data of the variable P indicating the focus position (peak position) where the peak is detected is updated (step S516). After step S516 or when NO determination is obtained in step S514, the process proceeds to step S518, and the continuation of the evaluation value acquisition process is determined.
[0086]
When the “peak flag” is set to ON, a YES determination is made in step S510. In this case, the process proceeds to step S520, and it is determined whether or not the search direction is the NEAR direction. When the search direction is the NEAR direction (when YES is determined), it is determined whether or not the current focus position (search point) is on the near side beyond a predetermined distance (d) from the peak position P ( Step S522). If the current position is within a predetermined distance d from the peak position P (NO determination), the process proceeds to step S528, and it is determined whether the number of remaining detection points in the search direction is smaller than a predetermined value (w). I do. The predetermined value w is a value corresponding to the distance w described in FIG.
[0087]
In step S528, when the number of remaining detection points is equal to or greater than the predetermined value w (NO determination), it is determined to continue the evaluation value acquisition process (step S532), and the process returns to the flowchart of FIG. On the other hand, when a YES determination is obtained in step S528, the process proceeds to step S530 to determine whether or not the evaluation value has increased.
[0088]
If an increase in the evaluation value is detected in step S530 (during YES determination), the process proceeds to step S532 to decide to continue the evaluation value acquisition process (step S532), but if the evaluation value has not increased in step S530 ( When the determination is NO, the process proceeds to step S536, where the interruption of the evaluation value acquisition process is determined, and the process returns to the main routine of FIG.
[0089]
Further, when the current focus position is on the near side beyond the predetermined distance d from the peak position P in step S522 (when YES is determined), the process branches to step S524. In step S524, it is determined whether or not the evaluation value at the current focus position is smaller than a predetermined threshold T.
[0090]
If the evaluation value is equal to or greater than the threshold T in step S524 (NO determination), the process proceeds to step S528 in consideration of the possibility that the subject is present closer to the current position. On the other hand, if the evaluation value is smaller than the threshold value T in step S524 (when YES is determined), it is determined that no subject is present closer to the current position, and interruption of the evaluation value acquisition process is determined ( Step S536).
[0091]
If NO in step S520, that is, if the search direction is the FAR direction, the process proceeds to step S526. In step S526, it is determined whether or not the evaluation value has continuously decreased a predetermined number of times. A reference value serving as a criterion for determining the number of consecutive reductions is appropriately set in consideration of the depth of field.
[0092]
When NO determination is obtained in step S526, the process proceeds to step S528, and interruption or continuation is determined in steps S528 to S536 described above. On the other hand, if YES is obtained in step S526, the process proceeds to step S538, the interruption of the evaluation value acquisition process is determined, and the process returns to the flowchart of FIG.
[0093]
By following the interruption determination process shown in FIG. 18, the peak of the evaluation value corresponding to the subject can be detected accurately and quickly in both the NEAR direction and the FAR direction, and the AF process can be speeded up. realizable.
[0094]
Next, an example of control that can achieve a further increase in AF processing speed will be described. As described above with reference to FIG. 5, as the focal length of the photographic lens 12 increases, the focus feed amount (number of pulses) in the focus adjustment region 300 (from infinity to the nearest) increases and the AF time increases. Therefore, the “rough search” is first performed to obtain the evaluation value in the AF search step in which the focus feed amount is increased, and when the approximate focus position is detected by the rough search, the search step in which the focus feed amount is further reduced in the vicinity region. It is preferable to perform a “detailed search” for obtaining an evaluation value.
[0095]
FIG. 19 shows a conceptual diagram of rough search and detailed search. In the figure, it is assumed that the focus feed amount from infinity to the nearest is 240 pulses, the number of focus feed pulses during rough search is set to 20 pulses, and the number of focus feed pulses during detailed search is set to 2 pulses.
[0096]
According to the figure, first, a rough search is started in the NEAR direction from infinity. In the rough search, the search point is changed every 20 pulses, the evaluation value is calculated at each point, and the interruption determination process as described in FIG. 18 is performed.
[0097]
When a peak is detected in the rough search and, for example, the interruption of the evaluation value acquisition process is determined at the position of 100 pulses, the focus is moved to the initial position (Pds) of the detailed search, and the detailed search is started in this direction from here. . In the detailed search, the search point is changed every two pulses, the evaluation value is calculated at each point, and after the peak is detected, if the evaluation value decreases continuously a predetermined number of times, the interruption of the evaluation value acquisition process is determined, and the peak position ( The focus lens 48 is driven to the in-focus position.
[0098]
FIG. 20 shows a flowchart of AF control combining rough search and detailed search. In the figure, steps S610 to S628 including the rough search portion are the same processing as steps S110 to S128 of the flowchart described in FIG. Further, the interruption determination (1) process in step S622 of FIG. 20 is applied with the interruption determination process flowchart described in FIG.
[0099]
When it is determined in step S624 in FIG. 20 that “interruption” is obtained, or when the final position of the focus stage is reached in step S626, the process proceeds to step S640. In step S640, an operation for obtaining the range of the detailed search is performed based on the result of the rough search. Then, according to the obtained detailed search range, a process for driving the focus lens 48 to the detailed search start position (detail search initial position) is performed (step S642).
[0100]
Next, an initial value “0” is set in the register n of the CPU 64 (step S644), and the process proceeds to step S646. In step S646, an evaluation value at the current focus position (search point) is calculated, and the obtained evaluation value is input to the CPU 64. The CPU 64 stores the evaluation value at the search point in a memory (not shown).
[0101]
Next, the process proceeds to step S648, and a process for determining whether or not to interrupt the AF search is performed. The contents of the “interruption determination (2) process” will be described later with reference to FIG. The CPU 64 determines whether the AF search is interrupted or continued based on the result of the interruption determination (2) process (step S648) (step S650). When the determination “continuation” is obtained in step S650, the process proceeds to step S652, and it is determined whether or not the final position of the search point has been reached.
[0102]
If NO is determined in step S625, the process proceeds to step S654, the focus lens 48 is moved by one AF search step (2 pulses) from the current focus position, and the process returns to step S646. Thus, the evaluation value is calculated from the frame image data that is moved to the next search point and has a different focus position. The processing in steps S646 to S654 is repeated for each point in the detailed search range, and the evaluation value of each search point is acquired.
[0103]
If the focus lens 48 has reached the final position of the search point in step S652, or if “interruption” is determined in step S650, the process proceeds to step S660. In step S660, the position where the evaluation value is maximized is obtained from the result of the evaluation value obtained at each point, and the focus lens 48 is moved to that position (in-focus position). Thus, the photographing / recording permission state is set (step S662), and the automatic focus adjustment process is ended.
[0104]
FIG. 21 shows a flowchart of the interruption determination (2) process shown in step S648 of FIG. In this interruption determination (2) process, first, a table value “C_TABLE” corresponding to the current focal length [ZOOMPOS] is set in the register C (step S710). This is a process of setting an interruption determination value C, which is a determination criterion for determining that the AF search is interrupted when the evaluation values calculated at each focus stage (search point) continuously decrease. .
[0105]
The interruption determination value C is set to the same numerical value as the focus step number (“4” in the example of FIG. 5) or a value close thereto on the short focus side (wide side), and is set so as not to perform the interruption process substantially. ing. Further, the interruption determination value C increases as it approaches the long focus side (tele side), and is set to an integer value of about 50% to 30% of the number of focus stages.
[0106]
Next, the process proceeds to step S712, where it is determined whether or not the acquired evaluation value has decreased. When the evaluation value has not decreased (NO determination), it is determined to continue the AF search (step S722), the process exits from this subroutine, and returns to the flowchart of FIG.
[0107]
When it is determined in step S712 that the evaluation value is decreasing (YES determination), 1 is added to the value of the register n (step S714), and the value of the register n is set to the value of the register C in the subsequent step S716. It is determined whether the value is exceeded. If the value of the register n is equal to or smaller than the value of the register C (NO determination), the process proceeds to step S722 to decide to continue the AF search, and the process returns to the flowchart of FIG. Thereby, the AF search is continued until the evaluation value continuously decreases C times.
[0108]
If YES is obtained in step S716, that is, if it is detected that the evaluation value has continuously decreased C times, the process proceeds to step S718. In step S718, it is determined whether or not the difference between the maximum value (AFmax) and the minimum value (AFmin) of the evaluation values calculated by the detailed search is greater than a predetermined value K. If the difference between the evaluation values is larger than the predetermined value K (YES determination), it indicates that there is a predetermined contrast, so that the AF search is interrupted (step S720). If the difference between the evaluation values is equal to or smaller than the predetermined value K (NO determination), the process proceeds to step S722, and the continuation of the AF search is determined.
[0109]
When the determination of “interrupt” or “continue” is made in step S720 or step S722, this subroutine is terminated, and the process proceeds to step S650 in the flowchart of FIG. The processing contents thereafter are as described in FIG.
[0110]
In the above embodiment, the example in which the photographing magnification is changed by the optical zoom has been described. However, the present invention is also applied to a camera that performs a zoom operation using an electronic zoom function instead of or in combination with the optical zoom. Can do.
[0111]
<Appendix>
According to the said embodiment, invention (1)-(7) of the structure shown below can be obtained. These inventions (1) to (7) can be combined with the invention of each claim described in “Scope of claims”.
[0112]
Invention (1): In an automatic focus adjustment device that adjusts a focal position of a lens that forms an image of a subject on the image pickup means based on an image signal output from the image pickup means, the device moves the lens to a focus adjustment region. A lens moving means for moving the lens, a lens position detecting means for detecting the position of the lens, a contrast component of the subject is extracted from an image signal output from the imaging means, and an evaluation value corresponding to the contrast component is obtained. Evaluation value calculation means for calculating each movement position of the lens, direction determination means for determining a lens movement direction during a focus adjustment operation based on a current lens position detected by the lens position detection means, and the direction determination The lens movement for obtaining the evaluation value is controlled according to the determination of the means, and the lens is moved to a position where the evaluation value reaches a peak. Automatic focusing apparatus characterized by comprising control means for controlling the lens moving means so as to obtain an in-focus state, the Te.
[0113]
Invention (2): The direction determining means sets a switching position that divides the focus adjustment area into two areas, a short distance area and a long distance area, and determines the positional relationship between the current lens position and the switching position. In comparison, when the current lens position is in the short distance region, the evaluation value acquisition start position is set as the closest side, and the lens movement direction when acquiring the evaluation value is changed from the closest direction toward the infinity. On the other hand, when the current lens position is in the long distance region, the acquisition start position of the evaluation value is set to the infinity side, and the lens moving direction when acquiring the evaluation value is changed from infinity to the closest direction. The automatic focusing apparatus according to the invention (1), wherein the automatic focusing apparatus is determined.
[0114]
Invention (3): In an automatic focus adjustment device that adjusts the focal position of a lens that forms an image of a subject on the image pickup means based on an image signal output from the image pickup means, the device includes:
Lens moving means for moving the lens within a focus adjustment region;
Zoom means for changing the shooting magnification;
Zoom position detecting means for detecting a zoom position by the zoom means;
An evaluation value calculating means for extracting a contrast component of the subject from an image signal output from the imaging means and calculating an evaluation value corresponding to the contrast component for each moving position of the lens;
Direction determining means for determining a lens moving direction during a focus adjustment operation based on a current zoom position detected by the zoom position detecting means;
According to the determination of the direction determining means, the lens movement for obtaining the evaluation value is controlled, and the lens moving means is controlled so as to obtain an in-focus state by moving the lens to a position where the evaluation value reaches a peak. Control means to
An automatic focusing apparatus characterized by comprising:
[0115]
Invention (4): In the automatic focusing apparatus according to invention (3), when the current zoom position is on the wide side, the direction determination means sets the evaluation value acquisition start position as the closest side, and sets the evaluation value When the current zoom position is on the tele side, the acquisition start position of the evaluation value is set to the infinity side, and the evaluation value is set to the infinity side. An automatic focus adjustment device, wherein the lens movement direction at the time of acquisition is determined to be a direction from infinity to the closest distance.
[0116]
Invention (5): In the automatic focus adjustment apparatus according to invention (3), the apparatus has lens position detection means for detecting the position of the lens, and the direction determination means is obtained from the lens position detection means. An automatic focus adjustment apparatus, wherein the lens moving direction is determined based on a lens position to be obtained and a zoom position obtained from the zoom position detection means.
[0117]
Invention (6): In an automatic focus adjustment method for adjusting a focal position of a lens for forming an image of a subject on the image pickup means based on an image signal output from the image pickup means, the method comprises:
A lens moving step of moving the lens within a focus adjustment region;
A lens position detecting step for detecting the position of the lens;
An evaluation value calculating step of extracting a contrast component of the subject from an image signal output from the imaging means, and calculating an evaluation value corresponding to the contrast component for each movement position of the lens;
A direction determining step for determining a lens moving direction during a focus adjustment operation based on a current lens position detected by the lens position detecting unit;
An evaluation value acquisition control step for controlling lens movement for acquiring the evaluation value according to the determination in the direction determination step;
Based on the evaluation value obtained in the evaluation value acquisition control step, a control step for controlling the lens moving means so as to obtain a focused state by moving the lens to a position where the evaluation value reaches a peak;
An automatic focusing method characterized by comprising:
[0118]
Invention (7): In an automatic focus adjustment method for adjusting a focal position of a lens for forming an image of a subject on the image pickup means based on an image signal output from the image pickup means, the method comprises:
A lens moving step of moving the lens within a focus adjustment region;
A zoom position detecting step for detecting a zoom position by a zoom means for changing a photographing magnification;
An evaluation value calculating step of extracting a contrast component of the subject from an image signal output from the imaging means, and calculating an evaluation value corresponding to the contrast component for each movement position of the lens;
A direction determining step for determining a lens moving direction during a focus adjustment operation based on a current zoom position detected by the zoom position detecting unit;
An evaluation value acquisition control step of controlling lens movement for acquiring the evaluation value according to the determination of the direction determination means;
Based on the evaluation value obtained in the evaluation value acquisition control step, a control step of controlling the lens moving means so as to obtain a focused state by moving the lens to a position where the evaluation value reaches a peak;
An automatic focusing method characterized by comprising:
[0119]
【The invention's effect】
As described above, according to the present invention, after a peak of an evaluation value is detected, whether or not the peak determination is appropriate is determined based on an evaluation value at a lens position that is a predetermined amount or more away from the peak position. As a result, it is possible to increase the speed of the AF process and to accurately focus even when there are a plurality of subjects having different distances.
[Brief description of the drawings]
FIG. 1 is a front external view of a digital camera according to an embodiment of the present invention.
2 is an external view of the back side of the digital camera shown in FIG.
FIG. 3 is a block diagram showing the internal configuration of the digital camera of this example.
FIG. 4 is a diagram showing an example of a focus area set at the center of the screen
FIG. 5 is a diagram illustrating a change in an AF search step width according to a zoom position and a focus position.
FIG. 6 is a conceptual diagram illustrating an example of control for changing an AF search start position and a search direction according to a focus position at the start of AF.
FIG. 7 is a flowchart showing a control procedure for automatic focusing in the present example.
FIG. 8 is a flowchart showing the contents of the focus lens initial position calculation process shown in FIG. 7;
FIG. 9 is a table showing an example of a table for designating an AF search direction according to a zoom position.
FIG. 10 is a flowchart of initial position calculation processing using the table of FIG.
FIG. 11 is a conceptual diagram illustrating another control example in which the AF search start position and the search direction are changed according to the focus position at the start of AF.
12 is a flowchart of initial position calculation processing for carrying out the control example shown in FIG. 11;
FIG. 13 is a table showing an example of a table for designating an AF search direction according to a zoom position and a focus position.
FIG. 14 is a graph showing an example of evaluation values that change as the focus lens moves.
FIG. 15 is a diagram illustrating a state in which a plurality of subjects exist within a focus area.
FIG. 16 is a graph showing an example of evaluation values that change as the focus lens moves when there are a plurality of subjects.
FIG. 17 is a graph illustrating a phenomenon in which the evaluation value does not decrease due to the influence of noise or the like.
FIG. 18 is a flowchart showing the contents of the interruption determination process shown in FIG.
FIG. 19 is a conceptual diagram of an automatic focus adjustment operation combining a rough search and a detailed search.
FIG. 20 is a flowchart showing a control procedure of automatic focus adjustment combining rough search and detailed search.
FIG. 21 is a flowchart showing the contents of the interruption determination (2) processing shown in FIG. 20;
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 10 ... Digital camera, 12 ... Shooting lens, 46 ... Zoom lens (zoom means), 48 ... Focus lens, 52 ... CCD (imaging means), 64 ... CPU (control means, judgment means, evaluation value change detection means), 78 ... Focus drive part (lens moving means), 88 ... Evaluation value calculation part (Evaluation value calculation means)

Claims (2)

撮像手段から出力される画像信号に基づいて、前記撮像手段に被写体の像を結像させるレンズの焦点位置を調節する自動焦点調節装置において、該装置は、
前記レンズを焦点調節領域内で移動させるレンズ移動手段と、
前記撮像手段から出力される画像信号から前記被写体のコントラスト成分を抽出し、該コントラスト成分に応じた評価値を前記レンズの各移動位置毎に算出する評価値算出手段と、
前記評価値を取得するための各位置に前記レンズを移動させるように前記レンズ移動手段を制御する制御手段と、
前記焦点調節領域の端点から所定量w以上離れたレンズ位置での前記評価値の変化を検出する評価値変化検出手段と、
前記評価値算出手段で得た各位置での評価値及び前記評価値変化検出手段の検出結果に基づいて合焦状態を判断する判断手段と、
を備え、
静止画撮影における自動焦点調節において、前記制御手段は、前記焦点調節領域の一方の端点から前記レンズを移動させ、前記レンズの移動とともに取得した評価値の増減からピークがあることが検出された後にさらに評価値の取得を行うために前記レンズを移動させ、該ピークが検出された前記レンズの位置から一定量dだけ離れたレンズ位置での評価値が所定の閾値以下であると前記レンズの移動の中断を決定し、該レンズ位置での評価値が所定の閾値を超えていると前記レンズの移動の継続を決定し、前記レンズの移動を継続する場合には前記焦点調節領域の他方の端点までの残りの検出量が前記所定量w以上であると該評価値取得処理の継続を決定し、前記残りの検出量が前記所定量w未満であり、前記焦点調節領域の端点から所定量w離れた前記レンズ位置における前記評価値の増加傾向が検出されないときには前記レンズの移動の中断を決定し、前記評価値の増加傾向が検出されたときは前記レンズの移動の継続を決定し、
前記判断手段は、前記評価値のピークが複数検出されたときには、前記評価値の最大値が検出された前記レンズ位置を合焦位置と判断し、前記レンズ移動手段は該合焦位置に前記レンズを移動させることを特徴とする自動焦点調節装置。
In an automatic focusing apparatus that adjusts the focal position of a lens that forms an image of a subject on the imaging unit based on an image signal output from the imaging unit, the apparatus includes:
Lens moving means for moving the lens within a focus adjustment region;
An evaluation value calculating means for extracting a contrast component of the subject from an image signal output from the imaging means and calculating an evaluation value corresponding to the contrast component for each moving position of the lens;
Control means for controlling the lens moving means to move the lens to each position for obtaining the evaluation value;
Evaluation value change detection means for detecting a change in the evaluation value at a lens position separated by a predetermined amount w or more from an end point of the focus adjustment region;
A determination unit that determines an in-focus state based on the evaluation value at each position obtained by the evaluation value calculation unit and the detection result of the evaluation value change detection unit;
With
In automatic focus adjustment in still image shooting, the control means moves the lens from one end point of the focus adjustment area, and after detecting that there is a peak from the increase / decrease of the evaluation value acquired along with the movement of the lens Further, the lens is moved in order to obtain an evaluation value, and the lens is moved when the evaluation value at a lens position separated by a certain amount d from the position of the lens where the peak is detected is equal to or less than a predetermined threshold value. Is determined, and if the evaluation value at the lens position exceeds a predetermined threshold value, the continuation of the movement of the lens is determined. When the movement of the lens is continued, the other end point of the focus adjustment region is determined. If the remaining detection amount up to the predetermined amount w is greater than or equal to the predetermined amount w, the continuation of the evaluation value acquisition process is determined, the remaining detection amount is less than the predetermined amount w, and predetermined from the end point of the focus adjustment region When the increase of the evaluation value in the lens position away w is not detected, it determines the interruption of the movement of the lens, when the increase of the evaluation value is detected to determine the continuation of the movement of the lens,
When a plurality of peaks of the evaluation value are detected, the determination unit determines that the lens position where the maximum value of the evaluation value is detected is an in-focus position, and the lens moving unit sets the lens at the in-focus position. An automatic focusing device characterized by moving the lens.
撮像手段から出力される画像信号に基づいて、前記撮像手段に被写体の像を結像させるレンズの焦点位置を調節する自動焦点調節方法において、該方法は、
前記レンズを焦点調節領域内で移動させるレンズ移動工程と、
前記撮像手段から出力される画像信号から前記被写体のコントラスト成分を抽出し、該コントラスト成分に応じた評価値を前記レンズの各移動位置毎に算出する評価値算出工程と、
前記評価値を取得するための各位置に前記レンズを移動させるように前記レンズ移動手段を制御する制御工程と、
前記焦点調節領域の端点から所定量w以上離れたレンズ位置での前記評価値の変化を検出する評価値変化検出工程と、
前記評価値算出手段で得た各位置での評価値及び前記評価値変化検出手段の検出結果に基づいて合焦状態を判断する判断工程と、
を含み、
静止画撮影における自動焦点調節において、前記制御工程は、前記焦点調節領域の一方の端点から前記レンズを移動させ、前記レンズの移動とともに取得した評価値の増減からピークがあることが検出された後にさらに評価値の取得を行うために前記レンズを移動させ、該ピークが検出された前記レンズの位置から一定量dだけ離れたレンズ位置での評価値が所定の閾値以下であると前記レンズの移動の中断を決定し、該レンズ位置での評価値が所定の閾値を超えていると前記レンズの移動の継続を決定し、前記レンズの移動を継続する場合には前記焦点調節領域の他方の端点までの残りの検出量が前記所定量w以上であると該評価値取得処理の継続を決定し、前記残りの検出量が前記所定量w未満であり、前記焦点調節領域の端点から所定量w離れた前記レンズ位置における前記評価値の増加傾向が検出されないときには前記レンズの移動の中断を決定し、前記評価値の増加傾向が検出されたときは前記レンズの移動の継続を決定し、
前記判断工程は、前記評価値のピークが複数検出されたときには、前記評価値の最大値が検出された前記レンズ位置を合焦位置と判断し、該合焦位置に前記レンズを移動させることを特徴とする自動焦点調節方法。
In an automatic focus adjustment method for adjusting a focus position of a lens that forms an image of a subject on the image pickup means based on an image signal output from the image pickup means, the method includes:
A lens moving step of moving the lens within a focus adjustment region;
An evaluation value calculating step of extracting a contrast component of the subject from an image signal output from the imaging means, and calculating an evaluation value corresponding to the contrast component for each movement position of the lens;
A control step for controlling the lens moving means to move the lens to each position for obtaining the evaluation value;
An evaluation value change detection step of detecting a change in the evaluation value at a lens position separated by a predetermined amount w or more from an end point of the focus adjustment region;
A determination step of determining an in-focus state based on the evaluation value at each position obtained by the evaluation value calculation unit and the detection result of the evaluation value change detection unit;
Including
In automatic focus adjustment in still image shooting, the control step moves the lens from one end point of the focus adjustment area, and after detecting that there is a peak from the increase / decrease in the evaluation value acquired along with the movement of the lens Further, the lens is moved in order to obtain an evaluation value, and the lens is moved when the evaluation value at a lens position separated by a certain amount d from the position of the lens where the peak is detected is equal to or less than a predetermined threshold value. Is determined, and if the evaluation value at the lens position exceeds a predetermined threshold value, the continuation of the movement of the lens is determined. When the movement of the lens is continued, the other end point of the focus adjustment region is determined. If the remaining detection amount up to the predetermined amount w is greater than or equal to the predetermined amount w, the continuation of the evaluation value acquisition process is determined, the remaining detection amount is less than the predetermined amount w, and predetermined from the end point of the focus adjustment region When the increase of the evaluation value in the lens position away w is not detected, it determines the interruption of the movement of the lens, when the increase of the evaluation value is detected to determine the continuation of the movement of the lens,
In the determination step, when a plurality of peaks of the evaluation value are detected, the lens position where the maximum value of the evaluation value is detected is determined as an in-focus position, and the lens is moved to the in-focus position. A feature of automatic focus adjustment.
JP2000263355A 2000-08-31 2000-08-31 Automatic focusing apparatus and method Expired - Fee Related JP4320767B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000263355A JP4320767B2 (en) 2000-08-31 2000-08-31 Automatic focusing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000263355A JP4320767B2 (en) 2000-08-31 2000-08-31 Automatic focusing apparatus and method

Publications (2)

Publication Number Publication Date
JP2002072073A JP2002072073A (en) 2002-03-12
JP4320767B2 true JP4320767B2 (en) 2009-08-26

Family

ID=18750910

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000263355A Expired - Fee Related JP4320767B2 (en) 2000-08-31 2000-08-31 Automatic focusing apparatus and method

Country Status (1)

Country Link
JP (1) JP4320767B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004077959A (en) 2002-08-21 2004-03-11 Nikon Corp Focus adjusting method and camera
EP1679546B1 (en) 2005-01-07 2014-12-24 Canon Kabushiki Kaisha Focus control method and focus control apparatus
EP1901359B1 (en) 2005-11-21 2009-05-27 Fujinon Corporation Actuator driving control device and actuator driving control method
JP2007140292A (en) * 2005-11-21 2007-06-07 Fujinon Corp Drive control device and drive control method
JP5202270B2 (en) 2008-12-12 2013-06-05 キヤノン株式会社 Imaging device
KR101593995B1 (en) * 2009-09-22 2016-02-15 삼성전자주식회사 Method for Auto focusing medium for recording the method and apparatus applying the method
KR101133024B1 (en) * 2010-11-11 2012-04-09 고려대학교 산학협력단 Apparatus and method for training based auto-focusing
CN113109936B (en) * 2021-04-08 2022-03-11 西南石油大学 Microscope automatic focusing method and device based on image definition evaluation

Also Published As

Publication number Publication date
JP2002072073A (en) 2002-03-12

Similar Documents

Publication Publication Date Title
JP4649715B2 (en) Automatic focus adjustment device
JP2002318341A (en) Device and method for automatic focusing
US7889985B2 (en) Imaging apparatus
KR101131697B1 (en) Image pickup apparatus, method of controlling image pickup and computer readable recording medium
EP1679546B1 (en) Focus control method and focus control apparatus
US10027877B2 (en) Image pickup apparatus to perform scanning of focus lens
US7634185B2 (en) Focusing device, image pickup apparatus, and control method
JP2007178576A (en) Imaging apparatus and program therefor
US7298411B2 (en) Digital camera
JP2007140278A (en) Digital camera, exposure condition setting method
JP4645413B2 (en) Imaging device
JP2003307669A (en) Camera
JP2002311325A (en) Automatic focusing device and method
JP4320767B2 (en) Automatic focusing apparatus and method
JP3952254B2 (en) Method and apparatus for generating focused sound
JP2019133026A (en) Imaging apparatus and focus adjustment method thereof, and program
JP2006325194A (en) Image sensing apparatus and control method therefor
JP4565370B2 (en) Electronic camera and autofocus control method
JP2007318534A (en) Imaging device
JP4106485B2 (en) camera
JP2004120225A (en) Digital camera
JP6660236B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP2004205792A (en) Automatic focusing control method and image recording device
JP2006235059A (en) Photographing device
JP4055463B2 (en) camera

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050915

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20061204

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080613

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080619

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080818

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080908

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081107

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20081215

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090206

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20090219

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090310

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090409

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090524

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4320767

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120612

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120612

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130612

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees