JP2004272033A - Automatic focusing device - Google Patents

Automatic focusing device Download PDF

Info

Publication number
JP2004272033A
JP2004272033A JP2003064472A JP2003064472A JP2004272033A JP 2004272033 A JP2004272033 A JP 2004272033A JP 2003064472 A JP2003064472 A JP 2003064472A JP 2003064472 A JP2003064472 A JP 2003064472A JP 2004272033 A JP2004272033 A JP 2004272033A
Authority
JP
Japan
Prior art keywords
value
signal
focus
evaluation
reliability
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003064472A
Other languages
Japanese (ja)
Inventor
Kazuki Konishi
一樹 小西
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2003064472A priority Critical patent/JP2004272033A/en
Publication of JP2004272033A publication Critical patent/JP2004272033A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To improve the focusing rate for a low-contrast subject by deciding the reliability of an AF evaluation signal with high accuracy. <P>SOLUTION: The automatic focusing device has a focusing means for adjusting the focus of a subject image formed on an image pickup means, and a focusing position detection means for detecting the focusing position based on a focus evaluation signal generated by an image signal from the image pickup means while driving the focusing means. The focusing position detection means decides the reliability of the focus evaluation signal based on the length of a section where the signal is monotonously decreased, the mean value of the inclination of the section where the signal is monotonously decreased and a difference between the maximum value and the minimum value of the signal and detects the focusing position based on the result of the decision. Whether or not the focus evaluation signal is monotonously decreased is decided by using a difference from a point separated from an adjacent data acquiring point (S402). <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、撮像光学系により結像される被写体像を光電変換する撮像素子により取得される画像信号を使用して、焦点調整を行う自動焦点調整装置に関するものである。
【0002】
【従来の技術】
従来より、画像信号から所定の高周波成分を検出し、その出力信号を最大とするようにすることで合焦動作を行う自動焦点調整装置において、その高周波成分を検出した出力信号の信頼性を評価する方法が、特許文献1などに提案されている。
【0003】
上記特許文献1の自動焦点調整装置における目的は、「撮影像が合焦不能な低コントラスト被写体であることをフォーカスレンズを動かすことなく自動的に瞬時に判定し、フォーカスレンズの無駄な動きを抑制するとともに、撮影者にそのことを報知して他の合焦しやすい被写体での撮影を促すことを可能にする」ものであり、その構成については以下のように記載されている。
【0004】
まず、1フィールドの所定範囲の輝度信号の最大値と最小値を求め、次に最大値から最小値を減算して輝度の幅を求め、さらにこの幅と第1のしきい値を比較する。ここで輝度の幅が第1のしきい値より小さいときは、この最大値および最小値を中間輝度レベルと比較する。この比較結果がともに大またはともに小であったときは、焦点の調整が不能であることを示す信号を出力する。
【0005】
【特許文献1】
特開平6−125493号公報
【0006】
【発明が解決しようとする課題】
しかしながら、上述従来例では、輝度信号の最大値と最小値の差(輝度の幅)によりその高周波成分を検出した焦点評価信号(以下、AF評価信号とも記す)の信頼性を判定している。
【0007】
AF評価信号は遠近競合の特殊な場合を除けば、横軸に距離、縦軸にAF評価値をとると、その形は山状になる。従って、被写体のコントラストが低く、最大値と最小値の差が小さくとも山状の信号が出力されていれば、AF評価信号の信頼性は高く良好な合焦動作が期待できる。しかし輝度信号の最大値と最小値で信頼性を判定している従来例においては、信号の形状を知ることができないため、低輝度の場合にノイズなどの影響により、AF評価信号の信頼性をきちんと評価できない。
【0008】
低輝度でのノイズによる影響を考慮すると、最大値と最小値の差のしきい値は大きい値にする必要があり、その場合は、山状の信号が出力されていてもコントラストの低い被写体のAF評価信号をNGと判定してしまうことがある。詳しくは、コントラストの低い被写体の場合、山状の信号が出力されてAFが可能でも、輝度信号の最大値と最小値の差が小さいため、AF評価信号がNGと判定されてしまう。また、AF評価信号自体の信頼性を他の信号(輝度信号)で判定していないため、判定を誤る可能性が高いという問題点もある。
【0009】
(発明の目的)
本発明の目的は、高い精度でAF評価信号の信頼性を判定し、低コントラスト被写体に対する合焦率を向上させることのできる自動焦点調整装置を提供しようとするものである。
【0010】
【課題を解決するための手段】
上記目的を達成するために、本発明は、撮影光学系により結像される被写体像を光電変換して電気的な画像信号を得る撮像手段と、前記撮像手段に形成される被写体像の焦点を調整する焦点調整手段と、前記焦点調整手段を駆動しながら前記撮像手段よりの画像信号から生成される焦点評価信号を基に合焦位置を検出する合焦位置検出手段とを有し、前記合焦位置検出手段は、前記焦点評価信号の信頼性を、その信号の単調減少している区間の長さ、単調減少している区間の傾斜の平均値、その信号の最大値と最小値の差にて判定し、該判定結果に基づいて前記合焦位置を検出する自動焦点調整装置において、前記焦点評価信号が単調減少しているか否かの判定を、隣接するデータ取得ポイントより離れたポイントとの差分を用いて行う自動焦点調整装置とするものである。
【0011】
上記構成においては、焦点評価信号の信頼性を、焦点評価信号の最大値と最小値の差、一定値以上の傾きで傾斜している区間の長さ、傾斜している部分の傾斜の平均値から判定、すなわち形状が山状か否かを判定することで行うものにおいて、前記焦点評価信号が単調減少しているか否かを、ノイズなどによる微小の変動による影響を除去するために、隣接するデータ取得ポイントではなくそれ以上離れたポイントの差分を取ることで行う構成にしている。
【0012】
【発明の実施の形態】
以下、本発明を図示の実施の形態に基づいて詳細に説明する。
【0013】
(実施の第1の形態)
図1は本発明の実施の形態に係る自動焦点調整装置の回路構成を示すブロック図である。
【0014】
同図において、1は撮像装置、2はズームレンズ群、3はフォーカスレンズ群である。4はズームレンズ群2およびフォーカスレンズ群3等からなる撮影光学系を透過する光束の量を制御する光量調節手段であり露出手段である絞り、31はズームレンズ群2、フォーカスレンズ群3および絞り4等からなる撮影レンズ鏡筒、5は撮影光学系を透過した被写体像が結像し、これを光電変換するCCD等の固体撮像素子(以下、CCD)、6はCCD5によって光電変換された電気信号を受けて各種の画像処理を施すことにより所定の画像信号を生成する撮像回路、7は撮像回路6により生成されたアナログ画像信号をデジタル画像信号に変化するA/D変換回路、8はA/D変換回路7の出力を受けてこの画像信号を一時的に記憶するバッファメモリ等のメモリ(以下、VRAM)、9はVRAM8に記憶された画像信号を読み出してこれをアナログ信号に変換するとともに再生出力に適する形態の画像信号に変換するD/A変換回路である。
【0015】
10はD/A変換回路9からの画像信号を表示する液晶表示装置(LCD)等の画像表示装置(以下、LCD)、12は半導体メモリ等からなる画像データを記憶する記憶用メモリである。11はVRAM8に一時記憶された画像信号を読み出して記憶用メモリ12に対する記憶に適した形態にするために画像データの圧縮処理や符号化処理を施す圧縮回路および記憶用メモリ12に記憶された画像データを再生表示等をするのに最適な形態とするための復号化処理や伸長処理等を施す伸長回路とからなる圧縮伸長回路、13はA/D変換回路7からの出力を受けて自動露出(AE)処理を行うAE処理回路、14はA/D変換回路7からの出力を受けて自動焦点調節(AF)処理を行うスキャンAF処理回路、15は撮像装置の制御を行う演算用のメモリを内蔵したCPU、16は所定のタイミング信号を発生するタイミングジェネレータ(以下、TG)、17はCCDドライバーである。
【0016】
21は絞り4を駆動する絞り駆動モータ、18は絞り駆動モータ21を駆動制御する第1モータ駆動回路、22はフォーカスレンズ群3を駆動するフォーカス駆動モータ、19はフォーカス駆動モータ22を駆動制御する第2モーター駆動回路、23はズームスレンズ群2を駆動するズーム駆動モータ、20はズーム駆動モータ23を駆動制御する第3モータ駆動回路、24は各種のスイッチ群からなる操作スイッチ、25は各種制御等を行うプログラムや各種動作を行わせるために使用するデータ等が予め記憶されている電気的に書き換え可能な読み出し専用メモリであるEEPROM、26は電池、28はストロボ発光部、27はストロボ発光部28の閃光発光を制御するスイッチング回路、29はAF動作のOK・NGを表示するためのLEDなどの表示素子である。
【0017】
なお、画像データ等の記憶媒体である記憶用メモリ12は、フラッシュメモリ等の固定型の半導体メモリや、カード形状やスティック形状からなり、装置に対して着脱自在に形成されるカード型フラッシュメモリ等の半導体メモリの他、ハードディスクやフロッピィ−ディスク等の磁気記憶媒体等、様々な形態のものが適用される。
【0018】
また、操作スイッチ24としては、本撮像装置1を起動させ、電源供給を行うための主電源スイッチや撮影動作(記憶動作)等を開始させるレリーズスイッチ、再生動作を開始させる再生スイッチ、撮影光学系のズームレンズ群2を移動させズームを行わせるズームスイッチ、AF評価信号のモニターへの表示をON/OFFするためのスイッチ等がある。
【0019】
そして、レリーズスイッチは撮影動作に先立ち行われるAE処理、AF処理を開始させる指示信号を発生する第1ストローク(以下、SW1)と実際の露光動作を開始させる指示信号を発生する第2ストローク(以下、SW2)との二段スイッチにより構成される。
【0020】
このように構成された撮像装置における動作を、以下に説明する。
【0021】
まず、撮像装置1の撮影レンズ鏡筒31を透過した被写体光束は絞り4によってその光量が調整された後、CCD5の受光面に結像される。この被写体像は、CCD5による光電変換処理により電気的な信号に変換され、撮像回路6に出力される。撮像回路6では、入力した信号に対して各種の信号処理が施され、所定の画像信号が生成される。この画像信号はA/D変換回路7に出力され、デジタル信号(画像データ)に変換された後、VRAM8に一時的に格納される。
【0022】
VRAM8に格納された画像データはD/A変換回路9へ出力され、アナログ信号に変換され、表示するのに適した形態の画像信号に変換された後、LCDに画像として表示される。一方、VRAM8に格納された画像データは圧縮伸長回路11にも出力される。この圧縮伸長回路11における圧縮回路によって圧縮処理が行われた後、記憶に適した形態の画像データに変換され、記憶用メモリ12に記憶される。
【0023】
また、例えば操作スイッチ24のうち、不図示の再生スイッチが操作されてオン状態になると、再生動作が開始される。すると記憶用メモリ12に圧縮された形で記憶された画像データは圧縮伸長回路11に出力され、伸長回路において復号化処理や伸長処理等が施された後、VRAM8に出力され一時的に記憶される。更に、この画像データはD/A変換回路9へ出力され、アナログ信号に変換され、表示するのに適した形態の画像信号に変換された後、LCD10に画像として表示される。
【0024】
他方、A/D変換回路7によってデジタル化された画像データは、上述のVRAM8とは別にAE処理回路13及びスキャンAF処理回路14に対しても出力される。
【0025】
まず、AE処理回路13においては、入力されたデジタル画像信号を受けて、一画面分の画像データの輝度値に対して累積加算等の演算処理が行われる。これにより、被写体の明るさに応じたAE評価値が算出される。このAE評価値はCPU15に出力される。
【0026】
また、スキャンAF処理回路14においては、入力されたデジタル画像信号を受けて一画面分の画像データの高周波成分がハイパスフィルター(HPF)等を介して抽出され、更に累積加算等の演算処理が行われる。これにより、高域側の輪郭成分量等に対応するAF評価信号が算出される。このようにスキャンAF処理回路14は、AF処理を行う過程において、CCD5によって生成された画像信号から所定の高周波成分を検出する高周波成分検出手段の役割を担っている。このAF評価値はフォーカスレンズ群3の所定の位置毎に求められ、その都度CPU15に出力される。
【0027】
一方、TG16からは所定のタイミング信号がCPU15、撮像回路6、CCDドライバー17へ出力されており、CPU15はこのタイミング信号に同期させて各種の制御を行う。また撮像回路6は、TG16からのタイミング信号を受け、これに同期させて色信号の分離等の各種画像処理を行う。さらに、CCDドライバー17は、TG16のタイミング信号を受けこれに同期してCCD5を駆動する。
【0028】
また、CPU15は、第1モータ駆動回路18、第2モータ駆動回路19、第3モータ駆動回路20をそれぞれ制御することにより、絞り駆動モータ21、フォーカス駆動モータ22、ズーム駆動モータ23を介して、絞り4、フォーカスレンズ群3、ズームスレンズ群2を駆動制御する。すなわち、CPU15はAE処理回路13において算出されたAE評価値等に基づき第1モータ駆動回路18を制御して絞り駆動モータ21を駆動し、絞り4の絞り量を適正になるように調整するAE制御を行う。また、CPU15はスキャンAF処理回路14において算出されるAF評価信号に基づき第2モータ駆動回路19を制御してフォーカス駆動モータ22を駆動し、フォーカスレンズ群3を合焦位置に移動させるAF制御を行う。また、操作スイッチ24のうち不図示のズームスイッチが操作された場合は、これを受けてCPU15は、第3モータ駆動回路20を制御してズームモータ23を駆動制御することによりズームレンズ群2を移動させ、撮影光学系の変倍動作(ズーム動作)を行う。
【0029】
次に、本撮像装置1の実際の撮影動作について、図2に示すフローチャートを用いて説明する。
【0030】
撮像装置1の主電源スイッチがオン状態であり、かつ撮像装置1の動作モードが撮影(録画)モードにあるときは、撮影処理シーケンスが実行される。
【0031】
まずステップS1において、CPU15は撮影レンズ鏡筒31を透過し、CCD5上に結像された像をLCD10に画像として表示する。すなわち、CCD5上に結像された被写体像は、CCD5による光電変換処理されて電気的な信号に変換された後、撮像回路6に出力される。そこで入力した信号に対して各種の信号処理が施され、所定の画像信号が生成された後、A/D変換回路7に出力され、デジタル信号(画像データ)に変換され、VRAM8に一時的に格納される。VRAM8に格納された画像データはD/A変換回路9へ出力され、アナログ信号に変換され、表示するのに適した形態の画像信号に変換された後、LCD10に画像として表示される。
【0032】
次いでステップS2において、レリーズスイッチの状態を確認する。撮影者によってレリーズスイッチが操作され、SW1(レリーズスイッチの第1ストローク)がオン状態になったことをCPU15が確認すると、次のステップS3に進み、通常のAE処理を実行する。続いてステップS4において、スキャンAF処理を行う。すなわちCPU15は、ステップS4で合焦位置を検出するためのスキャンAF処理を行う。
【0033】
その概略を図3を用いて説明する。
【0034】
スキャンAFは、CCD5によって生成された画像信号より出力される高周波成分が最も多くなるフォーカスレンズ群3の位置を求めることにより行われる。CPU15はフォーカス駆動モータ22を駆動制御する第2モータ駆動回路19を介してフォーカス駆動モータ22を制御し、フォーカスレンズ群3を無限遠に相当する位置(図3における「A」)から各々の撮影モードにおいて設定される至近距離に相当する位置(図3における「B」)まで駆動する。そして、駆動しながらスキャンAF処理回路14の出力(AF評価信号)を取得し、フォーカスレンズ群3の駆動が終了した時点で取得したAF評価信号から、それが最大になる位置(図3における「C」)を求め、その位置にフォーカスレンズ群3の駆動する。
【0035】
このAF処理回路14の出力の取得はスキャンAFの高速化のために、全てのフォーカスレンズ群3の停止位置については行わず、所定のステップ毎に行う。この場合、図3に示すa1,a2,a3点においてAF評価信号を取得することがあり得る。このような場合はAF評価信号が最大値となった点とその前後の点から合焦位置Cを計算にて求めている。このように補間計算を行い、AF評価信号が最大値となる点(図3のC)を求める前に、AF評価信号の信頼性を評価する。その信頼性が十分であれば、AF評価信号が最大値となる点を求める。
【0036】
上記のようにAF評価信号の信頼性を評価した結果、その信頼性が高い場合には、ステップS5において、AFOK表示を行う。これは表示素子29を点灯することなどにより行うと同時にLCD上に緑の枠を表示するなどの処理を行う。一方、AF評価信号の信頼性を評価した結果、その信頼性が低い場合には、AF評価信号が最大値となる点を求める処理は行わず、ステップS5において、AFNG表示を行う。これは表示素子29を点滅表示することなどにより行うと同時に、LCD10上に黄色の枠を表示するなどの処理を行う。
【0037】
次のステップS6においては、CPU15はSW2(レリーズスイッチの第2ストローク)の確認を行い、SW2がオンになっていたならば、ステップS7に進み、実際の露光処理を実行することになる。
【0038】
次に、上記ステップS4のスキャンAFにおけるAF評価信号の信頼性判定方法の詳細について述べる。
【0039】
AF評価信号は遠近競合の特殊な場合を除けば、横軸に距離、縦軸にAF評価値をとると、その形は図4に示すような山状になる。そこで本実施形態においてはAF評価信号が山状になっているか否かを、AF評価信号の最大値と最小値の差、一定値以上の傾きで傾斜している部分の長さ、傾斜している部分の勾配から判定することにより、AF評価信号の信頼性を判定している。
【0040】
本実施形態においては、図4に示すように、山の頂上(A点)から傾斜していると認められるD点、E点を求め、D点とE点の幅を山の幅L、A点とD点のAF評価値の最大値と最小値の差SL1と、A点とE点のAF評価値の最大値と最小値の差SL2の和SL1+SL2を山の勾配SLとしている。
【0041】
なお、単調減少しているか否か(山らしいか否か)の判定の一つに、「傾斜している部分の勾配」を用いるとの説明をしているが、実際の信号は勾配が一定でなく、うねっているので、その平均値(傾斜している部分の傾斜の平均値)をもって勾配を表わす値としている。
【0042】
その詳細を図5に示すフローチャートを用いて説明する。
【0043】
まずステップS101において、スキャンAF処理回路14より出力されるAF評価値の最大値と最小値、及び最大値を与えるスキャンポイントioを求める。その後ステップS102において、AF評価値の山の幅を表す変数L、山の勾配を表す変数SLをともに零に初期化する。
【0044】
次いでステップS103において、最大値を与えるスキャンポイントioが無限遠に相当する位置か否かを調べ、無限遠に相当する位置でないならばステップS104に進み、無限遠に相当する位置方向への単調減少を調べる。無限遠に相当する位置であったならば、この処理をスキップしてステップS105に進む。
【0045】
ここで、ステップS104における無限遠に相当する位置方向への単調減少を調べる処理について、図6のフローチャートを用いて説明する。
【0046】
まずステップS401において、カウンターiの値をioに初期化する。そして、iにおけるAF評価値の値d[i]とiよりmスキャンポイント分無限遠よりのスキャンポイントi−mにおけるAF評価値の値d[i−m]の差値d[i]−d[i−m]を求め、その値をAF評価値が確実に減少していると判定するためのしきい値SlpThr(図4参照)と比較する(ステップS402)。ここで、mは2以上の整数である。このように離れたスキャンポイント(隣接するデータ取得ポイントより離れたポイント)でのAF評価値を比較することで、ノイズなどの変動の影響を除去できる。
【0047】
上記比較の結果、d[i]−d[i−m]がしきい値SlpThr以上(d[i]−d[i−m]>=SlpThr)であれば、ステップS406に進み、AF評価値の山の幅を表す変数L、山の勾配を表す変数SLを以下の式に従い更新する。なお、「>=」は「≧」を意味する。
【0048】
L=L+1
SL=SL+(d[i]−d[i−m])/m
上記のしきい値SlpThrは、輝度Bvに対して以下の式に応じて設定する。
【0049】
SlpThr=m×3×Bv
但し、SlpThrの最小値は30、最大値は150とする。また、小数点以下の値が出た場合は切り捨てる。これは演算高速化のため、小数点演算を行っていないためである。しきい値SlpThrに関しては、輝度が高い場合はAF評価値の信号そのものも大きくなる傾向があるため、輝度によって大きさを変えている。また、ステップS406ではカウンターiの値を−1減算する。
【0050】
上記ステップS402で、d[i]−d[i−m]>=SlpThrでなければステップS403に進む。そしてステップS403では、比較したiの値がioか否か、すなわち単調減少のチェックを開始する点であるか否かのチェックを行う。この結果iが単調減少のチェックを開始する点である場合はステップS404に進み、d[i]−d[i−m]が−SlpThrより大きいか否かを調べる。d[i]−d[i−m]>−SlpThrならば、ステップS405において傾きがSlpThrに満たなくても単調減少していることを表すフラグEqFlgをオンする。そして、ステップS406に進み、前述のようにAF評価値の山の幅を表す変数L、山の勾配を表す変数SLを更新する。
【0051】
なお、上記d[i]−d[i−m]>−SlpThrは、d[i]>d[i−m]−SlpThrと置き換えることができる。本来はd[i]がd[i−m]より大きいことを仮定しているが、ここではd[i]がd[i−m]より小さい場合も許可しようとするものである。これはノイズなどで大小関係が逆転することもあるとの考えによる。但し、ノイズなどで大小関係が逆転したとしてもその差がSlpThrよりは小さい事を想定している。ここでは、上記d[i]−d[i−m]>−SlpThrは、d[i]がd[i−m]−SlpThrより大きければ、ノイズなどで大小が逆転しているが、単調減少していると判定することを意味している。
【0052】
このようにするのは、図3に示すように離散的にAF評価値を取得しているので、図3に示すa2,a3のような点でAF評価値を取得した場合、a2点からa3点への傾斜は緩く(なお図3では、a2,a3は至近方向に単調減少する例を示しているので、ここの説明では実際は図3を左右反転させたような図面となる)、d[i]−d[i−m]>=SlpThrの条件を満たさない可能性があるが、顕かに単調減少の状態になっており、この様な場合も単調減少と判定するためである。
【0053】
また、ステップS404で上記条件を満たさない場合は無限遠方向への単調減少は生じていないと判定し、無限遠方向の単調減少をチェックする処理を終了し、ステップS410に進む。
【0054】
また、ステップS403においてiが単調減少のチェックを開始する点では無いと判定した場合は、ステップS411において、d[i]>d[i−m]か否かを調べる。d[i]>d[i−m]の場合は十分では無いが単調減少が生じていると判定することができる。これを、長さが(d[i]−d[i−m])/SlpThr、傾きが(d[i]−d[i−m])/SlpThr/mの単調減少、即ち通常の単調減少のSlpThr分の一の単調減少が生じたものとして取り扱う。そして、ステップS412において、AF評価値の山の幅を表す変数L、山の勾配を表す変数SLを以下の式に従い更新する。
【0055】
L=L+(d[i]−d[i−m])/SlpThr
SL=SL+(d[i]−d[i−m])/SlpThr/m
また、ステップS412ではカウンターiの値を−1減算する。
【0056】
次のステップS407,S408においては、L,SL/Lが、山であるとみなすための山の幅及び山の勾配(傾斜の平均値)に関するしきい値Lo,SLo/Loと比較し、両者ともしきい値以上か否かを判定する。両者ともしきい値以上の場合は、後のAF評価値の信頼性を判定する処理における条件を満足しているので、これ以上無限遠方向の単調減少をチェックする処理は行わず、ステップS410に進む。
【0057】
また、両方もしくは片方がしきい値未満の場合はステップS409へ進み、カウンターiが無限遠相当の値(=0)になったかどうかをチェックする。カウンターの値が0、すなわち単調減少を検出する開始点が無限遠相当の位置に達したならば、無限遠方向の単調減少をチェックする処理を終了し、ステップS410に進む。ステップS410では、AF評価値の山の幅を表す変数L、山の勾配を表す変数SL、AF評価値の単調減少のチェックを開始する点を表すカウンターio、ioにおけるAF評価値d[io]を記録する。
【0058】
このように、i=ioから無限遠方向への単調減少をチェックする。
【0059】
図5に戻り、無限遠方向への単調減少をチェックする処理を終了したならば、最大値を与えるスキャンポイントioがスキャンAFを行う至近端に相当する位置か否かを調べ、至近端に相当する位置でないならば、ステップS106に進み、至近端に相当する位置方向への単調減少を調べる。至近端に相当する位置であったならば、この処理をスキップし、ステップS107に進む。
【0060】
ここで、ステップS106における至近端に相当する位置方向への単調減少を調べる処理について、図7のフローチャートを用いて説明する。
【0061】
まず、ステップS501において、カウンターiの値をioに初期化する。そして、iにおけるAF評価値の値d[i]と、iよりmスキャンポイント分至近よりのスキャンポイントi+mにおけるAF評価値の値d[i+m]の差値d[i]−d[i+m]を求め、その値をAF評価値が確実に減少していると判定するためのしきい値SlpThrと比較する。ここでは、mは2以上の整数である。このように離れたスキャンポイントでのAF評価値を比較することで、ノイズなどの変動の影響を除去できる。
【0062】
上記比較の結果、d[i]−d[i+m]がしきい値SlpThr以上であればステップS506に進み、AF評価値の山の幅を表す変数L、山の勾配を表す変数SLを以下の式に従い更新する。
【0063】
L=L+1
SL=SL+(d[i]−d[i+m])/m
また、ステップS502で、d[i]−d[i+m]>=SlpThrでなければステップS503に進む。ステップS503では比較したiの値がioか否か、すなわち単調減少のチェックを開始する点であるか否かのチェックを行う。この結果、iが単調減少のチェックを開始する点である場合はステップS504に進み、フラグEqFlgの状態をチェックする。このフラグがオンしていたならば、図3に示すa2,a3のような点でAF評価値を取得した場合などの傾斜は緩くても顕かに単調減少の状態になっている場合のチェックは終了しているので、ステップS511に進む。一方、フラグがオフの場合はステップS505に進み、d[i]−d[i+m]が−SlpThrより大きいか否かを調べる。d[i]−d[i+m]>−SlpThrならばステップS506に進み、前述のようにAF評価値の山の幅を表す変数L、山の勾配を表す変数SLを更新する。このようにするのは、図3に示すように離散的にAF評価値を取得しているので、図3に示すa2,a3のような点でAF評価値を取得した場合、a2点からa3点への傾斜は緩く、d[i]−d[i+m]>=SlpThrの条件を満たさない可能性があるが、顕かに単調減少の状態になっており、この様な場合も単調減少と判定するためである。
【0064】
また、ステップS505で上記条件を満たさない場合は至近方向への単調減少は生じていないと判定し、至近方向の単調減少をチェックする処理を終了し、ステップS510に進む。ステップS503で満たさない場合もステップS511に進む。
【0065】
ステップS511へ進むと、d[i]>d[i+m]か否かを調べる。d[i]>d[i+m]の場合は十分では無いが、単調減少が生じていると判定することができる。これを、長さが(d[i]−d[i+m])/SlpThr、傾きが(d[i]−d[i+m])/SlpThr/mの単調減少、即ち通常の単調減少のSlpThr分の一の単調減少が生じたものとして取り扱う。そしてステップS512において、AF評価値の山の幅を表す変数L、山の勾配を表す変数SLを以下の式に従い更新する。
【0066】
L=L+(d[i]−d[i+m])/SlpThr
SL=SL+(d[i]−d[i+m])/SlpThr/m
次のステップS507,S508においては、L,SL/Lが山であるとみなすための山の幅及び山の勾配に関するしきい値Lo,SLo/Loと比較し、両者ともしきい値以上か否かを判定する。両者ともしきい値以上の場合は、後のAF評価値の信頼性を判定する処理における条件を満足しているので、これ以上至近方向の単調減少をチェックする処理は行わず、ステップS510に進む。
【0067】
また、両者もしくは片方がしきい値未満の場合はステップS509へ進み、カウンターiが至近相当の値(=N)になったかどうかをチェックする。カウンターの値がN、すなわち単調減少を検出する開始点が至近相当の位置に達したならば、無限遠方向の単調減少をチェックする処理を終了し、ステップS510に進む。ステップS510では、AF評価値の山の幅を表す変数L、山の勾配を表す変数SL、AF評価値の単調減少のチェックを開始する点を表すカウンターio、ioにおけるAF評価値d[io]を記録する。
【0068】
このように、i=ioから至近方向への単調減少をチェックする。
【0069】
図5に戻り、無限遠方向、至近端方向への単調減少のチェックが終了したならば、AF評価値の信頼性を判定するための諸係数をそれぞれのしきい値と比較し、全ての条件を満たしたならばAF評価値の信頼性があると判定した場合の処理を、信頼性がないと判定した場合の処理を、それぞれを行う、図5のステップS107以降へ進む。
【0070】
まず、図5のステップS107においては、AF評価値の最大値と最小値の差をそのしきい値である所定値(def_maxmin)と比較し、所定値より小さい場合(max−min<所定値)は信頼性がないと判定し、ステップS111へ進む。
【0071】
また、所定値以上の場合(max−min≧所定値)はステップS108に進み、一定値以上の傾きで傾斜している部分の長さLをそのしきい値である所定値Loと比較し、所定値より小さい場合(L<Lo)は信頼性がないと判定し、ステップS111へ進む。
【0072】
また、所定値Lo以上の場合はステップS109へ進み、傾斜している部分の傾斜の平均値SL/Lをそのしきい値である所定値SLo/Loと比較し、所定値より小さい場合(SL/L<SLo/Lo)は信頼性がないと判定し、ステップS111へ進む。
【0073】
ここで用いた3つの判定ためのしきい値は、撮影レンズの焦点距離、開放F値、スキャンAFを行う距離範囲、及び、スキャンAF間隔(AF評価値を取得するポイントの間隔)から決まるAF評価値を取得するスキャンポイントの数により変更する。
【0074】
以下の規則に従い、しきい値を変更する。
【0075】
まず、一定値以上の傾きで傾斜している部分の長さに関するしきい値である所定値Loは、スキャンポイント数に応じて以下のように設定する。
【0076】
スキャンポイント数=1〜5 Lo=3
スキャンポイント数=6〜10 Lo=4
スキャンポイント数=11〜14 Lo=5
スキャンポイント数=15〜21 Lo=6
スキャンポイント数=21〜 Lo=7
このようにLoの最小値は3、最大値は7とする。これは、山の幅を表す一定値以上の傾きで傾斜している部分の長さはある一定以上の数値が必要であるが、スキャンポイント数が極端に少ない場合はそれを考慮する必要がある。よって、スキャンポイント数の少ない、撮影レンズの焦点距離が短く、開放F値も大きく、非マクロ領域をスキャンAFを行う距離範囲としている場合は、一定値以上の傾きで傾斜している部分の長さに関するしきい値Loを小さくしている。ちなみにマクロ領域の撮影の場合は、撮影レンズの焦点距離が短く、開放F値も大きい場合でもスキャンポイント数が多くなる場合が多い。
【0077】
また、AF評価値の最大値と最小値の差に関するしきい値である所定値 def_maxminは、輝度により以下のように設定する。
【0078】
輝度値BvがBv0からBv10まで変化した時に2倍になるように設定する。その外側の輝度の場合は、Bv0,Bv10と同じになるようにする。例えばBv0=0のとき、def_maxmin=250、Bv10=10とした場合は、Bv10でのdef_maxminは500となる。その間(BV=0〜10)は

Figure 2004272033
となる。ただし、小数点以下の値が出た場合は切り捨てる。これは演算高速化のため、小数点演算を行っていないためである。また、Bv=0以下の場合はdef_maxmin=250、Bv=10以上の場合はdef_maxmin=500となる。
また、傾斜している部分の傾斜の平均値に関するしきい値である所定値SLo/Loも、輝度により以下のように設定する。
【0079】
輝度値BvがBv0からBv10まで変化した時に2倍になるように設定する。その外側の輝度の場合は、Bv0,Bv10と同じになるようにする。例えばBv0=0のとき、SLo/Lo=45、Bv10=10とした場合は、Bv10でのSLo/Loは90となる。その間(BV=0〜10)は
Figure 2004272033
となる。ただし、小数点以下の値が出た場合は切り捨てる。これは演算高速化のため小数点演算を行っていないためである。また、Bv=0以下の場合はSLo/Lo=45、Bv=10以上の場合はSLo/Lo=90となる。
【0080】
後者の2つのしきい値に関しては輝度が高い場合はAF評価値の信号そのものも大きくなる傾向があるため、輝度によって大きさを変えている。
【0081】
ここでは撮影時のシャッター速度、絞り等を決定する測光モジュールから得られるBv値を輝度の情報として用いているが、本発明で使用する輝度に関する情報はこれに限定されるものではない。例えばAF評価信号そのものの平均値や、AFを行う領域の画像信号の平均値などを用いても良い。
【0082】
再び図5に戻り、以上の3つの条件を満たした場合はAF評価値の信頼性があると判定し、ステップS110へ進み、スキャンAF回路14により算出されたAF評価値からフォーカスレンズ群3を駆動する位置を求める。これは離散的に算出されたAF評価値の最大となる位置を補間演算等を行うことによって求めることで算出される。
【0083】
また、AF評価値の信頼性がないと判定してステップS111へ進んだ場合は、定点と呼ばれるあらかじめ定められた位置へフォーカスレンズ群3を駆動する。
【0084】
以上の実施の第1の形態においては、AF評価信号の信頼性をその形状から判定することにより、すなわち形状が山状か否かを、AF評価信号の最大値と最小値の差、一定値以上の傾きで傾斜している部分の長さ、傾斜している部分の傾斜の平均値から判定することにより、AF評価信号の信頼性を判定するとともに、例えば2ポイント離れたデータ取得ポイントとの差分を取り、またその差が所定値以下の傾斜の場合は(差分/所定値)を減少している区間の長さとすることにより、ノイズなどによる微小の変動による影響を除去でき、高い精度でAF評価信号の信頼性を判定することを可能にしている。
【0085】
(実施の第2の形態)
本発明の実施の第2の形態に係る撮像装置の基本的構成や基本的な動作手順は上記実施の第1の形態と同様であり、図1のブロック図、図2のフローチャートによって示されている。
【0086】
上記実施の第1の形態と異なる本実施の第2の形態における低コントラスト判定方法について、図8のフローチャートにしたがって説明する。
【0087】
まずステップS701において、スキャンAF処理回路14より出力されるAF評価値の最大値と最小値、及びその平均値を求める。同時に、AF評価値の単調減少のチェックを開始する点を表すカウンターioの値を無限遠に相当する値を零に初期化する。そして、ステップS702において、そのioにおけるAF評価値の値がステップS701で求めたAF評価値の平均値以上か否かをチェックする。もし平均値未満であったならばその点からはAF評価値の単調減少のチェックは行わずに、ステップS708に進み、ioが至近端に相当する位置に達したか否かを調べ、達していなければ、io=io+1とioを更新し、処理を継続する。
【0088】
ステップS702で、ioにおけるAF評価値の値がステップS701で求めたAF評価値の平均値以上の場合はAF評価値の単調減少のチェックを行うステップS703以降へ進む。
【0089】
まず、ステップS703において、AF評価値の山の幅を表す変数L、山の勾配を表す変数SLをともに零に初期化する。そしてステップS704で、ioが無限遠に相当する位置か否かを調べ、無限遠に相当する位置でないならばステップS705にて無限遠方向へのAF評価値の単調減少を調べる。無限遠に相当する位置の場合はステップS705をスキップし、ステップS706へ進む。
【0090】
ステップS705における無限遠に相当する位置方向への単調減少を調べる処理は、上記実施の第1の形態と同様の処理が行われる。
【0091】
無限遠方向への単調減少をチェックする処理を終了したならばステップS706へ進み、ioがスキャンAFを行う至近端に相当する位置か否かを調べ、至近端に相当する位置でないならば、ステップS708に進み、至近端に相当する位置方向へのAF評価値の単調減少を調べる。至近端に相当する位置であったならば、この処理をスキップし、ステップS710に進む。
【0092】
至近方向への単調減少をチェックする処理を終了したならばステップS708へ進み、ioがスキャンAFを行う至近端に相当する位置か否かを調べ、至近端に相当する位置でないならばステップS709に進み、io=io+1と更新し、単調減少をチェックする開始点を1スキャンポイント分至近端へ移し、処理を継続する。ioが至近端に相当する位置に到達したならば、無限遠、至近端方向への単調減少のチェックを終了する。
【0093】
無限遠方向、至近端方向への単調減少のチェックが終了したならば、ステップS710において、AF評価値の山の幅を表す変数Lが最大となるAF評価値の山の幅を表す変数L、山の勾配を表す変数SL、AF評価値の単調減少のチェックを開始する点を表すカウンターio、ioにおけるAF評価値d[io]の組み合わせを選択する。もしLとして同じものが複数存在する場合は、ioにおけるAF評価値d[io]の大きいもの、d[io]が等しいものが複数存在する場合はioがより近側のものを選択する。
【0094】
次いで選択されたAF評価値の信頼性を判定するための諸係数をそれぞれのしきい値と比較し、全ての条件を満たしたならばAF評価値の信頼性があると判定した場合の処理を、信頼性がないと判定した場合の処理を、それぞれ行うステップS711以降に移る。
【0095】
まず、ステップS711においては、AF評価値の最大値と最小値の差をそのしきい値である所定値と比較し、所定値より小さい場合は信頼性がないと判定し、ステップS715へ進む。
【0096】
また、所定値以上の場合はステップS712へ進み、一定値以上の傾きで傾斜している部分の長さLをそのしきい値である所定値Loと比較し、所定値Loより小さい場合は信頼性がないと判定し、ステップS715へ進む。
【0097】
また、所定値Lo以上の場合はステップS713へ進み、傾斜している部分の傾斜の平均値SL/Lをそのしきい値である所定値SLo/Loと比較し、所定値SLo/Loより小さい場合は信頼性がないと判定し、ステップS715へ進み、定点と呼ばれるあらかじめ定められた位置へフォーカスレンズを駆動する。ここで用いた3つの判定ためのしきい値は、上記実施の1の形態と同様に、撮影レンズの焦点距離、開放F値、スキャンAFを行う距離範囲及びスキャンAF間隔(AF評価値を取得するポイントの間隔)から決まるAF評価値を取得するスキャンポイントの数により変更する。
【0098】
以上の実施の第2の形態においても、AF評価信号の信頼性をその形状から判定することにより、すなわち形状が山状か否かをAF評価信号の最大値と最小値の差、一定値以上の傾きで傾斜している部分の長さ、傾斜している部分の傾斜の平均値から判定することにより、AF評価信号の信頼性を判定するとともに、2ポイント離れたデータ取得ポイントとの差分を取り、またその差が所定値以下の傾斜の場合は(差分/所定値)を減少している区間の長さとすることにより、ノイズなどによる微小の変動による影響を除去し、高い精度でAF評価信号の信頼性を判定することを可能にしている。
【0099】
最後に、請求項1以外の本発明に係る自動焦点調整装置の実施態様を以下に列挙する。
【0100】
(実施態様1) 撮影光学系により結像される被写体像を光電変換して電気的な画像信号を得る撮像手段と、前記撮像手段に形成される被写体像の焦点を調整する焦点調整手段と、前記焦点調整手段を駆動しながら前記撮像手段よりの画像信号から生成される焦点評価信号を基に合焦位置を検出する合焦位置検出手段とを有し、前記合焦位置検出手段は、前記焦点評価信号の信頼性を、その信号の単調減少している区間の長さ、単調減少している区間の傾斜の平均値、その信号の最大値と最小値の差にて判定し、信頼性が高い場合は、前記焦点評価信号に基づいて前記合焦位置を検出し、信頼性が低い場合は、所定の信号を前記合焦位置として検出する自動焦点調整装置において、前記焦点評価信号が単調減少しているか否かの判定を、隣接するデータ取得ポイントより離れたポイントとの差分を用いて行うことを特徴とする自動焦点調整装置。
【0101】
(実施態様2) 前記合焦位置検出手段は、前記焦点評価信号が単調減少しているか否かを、隣接するデータ取得ポイントより離れたポイントとの差分と所定値を比較し、所定値以上の場合は、長さが1単位の単調現象が生じていると判定することを特徴とする請求項1又は実施態様1に記載の自動焦点調整装置。
【0102】
(実施態様3) 前記合焦位置検出手段は、前記焦点評価信号が単調減少しているか否かを、隣接するデータ取得ポイントより離れたポイントとの差分と所定値を比較し、所定値以上の場合は、長さが1単位の単調現象が生じていると判定し、所定値未満かつ零以上の場合は、長さが差分/所定値の単調現象が生じていると判定することを特徴とする請求項1又は実施態様1に記載の自動焦点調整装置。
【0103】
(実施態様4) 前記焦点評価信号の信頼性を判定するためのしきい値である、前記焦点評価信号の単調減少している区間の長さ、単調減少している区間の傾斜の平均値、前記焦点評価信号の最大値と最小値の差は、そのときの輝度信号に応じて変更されるものであることを特徴とする請求項1、実施態様1ないし3に記載の自動焦点調整装置。
【0104】
【発明の効果】
以上説明したように、本発明によれば、高い精度でAF評価信号の信頼性を判定し、低コントラスト被写体に対する合焦率を向上させることができる自動焦点調整装置を提供できるものである。
【図面の簡単な説明】
【図1】本発明の実施の第1の形態に係る自動焦点調整装置の回路構成を示すブロック図である。
【図2】本発明の実施の第1の形態に係る自動焦点調整装置を示すフローチャートである。
【図3】本発明の実施の第1の形態においてAF評価信号の一例を示す図である。
【図4】本発明の実施の第1の形態においてAF評価値の信頼性判定の概念を説明するための図である。
【図5】本発明の実施の第1の形態においてAF評価信号の信頼性判定方法の動作を示す説明図である。
【図6】本発明の実施の第1の形態における無限遠方向の単調減少を求める動作を示す説明図である。
【図7】本発明の実施の第1の形態における至近端方向の単調減少を求める動作を示す説明図である。
【図8】本発明の実施の第2の形態においてAF評価信号の信頼性判定方法の動作を示す説明図である。
【符号の説明】
1 撮像装置
2 ズームレンズ群
3 フォーカスレンズ群
4 絞り
31 撮影レンズ鏡筒
5 CCD等の固体撮像素子
6 撮像回路
7 A/D変換回路
8 メモリ(VRAM)
9 D/A変換回路
10 液晶表示装置(LCD)等の画像表示装置
12 画像データを記憶する記憶用メモリ
11 圧縮伸長回路
13 AE処理回路
14 スキャンAF処理回路
15 CPU
16 タイミングジェネレータ
17 CCDドライバー
21 絞り駆動モータ
18 第1モータ駆動回路
22 フォーカス駆動モータ
19 第2モーター駆動回路
23 ズーム駆動モータ
20 第3モータ駆動回路
24 操作スイッチ
25 EEPROM
26 電池
27 スイッチング回路
28 ストロボ発光部
29 表示素子[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an automatic focus adjustment device that performs focus adjustment using an image signal acquired by an image sensor that photoelectrically converts a subject image formed by an imaging optical system.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, in an automatic focusing device that performs a focusing operation by detecting a predetermined high-frequency component from an image signal and maximizing an output signal, the reliability of an output signal that has detected the high-frequency component is evaluated. A method for performing this is proposed in Patent Document 1 and the like.
[0003]
The purpose of the automatic focus adjustment device of Patent Document 1 is to automatically instantaneously determine that a captured image is a low-contrast subject that cannot be focused without moving the focus lens, thereby suppressing unnecessary movement of the focus lens. At the same time, it is possible to notify the photographer of the fact and encourage the photographer to perform photographing with another easily focussed subject ", and the configuration is described as follows.
[0004]
First, a maximum value and a minimum value of a luminance signal in a predetermined range of one field are obtained, then a minimum value is subtracted from the maximum value to obtain a luminance width, and this width is compared with a first threshold value. If the width of the luminance is smaller than the first threshold value, the maximum value and the minimum value are compared with the intermediate luminance level. If the comparison results are both large or small, a signal indicating that focus adjustment is impossible is output.
[0005]
[Patent Document 1]
JP-A-6-125493
[0006]
[Problems to be solved by the invention]
However, in the above-described conventional example, the reliability of a focus evaluation signal (hereinafter, also referred to as an AF evaluation signal) in which a high-frequency component is detected is determined based on a difference (luminance width) between the maximum value and the minimum value of the luminance signal.
[0007]
Except for the special case of the near-far conflict, the AF evaluation signal has a mountain shape when the horizontal axis represents the distance and the vertical axis represents the AF evaluation value. Therefore, if the contrast of the subject is low and a mountain-shaped signal is output even if the difference between the maximum value and the minimum value is small, the AF evaluation signal is highly reliable and a good focusing operation can be expected. However, in the conventional example in which the reliability is determined based on the maximum value and the minimum value of the luminance signal, since the shape of the signal cannot be known, the reliability of the AF evaluation signal is reduced due to the influence of noise or the like when the luminance is low. Can't evaluate properly.
[0008]
In consideration of the influence of noise at low luminance, the threshold value of the difference between the maximum value and the minimum value needs to be set to a large value. In this case, even if a mountain-shaped signal is output, an object with low contrast is required. The AF evaluation signal may be determined to be NG. More specifically, in the case of a subject with low contrast, even if a mountain-like signal is output and AF is possible, the AF evaluation signal is determined to be NG because the difference between the maximum value and the minimum value of the luminance signal is small. Further, since the reliability of the AF evaluation signal itself is not determined by another signal (luminance signal), there is also a problem that the determination is likely to be erroneous.
[0009]
(Object of the invention)
SUMMARY OF THE INVENTION It is an object of the present invention to provide an automatic focus adjustment device capable of determining the reliability of an AF evaluation signal with high accuracy and improving a focusing rate for a low-contrast subject.
[0010]
[Means for Solving the Problems]
In order to achieve the above object, the present invention provides an imaging unit that photoelectrically converts a subject image formed by a shooting optical system to obtain an electrical image signal, and focuses the subject image formed on the imaging unit. A focus adjustment means for adjusting the focus; and a focus position detection means for detecting a focus position based on a focus evaluation signal generated from an image signal from the imaging means while driving the focus adjustment means. The focus position detecting means determines the reliability of the focus evaluation signal by determining the length of the monotonically decreasing section of the signal, the average value of the slope of the monotonically decreasing section, and the difference between the maximum value and the minimum value of the signal. In the automatic focus adjustment device that detects the in-focus position based on the determination result, the determination whether the focus evaluation signal is monotonically decreasing is determined by a point that is farther from an adjacent data acquisition point. Automatic using the difference of It is to the point adjuster.
[0011]
In the above configuration, the reliability of the focus evaluation signal is determined by calculating the difference between the maximum value and the minimum value of the focus evaluation signal, the length of the section that is inclined with a slope equal to or more than a certain value, and the average value of the slope of the sloped portion. , That is, by determining whether the shape is mountain-like or not, whether or not the focus evaluation signal is monotonically decreasing is determined by removing adjacent influences in order to remove the influence of minute fluctuations due to noise or the like. The configuration is such that the difference is obtained not at the data acquisition point but at a point further away.
[0012]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, the present invention will be described in detail based on illustrated embodiments.
[0013]
(First embodiment)
FIG. 1 is a block diagram showing a circuit configuration of an automatic focus adjustment device according to an embodiment of the present invention.
[0014]
In FIG. 1, reference numeral 1 denotes an imaging device, 2 denotes a zoom lens group, and 3 denotes a focus lens group. Reference numeral 4 denotes a light amount adjusting means for controlling the amount of light flux transmitted through the photographing optical system including the zoom lens group 2 and the focus lens group 3 and the like. A photographing lens barrel 4 and the like, a subject image transmitted through the photographing optical system is formed, a solid-state image pickup device (hereinafter referred to as a CCD) such as a CCD for photoelectrically converting the photographed lens, and an electric charge photoelectrically converted by the CCD 5 An imaging circuit for generating a predetermined image signal by receiving signals and performing various types of image processing; 7, an A / D conversion circuit for converting an analog image signal generated by the imaging circuit 6 into a digital image signal; A memory (hereinafter referred to as VRAM) such as a buffer memory for temporarily storing the image signal in response to the output of the / D conversion circuit 7, and 9 for reading the image signal stored in the VRAM 8. This by a D / A converter circuit for converting an image signal of a form suitable for reproduction output together into an analog signal.
[0015]
Reference numeral 10 denotes an image display device (hereinafter, LCD) such as a liquid crystal display (LCD) that displays an image signal from the D / A conversion circuit 9, and 12 denotes a storage memory that stores image data such as a semiconductor memory. Reference numeral 11 denotes a compression circuit that reads out an image signal temporarily stored in the VRAM 8 and performs a compression process and an encoding process on image data in order to make the format suitable for storage in the storage memory 12, and an image stored in the storage memory 12. A compression / decompression circuit 13 including a decompression circuit for performing a decoding process, a decompression process, and the like for rendering data into an optimal form for reproduction display and the like. An AE processing circuit that performs (AE) processing, 14 is a scan AF processing circuit that receives an output from the A / D conversion circuit 7 and performs automatic focus adjustment (AF) processing, and 15 is a calculation memory that controls an imaging apparatus. , A timing generator (hereinafter, referred to as TG) 16 for generating a predetermined timing signal, and 17 a CCD driver.
[0016]
Reference numeral 21 denotes an aperture drive motor for driving the aperture 4, 18 a first motor drive circuit for driving and controlling the aperture drive motor 21, 22 a focus drive motor for driving the focus lens group 3, and 19 a drive control for the focus drive motor 22. A second motor drive circuit, 23 is a zoom drive motor for driving the zoom lens group 2, 20 is a third motor drive circuit for driving and controlling the zoom drive motor 23, 24 is an operation switch including various switch groups, and 25 is various switches. An EEPROM which is an electrically rewritable read-only memory in which a program for controlling and data used for performing various operations are stored in advance, 26 is a battery, 28 is a strobe light emitting unit, and 27 is a strobe light emitting unit. A switching circuit 29 for controlling flash light emission of the unit 28; and 29 for displaying OK / NG of the AF operation. LED is a display element, such as.
[0017]
The storage memory 12, which is a storage medium for image data and the like, is a fixed type semiconductor memory such as a flash memory, a card-shaped flash memory which is formed in a card shape or a stick shape, and is detachably formed in the apparatus. In addition to the semiconductor memory described above, various forms such as a magnetic storage medium such as a hard disk and a floppy disk are applied.
[0018]
The operation switches 24 include a main power switch for activating the imaging apparatus 1 and supplying power, a release switch for starting a shooting operation (storage operation), a playback switch for starting a playback operation, and a shooting optical system. There is a zoom switch for moving the zoom lens group 2 to perform zooming, a switch for turning on / off the display of the AF evaluation signal on the monitor, and the like.
[0019]
The release switch is provided with a first stroke (hereinafter, SW1) for generating an instruction signal for starting an AE process and an AF process performed prior to a shooting operation, and a second stroke (hereinafter, SW1) for generating an instruction signal for starting an actual exposure operation. , SW2).
[0020]
The operation of the thus configured imaging apparatus will be described below.
[0021]
First, the amount of the subject light flux transmitted through the photographing lens barrel 31 of the imaging device 1 is adjusted by the aperture 4 and then formed on the light receiving surface of the CCD 5. This subject image is converted into an electrical signal by photoelectric conversion processing by the CCD 5 and output to the imaging circuit 6. The imaging circuit 6 performs various kinds of signal processing on the input signal, and generates a predetermined image signal. This image signal is output to the A / D conversion circuit 7, converted into a digital signal (image data), and temporarily stored in the VRAM 8.
[0022]
The image data stored in the VRAM 8 is output to the D / A conversion circuit 9, is converted into an analog signal, is converted into an image signal in a form suitable for display, and is displayed as an image on the LCD. On the other hand, the image data stored in the VRAM 8 is also output to the compression / expansion circuit 11. After compression processing is performed by the compression circuit in the compression / expansion circuit 11, the image data is converted into image data in a form suitable for storage, and stored in the storage memory 12.
[0023]
Further, for example, when a reproduction switch (not shown) among the operation switches 24 is operated to be turned on, a reproduction operation is started. Then, the image data compressed and stored in the storage memory 12 is output to the compression / expansion circuit 11, where the image data is subjected to decoding processing and expansion processing in the expansion circuit, and then output to the VRAM 8 and temporarily stored therein. You. Further, the image data is output to the D / A conversion circuit 9, converted into an analog signal, converted into an image signal in a form suitable for display, and then displayed on the LCD 10 as an image.
[0024]
On the other hand, the image data digitized by the A / D conversion circuit 7 is output to the AE processing circuit 13 and the scan AF processing circuit 14 separately from the VRAM 8 described above.
[0025]
First, the AE processing circuit 13 receives an input digital image signal and performs arithmetic processing such as cumulative addition on the luminance value of image data for one screen. Thereby, the AE evaluation value according to the brightness of the subject is calculated. This AE evaluation value is output to the CPU 15.
[0026]
The scan AF processing circuit 14 receives the input digital image signal, extracts a high-frequency component of image data for one screen through a high-pass filter (HPF) or the like, and further performs arithmetic processing such as cumulative addition. Is Thus, the AF evaluation signal corresponding to the contour component amount on the high frequency side and the like is calculated. As described above, the scan AF processing circuit 14 plays a role of a high frequency component detecting unit that detects a predetermined high frequency component from the image signal generated by the CCD 5 in the process of performing the AF process. The AF evaluation value is obtained for each predetermined position of the focus lens group 3, and is output to the CPU 15 each time.
[0027]
On the other hand, a predetermined timing signal is output from the TG 16 to the CPU 15, the imaging circuit 6, and the CCD driver 17, and the CPU 15 performs various controls in synchronization with the timing signal. Further, the imaging circuit 6 receives the timing signal from the TG 16 and performs various image processing such as separation of color signals in synchronization with the timing signal. Further, the CCD driver 17 receives the timing signal of the TG 16 and drives the CCD 5 in synchronization with the timing signal.
[0028]
Further, the CPU 15 controls the first motor drive circuit 18, the second motor drive circuit 19, and the third motor drive circuit 20, respectively, so that the aperture drive motor 21, the focus drive motor 22, and the zoom drive motor 23 The aperture 4, the focus lens group 3, and the zoom lens group 2 are drive-controlled. That is, the CPU 15 controls the first motor drive circuit 18 based on the AE evaluation value or the like calculated by the AE processing circuit 13 to drive the aperture drive motor 21 and adjusts the aperture amount of the aperture 4 to be appropriate. Perform control. Further, the CPU 15 controls the second motor drive circuit 19 based on the AF evaluation signal calculated by the scan AF processing circuit 14 to drive the focus drive motor 22 and perform AF control for moving the focus lens group 3 to a focus position. Do. When a zoom switch (not shown) among the operation switches 24 is operated, the CPU 15 receives the command and controls the third motor drive circuit 20 to drive and control the zoom motor 23 to thereby control the zoom lens group 2. It is moved to perform a zooming operation (zooming operation) of the photographing optical system.
[0029]
Next, an actual photographing operation of the image pickup apparatus 1 will be described with reference to a flowchart shown in FIG.
[0030]
When the main power switch of the imaging device 1 is on and the operation mode of the imaging device 1 is a shooting (recording) mode, a shooting processing sequence is executed.
[0031]
First, in step S1, the CPU 15 displays an image transmitted through the photographing lens barrel 31 and formed on the CCD 5 on the LCD 10 as an image. That is, the subject image formed on the CCD 5 is subjected to photoelectric conversion processing by the CCD 5 to be converted into an electrical signal, and then output to the imaging circuit 6. Then, various kinds of signal processing are performed on the input signal to generate a predetermined image signal, which is then output to the A / D conversion circuit 7, converted into a digital signal (image data), and temporarily stored in the VRAM 8. Is stored. The image data stored in the VRAM 8 is output to the D / A conversion circuit 9, converted into an analog signal, converted into an image signal in a form suitable for display, and then displayed on the LCD 10 as an image.
[0032]
Next, in step S2, the state of the release switch is confirmed. When the CPU 15 confirms that the release switch has been operated by the photographer and SW1 (the first stroke of the release switch) has been turned on, the process proceeds to the next step S3, where normal AE processing is executed. Subsequently, in step S4, scan AF processing is performed. That is, the CPU 15 performs the scan AF process for detecting the focus position in step S4.
[0033]
The outline will be described with reference to FIG.
[0034]
Scan AF is performed by finding the position of the focus lens group 3 where the high-frequency component output from the image signal generated by the CCD 5 is the largest. The CPU 15 controls the focus drive motor 22 via a second motor drive circuit 19 for controlling the drive of the focus drive motor 22, and moves the focus lens group 3 from a position corresponding to infinity (“A” in FIG. 3). Driving is performed to a position ("B" in FIG. 3) corresponding to the close distance set in the mode. Then, while driving, the output (AF evaluation signal) of the scan AF processing circuit 14 is acquired, and from the AF evaluation signal acquired at the time when the driving of the focus lens group 3 is completed, the position at which it becomes maximum (“ C)), and the focus lens group 3 is driven to that position.
[0035]
The acquisition of the output of the AF processing circuit 14 is not performed at the stop positions of all the focus lens groups 3 but at every predetermined step in order to speed up the scan AF. In this case, an AF evaluation signal may be obtained at points a1, a2, and a3 shown in FIG. In such a case, the in-focus position C is obtained by calculation from the point where the AF evaluation signal has the maximum value and the points before and after the point. In this way, the interpolation calculation is performed to evaluate the reliability of the AF evaluation signal before obtaining the point (C in FIG. 3) at which the AF evaluation signal has the maximum value. If the reliability is sufficient, a point at which the AF evaluation signal has a maximum value is obtained.
[0036]
As a result of evaluating the reliability of the AF evaluation signal as described above, if the reliability is high, AFOK display is performed in step S5. This is performed by turning on the display element 29, and at the same time, processing such as displaying a green frame on the LCD. On the other hand, as a result of evaluating the reliability of the AF evaluation signal, if the reliability is low, the process for obtaining the point at which the AF evaluation signal has the maximum value is not performed, and AFNG display is performed in step S5. This is performed by, for example, blinking the display element 29, and at the same time, processing such as displaying a yellow frame on the LCD 10.
[0037]
In the next step S6, the CPU 15 checks SW2 (second stroke of the release switch). If SW2 is turned on, the process proceeds to step S7 to execute actual exposure processing.
[0038]
Next, the details of the method of determining the reliability of the AF evaluation signal in the scan AF in step S4 will be described.
[0039]
Except for the special case of the near-far conflict, the AF evaluation signal has a mountain shape as shown in FIG. 4 when the horizontal axis represents the distance and the vertical axis represents the AF evaluation value. Therefore, in the present embodiment, whether or not the AF evaluation signal has a mountain shape is determined by determining the difference between the maximum value and the minimum value of the AF evaluation signal, the length of a portion that is inclined at a slope equal to or more than a certain value, and the slope. The reliability of the AF evaluation signal is determined by making a determination based on the gradient of the existing portion.
[0040]
In the present embodiment, as shown in FIG. 4, points D and E, which are recognized as being inclined from the top of the mountain (point A), are obtained, and the width of the points D and E is calculated as the widths L and A of the mountains. The sum SL1 + SL2 of the difference SL1 between the maximum value and the minimum value of the AF evaluation values at the points D and D and the difference SL2 between the maximum value and the minimum value of the AF evaluation values at the points A and E are defined as a mountain slope SL.
[0041]
It is described that one of the determinations of monotonous decrease (whether it looks like a mountain) uses the “gradient of a sloping portion”, but the actual signal has a constant gradient. However, the average value (the average value of the inclination of the inclined portion) is used as the value representing the gradient.
[0042]
The details will be described with reference to the flowchart shown in FIG.
[0043]
First, in step S101, the maximum value and the minimum value of the AF evaluation value output from the scan AF processing circuit 14 and the scan point io giving the maximum value are obtained. Thereafter, in step S102, both a variable L representing the peak width of the AF evaluation value and a variable SL representing the gradient of the peak are initialized to zero.
[0044]
Next, in step S103, it is checked whether or not the scan point io giving the maximum value is at a position corresponding to infinity. If not, the process proceeds to step S104, and the monotonous decrease in the position direction corresponding to infinity is performed. Find out. If the position corresponds to infinity, this process is skipped and the process proceeds to step S105.
[0045]
Here, the process of checking for a monotonous decrease in the position direction corresponding to infinity in step S104 will be described with reference to the flowchart in FIG.
[0046]
First, in step S401, the value of the counter i is initialized to io. Then, the difference value d [i] -d between the AF evaluation value d [i] at i and the AF evaluation value d [im] at the scan point im at infinity m scan points from i. [Im] is obtained, and the obtained value is compared with a threshold value SlpThr (see FIG. 4) for determining that the AF evaluation value has definitely decreased (step S402). Here, m is an integer of 2 or more. By comparing the AF evaluation values at the distant scan points (points distant from the adjacent data acquisition point), it is possible to remove the influence of fluctuations such as noise.
[0047]
As a result of the comparison, if d [i] -d [im] is equal to or more than the threshold value SlpThr (d [i] -d [im]> = SlpThr), the process proceeds to step S406, where the AF evaluation value The variable L representing the width of the mountain and the variable SL representing the gradient of the mountain are updated according to the following formula. Note that “> =” means “≧”.
[0048]
L = L + 1
SL = SL + (d [i] −d [im]) / m
The threshold value SlpThr is set for the luminance Bv according to the following equation.
[0049]
SlpThr = m × 3 × Bv
However, the minimum value of SlpThr is 30 and the maximum value is 150. If a value below the decimal point appears, it is truncated. This is because a decimal point operation is not performed to speed up the operation. Regarding the threshold value SlpThr, the signal of the AF evaluation value itself tends to be large when the luminance is high, and thus the magnitude is changed according to the luminance. In step S406, the value of the counter i is subtracted by -1.
[0050]
In step S402, if d [i] −d [im]> = SlpThr, the process proceeds to step S403. Then, in step S403, it is checked whether or not the compared value of i is io, that is, whether or not it is a point to start the check of the monotonous decrease. If the result i is a point to start the monotonous decrease check, the process proceeds to step S404, and it is determined whether d [i] -d [im] is greater than -SlpThr. If d [i] -d [im]>-SlpThr, in step S405, a flag EqFlg indicating that the slope is monotonously decreasing even if the slope is less than SlpThr is turned on. Then, the process proceeds to step S406, in which the variable L representing the peak width of the AF evaluation value and the variable SL representing the gradient of the peak are updated as described above.
[0051]
Note that d [i] -d [im]>-SlpThr can be replaced with d [i]> d [im] -SlpThr. Originally, it is assumed that d [i] is larger than d [im], but here, it is intended to permit even when d [i] is smaller than d [im]. This is because the magnitude relationship may be reversed due to noise or the like. However, even if the magnitude relationship is reversed due to noise or the like, it is assumed that the difference is smaller than SlpThr. Here, if d [i] is larger than d [im] -SlpThr, the magnitude of d [i] −d [im]> − SlpThr is reversed by noise or the like, but decreases monotonically. It means that it is determined to be performed.
[0052]
This is because the AF evaluation values are obtained discretely as shown in FIG. 3, and when the AF evaluation values are obtained at points a2 and a3 shown in FIG. The inclination to the point is gentle (note that FIG. 3 shows an example in which a2 and a3 monotonously decrease in the closest direction, and therefore, in this description, it is actually a drawing obtained by inverting left and right in FIG. 3), and d [ Although there is a possibility that the condition of i] -d [im]> = SlpThr may not be satisfied, the condition is clearly monotonically decreasing. In such a case, it is determined that the condition is monotonically decreasing.
[0053]
If the above condition is not satisfied in step S404, it is determined that the monotonous decrease in the infinity direction has not occurred, and the process of checking the monotonous decrease in the infinity direction ends, and the process proceeds to step S410.
[0054]
If it is determined in step S403 that i is not the point at which the monotonous decrease check is started, it is checked in step S411 whether d [i]> d [im]. If d [i]> d [im], it is not sufficient, but it can be determined that a monotonous decrease has occurred. This is represented by a monotonic decrease of length (d [i] -d [im]) / SlpThr and a slope of (d [i] -d [im]) / SlpThr / m, that is, a normal monotonic decrease. Is treated as having caused a monotonic decrease of SlpThr. Then, in step S412, the variable L representing the width of the mountain of the AF evaluation value and the variable SL representing the gradient of the mountain are updated according to the following equation.
[0055]
L = L + (d [i] −d [im]] / SlpThr
SL = SL + (d [i] −d [im]) / SlpThr / m
In step S412, the value of the counter i is subtracted by -1.
[0056]
In the following steps S407 and S408, L and SL / L are compared with threshold values Lo and SLo / Lo relating to the width of the mountain and the gradient of the mountain (the average value of the inclination) to be regarded as a mountain. It is determined whether or not both are greater than or equal to the threshold value. If both are greater than or equal to the threshold value, since the condition for the process of determining the reliability of the AF evaluation value later is satisfied, the process of checking for a monotonous decrease in the infinity direction is not performed any more. move on.
[0057]
If both or one of them is less than the threshold value, the process advances to step S409 to check whether the counter i has reached a value (= 0) corresponding to infinity. If the value of the counter is 0, that is, if the start point for detecting the monotonic decrease reaches a position corresponding to infinity, the process of checking for a monotonous decrease in the infinity direction ends, and the process proceeds to step S410. In step S410, the AF evaluation value d [io] of the variable L representing the peak width of the AF evaluation value, the variable SL representing the gradient of the mountain, and the counter io representing the point at which the check of the monotonous decrease of the AF evaluation value is started. Record
[0058]
Thus, the monotonous decrease from i = io toward infinity is checked.
[0059]
Returning to FIG. 5, when the processing for checking the monotonous decrease toward infinity is completed, it is checked whether or not the scan point io giving the maximum value is a position corresponding to the closest end where the scan AF is performed. If the position is not the position corresponding to, the process proceeds to step S106, and a monotonous decrease in the position direction corresponding to the closest end is checked. If the position corresponds to the closest end, this process is skipped and the process proceeds to step S107.
[0060]
Here, the process of checking the monotonous decrease in the position corresponding to the closest end in step S106 will be described with reference to the flowchart in FIG.
[0061]
First, in step S501, the value of the counter i is initialized to io. Then, the difference value d [i] −d [i + m] between the AF evaluation value d [i] at i and the AF evaluation value d [i + m] at the scan point i + m closer than m scan points from i is calculated. Then, the value is compared with a threshold value SlpThr for determining that the AF evaluation value has definitely decreased. Here, m is an integer of 2 or more. By comparing the AF evaluation values at distant scan points in this manner, the influence of fluctuations such as noise can be removed.
[0062]
As a result of the comparison, if d [i] -d [i + m] is equal to or larger than the threshold value SlpThr, the process proceeds to step S506, and the variable L representing the peak width of the AF evaluation value and the variable SL representing the gradient of the peak are set as follows. Update according to the formula.
[0063]
L = L + 1
SL = SL + (d [i] −d [i + m]) / m
If it is determined in step S502 that d [i] −d [i + m]> = SlpThr, the process proceeds to step S503. In step S503, it is checked whether or not the compared value of i is io, that is, whether or not it is a point to start the check of the monotonous decrease. As a result, if i is the point at which the check for the monotonous decrease starts, the process proceeds to step S504, and the state of the flag EqFlg is checked. If this flag is on, a check is made when the AF evaluation values are obtained at points a2 and a3 shown in FIG. Has been completed, the process proceeds to step S511. On the other hand, if the flag is off, the process advances to step S505 to check whether d [i] -d [i + m] is greater than -SlpThr. If d [i] −d [i + m]> − SlpThr, the process proceeds to step S506, and the variable L representing the peak width of the AF evaluation value and the variable SL representing the gradient of the peak are updated as described above. This is because the AF evaluation values are obtained discretely as shown in FIG. 3, and when the AF evaluation values are obtained at points a2 and a3 shown in FIG. There is a possibility that the condition of d [i] −d [i + m]> = SlpThr may not be satisfied, but the condition is monotonically decreasing. This is to determine.
[0064]
If the above condition is not satisfied in step S505, it is determined that the monotonous decrease in the close direction has not occurred, and the process of checking the monotonous decrease in the close direction ends, and the process proceeds to step S510. If the condition is not satisfied in step S503, the process proceeds to step S511.
[0065]
In step S511, it is determined whether d [i]> d [i + m]. When d [i]> d [i + m] is not sufficient, it can be determined that a monotonous decrease has occurred. This is calculated by dividing the length by (d [i] −d [i + m]) / SlpThr and the slope by (d [i] −d [i + m]) / SlpThr / m, that is, by the SlpThr of the normal monotone decrease. Treat as a monotonous decrease. Then, in step S512, the variable L representing the width of the mountain of the AF evaluation value and the variable SL representing the gradient of the mountain are updated according to the following equation.
[0066]
L = L + (d [i] −d [i + m]) / SlpThr
SL = SL + (d [i] −d [i + m]) / SlpThr / m
In the next steps S507 and S508, L and SL / L are compared with threshold values Lo and SLo / Lo relating to the peak width and the peak gradient, which are regarded as peaks. Is determined. If both are greater than or equal to the threshold value, since the condition for the process of determining the reliability of the AF evaluation value later is satisfied, the process of checking for a monotonous decrease in the closest direction is not performed any more, and the process proceeds to step S510. .
[0067]
If both or one of them is less than the threshold value, the flow advances to step S509 to check whether or not the counter i has reached a value (= N) corresponding to the nearest distance. If the value of the counter is N, that is, if the start point of detecting the monotonic decrease has reached a position corresponding to the closest distance, the process of checking the monotonous decrease in the infinity direction ends, and the process proceeds to step S510. In step S510, the AF evaluation value d [io] of the variable L indicating the width of the mountain of the AF evaluation value, the variable SL indicating the gradient of the mountain, and the counter io indicating the point at which the check of the monotonous decrease of the AF evaluation value is started. Record
[0068]
Thus, the monotonous decrease from i = io to the close direction is checked.
[0069]
Returning to FIG. 5, when the check of the monotonous decrease in the infinity direction and the near end direction is completed, various coefficients for determining the reliability of the AF evaluation value are compared with the respective threshold values, and all the values are compared. If the condition is satisfied, the processing when it is determined that the AF evaluation value is reliable and the processing when it is determined that the AF evaluation value is not reliable are performed, and the process proceeds to step S107 and subsequent steps in FIG.
[0070]
First, in step S107 of FIG. 5, the difference between the maximum value and the minimum value of the AF evaluation value is compared with a predetermined threshold value (def_maxmin), and when the difference is smaller than the predetermined value (max-min <predetermined value). Determines that there is no reliability, and proceeds to step S111.
[0071]
If the value is equal to or greater than the predetermined value (max-min ≧ predetermined value), the process proceeds to step S108, in which the length L of the portion that is inclined with the inclination equal to or more than the predetermined value is compared with a predetermined value Lo which is the threshold value. If it is smaller than the predetermined value (L <Lo), it is determined that there is no reliability, and the process proceeds to step S111.
[0072]
If the value is equal to or greater than the predetermined value Lo, the process proceeds to step S109, where the average value SL / L of the slope of the inclined portion is compared with a predetermined value SLo / Lo that is the threshold value. / L <SLo / Lo), it is determined that there is no reliability, and the process proceeds to step S111.
[0073]
The three thresholds used here for determination are determined by the focal length of the taking lens, the open F value, the distance range in which scan AF is performed, and the scan AF interval (interval between points at which AF evaluation values are acquired). It changes according to the number of scan points for which evaluation values are acquired.
[0074]
Change the threshold according to the following rules:
[0075]
First, a predetermined value Lo, which is a threshold value relating to the length of a portion that is inclined at a certain value or more, is set as follows according to the number of scan points.
[0076]
Number of scan points = 1-5 Lo = 3
Number of scan points = 6-10 Lo = 4
Number of scan points = 11 to 14 Lo = 5
Number of scan points = 15-21 Lo = 6
Number of scan points = 21 to Lo = 7
As described above, the minimum value of Lo is set to 3 and the maximum value is set to 7. This is because the length of the part that is inclined with a slope equal to or more than a certain value representing the width of the mountain needs to be a certain value or more, but if the number of scan points is extremely small, it must be taken into account . Therefore, when the number of scan points is small, the focal length of the photographing lens is short, the open F value is large, and the non-macro area is set as the distance range in which scan AF is performed, the length of the portion inclined at a certain value or more is considered. The threshold Lo regarding the length is reduced. Incidentally, in the case of photographing in a macro area, the number of scan points often increases even when the focal length of the photographing lens is short and the open F value is large.
[0077]
Further, a predetermined value def_maxmin which is a threshold value regarding a difference between the maximum value and the minimum value of the AF evaluation value is set as follows according to the luminance.
[0078]
It is set to be doubled when the brightness value Bv changes from Bv0 to Bv10. In the case of the luminance outside of this, it is set to be the same as Bv0 and Bv10. For example, when def_maxmin = 250 and Bv10 = 10 when Bv0 = 0, def_maxmin in Bv10 is 500. During that time (BV = 0-10)
Figure 2004272033
It becomes. However, if a value after the decimal point comes out, it is rounded down. This is because a decimal point operation is not performed to speed up the operation. When Bv = 0 or less, def_maxmin = 250, and when Bv = 10 or more, def_maxmin = 500.
Further, a predetermined value SLo / Lo, which is a threshold value related to the average value of the inclination of the inclined portion, is set as follows according to the luminance.
[0079]
It is set to be doubled when the brightness value Bv changes from Bv0 to Bv10. In the case of the luminance outside of this, it is set to be the same as Bv0 and Bv10. For example, when Bv0 = 0, if SLo / Lo = 45 and Bv10 = 10, SLo / Lo in Bv10 is 90. During that time (BV = 0-10)
Figure 2004272033
It becomes. However, if a value after the decimal point comes out, it is rounded down. This is because a decimal point operation is not performed to speed up the operation. When Bv = 0 or less, SLo / Lo = 45, and when Bv = 10 or more, SLo / Lo = 90.
[0080]
Regarding the latter two threshold values, when the luminance is high, the signal of the AF evaluation value itself tends to be large, and thus the magnitude is changed depending on the luminance.
[0081]
Here, the Bv value obtained from the photometric module that determines the shutter speed, aperture, and the like at the time of shooting is used as luminance information, but the information relating to luminance used in the present invention is not limited to this. For example, an average value of the AF evaluation signal itself, an average value of an image signal in an area where AF is performed, or the like may be used.
[0082]
Returning to FIG. 5 again, when the above three conditions are satisfied, it is determined that the AF evaluation value is reliable, and the process proceeds to step S110, where the focus lens group 3 is moved from the AF evaluation value calculated by the scan AF circuit 14. Find the position to drive. This is calculated by obtaining the position at which the discretely calculated AF evaluation value becomes the maximum by performing an interpolation operation or the like.
[0083]
If it is determined that the AF evaluation value is not reliable and the process proceeds to step S111, the focus lens group 3 is driven to a predetermined position called a fixed point.
[0084]
In the first embodiment described above, the reliability of the AF evaluation signal is determined from its shape, that is, whether or not the shape is mountain-like is determined by the difference between the maximum value and the minimum value of the AF evaluation signal, The reliability of the AF evaluation signal is determined by judging from the length of the portion inclined by the above inclination and the average value of the inclination of the inclined portion. By taking the difference and, when the difference is a slope equal to or less than a predetermined value, the difference (predetermined value) is set to the length of the decreasing section, so that the influence of a minute fluctuation due to noise or the like can be removed, and high accuracy can be achieved. This makes it possible to determine the reliability of the AF evaluation signal.
[0085]
(Second embodiment)
The basic configuration and the basic operation procedure of the imaging apparatus according to the second embodiment of the present invention are the same as those of the first embodiment, and are shown by the block diagram of FIG. 1 and the flowchart of FIG. I have.
[0086]
A low contrast determination method according to the second embodiment, which is different from the first embodiment, will be described with reference to the flowchart in FIG.
[0087]
First, in step S701, a maximum value and a minimum value of the AF evaluation value output from the scan AF processing circuit 14 and an average value thereof are obtained. At the same time, the value of the counter io indicating the point at which the check for the monotonous decrease of the AF evaluation value is started is initialized to a value corresponding to infinity to zero. Then, in step S702, it is checked whether the value of the AF evaluation value at that io is equal to or greater than the average value of the AF evaluation values obtained in step S701. If the average value is less than the average value, the flow proceeds to step S708 without checking for a monotonous decrease in the AF evaluation value from that point, and it is checked whether or not io has reached a position corresponding to the closest end. If not, io = io + 1 and io are updated, and the process is continued.
[0088]
In step S702, if the value of the AF evaluation value at io is equal to or more than the average value of the AF evaluation values obtained in step S701, the process proceeds to step S703 and the subsequent steps where a check is made for a monotonous decrease in the AF evaluation value.
[0089]
First, in step S703, a variable L representing the width of the peak of the AF evaluation value and a variable SL representing the gradient of the peak are both initialized to zero. In step S704, it is checked whether or not io is a position corresponding to infinity. If it is not a position corresponding to infinity, in step S705, a monotonous decrease in the AF evaluation value in the infinity direction is checked. If the position corresponds to infinity, step S705 is skipped and the process proceeds to step S706.
[0090]
In the process of checking for a monotonous decrease in the position direction corresponding to infinity in step S705, the same process as in the first embodiment is performed.
[0091]
If the process of checking for a monotonous decrease toward infinity has been completed, the process advances to step S706 to check whether io is a position corresponding to the closest end where scan AF is performed. Then, the process proceeds to step S708, and a monotonous decrease in the AF evaluation value in the position direction corresponding to the closest end is checked. If the position corresponds to the closest end, the process is skipped and the process proceeds to step S710.
[0092]
If the process of checking for a monotonous decrease in the closest direction has been completed, the process proceeds to step S708, where it is determined whether or not io is a position corresponding to the closest end where scan AF is performed. The process advances to step S709 to update io = io + 1, shift the start point for checking monotonous decrease to the nearest end by one scan point, and continue the processing. When io reaches the position corresponding to the closest end, the check for a monotonous decrease toward infinity and the closest end is ended.
[0093]
If the check of the monotonous decrease in the infinity direction and the near end direction is completed, in step S710, the variable L representing the peak width of the AF evaluation value becomes the maximum, the variable L representing the peak width of the AF evaluation value. , A combination of a variable SL representing a mountain slope and a counter io representing a point at which a check for a monotonous decrease in the AF evaluation value is started is made. If there are a plurality of the same L as L, the one with the larger AF evaluation value d [io] in io is selected, and if there are a plurality of those with the same d [io], the one with the closer io is selected.
[0094]
Next, various coefficients for determining the reliability of the selected AF evaluation value are compared with respective threshold values, and a process when it is determined that the AF evaluation value is reliable if all the conditions are satisfied is performed. Then, the processing in the case where it is determined that there is no reliability is shifted to step S711 and subsequent steps.
[0095]
First, in step S711, the difference between the maximum value and the minimum value of the AF evaluation value is compared with a predetermined value that is the threshold value. If the difference is smaller than the predetermined value, it is determined that there is no reliability, and the process proceeds to step S715.
[0096]
If the value is equal to or more than the predetermined value, the process proceeds to step S712, where the length L of the portion inclined with a certain value or more is compared with a predetermined value Lo which is the threshold value. It is determined that there is no property, and the process proceeds to step S715.
[0097]
If the value is equal to or greater than the predetermined value Lo, the process proceeds to step S713, in which the average value SL / L of the slope of the inclined portion is compared with a predetermined value SLo / Lo as a threshold value, and is smaller than the predetermined value SLo / Lo. In this case, it is determined that there is no reliability, the process proceeds to step S715, and the focus lens is driven to a predetermined position called a fixed point. As in the first embodiment, the three threshold values used for determination here are the focal length of the photographing lens, the open F value, the distance range in which scan AF is performed, and the scan AF interval (obtain the AF evaluation value). The distance is changed according to the number of scan points for acquiring the AF evaluation value determined from the distance between the scan points.
[0098]
Also in the second embodiment described above, the reliability of the AF evaluation signal is determined from its shape, that is, whether or not the shape is mountain-shaped is determined by the difference between the maximum value and the minimum value of the AF evaluation signal, which is equal to or more than a certain value. The reliability of the AF evaluation signal is determined by judging from the length of the part inclined by the inclination of the inclination and the average value of the inclination of the inclination part, and the difference from the data acquisition point two points apart is determined. If the difference is less than or equal to a predetermined value, (difference / predetermined value) is set to the length of the decreasing section, thereby removing the influence of minute fluctuations due to noise and the like, and performing AF evaluation with high accuracy. This makes it possible to determine the reliability of the signal.
[0099]
Finally, embodiments of the automatic focusing apparatus according to the present invention other than Claim 1 will be enumerated below.
[0100]
(Embodiment 1) Imaging means for photoelectrically converting a subject image formed by a photographic optical system to obtain an electrical image signal, focus adjusting means for adjusting the focus of the subject image formed on the imaging means, A focus position detection unit that detects a focus position based on a focus evaluation signal generated from an image signal from the imaging unit while driving the focus adjustment unit, wherein the focus position detection unit includes: The reliability of the focus evaluation signal is determined based on the length of the monotonically decreasing section of the signal, the average value of the slope of the monotonically decreasing section, and the difference between the maximum value and the minimum value of the signal. If the focus evaluation signal is high, the focus position is detected based on the focus evaluation signal, and if the reliability is low, a predetermined signal is detected as the focus position. The judgment of whether or not An automatic focus adjustment apparatus, wherein the automatic focus adjustment is performed using a difference from a point distant from a data acquisition point.
[0101]
(Embodiment 2) The in-focus position detecting means compares a difference between a point distant from an adjacent data acquisition point with a predetermined value to determine whether or not the focus evaluation signal is monotonically decreasing. 2. The automatic focusing apparatus according to claim 1, wherein it is determined that a monotonous phenomenon having a length of one unit has occurred in the case.
[0102]
(Embodiment 3) The in-focus position detecting means compares whether or not the focus evaluation signal monotonously decreases with a difference between a point distant from an adjacent data acquisition point and a predetermined value. In this case, it is determined that a monotonous phenomenon having a length of one unit has occurred, and if less than a predetermined value and equal to or greater than zero, it is determined that a monotonous phenomenon having a difference of the length / predetermined value has occurred. The automatic focus adjustment device according to claim 1 or 1, wherein
[0103]
(Embodiment 4) The threshold value for determining the reliability of the focus evaluation signal, the length of the monotonically decreasing section of the focus evaluation signal, the average value of the slope of the monotonically decreasing section, 4. The automatic focus adjustment device according to claim 1, wherein a difference between a maximum value and a minimum value of the focus evaluation signal is changed according to a luminance signal at that time.
[0104]
【The invention's effect】
As described above, according to the present invention, it is possible to provide an automatic focus adjustment device that can determine the reliability of an AF evaluation signal with high accuracy and can improve the focus rate on a low-contrast subject.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a circuit configuration of an automatic focus adjustment device according to a first embodiment of the present invention.
FIG. 2 is a flowchart showing an automatic focus adjustment device according to the first embodiment of the present invention.
FIG. 3 is a diagram illustrating an example of an AF evaluation signal according to the first embodiment of the present invention.
FIG. 4 is a diagram for explaining the concept of determining the reliability of an AF evaluation value in the first embodiment of the present invention.
FIG. 5 is an explanatory diagram showing an operation of a method for determining the reliability of an AF evaluation signal in the first embodiment of the present invention.
FIG. 6 is an explanatory diagram showing an operation for obtaining a monotonous decrease in the direction of infinity according to the first embodiment of the present invention.
FIG. 7 is an explanatory diagram showing an operation for obtaining a monotonous decrease in the near end direction according to the first embodiment of the present invention.
FIG. 8 is an explanatory diagram showing an operation of a method for determining the reliability of an AF evaluation signal according to the second embodiment of the present invention.
[Explanation of symbols]
1 Imaging device
2 Zoom lens group
3 Focus lens group
4 Aperture
31 Shooting lens barrel
5 Solid-state imaging devices such as CCD
6. Imaging circuit
7 A / D conversion circuit
8 Memory (VRAM)
9 D / A conversion circuit
10. Image display device such as liquid crystal display device (LCD)
12 Memory for storing image data
11 Compression / expansion circuit
13 AE processing circuit
14. Scan AF processing circuit
15 CPU
16 Timing Generator
17 CCD driver
21 Aperture drive motor
18 1st motor drive circuit
22 Focus drive motor
19 Second motor drive circuit
23 Zoom drive motor
20 Third motor drive circuit
24 Operation switch
25 EEPROM
26 batteries
27 Switching circuit
28 Strobe Light Unit
29 Display element

Claims (1)

撮影光学系により結像される被写体像を光電変換して電気的な画像信号を得る撮像手段と、前記撮像手段に形成される被写体像の焦点を調整する焦点調整手段と、前記焦点調整手段を駆動しながら前記撮像手段よりの画像信号から生成される焦点評価信号を基に合焦位置を検出する合焦位置検出手段とを有し、前記合焦位置検出手段は、前記焦点評価信号の信頼性を、その信号の単調減少している区間の長さ、単調減少している区間の傾斜の平均値、その信号の最大値と最小値の差にて判定し、該判定結果に基づいて前記合焦位置を検出する自動焦点調整装置において、
前記焦点評価信号が単調減少しているか否かの判定を、隣接するデータ取得ポイントより離れたポイントとの差分を用いて行うことを特徴とする自動焦点調整装置。
An imaging unit that photoelectrically converts a subject image formed by a photographing optical system to obtain an electrical image signal; a focus adjustment unit that adjusts a focus of the subject image formed on the imaging unit; and the focus adjustment unit. Focusing position detection means for detecting a focus position based on a focus evaluation signal generated from an image signal from the imaging means while driving, wherein the focus position detection means Is determined by the length of the monotonically decreasing section of the signal, the average value of the slope of the monotonically decreasing section, the difference between the maximum value and the minimum value of the signal, and based on the determination result, In an automatic focus adjustment device that detects the in-focus position,
An automatic focus adjustment device, wherein the determination as to whether or not the focus evaluation signal monotonously decreases is performed using a difference from a point far from an adjacent data acquisition point.
JP2003064472A 2003-03-11 2003-03-11 Automatic focusing device Pending JP2004272033A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003064472A JP2004272033A (en) 2003-03-11 2003-03-11 Automatic focusing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003064472A JP2004272033A (en) 2003-03-11 2003-03-11 Automatic focusing device

Publications (1)

Publication Number Publication Date
JP2004272033A true JP2004272033A (en) 2004-09-30

Family

ID=33125756

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003064472A Pending JP2004272033A (en) 2003-03-11 2003-03-11 Automatic focusing device

Country Status (1)

Country Link
JP (1) JP2004272033A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006106484A (en) * 2004-10-07 2006-04-20 Pentax Corp Focus detection method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006106484A (en) * 2004-10-07 2006-04-20 Pentax Corp Focus detection method

Similar Documents

Publication Publication Date Title
JP4886210B2 (en) Imaging device
US9277112B2 (en) Auto focusing apparatus and auto focusing method, and image sensing apparatus
US8259214B2 (en) Image pickup apparatus and auto-focus detection method
JP6116277B2 (en) Imaging apparatus and control method thereof
JP3679693B2 (en) Auto focus camera
JP2008009341A (en) Autofocus device and method, and imaging apparatus
JP4543602B2 (en) camera
JP2004325517A (en) Imaging unit
JP2007148249A (en) Automatic focusing device
JP2004361484A (en) Autofocus camera
JP5020643B2 (en) Imaging apparatus and control method thereof
JP4235422B2 (en) FOCUS DETECTION METHOD, FOCUS DETECTION DEVICE, AND IMAGING DEVICE
JP5173676B2 (en) Automatic focus adjustment device and control method thereof
JP2009175184A (en) Automatic focusing apparatus and automatic focusing method therefor
JP3296687B2 (en) Auto focus video camera
JP4185740B2 (en) Automatic focus adjustment device, imaging device, reliability determination method, program, and storage medium
JP5765935B2 (en) Focus adjustment apparatus and method
JP5371474B2 (en) Imaging apparatus, control method, and program
JP6272015B2 (en) Focus adjustment apparatus and method, and imaging apparatus
JP4902946B2 (en) Auto focus camera
JP2004077960A (en) Camera
JP2004272033A (en) Automatic focusing device
JP6124628B2 (en) Focus adjustment device and focus adjustment method
JP6274779B2 (en) Focus adjustment device, imaging device, and focus adjustment method
JP2006157604A (en) Camera apparatus and automatic photographing control program