JP4228430B2 - Focus position determination method and apparatus - Google Patents

Focus position determination method and apparatus Download PDF

Info

Publication number
JP4228430B2
JP4228430B2 JP27503998A JP27503998A JP4228430B2 JP 4228430 B2 JP4228430 B2 JP 4228430B2 JP 27503998 A JP27503998 A JP 27503998A JP 27503998 A JP27503998 A JP 27503998A JP 4228430 B2 JP4228430 B2 JP 4228430B2
Authority
JP
Japan
Prior art keywords
contrast
evaluation value
image
movement amount
calculation unit
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
JP27503998A
Other languages
Japanese (ja)
Other versions
JP2000105332A (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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP27503998A priority Critical patent/JP4228430B2/en
Publication of JP2000105332A publication Critical patent/JP2000105332A/en
Application granted granted Critical
Publication of JP4228430B2 publication Critical patent/JP4228430B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、ビデオカメラやデジタルスチルカメラなどの映像機器のおいて、ピントのあった画像を撮影するための焦点位置決定方法および装置に関する。
【0002】
【従来の技術】
ピントのあった画像を撮影するための焦点位置を決定する方法は従来より種々のものが知られている。第1の方法としては、例えば特開昭62−2385109号公報に開示されているように、焦点位置を最も物体側の位置と最も撮影者側の位置のどちらか一方から他方へと移動させながら、一つ手前の位置での画像のコントラストと次の位置でのコントラストとの差を求め、この差が正から0または負に転じる時点の焦点位置を合焦の得られる位置とするものであった。このコントラストは画像信号から求めた高周波成分などにより算出され、ピントが合っている程、高い値を示すものである。
【0003】
また、第2の方法としては、例えば、特開平6−118297号公報に示されているように、焦点位置の可動範囲の中央とその両端位置の位置との3点について先ずコントラストを求め、中央の位置でのコントラストが最大であればこれを合焦の得られる位置と判定し、そうでない場合にはコントラストの高い側がどちらの側であるかを判定し、コントラストの検出範囲を前記コントラストの高い位置の側に移行しながら、最大コントラスト位置であるかどうかによって順次合焦を判定するものであった。
【0004】
【発明が解決しようとする課題】
しかしながら、上記従来の方法では、求めたコントラストが他の位置で求めたコントラストよりも高い場合に、その焦点位置を合焦の得られる位置とするものであるため、合焦の得られる位置を正確に求めるためにはコントラストを求める焦点位置の間隔を小さくしなければならない。このため、特に焦点の移動開始位置と合焦の得られる位置が離れている場合には、焦点の移動とコントラストの検出を相当数繰り返す必要があるため、自動焦点調節に時間がかかるという問題点があった。
【0005】
このような点から、短時間で自動焦点調節を行うことのできる焦点位置決定方法および装置の実現が望まれていた。
【0006】
【課題を解決するための手段】
本発明は、前述の課題を解決するため次の構成を採用する。
〈構成1〉
撮像素子により撮影される映像のコントラストが最大となるように結像系の位置を決定する焦点位置決定方法において、結像系の位置を決定する方法として少なくとも二つの方法を用意し、方法のうちいずれを採用するかを、撮影された映像のコントラストに関する評価値を算出し、評価値を閾値と比較することで決定することを特徴とする焦点位置決定方法。
【0011】
〈構成
構成記載の焦点位置決定方法において、少なくとも二つの方法のうち、一つは、映像のコントラストが最大となる結像系の位置までの移動量を、撮影された映像のコントラストに関する評価値の関数として予め設定し、映像のコントラストが最大となる結像系の位置までの移動量を求める場合は、先ず、撮像素子で撮影される映像の評価値を求め、次に、評価値から関数に基づいて移動量を決定する方法であり、もう一つは、互いに異なる三つの結像系の位置において撮影された映像のコントラストに関する評価値をそれぞれ算出し、この各位置および各評価値に基づいて、映像のコントラストが最大となる結像系の位置を算出し決定する方法であることを特徴とする焦点位置決定方法。
【0016】
〈構成
撮像素子により撮影される映像のコントラストが最大となるように結像系の位置を決定する焦点位置決定装置において、結像系の位置を決定する手段として設けられた少なくとも二つの手段と、少なくとも二つの手段のうちいずれを採用するかを、撮影された映像のコントラストに関する評価値を算出し、評価値を閾値と比較することで決定するスイッチ部とを備えたことを特徴とする焦点位置決定装置。
【0017】
〈構成
構成に記載の焦点位置決定装置において、少なくとも二つの手段のうち、一つの手段は、映像のコントラストが最大となる結像系の位置までの移動量を、撮影された映像のコントラストに関する評価値の関数として予め設定し、映像のコントラストが最大となる結像系の位置までの移動量を求める場合は、先ず、撮像素子で撮影される映像の評価値を求め、次に、評価値から関数に基づいて移動量を決定する第1の移動量算出部であり、もう一つの手段は、互いに異なる三つの結像系の位置において撮影された映像のコントラストに関する評価値をそれぞれ算出し、この各位置および各評価値に基づいて、映像のコントラストが最大となる結像系の位置を算出し決定する第2の移動量算出部であることを特徴とする焦点位置決定装置。
【0018】
【発明の実施の形態】
以下、本発明の実施の形態を具体例を用いて詳細に説明する。
《具体例1》
〈構成〉
図1は本発明の焦点位置決定方法の具体例1を示すフローチャートであるが、これに先立ち、本発明の焦点位置決定方法を実現するための焦点位置決定装置の説明を行う。
【0019】
図2は、本発明の具体例1の焦点位置決定装置を示す構成図である。
図の装置は、レンズ101、撮像素子102、A/D変換部103、評価値算出部104、移動量算出部105、評価値記憶部106、焦点位置移動部107からなる。
【0020】
レンズ101は、焦点位置移動部107によって移動し、焦点調節を行うための光学系である。撮像素子102はレンズ101を介して入力した映像を撮影し、映像信号として出力するための素子である。
【0021】
A/D変換部103は、撮像素子102から出力されたアナログの映像信号をデジタル画像信号に変換する機能部である。評価値算出部104は、A/D変換部103で変換されたデジタル画像からコントラストの程度を示す評価値としてのインデックス値を算出する機能部である。移動量算出部105は、評価値算出部104で求められたインデックス値を入力し、これを現在の画像のインデックス値として評価値記憶部106に記憶させ、また、評価値記憶部106に記憶されている前回のインデックス値に基づき、次の焦点位置の移動量および移動方向を決定する機能を有している。評価値記憶部106は、評価値としてのインデックス値を少なくとも過去1回分記憶するための記憶部である。また、焦点位置移動部107は、移動量算出部105の出力に基づきレンズ101の移動を行う制御部である。
【0022】
〈動作〉
先ず、A/D変換部103の動作について説明する。
映像は撮像素子102で撮影され、撮像素子102からの出力は電圧値の変化によって1フレームの情報として出力される。A/D変換部103では、この電圧値の変化を、通常0から255までの整数値(濃度値)に変換し、この整数値の並びとして映像の1フレームを表現する。以降、この整数値の並びとして表現された映像の1フレームをデジタル画像と呼ぶ。また、デジタル画像の構成要素を画素と呼ぶ。
【0023】
一般には、整数値への変換に際し、明るさ調整パラメータbおよびコントラスト調整パラメータcの二つのパラメータが存在する。即ち、電圧値vはパラメータbおよびcによって、変換後の値c(v+b)に一旦変換され、この値がある電圧範囲を256等分した区間のどこに入るかによって0から255の整数に変換する。尚、明るさ調整パラメータbは電圧値vのオフセット、コントラスト調整パラメータcは電圧値vの拡大率である。
【0024】
以降の説明では、A/D変換部103によって得られるデジタル画像をW×H画素(横W画素、縦H画素)から構成されるものとし、この画素位置を画像左上端の画素を原点とするx,y座標系によって表現する。そして位置(x,y)にある画素の濃度値をI(x,y)と表す。
【0025】
次に、評価値算出部104、移動量算出部105および評価値記憶部106の処理を図1に沿って説明する。先ず、評価値算出部104の処理を説明する。
【0026】
評価値算出部104は、評価値であるインデックス値を算出する(図1のステップS1)。このインデックス値は画像中央部に設定した横w画素、縦h画素の処理範囲において、2s画素間隔で設定した注目画素(x,y)と、その上下左右にs画素間隔で隣接する参照画素との濃度差に基づいて、次式で算出する。
【0027】
Index=Σ{(I(x−s,y)−I(x,y))2+(I(x+s,y)−I(x,y))2+(I(x,y−s)−I(x,y))2+(I(x,y+s)−I(x,y))2} …(1)
但し、総和は全注目画素について行う。
【0028】
図3は、注目画素の設定位置の説明図である。
図において、処理範囲は位置(x,y)を左上画素の位置とする横w画素、縦h画素の矩形領域である。注目画素は黒丸で、参照画素は白丸で示されている。注目画素は横方向に2s画素間隔で設定されており、この設定位置が互いにs画素ずつずれているものが縦方向にs画素ずつ交互に設定されている。
【0029】
尚、この処理範囲や注目画素の位置は撮影対象等によって事前に設定しておくものであり、例えば処理範囲は画面全体ではなく、画像中央部の限定された領域などとしてもよい。また、隣接画素間の間隔s=2(1画素おき)などにしてもよい。
【0030】
次に移動量算出部105の処理として、事前に設定する関数について説明する。
移動量算出部105は、インデックス値を用いて焦点位置の移動量と移動方向を決定するものである。この移動量決定を行うため、焦点位置Pで得られる画像のインデックス値Index(P)を、焦点位置Pと合焦の得られる位置からのずれの量ΔPによる関数として、次式のようにモデル化する。
【0031】
Index(P)=f(ΔP) …(2)
そして、この関数fの逆関数Fを用い、現在のインデックス値Inから移動量を決定する。
移動量=F(In) …(3)
【0032】
また、移動方向はインデックス値の高い方に向かうものとする。ここでは、算出したインデックス値と、前回算出した評価値記憶部106に記憶させていたインデックス値とを比較し、現在のものが前回のものより大きい場合には前回の移動と同方向とし、現在のものが小さい場合には逆方向とする。
【0033】
図4は、インデックス値の変化と関数とを示す説明図である。
この図は、ある被写体に関する焦点位置とインデックス値との関係を示すものである。インデックス値は焦点位置が最もピントの合う位置においてピークとなるように変化する。その変化の様子は双曲線等を用いて近似することができる。同図では、y=200,000/ΔPによりモデル化したインデックス値の変化を示している。ΔPは最もピントの合う焦点距離までの移動量であり、同図ではΔP=|50−P|である。
【0034】
このようなモデル化の式により、ΔP=200,000/yとして移動量を決定することができる。このように式(2)は被写体に関する焦点位置とインデックス値の変化を事前に求めておき、この変化を近似するものとして事前に設定しておくものである。
【0035】
次に移動量算出部105における移動量算出処理について説明する。
移動量算出部105は、評価値算出部104から出力される現在のインデックス値Inを受け取る(ステップS2)。次に、ステップS3では、このInが事前に設定した閾値Ie以上であるかどうかを検査することにより、終了判定を行う。
【0036】
ステップS3の検査の結果、インデックス値Inが閾値Ie未満であった場合には、評価値算出部104より受け取ったインデックス値Inを評価値記憶部106に記憶させ(ステップS4)、次いで、上述した式(3)に従って焦点位置の移動量ΔPを算出する(ステップS5)。
【0037】
次に、前回算出し、評価値記憶部106に記憶されている前回のインデックス値Ipを読み出す(ステップS6)。そして、最新のインデックス値Inと前回のインデックス値Ipを比較し、移動方向を決定する。即ち、In≧Ipである場合には焦点位置の移動方向を前回と同じ方向とし、そうでない場合は逆方向とする。移動方向はカメラ側から被写体側に向かう方向をプラス方向、被写体側からカメラ側に向かう方向をマイナス方向とし、この方向を表す符号が移動量ΔPに付加される。この符号付き移動量は移動量算出部105の内部において記憶され、次回の移動量決定において参照される。そして、ステップS8において、符号付き移動量ΔPが出力される。
【0038】
〈効果〉
以上のように、本具体例では、予め、撮影された映像のコントラストに関するインデックス値を算出し、このインデックスと合焦位置までの移動量とを示す関数を設定し、この関数に基づき合焦位置までの移動量を決定するようにしたので、少ない回数の焦点移動により結像系を合焦の得られる位置に移動させることができ、従って、ピントの合った映像が高速に撮影できる。
【0039】
図5は図4に示す近似式を用いた場合に、移動前の各焦点位置について求められた移動量分だけ移動した場合の焦点位置を示す。
【0040】
移動先の焦点位置は概ね合焦の得られる焦点位置±10の範囲内に収まっており、1回の移動でほぼピントの良好な位置に焦点位置が移動できていることが分かる。ここで、モデル化に用いた関数が実際のインデックス値の変化を正確に再現できている程、その逆関数によって算出した焦点位置はより良好なピントの得られる位置となる。
【0041】
尚、本具体例では、移動方向を決定するため、前回のインデックス値を算出しておく必要があるが、最初の移動については前回算出したインデックス値が利用できない。この場合には初期焦点位置を最もカメラよりの焦点位置とし、初回の移動方向を物体側方向とすればよい。
【0042】
《具体例2》
具体例2は、焦点位置を移動させながらインデックス値の変化を観測し、その結果に基づいて合焦の得られる位置を決定するものである。
【0043】
〈構成〉
図6は、具体例2における焦点位置決定装置の構成図である。
図の装置は、レンズ201、撮像素子202、A/D変換部203、評価値算出部204、移動量算出部205、履歴保存部206、焦点位置移動部207からなる。
【0044】
ここで、レンズ201、撮像素子202、A/D変換部203、評価値算出部204および焦点位置移動部207は、具体例1におけるレンズ101、撮像素子102、A/D変換部103、評価値算出部104および焦点位置移動部107と同様である。
【0045】
移動量算出部205は、評価値算出部204で算出された互いに異なる三つの結像系の位置において撮影された映像のインデックス値に基づき、合焦位置を算出する機能を有する。即ち、移動量算出部205では、合焦位置の算出を、互いに異なる三つの焦点位置のうち、中央の位置において撮影された映像のインデックス値が、残る二つの位置において撮影された映像のインデックス値よりも高い場合について行い、この条件が成立する場合に関し、中央の位置から残る二つの位置までのインデックス値の単位区間幅当たりの変化量を求め、この変化量が大きい区間となる前記二つの位置のうちのいずれかの位置を一方の位置として、残りの位置を他方の位置とし、かつ、焦点位置に対するインデックス値の関係をXY座標系の点として考えた場合、一方の位置のインデックス値を示す点から中央の位置のインデックス値を示す点を結んだ直線を延長して一方の直線とし、かつ、この一方の直線とは逆の傾きで他方の位置のインデックス値を示す点を通る直線を他方の直線として、一方の直線と他方の直線とが交わる点の焦点位置を合焦位置として算出する機能を有している。
【0046】
履歴保存部206は、焦点位置とその時のインデックス値とを、少なくとも過去3回分に渡って記憶できる記憶部である。
【0047】
〈動作〉
撮像素子202で得られた画像をA/D変換部203でデジタル画像信号に変換し、これに基づきインデックス値を算出するのは具体例1と同様であるため、ここでの説明は省略し、移動量算出部205以降の動作を説明する。
【0048】
図7は、焦点位置決定装置における移動量算出部205の動作を示すフローチャートである。
【0049】
移動量算出部205は評価値算出部204より最新のインデックス値Inを受け取る(ステップS21)。これにより、移動量算出部205は、このインデックス値Inが事前に設定した閾値以上であるかどうかを検査し(ステップS22)、そうであった場合は終了する。尚、この閾値は、何らかの原因で存在しないようなインデックス値が入力されることにより、合焦位置を誤算出してしまうのを防止するための閾値である。
【0050】
次に、現在の焦点位置Pnとインデックス値Inを履歴保存部206に保存する(ステップS23)。そして、ステップS24において過去2回分の焦点位置とインデックス値をそれぞれ履歴保存部206から読み出す。尚、以降の説明においては、前回と前々回の焦点位置をそれぞれPp、Poとし、また、前回と前々回のインデックス値をそれぞれIp、Ioとする。
【0051】
次に、前々回の焦点位置から前回の焦点位置への移動と、前回の焦点位置から現在の焦点位置への移動が同方向であったかどうかを調べ(ステップS25)、合焦の得られる焦点位置が決定できるかどうかを判断する。これは、以下の値Vの符号が正であるかどうかを判定することで行う。
【0052】
V=(Pn−Pp)×(Pp−Po) …(4)
そして、同方向(V>0)であった場合には、次のステップS26において前回のインデックス値Ipと現在のインデックス値Inとを比較する。そして、Ip>Inであった場合には、更にステップS27に移行し、前回のインデックス値Ipと前々回のインデックス値Ioとを比較する。このステップS27においてIp>Ioであった場合、即ちIpがInやIoよりも大きい場合には、次のステップS28において合焦位置の推定を行う。
【0053】
ここで、ステップS28で行われる焦点位置決定方法について説明する。
ステップS26やステップS27での判定の結果、前々回から今回までの焦点位置とインデックス値は次のような状況である。
【0054】
図8は、移動量算出部205の動作説明図であり、インデックス値の状況を示している。
図8(a),(b)は、x軸が焦点位置、y軸がインデックス値を表すものであり、点A、B、Cはそれぞれ前々回、前回、現在の焦点位置とインデックス値を表している。このとき、インデックス値の変化が同図に示すように左右対称であることを考えると、傾きの大きさが互いに等しく符号の異なる2本の直線L1,L2を同図に示すように当てはめることにより、その交点Pのx座標として合焦の得られる焦点位置を決定することができる。直線L1は線分ABとBCのうち、傾きの大きい方を延長したものとし、直線L2は残りの1点を通るように引いたものである。
【0055】
図8(a)のように、直線L1が線分ABに一致する場合は、次式の値Sが正である場合である。
S=(Pp−Pn)(Ip−Io)+(Ip−In)(Pp−Po)…(5)
【0056】
S>0のとき、交点Pのx座標Xpは次式で求められる。
Xp={(Pp−Pn)Io+(Ip−In)Po−InPp+IpPn}/2(Ip−In) …(6)
【0057】
また、図8(b)のように直線L1が線分BCに一致する場合、点Pのx座標Xpは次式で求められる。
Xp={(Pp−Po)In+(Ip−Io)Pn−IoPp+IpPo}/2(Ip−Io) …(7)
この値XpがステップS28で決定される焦点位置である。
【0058】
次に、ステップS29において、現在の焦点位置から決定された焦点位置への移動量を出力する。これはXp−Pnである。
【0059】
尚、ステップS25およびステップS26の判定で合焦の得られる焦点位置が決定できないと判断された場合には、ステップS32において標準移動量を出力する。この標準移動量はインデックス値の観測を行うためのパラメータとして事前に設定しておく。但し、移動方向はIp≦Inの場合、逆方向とする。
【0060】
また、ステップS27における判定の結果、Ip≦Ioである場合、インデックス値が次第に低下している。この場合はステップS31において、履歴保存部206に保存した前回の焦点位置Pp並びにインデックス値Ipと、現在の焦点位置Pn並びにインデックス値Inとを入れ替える。そして、ステップS32において、標準移動量を出力する。但し、移動方向は前回の焦点位置から現在の焦点位置と逆方向とする。これは、焦点位置の移動がインデックス値の増加する方向に向かったように履歴を変更するものである。
【0061】
そして、ステップS30において、移動先の位置を移動量算出部205内で保持する。この値は次回の動作における現在の焦点位置として用いられるものである。
【0062】
〈効果〉
以上のように具体例2によれば、焦点位置を標準移動量だけ動かしながら順次インデックス値を算出していき、この位置が合焦の得られる位置を過ぎれば移動量算出部205において合焦の得られる位置が決定され、その位置へ焦点位置が移動される。従って、基本移動量を大きくして粗い移動を行っても合焦の得られる位置が決定でき、高速かつ精度のよい自動焦点調節が可能となる。
【0063】
また、インデックス値は被写体に依存して様々な値となるため、具体例1を様々な被写体に対して一律に適用するのは困難であるが、具体例2は図8で示したようなインデックス値の変化における左右対称性だけを利用しており、この性質は様々な被写体に共通に存在するため、対象物を限定しない自動焦点調節が実現できる。
【0064】
更に、本具体例では、移動量算出処理で用いるのは常に3点のみのデータであるため、履歴保存部206の記憶容量および評価値算出部204や移動量算出部205の処理量も少なくて済むという効果が得られる。
【0065】
《具体例3》
具体例3は、少なくとも二つの結像系の位置を決定する手段を用意し、これらの手段のうちいずれを採用するかを、インデックス値を閾値と比較することで決定するようにしたものである。
【0066】
〈構成〉
図9は、具体例3の焦点位置決定装置の構成図である。
図の装置は、レンズ301、撮像素子302、A/D変換部303、評価値算出部304、スイッチ部部305、第1の移動量算出部306、第2の移動量算出部307、履歴保存部308、焦点位置移動部309からなる。
【0067】
ここで、レンズ301、撮像素子302、A/D変換部303、評価値算出部304および焦点位置移動部309は、具体例1におけるレンズ101、撮像素子102、A/D変換部103、評価値算出部104および焦点位置移動部107と同様である。
【0068】
第1の移動量算出部306は、具体例1における移動量算出部105と同様の構成である。即ち、合焦位置までの移動量を、撮影された映像のインデックス値の関数として予め設定し、合焦位置までの移動量を求める場合は、先ず、撮像素子302で撮影される映像のインデックス値を求め、次に、このインデックス値から前記の関数に基づいて移動量を決定する機能を有している。
【0069】
また、第2の移動量算出部307は、具体例2における移動量算出部205と同様の機能を有している。即ち、互いに異なる三つの焦点位置において撮影された映像のインデックス値をそれぞれ算出し、この各位置および各インデックス値に基づいて、合焦位置を算出し決定する機能を有している。
【0070】
また、スイッチ部305は、ある閾値を保持し、この閾値と、評価値算出部304で得られたインデックス値とを比較して、第1の移動量算出部306と第2の移動量算出部307のどちらで移動量の算出処理を行うかを選択するためのスイッチ処理を行う機能部である。
【0071】
更に、履歴保存部308は、具体例2と同様に、焦点位置とその時のインデックス値とを、少なくとも過去3回分に渡って記憶できる記憶部である。
【0072】
〈動作〉
先ず、評価値算出部304までの動作は、具体例1、2と同様であるため、それ以降の動作について説明する。
【0073】
スイッチ部305は、二つの移動量算出部306,307のどちらを駆動するかを制御する部分であり、この判断は評価値算出部304で算出される現在のインデックス値Inを、事前に設定した閾値Itと比較することで行われる。
【0074】
即ち、In≦Itであれば第1の移動量算出部306を駆動し、In>Itであれば第2の移動量算出部307を駆動する。但し、スイッチ部305は現在駆動している移動量算出部を記憶し、第2の移動量算出部307を駆動した後は、In≦Itとなっても第1の移動量算出部306を駆動せずにそのまま第2の移動量算出部307を駆動するよう設定されている。ここで、閾値Itは、図3で示した被写体のインデックス値変化における最大値に対して、その1/2〜1/3程度として事前に設定すればよい。
【0075】
第1の移動量算出部306は、具体例1における移動量算出部105と同様に動作する。但し、具体例1における移動量算出部105は内部で移動先の焦点位置を記憶し、また、受け取った現在のインデックス値を評価値記憶部106に記憶させていたが、本具体例における第1の移動量算出部306は、それぞれを履歴保存部308に記憶させる。
【0076】
一方、第2の移動量算出部307は、具体例2における移動量算出部205と同様に動作する。第2の移動量算出部307も現在の焦点位置とインデックス値をそれぞれ履歴保存部308に記憶させる。従って、スイッチ部305によって駆動する移動量算出部が、第1の移動量算出部306から第2の移動量算出部307に切り替えられた後でも、第2の移動量算出部307は第1の移動量算出部306によって決定された過去の焦点位置とインデックス値を参照することができる。
【0077】
〈効果〉
以上のように、具体例3によれば、移動量算出部として、具体例1の移動量算出部105と同様の処理を行う第1の移動量算出部306と、具体例2の移動量算出部205と同様の処理を行う第2の移動量算出部307を設け、これらを、予め設けた閾値と現在のインデックス値とを比較することによって、選択駆動するようにしたので、被写体に合わせた自動焦点調節を行うことができる。
【0078】
即ち、具体例1の移動量算出部では現在の焦点位置が合焦の得られる位置より相当離れていても、一回の移動で高速に合焦の得られる位置を決定することができる。但し、被写体の違いなどにより、インデックス値のモデル化に用いた関数が実際のインデックス値の変化と異なっていれば、決定された位置には若干の誤差が含まれる。このとき、スイッチ部305によって、第2の移動量算出部307を駆動するようにすれば、合焦の得られる位置を被写体に限定されない方法で決定することができる。ここで、スイッチ部305における閾値Itを適宜設定することにより、想定する被写体については高速に、また、想定外の被写体についても精度よく自動焦点調節を行うことができる。
【0079】
尚、上記具体例3では、移動量算出部を、第1の移動量算出部306と第2の移動量算出部307の二つにしたが、更に、他の方法により移動量を算出する移動量算出部を設けるようにしてもよい。例えば、他の移動量算出部としては、音波や赤外線等を用いて被写体までの距離計測を行い、その距離計測結果に基づいて移動量を算出するような構成が考えられる。
【0080】
また、上記各具体例では、評価値として、式(1)で示すようなインデックス値としたが、映像のコントラストの度合いを示すものであれば、どのような値を用いてよい。
【図面の簡単な説明】
【図1】本発明の焦点位置決定方法の具体例1を示すフローチャートである。
【図2】本発明の焦点位置決定方法の具体例1を実現するための焦点位置決定装置の構成図である。
【図3】本発明の焦点位置決定方法および装置における注目画素の設定位置の説明図である。
【図4】本発明の焦点位置決定方法および装置の具体例1におけるインデックス値の変化と関数とを示す説明図である。
【図5】本発明の焦点位置決定方法および装置の具体例1における移動前焦点位置と移動後焦点位置の関係を示す説明図である。
【図6】本発明の焦点位置決定装置の具体例2の構成図である。
【図7】本発明の焦点位置決定装置の具体例2における移動量算出部の動作を示すフローチャートである。
【図8】本発明の焦点位置決定装置の具体例2における移動量算出部の動作説明図である。
【図9】本発明の焦点位置決定装置の具体例3の構成図である。
【符号の説明】
101、201、301 レンズ
102、202、302 撮像素子
104、204、304 評価値算出部
105、205 移動量算出部
107、207、309 焦点位置移動部
305 スイッチ部
306 第1の移動量算出部
307 第2の移動量算出部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a focal position determination method and apparatus for photographing a focused image in a video device such as a video camera or a digital still camera.
[0002]
[Prior art]
Various methods for determining a focus position for capturing a focused image are conventionally known. As the first method, for example, as disclosed in Japanese Patent Laid-Open No. 62-2385109, the focal position is moved from one of the most object side position and the most photographer side position to the other. The difference between the contrast of the image at the previous position and the contrast at the next position is obtained, and the focal position at the time when this difference turns from positive to zero or negative is determined as the position where focusing can be obtained. It was. This contrast is calculated from a high-frequency component obtained from the image signal, and the higher the focus is, the higher the value is.
[0003]
As a second method, for example, as disclosed in Japanese Patent Application Laid-Open No. 6-118297, first, contrast is obtained for the three points of the center of the movable range of the focal position and the positions of both end positions. If the contrast at the position is maximum, this is determined as the position where the focus can be obtained. Otherwise, it is determined which side has the higher contrast, and the contrast detection range is set to the higher contrast. While shifting to the position side, the in-focus state is sequentially determined based on whether or not the position is the maximum contrast position.
[0004]
[Problems to be solved by the invention]
However, in the above conventional method, when the obtained contrast is higher than the contrast obtained at other positions, the focus position is set to a position where the focus can be obtained. In order to obtain the contrast, the interval between the focal positions for obtaining the contrast must be reduced. For this reason, especially when the focus movement start position and the position where the focus can be obtained are separated from each other, it is necessary to repeat the focus movement and the contrast detection a considerable number of times. was there.
[0005]
In view of the above, it has been desired to realize a focus position determination method and apparatus capable of performing automatic focus adjustment in a short time.
[0006]
[Means for Solving the Problems]
The present invention employs the following configuration in order to solve the above-described problems.
<Configuration 1>
In the focal position determination method for determining the position of the imaging system so that the contrast of the image captured by the image sensor is maximized, By preparing at least two methods for determining the position of the imaging system, calculating the evaluation value related to the contrast of the captured image and comparing the evaluation value with the threshold value. A focal position determination method characterized by determining.
[0011]
<Constitution 2 >
Constitution 1 In the described focal position determination method, one of at least two methods is that the amount of movement to the position of the imaging system where the contrast of the image is maximum is preliminarily used as a function of the evaluation value related to the contrast of the captured image. When setting and determining the amount of movement to the position of the imaging system where the contrast of the image is maximum, first determine the evaluation value of the image captured by the image sensor, and then move based on the function from the evaluation value The other is a method for determining the amount, and the other is to calculate evaluation values relating to the contrast of images taken at three different imaging system positions, and based on these positions and evaluation values, A method for determining a focal position, characterized in that it is a method for calculating and determining the position of an imaging system that maximizes contrast.
[0016]
<Constitution 3 >
In a focal position determination apparatus that determines the position of an imaging system so that the contrast of an image captured by an imaging device is maximized, at least two means provided as means for determining the position of the imaging system, and at least two A focal position determination device comprising: a switch unit that determines which one of the means to adopt is calculated by calculating an evaluation value related to a contrast of a captured image and comparing the evaluation value with a threshold value .
[0017]
<Constitution 4 >
Constitution 3 In at least one of the two means for determining the focal position, the one of the means is a function of an evaluation value relating to the contrast of the photographed image, the amount of movement to the position of the imaging system where the contrast of the image is maximum. In order to obtain the amount of movement to the position of the imaging system where the contrast of the image is maximized, first, the evaluation value of the image captured by the image sensor is obtained, and then, based on the function from the evaluation value A first movement amount calculation unit that determines a movement amount, and another means calculates an evaluation value relating to a contrast of a video imaged at three different imaging system positions, and each position and A focal position determination device, which is a second movement amount calculation unit that calculates and determines the position of an imaging system that maximizes the contrast of an image based on each evaluation value.
[0018]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail using specific examples.
<< Specific Example 1 >>
<Constitution>
FIG. 1 is a flowchart showing a specific example 1 of the focus position determination method of the present invention. Prior to this, a focus position determination apparatus for realizing the focus position determination method of the present invention will be described.
[0019]
FIG. 2 is a block diagram showing the focal position determining apparatus according to the first embodiment of the present invention.
The apparatus shown in the figure includes a lens 101, an image sensor 102, an A / D conversion unit 103, an evaluation value calculation unit 104, a movement amount calculation unit 105, an evaluation value storage unit 106, and a focal position movement unit 107.
[0020]
The lens 101 is an optical system that is moved by the focus position moving unit 107 and performs focus adjustment. The image sensor 102 is an element for capturing an image input via the lens 101 and outputting the image as a video signal.
[0021]
The A / D conversion unit 103 is a functional unit that converts an analog video signal output from the image sensor 102 into a digital image signal. The evaluation value calculation unit 104 is a functional unit that calculates an index value as an evaluation value indicating the degree of contrast from the digital image converted by the A / D conversion unit 103. The movement amount calculation unit 105 receives the index value obtained by the evaluation value calculation unit 104, stores the index value in the evaluation value storage unit 106 as the index value of the current image, and stores the index value in the evaluation value storage unit 106. It has a function of determining the moving amount and moving direction of the next focal position based on the previous index value. The evaluation value storage unit 106 is a storage unit for storing an index value as an evaluation value at least once in the past. The focal position moving unit 107 is a control unit that moves the lens 101 based on the output of the moving amount calculating unit 105.
[0022]
<Operation>
First, the operation of the A / D conversion unit 103 will be described.
The image is captured by the image sensor 102, and the output from the image sensor 102 is output as one frame of information as the voltage value changes. The A / D conversion unit 103 converts the change in voltage value into an integer value (density value) from 0 to 255, and expresses one frame of the video as an array of the integer values. Hereinafter, one frame of video represented as an array of integer values is referred to as a digital image. Also, the constituent elements of the digital image are called pixels.
[0023]
Generally, there are two parameters, a brightness adjustment parameter b and a contrast adjustment parameter c, when converting to an integer value. That is, the voltage value v is once converted into a converted value c (v + b) by the parameters b and c, and this value is converted from 0 to 255 depending on where the voltage range is divided into 256 equal parts. . The brightness adjustment parameter b is an offset of the voltage value v, and the contrast adjustment parameter c is an enlargement ratio of the voltage value v.
[0024]
In the following description, it is assumed that the digital image obtained by the A / D conversion unit 103 is composed of W × H pixels (horizontal W pixels, vertical H pixels), and this pixel position is the origin at the upper left pixel of the image. Expressed in the x, y coordinate system. The density value of the pixel at the position (x, y) is represented as I (x, y).
[0025]
Next, processing of the evaluation value calculation unit 104, the movement amount calculation unit 105, and the evaluation value storage unit 106 will be described with reference to FIG. First, the process of the evaluation value calculation unit 104 will be described.
[0026]
The evaluation value calculation unit 104 calculates an index value that is an evaluation value (step S1 in FIG. 1). This index value includes a pixel of interest (x, y) set at an interval of 2 s pixels in a processing range of horizontal w pixels and vertical h pixels set at the center of the image, and reference pixels adjacent to the upper, lower, left, and right sides at an s pixel interval. Based on the density difference, the following formula is used.
[0027]
Index = Σ {(I (x−s, y) −I (x, y)) 2 + (I (x + s, y) -I (x, y)) 2 + (I (x, ys) -I (x, y)) 2 + (I (x, y + s) -I (x, y)) 2 } (1)
However, the summation is performed for all pixels of interest.
[0028]
FIG. 3 is an explanatory diagram of the setting position of the target pixel.
In the figure, the processing range is a rectangular area of horizontal w pixels and vertical h pixels with the position (x, y) as the position of the upper left pixel. The target pixel is indicated by a black circle, and the reference pixel is indicated by a white circle. The pixel of interest is set at intervals of 2 s pixels in the horizontal direction, and pixels whose setting positions are shifted from each other by s pixels are alternately set in the vertical direction by s pixels.
[0029]
Note that the processing range and the position of the pixel of interest are set in advance depending on the object to be imaged, and the processing range may be, for example, not the entire screen but a limited area at the center of the image. Further, an interval s = 2 between adjacent pixels (every other pixel) may be set.
[0030]
Next, as a process of the movement amount calculation unit 105, a function set in advance will be described.
The movement amount calculation unit 105 determines the movement amount and movement direction of the focal position using the index value. In order to determine the amount of movement, the index value Index (P) of the image obtained at the focal position P is expressed as a function as a function of the amount of deviation ΔP from the focal position P and the position where the focus is obtained as shown in the following equation. Turn into.
[0031]
Index (P) = f (ΔP) (2)
Then, using the inverse function F of this function f, the movement amount is determined from the current index value In.
Movement amount = F (In) (3)
[0032]
Further, the moving direction is assumed to be toward the higher index value. Here, the calculated index value is compared with the index value stored in the evaluation value storage unit 106 calculated last time. If the current value is larger than the previous value, the current direction is the same as the previous movement. If the item is small, the direction is reversed.
[0033]
FIG. 4 is an explanatory diagram showing a change in index value and a function.
This figure shows the relationship between the focal position and the index value for a certain subject. The index value changes so that the focus position reaches a peak at the most focused position. The state of the change can be approximated using a hyperbola or the like. In the figure, a change in index value modeled by y = 200,000 / ΔP is shown. ΔP is the amount of movement up to the in-focus focal length, and ΔP = | 50−P | in FIG.
[0034]
According to such a modeling equation, the movement amount can be determined as ΔP = 200,000 / y. In this way, Equation (2) obtains changes in the focal position and index value relating to the subject in advance and sets them in advance to approximate this change.
[0035]
Next, the movement amount calculation process in the movement amount calculation unit 105 will be described.
The movement amount calculation unit 105 receives the current index value In output from the evaluation value calculation unit 104 (step S2). Next, in step S3, the end determination is performed by inspecting whether or not this In is greater than or equal to a preset threshold value Ie.
[0036]
If the index value In is less than the threshold value Ie as a result of the inspection in step S3, the index value In received from the evaluation value calculation unit 104 is stored in the evaluation value storage unit 106 (step S4). The focal position movement amount ΔP is calculated according to the equation (3) (step S5).
[0037]
Next, the previous index value Ip calculated last time and stored in the evaluation value storage unit 106 is read (step S6). Then, the latest index value In is compared with the previous index value Ip to determine the moving direction. That is, when In ≧ Ip, the moving direction of the focal position is the same as the previous direction, and when it is not, the reverse direction is set. The direction of movement from the camera side to the subject side is a plus direction, and the direction from the subject side to the camera side is a minus direction, and a sign representing this direction is added to the movement amount ΔP. This signed movement amount is stored in the movement amount calculation unit 105 and is referred to in the next movement amount determination. In step S8, a signed movement amount ΔP is output.
[0038]
<effect>
As described above, in this specific example, an index value related to the contrast of the captured video is calculated in advance, and this index is calculated. value And the amount of movement to the in-focus position are set, and the amount of movement to the in-focus position is determined based on this function, so that the imaging system can be focused with a small number of focal point movements. It can be moved to a position, so that a focused image can be taken at high speed.
[0039]
5 is shown in FIG. Close In the case of using a similar expression, the focal position when moving by the amount of movement obtained for each focal position before movement is shown.
[0040]
It can be seen that the focal position of the movement destination is generally within the range of the focal position ± 10 where the in-focus is obtained, and the focal position can be moved to a position that is substantially in focus by one movement. Here, the more accurately the function used for modeling reproduces the actual change in the index value, the more the focal position calculated by the inverse function becomes the position where a better focus can be obtained.
[0041]
In this specific example, the previous index value needs to be calculated in order to determine the moving direction, but the previously calculated index value cannot be used for the first movement. In this case, the initial focal position may be the most focal position from the camera, and the first moving direction may be the object side direction.
[0042]
<< Specific Example 2 >>
In the second specific example, a change in the index value is observed while moving the focal position, and the position where the in-focus is obtained is determined based on the result.
[0043]
<Constitution>
FIG. 6 is a configuration diagram of the focal position determining apparatus in the second specific example.
The apparatus shown in the figure includes a lens 201, an image sensor 202, an A / D conversion unit 203, an evaluation value calculation unit 204, a movement amount calculation unit 205, a history storage unit 206, and a focal position movement unit 207.
[0044]
Here, the lens 201, the image sensor 202, the A / D conversion unit 203, the evaluation value calculation unit 204, and the focus position moving unit 207 are the lens 101, the image sensor 102, the A / D conversion unit 103, and the evaluation value in the specific example 1. This is the same as the calculation unit 104 and the focus position moving unit 107.
[0045]
The movement amount calculation unit 205 has a function of calculating the in-focus position based on the index values of the images captured at three different imaging system positions calculated by the evaluation value calculation unit 204. That is, the movement amount calculation unit 205 calculates the in-focus position by using the index value of the video imaged at the center position among the three different focal positions, and the index value of the video imaged at the remaining two positions. When the above condition is satisfied, the change amount per unit section width of the index value from the central position to the remaining two positions is obtained, and the two positions that become the section where the change amount is large If one of the positions is set as one position, the remaining position is set as the other position, and the relationship of the index value with respect to the focal position is considered as a point in the XY coordinate system, the index value of one position is indicated. The straight line connecting the point indicating the index value of the center position from the point is extended to one straight line, and the other position is tilted opposite to this straight line. The straight line passing through the point indicating the index value as the other straight, and has a function of calculating a focal position of one line and the other lines and intersect point as focus position.
[0046]
The history storage unit 206 is a storage unit that can store the focus position and the index value at that time for at least the past three times.
[0047]
<Operation>
Since the image obtained by the image sensor 202 is converted into a digital image signal by the A / D converter 203 and the index value is calculated based on this, the description is omitted here. The operation after the movement amount calculation unit 205 will be described.
[0048]
FIG. 7 is a flowchart showing the operation of the movement amount calculation unit 205 in the focal position determination device.
[0049]
The movement amount calculation unit 205 receives the latest index value In from the evaluation value calculation unit 204 (step S21). Thereby, the movement amount calculation unit 205 checks whether or not the index value In is greater than or equal to a preset threshold value (step S22), and if so, the process ends. This threshold value is a threshold value for preventing an erroneous calculation of the in-focus position by inputting an index value that does not exist for some reason.
[0050]
Next, the current focus position Pn and the index value In are stored in the history storage unit 206 (step S23). In step S24, the focus positions and index values for the past two times are read from the history storage unit 206, respectively. In the following description, the previous and previous focal positions are Pp and Po, respectively, and the previous and previous index values are Ip and Io, respectively.
[0051]
Next, it is checked whether the movement from the previous focal position to the previous focal position and the movement from the previous focal position to the current focal position are in the same direction (step S25). Determine if it can be determined. This is done by determining whether the sign of the following value V is positive.
[0052]
V = (Pn−Pp) × (Pp−Po) (4)
If the direction is the same (V> 0), the previous index value Ip and the current index value In are compared in the next step S26. If Ip> In, the process further proceeds to step S27, where the previous index value Ip and the previous index value Io are compared. If Ip> Io in this step S27, that is, if Ip is larger than In or Io, the in-focus position is estimated in the next step S28.
[0053]
Here, the focal position determination method performed in step S28 will be described.
As a result of the determination in step S26 or step S27, the focal position and the index value from the previous time to the current time are as follows.
[0054]
FIG. 8 is an explanatory diagram of the operation of the movement amount calculation unit 205 and shows the status of index values.
In FIGS. 8A and 8B, the x-axis represents the focal position and the y-axis represents the index value, and the points A, B, and C represent the previous and current focal positions and index values, respectively. Yes. At this time, considering that the change in the index value is bilaterally symmetrical as shown in the figure, the two straight lines L1 and L2 having the same inclination and different signs are applied as shown in the figure. The focal position where the in-focus is obtained can be determined as the x coordinate of the intersection P. The straight line L1 is obtained by extending the larger one of the line segments AB and BC, and the straight line L2 is drawn so as to pass through the remaining one point.
[0055]
As shown in FIG. 8A, when the straight line L1 coincides with the line segment AB, the value S of the following equation is positive.
S = (Pp−Pn) (Ip−Io) + (Ip−In) (Pp−Po) (5)
[0056]
When S> 0, the x-coordinate Xp of the intersection P is obtained by the following equation.
Xp = {(Pp-Pn) Io + (Ip-In) Po-InPp + IpPn} / 2 (Ip-In) (6)
[0057]
When the straight line L1 coincides with the line segment BC as shown in FIG. 8B, the x coordinate Xp of the point P is obtained by the following equation.
Xp = {(Pp−Po) In + (Ip−Io) Pn−IoPp + IpPo} / 2 (Ip−Io) (7)
This value Xp is the focal position determined in step S28.
[0058]
Next, in step S29, the amount of movement from the current focal position to the determined focal position is output. This is Xp-Pn.
[0059]
If it is determined in step S25 and step S26 that the focal position where the in-focus is obtained cannot be determined, the standard movement amount is output in step S32. This standard movement amount is set in advance as a parameter for observing the index value. However, the moving direction is the reverse direction when Ip ≦ In.
[0060]
Further, as a result of the determination in step S27, when Ip ≦ Io, the index value gradually decreases. In this case, in step S31, the previous focus position Pp and index value Ip stored in the history storage unit 206 are replaced with the current focus position Pn and index value In. In step S32, the standard movement amount is output. However, the moving direction is the direction opposite to the current focal position from the previous focal position. This is to change the history so that the movement of the focal position is in the direction in which the index value increases.
[0061]
In step S <b> 30, the movement destination position is held in the movement amount calculation unit 205. This value is used as the current focal position in the next operation.
[0062]
<effect>
As described above, according to the second specific example, the index value is sequentially calculated while moving the focal position by the standard movement amount. If this position passes the position where the in-focus is obtained, the movement amount calculation unit 205 performs the focusing. The resulting position is determined and the focal position is moved to that position. Therefore, even if the basic movement amount is increased and rough movement is performed, the position where the in-focus can be obtained can be determined, and high-speed and accurate automatic focus adjustment can be performed.
[0063]
In addition, since the index value varies depending on the subject, it is difficult to apply the specific example 1 uniformly to various subjects, but the specific example 2 is an index as shown in FIG. Since only the left-right symmetry in the change in value is used, and this property is common to various subjects, automatic focus adjustment that does not limit the object can be realized.
[0064]
Further, in this specific example, since only three points of data are always used in the movement amount calculation process, the storage capacity of the history storage unit 206 and the processing amount of the evaluation value calculation unit 204 and the movement amount calculation unit 205 are also small. The effect of being finished is obtained.
[0065]
<< Specific Example 3 >>
In the third specific example, means for determining the positions of at least two imaging systems are prepared, and which one of these means is adopted is determined by comparing the index value with a threshold value. .
[0066]
<Constitution>
FIG. 9 is a configuration diagram of the focal position determining apparatus of the third specific example.
The illustrated apparatus includes a lens 301, an image sensor 302, an A / D conversion unit 303, an evaluation value calculation unit 304, a switch unit 305, a first movement amount calculation unit 306, a second movement amount calculation unit 307, and history storage. Part 308 and a focal position moving part 309.
[0067]
Here, the lens 301, the image sensor 302, the A / D converter 303, the evaluation value calculator 304, and the focus position moving unit 309 are the lens 101, the image sensor 102, the A / D converter 103, and the evaluation value in the specific example 1. This is the same as the calculation unit 104 and the focus position moving unit 107.
[0068]
The first movement amount calculation unit 306 has the same configuration as the movement amount calculation unit 105 in the first specific example. That is, when the amount of movement to the in-focus position is set in advance as a function of the index value of the captured image and the amount of movement to the in-focus position is obtained, first, the index value of the image captured by the image sensor 302 is determined. Next, the movement amount is determined from the index value based on the function.
[0069]
Further, the second movement amount calculation unit 307 has the same function as the movement amount calculation unit 205 in the specific example 2. That is, it has a function of calculating index values of videos taken at three different focal positions, and calculating and determining a focus position based on each position and each index value.
[0070]
Further, the switch unit 305 holds a certain threshold value, compares the threshold value with the index value obtained by the evaluation value calculation unit 304, and compares the first movement amount calculation unit 306 and the second movement amount calculation unit. 307 is a functional unit that performs switch processing for selecting which of 307 to perform movement amount calculation processing.
[0071]
Further, the history storage unit 308 is a storage unit that can store the focal position and the index value at that time for at least the past three times, as in the second specific example.
[0072]
<Operation>
First, since the operation up to the evaluation value calculation unit 304 is the same as that in the first and second specific examples, the subsequent operation will be described.
[0073]
The switch unit 305 is a part that controls which of the two movement amount calculation units 306 and 307 is driven. This determination is performed by setting the current index value In calculated by the evaluation value calculation unit 304 in advance. This is done by comparing with the threshold It.
[0074]
That is, if In ≦ It, the first movement amount calculation unit 306 is driven, and if In> It, the second movement amount calculation unit 307 is driven. However, the switch unit 305 stores the movement amount calculation unit that is currently driven, and after driving the second movement amount calculation unit 307, drives the first movement amount calculation unit 306 even if In ≦ It. The second movement amount calculation unit 307 is set to be driven as it is. Here, the threshold It may be set in advance as about 1/2 to 1/3 of the maximum value in the change in the index value of the subject shown in FIG.
[0075]
The first movement amount calculation unit 306 operates in the same manner as the movement amount calculation unit 105 in the first specific example. However, the movement amount calculation unit 105 in the specific example 1 internally stores the focal position of the movement destination and stores the received current index value in the evaluation value storage unit 106. Are stored in the history storage unit 308.
[0076]
On the other hand, the second movement amount calculation unit 307 operates in the same manner as the movement amount calculation unit 205 in the second specific example. The second movement amount calculation unit 307 also causes the history storage unit 308 to store the current focus position and index value. Therefore, even after the movement amount calculation unit driven by the switch unit 305 is switched from the first movement amount calculation unit 306 to the second movement amount calculation unit 307, the second movement amount calculation unit 307 does not change the first movement amount calculation unit 307. The past focal position and index value determined by the movement amount calculation unit 306 can be referred to.
[0077]
<effect>
As described above, according to specific example 3, as the movement amount calculation unit, first movement amount calculation unit 306 that performs the same processing as movement amount calculation unit 105 of specific example 1, and movement amount calculation of specific example 2 The second movement amount calculation unit 307 that performs the same processing as that of the unit 205 is provided, and these are selectively driven by comparing a preset threshold value with the current index value. Automatic focus adjustment can be performed.
[0078]
That is, the movement amount calculation unit of the first specific example can determine the position at which focusing can be achieved at a high speed by one movement even if the current focal position is considerably away from the position at which focusing is achieved. However, if the function used for modeling the index value is different from the actual change in the index value due to the difference in the subject or the like, the determined position includes a slight error. At this time, if the second movement amount calculation unit 307 is driven by the switch unit 305, the position where the focus is obtained can be determined by a method that is not limited to the subject. Here, by appropriately setting the threshold It in the switch unit 305, it is possible to perform automatic focus adjustment at high speed for an assumed subject and with high accuracy for an unexpected subject.
[0079]
In the specific example 3, the movement amount calculation unit is the first movement amount calculation unit 306 and the second movement amount calculation unit 307. However, the movement amount is calculated by another method. An amount calculation unit may be provided. For example, another moving amount calculation unit may be configured to measure the distance to the subject using sound waves, infrared rays, or the like and calculate the moving amount based on the distance measurement result.
[0080]
Further, in each of the above specific examples, the evaluation value is an index value as shown in Expression (1), but any value may be used as long as it indicates the degree of contrast of the video.
[Brief description of the drawings]
FIG. 1 is a flowchart showing a specific example 1 of a focal position determination method according to the present invention.
FIG. 2 is a configuration diagram of a focal position determining device for realizing a specific example 1 of the focal position determining method of the present invention.
FIG. 3 is an explanatory diagram of a setting position of a target pixel in the focal position determination method and apparatus of the present invention.
FIG. 4 is an explanatory diagram showing a change in index value and a function in Example 1 of the focal position determination method and apparatus of the present invention.
FIG. 5 is an explanatory diagram showing the relationship between the pre-movement focal position and the post-movement focal position in the first specific example of the focal position determination method and apparatus of the present invention.
FIG. 6 is a configuration diagram of a specific example 2 of the focal position determining apparatus according to the invention.
FIG. 7 is a flowchart showing an operation of a movement amount calculation unit in the specific example 2 of the focal position determination device of the present invention.
FIG. 8 is an operation explanatory diagram of a movement amount calculation unit in a specific example 2 of the focal position determination device according to the invention.
FIG. 9 is a configuration diagram of a specific example 3 of the focal position determining apparatus according to the invention.
[Explanation of symbols]
101, 201, 301 lens
102, 202, 302 Image sensor
104, 204, 304 Evaluation value calculation unit
105, 205 Movement amount calculation unit
107, 207, 309 Focus position moving unit
305 Switch part
306 First movement amount calculation unit
307 Second movement amount calculation unit

Claims (4)

撮像素子により撮影される映像のコントラストが最大となるように結像系の位置を決定する焦点位置決定方法において、
前記結像系の位置を決定する方法として少なくとも二つの方法を用意し、
前記方法のうちいずれを採用するかを、撮影された映像のコントラストに関する評価値を算出し、当該評価値を閾値と比較することで決定することを特徴とする焦点位置決定方法。
In the focal position determination method for determining the position of the imaging system so that the contrast of the image captured by the image sensor is maximized,
Preparing at least two methods for determining the position of the imaging system;
A method for determining a focal position, wherein which of the above methods is adopted is determined by calculating an evaluation value related to a contrast of a captured image and comparing the evaluation value with a threshold value.
請求項1に記載の焦点位置決定方法において、
少なくとも二つの方法のうち、
一つは、映像のコントラストが最大となる結像系の位置までの移動量を、撮影された映像のコントラストに関する評価値の関数として予め設定し、前記映像のコントラストが最大となる結像系の位置までの移動量を求める場合は、先ず、撮像素子で撮影される映像の評価値を求め、次に、当該評価値から前記関数に基づいて当該移動量を決定する方法であり、
もう一つは、互いに異なる三つの結像系の位置において撮影された映像のコントラストに関する評価値をそれぞれ算出し、この各位置および各評価値に基づいて、映像のコントラストが最大となる結像系の位置を算出し決定する方法であることを特徴とする焦点位置決定方法。
The focal position determination method according to claim 1,
Of at least two methods
One is that the amount of movement to the position of the imaging system where the contrast of the image is maximized is set in advance as a function of the evaluation value related to the contrast of the captured image, and the imaging system where the contrast of the image is maximized is set. In the case of obtaining the movement amount to the position, first, the evaluation value of the video imaged by the image sensor is obtained, and then the movement amount is determined from the evaluation value based on the function,
The other is to calculate evaluation values related to the contrast of images taken at three different imaging system positions, and based on each position and each evaluation value, an imaging system that maximizes the contrast of the image. A method for determining a focal position, wherein the position is calculated and determined.
撮像素子により撮影される映像のコントラストが最大となるように結像系の位置を決定する焦点位置決定装置において、
前記結像系の位置を決定する手段として設けられた少なくとも二つの手段と、
前記少なくとも二つの手段のうちいずれを採用するかを、撮影された映像のコントラストに関する評価値を算出し、当該評価値を閾値と比較することで決定するスイッチ部とを備えたことを特徴とする焦点位置決定装置。
In the focal position determination device that determines the position of the imaging system so that the contrast of the image captured by the imaging element is maximized,
At least two means provided as means for determining the position of the imaging system;
A switch unit that determines which one of the at least two means is to be used is calculated by calculating an evaluation value related to a contrast of a captured image and comparing the evaluation value with a threshold value. Focus position determination device.
請求項3に記載の焦点位置決定装置において、
少なくとも二つの手段のうち、
一つの手段は、映像のコントラストが最大となる結像系の位置までの移動量を、撮影された映像のコントラストに関する評価値の関数として予め設定し、前記映像のコントラストが最大となる結像系の位置までの移動量を求める場合は、先ず、撮像素子で撮影される映像の評価値を求め、次に、当該評価値から前記関数に基づいて当該移動量を決定する第1の移動量算出部であり、
もう一つの手段は、互いに異なる三つの結像系の位置において撮影された映像のコントラストに関する評価値をそれぞれ算出し、この各位置および各評価値に基づいて、映像のコントラストが最大となる結像系の位置を算出し決定する第2の移動量算出部であることを特徴とする焦点位置決定装置。
In the focal position determination apparatus according to claim 3,
Of at least two means
One means presets the amount of movement to the position of the imaging system where the contrast of the image is maximum as a function of the evaluation value relating to the contrast of the captured image, and the imaging system where the contrast of the image is maximum In order to obtain the movement amount to the position, first, an evaluation value of a video imaged by the image sensor is obtained, and then a first movement amount calculation for determining the movement amount based on the function from the evaluation value. Department,
The other means calculates the evaluation value related to the contrast of the video imaged at the positions of three different imaging systems, and based on each position and each evaluation value, the image forming the image with the maximum contrast. A focal position determination device, being a second movement amount calculation unit that calculates and determines the position of a system.
JP27503998A 1998-09-29 1998-09-29 Focus position determination method and apparatus Expired - Fee Related JP4228430B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27503998A JP4228430B2 (en) 1998-09-29 1998-09-29 Focus position determination method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27503998A JP4228430B2 (en) 1998-09-29 1998-09-29 Focus position determination method and apparatus

Publications (2)

Publication Number Publication Date
JP2000105332A JP2000105332A (en) 2000-04-11
JP4228430B2 true JP4228430B2 (en) 2009-02-25

Family

ID=17550022

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27503998A Expired - Fee Related JP4228430B2 (en) 1998-09-29 1998-09-29 Focus position determination method and apparatus

Country Status (1)

Country Link
JP (1) JP4228430B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160123820A (en) * 2015-04-17 2016-10-26 한화테크윈 주식회사 Auto focusing method

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3679693B2 (en) 2000-07-31 2005-08-03 三洋電機株式会社 Auto focus camera
JP2006254191A (en) * 2005-03-11 2006-09-21 Sanyo Electric Co Ltd Electronic camera
US7769219B2 (en) * 2006-12-11 2010-08-03 Cytyc Corporation Method for assessing image focus quality
JP4818956B2 (en) * 2007-02-27 2011-11-16 京セラ株式会社 Imaging apparatus and method thereof
JP4818957B2 (en) * 2007-02-27 2011-11-16 京セラ株式会社 Imaging apparatus and method thereof
JP5174589B2 (en) * 2008-09-01 2013-04-03 Juki株式会社 Automatic focus adjustment method for electronic component mounting apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160123820A (en) * 2015-04-17 2016-10-26 한화테크윈 주식회사 Auto focusing method
KR102422125B1 (en) 2015-04-17 2022-07-18 한화테크윈 주식회사 Auto focusing method

Also Published As

Publication number Publication date
JP2000105332A (en) 2000-04-11

Similar Documents

Publication Publication Date Title
US20070189750A1 (en) Method of and apparatus for simultaneously capturing and generating multiple blurred images
JP3539788B2 (en) Image matching method
US5602584A (en) Apparatus for producing a panoramic image using a plurality of optical systems
JP3733392B2 (en) Image composition change detection method
JP4957134B2 (en) Distance measuring device
US20050012833A1 (en) Image capturing apparatus
CN101485193A (en) Image generating device and image generating method
JPWO2011158498A1 (en) Imaging apparatus and imaging method
JPH0634366A (en) Focusing sensing method, and method and device for contactless measurement of displacement using it
JP3530906B2 (en) Imaging position detection program and camera
JP4228430B2 (en) Focus position determination method and apparatus
JP3562250B2 (en) Leading vehicle detection device
JPH10142490A (en) Environment recognition device and camera
JP5900049B2 (en) Depth of field expansion system and depth of field expansion method
JP2018074362A (en) Image processing apparatus, image processing method, and program
JP4085720B2 (en) Digital camera
JP2002311327A (en) Multipoint auto-focusing device
JP2012142729A (en) Camera
JP3548213B2 (en) Multipoint ranging device and camera
JPH07209576A (en) Optical detecting device and focus control unit
JP4558781B2 (en) Camera focus detection device
JP2005134617A (en) Focus detector
JP2008122981A5 (en)
JP3065699B2 (en) Focus position detection device
JP6827778B2 (en) Image processing equipment, image processing methods and programs

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050909

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051104

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080808

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080819

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081014

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

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

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20111212

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20111212

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

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

Free format text: PAYMENT UNTIL: 20111212

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20111212

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20121212

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20131212

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees