JP3991342B2 - Image processing apparatus, image processing method, and transmission medium - Google Patents

Image processing apparatus, image processing method, and transmission medium Download PDF

Info

Publication number
JP3991342B2
JP3991342B2 JP20795497A JP20795497A JP3991342B2 JP 3991342 B2 JP3991342 B2 JP 3991342B2 JP 20795497 A JP20795497 A JP 20795497A JP 20795497 A JP20795497 A JP 20795497A JP 3991342 B2 JP3991342 B2 JP 3991342B2
Authority
JP
Japan
Prior art keywords
reference image
pixel
image
value
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP20795497A
Other languages
Japanese (ja)
Other versions
JPH1155692A (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.)
Sony Corp
Original Assignee
Sony Corp
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 Sony Corp filed Critical Sony Corp
Priority to JP20795497A priority Critical patent/JP3991342B2/en
Priority to US09/123,089 priority patent/US6526157B2/en
Publication of JPH1155692A publication Critical patent/JPH1155692A/en
Priority to US10/320,114 priority patent/US6625301B2/en
Application granted granted Critical
Publication of JP3991342B2 publication Critical patent/JP3991342B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Closed-Circuit Television Systems (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、画像処理装置、画像処理方法、および、伝送媒体に関し、特に、ステレオ法により対象点までの距離を算定する画像処理装置、画像処理方法、および、伝送媒体に関する。
【0002】
【従来の技術】
ステレオ法は、複数の視点から撮像した画像を用いて、対象点までの距離を三角測量の原理を用いて測定する技法である。
【0003】
図6は、従来における、ステレオ法を用いて対象点までの処理を測定する画像処理装置の構成例を示す図である。
【0004】
この図において、メモリ1−1乃至メモリ1−5は、図示せぬカメラ1乃至カメラ5によって撮像された1フレーム分の画像を格納し、所定の順序で画素データを読み出して出力するようになされている。なお、カメラ1乃至5のうちの、例えば、カメラ1は基準カメラとされ、この基準カメラの画像と他のカメラ(参照カメラ)の画像を比較することにより、マッチング処理を行い、マッチング処理の結果に応じて視差を算定するようになされている。
【0005】
SAD(Sum of Absolute Difference)回路2は、メモリ1−1から出力された基準画像と、その他のメモリ1−2乃至1−5から出力された各画像との間で画素値の差分の絶対値を算出する。例えば、SAD回路2は、メモリ1−1とメモリ1−2、メモリ1−1とメモリ1−3、メモリ1−1とメモリ1−4、および、メモリ1−1とメモリ1−5の間で画素値の差分の絶対値を算出して出力する。
【0006】
SSAD(Sum of SAD)回路3は、SAD回路2から出力される各カメラ間の画素差分の絶対値をもとにして、各カメラ間のブロックマッチング処理を行った結果を出力するようになされている。
【0007】
最小値検出部4は、SSAD回路3から出力される結果の中から、最小値を検出して出力する。
【0008】
2次近似部5は、最小値検出部4から出力される最小値とその前後の値を2次関数により近似(補間)し、更に高い精度で最小値を算出するようになされている。
【0009】
メモリ6は、2次近似部5から出力される最小値を記憶するようになされている。
【0010】
次に、以上の従来例の動作について説明する。
【0011】
いま、カメラ1(図示せず)が中央に配置され、その他のカメラ2乃至5(図示せず)がそれを囲むように配置されているとする。そのとき、カメラ1から出力された画像は、基準画像としてメモリ1−1に格納される。また、その他のカメラ2乃至5から出力された画像は、メモリ1−2乃至1−5にそれぞれ格納される。
【0012】
SAD回路2は、メモリ1−1から出力された基準画像と、他のメモリ1−2乃至1−5から出力された参照画像とでペアを形成し、各ペアの間で画素の差分の絶対値を算出して出力する。
【0013】
SSAD回路3は、SAD回路2から出力された各ペア毎の画素の差分の絶対値から所定の画素ブロック(例えば、5×5ブロックなど)のマッチング処理を行う。即ち、SSAD回路3は、画素ブロック単位で差分を計算し、得られた結果を最小値検出部4に供給する。
【0014】
最小値検出部4は、SSAD回路3から出力される差分値の中から、最小値を検出して、2次近似部5に供給する。
【0015】
2次近似部5は、最小値検出部4から出力された最小値と、その前後2点のデータを2次曲線により近似(補間)して、更に精度の高い最小値データを生成し、出力する。
【0016】
メモリ6は、2次近似部5から出力されたデータを記憶する。
【0017】
【発明が解決しようとする課題】
ところで、ステレオ法においては、対象点までの距離精度を向上させることが課題とされている。そこで、例えば、複数のカメラを用いて複数の基線長(カメラ間の距離)によるステレオ処理が提案されている(参考文献「“複数の基線長を利用したステレオマッチング”,電子情報通信学会論文誌,D−II,Vol.J75−D−II No.8 pp.1317−1327 1992年8月」)。
【0018】
この方法によれば、複数のカメラの組み合わせを用いることで、マッチングにおける誤りを減少させることができるとともに、距離精度を向上させることができる。
【0019】
しかしながら、この方法では、複数のカメラの組み合わせを1通り(即ち、全てのカメラを使用する1通り)として処理している。従って、隠れ(オクリージョン)の問題に対処することが困難であるため、結果として距離精度が低下する場合があるという課題があった。
【0020】
そこで、カメラの組み合わせを複数通り用意して、それらの組み合わせの中から最良のものを選択する方法が提案されている。
【0021】
しかしながら、このような方法では、距離精度は向上するものの、複数の組み合わせの中から最良のものを選択する際に、それぞれのカメラ間で探索する領域が異なる場合の取り扱いが煩雑であるという課題があった。
【0022】
また、ハードウエアにより、このような処理を行う場合には、各カメラ毎に処理量が異なるため、最良の組み合わせを選択しようとすると、全ての組み合わせの処理が終了するのを待たなければならないため、処理に時間がかかるという課題もあった。
【0023】
本発明は、以上のような状況に鑑みてなされたものであり、複数のカメラを用いてステレオ法により探索を行う場合に、距離の精度を向上させるとともに、処理を簡便化することを可能とすることを目的とする。
【0024】
【課題を解決するための手段】
請求項1に記載の画像処理装置は、3個以上の撮像装置の中の1つから供給される画像を基準画像として入力する第1の入力手段と、その他の撮像装置から供給される画像を参照画像として入力する第2の入力手段と、基準画像の、参照画像の領域内のデータまたは参照画像の領域外のデータに所定のビットを付加して、基準画像を記憶する記憶手段と、記憶手段により記憶されたデータに付加されているビットを参照して、基準画像の各画素について、基準画像の画素が、第2の入力手段により入力されたそれぞれの参照画像の領域外であるか否かを判定する判定手段と、判定手段により、基準画像の画素が、第2の入力手段により入力された全ての参照画像の領域内であると判定された場合、その基準画像の画素の画素値と、全ての参照画像の、基準画素の画素に対応する画素の画素値のそれぞれとの差分値に対応する値を出力し、判定手段により、基準画像の画素が、少なくとも1個の参照画像の領域内であるが他の参照画像の領域外であると判定された場合、その基準画像の画素の画素値と、基準画像の画素がその領域内であると判定された参照画像の基準画像の画素に対応する画素の画素値との差分値のみに対応する値を出力し、判定手段により、基準画像の画素が、全ての参照画像の領域外であると判定された場合には、所定の値を出力する制御手段と制御手段により出力された出力値に基づいて基準画像と参照画像とのマッチング処理を実行するマッチング手段とを含むことを特徴とする。
【0025】
請求項3に記載の画像処理方法は、3個以上の撮像装置の中の1つから供給される画像を基準画像として入力する第1の入力ステップと、その他の撮像装置から供給される画像を参照画像として入力する第2の入力ステップと、基準画像の、参照画像の領域内のデータまたは参照画像の領域外のデータに所定のビットを付加して、基準画像を記憶する記憶ステップと、記憶ステップの処理で記憶されたデータに付加されているビットを参照して、基準画像の各画素について、基準画像の画素が、第2の入力ステップの処理で入力されたそれぞれの参照画像の領域外であるか否かを判定する判定ステップと、判定ステップの処理で、基準画像の画素が、第2の入力ステップの処理で入力された全ての参照画像の領域内であると判定された場合、その基準画像の画素の画素値と、全ての参照画像の、基準画素の画素に対応する画素の画素値のそれぞれとの差分値に対応する値を出力し、判定ステップの処理で、基準画像の画素が、少なくとも1個の参照画像の領域内であるが他の参照画像の領域外であると判定された場合、その基準画像の画素の画素値と、基準画像の画素がその領域内であると判定された参照画像の基準画像の画素に対応する画素の画素値との差分値のみに対応する値を出力し、判定ステップの処理で、基準画像の画素が、全ての参照画像の領域外であると判定された場合には、所定の値を出力する制御ステップと制御ステップの処理で出力された出力値に基づいて基準画像と参照画像とのマッチング処理を実行するマッチングステップとを含むことを特徴とする。
【0026】
請求項4に記載の記録媒体のプログラムは、3個以上の撮像装置の中の1つから供給される画像を基準画像として入力する第1の入力ステップと、その他の撮像装置から供給される画像を参照画像として入力する第2の入力ステップと、基準画像の、参照画像の領域内のデータまたは参照画像の領域外のデータに所定のビットを付加して、基準画像を記憶する記憶ステップと、記憶ステップの処理で記憶されたデータに付加されているビットを参照して、基準画像の各画素について、基準画像の画素が、第2の入力ステップの処理で入力されたそれぞれの参照画像の領域外であるか否かを判定する判定ステップと、判定ステップの処理で、基準画像の画素が、第2の入力ステップの処理で入力された全ての参照画像の領域内であると判定された場合、その基準画像の画素の画素値と、全ての参照画像の、基準画素の画素に対応する画素の画素値のそれぞれとの差分値に対応する値を出力し
判定ステップの処理で、基準画像の画素が、少なくとも1個の参照画像の領域内であるが他の参照画像の領域外であると判定された場合、その基準画像の画素の画素値と、基準画像の画素がその領域内であると判定された参照画像の基準画像の画素に対応する画素の画素値との差分値のみに対応する値を出力し、判定ステップの処理で、基準画像の画素が、全ての参照画像の領域外であると判定された場合には、所定の値を出力する制御ステップと制御ステップの処理で出力された出力値に基づいて基準画像と参照画像とのマッチング処理を実行するマッチングステップとを含む処理をコンピュータに実行させる。
【0027】
請求項1に記載の画像処理装置、請求項3に記載の画像処理方法、および請求項4に記載の記録媒体のプログラムにおいては、3個以上の撮像装置の中の1つから供給される画像が基準画像として入力され、その他の撮像装置から供給される画像が参照画像として入力され、基準画像の、参照画像の領域内のデータまたは参照画像の領域外のデータに所定のビットが付加されて、基準画像が記憶され、記憶されたデータに付加されているビットが参照されて、基準画像の各画素について、基準画像の画素が、入力されたそれぞれの参照画像の領域外であるか否かが判定され、基準画像の画素が、入力された全ての参照画像の領域内であると判定された場合、その基準画像の画素の画素値と、全ての参照画像の、基準画素の画素に対応する画素の画素値のそれぞれとの差分値に対応する値が出力され
基準画像の画素が、少なくとも1個の参照画像の領域内であるが他の参照画像の領域外であると判定された場合、その基準画像の画素の画素値と、基準画像の画素がその領域内であると判定された参照画像の基準画像の画素に対応する画素の画素値との差分値のみに対応する値が出力され基準画像の画素が、全ての参照画像の領域外であると判定された場合には、所定の値が出力され出力された出力値に基づいて基準画像と参照画像とのマッチング処理が実行される。
【0028】
【発明の実施の形態】
図1は、本発明の実施の形態の構成例を示すブロック図である。
【0029】
この図において、画像入力部100−1(第1の入力手段)、および、画像入力部100−2乃至100−5(第2の入力手段)は、図示せぬカメラ1乃至5から出力された画像をそれぞれ格納する。そして、レンズの収差をキャンセルするように所定の順序で読み出されるとともに、ルックアップテーブルに応じて画素の値が階調変換されて出力されるようになされている。なお、この画像入力部100−1乃至100−5の詳細な構成例については図2を参照して後述する。
【0030】
ここで、カメラ1から出力される画像は基準画像とされており、また、その他のカメラ2乃至5から出力される画像は参照画像とされている。
【0031】
SAD回路200−1乃至200−4(探索手段)は、基準画像と2つの参照画像との間で画素の差分の絶対値を計算するようになされている。例えば、SAD回路200−1は、基準画像(メモリ100−1から出力される画像)と、カメラ2およびカメラ3から出力された画像(メモリ100−2およびメモリ100−3から出力される画像)を入力し、これらの間で画素の差分の絶対値を演算するようになされている。なお、SAD回路200−1乃至200−4の詳細については図3を参照して後述する。
【0032】
SSAD回路300−1乃至300−4は、例えば、5×5個の画素から構成される画素ブロック単位で差分値を算出して出力するようになされている。なお、このSSAD回路300−1乃至300−4の詳細は、図4を参照して後述する。
【0033】
2次近似部400−1乃至400−4は、SSAD回路300−1乃至300−4からそれぞれ出力される3つの差分値の入力を受け、それら3点を通る2次曲線を求めるとともに、その2次曲線の最小値を求めて出力するようになされている。なお、この2次曲線近似部400−1乃至400−4の詳細については、図5を参照して後述する。
【0034】
最小値選択部500は、2次近似部400−1乃至400−4からそれぞれ出力されるデータの中から最小値を選択して出力するようになされている。
【0035】
最小値選択部600は、最小値選択部500から出力された新たな最小値と、結果メモリ700に格納されているそれまでの最小値とを比較し、小さい方を選択して出力するようになされている。
【0036】
結果メモリ700は、最小値選択部600から出力された最小値を一時的に格納するとともに、格納されているそれまでの最小値を最小値選択部600に供給するようになされている。
【0037】
なお、この最小値選択部600と結果メモリ700が協働することにより、最小値選択部500から出力される一連のデータの中から最小値を有するデータが選択されて、結果メモリ700に格納されることになる。
【0038】
次に、図2を参照して図1に示す画像入力部100の詳細な構成例について説明する。
【0039】
この図において、メモリ101は、カメラから出力された画像データをカウンタ102から出力されるアドレスデータに対応するアドレスに格納するようになされている。また、格納されたデータを読み出す場合には、メモリ103(検出手段、記憶手段)から出力されるアドレスデータに対応するアドレスからデータを読み出して出力するようになされている。セレクタ106は、画像データをメモリ101に入力する場合には、カウンタ102側へ接続され、また、画像データをメモリ101から出力する場合には、メモリ103側へ接続されるようになされている。
【0040】
カウンタ102は、メモリ101に対して画像データを読み込む場合に、アドレスデータを出力するようになされており、例えば、小さい順にアドレスデータを出力するようになされている。
【0041】
カウンタ104は、アドレスデータを所定の順序で出力するようになされている。メモリ103は、カウンタ104から出力されたアドレスデータを、レンズの収差をキャンセルするように変換して出力するようになされている。なお、メモリ103に格納されているアドレス変換用のデータは、キャリブレーションを行う際に対応点を手がかりとして生成される。
【0042】
また、メモリ103に格納されているデータには有効ビットが付加されており、各カメラ毎に予め求められている探索範囲が画像の領域を越える場合には、この有効ビットは“0”とされているので、メモリ103から出力される有効ビット信号は“0”の状態となる。なお、探索範囲が画像の領域内である場合には、メモリ103から出力される有効ビット信号は“1”の状態とされる。
【0043】
ルックアップテーブル105は、階調変換を行うためのデータが格納されており、入力されたデータに対応するアドレスからデータが読み出されて出力されるようになされている。なお、このルックアップテーブル105に格納されているデータは、カメラ1乃至カメラ5により同一のパターンを撮像した場合に、全てのカメラの出力が同一になるようなデータが格納されている。従って、このルックアップテーブル105により各カメラの特性のばらつきが補正される。
【0044】
続いて、図3を参照して、図1に示すSAD回路200の詳細な構成例について説明する。なお、SAD回路200−1乃至200−4は全て同様の構成とされているので、以下では、SAD回路200−1を例に挙げて説明する。
【0045】
この図において、減算回路201−1は、カメラ1から出力された基準画像の画素値から、カメラ2から出力された参照画像の画素値を減算して出力するようになされている。減算回路201−2は、カメラ1から出力された基準画像の画素値から、カメラ3から出力された参照画像の画素値を減算して出力するようになされている。
【0046】
絶対値回路202−1は、減算回路201−1から出力されるデータの絶対値を演算し、得られた結果を出力するようになされている。また、絶対値回路202−2は、減算回路201−2から出力されるデータの絶対値を演算し、得られた結果を出力するようになされている。
【0047】
セレクタ203−1(制御手段)は、カメラ2の有効ビットが“1”の状態である場合には、絶対値回路202−1の出力を選択して出力するようになされている。一方、カメラ2の有効ビットが“0”の状態である場合には、絶対値回路202−2の出力を選択して出力するようになされている。
【0048】
セレクタ203−2(制御手段)は、カメラ3の有効ビットが“1”の状態である場合には、絶対値回路202−2の出力を選択して出力するようになされている。一方、カメラ3の有効ビットが“0”の状態である場合には、絶対値回路202−1の出力を選択して出力するようになされている。
【0049】
加算回路204は、セレクタ203−1の出力と、セレクタ203−2の出力を加算して出力するようになされている。
【0050】
セレクタ206(制御手段)は、カメラ2またはカメラ3の少なくとも一方の有効ビットが“1”の状態である場合には、加算回路204の出力を選択して出力する。また、双方の有効ビットが“0”の場合には、最大値回路205から出力されるデータ(例えば、511)を選択して出力するようになされている。
【0051】
最後に、図4を参照して、図1に示すSSAD回路300の詳細な構成例について説明する。
【0052】
この図において、ディレイライン301は、入力された画素値の差分の絶対値をブロックマッチングのブロックの大きさ×1ラインの画素数分だけ遅延して出力するようになされている。
【0053】
減算回路302は、ディレイライン301を経由していないデータから、ディレイライン301から出力されたデータを減算し、得られた結果を出力するようになされている。
【0054】
加算回路303は、減算回路302から出力されたデータと、メモリ304から出力されたデータを加算して出力するようになされている。メモリ304は、加算回路303から出力されたデータを1ライン分遅延した後、出力するようになされている。
【0055】
ディレイライン305は、加算回路303の出力を1ラインを構成する画素数分だけ遅延して出力するようになされている。減算回路306は、加算回路303の出力からディレイライン305の出力を減算して出力するようになされている。
【0056】
加算回路307は、減算回路306の出力とメモリ308の出力とを加算して出力するようになされている。メモリ308は、加算回路307の出力をブロックマッチングのブロックの大きさ分だけ遅延して出力するようになされている。
【0057】
次に、以上の実施の形態の動作について説明する。
【0058】
図1に示す実施の形態に、カメラ1乃至カメラ5から出力される画像が入力されると、画像入力部100−1乃至100−5は、画像を一旦格納した後、所定の順序で読み出すとともに、階調変換を施して出力する。
【0059】
即ち、図2に示すメモリ101に対して画像データが供給されると、カウンタ102から出力されるアドレスデータに対応するアドレスに、データが逐次格納されていくことになる。なお、このような動作は、画像入力部100−1乃至100−5の全てにおいて実行され、カメラ1乃至5から出力された画像がメモリ101の所定のアドレスに逐次格納されることになる。また、このとき、セレクタ106は、カウンタ102側を選択している。
【0060】
画像データの格納が終了すると、セレクタ106がメモリ103側に接続される。そして、カウンタ104からアドレスデータの出力が開始される。メモリ103は、カウンタ104から出力されたアドレスデータに対応するアドレスから所定のデータを読み出してメモリ101に供給する。メモリ103に格納されているデータは、各画素毎、かつ、各探索ディスパリティ毎に画像データを読み出すように設定されているので、その結果、探索するエピポーララインが非直線の場合でも対応でき、レンズの収差等を吸収することが可能となる。
【0061】
また、メモリ103に格納されているデータには、前述のように有効ビットが付加されているので、各カメラ毎に求められている探索範囲が画像の領域を越えた場合には、有効ビットが“0”の状態とされる。また、探索範囲が画像の領域を越えていない場合には、同ビットは“1”の状態とされる。
【0062】
メモリ101から出力された画像データは、ルックアップテーブル105に供給される。ルックアップテーブル105は、メモリ101から出力された画像データに対応するアドレスに格納されているデータを読み出して出力する。このルックアップテーブル105に格納されているデータは、各カメラの特性の相違に起因する階調の差を補正するように設定されているので、その結果、各カメラ間の明暗の相違などを吸収することができる。
【0063】
このようにして、レンズの収差と各カメラの特性に対する補正処理が施された画像データは、画像入力部100−1乃至100−5から出力され、SAD回路200−1乃至200−4に供給される。
【0064】
SAD回路200−1乃至200−4は、画像入力部100−1乃至100−5から出力された基準画像データと2つの参照画像データとの間で画素値の差分の絶対値を算出して出力する。なお、SAD回路200−1乃至200−4において行われる演算は、有効ビットの値に応じて適宜変更される。
【0065】
即ち、画像入力部100−1から出力された補正処理が施された画像データは、減算回路201−1と減算回路201−2にそれぞれ供給される。また、画像入力部100−2と画像入力部100−3から出力された画像データは、それぞれ、減算回路201−1と減算回路201−2に供給される。
【0066】
減算回路201−1は、基準画像の画素値から、参照画像であるカメラ2の画像の画素値を減算して出力する。また、減算回路201−2は、基準画像の画素値から、参照画像であるカメラ3の画像の画素値を減算して出力する。
【0067】
絶対値回路202−1は、減算回路201−1の計算結果の絶対値を演算して出力する。また、絶対値回路202−2は、減算回路201−2の計算結果の絶対値を演算して出力する。その結果、絶対値回路202−1からは、参照画像である画像入力部100−2からの画像と、基準画像である画像入力部100−1からの画素の差分の絶対値が出力される。また、絶対値回路202−2からは、参照画像である画像入力部100−3の画像と、基準画像である画像入力部100−1からの画像の画素の差分の絶対値が出力されることになる。
【0068】
セレクタ203−1は、カメラ2の探索範囲が画像の領域内にある場合には、有効ビットが“1”の状態とされるので、絶対値回路203−1の出力を選択して加算回路204に出力する。また、カメラ2の探索範囲が画像の領域を越えた場合には、有効ビットが“0”の状態とされるので、その場合には、セレクタ203−1は、絶対値回路202−2の出力を選択して加算回路204に出力する。
【0069】
同様に、セレクタ203−2は、カメラ3の探索範囲が画像の領域内にある場合には、有効ビットが“1”の状態とされるので、絶対値回路203−2の出力を選択して、加算回路204に出力する。また、カメラ3の探索範囲が画像の領域を越えた場合には、有効ビットが“0”の状態とされるので、その場合には、セレクタ203−2は、絶対値回路202−1の出力を選択して加算回路204に出力する。
【0070】
加算回路204は、セレクタ203−1と203−2の出力を加算して出力する。また、セレクタ206は、カメラ2とカメラ3の有効ビットの状態に応じて、加算回路204、または、最大値回路205の出力を選択して出力する。その結果、セレクタ206の出力は、カメラ2とカメラ3の有効ビットの状態に応じて以下のような出力を生ずることになる。
【0071】
(1)双方の有効ビットが“1”(有効)の状態であれば、絶対値回路202−1と絶対値回路202−2がそのまま加算されて出力される。
(2)どちらか一方の有効ビットが“0”(無効)である場合には、有効である方の絶対値回路の出力が2倍されて出力される。
(3)双方の有効ビットが“0”である場合には、最大値回路205の出力(例えば、画素データが8ビットの場合には値511)が選択されて出力される。
【0072】
SAD回路200−1乃至200−4の出力は、SSAD回路300−1乃至300−4にそれぞれ供給される。
【0073】
SSAD回路200−1乃至200−4は、例えば、5×5個の画素からなる画素ブロック単位でブロックマッチング処理を行い、得られた結果を出力する。
【0074】
即ち、SAD回路200−1乃至200−4から出力された画素の差分の絶対値(|aij−bij|)は、減算回路302に供給されるとともに、ディレイライン301に供給され、ブロックマッチングの大きさ×1ラインの画素数分だけ遅延された後、減算回路302に供給される。
【0075】
減算回路302は、SAD回路の出力データから、ディレイライン301により遅延されたデータを減算して、加算回路303に出力する。
【0076】
加算回路303は、メモリ304により遅延された1ライン分前のデータと減算回路302の出力とを加算して出力する。その結果、加算回路303からは、2次元ブロックマッチングの1次元処理が施されたデータ(Σi|aij−bij|)が出力されることになる。
【0077】
ディレイライン305、減算回路306、加算回路307、および、メモリ308は、前段の回路と同様の処理を実行し、その結果、加算回路307からは、2次元のブロックマッチング処理が施されたデータ(ΣjΣi|aij−bij|)が出力されることになる。
【0078】
SSAD回路300−1乃至300−4から出力されたデータは、2次近似処理部400−1乃至400−4にそれぞれ供給される。
【0079】
2次近似部400−1乃至400−4は、SSAD回路300−1乃至300−4から出力されたあるデータS2と、それに前後するデータS1,S3を2次曲線で補間して、更に正確な最小値データを得る。
【0080】
図5は、2次近似部400の動作を説明する図である。
【0081】
この図に示すように、SSAD回路300の出力d1乃至d3が入力されると、2次近似回路400は、d1乃至d3を結ぶ曲線を以下の2次式により生成する。
【0082】
1=a・d1 2+b・d1+c ・・・(1)
2=a・d2 2+b・d2+c ・・・(2)
3=a・d3 2+b・d3+c ・・・(3)
【0083】
ここで、d1=−1,d2=0,d3=1とすると、以上の式(1)乃至(3)は、次のようになる。
【0084】
1=a−b+c ・・・(4)
2=c ・・・(5)
3=a+b+c ・・・(6)
【0085】
これを解くと、最小値dは、以下の式により表すことができる。
【0086】
d=(S1−S3)/{2×(S1−2・S2+S3)} ・・・(7)
【0087】
ここで、dの範囲は、以下のように表すことができる。
【0088】
−0.5≦d≦0.5 ・・・(8)
【0089】
従って、各項を2倍すると、以下の式を得る。
【0090】
−1≦2・d≦1 ・・・(9)
【0091】
式(9)に式(7)を代入すると、以下の式を得る。
【0092】
−1≦(S1−S3)/(S1−2・S2+S3)≦1 ・・・(10)
【0093】
通常、式(7)に示すような除算を含む演算を行う場合、ハードウエアの計算コストは大きくなる。しかしながら、ここでは、求める精度が小数点以下3乃至4ビットと少なく、また、得られる結果の範囲が式(10)に示すように明確になっている。即ち、2次曲線近似で求める正確な最小値を示す位置は、求まった最小値の位置から±0.5の範囲にある。従って、除算の代わりに減算を用いて計算を行うことができることから、計算を大幅に簡略化するとともに、ハードウエア資源を削減することができる。
【0094】
なお、以上の構成では、SSAD回路300から出力される全てのデータに対して2次近似が施されることになるが、最終的には、最小値選択部500により最小値のみが選択されるので問題は生じない。
【0095】
このようにして2次近似されたデータは、最小値選択部500に供給される。最小値選択部500は、2次近似部400−1乃至400−4から出力されたデータから最小値を選択し、最小値選択部600に対して出力する。
【0096】
最小値選択部600は、結果メモリ700に格納されているそれまでの最小値と、最小値選択部500から新たに出力された値とを比較し、より小さい方を選択して出力する。結果メモリ700は、最小値選択部600から出力された値を保持する。その結果、結果メモリ700には、全てのカメラペア(各SAD回路に入力されている画像に対応するカメラの組み合わせ)から得られたデータのうち、最小のデータが選択されて格納されることになる。
【0097】
このような最小のデータは、マッチング度が最も高いデータであるので、そのデータを用いることにより、最も精度の高い視差を求めることが可能となる。
【0098】
以上のような実施の形態によれば、2台の参照画像用のカメラのペアを構成し、ペアを構成するカメラの双方において、探索する領域が画像内である場合には、双方の画像を用いてマッチング処理を行い、また、ペアを構成するカメラの何れか一方において、探索する領域が画像外である場合には、画像内である方の画像を用いてマッチング処理を行い、更に、ペアを構成するカメラの双方において、探索する領域が画像外である場合には、出力されるデータが無効となるように、最大値を生成して出力するようにした。従って、探索する領域が画像外となった場合においても正確な結果を算出することができる。
【0099】
なお、以上の実施の形態においては、5台のカメラを用いて測定を行うようにしたが、本発明はこのような場合にのみ限定されるものではないことは勿論である。
【0100】
また、明細書中において、伝送媒体は、FD,CD−ROMなどの情報記録媒体の他、インターネット、ディジタル衛星などのネットワーク伝送媒体も含まれる。
【0101】
【発明の効果】
本発明によれば、探索する領域が画像外である場合においても対称点までの距離を算出することができる。
【図面の簡単な説明】
【図1】本発明の実施の形態の構成例を示すブロック図である。
【図2】図1に示す画像入力部100の詳細な構成例を示すブロック図である。
【図3】図1に示すSAD回路200の詳細な構成例を示すブロック図である。
【図4】図1に示すSSAD回路300の詳細な構成例を示すブロック図である。
【図5】図1に示す2次近似部400の処理を説明する図である。
【図6】従来の画像処理装置の構成例を示すブロック図である。
【符号の説明】
100−1 画像入力部(第1の入力手段), 100−2乃至100−5 画像入力部(第2の入力手段), 103 メモリ(検出手段、記憶手段), 200−1乃至200−4 SAD回路(探索手段), 203−1,203−2 セレクタ(制御手段), 206 セレクタ(制御手段)
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus, an image processing method, and a transmission medium, and more particularly, to an image processing apparatus, an image processing method, and a transmission medium that calculate a distance to a target point by a stereo method.
[0002]
[Prior art]
The stereo method is a technique for measuring a distance to a target point using a triangulation principle using images taken from a plurality of viewpoints.
[0003]
FIG. 6 is a diagram illustrating a configuration example of a conventional image processing apparatus that measures processing up to a target point using a stereo method.
[0004]
In this figure, the memory 1-1 to memory 1-5 store an image for one frame imaged by a camera 1 to camera 5 (not shown), and read out and output pixel data in a predetermined order. ing. Of the cameras 1 to 5, for example, the camera 1 is a reference camera, and a matching process is performed by comparing an image of the reference camera with an image of another camera (reference camera). The parallax is calculated according to the above.
[0005]
The SAD (Sum of Absolute Difference) circuit 2 is the absolute value of the difference in pixel value between the reference image output from the memory 1-1 and each image output from the other memories 1-2 to 1-5. Is calculated. For example, the SAD circuit 2 includes the memory 1-1 and the memory 1-2, the memory 1-1 and the memory 1-3, the memory 1-1 and the memory 1-4, and the memory 1-1 and the memory 1-5. To calculate and output the absolute value of the pixel value difference.
[0006]
The SSAD (Sum of SAD) circuit 3 outputs a result of block matching processing between the cameras based on the absolute value of the pixel difference between the cameras output from the SAD circuit 2. Yes.
[0007]
The minimum value detection unit 4 detects and outputs the minimum value from the results output from the SSAD circuit 3.
[0008]
The secondary approximation unit 5 approximates (interpolates) the minimum value output from the minimum value detection unit 4 and the values before and after the minimum value by a quadratic function, and calculates the minimum value with higher accuracy.
[0009]
The memory 6 stores the minimum value output from the secondary approximation unit 5.
[0010]
Next, the operation of the above conventional example will be described.
[0011]
Now, it is assumed that the camera 1 (not shown) is arranged at the center and the other cameras 2 to 5 (not shown) are arranged so as to surround it. At that time, the image output from the camera 1 is stored in the memory 1-1 as a reference image. The images output from the other cameras 2 to 5 are stored in the memories 1-2 to 1-5, respectively.
[0012]
The SAD circuit 2 forms a pair with the reference image output from the memory 1-1 and the reference image output from the other memories 1-2 to 1-5, and the absolute difference of the pixel between each pair Calculate and output the value.
[0013]
The SSAD circuit 3 performs a matching process on a predetermined pixel block (for example, a 5 × 5 block) from the absolute value of the pixel difference for each pair output from the SAD circuit 2. That is, the SSAD circuit 3 calculates the difference in units of pixel blocks and supplies the obtained result to the minimum value detection unit 4.
[0014]
The minimum value detection unit 4 detects the minimum value from the difference values output from the SSAD circuit 3 and supplies the minimum value to the secondary approximation unit 5.
[0015]
The quadratic approximation unit 5 approximates (interpolates) the minimum value output from the minimum value detection unit 4 and the data at the two points before and after the minimum value by generating a minimum value data with higher accuracy, and outputs it. To do.
[0016]
The memory 6 stores the data output from the secondary approximation unit 5.
[0017]
[Problems to be solved by the invention]
By the way, in the stereo method, it is a problem to improve the distance accuracy to the target point. Thus, for example, stereo processing using a plurality of cameras and a plurality of base line lengths (distances between the cameras) has been proposed (reference document “stereo matching using a plurality of base line lengths”, IEICE Transactions , D-II, Vol. J75-D-II No. 8 pp. 1317-1327 August 1992 ").
[0018]
According to this method, by using a combination of a plurality of cameras, errors in matching can be reduced and distance accuracy can be improved.
[0019]
However, in this method, a combination of a plurality of cameras is processed as one (that is, one using all cameras). Therefore, since it is difficult to deal with the problem of occluding (occupation), there is a problem that distance accuracy may be lowered as a result.
[0020]
Therefore, a method has been proposed in which a plurality of combinations of cameras are prepared and the best one is selected from these combinations.
[0021]
However, with such a method, although the distance accuracy is improved, when selecting the best one from a plurality of combinations, there is a problem that handling when the search area is different between the respective cameras is complicated. there were.
[0022]
In addition, when such processing is performed by hardware, the amount of processing differs for each camera, so when trying to select the best combination, it is necessary to wait for the processing of all combinations to end. There is also a problem that processing takes time.
[0023]
The present invention has been made in view of the above situation, and when performing a search by a stereo method using a plurality of cameras, it is possible to improve the accuracy of distance and simplify the processing. The purpose is to do.
[0024]
[Means for Solving the Problems]
  The image processing apparatus according to claim 1, a first input unit that inputs an image supplied from one of three or more imaging devices as a reference image, and an image supplied from another imaging device. Second input means for inputting as a reference image; storage means for storing a reference image by adding a predetermined bit to data in the reference image area or data outside the reference image area of the reference image; By referring to the bits appended to the data stored by the meansFor each pixel, each pixel of the reference image is input by the second input means.A determination unit that determines whether the image is outside the reference image area;The pixel of the reference image is input by the second input meansIf it is determined that it is within the area of all reference images,A value corresponding to the difference value between the pixel value of the pixel of the standard image and each pixel value of the pixel corresponding to the pixel of the standard pixel of all reference images is output.By the judging means,If it is determined that the pixel of the reference image is within the area of at least one reference image but outside the area of the other reference image, the pixel value of the pixel of the reference image and the pixel of the reference image are the area A value corresponding only to the difference value from the pixel value of the pixel corresponding to the pixel of the reference image of the reference image determined to be within is output.By the judging means,Control means for outputting a predetermined value when it is determined that the pixels of the reference image are outside the area of all the reference images;,Matching means for performing matching processing between the reference image and the reference image based on the output value output by the control means;It is characterized by including.
[0025]
  The image processing method according to claim 3, wherein a first input step of inputting an image supplied from one of the three or more imaging devices as a reference image, and an image supplied from another imaging device. A second input step for inputting as a reference image; a storage step for storing the reference image by adding a predetermined bit to data in the reference image area or data outside the reference image area of the reference image; Referring to the bit added to the data stored in step processing,For each pixel, each pixel of the reference image is input in the processing of the second input step.A determination step for determining whether the region is outside the reference image region, and a determination stepIn the process, the pixel of the reference image was input in the process of the second input stepIf it is determined that it is within the area of all reference images,A value corresponding to the difference value between the pixel value of the pixel of the standard image and each pixel value of the pixel corresponding to the pixel of the standard pixel of all reference images is output.In the judgment step process,If it is determined that the pixel of the reference image is within the area of at least one reference image but outside the area of the other reference image, the pixel value of the pixel of the reference image and the pixel of the reference image are the area A value corresponding only to the difference value from the pixel value of the pixel corresponding to the pixel of the reference image of the reference image determined to be within is output.In the judgment step process,A control step for outputting a predetermined value when it is determined that the pixels of the reference image are outside the area of all the reference images;,A matching step for executing a matching process between the reference image and the reference image based on the output value output in the process of the control step;It is characterized by including.
[0026]
  Claim 4Recording medium programIs a first input step for inputting an image supplied from one of the three or more imaging devices as a reference image, and a second input for inputting an image supplied from another imaging device as a reference image. A step of adding a predetermined bit to the data in the area of the reference image or the data outside the area of the reference image of the standard image, storing the standard image, and the data stored in the processing of the storage step Referring to the added bit, the reference imageFor each pixel, each pixel of the reference image is input in the processing of the second input step.A determination step for determining whether the region is outside the reference image region, and a determination stepIn the process, the pixel of the reference image was input in the process of the second input stepIf it is determined that it is within the area of all reference images,A value corresponding to the difference value between the pixel value of the pixel of the standard image and each pixel value of the pixel corresponding to the pixel of the standard pixel of all reference images is output.,
  In the processing of the judgment step,If it is determined that the pixel of the reference image is within the area of at least one reference image but outside the area of the other reference image, the pixel value of the pixel of the reference image and the pixel of the reference image are the area A value corresponding only to the difference value from the pixel value of the pixel corresponding to the pixel of the reference image of the reference image determined to be within is output.In the judgment step process,A control step for outputting a predetermined value when it is determined that the pixels of the reference image are outside the area of all the reference images;,A matching step for executing a matching process between the reference image and the reference image based on the output value output in the process of the control step;Causes the computer to execute processing including
[0027]
  The image processing device according to claim 1, the image processing method according to claim 3, and the image processing method according to claim 4.In a recording medium programThe image supplied from one of the three or more imaging devices is input as the standard image, the image supplied from the other imaging device is input as the reference image, and within the reference image area of the standard image A predetermined bit is added to the data or the data outside the area of the reference image, the reference image is stored, and the bit added to the stored data is referred toFor each pixel, the pixel of the reference image isIt is determined whether it is outside the area of the reference image,The pixel of the reference image was inputIf it is determined that it is within the area of all reference images,A value corresponding to the difference value between the pixel value of the pixel of the standard image and each pixel value of the pixel corresponding to the pixel of the standard pixel of all reference images is output.,
  If it is determined that the pixel of the reference image is within the area of at least one reference image but outside the area of the other reference image, the pixel value of the pixel of the reference image and the pixel of the reference image are the area A value corresponding only to the difference value from the pixel value of the pixel corresponding to the pixel of the reference image of the reference image determined to be within is output.,If it is determined that the pixels of the reference image are outside the area of all reference images, a predetermined value is output.,Based on the output value output, matching processing between the reference image and the reference image is executed.
[0028]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a block diagram showing a configuration example of an embodiment of the present invention.
[0029]
In this figure, an image input unit 100-1 (first input unit) and image input units 100-2 to 100-5 (second input unit) are output from cameras 1 to 5 (not shown). Store each image. Then, the lens values are read out in a predetermined order so as to cancel the aberrations of the lens, and the pixel values are subjected to gradation conversion according to a lookup table and output. A detailed configuration example of the image input units 100-1 to 100-5 will be described later with reference to FIG.
[0030]
Here, the image output from the camera 1 is a standard image, and the images output from the other cameras 2 to 5 are reference images.
[0031]
The SAD circuits 200-1 to 200-4 (search means) calculate the absolute value of the pixel difference between the base image and the two reference images. For example, the SAD circuit 200-1 includes a reference image (an image output from the memory 100-1) and an image output from the camera 2 and the camera 3 (an image output from the memory 100-2 and the memory 100-3). , And the absolute value of the pixel difference between them is calculated. Details of the SAD circuits 200-1 to 200-4 will be described later with reference to FIG.
[0032]
For example, the SSAD circuits 300-1 to 300-4 are configured to calculate and output a difference value in units of pixel blocks composed of 5 × 5 pixels. Details of the SSAD circuits 300-1 to 300-4 will be described later with reference to FIG.
[0033]
The quadratic approximation units 400-1 to 400-4 receive the three difference values respectively output from the SSAD circuits 300-1 to 300-4, obtain a quadratic curve passing through these three points, and The minimum value of the quadratic curve is obtained and output. Details of the quadratic curve approximation units 400-1 to 400-4 will be described later with reference to FIG.
[0034]
The minimum value selection unit 500 selects and outputs the minimum value from the data respectively output from the secondary approximation units 400-1 to 400-4.
[0035]
The minimum value selection unit 600 compares the new minimum value output from the minimum value selection unit 500 with the previous minimum value stored in the result memory 700, and selects and outputs the smaller one. Has been made.
[0036]
The result memory 700 temporarily stores the minimum value output from the minimum value selection unit 600 and supplies the stored minimum value to the minimum value selection unit 600.
[0037]
The minimum value selection unit 600 and the result memory 700 cooperate to select data having the minimum value from a series of data output from the minimum value selection unit 500 and store it in the result memory 700. Will be.
[0038]
Next, a detailed configuration example of the image input unit 100 shown in FIG. 1 will be described with reference to FIG.
[0039]
In this figure, a memory 101 stores image data output from a camera at an address corresponding to address data output from a counter 102. When the stored data is read out, the data is read out from the address corresponding to the address data output from the memory 103 (detection means, storage means) and output. The selector 106 is connected to the counter 102 side when image data is input to the memory 101, and is connected to the memory 103 side when image data is output from the memory 101.
[0040]
The counter 102 outputs address data when reading image data into the memory 101. For example, the counter 102 outputs address data in ascending order.
[0041]
The counter 104 outputs address data in a predetermined order. The memory 103 converts the address data output from the counter 104 so as to cancel lens aberration and outputs the converted data. Note that the address conversion data stored in the memory 103 is generated using the corresponding points as clues when performing calibration.
[0042]
In addition, a valid bit is added to the data stored in the memory 103, and this valid bit is set to "0" when the search range obtained in advance for each camera exceeds the image area. Therefore, the valid bit signal output from the memory 103 is in a “0” state. When the search range is within the image area, the valid bit signal output from the memory 103 is set to “1”.
[0043]
The look-up table 105 stores data for gradation conversion, and data is read out from an address corresponding to the input data and output. The data stored in the look-up table 105 stores data that results in the same output from all cameras when the same pattern is captured by the cameras 1 to 5. Therefore, the variation in the characteristics of each camera is corrected by the lookup table 105.
[0044]
Next, a detailed configuration example of the SAD circuit 200 shown in FIG. 1 will be described with reference to FIG. Since all the SAD circuits 200-1 to 200-4 have the same configuration, the SAD circuit 200-1 will be described below as an example.
[0045]
In this figure, the subtraction circuit 201-1 subtracts the pixel value of the reference image output from the camera 2 from the pixel value of the standard image output from the camera 1, and outputs the result. The subtraction circuit 201-2 subtracts the pixel value of the reference image output from the camera 3 from the pixel value of the reference image output from the camera 1, and outputs the result.
[0046]
The absolute value circuit 202-1 calculates the absolute value of the data output from the subtraction circuit 201-1, and outputs the obtained result. The absolute value circuit 202-2 calculates the absolute value of the data output from the subtraction circuit 201-2 and outputs the obtained result.
[0047]
The selector 203-1 (control means) selects and outputs the output of the absolute value circuit 202-1 when the valid bit of the camera 2 is "1". On the other hand, when the valid bit of the camera 2 is “0”, the output of the absolute value circuit 202-2 is selected and output.
[0048]
The selector 203-2 (control means) selects and outputs the output of the absolute value circuit 202-2 when the valid bit of the camera 3 is "1". On the other hand, when the valid bit of the camera 3 is “0”, the output of the absolute value circuit 202-1 is selected and output.
[0049]
The adder circuit 204 adds the output of the selector 203-1 and the output of the selector 203-2 and outputs the result.
[0050]
The selector 206 (control means) selects and outputs the output of the adder circuit 204 when the valid bit of at least one of the camera 2 or the camera 3 is “1”. When both valid bits are “0”, the data (for example, 511) output from the maximum value circuit 205 is selected and output.
[0051]
Finally, a detailed configuration example of the SSAD circuit 300 shown in FIG. 1 will be described with reference to FIG.
[0052]
In this figure, the delay line 301 delays the absolute value of the input pixel value difference by the size of the block matching block × the number of pixels in one line and outputs the delayed value.
[0053]
The subtraction circuit 302 subtracts the data output from the delay line 301 from the data not passing through the delay line 301 and outputs the obtained result.
[0054]
The adding circuit 303 adds the data output from the subtracting circuit 302 and the data output from the memory 304 and outputs the result. The memory 304 outputs the data output from the adder circuit 303 after being delayed by one line.
[0055]
The delay line 305 delays the output of the adder circuit 303 by the number of pixels constituting one line and outputs it. The subtracting circuit 306 subtracts the output of the delay line 305 from the output of the adding circuit 303 and outputs the result.
[0056]
The addition circuit 307 adds the output of the subtraction circuit 306 and the output of the memory 308 and outputs the result. The memory 308 outputs the output from the adder circuit 307 with a delay corresponding to the size of the block matching block.
[0057]
Next, the operation of the above embodiment will be described.
[0058]
When the image output from the camera 1 to the camera 5 is input to the embodiment shown in FIG. 1, the image input units 100-1 to 100-5 read the image in a predetermined order after storing the image once. The tone is converted and output.
[0059]
That is, when image data is supplied to the memory 101 shown in FIG. 2, the data is sequentially stored at an address corresponding to the address data output from the counter 102. Such an operation is executed in all of the image input units 100-1 to 100-5, and images output from the cameras 1 to 5 are sequentially stored at predetermined addresses in the memory 101. At this time, the selector 106 selects the counter 102 side.
[0060]
When the storage of the image data is completed, the selector 106 is connected to the memory 103 side. Then, output of address data from the counter 104 is started. The memory 103 reads predetermined data from an address corresponding to the address data output from the counter 104 and supplies it to the memory 101. Since the data stored in the memory 103 is set to read out image data for each pixel and for each search disparity, as a result, even if the epipolar line to be searched is non-linear, it can be handled. It becomes possible to absorb aberrations of the lens.
[0061]
Further, since the effective bit is added to the data stored in the memory 103 as described above, if the search range obtained for each camera exceeds the image area, the effective bit is set. The state is “0”. If the search range does not exceed the image area, the bit is set to “1”.
[0062]
The image data output from the memory 101 is supplied to the lookup table 105. The look-up table 105 reads out and outputs data stored at an address corresponding to the image data output from the memory 101. The data stored in the look-up table 105 is set so as to correct the difference in gradation caused by the difference in the characteristics of each camera. As a result, the difference in brightness between the cameras is absorbed. can do.
[0063]
In this manner, the image data that has been subjected to the correction processing for the lens aberration and the characteristics of each camera is output from the image input units 100-1 to 100-5 and supplied to the SAD circuits 200-1 to 200-4. The
[0064]
The SAD circuits 200-1 to 200-4 calculate and output absolute values of pixel value differences between the standard image data output from the image input units 100-1 to 100-5 and the two reference image data. To do. The operations performed in the SAD circuits 200-1 to 200-4 are appropriately changed according to the value of the valid bit.
[0065]
That is, the corrected image data output from the image input unit 100-1 is supplied to the subtraction circuit 201-1 and the subtraction circuit 201-2, respectively. The image data output from the image input unit 100-2 and the image input unit 100-3 are supplied to the subtraction circuit 201-1 and the subtraction circuit 201-2, respectively.
[0066]
The subtraction circuit 201-1 subtracts the pixel value of the image of the camera 2 that is the reference image from the pixel value of the standard image and outputs the result. The subtraction circuit 201-2 subtracts the pixel value of the image of the camera 3 that is the reference image from the pixel value of the standard image and outputs the result.
[0067]
The absolute value circuit 202-1 calculates and outputs the absolute value of the calculation result of the subtraction circuit 201-1. The absolute value circuit 202-2 calculates and outputs the absolute value of the calculation result of the subtraction circuit 201-2. As a result, the absolute value circuit 202-1 outputs the absolute value of the difference between the image from the image input unit 100-2 that is the reference image and the image input unit 100-1 that is the standard image. Further, the absolute value circuit 202-2 outputs an absolute value of a pixel difference between the image of the image input unit 100-3 as a reference image and the image from the image input unit 100-1 as a standard image. become.
[0068]
The selector 203-1 selects the output of the absolute value circuit 203-1 and selects the addition circuit 204 because the effective bit is set to "1" when the search range of the camera 2 is within the image area. Output to. If the search range of the camera 2 exceeds the image area, the valid bit is set to “0”. In this case, the selector 203-1 outputs the output from the absolute value circuit 202-2. Is output to the adder circuit 204.
[0069]
Similarly, the selector 203-2 selects the output of the absolute value circuit 203-2 because the valid bit is set to “1” when the search range of the camera 3 is within the image area. , Output to the adder circuit 204. When the search range of the camera 3 exceeds the image area, the valid bit is set to “0”. In this case, the selector 203-2 outputs the output of the absolute value circuit 202-1. Is output to the adder circuit 204.
[0070]
The adder circuit 204 adds the outputs of the selectors 203-1 and 203-2 and outputs the result. The selector 206 selects and outputs the output of the adder circuit 204 or the maximum value circuit 205 according to the valid bit states of the camera 2 and the camera 3. As a result, the output of the selector 206 produces the following output according to the valid bit states of the camera 2 and the camera 3.
[0071]
(1) If both valid bits are "1" (valid), the absolute value circuit 202-1 and the absolute value circuit 202-2 are added together and output.
(2) When either one of the valid bits is “0” (invalid), the output of the valid absolute value circuit is doubled and outputted.
(3) When both valid bits are “0”, the output of the maximum value circuit 205 (for example, the value 511 when the pixel data is 8 bits) is selected and output.
[0072]
Outputs of the SAD circuits 200-1 to 200-4 are supplied to the SSAD circuits 300-1 to 300-4, respectively.
[0073]
For example, the SSAD circuits 200-1 to 200-4 perform block matching processing in units of 5 × 5 pixel blocks, and output the obtained results.
[0074]
That is, the absolute value (| a of the pixel difference output from the SAD circuits 200-1 to 200-4.ij-Bij|) Is supplied to the subtraction circuit 302 and is also supplied to the delay line 301, delayed by the number of pixels of the size of block matching × 1 line, and then supplied to the subtraction circuit 302.
[0075]
The subtraction circuit 302 subtracts the data delayed by the delay line 301 from the output data of the SAD circuit and outputs the result to the addition circuit 303.
[0076]
The adder circuit 303 adds the data one line before delayed by the memory 304 and the output of the subtractor circuit 302 and outputs the result. As a result, the addition circuit 303 receives the data (Σi| Aij-Bij|) Is output.
[0077]
The delay line 305, the subtracting circuit 306, the adding circuit 307, and the memory 308 execute the same processing as that of the preceding circuit, and as a result, the adding circuit 307 receives data (two-dimensional block matching processing) ( ΣjΣi| Aij-Bij|) Is output.
[0078]
Data output from the SSAD circuits 300-1 to 300-4 is supplied to the secondary approximation processing units 400-1 to 400-4, respectively.
[0079]
The secondary approximation units 400-1 to 400-4 have certain data S output from the SSAD circuits 300-1 to 300-4.2And the data S around it1, SThreeIs interpolated with a quadratic curve to obtain more accurate minimum value data.
[0080]
FIG. 5 is a diagram for explaining the operation of the secondary approximation unit 400.
[0081]
As shown in this figure, the output d of the SSAD circuit 3001To dThreeIs input, the quadratic approximation circuit 400 determines that d1To dThreeA curve connecting the two is generated by the following quadratic expression.
[0082]
S1= A ・ d1 2+ B · d1+ C (1)
S2= A ・ d2 2+ B · d2+ C (2)
SThree= A ・ dThree 2+ B · dThree+ C (3)
[0083]
Where d1= -1, d2= 0, dThreeWhen = 1, the above formulas (1) to (3) are as follows.
[0084]
S1= A-b + c (4)
S2= C (5)
SThree= A + b + c (6)
[0085]
When this is solved, the minimum value d can be expressed by the following equation.
[0086]
d = (S1-SThree) / {2 × (S1-2 ・ S2+ SThree)} (7)
[0087]
Here, the range of d can be expressed as follows.
[0088]
−0.5 ≦ d ≦ 0.5 (8)
[0089]
Therefore, when each term is doubled, the following equation is obtained.
[0090]
−1 ≦ 2 · d ≦ 1 (9)
[0091]
Substituting equation (7) into equation (9) yields the following equation:
[0092]
-1 ≦ (S1-SThree) / (S1-2 ・ S2+ SThree) ≦ 1 (10)
[0093]
Usually, when an operation including division as shown in Expression (7) is performed, the calculation cost of hardware increases. However, the accuracy required here is as small as 3 to 4 bits after the decimal point, and the range of the obtained result is clear as shown in equation (10). That is, the position indicating the accurate minimum value obtained by quadratic curve approximation is in a range of ± 0.5 from the position of the obtained minimum value. Therefore, since calculation can be performed using subtraction instead of division, calculation can be greatly simplified and hardware resources can be reduced.
[0094]
In the above configuration, all data output from the SSAD circuit 300 are subjected to quadratic approximation, but finally, the minimum value selection unit 500 selects only the minimum value. So no problem arises.
[0095]
The data approximated by the second order in this way is supplied to the minimum value selection unit 500. The minimum value selection unit 500 selects the minimum value from the data output from the secondary approximation units 400-1 to 400-4 and outputs the minimum value to the minimum value selection unit 600.
[0096]
The minimum value selection unit 600 compares the previous minimum value stored in the result memory 700 with the value newly output from the minimum value selection unit 500, and selects and outputs the smaller one. The result memory 700 holds the value output from the minimum value selection unit 600. As a result, in the result memory 700, the minimum data among the data obtained from all the camera pairs (the combination of the cameras corresponding to the images input to the respective SAD circuits) is selected and stored. Become.
[0097]
Since such minimum data is data having the highest degree of matching, it is possible to obtain the most accurate parallax by using the data.
[0098]
According to the embodiment as described above, if a pair of cameras for two reference images is configured, and the area to be searched is within the image in both of the cameras constituting the pair, both images are displayed. If the region to be searched is outside the image in either one of the cameras that make up the pair, the matching process is performed using the image that is in the image, and the pair In both of the cameras constituting the above, when the search area is outside the image, the maximum value is generated and output so that the output data becomes invalid. Therefore, an accurate result can be calculated even when the area to be searched is outside the image.
[0099]
In the above embodiment, measurement is performed using five cameras, but the present invention is not limited to such a case.
[0100]
In the specification, the transmission medium includes not only an information recording medium such as an FD and a CD-ROM, but also a network transmission medium such as the Internet and a digital satellite.
[0101]
【The invention's effect】
  According to the present invention, the distance to the symmetry point can be calculated even when the area to be searched is outside the image.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration example of an embodiment of the present invention.
FIG. 2 is a block diagram illustrating a detailed configuration example of an image input unit 100 illustrated in FIG.
FIG. 3 is a block diagram showing a detailed configuration example of the SAD circuit 200 shown in FIG. 1;
4 is a block diagram showing a detailed configuration example of the SSAD circuit 300 shown in FIG. 1. FIG.
FIG. 5 is a diagram for explaining processing of a secondary approximation unit 400 shown in FIG. 1;
FIG. 6 is a block diagram illustrating a configuration example of a conventional image processing apparatus.
[Explanation of symbols]
100-1 Image input unit (first input unit), 100-2 to 100-5 Image input unit (second input unit), 103 Memory (detection unit, storage unit), 200-1 to 200-4 SAD Circuit (search means), 203-1, 203-2 selector (control means), 206 selector (control means)

Claims (4)

3個以上の所定の位置の撮像装置によって撮像された画像に基づいて、対象点までの距離を画像処理により算出する画像処理装置において、
前記3個以上の撮像装置の中の1つから供給される画像を基準画像として入力する第1の入力手段と、
その他の撮像装置から供給される画像を参照画像として入力する第2の入力手段と、
前記基準画像の、前記参照画像の領域内のデータまたは前記参照画像の領域外のデータに所定のビットを付加して、前記基準画像を記憶する記憶手段と、
前記記憶手段により記憶された前記データに付加されている前記ビットを参照して、前記基準画像の各画素について、前記基準画像の画素が、前記第2の入力手段により入力されたそれぞれの参照画像の領域外であるか否かを判定する判定手段と、
前記判定手段により、前記基準画像の画素が、前記第2の入力手段により入力された全ての前記参照画像の領域内であると判定された場合、その基準画像の画素の画素値と、全ての前記参照画像の、前記基準画素の画素に対応する画素の画素値のそれぞれとの差分値に対応する値を出力し
前記判定手段により、前記基準画像の画素が、少なくとも1個の前記参照画像の領域内であるが他の前記参照画像の領域外であると判定された場合、その基準画像の画素の画素値と、前記基準画像の画素がその領域内であると判定された前記参照画像の前記基準画像の画素に対応する画素の画素値との差分値のみに対応する値を出力し
前記判定手段により、前記基準画像の画素が、全ての前記参照画像の領域外であると判定された場合には、所定の値を出力する制御手段と
前記制御手段により出力された出力値に基づいて前記基準画像と前記参照画像とのマッチング処理を実行するマッチング手段と
を含むことを特徴とする画像処理装置。
In an image processing device that calculates a distance to a target point by image processing based on images captured by three or more imaging devices at predetermined positions,
First input means for inputting an image supplied from one of the three or more imaging devices as a reference image;
Second input means for inputting an image supplied from another imaging apparatus as a reference image;
Storage means for storing the reference image by adding a predetermined bit to the data in the reference image area or the data outside the reference image area of the reference image;
With reference to the bit added to the data stored by the storage means, for each pixel of the reference image, each reference image in which the pixel of the reference image is input by the second input means Determining means for determining whether or not the area is outside,
When the determination unit determines that the pixels of the reference image are within the area of all the reference images input by the second input unit , the pixel values of the pixels of the reference image and all the pixels Outputting a value corresponding to a difference value between each pixel value of a pixel corresponding to a pixel of the reference pixel of the reference image ;
When the determination unit determines that the pixel of the standard image is within the area of at least one reference image but outside the area of the other reference image, the pixel value of the pixel of the standard image is And outputting a value corresponding only to a difference value between a pixel value of a pixel corresponding to the pixel of the reference image of the reference image determined to be within the region of the pixel of the reference image ,
Control means for outputting a predetermined value when the determination means determines that the pixels of the reference image are outside the area of all the reference images ;
An image processing apparatus comprising: matching means for executing matching processing between the reference image and the reference image based on an output value output by the control means .
前記マッチング処理は、前記基準画像と前記参照画像の画素値の差分の絶対値を演算し、その最小値を求める処理である
ことを特徴とする請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the matching process is a process of calculating an absolute value of a difference between pixel values of the base image and the reference image and obtaining a minimum value thereof.
3個以上の所定の位置の撮像装置によって撮像された画像に基づいて、対象点までの距離を画像処理により算出する画像処理方法において、
前記3個以上の撮像装置の中の1つから供給される画像を基準画像として入力する第1の入力ステップと、
その他の撮像装置から供給される画像を参照画像として入力する第2の入力ステップと、
前記基準画像の、前記参照画像の領域内のデータまたは前記参照画像の領域外のデータに所定のビットを付加して、前記基準画像を記憶する記憶ステップと、
前記記憶ステップの処理で記憶された前記データに付加されている前記ビットを参照して、前記基準画像の各画素について、前記基準画像の画素が、前記第2の入力ステップの処理で入力されたそれぞれの参照画像の領域外であるか否かを判定する判定ステップと、
前記判定ステップの処理で、前記基準画像の画素が、前記第2の入力ステップの処理で入力された全ての前記参照画像の領域内であると判定された場合、その基準画像の画素の画素値と、全ての前記参照画像の、前記基準画素の画素に対応する画素の画素値のそれぞれとの差分値に対応する値を出力し
前記判定ステップの処理で、前記基準画像の画素が、少なくとも1個の前記参照画像の領域内であるが他の前記参照画像の領域外であると判定された場合、その基準画像の画素の画素値と、前記基準画像の画素がその領域内であると判定された前記参照画像の前記基準画像の画素に対応する画素の画素値との差分値のみに対応する値を出力し
前記判定ステップの処理で、前記基準画像の画素が、全ての前記参照画像の領域外であると判定された場合には、所定の値を出力する制御ステップと
前記制御ステップの処理で出力された出力値に基づいて前記基準画像と前記参照画像とのマッチング処理を実行するマッチングステップと
を含むことを特徴とする画像処理方法。
In an image processing method for calculating a distance to a target point by image processing based on images captured by three or more imaging devices at predetermined positions,
A first input step of inputting an image supplied from one of the three or more imaging devices as a reference image;
A second input step of inputting an image supplied from another imaging device as a reference image;
A step of storing the reference image by adding a predetermined bit to the data in the reference image area or the data outside the reference image area of the reference image;
With reference to the bit added to the data stored in the process of the storage step, the pixel of the reference image is input in the process of the second input step for each pixel of the reference image A determination step for determining whether or not the area of each reference image;
When it is determined in the process of the determination step that the pixels of the reference image are within the area of all the reference images input in the process of the second input step, the pixel values of the pixels of the reference image And a value corresponding to a difference value between each of the reference images and a pixel value of a pixel corresponding to the pixel of the reference pixel ,
When it is determined in the process of the determination step that the pixel of the standard image is within the area of at least one reference image but outside the area of the other reference image, the pixel of the pixel of the standard image A value corresponding only to a difference value between a value and a pixel value of a pixel corresponding to a pixel of the reference image of the reference image determined to be within the region of the pixel of the reference image ,
A control step of outputting a predetermined value when it is determined in the process of the determination step that the pixels of the reference image are outside the region of all the reference images ;
An image processing method comprising: a matching step of executing a matching process between the reference image and the reference image based on an output value output in the process of the control step .
3個以上の所定の位置の撮像装置によって撮像された画像に基づいて、対象点までの距離を画像処理により算出する処理をコンピュータに実行させるプログラムにおいて、
前記3個以上の撮像装置の中の1つから供給される画像を基準画像として入力する第1の入力ステップと、
その他の撮像装置から供給される画像を参照画像として入力する第2の入力ステップと、
前記基準画像の、前記参照画像の領域内のデータまたは前記参照画像の領域外のデータに所定のビットを付加して、前記基準画像を記憶する記憶ステップと、
前記記憶ステップの処理で記憶された前記データに付加されている前記ビットを参照して、前記基準画像の各画素について、前記基準画像の画素が、前記第2の入力ステップの処理で入力されたそれぞれの参照画像の領域外であるか否かを判定する判定ステップと、
前記判定ステップの処理で、前記基準画像の画素が、前記第2の入力ステップの処理で入力された全ての前記参照画像の領域内であると判定された場合、その基準画像の画素の画素値と、全ての前記参照画像の、前記基準画素の画素に対応する画素の画素値のそれぞれとの差分値に対応する値を出力し
前記判定ステップの処理で、前記基準画像の画素が、少なくとも1個の前記参照画像の領域内であるが他の前記参照画像の領域外であると判定された場合、その基準画像の画素の画素値と、前記基準画像の画素がその領域内であると判定された前記参照画像の前記基準画像の画素に対応する画素の画素値との差分値のみに対応する値を出力し
前記判定ステップの処理で、前記基準画像の画素が、全ての前記参照画像の領域外であると判定された場合には、所定の値を出力する制御ステップと
前記制御ステップの処理で出力された出力値に基づいて前記基準画像と前記参照画像とのマッチング処理を実行するマッチングステップと
を含む処理をコンピュータに実行させるプログラムが記録されている記録媒体
In a program that causes a computer to execute a process of calculating a distance to a target point by image processing based on an image captured by an imaging device at three or more predetermined positions.
A first input step of inputting an image supplied from one of the three or more imaging devices as a reference image;
A second input step of inputting an image supplied from another imaging device as a reference image;
A step of storing the reference image by adding a predetermined bit to the data in the reference image area or the data outside the reference image area of the reference image;
With reference to the bit added to the data stored in the process of the storage step, the pixel of the reference image is input in the process of the second input step for each pixel of the reference image A determination step for determining whether or not the area of each reference image;
When it is determined in the process of the determination step that the pixels of the reference image are within the area of all the reference images input in the process of the second input step, the pixel values of the pixels of the reference image And a value corresponding to a difference value between each of the reference images and a pixel value of a pixel corresponding to the pixel of the reference pixel ,
When it is determined in the process of the determination step that the pixel of the standard image is within the area of at least one reference image but outside the area of the other reference image, the pixel of the pixel of the standard image A value corresponding only to a difference value between a value and a pixel value of a pixel corresponding to a pixel of the reference image of the reference image determined to be within the region of the pixel of the reference image ,
A control step of outputting a predetermined value when it is determined in the process of the determination step that the pixels of the reference image are outside the region of all the reference images ;
A recording medium on which a program for causing a computer to execute a process including a matching step of executing a matching process between the reference image and the reference image based on an output value output in the process of the control step is recorded .
JP20795497A 1997-08-01 1997-08-01 Image processing apparatus, image processing method, and transmission medium Expired - Fee Related JP3991342B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP20795497A JP3991342B2 (en) 1997-08-01 1997-08-01 Image processing apparatus, image processing method, and transmission medium
US09/123,089 US6526157B2 (en) 1997-08-01 1998-07-27 Image processing apparatus, image processing method and transmission medium
US10/320,114 US6625301B2 (en) 1997-08-01 2002-12-16 Image processing apparatus, image processing method and transmission medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20795497A JP3991342B2 (en) 1997-08-01 1997-08-01 Image processing apparatus, image processing method, and transmission medium

Publications (2)

Publication Number Publication Date
JPH1155692A JPH1155692A (en) 1999-02-26
JP3991342B2 true JP3991342B2 (en) 2007-10-17

Family

ID=16548296

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20795497A Expired - Fee Related JP3991342B2 (en) 1997-08-01 1997-08-01 Image processing apparatus, image processing method, and transmission medium

Country Status (1)

Country Link
JP (1) JP3991342B2 (en)

Also Published As

Publication number Publication date
JPH1155692A (en) 1999-02-26

Similar Documents

Publication Publication Date Title
US6445833B1 (en) Device and method for converting two-dimensional video into three-dimensional video
US20100142828A1 (en) Image matching apparatus and method
JPH0562878B2 (en)
JP6020471B2 (en) Image processing method, image processing apparatus, and image processing program
Miyajima et al. A real-time stereo vision system with FPGA
JP2006090896A (en) Stereo image processor
JP4317624B2 (en) Image processing device
JP2000283753A (en) Device for measuring distance using stereographic picture
US6526157B2 (en) Image processing apparatus, image processing method and transmission medium
JP3991342B2 (en) Image processing apparatus, image processing method, and transmission medium
JP3271101B2 (en) Digital image signal processing apparatus and processing method
KR980003999A (en) Histogram equalization circuit based on CDF computation domain and its method
JP3775535B2 (en) Image processing apparatus, image processing method, and recording medium
JP2000003448A (en) Luminance value correction circuit, method therefor and distance image generating device
JP2006164297A (en) Image processing device, image processing method and storage medium
JP2000099740A (en) Image composing method, image input device and recording medium recording image compositing program
EP0896301A1 (en) Stereoscopic image interpolating apparatus and method
JP2009509405A (en) Variable shape motion estimation in video sequences
JP6757141B2 (en) Image processing device, its control method, and program
WO2021245973A1 (en) Computation device and parallax search method
JP3303311B2 (en) Image vibration correction apparatus and image vibration correction method
JP4250807B2 (en) Field frequency conversion device and conversion method
JP3826434B2 (en) Signal conversion apparatus and method
JPH09214980A (en) Half picture element processing unit for macro block at compensation of motion of moving image
JP3303310B2 (en) Image vibration correction apparatus and image vibration correction method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20051020

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051101

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060104

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060929

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061128

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070715

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

Free format text: PAYMENT UNTIL: 20100803

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110803

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110803

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120803

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120803

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130803

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees