JP3847390B2 - Ranging device - Google Patents
Ranging device Download PDFInfo
- Publication number
- JP3847390B2 JP3847390B2 JP31341296A JP31341296A JP3847390B2 JP 3847390 B2 JP3847390 B2 JP 3847390B2 JP 31341296 A JP31341296 A JP 31341296A JP 31341296 A JP31341296 A JP 31341296A JP 3847390 B2 JP3847390 B2 JP 3847390B2
- Authority
- JP
- Japan
- Prior art keywords
- subject image
- sensor
- output
- light receiving
- calculation
- 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
Links
Images
Landscapes
- Automatic Focus Adjustment (AREA)
- Length Measuring Devices By Optical Means (AREA)
- Measurement Of Optical Distance (AREA)
- Focusing (AREA)
Description
【0001】
【発明の属する技術分野】
本発明はカメラやビデオ等に使われる測距装置に係わり、より正確な距離測定とピント合せが可能な装置を提供するための技術に関する。
【0002】
【従来の技術】
一般にカメラ等に使われる測距装置では光を利用する方式が多く、例えば測距装置側から信号光を投射する方式の「アクティブタイプ」と、対象物の輝度分布像を利用する方式の「パッシブタイプ」に大別される。これらの方式は共に三角測距を基本原理としており、アクティブタイプでは投光と受光の位置間隔を基本の長さ(即ち基線長)とし、パッシブタイプでは二つの受光位置を基準としその視差による対象物の像の相対位置差にしたがって対象物までの距離を求めている。この対象物の像を観察するためには受光位置ごとの光量を測定する必要があることから、複数の光センサを並べて成るラインセンサを利用している。
【0003】
まず、このパッシブタイプの測距装置の測距方法について図1を用い説明する。1a,1bは二つの受光レンズであり、基線長Bだけ離して配置してある。被写体6からこれらのレンズを介して入射した光は、それぞれラインセンサ2a,2b上に曲線パターン3a,3bに示したような光パターンを形成するが、このパターンは被写体6上の輝度分布と両方の受光レンズの相対位置関係に依存し、得られる両パターン3a,3bの相対位置差xは、上記Bとレンズ、センサ間距離fおよび被写体距離Lに依存する。つまり次の関係が成立する。
x = B×f/L …(式a)
このようなラインセンサの出力から演算によって相対位置差を算出する方法(以下、相関演算と称す)については、特公平7−54371号公報などが知られている。
【0004】
また、この光パターンのどの部分を利用して測距するのかも重要な技術であり、例えば図5に示すように6aの人物を測距しようとしても、もし、センサアレイ2aのRn2の部分に入射した光を加味してしまうと、遠方に在る背景の山6bの輝度が混入し(これを遠近混在と称す)、正しい測距ができなくなる。つまり、図中R1 〜Rn1までのセンサに入射する光だけは利用しても、Rn2のセンサ信号は利用しないようにする技術が、正しく測距するには必要となる。このような技術の提案としては特公平5−88445号公報などが知られている。
【0005】
【発明が解決しようとする課題】
しかしながら、特公平7−54371号公報に開示の技術は上記「遠近混在」の問題には触れておらず、他方、特公平5−88445号公報に開示の技術では、相関演算後はこの結果が不適当の場合にセンサのエリアを切り替えるというものであり、その分余計な時間を要しかつデータを何度も加工し直す関係上、マイクロコンピュータ(以下、マイコンと略称す)等を利用して判定や演算をするのにもメモリ容量やプログラムの容量が増加する等の不具合があった。つまり、これらの従来技術を単に組み合わせたとしても、高速かつ高精度の測距装置は提供することは困難である。
【0006】
本発明は以上の点に鑑みてなされたものであり、パッシブタイプの測距装置の測距範囲を適切に切り替え、不必要な測定領域は測距することなく、なおかつ高速演算を可能とする測距装置を提供することを目的とするものであり、例えばカメラやビデオのピント合せ用に応用する際には、正確に対象物のピント合せができるようにするための発明である。
【0007】
【課題を解決するための手段】
そこで本発明は、上述した課題を解決し目的を達成するために次のような手段を講じている。すなわち、
[1] 視差を有する一対の受光素子列によりそれぞれ被写体像を受光して、一対の被写体像信号列を出力する受光手段と、この受光手段の出力を受け、前記一対の被写体像信号列の第1の部分の相関値を出力する相関手段と、この一対の受光素子列のいずれか一方の受光素子列の全部の被写体像信号列および、他方の受光素子列の被写体像信号列のうち、第1の部分よりも狭い第2の部分の部分的データのみを選択的に入力するデータ入力手段と、当該入力されたデータに基づいて所定の補間演算を行う補間手段とを備える測距装置を提供する。
[2] 視差を有する一対の受光素子列によりそれぞれ被写体像を受光して、一対の被写体像信号列を出力する受光手段と、この一対の被写体像信号列を第1の画素数を有する複数のブロックに分割する手段と、前記受光手段の出力を受け、前記一対の被写体像信号列の相関値を出力する相関手段と、当該相関値が所定の条件を満たす場合、前記ブロックを第1の画素数よりも小さい第2の画素数に設定する手段と、前記一対の受光素子列のいずれか一方の受光素子列の全部の被写体像信号列および、他方の受光素子列の被写体像信号列のうち、前記第2の画素数のデータのみを選択的に入力するデータ入力手段と、当該入力されたデータに基づいて所定の補間演算を行う補間手段とを備える測距装置を提供する。
[3] 視差を有する異なる視野から観測した被写体像の輝度分布に従った二つの光パターン信号を出力する二つのラインセンサと、前記二つの光パターン信号を比較して前記被写体像の視差に基づく相対位置差を前記ラインセンサの配列ピッチの単位で算出するピッチ差算出手段と、前記ピッチ差算出手段の出力結果に基づいて、前記ピッチ差算出手段における比較に使用した前記ラインセンサの出力する光パターン信号のうちの一部を選択し、この選択した光パターン信号に基づき前記被写体像の視差に基づく相対位置差を前記ラインセンサの配列ピッチよりも細かい精度にて算出する演算制御手段とを備え、前記ピッチ差算出手段はハードロジック回路で構成され、前記演算制御手段はマイクロコンピュータ及びソフトウェアで構成されていることを特徴とする測距装置を提供する。
【0008】
【発明の実施の形態】
以下に関連する図面を参照しながら本発明に係わる複数の実施形態について説明する。
(第1実施形態)
本発明に係わるパッシブタイプの測距装置における光パターンの相対位置差算出の方法について、まず図1(a)〜(b)に基づき説明する。
図1(a)において、受光レンズ1a,1bの位置の差B(基線長)により、センサアレイ2a,2b上に入射する光分布の相対位置差xは、被写体距離Lに依存して変化する。各受光レンズの焦点距離をfとすると、被写体距離Lは次式で求められる。
L = B×f/x …(式b)
センサアレイの各センサは光の入射量にしたがった電流信号を出力するので、これらをA/D変換器4によりディジタル信号に変換すれば、像ずれ量を算出する演算部5による相関演算によって上記相対位置差xが検出できる。この結果をワンチップマイコン等からなる演算制御手段( CPU) 10に入力して上記式bに基づき演算することで被写体距離Lが求められる。以上がパッシブタイプの三角測距方式の基本原理と一般的な装置構成である。
【0009】
上記のずれ量演算機能は、一般的に後述のように二つのプロセスから成るが、これらはCUP10内に制御プログラムとして内蔵していてもよい。このような技術を用いてカメラのピント合わせを行う場合、このCPU10がカメラの動作を制御し、撮影用ピント合わせ用レンズ等をモータなどのアクチュエータを介して適宜制御すれば自動焦点( AF) 機能付きカメラが提供できる。
【0010】
像のずれ量の演算のためには、両方のラインセンサにおけるセンサピッチの単位でどれだけ像がずれているかを調べる演算ステップ(即ち相関演算)を必要とする。そして、これより細かい分解能でさらに正確にずれ量を算出する演算ステップ(以下、補間演算と称す)を必要とする。
センサアレイ2a上に図1(a)が示す波形3aのようなパターンで光が入射した場合は、各センサR1 〜R6 の出力の大きさは、図2(b)に棒グラフで示したような分布3aとなる。なおここで" R" は右側センサを示し," L" は左側センサを示し、これらに付された添え字の1〜6が例えば受光レンズ光軸基準でのセンサの位置の絶対位置を示しているとすると、左側センサの出力L1 〜L6 から出力R1 〜R6 と同じ信号が出る場合には、上記相対位置差xは0となるので、求める被写体距離Lは「無限遠」になる。
また、被写体が「有限距離」に存在すると、上記xとセンサピッチSPから決るセンサの数Sだけシフトしたところの左側センサLには、図2(c)に示すような上記出力R1 〜R6 に類似する値の出力信号が得られる。
【0011】
図2(a)のグラフにおける縦軸の値FF(i) は次式に従って求められる。
FF(i) = Σ|R(i) −L(i) | …(式c)
すなわち、あるRのセンサの出力から対応するLのセンサの出力を引き算し、その絶対値を各センサごとに加算した結果FFを用いればよい。すなわち、まずRi からLi を引き算してその絶対値をとり、ある幅でiを変化させこれらを加算する。
【0012】
次に、Ri またはLi の一方のセンサを1単位だけずらして先に差をとった隣接するセンサと同様に差をとると、次のような式でFF(i+1) は表現できる。
FF(i+1) = Σ|R(i+1) −L(i) | …(式d)
このように順次、ずらし量(以下、SIFT量と称す)を変更しながらFFを得られるが、RとLとの差の和であるFFが最小値(Fmin )となるSIFT量の所が最もよく対応がとれている位置と考えられるため、この場合のSIFT量が上記Sとして求められる。以上が相関演算に関するプロセスの概略手順である。
【0013】
また、上記Sを加味して両センサアレイの出力分布を図示すると、図2(b)のように、L側のSだけずれた各センサから対応する添え字の付いたR側各センサと同様の出力が得られる。
【0014】
続いて、図2(b)〜(d)を用いて「補間演算」プロセスについて詳しく説明すると、実際の二つのセンサアレイ上の像のズレ量はぴったりとセンサのピッチでずれるわけではなく、また正確な測距にはピッチより細かい精度にて像ズレ量を検出しなければならない。そこで補間演算を行う。図2(b),(c)中のRとLは各々図1中のセンサアレイ2a,2bを構成する一部のセンサ出力を表わしている。
また、図2(d)には、すでに「相関演算」が終了した上記Sだけシフトさせた後で比較しやすい状態に直したグラフを示してある。すなわち、L0 〜L4 は正確にはLs 〜Ls+4 と記述するべきであるが、記載上繁雑になるのを避けてこのSは省略して記してある。
ここで、Lのセンサには上記Sだけシフトした後もR基準でまだxだけずれた光が入射しているとする。このとき例えば、L1 のセンサにはR0 とR1 に入射する光が混じり合って入射し、同様に、各LのセンサにもR基準でxだけずれた光が順次に入射するので、各Lの出力(L1 〜L3 )は、図15の[式1]に示したように表現されることがわかる。
【0015】
上記Fmin と、Fmin から上記シフト量をプラス方向とマイナス方向にずらしたFFの値F-1とF+1は、この各Rn ,Ln の出力を用いて表現すると、図16の[式2]のように表される。さらに、[式1]を用いて[式2]を展開すると、値Fmin ,F-1,F+1のそれぞれは図17の[式3]のように表される。
また、この[式3]中の{|R0 −R1 |+|R1 −R2 |+|R2 −R3 |}を(ΣΔR)として表現すると、この(ΣΔR)に依存せず、先のズレ量xが図18の[式4]に示す演算によって求められる。これが「補間演算」である。
【0016】
なお、これらの演算は、図1中の演算手段5にて行われるが、ワンチップマイコン等の演算制御手段(CPU)10において所定のプログラムに従って行ってもよい。
【0017】
上述した演算のプロセスの概要を示すと図3(b)のフローチャートのように表せる。すなわち、センサアレイのどの領域に入射する光を用いて上記「相関演算」を行うかをまず指定する(S101)。次に、演算手段5による図2(a)にて説明した「相関演算」を行い、シフト量を求める(S102)。
また、その結果から更に[式4]で説明した「補間演算」を行って上記xを求める(S103)。
【0018】
このように得られた値Sとxに基づいて、CPU10がピント合わせレンズの繰り出し量を算出し、制御すればオートフォーカス( AF) カメラが提供できる。なお、この演算手段は論理(ロジック)回路によっても構成できるが、前述のようにこのようなハードウエアによる演算手段を用いずに、これらの演算をCPU10が内蔵する所定のプログラムに従って行ってもよい。
このような場合は、図3(b)に示すようなフローチャートで表される。すなわち、センサアレイの各センサの出力をCPU10が入力し(S105)、CPU10が所定のプログラムによって上記のような相関演算(S106)および、補間演算(S107)を行って、その結果に基づいてズームレンズ等の繰出し量を算出してピント合わせ制御を行う(S108)。
【0019】
なお、論理回路(即ちハードロジック回路)による演算は、回路の規模の縮小と高速化が可能ではあるが、データ内容を判定したり、測距エリアの幅を切り換えたりすることは困難である。一方、マイコン制御ではこのようなことが可能とはなるが、高速化は難しいという一長一短な作用効果を奏する。
【0020】
例えば、図4に示すような人物と山のシーンにおいては、正しく被写体6a(人物)を測距しようとすると、測距エリアWは人物の顔の幅Kよりも狭い方がよい、即ちW<Kの関係が成り立つ。この理由は、測距エリアWが広いほど背景の山6bの光情報までが演算に加味されてしまうために、高精度な測距が困難になるからである(すなわち、遠近混在誤差の発生故に精度が低下する)。
【0021】
この測距エリアWは、センサアレイのピッチSPや使用するセンサ数Eと距離L、センサ、レンズ間の距離fに依存し次式の関係が成り立つ。
W = L×SP×E/f …(式e)
この関係からわかるように、顔の幅Kは距離Lに対し一定なのに対し、測距エリアWは距離Lに比例する。つまり、被写体までの距離Lが変わっても測距エリアWを顔の幅K以下にするためには、SP、fは一定であるので、センサ数Eを切り換える方法しかないことがわかる。一方、遠近混在が無ければ、相関エリアは広いほうがセンサのノイズが相殺されて高精度となる。したがって、近距離撮影では相関エリアは広いほうが有利となる。このように、測距エリアの幅は可変にするほうが、近距離から遠距離までの広範囲で高精度に測距が可能となる。
【0022】
ただし、上述の遠近混在の問題は、多くの場合、補間演算のレベルで生じるものであり、相関演算への影響は少ない。
そこで本発明の第1実施形態では、比較的単純な論理回路で構成しても、また遠近混在があっても大きな誤差の生じない相関演算は高速のハードロジック回路で行い、一方、厳密な精度で行うべき補間演算は、CPUによるソフトウエアに従う演算によって精密に行うように構成する。これにより、測距装置としての高速化と高精度を共に達成したものが実現できる。
【0023】
図3(c)のフローチャートには、図3(a)および図3(b)のフローチャートに比較し本発明の第1実施形態としての演算処理に関する手順を示している。すなわち、高速化と高精度を共に達成するため、図3(c)に示すように演算処理を制御する。
まず相関エリアの指定を行い(S109)、ハードロジック演算回路により相関演算を行う(S110)。この結果の相関値Sを基にしてCPU10はセンサアレイのデータを読み込み(S111)、マイコンによるソフトウエア的な補間演算を行う(S112)。
求まった結果に基づいて、ズームレンズの繰り出し量を算出し、被写体に対し適宜なピント制御を行う(S113)。
【0024】
(変形例1)
本発明の目的からすれば、相関演算を必ずしもハードロジック回路で行う必要はなく、例えば相関をとるエリアのデータ数を少なくするなど、高速化ができれば、図3(b)のステップS106のようにソフトウエアによって行ってもよい。
また同様にして、補間演算に関しても図3(a)のステップS103のようにハードウエアによって行ってもよい。いずれの手法にせよ、相関演算と補間演算においては使用するデータまたは作業エリア等を別々にして、処理の高速化と高精度化を図っている。
【0025】
ここで、例えば単純な明暗の光パターンのセンサピッチ単位の相関をとるだけなら、図5に示すような回路構成でもこの機能を満たすことはできる。
受光レンズ1aの光軸後方にはセンサアレイ20a、21bが配置され、受光レンズ1bの後方にアレイ20b、21b、22bが配置されており、それぞれ、3a、3bに示すような波形の光量分布の光が得られた場合を考える。
トランジスタ23、24はカレントミラー回路を構成し、センサ20aの光電流はトランジスタ24のコレクタ電流となる。したがって、後段に続くアンプ28には、センサ20a、21aの差の光電流が入力され、センサ20aの光電流がセンサ21aの光電流より大きい場合には、このアンプ28に差電流が流れ込み、一方、この大小関係が逆な場合はこのアンプ28から差電流が流れ出す。つまり、これらの大小関係によってアンプ出力はL(Low) になったりH(High)になったりする。
【0026】
同様にして、レンズ1b側のセンサもトランジスタ25、26、27のカレントミラー回路に接続されており、センサ21bの出力を基準にしてアンプ29、30に差の光電流が流れ込んだり流れ出したりするので、これらのアンプ出力は、センサアレイ上の明暗によって上記アンプ28と同様にその出力がH(High)になったりL(Low) になったりする。
【0027】
このアンプ29は、センサ20bよりセンサ21bの光電流が大きい場合にLになるが、インバータ31の作用により反転され、後段に続くAND回路32に入力される。また、センサ22bよりセンサ21bの光電流が大きい場合にはアンプ30の出力はLになるが、これをAND回路33に入力すると、レンズ1a側の光パターンの大小関係が、センサ20b,21b上で等しくなった場合には、AND回路32が、センサ21b,22b上で等しくなった場合、AND回路33が、Hの信号を出力する。
上述のような構成により、明暗パターンの変化が、センサアレイのどこで起きているかがロジック回路的に判別することができる。またこのような回路をハーウエアとして複雑にしていくことによっても単純な相関演算は可能である。
【0028】
ここで、図6に本発明の実施形態の具体的例としてカメラの構成を示す。ただし、レンズ1a,1bやセンサアレイ2a,2b等からなる測距ユニット100についてはすでに説明してあるので詳説は省略する。また、相関回路5は図5で説明したようにハードロジック回路で構成されている。
A/D変換回路4は、センサアレイのアナログ出力をディジタルデータに変換する回路であり、ここでは変換データを記憶する機能も有するものとする。出力回路7はシリアル通信で、この記憶データをCPU10に対して出力する。このCPU10は、このシリアル通信用のポートや、カメラの各機能を制御する端子等からなるポート手段19、これを制御するレジスタ群14、18、演算部17に、データの一時記憶用のRAM15、所定のアルゴリズムでこれらを制御する命令のプログラムが入ったROM16等から構成されている。
【0029】
また、ポート制御によって、繰り出し制御手段を介してピント合わせ用レンズ13の繰り出し制御が行われ、シャッタ8などが駆動制御される。カメラの部品のバラツキや、組み立て精度のバラツキによって生じる誤差を補正するための補正係数を記憶するような電気的に書込み可能なROM(EEPROM)9が設けられ、CPU10はこの補正データを参照しながらカメラの制御を行う。
【0030】
続いて、上述のような構成のカメラの測距装置の動作について、図7のフローチャートを用いて説明する。
まず、相関エリアを指定する(S1)。ここで、図2(d)にR1 〜R3 として示したような相関エリアを指定してセンサアレイに入射する光パターンに基づくデータをA/D変換手段4でA/D変換を行う。
図6中の相関手段5によってセンサピッチ単位で相関演算して(S2)、この相関結果Sを得る。この値Sは被写体の距離に依存する値なので、この値を基に判定することにより被写体距離の大まかな判定ができる(S3)。例えば所定値S1 よりも大きい場合、この被写体は「近距離」に在るとみなしステップS16に分岐して「広い」エリアで補間演算を行い(S16)、ステップS11に進む。
【0031】
一方、上記ステップS3において所定値S1 以下の場合はステップS4に進んで「狭い」相関エリアにて補間演算を行う。詳しくは、まずR側のセンサから所定の狭いエリアで測距するためのデータ(R0 〜R4 )を読み込む(S4)。
次に、本発明の特徴の一つとなる読込みを行う。つまり、L側のデータをやみくもに取り込むのではなく、[式3]に示した各計算式で用いられるデータ(L1 ,L2 ,L3 )のみを入力する(S5)。この手法は、相関がとれたシフト量Sを考慮した値のデータをとなっているため必要以上にマイコン(CPU)のRAMを浪費することはなく、シリアル通信によりデータ読込みに要する所要時間も短縮できる。
こうして読み込んだデータから、[式2]に示す各式に基づいた計算を行い、最小のFmin と、その両サイドのF-1 およびF+1 を求める(S6〜S8)。
【0032】
次に、相関演算時と補間演算時とでエリアの範囲を切り換えたことによって、相関値Sに差異が生じていないか否かを確認する(S9)。この判定では、上記ステップS6〜S8の相関演算で得られたFmin ,F-1,F+1のうちでFmin が最小値をとっているか否かを判定する。
もしFmin が最小でない場合は、さらにステップS13に分岐してF-1とF+1との大小関係を判別し、もしF-1が最小ならSを1つ小さくし、また、F+1が最小なら相関値Sを1つ大きくしてSを補正した後(S14,S15)、上記ステップS3に戻る。
【0033】
続いて、ステップS10〜S12では、図示の式に基づく補間演算(S10)と、距離Lの算出(S11)および、この距離Lに在る被写体へのピント合せ(S12)を行うステップである。なお、前述したステップS16でのx算出も、センサエリアが広い範囲に関して求めるだけで、基本的には上記ステップS6〜S10と同様の手法で行う。ただし、再度Fmin の大きさを確認する為の処理ステップS9は不要である。
【0034】
通常、ワンチップマイコンは、データの演算には演算用のレジスタ14を用いてこれにデータを出し入れして所定の順序に従って計算を行うので、多くのデータを用い複雑な計算をする場合には、一つずつデータをここに出し入れして計算するため、長大な時間と命令とを要する。したがって、データを少しずつシフトしながらRとLのデータの差をとって所定のエリアにわたって加算するというような図2(c)に示したような「FF演算」は非常に効率の悪いプロセスとなる。しかも、実際にその後の補間演算では、[式4]に示すようにFmin とその両サイドのF-1、F+1しか用いないので、せっかく多数のFFを計算しても、高精度の測距ができるわけでもない。これは図6のように設けられたROM16の容量にとっても負荷が重いが、データを一時記憶させるRAM容量の点からみても大きな問題である。
【0035】
そこで、図8(a)に示す従来の測距装置のRAMの使用形態に対比して、図8(b)には本実施形態のRAMの使用形態を例示する。図示のように、従来ではR0 〜R4 ,L0 〜L4+S ,… についての多くを計算しなければならなかったのに比べて、本発明ではR0 〜R3 ,L1+S ,L2+S ,L3+S のみの計算で済むと共に、メモリ空間も節約でき、よって、RAM等の利用空間の削減効果が大きいことがわかる。
【0036】
(作用効果1)
以上説明したように、本実施形態によれば、高速かつ高精度、即ち、遠近混在の影響が小で、しかもCPU中のプログラムや使用されるメモリ空間を少なくする効果も併せて有する測距装置が提供できる。
【0037】
(第2実施形態)
次に、本発明に係わる第2実施形態を説明する。本実施形態の測距装置も前述の図6のように構成された装置において実施される。本実施形態の特徴は、左右のRとLのセンサアレイ間に図8のようにオフセット誤差がのった場合に対策する1つの実施形態であり、図9のフローチャートには本実施形態の特徴的な演算処理の詳細を後述のように例示している。
【0038】
また図11には、図2(d)に相当する各センサの出力をグラフで示している。例示のように、Lを基準と考えて、Rには各センサにC11,C22,C33の誤差が乗ったと考えると、これらを補正してから相関演算と補間演算を行うことが好ましい。しかし、この誤差が小さい時にはセンサピッチを「分解能」とする相関演算までは正確にできる。そこで本発明の第2実施形態では、補間演算に先立ってこの補正を行い、補間は正確に、かつ補正係数の数は最低に抑え、これを記憶するEEPROMの容量を小さくすることを可能とする。また、このような誤差は、測距エリアが小さい場合に影響を及ぼしやすいので、狭いエリアで補間演算を行う場合のみに上記の補正を行うようにして、さらに補正係数の削減を図っている。
【0039】
また、図10(a)に示す主要被写体の人がどの距離にいるかの確率を表すグラフが示すように、一般に撮られる写真を分析すると、ある距離L1 以遠では人が被写体になることは少なく、一方、図4に示すように、ある距離L2 以近では、特にエリアを狭くする必要はない。そこで、このL1 からL2 の距離に在る被写体を測距する場合だけ、センサ誤差の補正を行えばよいと考える設計も可能である。この大まかな距離判定は、相関演算結果Sによってある程度予測可能である。そこで、図9に示したフローチャートでは、このL1 〜L2 の距離にある被写体の相関値Sは、所定のS2 とS1 の間の値をとると仮定して設計した具体例である。
【0040】
図9中のステップS1〜S5までは既に説明した第1実施形態の図7のフローチャートと同様である。ただし、前述した理由により、ステップS3では相関値SがS1 からS2 の間にある場合(即ちS2 <S<S1 )だけ狭いエリアでの測距を行うように制御している。
R側のセンサデータ( R0 〜R4)の読込み(S4)に続く、L側のセンサデータ( LS+1 〜LS+3)の読込み(S5)に続き、ステップS5bでは、図8のL1 ,L2 ,L3 基準のR1 ,R2 ,R3 の誤差C11、C22,C33などの補正係数をEEPROMから読み出す工程である。
また、ステップS6〜S8までは、これらの補正値でRn ,Rn-1 ,Rn+1 とLn との誤差(同じ輝度を睨んだ時に同じ出力にならない誤差)Cnn ,Cn(n-1),Cn(n+1)を補正しながらFmin ,F-1,F+1を算出していく工程である。
こうして得られたFmin ,F-1,F+1より、図7のステップS10と同様に補間演算でxを求め、ピント合わせを行う(S12)。
【0041】
(作用効果2)
以上のように構成することにより、従来、図10(b)のようにR、Lの各センサごとに必要とした補正係数のメモリ容量が、この第2実施形態では、図10(c)に示すようにメモリ容量が削減できる。したがって本実施形態によれば、あらかじめ高速で求めた相関結果Sを利用して被写体距離を判定し、所定の遠距離の人物を重視した誤差補正を行うことができ、これによって、補正係数の数を削減し、補正用のプログラムやメモリ等の削減を可能とする。
【0042】
(第3実施形態)
続いて、本発明に係わる第3実施形態を説明する。この実施形態の測距装置も前述した図6のように構成された装置において実施される。本実施形態の特徴は、図12(a),(b)に示すように、測距エリアの一部が人物6からはずれた状態を検出し、この場合は、はずれたセンサを除いて測距演算を行うことによって、図4を用いて説明した遠近混在誤差を対策するための実施形態である。これは、前述した第1、第2実施形態に比べて、測距エリアをむやみに狭くすることはないので、遠距離であっても人の顔よりも大きな被写体などに対してはさらに高精度の距離測定が可能となる実施形態である。
図12(b)のような撮影シーンでは、被写体から外れたセンサは、相関が悪くなるので、図12(a)のグラフのように差分|Rn −Ln +s|の結果がこの被写体に対応したセンサに比べ異なった値となる。このような原理を利用して図12(a)の例でいえば中央のセンサR2 ,Ls+2 の差分Fc 以上のセンサ出力は除去して補間演算を行う。このような機能をもたせる為に、図13に示すフローチャートのアルゴリズムを持ったプログラムをCPUに内蔵する。
【0043】
ステップS1〜S5は、既に説明した手順と同じ処理ステップである。これに続いて、補間演算用のFmin ,F-1,F+1等を0に初期化し(S20)、中央のセンサを選択するためiに2を代入して(S21)、Ri すなわちR2 のデータを読み込む(S22)。
差分Fi をとり(S23)、とったこの差分を差分の基準値Fc とする(S24)。差分の各センサごとの和がFmin なので、これをFi に加算する(S25)。
これ以降の算出ステップ群でも順次、F+1,F-1を求めるためにRi+1 ,Ri-1 を読み出してLi との差を求め、F+1,F-1を計算する(S26〜S29)。
【0044】
次に、ステップS30〜S34では、まずiを1つ減じてから(S30)、中央より左側の番号の若いセンサについてRi ,Ri+1 ,Ri-1 を読み出し(S31)、Li との差分を求めて、F+1,F-1をそれぞれ計算する(S32)。なおここで、Ri ,Li の差分Fi が基準値Fc を大きく外れたものは算出処理(S34)の対象から除去し、外れていないものは加味するように、基準値Fc との大小関係を判定している(S33)。
【0045】
同様に、ステップS35〜S40でも、中央から右側の番号の1つ増加したセンサiについて(S35,S36)、Ri ,Ri+1 ,Ri-1 を読み出し(S37)、Li との差分を求めて、Fmin ,F+1,F-1をそれぞれ計算するが(S38)、ここでも同様に、Ri ,Li の差分Fi が基準値Fc を大きく外れたものは算出処理(S40)の対象から除去するように、基準値Fc との大小関係を判定している(S39)。
このようにして得られた補間演算用のFmin ,F-1,F+1を用いて、補間演算を行いxを求めた後(S10)、距離Lを求めてピント合わせを行って(S12)一連の処理を終了する。
【0046】
(作用効果3)
以上のように本第3実施形態では、遠近混在誤差に関して対策すると共に、人物以外の被写体の場合は測距エリアを広くとることができ、被写体に最適な測距エリアを選択してより高精度のピント合わせを可能としている。
【0047】
(その他の実施形態)
以上に例示した第1〜第3実施形態では、すべてセンサピッチ単位の相関量Sを求める手段として、ハードロジック回路を用いた場合を例として説明したが、この手段はマイコンが所定のプログラムで演算するソフトウエア的な手段であっても応用が可能である。そこでこの場合の具体例を図14にフローチャートで示す。この処理手順は相関量Sを求めるためのプロセスであり、前述の図2で説明したFFの最小値を" FF1" とし、グラフの横軸であるシフト量を" SFT" として表わしている。また、nはセンサの番号を表す整数である。
【0048】
まずFF1を100に初期設定し(S51)、SFT,n,FFを0に初期設定する(S52)。
続くステップS53〜S56までは、差分の算出処理ループである。すなわち、差分FF1 をとり(S53)、このとった差分をFFに加算する(S54)。センサ番号nを1つインクリメントした後(S55)、所定の限度数nc (即ち対象エリア数)との比較によりこの処理ループの繰り返しを判定する(S56)。
【0049】
上記処理ループにより差分の各センサごとの和がFFとして求まると、次に、FFとFF1との大小比較を行い(S57)、FF1の方が大きい場合はFFをFF1に代入する(S58)と共に、SFTをSに代入する(S59)。
SFTを1つインクリメントした後(S60)、所定の限度値Smax になるまではステップS53に戻って上述のステップを繰り返す。Smax になると図7中のステップS3に進む。
【0050】
(作用効果4)
このように、相関量を求める手段は上記ステップS51〜S61から成るプログラムによるソフトウエア的手段によっても可能である。このフローチャートでも明らかなように、相関の加算をとる為の対象エリア数nc が小さければ、上記処理ループを繰り返す回数が少なくなって高速化できる。また、ピッチ単位の相関演算は多少荒くても正しいSの値が求められるので、図3(b)のようなエリア切替えの無い演算処理よりは更なる高速処理が可能となる。
【0051】
(その他の変形例)
なお本発明は、この他にも実現方法として以上の要旨を逸脱しない範囲で種々の変形実施が可能である。
【0052】
以上、実施形態に基づいて説明してきたが、本明細書中には次の発明が含まれている。
[1] 視差を有する一対の受光素子列によりそれぞれ被写体像を受光して、一対の被写体像信号列を出力する受光手段と、
前記受光手段の出力を受け、前記一対の被写体像信号列の第1の部分の相関値を出力する相関手段と、
前記一対の受光素子列のいずれか一方の受光素子列の全部の被写体像信号列および、他方の受光素子列の被写体像信号列のうち第1の部分より狭い第2の部分の部分的データのみを選択的に入力するデータ入力手段と、
当該入力されたデータに基づいて所定の補間演算を行う補間手段と、
を具備することを特徴とする測距装置。
[2] 視差を有する一対の受光素子列によりそれぞれ被写体像を受光して、一対の被写体像信号列を出力する受光手段と、
前記一対の被写体像信号列を第1の画素数を有する複数のブロックに分割する手段と、
前記受光手段の出力を受け、前記一対の被写体像信号列の相関値を出力する相関手段と、
前記相関値が所定の条件を満たす場合、前記ブロックを第1の画素数よりも大きい第2の画素数に再設定する手段と、
前記一対の受光素子列のいずれか一方の受光素子列の全部の被写体像信号列および、他方の受光素子列の被写体像信号列のうち、前記第2の画素数のデータのみを選択的に入力するデータ入力手段と、
当該入力されたデータに基づいて所定の補間演算を行う補間手段と、
を具備することを特徴とする測距装置。
[3] 視差を有する異なる視野から観測した被写体像の輝度分布に従った二つの光パターン信号を出力する二つのラインセンサと、
前記二つの光パターン信号を比較して前記被写体像の視差に基づく相対位置差を前記ラインセンサの配列ピッチの単位で算出するピッチ差算出手段と、
前記ピッチ差算出手段の出力結果に基づいて、前記ラインセンサの出力信号を選択し、この結果に基づき前記二つの光パターンの相対位置差を前記センサピッチよりも細かい精度にて算出する演算制御手段と、
を具備し、
前記ピッチ差算出手段はハードロジック回路で構成され、前記演算制御手段はマイクロコンピュータ及びソフトウェアで構成されていることを特徴とする測距装置。
また、次の発明も含まれる。
(1) 視差を有する異なる視野から観測した被写体像の輝度分布に従った二つの光パターン信号を出力する二つのラインセンサと、
上記二つの光パターン信号を比較して上記被写体像の視差に基づく相対位置差を上記ラインセンサの配列ピッチの単位で算出するピッチ差算出手段と、
上記ピッチ差算出手段の出力結果に基づいて、上記ラインセンサの出力信号を選択し、この結果に基づき上記二つの光パターンの相対位置差を上記センサピッチよりも細かい精度にて算出する演算制御手段と、
を具備することを特徴とする測距装置。
(2) 上記ピッチ差算出手段は、ハードロジック回路で構成され、
上記演算制御手段は、マイクロコンピュータ及びソフトウェアで構成されていることを特徴とする(1)に記載の測距装置。
(3) 上記演算制御手段は、上記ラインセンサ出力を記憶する記憶手段を具備し、かつ、上記ピッチ差算出手段の出力結果に基づいて、上記二つのラインセンサの一方の出力を選択し、もう一方の出力との差分の計算を行い、この結果を上記記憶手段に記憶するように制御を行うことを特徴とする(1)に記載の測距装置。
(4) 上記演算制御手段は、上記二つの光パターンの相対位置差を上記センサピッチよりも細かい精度で算出する過程において、上記二つの光パターンの差分を比較して、上記ピッチ差算出手段の出力結果を判定する機能を有し、
上記ピッチ差算出手段の出力結果が正しくないと判断した場合には、当該出力結果を変更することを特徴とする(1)に記載の測距装置。
【0053】
(5) 視差を有する異なる視野から観測した被写体像の精度分布に従って二つの光パターン信号を出力する二つのラインセンサと、上記二つの光パターン信号を比較して上記被写体像の視差に基づく相対位置差を、上記ラインセンサの配列ピッチの単位で算出するピッチ差算出手段と、上記ピッチ差算出手段の出力結果に基づいて上記二つの光パターンの相対位置差を上記ピッチよりも細かい精度で算出する演算制御手段とを具備する測距装置であって、
上記演算制御手段は、上記二つのラインセンサの出力信号を選択して減算を行い、この減算結果に基づいて上記相対位置差を算出するためのセンサ部分を決定することを特徴とする測距装置。
(6) 上記二つのラインセンサの出力アンバランス補正情報を記憶する手段を具備し、
上記算出されたピッチ差に基づいて、上記出力アンバランス補正情報を選択し、上記減算結果を補正する補正手段を有することを特徴とする(5)に記載の測距装置。
(7) 視差を有する異なる視野から観測した被写体像の輝度分布に基づいた二つの光パターン信号を出力する二つのラインセンサと、
上記二つの光パターン信号の第一の部分同士を比較して上記被写体像の視差に基づく相対位置差を、ラインセンサのピッチの単位で算出するピッチ差算出手段と、
上記ピッチ差算出手段の出力結果に従って上記二つの光パターンの相対位置差を上記ラインセンサのピッチよりも細かい精度で算出する演算制御手段と、を具備する測距装置であって、
上記演算制御手段は、上記ピッチよりも細かい精度で相対位置差を算出する場合に、上記ピッチ差算出結果に基づいて上記二つのラインセンサのうち上記第一の部分とは異なる第二の部分を選択し、この部分の出力を比較して上記相対位置差を演算することを特徴とする測距装置。
(8) 上記二つのラインセンサの出力アンバランス補正情報を記憶する手段と、
上記選択された位置差算出用の第二部分の出力および上記出力アンバランス補正情報に基づいて上記減算結果の補正の可否を決定する補正手段と、
を更に具備することを特徴とする(7)に記載の測距装置。
【0054】
また、そのほかに次のような発明も含まれる。
(1' ) 視差を有する異なる視野から観測した被写体像の輝度分布に従った二つの光パターン信号を出力する二つのラインセンサと、
上記二つの光パターン信号を比較して上記被写体像の視差に基づく相対位置差を、上記ラインセンサのピッチの単位で算出するピッチ差算出手段と、
上記ピッチ差算出手段の出力結果に従って、上記ラインセンサの出力信号を選択し、その結果に従って上記二つの光パターンの相対位置差を上記ラインセンサのピッチよりも細かい精度で算出する演算制御手段と、
を備えることを特徴とする測距装置。
(2' ) 上記ピッチ差算出手段は、ハードロジックの電子回路で構成され、上記演算制御手段は、マイクロコンピュータ及びソフトウェアで構成されていることを特徴とする(1' )に記載の測距装置。
(3' ) 上記演算制御手段は、上記ラインセンサの出力を記憶する記憶手段を具備し、上記ピッチ差算出手段の出力結果に基づいて上記二つのラインセンサの一方の出力を選択し、もう一方の出力との差の計算を行い、この結果を上記記憶手段に記憶するように制御を行うことを特徴とする(1' )に記載の測距装置。
(4' ) 上記演算制御手段が、上記二つの光パターンの相対位置差を上記ラインセンサのピッチよりも細かい精度で算出する過程において、
上記二つの光パターンの差分を比較して上記ピッチ差算出手段の出力結果を判定する機能を有し、上記ピッチ差算出手段の出力結果が正しくないと判断した場合には、上記ピッチ差算出結果を変更することを特徴とする(1' )に記載の測距装置。
【0055】
(5' ) 視差を有する異なる視野から観測した被写体像の精度分布に従った二つの光パターン信号を出力する二つのラインセンサと、
上記二つの光パターン信号を比較して上記被写体像の視差に基づく相対位置差を、上記センサの配列ピッチの単位で算出するピッチ差算出手段と、
上記ピッチ差算出手段の出力結果に基づいて上記二つの光パターンの相対位置差を上記ピッチよりも細かい精度で算出する演算制御手段と、から成る測距装置において、
上記演算制御手段は、上記二つのラインセンサの出力信号を選択して所定の減算を行い、この減算結果に基づいて上記相対位置を算出するためのセンサ部分を決定することを特徴とする測距装置。
(6' ) 上記二つのラインセンサの出力アンバランス補正情報を記憶する手段を具備し、上記算出されたピッチの差に基づいて、上記出力アンバランス補正情報を選択して上記減算結果を補正する補正手段を更に有することを特徴とする(5' )に記載の測距装置。
【0056】
(7' ) 視差を有する異なる視野から観測した被写体像の輝度分布に従った二つの光パターン信号を出力する二つのラインセンサと、
上記二つの光パターン信号の第一の部分同士を比較して上記被写体像の視差に基づく相対位置差を、上記ラインセンサのピッチの単位で算出するピッチ差算出手段と、
上記ピッチ差算出手段の出力結果に基づいて上記二つの光パターンの相対位置差を上記センサピッチよりも細かい精度で算出する演算制御手段とから構成される測距装置において、
上記演算制御手段は、上記ラインセンサのピッチよりも細かい精度で相対位置差を算出する場合に、上記ピッチ差算出結果に基づいて二つの上記ラインセンサのうちの上記第一の部分とは異なる第二の部分を選択し、この部分の出力を比較して上記位置差を演算することを特徴とする測距装置。
(8' ) 上記二つのラインセンサの出力アンバランス補正情報を記憶する手段を更に備え、上記選択された位置差算出用の第二の部分に基づいて、上記出力アンバランス補正情報を用いて上記減算結果を補正するか否かを決定する補正手段を有することを特徴とする(7' )に記載の測距装置。
【0057】
【発明の効果】
以上説明したように、本発明によれば、パッシブタイプの測距装置の測距範囲を適切に切り替えて、被写体の不必要な領域を測距することなく、なおかつ高速な演算処理を可能とした測距装置が提供でき、この適用により、正確なピント合わせが高速に行えるカメラやビデオ等の撮影装置を提供することができる。
また、高速で高精度な測距が可能な電子システムとして、必要となるメモリやプログラムの記憶容量が少なくても構成できるカメラ等のための測距装置が提供できる。
【図面の簡単な説明】
【図1】図1は、本発明の実施形態に係わる測距装置の基本構造を示す構成図。
【図2】 図2(a)〜(d)は本発明に係わる測距の演算原理を示し、
(a)は、焦点とずらし量との関係を示すグラフ、
(b)は、右側センサRのセンサ部分ごとの信号出力を示すグラフ、
(c)は、左側センサLのセンサ部分ごとの信号出力を示すグラフ、
(d)は、左右のセンサ出力と隣接するセンサ部分の出力の関係を示すグラフ。
【図3】 図3(a)〜(c)は相関演算と補間演算から成る手順を示し、
(a)は、ハードウエアによる処理手順を示すフローチャート、
(b)は、ソフトウエアによる処理手順を示すフローチャート、
(c)は、ハードウエアとソフトウエアの組合せによる処理手順を示すフローチャート。
【図4】図4は、ラインセンサと被写体との位置関係を示す概念図。
【図5】図5は、本測距装置の相関手段としてのハードロジック回路を示す回路図。
【図6】図6は、本発明の測距装置の構成を詳しく示すブロック構成図。
【図7】図7は、本測距装置の第1実施形態としての相関演算の処理手順を示すフローチャート。
【図8】 図8(a),(b)は従来および本発明の使用する演算エリアの比較を示し、
(a)は、従来方式の使用されるエリアを示す概念図、
(b)は、本測距装置で使用されるエリアを示す概念図。
【図9】図9は、本測距装置の第2実施形態としての相関演算の処理手順を示すフローチャート。
【図10】 図10(a)〜(c)は、被写体に関するグラフと、従来および本発明の左右センサの誤差(補正値)を格納するエリアを比較して示し、
(a)は、被写体が人物である場合の確率を示すグラフ、
(b)は、従来方式で使用される補正係数のエリアを示す概念図、
(c)は、本測距装置で使用されるエリアを示す概念図。
【図11】図11は、図2(d)に相当する各センサの出力を示すグラフ。
【図12】 図12(a),(b)は、基準とする右センサと左右の各センサの出力を示し、
(a)は、左右の各センサの出力と差分を示すグラフ、
(b)は、基準とする右センサのセンサ単位と被写体との位置関係を示す説明図。
【図13】図13は、本測距装置の第3実施形態としての補間演算の処理手順を示すフローチャート。
【図14】図14は、本測距装置のその他の実施形態としての相関演算の処理手順を示すフローチャート。
【図15】図15は、右センサを基準としずれ量の光が左センサに入射する場合の各左センサ部分の出力を表す[式1]を示す図。
【図16】図16は、左右のセンサにおける差分による[式2]を示す図。
【図17】図17は、上記[式2]をさらに展開して表した[式3]を示す図。
【図18】図18は、補間演算により求まる最小値Fmin とSIFT量との関係を表す[式4]を示す図。
【符号の説明】
1a,1b…レンズ(センサ用)、
2a,2b…ラインセンサ、
3a,3b…信号出力波形、
4…A/D変換部、
5…演算部(相関手段)、
6…被写体、
7…出力部、
8…シャッタ、
9…EEPROM、
10…制御手段(CPU)、
12…繰り出し手段、
13…ズームレンズ、
14…演算用レジスタ、
15…RAM、
16…ROM、
17…演算手段、
18…レジスタ(汎用)、
19…ポート。
S1〜S16…本発明の第1、第2実施形態の処理ステップ、
S1〜S40…本発明の第3実施形態の処理ステップ、
S51〜S61…本発明のその他の実施形態の処理ステップ、
S101〜S104…ハードウエアによる演算処理ステップ、
S105〜S108…ソフトウエアによる演算処理ステップ、
S109〜S113…ハードウエアとソフトウエアによる演算処理ステップ。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a distance measuring device used for a camera, a video, and the like, and more particularly to a technique for providing a device capable of more accurate distance measurement and focusing.
[0002]
[Prior art]
In general, distance measuring devices used for cameras and the like have many methods that use light. For example, an “active type” method that projects signal light from the distance measuring device side and a “passive” method that uses a luminance distribution image of an object. It is roughly divided into “type”. Both methods use triangulation as the basic principle. In the active type, the distance between the projection and reception positions is the basic length (that is, the baseline length), and in the passive type, the object is based on the parallax with reference to the two reception positions. The distance to the object is obtained according to the relative position difference of the object image. In order to observe the image of the object, it is necessary to measure the amount of light at each light receiving position. Therefore, a line sensor in which a plurality of optical sensors are arranged is used.
[0003]
First, the distance measuring method of this passive type distance measuring device will be described with reference to FIG. Reference numerals 1a and 1b denote two light receiving lenses, which are separated by a base line length B. Light incident from the
x = B × f / L (formula a)
Japanese Patent Publication No. 7-54371 discloses a method for calculating a relative position difference by calculation from the output of such a line sensor (hereinafter referred to as correlation calculation).
[0004]
In addition, it is an important technique to use which part of the light pattern to measure the distance. For example, as shown in FIG. 5, if a person 6a is to be measured, the Rn2 part of the sensor array 2a If the incident light is taken into account, the brightness of the distant background mountain 6b is mixed (this is referred to as “mixing of perspective”), and correct distance measurement cannot be performed. That is, in order to correctly measure the distance, a technique of using only the light incident on the sensors R1 to Rn1 in the figure but not using the sensor signal of Rn2 is necessary. Japanese Patent Publication No. 5-88445 is known as a proposal of such a technique.
[0005]
[Problems to be solved by the invention]
However, the technique disclosed in Japanese Patent Publication No. 7-54371 does not touch on the above-mentioned problem of “mixing of perspective”. On the other hand, in the technique disclosed in Japanese Patent Publication No. 5-88445, this result is obtained after the correlation calculation. When it is inappropriate, the area of the sensor is switched. It takes extra time and reprocesses the data over and over, so a microcomputer (hereinafter abbreviated as “microcomputer”) is used. There are also problems such as an increase in memory capacity and program capacity for judgments and calculations. That is, even if these conventional techniques are simply combined, it is difficult to provide a high-speed and high-precision distance measuring device.
[0006]
The present invention has been made in view of the above points, and appropriately switches the distance measurement range of the passive type distance measurement device, does not measure unnecessary measurement areas, and enables high-speed calculation. An object of the present invention is to provide a distance device. For example, when the present invention is applied for focusing on a camera or a video, it is an invention for accurately focusing an object.
[0007]
[Means for Solving the Problems]
Therefore, the present invention takes the following means in order to solve the above-described problems and achieve the object. That is,
[1] A light-receiving unit that receives a subject image by a pair of light-receiving element rows having parallax and outputs a pair of subject image signal rows; and an output of the light-receiving unit; Among the correlation means for outputting the correlation value of the first portion, the entire subject image signal sequence of one of the pair of light receiving element sequences, and the subject image signal sequence of the other light receiving element sequence. Provided is a distance measuring device including a data input unit that selectively inputs only partial data of a second part that is narrower than the one part, and an interpolation unit that performs a predetermined interpolation operation based on the input data. To do.
[2] Light receiving means for receiving a subject image by a pair of light receiving element rows having parallax and outputting a pair of subject image signal rows, and a plurality of subject image signal rows having a first number of pixels. A means for dividing the block into a block; a correlation means for receiving the output of the light receiving means; and outputting a correlation value of the pair of subject image signal sequences; and if the correlation value satisfies a predetermined condition, A second number of pixels smaller than the number of pixels, a subject image signal sequence of one of the pair of light receiving element rows, and a subject image signal sequence of the other light receiving element row A distance measuring apparatus is provided that includes data input means for selectively inputting only data of the second number of pixels and interpolation means for performing a predetermined interpolation calculation based on the inputted data.
[3] Based on the parallax of the subject image by comparing the two light pattern signals with two line sensors that output two light pattern signals according to the luminance distribution of the subject image observed from different fields of view having parallax Based on the output result of the pitch difference calculation means, the pitch difference calculation means for calculating the relative position difference in units of the arrangement pitch of the line sensor, Used for comparison in the pitch difference calculation means Output of the line sensor Part of the light pattern signal Select this Selected light pattern signal Based on the above Based on parallax of subject image The relative position difference Array of An arithmetic control means for calculating with a finer precision than the pitch, the pitch difference calculating means is constituted by a hard logic circuit, and the arithmetic control means is constituted by a microcomputer and software. Providing equipment.
[0008]
DETAILED DESCRIPTION OF THE INVENTION
A plurality of embodiments according to the present invention will be described with reference to the accompanying drawings.
(First embodiment)
First, a method for calculating the relative position difference of the light pattern in the passive type distance measuring apparatus according to the present invention will be described with reference to FIGS.
In FIG. 1A, the relative position difference x of the light distribution incident on the
L = B × f / x (Formula b)
Since each sensor of the sensor array outputs a current signal according to the amount of incident light, if these are converted into digital signals by the A /
[0009]
The deviation amount calculation function is generally composed of two processes as will be described later, but these functions may be incorporated in the CUP 10 as a control program. When the camera is focused using such a technique, the
[0010]
In order to calculate the image shift amount, a calculation step (that is, a correlation calculation) for checking how much the image shifts in units of sensor pitch in both line sensors is required. Then, a calculation step (hereinafter referred to as interpolation calculation) for calculating the shift amount more accurately with a finer resolution is required.
When light is incident on the sensor array 2a in a pattern like the
If the subject is present at a "finite distance", the left sensor L shifted by the number S of sensors determined from the x and the sensor pitch SP has the outputs R1 to R6 as shown in FIG. A similar value of the output signal is obtained.
[0011]
The value FF (i) on the vertical axis in the graph of FIG.
FF (i) = Σ | R (i) −L (i) | (Formula c)
In other words, the result FF obtained by subtracting the output of the corresponding L sensor from the output of a certain R sensor and adding the absolute value for each sensor may be used. That is, first, Li is subtracted from Ri to take its absolute value, i is changed within a certain width, and these are added.
[0012]
Next, if one sensor of Ri or Li is shifted by one unit and the difference is taken in the same manner as the adjacent sensor which has previously taken the difference, FF (i + 1) can be expressed by the following equation.
FF (i + 1) = Σ | R (i + 1) −L (i) |
Thus, the FF can be obtained while sequentially changing the shift amount (hereinafter referred to as SIFT amount), but the SIFT amount where the FF, which is the sum of the difference between R and L, becomes the minimum value (Fmin) is the most. Since it is considered that the position is well matched, the SIFT amount in this case is obtained as S. The above is the outline procedure of the process related to the correlation calculation.
[0013]
Further, when the output distribution of both sensor arrays is illustrated with the above S taken into account, as shown in FIG. 2 (b), it is the same as the R side sensors with corresponding subscripts from the sensors shifted by S on the L side. Is obtained.
[0014]
Next, the “interpolation calculation” process will be described in detail with reference to FIGS. 2B to 2D. The actual image shift amounts on the two sensor arrays are not exactly shifted by the sensor pitch. For accurate distance measurement, the amount of image shift must be detected with a precision finer than the pitch. Therefore, an interpolation operation is performed. R and L in FIGS. 2B and 2C respectively represent a part of sensor outputs constituting the
FIG. 2 (d) shows a graph that has been shifted to the above-described S for which the “correlation calculation” has already been completed, and has been made easier to compare. That is, L0 to L4 should be accurately described as Ls to Ls + 4, but this S is omitted so as not to become complicated in description.
Here, it is assumed that light shifted by x with respect to the R reference is incident on the L sensor after shifting by S. At this time, for example, the light incident on R0 and R1 is mixedly incident on the L1 sensor, and similarly, the light shifted by x on the R reference is sequentially incident on each L sensor. It can be seen that the outputs (L1 to L3) are expressed as shown in [Equation 1] in FIG.
[0015]
Fmin and FF values F-1 and F + 1 obtained by shifting the shift amount in the plus and minus directions from Fmin are expressed by using the outputs of the respective Rn and Ln. It is expressed as Further, when [Expression 2] is expanded using [Expression 1], values Fmin, F-1, and F + 1 are expressed as [Expression 3] in FIG.
In addition, if {| R0−R1 | + | R1−R2 | + | R2−R3 |} in [Equation 3] is expressed as (ΣΔR), the previous deviation amount x does not depend on (ΣΔR). Is obtained by the calculation shown in [Expression 4] in FIG. This is the “interpolation calculation”.
[0016]
These calculations are performed by the calculation means 5 in FIG. 1, but may be performed by a calculation control means (CPU) 10 such as a one-chip microcomputer according to a predetermined program.
[0017]
An outline of the above-described calculation process can be expressed as shown in the flowchart of FIG. That is, first, it is specified which region of the sensor array is to be subjected to the “correlation calculation” using light incident thereon (S101). Next, the “correlation calculation” described with reference to FIG. 2A by the calculation means 5 is performed to obtain the shift amount (S102).
Further, from the result, the “interpolation calculation” described in [Expression 4] is further performed to obtain the above x (S103).
[0018]
An autofocus (AF) camera can be provided if the
Such a case is represented by a flowchart as shown in FIG. That is, the
[0019]
Note that the operation by the logic circuit (that is, the hard logic circuit) can reduce the scale of the circuit and increase the speed, but it is difficult to determine the data contents and switch the width of the distance measurement area. On the other hand, such control is possible with microcomputer control, but it has the advantages and disadvantages that speeding up is difficult.
[0020]
For example, in a scene of a person and a mountain as shown in FIG. 4, if the subject 6a (person) is to be correctly measured, the distance measurement area W should be narrower than the width K of the person's face, that is, W < K relation holds. The reason is that, as the distance measurement area W is wider, the optical information of the background mountain 6b is added to the calculation, so that highly accurate distance measurement becomes difficult (that is, because of the occurrence of mixed perspective errors). Accuracy decreases).
[0021]
The distance measurement area W has the following relationship depending on the pitch SP of the sensor array, the number E of sensors to be used, the distance L, and the distance f between the sensor and the lens.
W = L × SP × E / f (formula e)
As can be seen from this relationship, the face width K is constant with respect to the distance L, while the distance measuring area W is proportional to the distance L. That is, even if the distance L to the subject changes, SP and f are constant so that the distance measurement area W can be made equal to or less than the face width K, so that there is only a method of switching the number of sensors E. On the other hand, if there is no perspective, the larger the correlation area is, the higher the accuracy is because the sensor noise is offset. Therefore, a wider correlation area is advantageous for short-distance shooting. As described above, if the width of the distance measurement area is variable, distance measurement can be performed with high accuracy over a wide range from a short distance to a long distance.
[0022]
However, in many cases, the above-mentioned problem of mixing of perspectives occurs at the level of the interpolation calculation, and the influence on the correlation calculation is small.
Therefore, in the first embodiment of the present invention, even if the circuit is configured with a relatively simple logic circuit, or when there is a mixture of perspectives, a correlation operation that does not cause a large error is performed with a high-speed hard logic circuit, while strict accuracy is achieved. The interpolation calculation to be performed in (1) is configured to be performed precisely by calculation according to software by the CPU. As a result, it is possible to realize a distance measuring device that achieves both high speed and high accuracy.
[0023]
The flowchart of FIG. 3 (c) shows a procedure related to the arithmetic processing as the first embodiment of the present invention compared to the flowcharts of FIG. 3 (a) and FIG. 3 (b). That is, in order to achieve both high speed and high accuracy, the arithmetic processing is controlled as shown in FIG.
First, a correlation area is designated (S109), and a correlation calculation is performed by a hard logic calculation circuit (S110). Based on the correlation value S as a result, the
Based on the obtained result, the zoom lens feed amount is calculated, and appropriate focus control is performed on the subject (S113).
[0024]
(Modification 1)
For the purpose of the present invention, the correlation calculation is not necessarily performed by the hard logic circuit. For example, if the speed can be increased by reducing the number of data in the area to be correlated, as in step S106 in FIG. It may be performed by software.
Similarly, the interpolation calculation may be performed by hardware as in step S103 of FIG. Regardless of which method is used, in correlation calculation and interpolation calculation, data to be used, work area, or the like is separated to increase the processing speed and accuracy.
[0025]
Here, for example, if only a correlation between sensor pitch units of simple light and dark light patterns is obtained, this function can be satisfied even with a circuit configuration as shown in FIG.
Sensor arrays 20a and 21b are arranged behind the optical axis of the light receiving lens 1a, and
The
[0026]
Similarly, the sensor on the lens 1b side is also connected to the current mirror circuit of the
[0027]
The
With the above-described configuration, it is possible to determine where the change in the light / dark pattern occurs in the sensor array by using a logic circuit. A simple correlation operation can be performed by making such a circuit complicated as hardware.
[0028]
Here, FIG. 6 shows a configuration of a camera as a specific example of the embodiment of the present invention. However, since the ranging
The A /
[0029]
Further, by the port control, the feeding control of the focusing
[0030]
Next, the operation of the camera distance measuring apparatus configured as described above will be described with reference to the flowchart of FIG.
First, a correlation area is designated (S1). Here, the A / D conversion means 4 performs A / D conversion on the data based on the light pattern incident on the sensor array by designating correlation areas as shown by R1 to R3 in FIG.
Correlation is calculated for each sensor pitch by the correlation means 5 in FIG. 6 (S2), and this correlation result S is obtained. Since this value S is a value that depends on the distance of the subject, a rough determination of the subject distance can be made by making a determination based on this value (S3). For example, if it is larger than the predetermined value S1, the subject is considered to be in "short distance", branching to step S16, performing interpolation calculation in the "wide" area (S16), and proceeding to step S11.
[0031]
On the other hand, if the value is equal to or smaller than the predetermined value S1 in step S3, the process proceeds to step S4 to perform interpolation calculation in the “narrow” correlation area. Specifically, first, data (R0 to R4) for measuring a distance in a predetermined narrow area is read from the R side sensor (S4).
Next, reading, which is one of the features of the present invention, is performed. In other words, the data on the L side is not read indiscriminately, but only the data (L1, L2, L3) used in each calculation formula shown in [Formula 3] is input (S5). In this method, since the data is a value that takes into account the correlated shift amount S, the RAM of the microcomputer (CPU) is not wasted more than necessary, and the time required for reading data by serial communication is shortened. it can.
From the data thus read, a calculation based on each equation shown in [Equation 2] is performed to obtain the minimum Fmin and F-1 and F + 1 on both sides (S6 to S8).
[0032]
Next, it is confirmed whether or not there is a difference in the correlation value S by switching the area range between the correlation calculation and the interpolation calculation (S9). In this determination, it is determined whether or not Fmin has a minimum value among Fmin, F-1, and F + 1 obtained by the correlation calculation in steps S6 to S8.
If Fmin is not minimum, the process further branches to step S13 to determine the magnitude relationship between F-1 and F + 1. If F-1 is minimum, S is decreased by one. If it is minimum, the correlation value S is increased by one and S is corrected (S14, S15), and then the process returns to step S3.
[0033]
Subsequently, steps S10 to S12 are steps for performing an interpolation operation (S10) based on the equation shown in the figure, calculating a distance L (S11), and focusing on a subject at the distance L (S12). Note that the above-described calculation of x in step S16 is basically performed in the same manner as in steps S6 to S10 only by obtaining the sensor area over a wide range. However, the processing step S9 for confirming the magnitude of Fmin again is unnecessary.
[0034]
Usually, a one-chip microcomputer uses a
[0035]
Therefore, in contrast to the RAM usage pattern of the conventional distance measuring device shown in FIG. 8A, FIG. 8B illustrates the RAM usage pattern of the present embodiment. As shown in the figure, R0 to R3, L1 + S, L2 + S, and L3 in the present invention, compared with the prior art where much of R0 to R4, L0 to L4 + S,. It can be understood that only the calculation of + S is sufficient and the memory space can be saved, so that the use space of the RAM and the like is greatly reduced.
[0036]
(Operation effect 1)
As described above, according to the present embodiment, the distance measuring device has high speed and high accuracy, that is, the influence of mixing of perspectives is small, and also has the effect of reducing the program in the CPU and the memory space used. Can be provided.
[0037]
(Second Embodiment)
Next, a second embodiment according to the present invention will be described. The distance measuring device of the present embodiment is also implemented in the device configured as shown in FIG. The feature of the present embodiment is one embodiment for dealing with an offset error between the left and right R and L sensor arrays as shown in FIG. 8, and the flowchart of FIG. 9 shows the feature of the present embodiment. The details of typical arithmetic processing are exemplified as described later.
[0038]
FIG. 11 is a graph showing the output of each sensor corresponding to FIG. As illustrated, assuming that L is a reference and R is assumed to have errors of C11, C22, and C33 on each sensor, it is preferable to perform correlation calculation and interpolation calculation after correcting these. However, when this error is small, the correlation calculation with the sensor pitch as “resolution” can be performed accurately. Therefore, in the second embodiment of the present invention, this correction is performed prior to the interpolation calculation, and the interpolation is accurate and the number of correction coefficients is minimized, so that the capacity of the EEPROM for storing the correction can be reduced. . Further, since such an error tends to affect when the distance measurement area is small, the correction coefficient is further reduced by performing the above correction only when the interpolation calculation is performed in a narrow area.
[0039]
Further, as shown in the graph showing the probability of the distance of the person of the main subject shown in FIG. 10A, when a photograph taken in general is analyzed, a person is less likely to be a subject at a distance L1 or more. On the other hand, as shown in FIG. 4, it is not particularly necessary to narrow the area beyond a certain distance L2. Therefore, it is possible to design that the sensor error should be corrected only when the subject located at a distance of L1 to L2 is measured. This rough distance determination can be predicted to some extent by the correlation calculation result S. Therefore, the flowchart shown in FIG. 9 is a specific example designed on the assumption that the correlation value S of the subject at a distance of L1 to L2 takes a value between predetermined S2 and S1.
[0040]
Steps S1 to S5 in FIG. 9 are the same as the flowchart of FIG. 7 of the first embodiment already described. However, for the reason described above, in step S3, control is performed so as to perform distance measurement in a narrow area only when the correlation value S is between S1 and S2 (that is, S2 <S <S1).
Following the reading (S5) of the L side sensor data (LS + 1 to LS + 3) following the reading of the R side sensor data (R0 to R4) (S4), in step S5b, L1 and L2 in FIG. , L3 reference R1, R2, R3 errors C11, C22, C33 and other correction coefficients are read out from the EEPROM.
In steps S6 to S8, errors between Rn, Rn-1, Rn + 1 and Ln (errors which do not result in the same output when the same luminance is given) Cnn, Cn (n-1), In this step, Fmin, F-1, and F + 1 are calculated while correcting Cn (n + 1).
From Fmin, F-1, and F + 1 obtained in this way, x is obtained by interpolation as in step S10 of FIG. 7, and focusing is performed (S12).
[0041]
(Operation effect 2)
With the configuration as described above, the memory capacity of the correction coefficient conventionally required for each of the R and L sensors as shown in FIG. 10B is the same as that shown in FIG. As shown, the memory capacity can be reduced. Therefore, according to this embodiment, the subject distance can be determined using the correlation result S obtained in advance at high speed, and error correction can be performed with emphasis on a person at a predetermined long distance. This makes it possible to reduce the correction program and memory.
[0042]
(Third embodiment)
Next, a third embodiment according to the present invention will be described. The distance measuring device of this embodiment is also implemented in the device configured as shown in FIG. As shown in FIGS. 12 (a) and 12 (b), the feature of this embodiment is that a state in which a part of the distance measurement area deviates from the
In the shooting scene as shown in FIG. 12B, a sensor that is out of the subject has a poor correlation. Therefore, the result of the difference | Rn−Ln + s | corresponds to this subject as shown in the graph of FIG. The value is different compared to the sensor. Utilizing such a principle, in the example of FIG. 12A, the sensor output exceeding the difference Fc between the central sensors R2 and Ls + 2 is removed and interpolation calculation is performed. In order to have such a function, a program having the algorithm of the flowchart shown in FIG. 13 is built in the CPU.
[0043]
Steps S1 to S5 are the same processing steps as those already described. Subsequently, Fmin, F-1, F + 1, etc. for interpolation calculation are initialized to 0 (S20), 2 is substituted for i to select the center sensor (S21), and Ri or R2 Data is read (S22).
The difference Fi is taken (S23), and the obtained difference is set as a difference reference value Fc (S24). Since the sum of the differences for each sensor is Fmin, this is added to Fi (S25).
In subsequent calculation step groups, Ri + 1 and Ri-1 are read in order to obtain F + 1 and F-1, the difference from Li is obtained, and F + 1 and F-1 are calculated (S26-). S29).
[0044]
Next, in steps S30 to S34, first, i is subtracted by 1 (S30), then Ri, Ri + 1, Ri-1 are read for the younger number on the left side of the center (S31), and the difference from Li is calculated. Then, F + 1 and F-1 are calculated respectively (S32). Here, the magnitude relationship with the reference value Fc is determined so that the difference Fi between Ri and Li greatly deviates from the reference value Fc is removed from the target of the calculation process (S34), and the difference is not taken into account. (S33).
[0045]
Similarly, in steps S35 to S40, Ri, Ri + 1, Ri-1 are read (S37) for the sensor i which is incremented by one from the center on the right (S35, S36), and the difference from Li is obtained. , Fmin, F + 1, and F-1 are calculated (S38). Similarly, if the difference Fi between Ri and Li deviates significantly from the reference value Fc, it is removed from the calculation process (S40). In this manner, the magnitude relationship with the reference value Fc is determined (S39).
Interpolation is performed by using Fmin, F-1, and F + 1 for interpolation calculation obtained in this way to obtain x (S10), and then the distance L is obtained and focused (S12). A series of processing ends.
[0046]
(Operation effect 3)
As described above, in the third embodiment, measures are taken for mixed perspective errors, and in the case of a subject other than a person, the distance measurement area can be widened, and the optimum distance measurement area for the subject can be selected for higher accuracy. It is possible to focus on.
[0047]
(Other embodiments)
In the first to third embodiments exemplified above, the case where a hard logic circuit is used as the means for obtaining the correlation amount S in units of sensor pitch has been described as an example, but this means is calculated by a microcomputer using a predetermined program. Even software means can be applied. Therefore, a specific example in this case is shown in a flowchart in FIG. This processing procedure is a process for obtaining the correlation amount S. The minimum value of the FF described in FIG. 2 is represented by “FF1”, and the shift amount on the horizontal axis of the graph is represented by “SFT”. N is an integer representing the sensor number.
[0048]
First, FF1 is initialized to 100 (S51), and SFT, n, and FF are initialized to 0 (S52).
The subsequent steps S53 to S56 are a difference calculation processing loop. That is, the difference FF1 is taken (S53), and the obtained difference is added to the FF (S54). After incrementing the sensor number n by 1 (S55), the repetition of this processing loop is determined by comparison with a predetermined limit number nc (that is, the number of target areas) (S56).
[0049]
When the sum of the differences for each sensor is obtained as FF by the above processing loop, next, FF and FF1 are compared in size (S57). If FF1 is larger, FF is substituted into FF1 (S58). , SFT is substituted into S (S59).
After incrementing SFT by one (S60), the process returns to step S53 and repeats the above steps until a predetermined limit value Smax is reached. When Smax is reached, the process proceeds to step S3 in FIG.
[0050]
(Operation effect 4)
As described above, the means for obtaining the correlation amount can also be realized by software means by the program composed of steps S51 to S61. As is apparent from this flowchart, if the target area number nc for adding the correlation is small, the number of times the process loop is repeated is reduced, and the speed can be increased. Further, since the correct S value can be obtained even if the correlation calculation in pitch units is somewhat rough, higher-speed processing is possible than calculation processing without area switching as shown in FIG.
[0051]
(Other variations)
In addition, the present invention can be variously modified without departing from the above gist as an implementation method.
[0052]
As mentioned above, although demonstrated based on embodiment, the following invention is contained in this specification.
[1] Light receiving means for receiving a subject image by a pair of light receiving element rows having parallax and outputting a pair of subject image signal rows;
Correlation means for receiving the output of the light receiving means and outputting a correlation value of a first portion of the pair of subject image signal sequences;
Only the partial data of the second portion narrower than the first portion of all the subject image signal rows of one of the pair of light receiving element rows and the subject image signal row of the other light receiving element row. A data input means for selectively inputting
Interpolation means for performing a predetermined interpolation calculation based on the input data;
A distance measuring device comprising:
[2] Light receiving means for receiving a subject image by a pair of light receiving element rows having parallax and outputting a pair of subject image signal rows;
Means for dividing the pair of subject image signal sequences into a plurality of blocks having a first number of pixels;
Correlation means for receiving an output of the light receiving means and outputting a correlation value of the pair of subject image signal sequences;
Means for resetting the block to a second number of pixels greater than the first number of pixels if the correlation value satisfies a predetermined condition;
Only the data of the second number of pixels is selectively input from all the subject image signal rows of one of the pair of light receiving element rows and the subject image signal row of the other light receiving element row. Data input means,
Interpolation means for performing a predetermined interpolation calculation based on the input data;
A distance measuring device comprising:
[3] Two line sensors that output two light pattern signals according to the luminance distribution of the subject image observed from different fields of view having parallax;
A pitch difference calculating means for comparing the two light pattern signals and calculating a relative position difference based on a parallax of the subject image in units of an arrangement pitch of the line sensors;
An arithmetic control unit that selects an output signal of the line sensor based on an output result of the pitch difference calculating unit, and calculates a relative position difference between the two light patterns based on the result with a finer accuracy than the sensor pitch. When,
Comprising
The distance measuring device, wherein the pitch difference calculating means is constituted by a hard logic circuit, and the arithmetic control means is constituted by a microcomputer and software.
The following invention is also included.
(1) two line sensors that output two light pattern signals according to the luminance distribution of the subject image observed from different fields of view having parallax;
A pitch difference calculating means for comparing the two light pattern signals and calculating a relative position difference based on a parallax of the subject image in units of an arrangement pitch of the line sensors;
Calculation control means for selecting the output signal of the line sensor based on the output result of the pitch difference calculation means and calculating the relative position difference between the two light patterns based on the result with a finer accuracy than the sensor pitch. When,
A distance measuring device comprising:
(2) The pitch difference calculating means includes a hard logic circuit,
The distance measuring apparatus according to (1), wherein the arithmetic control unit is configured by a microcomputer and software.
(3) The arithmetic control means includes a storage means for storing the line sensor output, and selects one output of the two line sensors based on the output result of the pitch difference calculation means. The distance measuring apparatus according to (1), wherein a control is performed so that a difference from one output is calculated and the result is stored in the storage means.
(4) In the process of calculating the relative position difference between the two light patterns with an accuracy finer than the sensor pitch, the arithmetic control unit compares the difference between the two light patterns, It has a function to judge the output result,
The distance measuring apparatus according to (1), wherein when the output result of the pitch difference calculating means is determined to be incorrect, the output result is changed.
[0053]
(5) Two line sensors that output two light pattern signals according to the accuracy distribution of the subject image observed from different fields of view having parallax, and a relative position based on the parallax of the subject image by comparing the two light pattern signals A pitch difference calculation unit that calculates the difference in units of the arrangement pitch of the line sensors, and a relative position difference between the two light patterns is calculated with a finer accuracy than the pitch based on an output result of the pitch difference calculation unit. A distance measuring device comprising arithmetic control means,
The arithmetic control means selects and outputs the output signals of the two line sensors, and determines a sensor portion for calculating the relative position difference based on the subtraction result. .
(6) comprising means for storing output unbalance correction information of the two line sensors;
The distance measuring apparatus according to (5), further comprising a correcting unit that selects the output imbalance correction information based on the calculated pitch difference and corrects the subtraction result.
(7) two line sensors that output two light pattern signals based on the luminance distribution of the subject image observed from different fields of view having parallax;
A pitch difference calculating means for comparing the first portions of the two light pattern signals and calculating a relative position difference based on the parallax of the subject image in units of a line sensor;
An arithmetic control unit that calculates a relative position difference between the two light patterns according to an output result of the pitch difference calculating unit with an accuracy finer than a pitch of the line sensor;
When calculating the relative position difference with a finer accuracy than the pitch, the arithmetic control unit determines a second portion different from the first portion of the two line sensors based on the pitch difference calculation result. A distance measuring device that selects and compares the output of this portion to calculate the relative position difference.
(8) means for storing output imbalance correction information of the two line sensors;
Correction means for determining whether or not to correct the subtraction result based on the output of the selected second portion for position difference calculation and the output imbalance correction information;
The distance measuring apparatus according to (7), further comprising:
[0054]
In addition, the following inventions are also included.
(1 ′) two line sensors that output two light pattern signals according to the luminance distribution of the subject image observed from different fields of view having parallax;
A pitch difference calculating means for comparing the two light pattern signals and calculating a relative position difference based on the parallax of the subject image in units of the pitch of the line sensor;
According to the output result of the pitch difference calculating means, the output signal of the line sensor is selected, and the arithmetic control means for calculating the relative position difference between the two light patterns with a finer precision than the pitch of the line sensor according to the result;
A distance measuring device comprising:
(2 ′) The distance measuring device according to (1 ′), wherein the pitch difference calculating means is constituted by a hard logic electronic circuit, and the arithmetic control means is constituted by a microcomputer and software. .
(3 ′) The arithmetic control means includes storage means for storing the output of the line sensor, selects one output of the two line sensors based on the output result of the pitch difference calculation means, and The distance measuring device according to (1 ′), wherein a control is performed so as to calculate a difference from the output of the first output and store the result in the storage means.
(4 ′) In the process of calculating the relative position difference between the two light patterns with an accuracy finer than the pitch of the line sensor,
A function of comparing the difference between the two light patterns to determine an output result of the pitch difference calculating means; and if the output result of the pitch difference calculating means is determined to be incorrect, the pitch difference calculating result The distance measuring device according to (1 ′), wherein the distance measuring device is changed.
[0055]
(5 ′) two line sensors that output two light pattern signals according to the accuracy distribution of the subject image observed from different fields of view with parallax;
A pitch difference calculating means for comparing the two light pattern signals and calculating a relative position difference based on the parallax of the subject image in units of the arrangement pitch of the sensors;
In a distance measuring apparatus comprising: an arithmetic control unit that calculates a relative position difference between the two light patterns based on an output result of the pitch difference calculation unit with an accuracy finer than the pitch.
The arithmetic control means selects the output signals of the two line sensors, performs a predetermined subtraction, and determines a sensor portion for calculating the relative position based on the subtraction result. apparatus.
(6 ′) A means for storing output unbalance correction information of the two line sensors is provided, and the output unbalance correction information is selected based on the calculated pitch difference to correct the subtraction result. The distance measuring device according to (5 ′), further comprising a correcting means.
[0056]
(7 ′) two line sensors that output two light pattern signals according to the luminance distribution of the subject image observed from different fields of view having parallax;
A pitch difference calculating means for comparing the first portions of the two light pattern signals and calculating a relative position difference based on the parallax of the subject image in units of the pitch of the line sensor;
In the distance measuring apparatus configured with calculation control means for calculating the relative position difference between the two light patterns with an accuracy finer than the sensor pitch based on the output result of the pitch difference calculation means,
When the relative position difference is calculated with an accuracy finer than the pitch of the line sensor, the arithmetic control unit is different from the first part of the two line sensors based on the pitch difference calculation result. A distance measuring device, wherein a second part is selected, and the position difference is calculated by comparing outputs of the two parts.
(8 ′) Further comprising means for storing output unbalance correction information of the two line sensors, and using the output unbalance correction information based on the selected second portion for calculating the position difference, The distance measuring apparatus according to (7 ′), further comprising a correcting unit that determines whether or not to correct the subtraction result.
[0057]
【The invention's effect】
As described above, according to the present invention, it is possible to appropriately switch the distance measurement range of the passive type distance measuring device and perform high-speed calculation processing without measuring an unnecessary area of the subject. A distance measuring device can be provided, and by this application, it is possible to provide a photographing device such as a camera or a video that can perform accurate focusing at high speed.
In addition, as an electronic system capable of high-speed and high-precision distance measurement, it is possible to provide a distance measurement device for a camera or the like that can be configured even with a small memory capacity and a small storage capacity of a program.
[Brief description of the drawings]
FIG. 1 is a configuration diagram showing a basic structure of a distance measuring apparatus according to an embodiment of the present invention.
2 (a) to 2 (d) show the calculation principle of distance measurement according to the present invention;
(A) is a graph showing the relationship between the focus and the shift amount;
(B) is a graph showing the signal output for each sensor portion of the right sensor R;
(C) is a graph showing the signal output for each sensor portion of the left sensor L,
(D) is a graph showing the relationship between the left and right sensor outputs and the outputs of adjacent sensor portions.
FIGS. 3 (a) to 3 (c) show a procedure consisting of correlation calculation and interpolation calculation;
(A) is a flowchart showing a processing procedure by hardware;
(B) is a flowchart showing a processing procedure by software;
(C) is a flowchart showing a processing procedure by a combination of hardware and software.
FIG. 4 is a conceptual diagram showing a positional relationship between a line sensor and a subject.
FIG. 5 is a circuit diagram showing a hard logic circuit as correlation means of the distance measuring device.
FIG. 6 is a block diagram showing in detail the structure of the distance measuring device of the present invention.
FIG. 7 is a flowchart showing a correlation calculation processing procedure according to the first embodiment of the distance measuring apparatus;
8 (a) and 8 (b) show a comparison of calculation areas used in the prior art and the present invention;
(A) is a conceptual diagram showing an area where the conventional method is used;
(B) is a conceptual diagram which shows the area used with this distance measuring device.
FIG. 9 is a flowchart showing a correlation calculation processing procedure according to the second embodiment of the distance measuring apparatus;
10 (a) to 10 (c) show a graph relating to a subject and an area for storing errors (correction values) of the conventional and the left and right sensors of the present invention in comparison with each other;
(A) is a graph showing the probability when the subject is a person,
(B) is a conceptual diagram showing an area of correction coefficients used in the conventional method;
(C) is a conceptual diagram which shows the area used with this distance measuring device.
FIG. 11 is a graph showing the output of each sensor corresponding to FIG.
FIGS. 12A and 12B show the outputs of the reference right sensor and the left and right sensors,
(A) is a graph showing the output and difference of the left and right sensors,
(B) is explanatory drawing which shows the positional relationship between the sensor unit of the right sensor used as a reference, and the subject.
FIG. 13 is a flowchart showing a processing procedure of interpolation calculation as a third embodiment of the distance measuring apparatus;
FIG. 14 is a flowchart illustrating a correlation calculation processing procedure according to another embodiment of the distance measuring apparatus;
FIG. 15 is a diagram illustrating [Equation 1] representing an output of each left sensor portion when a deviation amount of light is incident on the left sensor with the right sensor as a reference;
FIG. 16 is a diagram illustrating [Expression 2] based on a difference between right and left sensors;
FIG. 17 is a diagram illustrating [Expression 3] in which [Expression 2] is further developed.
FIG. 18 is a diagram showing [Expression 4] representing the relationship between the minimum value Fmin obtained by interpolation calculation and the SIFT amount;
[Explanation of symbols]
1a, 1b ... lenses (for sensors),
2a, 2b ... line sensors,
3a, 3b ... signal output waveform,
4 A / D converter,
5 ... operation part (correlation means),
6 ... Subject,
7 ... Output section,
8 ... Shutter
9… EEPROM,
10: Control means (CPU),
12 ... Feeding means,
13 ... Zoom lens,
14: Register for calculation,
15 ... RAM,
16 ... ROM,
17 ... calculation means,
18: Register (general purpose),
19 ... Port.
S1 to S16 ... processing steps of the first and second embodiments of the present invention,
S1 to S40: processing steps of the third embodiment of the present invention,
S51 to S61 ... processing steps of other embodiments of the present invention,
S101 to S104 ... hardware processing steps,
S105 to S108: Calculation processing steps by software,
S109 to S113: Arithmetic processing steps by hardware and software.
Claims (3)
前記受光手段の出力を受け、前記一対の被写体像信号列の第1の部分の相関値を出力する相関手段と、
前記一対の受光素子列のいずれか一方の受光素子列の全部の被写体像信号列および、他方の受光素子列の被写体像信号列のうち、第1の部分より狭い第2の部分の部分的データのみを選択的に入力するデータ入力手段と、
当該入力されたデータに基づいて所定の補間演算を行う補間手段と、
を具備することを特徴とする測距装置。Light receiving means for receiving a subject image by a pair of light receiving element rows having parallax and outputting a pair of subject image signal rows;
Correlation means for receiving the output of the light receiving means and outputting a correlation value of a first portion of the pair of subject image signal sequences;
Partial data of a second portion narrower than the first portion of all the subject image signal rows of one of the pair of light receiving element rows and the subject image signal row of the other light receiving element row Data input means for selectively inputting only,
Interpolation means for performing a predetermined interpolation calculation based on the input data;
A distance measuring device comprising:
前記一対の被写体像信号列を第1の画素数を有する複数のブロックに分割する手段と、
前記受光手段の出力を受け、前記一対の被写体像信号列の相関値を出力する相関手段と、
前記相関値が所定の条件を満たす場合、前記ブロックを第1の画素数よりも小さい第2の画素数に再設定する手段と、
前記一対の受光素子列のいずれか一方の受光素子列の全部の被写体像信号列および、他方の受光素子列の被写体像信号列のうち、前記第2の画素数のデータのみを選択的に入力するデータ入力手段と、
当該入力されたデータに基づいて所定の補間演算を行う補間手段と、
を具備することを特徴とする測距装置。Light receiving means for receiving a subject image by a pair of light receiving element rows having parallax and outputting a pair of subject image signal rows;
Means for dividing the pair of subject image signal sequences into a plurality of blocks having a first number of pixels;
Correlation means for receiving an output of the light receiving means and outputting a correlation value of the pair of subject image signal sequences;
Means for resetting the block to a second number of pixels smaller than the first number of pixels if the correlation value satisfies a predetermined condition;
Only the data of the second number of pixels is selectively input from all the subject image signal rows of one of the pair of light receiving element rows and the subject image signal row of the other light receiving element row. Data input means,
Interpolation means for performing a predetermined interpolation calculation based on the input data;
A distance measuring device comprising:
前記二つの光パターン信号を比較して前記被写体像の視差に基づく相対位置差を前記ラインセンサの配列ピッチの単位で算出するピッチ差算出手段と、
前記ピッチ差算出手段の出力結果に基づいて、前記ピッチ差算出手段における比較に使用した前記ラインセンサの出力する光パターン信号のうちの一部を選択し、この選択した光パターン信号に基づき前記被写体像の視差に基づく相対位置差を前記ラインセンサの配列ピッチよりも細かい精度にて算出する演算制御手段と、
を具備し、
前記ピッチ差算出手段はハードロジック回路で構成され、前記演算制御手段はマイクロコンピュータ及びソフトウェアで構成されていることを特徴とする測距装置。Two line sensors that output two light pattern signals according to the luminance distribution of the subject image observed from different fields of view with parallax;
A pitch difference calculating means for comparing the two light pattern signals and calculating a relative position difference based on a parallax of the subject image in units of an arrangement pitch of the line sensors;
Based on the output result of the pitch difference calculating means, a part of the light pattern signal output from the line sensor used for comparison in the pitch difference calculating means is selected, and the subject is selected based on the selected light pattern signal. Calculation control means for calculating a relative position difference based on parallax of the image with an accuracy finer than an arrangement pitch of the line sensors;
Comprising
The distance measuring device, wherein the pitch difference calculating means is constituted by a hard logic circuit, and the arithmetic control means is constituted by a microcomputer and software.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP31341296A JP3847390B2 (en) | 1996-11-25 | 1996-11-25 | Ranging device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP31341296A JP3847390B2 (en) | 1996-11-25 | 1996-11-25 | Ranging device |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH10153409A JPH10153409A (en) | 1998-06-09 |
JP3847390B2 true JP3847390B2 (en) | 2006-11-22 |
Family
ID=18040980
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP31341296A Expired - Fee Related JP3847390B2 (en) | 1996-11-25 | 1996-11-25 | Ranging device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3847390B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100424579C (en) * | 2004-03-08 | 2008-10-08 | 普立尔科技股份有限公司 | The Fast Focusing Method of Digital Camera |
JP2011170038A (en) * | 2010-02-17 | 2011-09-01 | Nikon Corp | Correlation calculation device, correlation calculation method, focus detector and imaging device |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0715533B2 (en) * | 1988-01-27 | 1995-02-22 | 富士電機株式会社 | Relative position detection method for image pairs |
JP3197979B2 (en) * | 1993-04-19 | 2001-08-13 | 富士フイルムマイクロデバイス株式会社 | Phase difference distance detecting apparatus and method |
JPH06308377A (en) * | 1993-04-23 | 1994-11-04 | Fuji Film Micro Device Kk | Phase difference type distance detection device using both-phase shift type sensor |
JPH0763552A (en) * | 1993-08-27 | 1995-03-10 | Omron Corp | Photoelectric switch |
JPH0798429A (en) * | 1993-09-28 | 1995-04-11 | Fuji Film Micro Device Kk | Range finder |
JPH07110436A (en) * | 1993-10-13 | 1995-04-25 | Fuji Film Micro Device Kk | Range-finding device |
-
1996
- 1996-11-25 JP JP31341296A patent/JP3847390B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH10153409A (en) | 1998-06-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5995144A (en) | Automatic focusing device using phase difference detection | |
JP3491343B2 (en) | Focus detection device and focus detection method | |
JP3847390B2 (en) | Ranging device | |
JP2881995B2 (en) | Object detection device for optical instruments | |
JP4641502B2 (en) | Focus detection apparatus and optical instrument | |
JP2676953B2 (en) | Video position detector | |
JP3806473B2 (en) | Ranging device | |
JP4817552B2 (en) | Phase difference detection method, phase difference detection device, distance measuring device, and imaging device | |
JP4632640B2 (en) | Ranging device | |
JP3938989B2 (en) | Ranging device | |
JPH0693059B2 (en) | Focus detection device | |
JP3798866B2 (en) | Ranging device | |
JP3414500B2 (en) | Focus detection device | |
JP6532411B2 (en) | IMAGE PROCESSING DEVICE, IMAGING DEVICE, AND IMAGE PROCESSING PROGRAM | |
JP2002250857A (en) | Range finder | |
JP5065466B2 (en) | Focus detection apparatus and optical instrument | |
JP2005250296A (en) | Focusing device and focusing method | |
JPH06103182B2 (en) | Focus detection device | |
JP3211280B2 (en) | Focus detection device | |
JPH09243358A (en) | Passive type range finder | |
JP3427215B2 (en) | Camera TTL metering device | |
JP4069476B2 (en) | Camera with focus detection device | |
JP3233435B2 (en) | Distance measuring device | |
JPH0234004B2 (en) | ||
JP2001305423A (en) | Range finder |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20050714 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060523 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060719 |
|
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: 20060815 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20060823 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090901 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100901 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110901 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120901 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130901 Year of fee payment: 7 |
|
LAPS | Cancellation because of no payment of annual fees |