JP4517449B2 - Correlation calculation method for images - Google Patents

Correlation calculation method for images Download PDF

Info

Publication number
JP4517449B2
JP4517449B2 JP2000136694A JP2000136694A JP4517449B2 JP 4517449 B2 JP4517449 B2 JP 4517449B2 JP 2000136694 A JP2000136694 A JP 2000136694A JP 2000136694 A JP2000136694 A JP 2000136694A JP 4517449 B2 JP4517449 B2 JP 4517449B2
Authority
JP
Japan
Prior art keywords
image
layer
correlation calculation
area
correlation
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 - Lifetime
Application number
JP2000136694A
Other languages
Japanese (ja)
Other versions
JP2001319229A (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.)
Toyota Central R&D Labs Inc
Original Assignee
Toyota Central R&D Labs Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toyota Central R&D Labs Inc filed Critical Toyota Central R&D Labs Inc
Priority to JP2000136694A priority Critical patent/JP4517449B2/en
Publication of JP2001319229A publication Critical patent/JP2001319229A/en
Application granted granted Critical
Publication of JP4517449B2 publication Critical patent/JP4517449B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Measurement Of Optical Distance (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、1 対のカメラにより物体を撮像し、その画像間のずれ量(視差)によりカメラから物体までの距離分布、又は物体を形成する面の面方向を検出する相関演算方法に関する。特に、画像を多重解像度化して物体までの距離分布を効率よく高速に算出する相関演算方法に関する。
本発明は、例えば車輌に搭載され車輌周囲の物体までの距離分布を高速に高密度に算出する距離分布検出装置に適用される。
【0002】
【従来の技縮】
従来から、画像処理を利用した物体認識装置がある。例えば、特開平5−265547号公報に開示の車輌用車外監視装置はその一つである。それは、車輌に2台のカメラを搭載し、リアルタイムに物体を撮像して2画面の画像をステレオ照合処理することにより物体の位置、大きさ、距離を認識するシステムである。
所定の離間距離で配置された2台のカメラが前方の物体を撮像すれば、物体は左右の画像でX方向にずれて撮像される。これは、2台のカメラに視差が生じるためである。そして、その物体がカメラ近傍にあればその視差は大きくなり、遠方にあればその視差は小さくなる。ステレオ照合処理は、この原理を利用して物体との距離を検出する手法である。
【0003】
従来の距離分布測定の手順を簡単に説明する。従来の距離分布測定は、先ず2台のカメラからそれぞれ物体の画像を入力し、それをA /D 変換してデジタル化された画像データ(左右画像)とする。次に、左右画像から例えば4×4の小領域を切り出して相関演算を行い上記小領域の視差を求める。視差は、小領域間の例えばx方向へのずれ量である。このずれ量により、カメラから物体を構成する小領域までの距離、即ち物体までの距離が求められる。カメラの離間距離をB、焦点距離をf、ずれ量を△X画素とすればその物体までの距離zは次式で表される。この距離を小領域毎に求め、物体までの距離分布即ち物体形状や姿勢を算出していた。
【数1 】
z=f・B/α△X
α=撮像素子の1画素の大きさ ・・・(1)
【0004】
【発明が解決しようする課題】
しかしながら、特開平5−265547号公報に開示の車両用車外監視装置は、与えられた画像の全域に対して所定の領域(例えば4×4画素)で照合演算を行っていた。この場合、4画素置きに照合しているが高密度(1画素置き)照合にした場合はその演算量が膨大となり、例えば車載してリアルタイムで距離を検出するには適するものではなかった。
一般に、差分絶対値和を用いた画像間の相関演算において、画像サイズを縦H,横V、照合領域のサイズを縦M,横N、探索範囲をDとすれば、相関Sは次式で与えられる。これは、画像サイズ、照合領域サイズ、探索範囲に比例して演算量が膨大になることを意味している。
【数2】
S=ΣH y=0 ΣV x=0 ΣD d=0 ΣM m=0 ΣN n=0
|Fr (x+m 、y+n )−Fl (x+m +d、y+n )|・・・・・・(2)
但し、F(x、y)は座標(x、y)における画素強度であり、Fr は右画像、Fl は左画像を意味する。
【0005】
本発明は上述した問題点を解決するためになされたものであり、その目的は物体画像を多重解像度化された階層画像に変換し、その各階層画像間の相関から次段の階層画像間の相関演算パラメータを確定することにより、物体までの距離分布を高速に高密度に得るとともに物体を形成する面の面方向を正確に求めることである。
【0006】
【課題を解決するための手段】
この目的を達成するために請求項1に記載の物体認識装置によれば、複数の撮像装置により物体を撮像し、得られた一方の画像から複数の小領域画像を切り出し照合領域とし、各照合領域と他方との画像との相関演算により前記撮像装置から前記物体までの距離分布及び該物体を形成する面の面方向を検出する画像における相関演算方法であって、前記複数の画像に対してそれぞれ解像度の異なる複数の画像を生成し、解像度別に、階層の指数を示すN値が変化するに従ってその層の解像度とその面積が一様に変化するピラミッド構造の階層構造に画像を形成する多重解像度画像生成手段を備え、N,Mを整数とする時、N層間の相関演算によって前記各照合領域に対する各視差を求め、該各視差に基づいてM層の相関演算に対する照合領域とその探索領域を確定し、その確定された各照合領域と各探索領域で前記相関演算を行うことによって前記物体までの距離分布を求め、前記ピラミッド構造を形成する各層において、隣接する層の上位層の相関演算によって得られた結果よりその下位層の相関演算に対する前記照合領域と前記探索領域を算出し、それを逐次下位層に向かって繰り返すことによって最終的に前記ピラミッド構造の底面である第0層で前記相関演算を行い、前記各階層毎の演算により得られた距離分布から3点が選択できる階層の距離分布から、3点を選択して、その3点を通る平面方程式を決定し、その平面方程式から、前記物体を形成する面の面方向を検出することを特徴とする画像における相関演算方法である。
【0007】
また、請求項2に記載の画像における相関演算方法によれば、選択された3点に対応する第0階層の画像の3点を求め、その第0画像の3点から、その3点を通る平面方程式を決定し、その平面方程式から、物体を形成する面の面方向を検出することを特徴とする。
【0008】
【0009】
又、請求項3に記載の画像における相関演算方法によれば、相関演算による相関の有無は、照合領域の画像と探索領域の画像間の差分絶対値和による相関最小値又は/及びその相関最小値を頂点とする頂角関連値で決定されることを特徴とする。
又、請求項4に記載の画像における相関演算方法によれば、各層の画像はエッジ画像であり照合領域はそのエッジ画像上に設定されることを特徴とする。
【0010】
【発明の作用及び効果】
請求項1に記載の物体認識装置によれば、複数の撮像装置が物体を撮像して複数の画像を得る。そして、それらの画像を多重解像度画像生成手段によって、それぞれ解像度の異なる複数の画像を生成し解像度別に階層構造に画像を形成する。
この解像度の異なる複数の画像は、例えば所定領域内の画素強度の平均化、ガウシアンピラミッド(原画像のガウシアンフィルタによるサブサンプリング変換)、ウェーブレット変換(空間周波数別に画像を分解)等で行われる。
この時、例えば第0層が最も解像度の高い原画像であり、上位層に行くに従って解像度の低い低解像度画像となる。
【0011】
そして、任意のN層の画像から小領域画像を切り出し照合領域とし、その照合領域を他方のN層の画像に対してX方向に沿って相関演算を行う。即ち、N層間の相関演算を行い、N層画像上に設定された各照合領域に対する各視差を求める。そして、その各視差に基づいてM層間の相関演算に対する照合領域とその探索領域を確定する。次いで、その確定された各照合領域と各探索領域でM層間の相関演算を行なう。即ち、M層の画像により物体までの距離分布と物体を形成する面の面方向が検出される。尚、この時N≠Mであり、NとMは連続していてもよいし離散していてもよい。
【0012】
ここで、N層を低解像度画像としM層を高解像度画像とする。N層の画像は、低解像度で且つその面積が小であるので、高速に画像間の相関演算が終了する。即ち、次処理であるM層間の相関演算に対する照合領域と探索領域が速かに算出され、確定される。即ち、M層間の相関演算での非相関領域での演算が省略される。即ち、効率よくM層間の相関演算が行われる。又、M層の画像はN層画像より高解像度であるので、物体までの距離分布が密に算出される。即ち、本発明の画像における相関演算方法を用いれば、高速、高密度に物体までの距離分布が算出できる。又、その距離分布から物体を形成する面の面方向も高速に高密度に算出される。
【0013】
又、本発明の物体認識装置によれば、階層構造は階層の指数を示すN値が変化するに従ってその層の解像度とその面積が一様に変化するピラミッド構造である。
例えば、N=0である第0層が原画像で最も解像度が高く、N値が増すに従って解像度が低くなりその面積が小となる。数層上の低解像度画像は、ピラミッド構造であるのでその処理面積(相関演算処理)は線形的に小となり高速に物体までの距離分布が算出される。
又、例えば物体が複雑形状であれば、上位層(N層)での相関演算を行う。そして、その結果からその下位層(M層)の照合領域と探索領域を確定する。ピラミッド構造であるので、照合領域と探索領域が容易に線形的に確定できる。よって、M層での相関演算がより高速に効率よく処理することができる。よって、高速に物体までの距離分布を高密度に求めることができる。
【0014】
又、本発明の物体認識装置によれば、ピラミッド構造を形成する各層において、隣接する層の上位層の相関演算によって直下の下位層の相関演算に対する照合領域と探索領域を算出する。それを逐次行う。即ち、ピラミッド構造の頂点側の所定の層から下方にむかって逐次その下層の照合領域と探索領域が確定されて相関演算が行われる。これが、最終層まで繰り返される。
即ち、最終的にピラミッド構造の底面である第0層での相関演算が行われ、その結果から物体までの距離分布、又は物体を形成する面の面方向が算出される。
このように、解像度と画像の面積をピラミッド構造に形成し、低解像度層(上位層)から高解像度層(下位層)へと逐次、照合領域と探索領域が更新されて相関演算が行われるので効率的であるとともに確実に物体までの距離分布を求めることができる。又、その距離分布より物体を形成する面の面方向も確実に算出することができる。
【0015】
又、請求項3に記載の物体認識装置によれば、相関の有無の決定に対して先ず照合領域の画像と探索領域の画像間の差分絶対値和が求められる。そして、それによる相関最小値又は/及びその相関最小値を頂点とする頂角関連値によって相関の有無が決定される。
ここで、頂角関連値とは、極小点とその両側の点で形成される頂角、頂角を形成する辺の傾き、又は頂角を含んで形成された多角形の面積等である。
【0016】
例えば相関の有無は、相関演算結果の多数の極小値に対して吟味する。極小値が所定の閾値を大きく下回れば相関有りと判定し、照合領域と探索領域の離間距離を視差とする。
又、例えば相関最小値の候補が複数あれば、その極小値を含む上記頂角関連値を吟味する。頂角がより鋭角であればそれを相関最小値として、上記視差を求める。逆に、全ての極小値が所定の閾値より大きければ相関無しと判定する。
このように、相関の有無を相関最小値又は/及びその相関最小値を頂点とする頂角関連値で決定しているので、精度よく視差即ち物体までの距離分布と物体を形成する面の面方向が算出される。
【0017】
又、請求項4に記載の画像における相関演算方法によれば、その画像はエッジ画像であり照合領域はそのエッジ画像上に設定されることを特徴とする。
エッジ画像は、例えばソーベル演算処理等によって得られるものであり、それにより物体の輪郭、稜及び物体を構成する各領域間の境界が強調される。そして、上記照合領域がそのエッジ上に設定されて、上記相関演算処理が行われる。上記照合領域は画像の全領域ではなく上記エッジ画像上にのみ設定されるので、相関演算量が著しく低減される。これにより、物体までの距離分布と物体の面方向を更に高速に求めることができる。
【0018】
【発明の実施の形態】
(第1実施例)
図1に、本発明の画像における相関演算方法が適用される1実施例を示す。図は、距離分布算出装置のシステム構成図である。このシステムは、所定の離間距離で配置されたカメラ10,11、カメラ10,11から送出される映像信号を高速A/D変換し、その解像度を多重にして階層構造の画像を生成する多重解像度画像生成手段である多重解像度生成部20、多重解像度生成部20によって生成された各層の画像をエッジ画像に変換する空間フィルタ部30、空間フィルタ部30によってエッジ化された各層をステレオ照合する相関演算部40、相関演算部40の結果から距離分布を算出する距離分布算出部50、そして距離分布算出部50から得られた各距離データから面方向を算出する面方向推定部60から構成される。
ここでは、相関演算部40は各層画像に対してステレオ照合を行うステレオ照合部41i(i=0・・・n)で構成され、同一指数の層間でステレオ照合が行われるものとする。尚、画像間の相関演算とステレオ照合は同一意味である。以降、各層の画像間の相関演算をステレオ照合と記す。
【0019】
又、上記多重解像度生成部20、空間フィルタ部30、相関演算部40、距離分布算出部50及び面方向推定部60は、図示しないCPUと演算処理プログラムが書かれた図示しないROM及び作業領域メモリである図示しないRAMから構成される。上記要素は、図示しない各種信号線からなるシステムバスより接続されており、上記CPUとROMに書かれた各種プログラムによってデータが授受されコントロ−ルされる。
【0020】
図2に、本実施例の画像における相関演算方法の基本動作を示す。図は、フローチャートである。これにより、物体までの距離分布と物体を形成する面の面方向が高速に高密度に算出される。
先ず、図示しない開始スイッチにより上記プログラムがONされ、ステップs100から実行される。ステップs100で、撮像装置であるカメラ10,11をONして物体画像を撮像し、ステップs110でその入力画像をA/D変換して図示しないフレームメモリに取り込む。フレームメモリは、複数のRAMから構成されるものであり、その1単位(1枚)はCCD撮像素子の各画素に対応した例えば総数512×512のRAMである。任意の画素は座標(x、y)と強度Fで表され、その強度Fは例えば0〜255段階に階調化される。以降、この階調化された画像を画像データと呼ぶ。又この時、画面の左上角がxy座標系の原点であり、水平方向にX軸、垂直方向にY軸を設定する。
【0021】
次にステップs120に移行する。ステップs120では、上記多重解像度画像生成部20によって画像が多重解像度化され、階層構造でRAMに格納される。ここでは、原画像を最も解像度の高い高解像度画像とし、これをベースとして複数の解像度で画像が階層的に形成される。これらは、例えば特定の1画素の周囲画素を平均化して1画素とする領域内の平均化法、ガウシアンピラミッド、ウエーブレット変換等によって形成される。
【0022】
図3に、平均化法を上層に向かって逐次行い画像を解像度別に構成した例を示す。第0層の最下位層が原画像である。例えば、原画像のサイズを512×512とすれば図においてL=9であり、最上層(初期層)はN=3で表わされる。
具体的には、この原画像を次式に従って逐次圧縮することによって形成される。
【数3】
N (x、y)=1/4〔FN-1 (x、y)+FN-1 (x+1、y)+FN-1 (x、y+1)+FN-1 (x+1、y+1)〕 ・・・・・(3)
ここで、FN (x、y)はN層の座標(x、y)における各画素強度である。
上式は、原画像が上位層に行くに従って縦、横ともに1/2に圧縮する場合である。即ち、面積は1/4ずつ圧縮される。これは、又解像度もそれに比例して低下することを意味する。第0層〜第3層に階層化された画像の一例を図4に示す。
【0023】
次いで、ステップs130に移行する(図2)。ステップs130では、各層が空間フィルタ処理される。これは、各画像の濃度変化を強調して処理を簡単化するためである。空間フィルタは、例えば1次微分、2次微分による画像の先鋭化である。例えば、1次元微分を用いれば物体がエッジ画像化される。エッジ画像とは、例えば、前方の物体の輪郭画像であり物体を構成する面と面の境界線画像である。次いで、ステップs140に移行する。
【0024】
ステップs140では、エッジ化された画像に対して各層間においてステレオ照合が行われる。ステレオ照合は2画像間の一致点を探索する相関演算である。
図5に、各層におけるステレオ照合の一般フローを示す。先ず、ステップs141では演算量を最小にするため、何れか一方のエッジ画像上に照合領域であるブロックを設定する。そして、そのブロックを用いて他方のエッジ画像との差分絶対値を取る。即ち、差分絶対値和によるブロック相関が行われ、その結果複数の対応点候補(以下、視差候補)が得られる。視差候補とは上述の式(2)で求められる相関値の複数の極小点である。
尚、ステップs141において初回のN層に対するステレオ照合(ブロック相関)に対しては、上記照合領域はROM上に与えられた所定値であり、探索領域は所定層の水平方向の全てである。2回目以降のM層に対するステレオ照合に対しては、ステップs144に詳述する様に更新された上記照合領域と探索領域が使用される。次いで、ステップs142に移行する。
【0025】
ステップs142では、ステップs141で得られた視差候補が所定の条件を満たすか否かが判定される。即ち、各視差の信頼度が評価される(信頼度評価)。信頼度評価は、1つは各視差候補の各相関値と基準相関値(sCorr)との比較である。又、他の1つはその視差候補の頂角関連値である各相関勾配値と基準相関勾配値(sGrad)との比較である。この両者又は何れか一方で信頼度を評価する。次いでステップs143に移行し、評価度の最も高い視差候補をその層における視差とする(視差の決定)。次いでステップs144に移行する。
【0026】
ステップs144では、そのN層の視差を用いて他層(M層)の照合領域と探索領域を更新する。解像度画像はピラミット構造であるので、M層を探索する場合はその照合領域はそのピラミッド構造の傾斜に応じて決定される。例えば、照合領域がブロック形状であればそのブロックの各辺が線形係数によって所定倍されてM層の照合領域として更新される。
【0027】
又、他層であるM層の探索領域も上記ステレオ照合の結果(視差)とピラミッド構造の線形係数により、概略その位置が確定される。例えば、M層をN層の次層とする。即ち、M=(N−1)とする。N層と(N−1)層における探索領域の関係を図6に示す。これは、N層の画像サイズを(N−1)層に規格化したものである。即ち、N層の画像を(N−1)層の画像に合致する様に拡大したものである。ここで、SN が第N層の照合領域であり、SN-1 が第(N−1)層のそれである。第N層は圧縮されているので、規格化されると(N−1)層の照合領域により拡大される。例えば、4倍に拡大される。換言すれば、N層では大きい照合領域でステレオ照合されて視差が概略求められることになる。
【0028】
又、S’N はN層でのステレオ照合による一致領域である。即ち、信頼度が大と判定された合致領域である。これにより、視差dN が概略決定される。そして、この概略視差dN を用いて(N−1)層のステレオ照合における探索領域が更新される。即ち、領域TN-1 が(N−1)層のステレオ照合における探索領域となる。この時、領域TN-1 のx方向の幅Tx (N-1) は次式で与えられる。
【数4】
N −△dN ≦Tx (N-1) ≦dN +△dN ・・・・・・・・(4)
△dN :N層に固有の定数
N :第N層の視差
【0029】
これは、換言すれば(N−1)層を(4)式の範囲でステレオ相関すれば、合致領域が容易に求まることを意味する。即ち、水平方向に全ての領域に渡って探索する必要がない。即ち、処理時間が大幅に短縮されることを意味する。
従って、(N−1)層では、上記探索領域で同様のステレオ照合が行われ、より詳細により高速に視差dN-1 が求められる。又、その視差dN-1 も当然に次式を満たす。
【数5】
N −△dN ≦dN-1 ≦dN +△dN ・・・・・・・・(5)
N-1 :第(N−1)層の視差
M層を次層とした場合は、このようにステップs144でその照合領域と探索領域が設定される。
【0030】
次いでステップs150に移行する(図2)。ステップs150では、上述の式(1)に基づいて距離が算出される。例えば、照合領域はM層では多数に分割されて、その各々の視差に対して距離が算出される。即ち、距離分布が求められる(距離分布出力)。次いで、ステップs160に移行する。
ステップs160では、ステップs150で得られた距離分布、即ち複数の距離データを用いて平面方程式aX+bY+cZ=0の係数を求める。例えば、最小2乗法等で求める。これにより、物体を形成する面の面方向が算出される。
【0031】
上述の様に本実施例によれば、得られた画像を解像度多重化して上層の低解像度画像で概略の視差を得、それに基づいて他層の照合領域と探索領域を決定しているので、効率よくステレオ照合が行われ、その結果高速に高密度に物体までの距離分布を求めることができる。又、その距離分布を用いて物体を形成する面の面方向を求めることができる。
【0032】
(第2実施例)
第1実施例の画像における相関演算方法は、多重解像度画像の任意層のN層とM層、特にM=N−1層に関連した相関演算方法であった。例えば、N=1であれば、1層でステレオ照合を行いその結果に基づいて第0層(原画像)で更にステレオ照合を行って、物体までの距離分布等を算出する例であった。
本実施例は、上記概念を拡張して複数層を用いて距離分布等を算出する例である。即ち、第1実施例の手法を複数回繰り返すことによって、更に効率よく高速に距離分布等を算出する例である。
【0033】
図7に、ピラミッド構造に形成した多重解像度画像を第3層から下方に向かって第0まで処理する相関演算方法を示す。図は、フローチャートである。これは、第1実施例の図2におけるステップs140とステップs150の1例でもある。他のステップs100〜s130までは同一であるので省略する。
先ず、ステップs170で第3層間のステレオ照合を行う。ステップs170は、第1実施例の図5に示したステップs141〜ステップs144と同等である。即ち、第1実施例と同様にエッジ画像に対するブロック相関である。これにより、所定のブロックに対して視差が得られる。そしてステップs171に移行し、視差が距離に換算される。
【0034】
次いでステップs172において、そのブロックにおける距離算出がチェックされる。距離算出のチェックは、第1実施例の信頼度評価に相当する。即ち、信頼度(例えば、相関値)が所定値より大きければ合致領域であるとしてyes、即ちステップs173に移行する。
信頼度が所定値より小さければ合致領域無しとしてno、即ちステップs190に移行する。ステップs190では、最終ブロックか否かがチェックされて、次のブロックに移行するか又は終了する。
【0035】
ステップs173では、第2層間においてステレオ照合が行われる。この時、照合領域と探索領域は第3層の処理(ステップs144)で既に更新されている。従って、新たに、例えば水平方向に全面に探索(相関演算)する必要がない。よって、極めて短時間にステレオ照合が実行され第2層の視差が算出される。そしてステップs175で同様にその視差から距離が算出され、ステップs176で同様にその信頼度が判定される。
ステップs170による第3層でのステレオ照合結果(距離画像)を図8(a)にステップs173による第2層でのそれを図8(b)に示す。図8(a)のa〜fが相関演算で合致した(距離が算出された)各ブロックである。第2層では、その各ブロックが4分割されてより詳細な距離分布が得られている。
【0036】
上記1連の処理(ステップs173〜ステップs176)と同様の処理が第1層に対しても繰り返される。即ち、ステップs177〜ステップs180がそれである。そして、最後にステップs181で第0層に対してステレオ照合を行なって更に詳細な視差を得て、ステップs183で更に詳細な距離分布を得る。
このようにして、第3層から第0層に向かって逐次ステレオ照合が行われ、効率的に又確実に部物体までの距離分布が算出される。次いで、第1実施例と同様にステップs160に移行して物体を形成する面の面方向を推定する。
【0037】
尚、上記のように距離分布が逐次算出される場合は第0層での距離分布の結果を待たずに、以下の処理で面方向を推定してもよい。面方向推定方法を図9のフローチャートに示す。
ステップs200で第2層でのステレオ照合結果から距離画像を読み出す。第2層の距離画像は、図8(b)のように4分割されより詳細に算出されている。次いで、ステップs201に移行する。ステップs201では、その距離画像に3つ以上データがあるか否かチェックする。3データ以上あれば面が特定されるのでステップs205に移行し、上述のように平面方程式に当てはめ平面を決定する。3データ以下であれば、平面が特定できないのでステップs202に移行する。
【0038】
ステップs202では第1層の距離画像を読み出す。第1層の距離画像は、図示はしないが16分割されより詳細に算出されている。次いで、ステップs203に移行する。ステップs203では、その距離画像に3つ以上データがあるか否かチェックする。3データ以上あれば、同様に面が特定されるのでステップs205に移行し平面を決定する。3データ以下であれば、平面が特定できないのでさらにステップs204に移行する。
【0039】
ステップs204では、第0層の距離画像を読み出す。この距離画像は、原画像に対してステレオ照合が行われた結果である。又、その領域は64分割されている。この領域に3つ以上データがあればステップs205に移行し、以下であればステップs207に移行する。ここでのデータは、最も精度の高い距離画像であるので、ステップs205では最も精度の高い面方向が得られる。次いでステップs207に移行する。
【0040】
ステップs207では、第2層において全てのブロックに対して面方向の推定が終了したか否かをチェックする。最終ブロックでなければ、ステップs200に移行して他のブロックについて同様の処理を繰り返す。最終ブロックであれば終了する。面方向の推定は、このように行っても良い。ピラミッド構造の中間層から面方向を推定すれば時間を短縮することができる。
【0041】
上述の様に本実施例によれば、多重解像度画像の上層の低解像度画像から逐次次層の照合領域と探索領域を決定し、より詳細なステレオ照合を行なっている。
従って、より高密度により確実に物体までの距離分布を求めることができる。又、上述のように第0層に至るピラミッド構造の中間層で距離分布が求まれば、それを用いて物体を形成する面の面方向をより効率よく求めることができる。詳細に面方向を推定する場合は、最後の第0層まで逐次照合演算を行えばよい。それにより、面方向をより精度良く推定することができる。
【0042】
(変形例)
以上、本発明を表わす1実施例を示したが、他にさまざまな変形例が考えられる。
例えば、第2実施例の面方向の算出では第2層、第1層、第0層までの距離画像を順次求めそれにより物体の面方向を求めたが、図10に示す様にステップs210で第3層から照合領域(ブロック)を読み出し、ステップs211に移行して直接第0層からそのブロックに対応する距離画像を特定して読み出してもよい。そして、その距離画像からデータを抽出してステップs206に移行してもよい。このステップs206は、第2実施例のそれと同等である。
即ち、第2実施例における図9のステップs200、s201、s202、s203、s204を図10のステップs210、s211に短縮してもよい。より効率的により高精度に面方向を推定することができる。
【0043】
又、例えば、第1実施例の信頼度算出では頂角関連値として相関値勾配sGradとの比較を用いたが、他の頂角関連値でもよい。例えば、極小点の頂角、所定の基準相関値(sCorr)とその相関曲線で囲まれる極小値側の面積としてもよい。又、第1実施例ではステレオ照合をエッジ化されたエッジ画像間で行ったが、階調化された画像データについて行うこともできる。
【図面の簡単な説明】
【図1】本発明の第1実施例に係る画像における相関演算方法が適用されるシステムブロック図。
【図2】本発明の第1実施例に係る画像における相関演算方法の処理手順を示すフローチャート。
【図3】本発明の第1実施例に係るピラミッド構造をした多重解像度画像の説明図。
【図4】本発明の第1実施例に係る多重解像度画像の各層を示す1例平面図。
【図5】本発明の第1実施例に係るステレオ照合の手順を示すフローチャート。
【図6】本発明の第1実施例に係るN層と(N−1)層の照合領域と探索領域の関係図。
【図7】本発明の第2実施例に係る多層の多重解像度画像に対する相関演算方法のフローチャート。
【図8】本発明の第2実施例に係るステレオ照合結果による第3層の距離画像(図8(a)と第2層の距離画像(図8(b))の説明図。
【図9】本発明の第2実施例に係る面方向推定方法を示すフローチャート。
【図10】本発明の変形例に係る面方向推定方法を示すフローチャート。
【符号の説明】
10,11 カメラ
20 多重解像度画像生成部
30 空間フィルタ部
40 相関演算部
40i ステレオ照合部
50 距離分布算出部
60 面方向推定部
[0001]
BACKGROUND OF THE INVENTION
  The present invention relates to a correlation calculation method in which an object is imaged by a pair of cameras, and a distance distribution from the camera to the object or a surface direction of a surface forming the object is detected based on a deviation amount (parallax) between the images. In particular, the present invention relates to a correlation calculation method for efficiently and rapidly calculating a distance distribution to an object by converting an image into multiple resolutions.
  The present invention is applied to, for example, a distance distribution detection device that calculates a distance distribution to an object around a vehicle mounted on a vehicle at high speed and high density.
[0002]
[Conventional skills]
  Conventionally, there are object recognition apparatuses using image processing. For example, a vehicle exterior monitoring device disclosed in Japanese Patent Laid-Open No. 5-265547 is one of them. It is a system that recognizes the position, size, and distance of an object by mounting two cameras on the vehicle, imaging the object in real time, and performing stereo matching processing on the two-screen images.
  If two cameras arranged at a predetermined separation distance image a front object, the object is imaged in the X direction in the left and right images. This is because parallax occurs in the two cameras. If the object is in the vicinity of the camera, the parallax is large, and if the object is far away, the parallax is small. The stereo matching process is a technique for detecting the distance to the object using this principle.
[0003]
  A conventional distance distribution measurement procedure will be briefly described. In the conventional distance distribution measurement, first, an image of an object is input from each of two cameras, and A / D conversion is performed to obtain digitized image data (left and right images). Next, for example, a 4 × 4 small area is cut out from the left and right images, and correlation calculation is performed to obtain the parallax of the small area. The parallax is the amount of shift between the small areas in the x direction, for example. From this deviation amount, the distance from the camera to the small area constituting the object, that is, the distance to the object is obtained. If the camera separation distance is B, the focal distance is f, and the amount of deviation is ΔX pixels, the distance z to the object is expressed by the following equation. This distance is obtained for each small area, and the distance distribution to the object, that is, the object shape and posture are calculated.
[Equation 1]
      z = f · B / αΔX
      α = size of one pixel of the image sensor (1)
[0004]
[Problems to be solved by the invention]
  However, the vehicle exterior monitoring device disclosed in Japanese Patent Application Laid-Open No. 5-265547 performs a collation operation in a predetermined area (for example, 4 × 4 pixels) over the entire area of a given image. In this case, collation is performed every 4 pixels, but when high density (every 1 pixel) collation is performed, the amount of calculation becomes enormous, and it is not suitable for detecting the distance in real time, for example.
  In general, in correlation calculation between images using the sum of absolute differences, if the image size is vertical H, horizontal V, the size of the collation area is vertical M, horizontal N, and the search range is D, the correlation S is given by Given. This means that the amount of calculation becomes enormous in proportion to the image size, the collation area size, and the search range.
[Expression 2]
  S = ΣH y = 0ΣV x = 0ΣD d = 0ΣM m = 0ΣN n = 0
      | Fr(X + m, y + n) -Fl(X + m + d, y + n) | (2)
  Where F (x, y) is the pixel intensity at the coordinates (x, y), and FrIs the right image, FlMeans the left image.
[0005]
  The present invention has been made to solve the above-described problems, and its object is to convert an object image into a multi-resolution hierarchical image, and the correlation between the hierarchical images between the hierarchical images in the next stage. By determining the correlation calculation parameters, the distance distribution to the object is obtained at high speed and with high density, and the surface direction of the surface on which the object is formed is accurately obtained.
[0006]
[Means for Solving the Problems]
  In order to achieve this object, according to the object recognition device according to claim 1, an object is imaged by a plurality of imaging devices, and a plurality of small region images are cut out from the obtained one image as a collation region, and each collation is performed. Distance distribution from the imaging device to the object by a correlation calculation between the image of the region and the otheras well asA correlation calculation method in an image for detecting a surface direction of a surface forming the object, wherein a plurality of images having different resolutions are generated for the plurality of images,The pyramid structure has a hierarchical structure in which the resolution and area of the layer changes uniformly as the N value indicating the index of the layer changes.Multi-resolution image generating means for forming an image, and when N and M are integers, each parallax for each collation area is obtained by correlation calculation between N layers, and collation for M layer correlation calculation is performed based on each parallax The distance distribution to the object is determined by determining the area and its search area, and performing the correlation calculation on each of the determined matching areas and each search areaIn each layer forming the pyramid structure, the collation region and the search region for the correlation calculation of the lower layer are calculated from the result obtained by the correlation calculation of the upper layer of the adjacent layer, and the lower layer is sequentially calculated. From the distance distribution of the hierarchy in which three points can be selected from the distance distribution obtained by the calculation for each hierarchy, the correlation calculation is finally performed on the 0th layer that is the bottom surface of the pyramid structure by repeating toward Select three points, determine the plane equation that passes through the three points, and from the plane equation,Detecting a surface direction of a surface forming the objectThis is a correlation calculation method in an image.
[0007]
  According to the correlation calculation method for an image according to claim 2,Three points of the 0th layer image corresponding to the three selected points are obtained, a plane equation passing through the three points is determined from the three points of the zeroth image, and the plane forming the object is determined from the plane equation. The surface direction is detected.
[0008]
[0009]
  or,Claim 3According to the correlation calculation method in the image described in the above, the presence or absence of correlation by the correlation calculation has the minimum correlation value or / and the minimum correlation value based on the sum of absolute differences between the matching area image and the search area image as a vertex. It is determined by an apex angle related value.
  or,Claim 4According to the correlation calculation method for an image described in (1), the image of each layer is an edge image, and the collation area is set on the edge image.
[0010]
[Action and effect of the invention]
  According to the object recognition device of the first aspect, the plurality of imaging devices capture an object and obtain a plurality of images. Then, a plurality of images having different resolutions are generated from the images by multi-resolution image generation means, and images are formed in a hierarchical structure for each resolution.
  The plurality of images having different resolutions are performed by, for example, averaging pixel intensities within a predetermined region, Gaussian pyramid (subsampling conversion using a Gaussian filter of the original image), wavelet conversion (decomposing the image by spatial frequency), and the like.
  At this time, for example, the 0th layer is the original image with the highest resolution, and becomes a low-resolution image with lower resolution as it goes to the upper layer.
[0011]
  Then, a small area image is cut out from an arbitrary N-layer image and used as a collation area, and the collation area is subjected to correlation calculation along the X direction with respect to the other N-layer image. That is, the correlation calculation between the N layers is performed, and each parallax for each matching area set on the N layer image is obtained. Then, based on each parallax, a collation area for the correlation calculation between the M layers and its search area are determined. Next, a correlation calculation between the M layers is performed in each of the determined matching areas and each search area. That is, the distance distribution to the object by the M layer imageAnd thingsThe surface direction of the surface forming the body is detected. At this time, N ≠ M, and N and M may be continuous or may be discrete.
[0012]
  Here, the N layer is a low resolution image and the M layer is a high resolution image. Since the N-layer image has a low resolution and a small area, the correlation calculation between the images is completed at high speed. That is, the collation area and the search area for the correlation calculation between the M layers, which is the next process, are quickly calculated and determined. That is, the calculation in the non-correlation region in the correlation calculation between the M layers is omitted. That is, the correlation calculation between the M layers is efficiently performed. Further, since the M layer image has a higher resolution than the N layer image, the distance distribution to the object is calculated densely. That is, if the correlation calculation method for an image of the present invention is used, the distance distribution to the object can be calculated at high speed and with high density. Also, the surface direction of the surface on which the object is formed is calculated from the distance distribution at high speed and with high density.
[0013]
  or,Of the present inventionAccording to the object recognition apparatus, the hierarchical structure is a pyramid structure in which the resolution and area of the layer change uniformly as the N value indicating the index of the hierarchy changes.
  For example, the 0th layer with N = 0 has the highest resolution in the original image, and as the N value increases, the resolution becomes lower and the area becomes smaller. Since the low-resolution image on several layers has a pyramid structure, the processing area (correlation calculation processing) is linearly small, and the distance distribution to the object is calculated at high speed.
  For example, if the object has a complex shapeAboveCorrelation calculation is performed in the rank layer (N layer). And the collation area | region and search area | region of the lower layer (M layer) are decided from the result. Because of the pyramid structure, the collation area and the search area can be easily determined linearly. Therefore, the correlation calculation in the M layer can be processed more quickly and efficiently. Therefore, the distance distribution to the object can be obtained with high density at high speed.
[0014]
  or,Of the present inventionAccording to the object recognition device, in each layer forming the pyramid structure, a collation region and a search region are calculated for the correlation calculation of the lower layer immediately below by the correlation calculation of the upper layer of the adjacent layer. Do it sequentially. That is, the collation region and the search region are sequentially determined from the predetermined layer on the apex side of the pyramid structure downward, and the correlation calculation is performed. This is repeated until the final layer.
  That is, the correlation calculation is finally performed on the 0th layer, which is the bottom surface of the pyramid structure, and the distance distribution to the object or the surface direction of the surface forming the object is calculated from the result.
  In this way, the resolution and area of the image are formed in a pyramid structure, and the collation area and search area are sequentially updated from the low resolution layer (upper layer) to the high resolution layer (lower layer), so that the correlation calculation is performed. It is efficient and can reliably determine the distance distribution to the object. Further, the surface direction of the surface on which the object is formed can be reliably calculated from the distance distribution.
[0015]
  or,Claim 3According to the object recognizing device described in (1), the sum of absolute differences between the image in the collation area and the image in the search area is first obtained for determining the presence or absence of correlation. Then, the presence or absence of correlation is determined by the correlation minimum value or / and the vertex angle related value having the correlation minimum value as a vertex.
  Here, the apex angle-related value is the apex angle formed by the minimum point and the points on both sides thereof, the inclination of the side forming the apex angle, or the area of a polygon formed including the apex angle.
[0016]
  For example, the presence or absence of correlation is examined with respect to a large number of local minimum values of the correlation calculation result. If the minimum value is significantly below a predetermined threshold, it is determined that there is a correlation, and the separation distance between the collation area and the search area is set as parallax.
  For example, if there are a plurality of candidates for the minimum correlation value, the vertex angle related value including the minimum value is examined. If the apex angle is a sharper angle, the parallax is obtained with the minimum correlation value. On the contrary, if all the minimum values are larger than a predetermined threshold value, it is determined that there is no correlation.
  As described above, since the presence / absence of correlation is determined by the correlation minimum value and / or the vertex angle related value having the correlation minimum value as a vertex, the parallax, that is, the distance distribution to the object and the surface of the surface forming the object A direction is calculated.
[0017]
  or,Claim 4According to the correlation calculation method for an image described in (1), the image is an edge image, and the collation area is set on the edge image.
  The edge image is obtained, for example, by a Sobel operation process, and thereby the outline of the object, the edge, and the boundary between the regions constituting the object are emphasized. And the said collation area | region is set on the edge and the said correlation calculation process is performed. Since the collation area is set only on the edge image, not the entire area of the image, the correlation calculation amount is significantly reduced. Thereby, the distance distribution to the object and the surface direction of the object can be obtained at higher speed.
[0018]
DETAILED DESCRIPTION OF THE INVENTION
(First embodiment)
  FIG. 1 shows an embodiment to which the correlation calculation method for images according to the present invention is applied. FIG. 2 is a system configuration diagram of the distance distribution calculation apparatus. This system is a multi-resolution that generates a hierarchical image by performing high-speed A / D conversion on video signals sent from the cameras 10, 11 and cameras 10, 11 arranged at a predetermined separation distance, and multiplexing the resolutions. A multi-resolution generation unit 20 that is an image generation unit, a spatial filter unit 30 that converts an image of each layer generated by the multi-resolution generation unit 20 into an edge image, and a correlation operation that stereo-matches each layer edged by the spatial filter unit 30 Unit 40, a distance distribution calculation unit 50 that calculates a distance distribution from the result of the correlation calculation unit 40, and a surface direction estimation unit 60 that calculates a surface direction from each distance data obtained from the distance distribution calculation unit 50.
  Here, it is assumed that the correlation calculation unit 40 includes a stereo matching unit 41i (i = 0... N) that performs stereo matching on each layer image, and stereo matching is performed between layers of the same index. Note that correlation between images and stereo matching have the same meaning. Hereinafter, the correlation calculation between the images of each layer is referred to as stereo matching.
[0019]
  The multi-resolution generation unit 20, the spatial filter unit 30, the correlation calculation unit 40, the distance distribution calculation unit 50, and the plane direction estimation unit 60 include a CPU (not shown) and a ROM and work area memory (not shown) in which an arithmetic processing program is written. The RAM is not shown. The above elements are connected via a system bus including various signal lines (not shown), and data is transferred and controlled by various programs written in the CPU and ROM.
[0020]
  FIG. 2 shows the basic operation of the correlation calculation method for images in this embodiment. The figure is a flowchart. Thereby, the distance distribution to the object and the surface direction of the surface forming the object are calculated at high speed and with high density.
  First, the program is turned on by a start switch (not shown) and executed from step s100. In step s100, the cameras 10 and 11 as imaging devices are turned on to capture an object image, and in step s110, the input image is A / D converted and taken into a frame memory (not shown). The frame memory is composed of a plurality of RAMs, and one unit (one sheet) is, for example, a total of 512 × 512 RAMs corresponding to each pixel of the CCD image sensor. An arbitrary pixel is represented by coordinates (x, y) and intensity F, and the intensity F is graded, for example, in 0 to 255 levels. Hereinafter, this gradation image is referred to as image data. At this time, the upper left corner of the screen is the origin of the xy coordinate system, and the X axis is set in the horizontal direction and the Y axis is set in the vertical direction.
[0021]
  Next, the process proceeds to step s120. In step s120, the multi-resolution image generator 20 multi-resolutions the image and stores it in the RAM in a hierarchical structure. Here, the original image is a high-resolution image with the highest resolution, and images are hierarchically formed at a plurality of resolutions based on this. These are formed by, for example, an averaging method, a Gaussian pyramid, a wavelet transform, or the like in an area in which surrounding pixels of a specific pixel are averaged to be one pixel.
[0022]
  FIG. 3 shows an example in which the averaging method is sequentially performed toward the upper layer and images are configured according to resolution. The lowest layer of the 0th layer is the original image. For example, if the size of the original image is 512 × 512, L = 9 in the figure, and the uppermost layer (initial layer) is represented by N = 3.
  Specifically, the original image is formed by sequentially compressing according to the following equation.
[Equation 3]
    FN(X, y) = 1/4 [FN-1(X, y) + FN-1(X + 1, y) + FN-1(X, y + 1) + FN-1(X + 1, y + 1)] (3)
Where FN(X, y) is the intensity of each pixel at the coordinates (x, y) of the N layer.
  The above equation is a case where the original image is compressed to ½ both vertically and horizontally as it goes to the upper layer. That is, the area is compressed by 1/4. This also means that the resolution decreases proportionally. An example of the image hierarchized into the 0th layer to the 3rd layer is shown in FIG.
[0023]
  Next, the process proceeds to step s130 (FIG. 2). In step s130, each layer is spatially filtered. This is because the density change of each image is emphasized to simplify the processing. The spatial filter is, for example, sharpening of an image by first-order differentiation and second-order differentiation. For example, if one-dimensional differentiation is used, an object is converted into an edge image. The edge image is, for example, a contour image of a front object, and is a boundary image between the surfaces constituting the object. Next, the process proceeds to step s140.
[0024]
  In step s140, stereo matching is performed between the layers on the edged image. Stereo matching is a correlation operation that searches for matching points between two images.
  FIG. 5 shows a general flow of stereo matching in each layer. First, in step s141, in order to minimize the amount of calculation, a block that is a collation area is set on one of the edge images. Then, the absolute value of the difference from the other edge image is obtained using the block. That is, block correlation based on the sum of absolute differences is performed, and as a result, a plurality of corresponding point candidates (hereinafter, parallax candidates) are obtained. The parallax candidates are a plurality of minimum points of the correlation value obtained by the above equation (2).
  In step s141, for the first stereo collation (block correlation) for the N layer, the collation area is a predetermined value given on the ROM, and the search area is all in the horizontal direction of the predetermined layer. For the second and subsequent stereo collations for the M layer, the collation area and search area updated as described in detail in step s144 are used. Next, the process proceeds to step s142.
[0025]
  In step s142, it is determined whether the parallax candidate obtained in step s141 satisfies a predetermined condition. That is, the reliability of each parallax is evaluated (reliability evaluation). In the reliability evaluation, one is a comparison between each correlation value of each parallax candidate and a reference correlation value (sCorr). The other one is a comparison between each correlation gradient value, which is the vertex angle related value of the parallax candidate, and the reference correlation gradient value (sGrad). The reliability is evaluated by either or both. Next, the process proceeds to step s143, and the parallax candidate having the highest evaluation degree is set as the parallax in the layer (determination of parallax). Next, the process proceeds to step s144.
[0026]
  In step s144, the collation area | region and search area | region of another layer (M layer) are updated using the parallax of the N layer. Since the resolution image has a pyramid structure, when searching for the M layer, the matching region is determined according to the inclination of the pyramid structure. For example, if the collation area is a block shape, each side of the block is multiplied by a predetermined linear coefficient to be updated as an M-layer collation area.
[0027]
  Further, the position of the search area of the M layer, which is the other layer, is roughly determined by the result of the stereo matching (parallax) and the linear coefficient of the pyramid structure. For example, the M layer is the next layer of the N layer. That is, M = (N−1). FIG. 6 shows the relationship between search areas in the N layer and the (N-1) layer. This is a standardized image size of the N layer to the (N-1) layer. That is, the N layer image is enlarged so as to match the (N-1) layer image. Where SNIs the Nth layer collation region and SN-1Is that of the (N-1) th layer. Since the Nth layer is compressed, it is expanded by the collation area of the (N-1) layer when normalized. For example, it is enlarged four times. In other words, the parallax is roughly obtained by performing stereo matching in a large matching region in the N layer.
[0028]
  S 'NIs a matching region by stereo matching in the N layer. That is, it is a matching area whose reliability is determined to be high. Thereby, the parallax dNIs roughly determined. And this approximate parallax dNIs used to update the search area in the (N-1) layer stereo matching. That is, the region TN-1Becomes the search area in the (N-1) layer stereo matching. At this time, region TN-1X-direction width Tx (N-1)Is given by:
[Expression 4]
  dN-△ dN≦ Tx (N-1)≦ dN+ △ dN    (4)
  △ dN: Constant specific to N layer
    dN: Parallax of the Nth layer
[0029]
  In other words, if the (N-1) layer is stereo-correlated within the range of the equation (4), it means that a matching region can be easily obtained. That is, it is not necessary to search over all areas in the horizontal direction. That is, the processing time is greatly shortened.
  Therefore, in the (N-1) layer, the same stereo matching is performed in the search area, and the parallax d is more detailed and faster.N-1Is required. Moreover, the parallax dN-1Naturally satisfies the following equation.
[Equation 5]
  dN-△ dN≦ dN-1≦ dN+ △ dN      ... (5)
  dN-1: Parallax of the (N-1) th layer
If the M layer is the next layer, the collation area and the search area are set in step s144 in this way.
[0030]
  Next, the process proceeds to step s150 (FIG. 2). In step s150, the distance is calculated based on the above equation (1). For example, the collation area is divided into a large number in the M layer, and the distance is calculated for each parallax. That is, a distance distribution is obtained (distance distribution output). Next, the process proceeds to step s160.
  In step s160, the coefficient of the plane equation aX + bY + cZ = 0 is obtained using the distance distribution obtained in step s150, that is, a plurality of distance data. For example, it is obtained by the least square method. Thereby, the surface direction of the surface forming the object is calculated.
[0031]
  As described above, according to the present embodiment, the obtained image is resolution-multiplexed to obtain an approximate parallax in the upper-layer low-resolution image, and the collation area and search area of the other layer are determined based on the parallax. Stereo matching is performed efficiently, and as a result, the distance distribution to the object can be obtained at high speed and high density. Further, the surface direction of the surface on which the object is formed can be obtained using the distance distribution.
[0032]
  (Second embodiment)
  The correlation calculation method in the image of the first embodiment is a correlation calculation method related to the N layer and M layer of the multi-resolution image, particularly the M = N−1 layer. For example, in the case of N = 1, stereo matching is performed on one layer, and stereo matching is further performed on the 0th layer (original image) based on the result, thereby calculating the distance distribution to the object.
  The present embodiment is an example in which the above concept is extended to calculate a distance distribution or the like using a plurality of layers. That is, this is an example of calculating the distance distribution and the like more efficiently and at high speed by repeating the method of the first embodiment a plurality of times.
[0033]
  FIG. 7 shows a correlation calculation method in which a multi-resolution image formed in a pyramid structure is processed from the third layer downward to the 0th. The figure is a flowchart. This is also an example of steps s140 and s150 in FIG. 2 of the first embodiment. The other steps s100 to s130 are the same and will be omitted.
  First, in step s170, stereo matching between the third layers is performed. Step s170 is equivalent to steps s141 to s144 shown in FIG. 5 of the first embodiment. That is, the block correlation for the edge image is the same as in the first embodiment. Thereby, parallax is obtained for a predetermined block. And it transfers to step s171 and parallax is converted into a distance.
[0034]
  Next, in step s172, the distance calculation in the block is checked. The distance calculation check corresponds to the reliability evaluation of the first embodiment. That is, if the reliability (for example, the correlation value) is larger than the predetermined value, it is determined that the region is a coincidence area, and the process proceeds to step s173.
  If the reliability is smaller than the predetermined value, it is determined that there is no matching area, that is, the process proceeds to step s190. In step s190, it is checked whether or not it is the last block, and the process proceeds to the next block or ends.
[0035]
  In step s173, stereo matching is performed between the second layers. At this time, the collation area and the search area have already been updated by the third layer process (step s144). Therefore, there is no need to newly search (correlation calculation) over the entire surface in the horizontal direction, for example. Therefore, the stereo matching is executed in a very short time, and the second layer parallax is calculated. In step s175, the distance is similarly calculated from the parallax, and the reliability is similarly determined in step s176.
  The stereo matching result (distance image) in the third layer in step s170 is shown in FIG. 8A, and that in the second layer in step s173 is shown in FIG. 8B. In FIG. 8A, a to f are blocks that have been matched by the correlation calculation (distance is calculated). In the second layer, each block is divided into four to obtain a more detailed distance distribution.
[0036]
  The same process as the series of processes (steps s173 to s176) is repeated for the first layer. That is, steps s177 to s180 are the same. Finally, stereo collation is performed on the 0th layer in step s181 to obtain a more detailed parallax, and a more detailed distance distribution is obtained in step s183.
  In this way, stereo matching is sequentially performed from the third layer toward the zeroth layer, and the distance distribution to the partial object is calculated efficiently and reliably. Next, as in the first embodiment, the process proceeds to step s160 to estimate the surface direction of the surface on which the object is formed.
[0037]
  When the distance distribution is sequentially calculated as described above, the surface direction may be estimated by the following process without waiting for the result of the distance distribution in the 0th layer. The surface direction estimation method is shown in the flowchart of FIG.
  In step s200, a distance image is read from the stereo matching result in the second layer. The distance image of the second layer is divided into four as shown in FIG. 8B and is calculated in more detail. Next, the process proceeds to step s201. In step s201, it is checked whether or not there are three or more data in the distance image. If there are three or more data, the surface is specified, so the process proceeds to step s205, and the plane is applied to the plane equation as described above. If it is 3 data or less, the plane cannot be specified, and the process proceeds to step s202.
[0038]
  In step s202, the distance image of the first layer is read out. The distance image of the first layer is calculated in more detail by dividing into 16 though not shown. Next, the process proceeds to step s203. In step s203, it is checked whether or not there are three or more data in the distance image. If there are three or more data, the surface is specified in the same manner, so the process proceeds to step s205 to determine the plane. If it is 3 data or less, the plane cannot be specified, and the process proceeds to step s204.
[0039]
  In step s204, the distance image of the 0th layer is read. This distance image is a result of stereo matching performed on the original image. The area is divided into 64 areas. If there are three or more data in this area, the process proceeds to step s205, and if it is less, the process proceeds to step s207. Since the data here is the distance image with the highest accuracy, the surface direction with the highest accuracy is obtained in step s205. Next, the process proceeds to step s207.
[0040]
  In step s207, it is checked whether or not the estimation of the surface direction has been completed for all the blocks in the second layer. If it is not the final block, the process proceeds to step s200 and the same processing is repeated for the other blocks. If it is the last block, the process ends. The estimation of the surface direction may be performed in this way. If the plane direction is estimated from the intermediate layer of the pyramid structure, the time can be shortened.
[0041]
  As described above, according to the present embodiment, the collation area and search area of the next layer are sequentially determined from the lower resolution image on the upper layer of the multi-resolution image, and more detailed stereo collation is performed.
  Therefore, the distance distribution to the object can be obtained more reliably with higher density. Further, if the distance distribution is obtained in the intermediate layer having the pyramid structure reaching the 0th layer as described above, the surface direction of the surface on which the object is formed can be obtained more efficiently using the distance distribution. When estimating the surface direction in detail, it is only necessary to sequentially perform the collation operation up to the last 0th layer. Thereby, the surface direction can be estimated with higher accuracy.
[0042]
(Modification)
  Although one embodiment representing the present invention has been described above, various other modifications are conceivable.
  For example, in the calculation of the surface direction in the second embodiment, the distance images to the second layer, the first layer, and the zeroth layer are sequentially obtained, and thereby the surface direction of the object is obtained. As shown in FIG. The collation area (block) may be read from the third layer, the process may proceed to step s211 and the distance image corresponding to the block may be directly specified and read from the zeroth layer. Then, data may be extracted from the distance image and the process may proceed to step s206. This step s206 is equivalent to that of the second embodiment.
  That is, steps s200, s201, s202, s203, and s204 in FIG. 9 in the second embodiment may be shortened to steps s210 and s211 in FIG. The surface direction can be estimated more efficiently and with higher accuracy.
[0043]
  For example, in the reliability calculation of the first embodiment, the comparison with the correlation value gradient sGrad is used as the vertex angle related value, but other vertex angle related values may be used. For example, the apex angle of the minimum point, a predetermined reference correlation value (sCorr), and the area on the minimum value side surrounded by the correlation curve may be used. Further, in the first embodiment, stereo matching is performed between edge images that have been edged. However, gradation image data can also be performed.
[Brief description of the drawings]
FIG. 1 is a system block diagram to which a correlation calculation method for images according to a first embodiment of the present invention is applied.
FIG. 2 is a flowchart showing a processing procedure of a correlation calculation method for an image according to the first embodiment of the present invention.
FIG. 3 is an explanatory diagram of a multi-resolution image having a pyramid structure according to the first embodiment of the present invention.
FIG. 4 is a plan view showing an example of each layer of a multi-resolution image according to the first embodiment of the present invention.
FIG. 5 is a flowchart showing a procedure of stereo matching according to the first embodiment of the present invention.
FIG. 6 is a diagram showing the relationship between the N-layer and (N-1) -layer collation areas and search areas according to the first embodiment of the present invention.
FIG. 7 is a flowchart of a correlation calculation method for multilayer multi-resolution images according to the second embodiment of the present invention.
FIG. 8 is an explanatory diagram of a third layer distance image (FIG. 8A) and a second layer distance image (FIG. 8B) based on a stereo matching result according to the second embodiment of the present invention;
FIG. 9 is a flowchart showing a surface direction estimation method according to the second embodiment of the present invention.
FIG. 10 is a flowchart showing a surface direction estimation method according to a modification of the present invention.
[Explanation of symbols]
10,11 camera
20 Multi-resolution image generator
30 Spatial filter section
40 Correlation calculator
40i stereo matching unit
50 Distance distribution calculator
60 plane direction estimation unit

Claims (4)

複数の撮像装置により物体を撮像し、得られた一方の画像から複数の小領域画像を切り出し照合領域とし、各照合領域と他方との画像との相関演算により前記撮像装置から前記物体までの距離分布及び該物体を形成する面の面方向を検出する画像における相関演算方法であって、
前記複数の画像に対してそれぞれ解像度の異なる複数の画像を生成し、解像度別に、階層の指数を示すN値が変化するに従ってその層の解像度とその面積が一様に変化するピラミッド構造の階層構造に画像を形成する多重解像度画像生成手段を備え、
N,Mを整数とする時、N層間の相関演算によって前記各照合領域に対する各視差を求め、該各視差に基づいてM層の相関演算に対する照合領域とその探索領域を確定し、その確定された各照合領域と各探索領域で前記相関演算を行うことによって前記物体までの距離分布を求め、
前記ピラミッド構造を形成する各層において、隣接する層の上位層の相関演算によって得られた結果よりその下位層の相関演算に対する前記照合領域と前記探索領域を算出し、それを逐次下位層に向かって繰り返すことによって最終的に前記ピラミッド構造の底面である第0層で前記相関演算を行い、
前記各階層毎の演算により得られた距離分布から3点が選択できる階層の距離分布から、3点を選択して、その3点を通る平面方程式を決定し、その平面方程式から、前記物体を形成する面の面方向を検出することを特徴とする画像における相関演算方法。
An image of an object is captured by a plurality of imaging devices, and a plurality of small area images are cut out from one obtained image as a collation region, and the distance from the imaging device to the object is calculated by correlation between each collation region and the other image A correlation calculation method in an image for detecting a distribution and a surface direction of a surface forming the object,
A plurality of images with different resolutions are generated for each of the plurality of images, and the resolution and area of the layer changes uniformly as the N value indicating the index of the layer changes for each resolution. includes a multi-resolution image generation means for forming an image on,
When N and M are integers, each parallax for each collation area is obtained by correlation calculation between N layers, and the collation area and its search area for the M layer correlation calculation are determined based on each parallax, and the parallax is determined. The distance distribution to the object is obtained by performing the correlation calculation in each matching area and each search area ,
In each layer forming the pyramid structure, the collation area and the search area for the correlation calculation of the lower layer are calculated from the result obtained by the correlation calculation of the upper layer of the adjacent layer, and the results are sequentially directed toward the lower layer. By repeating, the correlation calculation is finally performed on the 0th layer which is the bottom surface of the pyramid structure,
Three points are selected from the distance distribution of the hierarchy in which three points can be selected from the distance distribution obtained by the calculation for each layer, a plane equation passing through the three points is determined, and the object is determined from the plane equation. A correlation calculation method for an image, characterized by detecting a surface direction of a surface to be formed.
前記選択された3点に対応する前記第0階層の画像の3点を求め、その第0画像の3点から、その3点を通る平面方程式を決定し、その平面方程式から、前記物体を形成する面の面方向を検出することを特徴とする請求項1に記載の画像における相関演算方法。Three points of the 0th layer image corresponding to the selected three points are obtained, a plane equation passing through the three points is determined from the three points of the zeroth image, and the object is formed from the plane equation 2. The correlation calculation method for an image according to claim 1, wherein a surface direction of the surface to be detected is detected. 前記相関演算による相関の有無は、照合領域の画像と探索領域の画像間の差分絶対値和による相関最小値又は/及び該相関最小値を頂点とする頂角関連値で決定されることを特徴とする請求項1又は請求項2に記載の画像における相関演算方法。Presence / absence of correlation by the correlation calculation is determined by a minimum correlation value based on a sum of absolute differences between images in a collation area and a search area or / and an apex angle related value having the minimum correlation value as a vertex. The correlation calculation method for an image according to claim 1 or 2 . 前記各層の画像はエッジ画像であり、前記照合領域は該エッジ画像上に設定されることを特徴とする請求項1乃至請求項3の何れか1項に記載の画像における相関演算方法。Wherein each layer of the image is an edge image, the matching area correlation calculation method in an image according to any one of claims 1 to 3, characterized in that it is set on the edge image.
JP2000136694A 2000-05-10 2000-05-10 Correlation calculation method for images Expired - Lifetime JP4517449B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000136694A JP4517449B2 (en) 2000-05-10 2000-05-10 Correlation calculation method for images

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000136694A JP4517449B2 (en) 2000-05-10 2000-05-10 Correlation calculation method for images

Publications (2)

Publication Number Publication Date
JP2001319229A JP2001319229A (en) 2001-11-16
JP4517449B2 true JP4517449B2 (en) 2010-08-04

Family

ID=18644594

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000136694A Expired - Lifetime JP4517449B2 (en) 2000-05-10 2000-05-10 Correlation calculation method for images

Country Status (1)

Country Link
JP (1) JP4517449B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10332259B2 (en) 2014-10-09 2019-06-25 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and program

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6829393B2 (en) * 2001-09-20 2004-12-07 Peter Allan Jansson Method, program and apparatus for efficiently removing stray-flux effects by selected-ordinate image processing
JP2004279031A (en) * 2003-03-12 2004-10-07 Toyota Central Res & Dev Lab Inc Apparatus and method for detecting distance distribution
DE102004007049A1 (en) * 2004-02-13 2005-09-01 Robert Bosch Gmbh Method for classifying an object with a stereo camera
JP4652698B2 (en) * 2004-02-23 2011-03-16 独立行政法人科学技術振興機構 Image recognition apparatus, image recognition method, and program
JP2007025966A (en) * 2005-07-14 2007-02-01 Konica Minolta Photo Imaging Inc Image processing method, image processor and image processing program
JP5034554B2 (en) * 2007-02-27 2012-09-26 コニカミノルタホールディングス株式会社 Correlation calculation device, correlation calculation method and program
JP5098369B2 (en) * 2007-03-06 2012-12-12 コニカミノルタホールディングス株式会社 Distance image generating apparatus, distance image generating method and program
JP2009059048A (en) * 2007-08-30 2009-03-19 Casio Comput Co Ltd Image processor, imaging device, image processing method, and program
JP4946896B2 (en) * 2008-01-31 2012-06-06 コニカミノルタホールディングス株式会社 Distance measuring device and distance measuring method
JP2009210486A (en) * 2008-03-05 2009-09-17 Ntt Comware Corp Depth data generating device, depth data generation method, and program thereof
JP5062531B2 (en) * 2008-06-03 2012-10-31 コニカミノルタホールディングス株式会社 Image processing apparatus and image processing method
JP2010125040A (en) * 2008-11-27 2010-06-10 Sony Computer Entertainment Inc Image processor
JP5446516B2 (en) * 2009-07-01 2014-03-19 コニカミノルタ株式会社 Image processing device
US8798377B2 (en) * 2010-02-08 2014-08-05 Telefonica, S.A. Efficient scale-space extraction and description of interest points
JP5773737B2 (en) * 2011-05-10 2015-09-02 アズビル株式会社 Verification device
JP5773738B2 (en) * 2011-05-10 2015-09-02 アズビル株式会社 Verification device
JP5773736B2 (en) * 2011-05-10 2015-09-02 アズビル株式会社 Verification device
US9161010B2 (en) 2011-12-01 2015-10-13 Sony Corporation System and method for generating robust depth maps utilizing a multi-resolution procedure
KR101376780B1 (en) 2012-09-12 2014-03-20 경북대학교 산학협력단 Apparatus and method for managing accuracy of distance measurement
WO2017122640A1 (en) * 2016-01-15 2017-07-20 富士フイルム株式会社 Measurement device and measurement method
JP6780983B2 (en) * 2016-08-18 2020-11-04 マクセル株式会社 Image processing system
TWI637350B (en) * 2018-01-09 2018-10-01 緯創資通股份有限公司 Method, image processing device, and system for generating disparity map
CN112950473B (en) * 2021-03-04 2023-04-18 清华大学深圳国际研究生院 Super-resolution method for MR image

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1997020288A1 (en) * 1995-11-24 1997-06-05 Life Imaging Systems Inc. Three-dimensional imaging system
JP2921496B2 (en) * 1996-07-15 1999-07-19 三菱電機株式会社 Image processing device and object transfer device
JP2966248B2 (en) * 1993-10-01 1999-10-25 シャープ株式会社 Stereo compatible search device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2966248B2 (en) * 1993-10-01 1999-10-25 シャープ株式会社 Stereo compatible search device
WO1997020288A1 (en) * 1995-11-24 1997-06-05 Life Imaging Systems Inc. Three-dimensional imaging system
JP2000500679A (en) * 1995-11-24 2000-01-25 ライフ イマジング スィステムズ インク. 3D image forming system
JP2921496B2 (en) * 1996-07-15 1999-07-19 三菱電機株式会社 Image processing device and object transfer device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10332259B2 (en) 2014-10-09 2019-06-25 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and program

Also Published As

Publication number Publication date
JP2001319229A (en) 2001-11-16

Similar Documents

Publication Publication Date Title
JP4517449B2 (en) Correlation calculation method for images
Hoang et al. Metaheuristic optimized edge detection for recognition of concrete wall cracks: a comparative study on the performances of roberts, prewitt, canny, and sobel algorithms
JP5981838B2 (en) System, method and computer program product for detecting defects in inspection images
US8115169B2 (en) Method and apparatus of pattern inspection and semiconductor inspection system using the same
JP6184877B2 (en) Vehicle external recognition device
JP3944647B2 (en) Object measuring apparatus, object measuring method, and program
EP1329850B1 (en) Apparatus, program and method for detecting both stationary objects and moving objects in an image
JP4601134B2 (en) Method and apparatus for defect detection based on shape features
CN101147159A (en) Fast method of object detection by statistical template matching
JP2008286725A (en) Person detector and detection method
JP2016115331A (en) Identifier generator, identifier generation method, quality determination apparatus, quality determination method and program
US11410300B2 (en) Defect inspection device, defect inspection method, and storage medium
CN113781424A (en) Surface defect detection method, device and equipment
KR101869266B1 (en) Lane detection system based on extream learning convolutional neural network and method thereof
CN110235177B (en) Image processing device, image recognition device, and storage medium
WO2020209046A1 (en) Object detection device
KR101205565B1 (en) Method for Dectecting Front and Rear Vehicle by Using Image
KR101931220B1 (en) Apparatus and Method for Body Components Detection
JP2013105432A (en) Outside recognition device for vehicle and vehicle system using the same
CN112001448A (en) Method for detecting small objects with regular shapes
Lakmal et al. Pothole detection with image segmentation for advanced driver assisted systems
JP7475901B2 (en) Method and system for detecting defects on a test piece
US20230093034A1 (en) Target area detection device, target area detection method, and target area detection program
JP2006010652A (en) Object-detecting device
CN112529013A (en) Image recognition method, device, equipment and computer readable medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070509

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100202

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100209

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100409

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

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

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

Free format text: PAYMENT UNTIL: 20130528

Year of fee payment: 3

R151 Written notification of patent or utility model registration

Ref document number: 4517449

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20130528

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313532

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

Free format text: PAYMENT UNTIL: 20130528

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140528

Year of fee payment: 4

EXPY Cancellation because of completion of term