JP2004180036A - Parallax search method and parallax search device - Google Patents

Parallax search method and parallax search device Download PDF

Info

Publication number
JP2004180036A
JP2004180036A JP2002344717A JP2002344717A JP2004180036A JP 2004180036 A JP2004180036 A JP 2004180036A JP 2002344717 A JP2002344717 A JP 2002344717A JP 2002344717 A JP2002344717 A JP 2002344717A JP 2004180036 A JP2004180036 A JP 2004180036A
Authority
JP
Japan
Prior art keywords
image
search
unit area
unit
road surface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002344717A
Other languages
Japanese (ja)
Inventor
Takeo Kato
武男 加藤
Yoshiki Ninomiya
芳樹 二宮
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 JP2002344717A priority Critical patent/JP2004180036A/en
Publication of JP2004180036A publication Critical patent/JP2004180036A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Traffic Control Systems (AREA)
  • Image Analysis (AREA)
  • Measurement Of Optical Distance (AREA)
  • Image Processing (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To reduce the calculation volume and error correction in parallax search in binocular vision. <P>SOLUTION: A camera is provided in each of left and right ends in the front of a vehicle, and axial lines of cameras are aligned with the headway direction of the vehicle. For a picture of a road surface of one of two camera pictures obtained by these cameras, such conversion is previously set that the picture of a road surface after conversion is coincident with the picture of the road surface of the other camera picture in the case that there is only the road surface and no obstacle. A vanishing point is given as an origin, and an x axis is taken in the horizontal right direction on the left camera picture, and a y axis is taken in the upward direction perpendicular to the x axis, and an x' axis is taken in the horizontal right direction on the right camera picture, and a y' axis is taken in the upward direction perpendicular to the x' axis, and a is a positive constant, and x'=x+ay and y'=y are true. Thus images of obstacles and images above the horizontal are converted together. Areas of luminance incongruence in luminance difference images of individual pixels between left and right camera pictures after this conversion are taken as a search area in the right camera picture. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、予め位置及び撮像方向の定められた2つの撮像装置により撮像された2つの撮像画像から一致度の高い画素領域の視差情報を求めるための、視差探索方法に関する。本発明は路面上を走行する車両が先行車両等の障害物迄の距離を認識するための両眼視による画像分析における1ステップとして特に有用である。
【0002】
【従来の技術】
いわゆる両眼視により得られた2つの撮像画像から、一致度の高い画素領域の視差情報を求め、予め位置及び撮像方向の定められた2つの撮像装置からの距離を決定する方法については広く知られている。例えば特許文献1及び非特許文献1参照。
【0003】
【特許文献1】
特開 2001−243456
【非特許文献1】
徐剛、辻三郎共著、「3次元ビジョン」、初版2刷、共立出版、平成11年5月25日、pp. 95−103
【0004】
この技術を、図1により説明する。図1は、車両前方左端及び右端に設置され、その撮像中心が車両の進行方向である消失点となり、且つ水平線の位置が互いに一致するよう設定された、2つのカメラによる撮像画像を示す。図1の(a)が左カメラ画像、図1の(b)が右カメラ画像であり、先行する車両の後部が撮影されている。尚、白線部分は路面標示された走行レーンであるが、説明のため連続線で示し、且つレーン幅は車両の幅員に略等しいように示した。
【0005】
ここで一方を基準画像とし、複数個の画素で構成される探索のための単位領域を決める。図1では(b)の右カメラ画像を基準画像とし、単位領域Aについて、(a)の左カメラ画像の単位領域の中から最も構成画素の輝度の一致度の高い領域を探索する。
【0006】
【発明が解決しようとする課題】
図1の(a)と(b)とを目視すれば、(b)の右カメラ画像の単位領域Aと一致するのは(a)の左カメラ画像の単位領域Aであることは容易に理解できる。しかし、CPUにより視差探索を行うためには、例えば単位領域Aと縦軸上の位置が一致し、横軸方向にある程度の範囲をもたせた、図1(a)の左カメラ画像の被探索範囲Rの各単位領域全てと一致度を比較する必要がある。ところで一致度の計算には例えば上記非特許文献1にもあるような相関値を求める他多数考えられるが、いずれも膨大な計算量を必要とするものである。また、単位領域ごとの一致度のみを基準としているため、本来対応していない左右のカメラ画像の単位領域同士を対応させてしまうという誤対応が頻繁に生ずる。
【0007】
本発明は上記の課題を解決するために成されたものであり、その目的は、視差探索における計算量と誤対応の低減である。
【0008】
【課題を解決するための手段】
上記の課題を解決するため、請求項1に記載の手段は、2つの撮像装置による2つの撮像画像又は1つの撮像装置の異なる位置における2つの撮像画像の一方を基準画像、他方を被探索画像として、当該基準画像の単位領域ごとに被探索画像の各単位領域中から構成画素の輝度の一致度が最も高い一致単位領域を探索する視差探索方法において、路面を基準とする画像変換であって、前記被探索画像の変換後の路面画像が前記基準画像の路面画像と一致するような変換を前記被探索画像に対して行い、当該変換された被探索画像と、前記基準画像との各画素又は各領域の輝度の差による差分画像を求め、当該差分画像の輝度が所定値以上である不一致領域に対応する、前記基準画像中の単位領域の範囲を探索領域とすることを特徴とする。ここで画像の単位領域とは、所望に設定される1乃至複数個の画素を単位する画像の複数個の区画であり、各単位領域は互いに重なるように設計されていても、又は重なる部分の無いように画像を区分して設計されていても、或いは隣の単位領域との間にどの単位領域にも含まれない画素が存在しても良い。以下、本願において同様である。また、差分画像においては、負の輝度は存在させず、輝度の差とは絶対値をとるものとする。
【0009】
また、請求項2に記載の手段は、2つの撮像装置による2つの撮像画像又は1つの撮像装置の異なる位置における2つの撮像画像の一方を基準画像、他方を被探索画像として、当該基準画像の単位領域ごとに被探索画像の各単位領域中から構成画素の輝度の一致度が最も高い一致単位領域を探索する視差探索方法において、路面を基準とする画像変換であって、前記被探索画像の変換後の路面画像が前記基準画像の路面画像と一致するような変換を前記被探索画像に対して行い、当該変換された被探索画像と、前記基準画像との各画素又は各領域の輝度の差による差分画像を求め、当該差分画像の輝度が所定値以上である不一致領域に含まれる前記基準画像中の各単位領域を水平線に垂直な単位領域列に組分けしたとき、各単位領域列について、最も低い位置の単位領域を特定し、当該最も低い位置の単位領域が路面であるとした場合の、被探索画像中の対応する被探索範囲の水平方向の幅を、前記基準画像中の当該単位領域列の全ての単位領域の被探索画像中の対応する被探索範囲の水平方向の幅とすることを特徴とする。単位領域については請求項1と同様であり、本発明の単位領域列についても、互いに重なるように設計されていても、又は重なる部分の無いように不一致領域を区分するよう設計されていても、或いは隣の単位領域列との間にどの単位領域列にも含まれない画素が存在しても良い。また、水平方向の幅については、そもそも基準画像の各単位領域ごとに、被探索画面中の被探索範囲が設定されていて、それは被探索画面中の基準単位領域とそこからの水平方向の左右幅であり、実際の探索作業においては、基準画像の各単位領域ごとに、被探索画面中の基準単位領域については変化なく、そこからの水平方向の左右幅について、上述の各単位領域列の最も低い位置の単位領域の被探索画像中の対応する被探索範囲の水平方向の左右幅とするものである。
【0010】
また、請求項3に記載の手段は、請求項1又は請求項2に記載の視差探索方法において、前記路面を基準とする画像変換は、実際の路面の形状に拘わらず、路面を平面として推定することを特徴とする。また、請求項4に記載の手段は、前記不一致領域を決定するまでの画像変換においては低い解像度で、視差探索に際しては高い解像度で行うことを特徴とする。
【0011】
また、請求項5に記載の手段は、2つの撮像装置による2つの撮像画像又は1つの撮像装置の異なる位置における2つの撮像画像の一方を基準画像、他方を被探索画像として、当該基準画像の単位領域ごとに被探索画像の各単位領域中から構成画素の輝度の一致度が最も高い一致単位領域を探索する視差探索装置において、路面を基準とする画像変換であって、前記被探索画像の変換後の路面画像が前記基準画像の路面画像と一致するような変換を前記被探索画像に対して行う画像変換手段と、当該変換された被探索画像と、前記基準画像との各画素又は各領域の輝度の差による差分画像を求める差分画像作成手段と、当該差分画像の輝度が所定値以上である不一致領域に対応する、前記基準画像中の単位領域の範囲を探索領域とする探索領域決定手段と、前記基準画像中の探索領域における視差を探索する視差探索手段とを有することを特徴とする。
【0012】
また、請求項6に記載の手段は、2つの撮像装置による2つの撮像画像又は1つの撮像装置の異なる位置における2つの撮像画像の一方を基準画像、他方を被探索画像として、当該基準画像の単位領域ごとに被探索画像の各単位領域中から構成画素の輝度の一致度が最も高い一致単位領域を探索する視差探索装置において、路面を基準とする画像変換であって、前記被探索画像の変換後の路面画像が前記基準画像の路面画像と一致するような変換を前記被探索画像に対して行う画像変換手段と、当該変換された被探索画像と、前記基準画像との各画素又は各領域の輝度の差による差分画像を求める差分画像作成手段と、当該差分画像の輝度が所定値以上である不一致領域に対応する、前記基準画像中の単位領域の範囲を探索領域とする探索領域決定手段と、当該不一致領域に含まれる前記基準画像中の各単位領域を水平線に垂直な単位領域列に組分けし、各単位領域列について、最も低い位置の単位領域を特定し、当該最も低い位置の単位領域が路面であるとした場合の、被探索画像中の対応する被探索範囲の水平方向の幅を、前記基準画像中の当該単位領域列の全ての単位領域の被探索画像中の対応する被探索範囲の水平方向の最大幅として視差を探索する視差探索手段とを有することを特徴とする。
【0013】
また、請求項7に記載の手段は、請求項5又は請求項6に記載の視差探索方法において、画像変化手段、前記差分画像作成手段、前記探索領域決定手段においては低い解像度で、前記視差探索手段においてては高い解像度で画像処理を行うことを特徴とする。
【0014】
【作用及び発明の効果】
本発明の被探索画像の変換は、基準画像と路面画像が一致するのであるから、地上に何も存在しない状態においては、変換後の被探索画像と基準画像とは水平線より手前の画像部分において完全に一致する。すると、変換後の被探索画像と基準画像との間に輝度の一致しない画素があるとすればそれは地上又は空中に物体が存在するからである。よって視差探索において、変換後の被探索画像と基準画像との差分画像で輝度が所定値を越える部分のみを、基準画像における探索領域とし、基準画像中の探索領域を絞り込むことで、全体の計算量を大幅に抑制することができる(請求項1)。
【0015】
また、請求項2の手段によれば、当該絞り込んだ基準画像における探索領域において、次のように更に計算量を抑制できる。即ち、基準画面の路面付近の物体の画像の単位領域と被探索画像の対応単位領域は、路面が一致するような変換が存在することからもわかる通り、その被探索画像での探索範囲は極めて狭い部分で良いはずである。ところが通常は、物体が存在するとして、路面付近かどうかは全くわからないので、極めて広範囲の、即ち水平線方向に極めて長い幅をもたせた被探索範囲を設定していた。そこで、例えば画像中の主たる障害物が車両のように、水平線から下方向に最も離れた部分が路面に密着するもの(車両においては車輪)であるならば、当該路面に密着した物体を含む基準画像の単位領域に対応すべき被探索画像中の単位領域は、極めて狭い被探索範囲に有るはずである。そこでこの狭い被探索範囲を少し大きめに設定しておけば、当該路面に密着した物体よりも路面から離れた部分を含む画像中の単位領域も、当該少し大きめの被探索範囲の幅の中に包含されているはずである。このように路面部分(被探索画像中の探索範囲は極めて小さい)直上の部分においては被探索範囲を極めて狭くできるので、そこから撮像装置までの距離が略同一な部分の画像領域についてはそれより若干大きい探索範囲とすること、即ちそもそも路面部分の被探索範囲を大きめにしておくことで、路面から離れた部分においても狭い被探索範囲中から対応する単位領域を探索することが実現できる。また、他の物体との重なりがある状態においても、路面と密着している部分の距離よりも遠いはずなので、被探索範囲を狭くすることが可能である。これにより、誤対応を抑制することも可能となる(請求項2)。
【0016】
変換画像及び差分画像については、基準画像中の探索領域を絞り込むためのものであるので、路面は常に平面としてパラメータ等を仮定しても(請求項3)、また、2つの撮像画像から解像度を落したものについて用いても(請求項4)、実際の視差探索において解像度を上げることで問題は生じない。これらによって更に大幅な計算量の抑制が可能となる(請求項3、4)。
【0017】
このような視差探索方法はそのまま装置として構成することが可能である(請求項5乃至7)。
【0018】
【発明の実施の形態】
本発明を図を用いて説明する。尚、本発明は以下の実施例に限定されるものではない。以下、車両前方左右にカメラを設置し、車両進行方向にカメラの消失点を有し、互いに水平線の位置が一致するような左右カメラ画像を仮定する。
【0019】
図1の(a)、(b)のように、左右カメラ画像が得られたとする。ここで、地上に道路表示以外何も無い状態であったとすると、それは図2の(a)、(b)のようである。図2の(a)の左カメラ画像において、車両が進行する走行レーンの左側表示をLL、右側表示をLRとする。また、図2の(b)の右カメラ画像において、車両が進行する走行レーンの左側表示をLL、右側表示をLRとする。図2の(a)図と、(b)図とを重ね、各レーンのエッジ線と水平線のみを示すと図3の(a)のようになる。ここで、各々2本の実線で示されたエッジを有するものが図2(a)の左カメラ画像の走行レーンの左側表示LL、右側表示LRであり、各々2本の点線で示されたエッジを有するものが図2(b)の右カメラ画像の走行レーンの左側表示LL、右側表示LRである。これから明らかなように、図2の(a)を変換して図2の(b)に重ねるためには、次のような画像変換をすれば良い。ただしここでは原点を消失点、左カメラ画像上水平右方向にx軸、x軸に垂直上方向にy軸をとり、右カメラ画像上水平右方向にx’軸、x’軸に垂直上方向にy’軸をとり、aは正の定数である。
【0020】
【数1】
x’=x+ay,
y’=y
【0021】
数1の関係を水平線よりも上方部分でも適用するならば、図3の(b)のようになる。ここで指摘しておくと、図3の(a)及び図3の(b)の水平線の下側で示された矢印の長さ、即ち左カメラ画像を右カメラ画像に路面が一致するように変換するものは、路面のカメラからの距離が近いほど、x座標が大きく変換される。今、レーンに垂直、即ちカメラの軸線に垂直に平面を立て、その平面上のの模様等を左カメラ画像と右カメラ画像で撮像したとする。ここで左カメラ画像を変換して右カメラ画像と重ね合わせる場合、当該レーンに垂直な平面が路面と交わる部分における変換量と同等にその平面上の全ての模様を変換しなければ左カメラ画像の変換画像の当該平面上の模様は右カメラ画像中の模様と一致しない。すると、図3の(b)のように、カメラからの距離に関係なく、左カメラ画像の水平線より下側の画像を「路面を変換する」のと同様に変換して右カメラ画像と比較すると、路面及び路面に密着した部分以外の障害物等の画像は、当該変換後の左カメラ画像と右カメラ画像とで必ずずれが生じることとなる。即ち、立体物等と路面が渾然一体となって撮像された左右カメラ画像において、左カメラ画像の路面が右カメラ画像のそれと一致するよう左カメラ画像の変換を行うと、左カメラ画像中の真の立体画像部分が歪んだ画像となる。
【0022】
そこで数1の関係(定数aは変換後の左カメラ画像と右カメラ画像の路面が一致するよう決定しておく)により図1(a)の左カメラ画像を変換すると図4のようになる。先行車両の画像は路面に密着した車輪部分から上が右方向に傾いたように変形している。次に図4の変換画像と図1(b)の右カメラ画像の輝度の差(絶対値とする)による差分画像をもとめると、大略図5のようになる。ここで、ボディや後部ガラスの輝度に変化無い部分は、互いに別の部分の画像であっても輝度の差分が0に近くなる。こうして、図5の差分画像の輝度が0でない部分を覆うように、図6のように、図1(b)の右カメラ画像において探索領域SAを決定する。図6の探索領域SAは、図1(b)の右カメラ画像における従来の探索領域よりも極めて狭く、視差探索において計算量を抑制することができる。
【0023】
更に、図7(b)のように、図6の探索領域SAを各単位領域(例えばA)の幅で区分して、縦方向の単位領域列Cに区分けする。ここで単位領域列Cの水平線から最も離れた下側の位置の単位領域ASRは、路面に密着する車輪の画像を含んでおり、その図7(a)の左カメラ画像中での被探索範囲RSLは、単位領域ASLを基準として水平方向に左右幅を有するものである。この図7(b)の各単位領域ごとに、路面であると仮定して対応する図7(a)の単位領域と水平方向の左右幅は数1に基づいてもともと設定されているのであるが、これを各単位領域列Cごとに、水平方向の左右幅を最も水平線から離れた下側の位置の単位領域ASRの図7(a)での被探索範囲の左右幅に一致させる。このことにより、元々より広い被探索範囲の左右幅を有する水平線に近い位置の右カメラ画像の単位領域に対する左カメラ画像の被探索範囲を狭くすることができる。これは、前方障害物の各単位領域列Cで把握される部分の左右カメラからの距離が、路面に密着する車輪の画像を有する単位領域ASRで把握される部分の左右カメラからの距離と大差が無く、他の物体との重なりがある場合でも当該距離より遠いとの前提によるものである。これにより計算量を更に抑制すると共に、水平方向に類似部分の多い車両等の両眼視における誤対応を抑制することも可能となる。
【0024】
上記の本発明は、具体的にはソフトウエア的にメモリとCPUによって実施できる。また、システムLSI等、ハードウエア的に処理する形でも実施可能である。これをフローチャートで説明する。以下において、本文中では「ステップ102等」との記載は図では「S102等」と記載し、本文中では「左カメラ画像」、「右カメラ画像」、「左及び右カメラ画像」との記載は図では「左画像」、「右画像」、「左右画像」と記載するものとする。左及び右カメラは上述の通り設定及び調整されており、左及び右カメラ画像はいずれも水平線がx軸、消失点が原点となるような画像であるものとする。
【0025】
〔第1実施例〕
本実施例は図8及び図9のフローチャートにより構成されるものである。まず、図8のステップ102において、左及び右カメラ画像の各画素の輝度が読み出されて記憶される。以下、本フローチャート終了まで、この読み出された各画素の輝度により左及び右カメラ画像が構成される。
【0026】
次にステップ104において、左カメラ画像から上記数1式により変換画像を作成される。次にステップ106において、変換画像の各画素の輝度と、同一座標の右カメラ画像の各画素の輝度の差の絶対値を当該座標の画素の輝度とする、差分画像が作成される。次にステップ108において、差分画像において輝度がある設定値よりも大きい画素の座標についてフラグが立てられ、探索領域が決定される。次に図9のフローチャートに移る。
【0027】
図9のステップ110において、右カメラ画像中の単位領域のうち、上記差分画像においてフラグが立てられた画素を含むか否かで単位領域を判別し、差分画像においてフラグが立てられた画素を含む単位領域群(探索領域を内包する)が決定される。以下この単位領域群を「探索領域」と呼ぶ。次にステップ112において、当該単位領域群のうち、初期値としての単位領域が決定される。例えば各単位領域が矩形状であるとしてその左下隅の画素の座標により当該単位領域を並べて番号を振るなどし、第1の番号を振られた単位領域を決める。
【0028】
次にステップ114において、右カメラ画像の探索領域中の当該単位領域に対応して予め記憶されていた左画像中の単位領域と、それについての被探索範囲が読み出される。例えば左画像中の単位領域の左下隅の画素の座標(x,y)と、x軸方向に−x、+x(x、xは負でない整数)などと記憶されており、被探索範囲は左下隅の画素のx座標がx−xからx+xで、y座標がyのもの単位領域の集合となる。この被探索範囲のx座標の上限x−x及び下限x+xが記憶される。次にステップ116において、左カメラ画像の被探索範囲中の単位領域の初期値が決定される。例えば左下隅の画素のx座標がx−x、左カメラ画像のy座標がyである単位領域である。
【0029】
次にステップ118において、右カメラ画像の探索領域中の当該単位領域の各画素の輝度と、左カメラ画像の被探索範囲中の単位領域の各画素の輝度の一致度が計算され、左カメラ画像の単位領域の左下隅の画素の座標と共に記憶される。この一致度は上述の非特許文献1に記載の計算方法でも良く、任意である。次にステップ120において、一致度を計算した左カメラ画像の単位領域の左下隅の画素のx座標が上限値(x+x)であるかどうかが判定される。一致度を計算した左カメラ画像の単位領域の左下隅の画素のx座標が上限値(x+x)でない場合はステップ122に移り、左カメラ画像の被探索範囲内で単位領域を更新する。例えば単位領域の左下隅の画素のx座標を1増加させる。こののちステップ118に戻ってこの処理を繰り返す。一方ステップ120において一致度を計算した左カメラ画像の単位領域の左下隅の画素のx座標が上限値であると判定された場合は、一致度の最も高い左カメラ画像の単位領域を、右カメラ画像の単位領域と一致するものと判定し、当該左カメラ画像の単位領域の左下隅の画素のx座標を記憶する。次にステップ126において、一致する、右カメラ画像の単位領域と左カメラ画像の単位領域の、左下隅の画素のx座標の差とy座標とから、右カメラ画像の当該単位領域についての視差が算定され、右カメラ画像の当該単位領域の左下隅の画素の座標と共に記憶される。
【0030】
次にステップ128に移り、視差を算定された右カメラ画像の当該単位領域が、探索領域中の最終単位領域かどうかが判定される。最終単位領域でないならば、ステップ130に移り、右カメラ画像中の単位領域を次の単位領域に更新する。例えば当該単位領域の左下隅の画素の座標で更新され、ステップ114に戻って処理が繰り返される。一方、ステップ128で、探索領域中の最終単位領域であると判定されれば、右カメラ画像における探索領域の全ての単位領域について視差が算定されたことになるので、処理を終了する。
【0031】
〔第2実施例〕
本実施例は前半を図8のフローチャート、後半を図10のフローチャートにより構成されるものである。尚、図10のフローチャートは紙面の都合により一部をサブルーチンとして図11にその内容を示す。まず、第1実施例と同様に、ステップ102から108の処理が行われる。
【0032】
次に、ステップ202において、第1実施例のステップ110と同様にして、右カメラ画像中の探索領域を内包する単位領域群(探索領域)が決定される。次にこの探索領域を、左下隅の画素のx座標が同じものからなる単位領域列に区分けする。ここにおいて、全単位領域列について番号が振られ、また各単位領域列内部での単位領域の番号が振られ、のちの処理順序が決定される。次にステップ206に移り、単位領域列の初期値、例えば左下隅の画素のx座標が最も小さい単位領域列が初期値として選ばれる。
【0033】
次に、ステップ208において、右カメラ画像の単位領域列中の、左下隅の画素のy座標が最も小さい(最下段の)単位領域ASRが確定される。次にステップ210において、右カメラ画像の単位領域ASRに対応する左カメラ画像の単位領域ASLと、それについての被探索範囲が読み出される。この具体例は第1実施例(図9)のステップ114のものと同一である。右カメラ画像の単位領域ASRに対応する左カメラ画像の被探索範囲RSLは、例えば以下に既述するように予め計算して格納しておく。
【数2】
=x,
=y,
=0,
=ay
【0034】
ここで、右カメラ画像の単位領域ASRの左下隅座標を(x,y)、左カメラ画像の被探索範囲RSLの左下隅座標を(x,y)、左方向への幅をx、右方向への幅をx、aは数1のaと同一である。こうして、被探索範囲についての条件を得て、視差算定サブルーチン(SubR.)に移る。
【0035】
視差算定サブルーチン(図10でSubR.)の内容を図11に示す。まず、ステップ302において、右画像中の単位領域Aに対応する左カメラ画像中の単位領域Aを確定する。次にステップ304において、上記右カメラ画像の単位領域列中の最下段の単位領域ASRに対応する左カメラ画像の単位領域ASLについての被探索範囲の条件を左カメラ画像中の単位領域Aについて適用する。こうして、被探索範囲が確定する。次にステップ306において、被探索範囲内の単位領域の初期値が決定される。例えばx座標が被探索範囲の下限値であるものである。
【0036】
以下、ステップ308乃至316の処理は第1実施例(図9)のステップ118乃至126と同様である。即ち、ステップ308において、右カメラ画像の探索領域中の当該単位領域の各画素の輝度と、左カメラ画像の被探索範囲中の単位領域の各画素の輝度の一致度が計算され、左カメラ画像の単位領域の左下隅の画素の座標と共に記憶される。次にステップ310において、一致度を計算した左カメラ画像の単位領域の左下隅の画素のx座標が上限値であるかどうかが判定される。一致度を計算した左カメラ画像の単位領域の左下隅の画素のx座標が上限値でない場合はステップ312に移り、左カメラ画像の被探索範囲内で単位領域を更新し、ステップ308に戻ってこの処理を繰り返す。一方ステップ310において一致度を計算した左カメラ画像の単位領域の左下隅の画素のx座標が上限値であると判定された場合は、一致度の最も高い左カメラ画像の単位領域を、右カメラ画像の単位領域と一致するものと判定し、当該左カメラ画像の単位領域の左下隅の画素のx座標を記憶する。次にステップ316において、一致する、右カメラ画像の単位領域と左カメラ画像の単位領域の、左下隅の画素のx座標の差とy座標とから、右カメラ画像の当該単位領域についての視差が算定され、右カメラ画像の当該単位領域の左下隅の画素の座標と共に記憶される。こうして視差算定サブルーチンは終了する。
【0037】
次に図10において、視差算定サブルーチン(SubR.)が終了すると、ステップ212に移り、視差を算定した右カメラ画像の単位領域が、単位領域列の最上段の単位領域かどうかが判定される。視差を算定した右カメラ画像の単位領域が、単位領域列の最上段の単位領域でない場合は、単位領域の左下隅の画素のy座標を1増加させて視差算定サブルーチン(SubR.)を起動し、処理を繰り返す。一方、視差を算定した右カメラ画像の単位領域が、単位領域列の最上段の単位領域で有る場合はステップ216に移り、現単位領域列が最終単位領域列であるかどうかが判定される。現単位領域列が最終単位領域列でない場合はステップ218に移り、単位領域列として、例えばx座標を1増加させた単位領域列を新たな単位領域列としてステップ208以下の処理を繰り返す。一方、現単位領域列が最終単位領域列である場合は処理を終了する。
【0038】
〔変形例〕
図12は、図8を一部変更したものであり、第1実施例、第2実施例の変形例として構成されるものである。即ち、第1実施例の変形例としては図12を前半、図9を後半とし、第2実施例の変形例としては図12を前半、図10(そのなかのSubR.については図11)を後半として構成される。本変形例においては、探索領域決定までを低解像度画像によるものである。左及び右カメラ画像の定解像度画像を粗左及び粗右カメラ画像と呼ぶものとする。
【0039】
まず、ステップ402において、左及び右カメラ画像が読み出され、記憶される。次にステップ404において、左及び右カメラ画像を順次読み出し、低解像度画像に変換して、粗左及び粗右カメラ画像として別途記憶する。低解像度画像への変換は、矩形状、例えば4個×4個の16個の画素ごとに輝度を平均して、1個の画素として都合1/16の画素数の画像を作れば良い。この時、元となる左及び右カメラ画像は消去されない。
【0040】
次にステップ406において、粗左カメラ画像から上記数1の変換公式により、粗変換画像を作成する。尚、低解像度画像の作成が正方形の画素を輝度平均させるものでない場合は、それに応じて数1の変換公式の定数aを調整する。次にステップ408において、粗変換画像と粗右カメラ画像の各画素の輝度の差の絶対値を当該画素の輝度とする粗差分画像を作成する。次にステップ410において、粗差分画像から探索領域を決定する。ここで、探索領域は、第1、第2実施例の図8のステップ108と同様にまず粗差分画像中の画素の座標として設定された後、解像度の高い右カメラ画像中の画素の座標として設定される。例えば粗差分画像中の1画素に対し、右カメラ画像の16画素を対応させ、当該右カメラ画像の16画素に全てフラグを立てる。
【0041】
以下は図9、図10(及び図11)の処理と同様に処理される。本変形例は変換画像、差分画像、探索領域決定が定解像度画像で処理されるため、処理時間の短縮、記憶容量の抑制を図ることができ、処理装置の高速化及び小型化が可能となる。
【図面の簡単な説明】
【図1】(a)は車両前方左に固定されたカメラからの先行車両を含む画像、(b)は車両前方右に固定されたカメラからの先行車両を含む画像。
【図2】(a)は車両前方左に固定されたカメラからの障害物のない、走行レーン表示のある地表のみの画像、(b)は車両前方右に固定されたカメラからの障害物のない、走行レーン表示のある地表のみの画像。
【図3】(a)は、図2(a)のエッジラインを実線で、図2の(b)のエッジラインを破線で示して重ね合わせて示すことによる、路面画像変換の説明図、(b)は、(a)の路面画像変換を水平線上方にも適用した変換の説明図
【図4】図3(b)の変換(数1)による図1(a)の変換画像。
【図5】図4と図1(b)の差分画像。
【図6】図5で輝度が所定値以上であった領域を図1(b)上で示した図。
【図7】(a)は左カメラ画像中の各被探索範囲を示す説明図、(b)は右カメラ画像中の探索範囲を単位領域列に区分けしたことを示す説明図。
【図8】第1、第2実施例におけるフローチャートの前半。
【図9】第1実施例におけるフローチャートの後半。
【図10】第2実施例におけるフローチャートの後半。
【図11】第2実施例における一致度算定サブルーチンのフローチャート。
【図12】第1、第2実施例の変形例におけるフローチャートの前半。
【符号の説明】
下付きの「」 左カメラ画像中のものを示す。
下付きの「」 右カメラ画像中のものを示す。
,A 視差探索のための単位領域
左カメラ画像中の単位領域Aについての被探索範囲
LL,LL 左右カメラ画像に撮像された左レーン
LR,LR 左右カメラ画像に撮像された右レーン
SA 右カメラ画像中の探索領域
右カメラ画像中の探索領域を区分けした各単位領域列
SR 右カメラ画像中のある単位領域列における最下位置の単位領域
SL 右カメラ画像中の単位領域ASRに対応づけされた左カメラ画像中の単位領域
SL 左カメラ画像中の単位領域ASLについての被探索範囲
R’ 左カメラ画像中の単位領域Aについて、修正された被探索範囲
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a parallax search method for obtaining parallax information of a pixel region having a high degree of coincidence from two captured images captured by two imaging devices whose positions and imaging directions are determined in advance. The present invention is particularly useful as one step in image analysis by binocular vision for recognizing the distance of a vehicle traveling on a road surface to an obstacle such as a preceding vehicle.
[0002]
[Prior art]
There is widely known a method of obtaining parallax information of a pixel region having a high degree of coincidence from two captured images obtained by so-called binocular vision, and determining a distance from two imaging devices whose positions and imaging directions are determined in advance. Have been. For example, see Patent Document 1 and Non-Patent Document 1.
[0003]
[Patent Document 1]
JP-A-2001-243456
[Non-patent document 1]
Xu Go and Saburo Tsuji, 3D Vision, First Edition, 2nd Press, Kyoritsu Shuppan, May 25, 1999, pp. 95-103
[0004]
This technique will be described with reference to FIG. FIG. 1 shows images captured by two cameras installed at the left end and the right end in front of the vehicle, where the imaging center is a vanishing point in the traveling direction of the vehicle, and the positions of the horizontal lines are set to coincide with each other. 1A is a left camera image, and FIG. 1B is a right camera image, in which a rear part of a preceding vehicle is photographed. Although the white line is a traveling lane marked with a road surface, it is shown by a continuous line for explanation, and the lane width is shown to be substantially equal to the width of the vehicle.
[0005]
Here, one unit is set as a reference image, and a unit area for search composed of a plurality of pixels is determined. In FIG. 1, the right camera image shown in FIG. R (A), an area having the highest degree of matching of the luminance of the constituent pixels is searched from the unit area of the left camera image in (a).
[0006]
[Problems to be solved by the invention]
1A and 1B, the unit area A of the right camera image of FIG. R Matches the unit area A of the left camera image in FIG. L Can be easily understood. However, in order for the CPU to perform a parallax search, for example, the unit area A R And the position on the vertical axis coincide with each other and a certain range is provided in the horizontal axis direction. L It is necessary to compare the degree of coincidence with all the unit areas. By the way, for calculating the degree of coincidence, for example, a correlation value such as that described in Non-Patent Document 1 can be calculated, and many other methods are conceivable, but all of them require an enormous amount of calculation. In addition, since only the degree of coincidence for each unit area is used as a reference, erroneous correspondence that unit areas of left and right camera images that originally do not correspond correspond to each other frequently occurs.
[0007]
The present invention has been made to solve the above-described problem, and an object of the present invention is to reduce the amount of calculation and incorrect correspondence in a parallax search.
[0008]
[Means for Solving the Problems]
In order to solve the above-mentioned problem, the means according to claim 1 is configured such that one of two captured images by two imaging devices or two captured images at different positions of one imaging device is a reference image, and the other is a searched image. In a parallax search method for searching for a matching unit area having the highest degree of matching of the luminance of constituent pixels from each unit area of the searched image for each unit area of the reference image, the image conversion based on the road surface is performed. Performing a conversion on the searched image so that the converted road surface image of the searched image matches the road surface image of the reference image, and converting the searched image and each pixel of the reference image. Alternatively, a difference image based on a difference between the brightnesses of the respective regions is obtained, and a range of a unit region in the reference image corresponding to a mismatched region in which the brightness of the difference image is equal to or more than a predetermined value is set as a search region. Here, the unit area of the image is a plurality of sections of the image in which one or more pixels are set as desired, and the unit areas are designed to overlap each other, The image may be designed so as to be divided so as not to exist, or a pixel not included in any unit area may be present between the adjacent unit area. Hereinafter, the same applies to the present application. Further, in the difference image, no negative luminance is present, and the luminance difference takes an absolute value.
[0009]
According to a second aspect of the present invention, one of two captured images by two imaging devices or two captured images at different positions of one imaging device is a reference image, and the other is a searched image, and In a parallax search method for searching for a matching unit area having the highest degree of matching of the luminance of constituent pixels from each unit area of a searched image for each unit area, the image conversion is performed on the basis of a road surface. Performs a conversion such that the converted road surface image matches the road surface image of the reference image, on the searched image, and converts the searched image and the luminance of each pixel or each region of the reference image. A difference image based on the difference is obtained, and when each unit area in the reference image included in the mismatched area where the luminance of the difference image is equal to or more than a predetermined value is grouped into a unit area row perpendicular to the horizontal line, the In the case where the unit area at the lowest position is specified and the unit area at the lowest position is a road surface, the horizontal width of the corresponding search range in the search image is set to the corresponding width in the reference image. The horizontal width of the corresponding search range in the search image of all the unit areas in the unit area row is characterized. The unit area is the same as in claim 1, and the unit area row of the present invention may be designed so as to overlap each other, or may be designed so as to partition the mismatched area so that there is no overlapping part. Alternatively, a pixel that is not included in any unit area row may exist between the adjacent unit area row. Regarding the width in the horizontal direction, a search range in the search target screen is set for each unit area of the reference image in the first place, which is the reference unit area in the search target screen and the left and right in the horizontal direction from there. In the actual search operation, for each unit area of the reference image, the reference unit area in the searched screen remains unchanged, and the horizontal width from that point to the left and right width of each of the unit area columns described above. The horizontal width in the horizontal direction of the corresponding search range in the search image of the lowest unit area.
[0010]
According to a third aspect of the present invention, in the parallax search method according to the first or second aspect, the image conversion based on the road surface is performed by estimating the road surface as a plane regardless of the actual shape of the road surface. It is characterized by doing. Further, the means according to claim 4 is characterized in that the image conversion up to the determination of the mismatch area is performed at a low resolution, and the parallax search is performed at a high resolution.
[0011]
According to a fifth aspect of the present invention, one of two captured images obtained by two imaging devices or two captured images at different positions of one imaging device is set as a reference image, and the other is set as a search target image. In a parallax search device that searches for a matching unit area having the highest degree of matching of the luminance of constituent pixels from each unit area of a searched image for each unit area, an image conversion based on a road surface is performed. Image conversion means for performing a conversion on the searched image so that the converted road surface image matches the road surface image of the reference image, and each converted pixel or each of the converted searched image and the reference image. A difference image creating means for finding a difference image based on the difference in brightness between the areas; and a search area that uses a range of the unit area in the reference image corresponding to a non-match area where the brightness of the difference image is equal to or more than a predetermined value as a search area. Determining means, and having a disparity search means for searching the disparity in the search area in the reference image.
[0012]
According to a sixth aspect of the present invention, one of two captured images by two imaging devices or two captured images at different positions of one imaging device is set as a reference image, and the other is set as a search target image. In a parallax search device that searches for a matching unit area having the highest degree of matching of the luminance of constituent pixels from each unit area of a searched image for each unit area, an image conversion based on a road surface is performed. Image conversion means for performing a conversion on the searched image so that the converted road surface image matches the road surface image of the reference image, and each converted pixel or each of the converted searched image and the reference image. A difference image creating means for finding a difference image based on the difference in brightness between the areas; and a search area that uses a range of the unit area in the reference image corresponding to a non-match area where the brightness of the difference image is equal to or more than a predetermined value as a search area. Determining means, grouping each unit area in the reference image included in the mismatched area into a unit area row perpendicular to a horizontal line, and identifying a unit area at the lowest position for each unit area row; If the unit area of the position is a road surface, the width in the horizontal direction of the corresponding search range in the search image is set in the search image of all the unit areas of the unit area row in the reference image. And a parallax searching means for searching for parallax as a maximum width in the horizontal direction of a corresponding search range.
[0013]
The means according to claim 7 is the parallax search method according to claim 5 or claim 6, wherein the image change means, the difference image creation means, and the search area determination means perform the parallax search at a low resolution. In the means, image processing is performed at a high resolution.
[0014]
[Action and effect of the invention]
In the conversion of the searched image according to the present invention, since the reference image and the road surface image coincide with each other, in a state where nothing exists on the ground, the converted searched image and the reference image are in an image portion before the horizontal line. Exact match. Then, if there is a pixel whose luminance does not match between the converted image to be searched and the reference image, this is because an object exists on the ground or in the air. Therefore, in the parallax search, only the portion of the difference image between the converted image to be searched and the reference image whose luminance exceeds a predetermined value is set as the search region in the reference image, and the search region in the reference image is narrowed down, so that the entire calculation is performed. The amount can be significantly reduced (claim 1).
[0015]
According to the second aspect of the present invention, the amount of calculation can be further reduced in the search area in the narrowed reference image as follows. In other words, the unit area of the image of the object near the road surface on the reference screen and the corresponding unit area of the searched image have a very large search range in the searched image, as can be seen from the fact that there is a conversion that matches the road surface. Should be good in narrow areas. However, since it is usually not known at all that there is an object or not near the road surface, an extremely wide range, that is, a search range having an extremely long width in the horizontal direction is set. Therefore, for example, if the main obstacle in the image is a vehicle, such as a vehicle, where the portion farthest downward from the horizon is in close contact with the road surface (wheel in the case of a vehicle), the reference including the object in close contact with the road surface The unit area in the searched image that should correspond to the unit area of the image should be in a very narrow search range. Therefore, if this narrow search range is set slightly larger, the unit area in the image including a portion farther from the road surface than the object that is in close contact with the road surface also falls within the width of the slightly larger search range. Should be included. As described above, the searchable range can be extremely narrow immediately above the road surface portion (the search range in the search target image is extremely small). By setting the search range to be slightly larger, that is, by making the search range of the road surface portion larger in the first place, it is possible to search for a corresponding unit area from a narrow search range even in a portion distant from the road surface. Further, even in a state where there is an overlap with another object, the distance to be searched for can be narrowed because the distance should be longer than the distance of the portion in close contact with the road surface. Thereby, it is also possible to suppress erroneous responses (claim 2).
[0016]
Since the converted image and the difference image are for narrowing the search area in the reference image, the road surface is always assumed to be a plane and parameters are assumed (claim 3). Even if the dropped object is used (claim 4), no problem occurs by increasing the resolution in the actual parallax search. With these, it is possible to further suppress the amount of calculation (claims 3 and 4).
[0017]
Such a parallax search method can be configured as an apparatus as it is (claims 5 to 7).
[0018]
BEST MODE FOR CARRYING OUT THE INVENTION
The present invention will be described with reference to the drawings. Note that the present invention is not limited to the following embodiments. Hereinafter, it is assumed that the cameras are installed on the left and right sides in front of the vehicle, the left and right camera images have the vanishing points of the cameras in the vehicle traveling direction, and the positions of the horizontal lines coincide with each other.
[0019]
It is assumed that the left and right camera images are obtained as shown in FIGS. Here, if there is no state other than the road display on the ground, it is as shown in FIGS. 2A and 2B. In the left camera image of FIG. 2A, the left display of the traveling lane in which the vehicle travels is LL. L , Right display LR L And In the right camera image of FIG. 2B, the left display of the traveling lane in which the vehicle travels is indicated by LL. R , Right display LR R And 2A and 2B are superimposed, and only the edge line and the horizontal line of each lane are shown in FIG. 3A. Here, those having edges indicated by two solid lines are the left display LL of the traveling lane of the left camera image in FIG. L , Right display LR L , And each having two dashed edges is the left display LL of the traveling lane in the right camera image of FIG. 2B. R , Right display LR R It is. As is clear from this, in order to convert (a) in FIG. 2 and overlap with (b) in FIG. 2, the following image conversion may be performed. However, here, the origin is the vanishing point, the x-axis is taken horizontally and rightward on the left camera image, the y-axis is taken vertically upward on the x-axis, and the x'-axis and right-hand upward on the right camera image. Takes the y 'axis, and a is a positive constant.
[0020]
(Equation 1)
x '= x + ay,
y '= y
[0021]
If the relationship of Equation 1 is applied to a portion above the horizontal line, the result is as shown in FIG. Here, it should be pointed out that the length of the arrow shown below the horizontal line in FIG. 3A and FIG. 3B, that is, the left camera image is adjusted so that the road surface matches the right camera image. As for the object to be converted, the x coordinate becomes larger as the distance of the road surface from the camera becomes shorter. Now, it is assumed that a plane is set up perpendicularly to the lane, that is, perpendicular to the axis of the camera, and the pattern on the plane is captured by the left camera image and the right camera image. Here, when converting the left camera image and superimposing it on the right camera image, if all the patterns on the plane are not converted to the same amount as the conversion amount at the portion where the plane perpendicular to the lane intersects the road surface, the left camera image The pattern on the plane of the converted image does not match the pattern in the right camera image. Then, as shown in FIG. 3B, regardless of the distance from the camera, the image below the horizontal line of the left camera image is converted in the same manner as “converting the road surface” and compared with the right camera image. In addition, an image of an obstacle or the like other than the road surface and a portion that is in close contact with the road surface always causes a shift between the left camera image and the right camera image after the conversion. In other words, when the left camera image is converted so that the road surface of the left camera image coincides with that of the right camera image in the left and right camera images obtained by capturing the three-dimensional object and the road surface in unison, the true Is a distorted image.
[0022]
Therefore, when the left camera image of FIG. 1A is converted according to the relationship of Expression 1 (the constant a is determined so that the road surface of the converted left camera image matches the road surface of the right camera image), the result is as shown in FIG. The image of the preceding vehicle is deformed such that the upper part is inclined rightward from the wheel portion closely contacting the road surface. Next, when a difference image based on a difference (absolute value) between the luminance of the converted image of FIG. 4 and the right camera image of FIG. Here, the difference between the luminance of the portion where the luminance of the body and the rear glass does not change is close to 0 even if the images are different from each other. In this way, as shown in FIG. 6, the search area SA in the right camera image of FIG. R To determine. Search area SA in FIG. R Is extremely narrower than the conventional search area in the right camera image in FIG. 1B, and the amount of calculation in the parallax search can be suppressed.
[0023]
Further, as shown in FIG. 7B, the search area SA in FIG. R To each unit area (for example, A R ), And the vertical unit area row C R Is divided into Here, the unit area row C R Unit area A at the lowermost position farthest from the horizontal line SR Includes an image of a wheel that is in close contact with the road surface, and the search range R in the left camera image of FIG. SL Is the unit area A SL Has a horizontal width in the horizontal direction on the basis of. For each unit area in FIG. 7B, the corresponding unit area in FIG. 7A and the horizontal width in the horizontal direction are originally set based on Equation 1 assuming that the unit area is a road surface. , This is referred to as each unit area row C R The unit area A at the lowermost position where the horizontal width in the horizontal direction is farthest from the horizontal line SR 7 (a) in FIG. 7 (a). This makes it possible to narrow the search range of the left camera image with respect to the unit area of the right camera image at a position close to the horizontal line having the wider left and right width of the search range. This is because each unit area row C of the front obstacle R The distance from the left and right cameras of the portion grasped by the unit area A having the image of the wheel in close contact with the road surface SR This is based on the premise that there is no great difference from the distance from the left and right cameras of the part grasped by the above, and even if there is an overlap with another object, it is farther than the distance. As a result, the amount of calculation can be further suppressed, and erroneous correspondence in binocular vision of a vehicle or the like having many similar parts in the horizontal direction can be suppressed.
[0024]
The present invention described above can be specifically implemented by a memory and a CPU in software. Further, the present invention can also be implemented in a form of processing by hardware such as a system LSI. This will be described with reference to a flowchart. In the following, in the text, "step 102 etc." will be described as "S102 etc." in the figure, and in the text, "left camera image", "right camera image", "left and right camera image" will be described. Are described as “left image”, “right image”, and “left and right image” in the figure. The left and right cameras are set and adjusted as described above, and the left and right camera images are both images in which the horizontal line is the x-axis and the vanishing point is the origin.
[0025]
[First embodiment]
This embodiment is configured by the flowcharts of FIGS. First, in step 102 of FIG. 8, the luminance of each pixel of the left and right camera images is read and stored. Hereinafter, the left and right camera images are constituted by the read luminance of each pixel until the end of this flowchart.
[0026]
Next, in step 104, a converted image is created from the left camera image by the above equation (1). Next, in step 106, a difference image is created in which the absolute value of the difference between the luminance of each pixel of the converted image and the luminance of each pixel of the right camera image at the same coordinate is set as the luminance of the pixel at that coordinate. Next, in step 108, a flag is set for the coordinates of the pixels in the difference image whose luminance is greater than a certain set value, and the search area is determined. Next, the procedure moves to the flowchart of FIG.
[0027]
In step 110 of FIG. 9, the unit area is determined based on whether or not the difference image includes a flagged pixel in the difference image, and the difference image includes the flagged pixel in the difference image. A unit area group (including the search area) is determined. Hereinafter, this unit area group is referred to as a “search area”. Next, in step 112, a unit area as an initial value is determined from the unit area group. For example, assuming that each unit area is rectangular, the unit areas are arranged and numbered according to the coordinates of the pixel at the lower left corner, and the first numbered unit area is determined.
[0028]
Next, in step 114, a unit area in the left image and a search range for the unit area in the left image which are stored in advance corresponding to the unit area in the search area of the right camera image are read. For example, the coordinates of the pixel at the lower left corner of the unit area in the left image (x 0 , Y 0 ) And -x in the x-axis direction. 1 , + X 2 (X 1 , X 2 Is a non-negative integer), and the search range is x coordinates of the pixel at the lower left corner. 0 -X 1 To x 0 + X 2 And the y coordinate is y 0 Is a set of unit areas. The upper limit x of the x coordinate of this search range 0 -X 1 And lower limit x 0 + X 2 Is stored. Next, in step 116, the initial value of the unit area in the searched range of the left camera image is determined. For example, if the x coordinate of the pixel at the lower left corner is x 0 -X 1 , The y coordinate of the left camera image is y 0 Is a unit area.
[0029]
Next, in step 118, the degree of coincidence between the luminance of each pixel in the unit area in the search area of the right camera image and the luminance of each pixel in the unit area in the search range of the left camera image is calculated. Is stored together with the coordinates of the pixel at the lower left corner of the unit area. This degree of coincidence may be the calculation method described in Non-Patent Document 1 described above, and is arbitrary. Next, in step 120, the x coordinate of the pixel at the lower left corner of the unit area of the left camera image for which the degree of coincidence has been calculated is the upper limit value (x 0 + X 2 ) Is determined. The x coordinate of the pixel at the lower left corner of the unit area of the left camera image for which the degree of coincidence has been calculated is the upper limit value (x 0 + X 2 If not, the process moves to step 122, and the unit area is updated within the searched range of the left camera image. For example, the x coordinate of the pixel at the lower left corner of the unit area is increased by one. Thereafter, the process returns to step 118 to repeat this processing. On the other hand, if it is determined in step 120 that the x coordinate of the pixel at the lower left corner of the unit area of the left camera image for which the degree of coincidence has been calculated is the upper limit, the unit area of the left camera image having the highest degree of coincidence is replaced with the right camera It is determined that they match the unit area of the image, and the x coordinate of the pixel at the lower left corner of the unit area of the left camera image is stored. Next, in step 126, the parallax for the unit area of the right camera image is determined from the difference between the x coordinate and the y coordinate of the pixel at the lower left corner of the corresponding unit area of the right camera image and the unit area of the left camera image. It is calculated and stored together with the coordinates of the pixel at the lower left corner of the unit area of the right camera image.
[0030]
Next, the process proceeds to step 128, where it is determined whether or not the unit area of the right camera image for which the parallax has been calculated is the last unit area in the search area. If it is not the last unit area, the process moves to step 130, and the unit area in the right camera image is updated to the next unit area. For example, the coordinates of the pixel at the lower left corner of the unit area are updated, and the process returns to step 114 to repeat the processing. On the other hand, if it is determined in step 128 that this is the last unit area in the search area, the parallax has been calculated for all the unit areas in the search area in the right camera image, and the process ends.
[0031]
[Second embodiment]
In the present embodiment, the first half is configured by the flowchart of FIG. 8, and the second half is configured by the flowchart of FIG. Note that the flowchart of FIG. 10 is partially shown as a subroutine in FIG. 11 for the sake of space. First, similarly to the first embodiment, the processing of steps 102 to 108 is performed.
[0032]
Next, in step 202, similarly to step 110 of the first embodiment, a unit area group (search area) including the search area in the right camera image is determined. Next, the search area is divided into unit area rows in which the x coordinate of the pixel at the lower left corner is the same. Here, numbers are assigned to all unit area columns, unit area numbers are assigned inside each unit area column, and the processing order is determined later. Next, the process proceeds to step 206, where the initial value of the unit area row, for example, the unit area row having the smallest x coordinate of the pixel at the lower left corner is selected as the initial value.
[0033]
Next, in step 208, the y-coordinate of the pixel at the lower left corner in the unit area sequence of the right camera image is the smallest (lowest tier) unit area A. SR Is determined. Next, in step 210, the unit area A of the right camera image SR Unit area A of the left camera image corresponding to SL And the search range for that is read out. This specific example is the same as that of step 114 of the first embodiment (FIG. 9). Unit area A of right camera image SR To be searched R of the left camera image corresponding to SL Is calculated and stored in advance as described below, for example.
(Equation 2)
x 0 = X,
y 0 = Y,
x 1 = 0,
x 2 = Ay
[0034]
Here, the unit area A of the right camera image SR Is the lower left corner coordinate of (x, y), the search range R of the left camera image SL Of the lower left corner of (x 0 , Y 0 ), The width to the left is x 1 , Right width x 2 , A are the same as a in Equation 1. Thus, the condition for the search range is obtained, and the process proceeds to the parallax calculation subroutine (SubR.).
[0035]
FIG. 11 shows the content of the parallax calculation subroutine (SubR. In FIG. 10). First, in step 302, the unit area A in the right image R Unit area A in the left camera image corresponding to L Confirm. Next, in step 304, the lowermost unit area A in the unit area row of the right camera image SR Unit area A of the left camera image corresponding to SL Is set to the unit area A in the left camera image L Apply to Thus, the search range is determined. Next, in step 306, the initial value of the unit area within the search range is determined. For example, the x coordinate is the lower limit of the search range.
[0036]
Hereinafter, the processing of steps 308 to 316 is the same as that of steps 118 to 126 of the first embodiment (FIG. 9). That is, in step 308, the degree of coincidence between the luminance of each pixel in the unit area in the search area of the right camera image and the luminance of each pixel in the unit area in the search range of the left camera image is calculated. Is stored together with the coordinates of the pixel at the lower left corner of the unit area. Next, in step 310, it is determined whether or not the x coordinate of the pixel at the lower left corner of the unit area of the left camera image for which the degree of coincidence has been calculated is the upper limit value. If the x coordinate of the pixel at the lower left corner of the unit area of the left camera image for which the degree of coincidence has been calculated is not the upper limit value, the process proceeds to step 312, where the unit area is updated within the searched range of the left camera image, and the process returns to step 308. This process is repeated. On the other hand, if it is determined in step 310 that the x coordinate of the pixel at the lower left corner of the unit area of the left camera image for which the degree of coincidence has been calculated is the upper limit value, the unit area of the left camera image having the highest degree of coincidence is set to the right camera It is determined that they match the unit area of the image, and the x coordinate of the pixel at the lower left corner of the unit area of the left camera image is stored. Next, in step 316, the parallax for the unit area of the right camera image is determined from the difference between the x coordinate and the y coordinate of the pixel at the lower left corner of the corresponding unit area of the right camera image and the unit area of the left camera image. It is calculated and stored together with the coordinates of the pixel at the lower left corner of the unit area of the right camera image. Thus, the parallax calculation subroutine ends.
[0037]
Next, in FIG. 10, when the parallax calculation subroutine (SubR.) Ends, the process proceeds to step 212, where it is determined whether or not the unit area of the right camera image for which the parallax has been calculated is the uppermost unit area of the unit area row. If the unit area of the right camera image for which the parallax has been calculated is not the uppermost unit area of the unit area row, the y coordinate of the pixel at the lower left corner of the unit area is increased by 1, and the parallax calculation subroutine (SubR.) Is started. , And repeat the process. On the other hand, if the unit area of the right camera image for which the parallax has been calculated is the uppermost unit area of the unit area row, the process proceeds to step 216, and it is determined whether the current unit area row is the last unit area row. If the current unit area row is not the last unit area row, the process proceeds to step 218, and the unit area row with the x coordinate increased by 1, for example, is set as a new unit area row as the unit area row, and the processing from step 208 onward is repeated. On the other hand, if the current unit area sequence is the last unit area sequence, the process ends.
[0038]
(Modification)
FIG. 12 is a partial modification of FIG. 8, and is configured as a modification of the first and second embodiments. That is, FIG. 12 shows the first half as a modification of the first embodiment, and FIG. 9 shows the second half. FIG. 12 shows the first half of the modification of the second embodiment, and FIG. It is configured as the latter half. In this modification, the process up to the determination of the search area is based on the low-resolution image. The constant resolution images of the left and right camera images will be referred to as coarse left and coarse right camera images.
[0039]
First, in step 402, the left and right camera images are read and stored. Next, in step 404, the left and right camera images are sequentially read out, converted into low resolution images, and separately stored as coarse left and coarse right camera images. The conversion to a low-resolution image may be performed by averaging the luminance for each of 16 rectangular pixels, for example, 4 × 4 pixels, and forming an image having 1/16 of the number of pixels as one pixel. At this time, the original left and right camera images are not deleted.
[0040]
Next, in step 406, a rough converted image is created from the rough left camera image by the conversion formula of the above equation (1). If the creation of the low-resolution image does not average the luminance of the square pixels, the constant a in the conversion formula of Equation 1 is adjusted accordingly. Next, in step 408, a coarse difference image is created in which the absolute value of the luminance difference between each pixel of the coarsely converted image and the coarse right camera image is set as the luminance of the pixel. Next, in step 410, a search area is determined from the coarse difference image. Here, the search area is first set as the coordinates of the pixels in the coarse difference image, as in step 108 of FIG. 8 in the first and second embodiments, and then as the coordinates of the pixels in the right camera image with high resolution. Is set. For example, 16 pixels of the right camera image correspond to one pixel in the coarse difference image, and all 16 pixels of the right camera image are flagged.
[0041]
The following processing is performed in the same manner as the processing in FIGS. 9 and 10 (and FIG. 11). In the present modified example, the conversion image, the difference image, and the search area determination are processed by the constant resolution image, so that the processing time can be reduced, the storage capacity can be reduced, and the processing device can be speeded up and downsized. .
[Brief description of the drawings]
1A is an image including a preceding vehicle from a camera fixed to the front left of the vehicle, and FIG. 1B is an image including a preceding vehicle from a camera fixed to the front right of the vehicle.
2A is an image of only the ground surface with a driving lane display without an obstacle from a camera fixed to the front left of the vehicle, and FIG. 2B is an image of an obstacle from a camera fixed to the front right of the vehicle. No, only ground surface image with driving lane display.
3A is an explanatory diagram of road surface image conversion by showing the edge line of FIG. 2A by a solid line and the edge line of FIG. FIG. 2B is an explanatory diagram of the conversion in which the road surface image conversion of FIG.
FIG. 4 is a converted image of FIG. 1A by the conversion (Equation 1) of FIG. 3B.
FIG. 5 is a difference image between FIG. 4 and FIG. 1 (b).
FIG. 6 is a diagram showing an area where the luminance is equal to or more than a predetermined value in FIG. 5 on FIG.
FIG. 7A is an explanatory diagram showing each search range in the left camera image, and FIG. 7B is an explanatory diagram showing that the search range in the right camera image is divided into unit area columns.
FIG. 8 is the first half of a flowchart in the first and second embodiments.
FIG. 9 is the latter half of the flowchart in the first embodiment.
FIG. 10 shows the second half of the flowchart in the second embodiment.
FIG. 11 is a flowchart of a matching degree calculation subroutine in the second embodiment.
FIG. 12 is a first half of a flowchart in a modification of the first and second embodiments.
[Explanation of symbols]
The subscript " L Shows the one in the left camera image.
The subscript " R Shows the one in the right camera image.
A L , A R Unit area for parallax search
R L Unit area A in left camera image L Searched range for
LL L , LL R Left lane captured in left and right camera images
LR L , LR R Right lane captured in left and right camera images
SA R Search area in right camera image
C R Each unit area sequence that divides the search area in the right camera image
A SR The unit area at the bottom position in a certain unit area row in the right camera image
A SL Unit area A in right camera image SR Unit area in the left camera image associated with
R SL Unit area A in left camera image SL Searched range for
R ' L Unit area A in left camera image L Search range modified for

Claims (7)

2つの撮像装置による2つの撮像画像又は1つの撮像装置の異なる位置における2つの撮像画像の一方を基準画像、他方を被探索画像として、当該基準画像の単位領域ごとに被探索画像の各単位領域中から構成画素の輝度の一致度が最も高い一致単位領域を探索する視差探索方法において、
路面を基準とする画像変換であって、前記被探索画像の変換後の路面画像が前記基準画像の路面画像と一致するような変換を前記被探索画像に対して行い、
当該変換された被探索画像と、前記基準画像との各画素又は各領域の輝度の差による差分画像を求め、
当該差分画像の輝度が所定値以上である不一致領域に対応する、前記基準画像中の単位領域の範囲を探索領域とすることを特徴とする視差探索方法。
One of two captured images by two imaging devices or two captured images at different positions of one imaging device as a reference image, and the other as a search image, each unit region of the search image for each unit region of the reference image. In a parallax search method of searching for a matching unit area having the highest degree of matching of luminance of constituent pixels from the middle,
An image conversion based on the road surface, and performs a conversion on the searched image so that the converted road surface image of the searched image matches the road surface image of the reference image,
The converted image to be searched, and a difference image based on the difference in luminance between each pixel or each region of the reference image,
A disparity search method, wherein a range of a unit area in the reference image corresponding to a non-coincidence area in which the luminance of the difference image is equal to or greater than a predetermined value is set as a search area.
2つの撮像装置による2つの撮像画像又は1つの撮像装置の異なる位置における2つの撮像画像の一方を基準画像、他方を被探索画像として、当該基準画像の単位領域ごとに被探索画像の各単位領域中から構成画素の輝度の一致度が最も高い一致単位領域を探索する視差探索方法において、
路面を基準とする画像変換であって、前記被探索画像の変換後の路面画像が前記基準画像の路面画像と一致するような変換を前記被探索画像に対して行い、
当該変換された被探索画像と、前記基準画像との各画素又は各領域の輝度の差による差分画像を求め、
当該差分画像の輝度が所定値以上である不一致領域に含まれる前記基準画像中の各単位領域を水平線に垂直な単位領域列に組分けしたとき、
各単位領域列について、最も低い位置の単位領域を特定し、当該最も低い位置の単位領域が路面であるとした場合の、被探索画像中の対応する被探索範囲の水平方向の幅を、前記基準画像中の当該単位領域列の全ての単位領域の被探索画像中の対応する被探索範囲の水平方向の最大幅とすることを特徴とする視差探索方法。
One of two captured images by two imaging devices or two captured images at different positions of one imaging device as a reference image, and the other as a search image, each unit region of the search image for each unit region of the reference image. In a parallax search method of searching for a matching unit area having the highest degree of matching of luminance of constituent pixels from the middle,
An image conversion based on the road surface, and performs a conversion on the searched image so that the converted road surface image of the searched image matches the road surface image of the reference image,
The converted image to be searched, and a difference image based on the difference in luminance between each pixel or each region of the reference image,
When each unit area in the reference image included in the non-coincidence area where the brightness of the difference image is equal to or more than a predetermined value is grouped into a unit area column perpendicular to the horizontal line,
For each unit area row, the lowest position unit area is specified, and when the lowest position unit area is the road surface, the horizontal width of the corresponding search range in the search image is defined as A parallax search method, wherein a maximum width in a horizontal direction of a corresponding search range in a search image of all unit regions of the unit region row in a reference image is set.
前記路面を基準とする画像変換は、実際の路面の形状に拘わらず、路面を平面として推定することを特徴とする請求項1又は請求項2に記載の視差探索方法。The parallax search method according to claim 1, wherein in the image conversion based on the road surface, the road surface is estimated as a plane regardless of the actual shape of the road surface. 前記不一致領域を決定するまでの画像変換においては低い解像度で、視差探索に際しては高い解像度で行うことを特徴とする請求項1乃至請求項3のいずれか1項に記載の視差探索方法。The parallax search method according to claim 1, wherein the image conversion up to the determination of the mismatch area is performed at a low resolution, and the parallax search is performed at a high resolution. 2つの撮像装置による2つの撮像画像又は1つの撮像装置の異なる位置における2つの撮像画像の一方を基準画像、他方を被探索画像として、当該基準画像の単位領域ごとに被探索画像の各単位領域中から構成画素の輝度の一致度が最も高い一致単位領域を探索する視差探索装置において、
路面を基準とする画像変換であって、前記被探索画像の変換後の路面画像が前記基準画像の路面画像と一致するような変換を前記被探索画像に対して行う画像変換手段と、
当該変換された被探索画像と、前記基準画像との各画素又は各領域の輝度の差による差分画像を求める差分画像作成手段と、
当該差分画像の輝度が所定値以上である不一致領域に対応する、前記基準画像中の単位領域の範囲を探索領域とする探索領域決定手段と、
前記基準画像中の探索領域における視差を探索する視差探索手段と
を有することを特徴とする視差探索装置。
One of two captured images by two imaging devices or two captured images at different positions of one imaging device as a reference image, and the other as a search image, each unit region of the search image for each unit region of the reference image. In a parallax search device that searches for a matching unit area having the highest degree of matching of the luminance of constituent pixels from inside,
An image conversion unit that performs image conversion based on a road surface and performs conversion on the search target image such that the converted road surface image of the search target image matches the road surface image of the reference image.
The converted image to be searched, and a difference image creating means for finding a difference image based on a difference in luminance between each pixel or each region with the reference image,
A search area determining unit that sets a range of a unit area in the reference image as a search area, which corresponds to a mismatch area in which the luminance of the difference image is equal to or greater than a predetermined value,
A disparity search unit that searches for a disparity in a search area in the reference image.
2つの撮像装置による2つの撮像画像又は1つの撮像装置の異なる位置における2つの撮像画像の一方を基準画像、他方を被探索画像として、当該基準画像の単位領域ごとに被探索画像の各単位領域中から構成画素の輝度の一致度が最も高い一致単位領域を探索する視差探索装置において、
路面を基準とする画像変換であって、前記被探索画像の変換後の路面画像が前記基準画像の路面画像と一致するような変換を前記被探索画像に対して行う画像変換手段と、
当該変換された被探索画像と、前記基準画像との各画素又は各領域の輝度の差による差分画像を求める差分画像作成手段と、
当該差分画像の輝度が所定値以上である不一致領域に対応する、前記基準画像中の単位領域の範囲を探索領域とする探索領域決定手段と、
当該不一致領域に含まれる前記基準画像中の各単位領域を水平線に垂直な単位領域列に組分けし、
各単位領域列について、最も低い位置の単位領域を特定し、当該最も低い位置の単位領域が路面であるとした場合の、被探索画像中の対応する被探索範囲の水平方向の幅を、前記基準画像中の当該単位領域列の全ての単位領域の被探索画像中の対応する被探索範囲の水平方向の最大幅として視差を探索する視差探索手段と
を有することを特徴とする視差探索装置。
One of two captured images by two imaging devices or two captured images at different positions of one imaging device as a reference image, and the other as a search image, each unit region of the search image for each unit region of the reference image. In a parallax search device that searches for a matching unit area having the highest degree of matching of the luminance of constituent pixels from inside,
An image conversion unit that performs image conversion based on a road surface and performs conversion on the search target image such that the converted road surface image of the search target image matches the road surface image of the reference image.
The converted image to be searched, and a difference image creating means for finding a difference image based on a difference in luminance between each pixel or each region with the reference image,
A search area determining unit that sets a range of a unit area in the reference image as a search area, which corresponds to a mismatch area in which the luminance of the difference image is equal to or greater than a predetermined value,
Grouping each unit area in the reference image included in the mismatched area into a unit area column perpendicular to the horizontal line,
For each unit area row, the lowest position unit area is specified, and when the lowest position unit area is the road surface, the horizontal width of the corresponding search range in the search image is defined as A disparity search device, comprising: a disparity search unit that searches for a disparity as a maximum width in a horizontal direction of a corresponding search range in a search image of all unit regions of the unit region sequence in the reference image.
前記画像変化手段、前記差分画像作成手段、前記探索領域決定手段においては低い解像度で、前記視差探索手段においてては高い解像度で画像処理を行うことを特徴とする請求項5又は請求項6に記載の視差探索方法。7. The image processing unit according to claim 5, wherein the image changing unit, the difference image creating unit, and the search area determining unit perform image processing at low resolution, and the parallax searching unit performs high-resolution image processing. 8. Parallax search method.
JP2002344717A 2002-11-27 2002-11-27 Parallax search method and parallax search device Pending JP2004180036A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002344717A JP2004180036A (en) 2002-11-27 2002-11-27 Parallax search method and parallax search device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002344717A JP2004180036A (en) 2002-11-27 2002-11-27 Parallax search method and parallax search device

Publications (1)

Publication Number Publication Date
JP2004180036A true JP2004180036A (en) 2004-06-24

Family

ID=32706081

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002344717A Pending JP2004180036A (en) 2002-11-27 2002-11-27 Parallax search method and parallax search device

Country Status (1)

Country Link
JP (1) JP2004180036A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010009236A (en) * 2008-06-25 2010-01-14 Toyota Central R&D Labs Inc Plane area estimation device and program
US10482341B2 (en) 2016-09-29 2019-11-19 Fanuc Corporation Object recognition device and object recognition method
CN114754732A (en) * 2022-03-11 2022-07-15 江苏电力信息技术有限公司 Distance measuring method based on multi-view vision

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010009236A (en) * 2008-06-25 2010-01-14 Toyota Central R&D Labs Inc Plane area estimation device and program
US10482341B2 (en) 2016-09-29 2019-11-19 Fanuc Corporation Object recognition device and object recognition method
CN114754732A (en) * 2022-03-11 2022-07-15 江苏电力信息技术有限公司 Distance measuring method based on multi-view vision
CN114754732B (en) * 2022-03-11 2023-09-05 江苏电力信息技术有限公司 Distance measurement method based on multi-eye vision

Similar Documents

Publication Publication Date Title
US6671399B1 (en) Fast epipolar line adjustment of stereo pairs
CN109034047B (en) Lane line detection method and device
US10699476B2 (en) Generating a merged, fused three-dimensional point cloud based on captured images of a scene
KR101121034B1 (en) System and method for obtaining camera parameters from multiple images and computer program products thereof
CN109461174B (en) Video target area tracking method and video plane advertisement implanting method and system
WO2021143935A1 (en) Detection method, device, electronic apparatus, and storage medium
JP5949314B2 (en) Parallax map generator and program for parallax map generator
KR20120068470A (en) Apparatus for matching stereo image and method thereof
JP2010224924A (en) Image processing device
WO2007052191A2 (en) Filling in depth results
CN112424565B (en) Vehicle-mounted environment recognition device
JP2005037378A (en) Depth measurement method and depth measurement device
CN111553845A (en) Rapid image splicing method based on optimized three-dimensional reconstruction
KR20110089299A (en) Stereo matching process system, stereo matching process method, and recording medium
CN117078717A (en) Road vehicle track extraction method based on unmanned plane monocular camera
JP2005250994A (en) Stereo image processor
CN107067368B (en) Streetscape image splicing method and system based on deformation of image
JPH07103734A (en) Apparatus for searching stereocorrespondence
US9936189B2 (en) Method for predicting stereoscopic depth and apparatus thereof
CN111738061A (en) Binocular vision stereo matching method based on regional feature extraction and storage medium
CN111630569B (en) Binocular matching method, visual imaging device and device with storage function
JP2004180036A (en) Parallax search method and parallax search device
CN104637043B (en) Pixel selecting method, device, parallax value is supported to determine method
US9380285B2 (en) Stereo image processing method, stereo image processing device and display device
JP2001153633A (en) Stereoscopic shape detecting method and its device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051125

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080912

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080924

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090203