JP4037671B2 - Stereo image processing device - Google Patents
Stereo image processing device Download PDFInfo
- Publication number
- JP4037671B2 JP4037671B2 JP2002091828A JP2002091828A JP4037671B2 JP 4037671 B2 JP4037671 B2 JP 4037671B2 JP 2002091828 A JP2002091828 A JP 2002091828A JP 2002091828 A JP2002091828 A JP 2002091828A JP 4037671 B2 JP4037671 B2 JP 4037671B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- data
- average value
- pixel
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000012935 Averaging Methods 0.000 claims description 11
- 238000007792 addition Methods 0.000 description 40
- 238000000034 method Methods 0.000 description 16
- 230000009977 dual effect Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 7
- 230000000694 effects Effects 0.000 description 4
- 230000000052 comparative effect Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000032683 aging Effects 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 238000000691 measurement method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Landscapes
- Length Measuring Devices By Optical Means (AREA)
- Measurement Of Optical Distance (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、ステレオカメラで撮像した一対の画像を処理して距離画像を生成するステレオ画像処理装置に関する。
【0002】
【従来の技術】
一般に、画像による3次元計測技術として、2台のカメラからなるステレオカメラで対象物を異なる位置から撮像した一対の画像の相関を求め、同一物体に対する視差からステレオカメラの取り付け位置や焦点距離等のカメラパラメータを用いて三角測量の原理により距離を求める、いわゆるステレオ法による画像処理が知られている。
【0003】
このステレオ法による画像処理としては、本出願人は、先に、特開平5−114099号公報において、車両に搭載したステレオカメラで撮像した画像を処理して車外の対象物の3次元位置を測定する技術を提案している。この技術では、ステレオ撮像した一対の画像に対し、複数の小領域間のシティブロック距離を演算して対応位置を探索するステレオマッチングをハードウエア回路によって高速に処理し、対応する小領域の画素ズレ量を距離情報として出力するようにしている。
【0004】
更に、本出願人は、ステレオ撮像した一対の画像間のバラツキや低周波ノイズに影響されることなく、正確なステレオマッチングを行うため、特開平11−234701号公報において、メイン画像平均値処理部でメイン画像の小領域の輝度平均値を計算し、サブ画像平均値処理部でサブ画像の小領域の輝度平均値をメイン画像に対して1画素ずつずらしながら計算し、平均値差分部でサブ画像及びメイン画像に対して小領域内の各画素の輝度値から平均値を差分した値を計算し、ステレオマッチング部でメイン画像の輝度値から平均値を減算した値とサブ画像の輝度値から平均値を減算した値との差の絶対値を総和してシティブロック距離を計算する平均値差分マッチングの技術を提案している。この平均値差分マッチングでは、画像の高周波成分のみをマッチング対象として低周波ノイズを除去し、2つの画像間の精度の僅かなバランスの狂い、カメラやアナログ回路部品の経年変化によるゲイン変化の影響に対し、ミスマッチングを生じることなく正確な距離情報を得ることができる。
【0005】
【発明が解決しようとする課題】
しかしながら、先に本出願人が提案した平均値差分マッチングでは、ステレオ撮像した一対の画像間のバラツキや低周波ノイズに影響されないように小領域内の輝度平均値を演算し、輝度平均値と画素の輝度との差分によってシティブロック距離を演算することでステレオマッチングを行っている。このため、ランダム高周波ノイズが重畳した画像に対しては、ミスマッチングを防止する能力が不足することは否めず、新たな課題となっていた。
【0006】
本発明は上記事情に鑑みてなされたもので、低周波ノイズのみならず高周波ノイズの多い画像に対しても、ノイズに影響されることなく正確なステレオマッチングを行うことのできるステレオ画像処理装置を提供することを目的としている。
【0007】
【課題を解決するための手段】
上記目的を達成するため、請求項1記載の発明は、ステレオカメラで撮像した基準画像及び比較画像からなる一対の画像に対し、互いの画像の小領域間のシティブロック距離を演算して対応する小領域を探索し、対応する小領域で対象物までの距離に応じて生じる画素ズレ量に基づく遠近情報を数値化した距離画像を生成するステレオ画像処理装置において、上記基準画像の小領域内の各画素の画像データを平均し、第1の平均値として算出する手段と、上記比較画像の小領域内の各画素の画像データを平均し、第2の平均値として算出する手段と、上記基準画像の小領域内の各画素の画像データから上記第1の平均値を差分し、第1のデータ群として算出する手段と、上記比較画像の小領域内の各画素の画像データから上記第2の平均値を差分し、第2のデータ群として算出する手段と、上記基準画像の小領域内の各画素の画像データを、上記基準画像の画像全体の画像データ平均値に基づいて設定された判定値と比較して有効か否かを判定し、上記第1のデータ群及び上記第2のデータ群の有効データを選択する手段と、上記第1のデータ群の各有効データと上記第2のデータ群の各有効データとの差分の絶対値を総和し、上記シティブロック距離を演算する手段とを備えたことを特徴とする。
【0008】
請求項2記載の発明は、請求項1記載の発明において、上記判定値を、上記第1の平均値に、上記基準画像の画像全体の画像データ平均値に基づく係数値を乗算或いは減算して設定することを特徴とする。
請求項3記載の発明は、請求項2記載の発明において、上記係数値を、上記基準画像の画像全体の平均輝度が低い程、大きく設定することを特徴とする。
【0009】
すなわち、請求項1記載の発明は、ステレオカメラで撮像した一対の画像に対し、基準画像の小領域内の各画素の画像データから小領域内の各画素の画像データを平均した第1の平均値を差分した第1のデータ群、及び、比較画像の小領域内の各画素の画像データから小領域内の各画素の画像データを平均した第2の平均値を差分した第2のデータ群を算出し、基準画像の小領域内の各画素の画像データを基準画像の画像全体の画像データ平均値に基づいて設定された判定値と比較して有効か否かを判定し、第1のデータ群及び第2のデータ群から有効データを選択する。そして、第1のデータ群の各有効データと第2のデータ群の各有効データとの差分の絶対値を総和してシティブロック距離を演算することで、低周波ノイズのみならず高周波ノイズの多い画像に対しても、ノイズに影響されることなく正確なステレオマッチングを可能とする。
【0010】
その際、請求項2記載の発明のように、第1のデータ群及び第2のデータ群に対する判定値を、第1の平均値に基準画像の画像全体の画像データ平均値に基づく係数値を乗算或いは減算して設定することが望ましい。係数値は、基準画像の画像全体の平均輝度が低い程、大きく設定することが望ましい。
【0011】
【発明の実施の形態】
以下、図面を参照して本発明の実施の形態を説明する。図1〜図5は本発明の実施の一形態に係わり、図1はステレオ画像処理装置の基本構成図、図2はステレオ処理部のブロック図、図3はメイン画像及びサブ画像の小領域のデータを示す説明図、図4は係数値テーブルの説明図、図5は画像処理のタイミングチャートである。
【0012】
図1は、例えば自動車やヘリコプタ等の移動体に搭載され、対象風景をステレオ撮像した一対の画像を処理して三次元の距離情報を求め、求めた距離の情報に基づいて周囲環境や自己位置を認識する装置等に使用されるステレオ画像処理装置の基本構成を示し、2台1組のカメラから構成されるステレオカメラ10、このステレオカメラ10で撮像した画像に対する入力処理を行う画像入力部20、この画像入力部20で処理した撮像画像を元画像としてストアする元画像メモリ25、元画像をステレオ処理して距離分布情報(距離画像)を取得するステレオ処理部30、距離画像をストアする距離画像メモリ35、距離画像を読み込んで各種認識処理を行う認識処理部40等から構成される。
【0013】
ステレオカメラ10を構成する2台のカメラ10a,10bは、互いに、同期が取れ、且つ、シャッタースピード可変のCCDカメラであり、一方のCCDカメラ10aをステレオ処理の際の基準画像を撮像するメインカメラ、他方のCCDカメラ10bをステレオ処理の際の比較画像を撮像するサブカメラとして、所定の基線長で互いの撮像面垂直軸が平行となるよう配置されている。
【0014】
画像入力部20は、各CCDカメラ10a,10bからの2系統のアナログ撮像信号を処理するためのアンプやA/Dコンバータと、例えば高集積度FPGAによって構成した画像処理の各種機能回路とを備え、さらに、CCDカメラ10a,10bの機械的な光学位置の僅かなズレやレンズ歪み等を電気的に補正するための画像調整回路を備えたものであり、CCDカメラ10a,10bからの撮像画像を所定の輝度階調のデジタル画像データに変換し、画像調整によってCCDカメラ10a,10bの機械的な取り付け位置の誤差やレンズ歪み等を補正して元画像メモリ25にストアする。
【0015】
ステレオ処理部30は、元画像メモリ25にストアされたメイン画像(基準画像)及びサブ画像(比較画像)の2枚の画像に対し、各画像の小領域毎にシティブロック距離を計算して互いの相関を求めることで対応する小領域を特定するステレオマッチングを行い、対象物までの距離に応じて生じる画素のズレ(=視差)から得られる対象物までの遠近情報を数値化した3次元画像情報(距離画像)を取得するものであり、マッチングシーケンスに関する機能を、同様に高集積度FPGA等によって構成する。
【0016】
認識処理部40は、距離画像から得られる距離分布情報に基づいて高速に各種認識処理を行うためのRISCプロセッサ等からなり、例えば車両に搭載された場合、道路形状や前方車両の存在等の走行環境を認識し、衝突危険度を判定して運転者に警報を発したり、自動的にブレーキを作動させて停止させる、あるいは、先行車との車間距離を安全に保つよう自動的に走行速度を増減する等の車両制御用データを出力する。
【0017】
ステレオ処理部30におけるステレオマッチングは、基本的には、先に本出願人によって提出された特開平11−234701号公報に詳述されている処理と同様であるが、特開平11−234701号の処理では元画像に対して予めマッチングを取る小領域の輝度平均値を取り、小領域内のそれぞれの画素の輝度値から輝度平均値を差分した値によってシティブロック距離を演算する平均値差分マッチングを行っているのに対し、本発明では、基準画像の小領域の輝度平均値を基準としてマッチングに使用する小領域内の画素を選択する画素選択機能付き平均値差分マッチングを行う。
【0018】
この画素選択機能付き平均値差分マッチングは、平均値差分マッチングの利点、すなわち、画像の高周波成分のみをマッチング対象とし、ハイパスフィルタと等価な作用を有しているため低周波ノイズを除去することができ、2つの画像間の輝度の僅かなバランスの狂いの影響、カメラやアナログ回路部品の経年変化によるゲイン変化の影響を削減することができるという利点に加え、高周波ノイズに対しても画素を選択することによりミスマッチングを生じることがなく、正確な距離情報を得ることができる。
【0019】
詳細には、ステレオ処理部30の機能構成は、図2に示すように、メイン画像の小領域の輝度平均値を計算するメイン画像平均値処理部50、このメイン画像平均値処理部50で計算したメイン画像の小領域の輝度平均値データをストアするメイン平均値デュアルポートメモリ55、サブ画像の小領域の輝度平均値をメイン画像に対して1画素ずつずらしながら計算するサブ画像平均値処理部60、このサブ画像平均値処理部60で計算したサブ画像の小領域の輝度平均値データをストアするサブ平均値デュアルポートメモリ65、サブ画像及びメイン画像に対し、小領域内のそれぞれの画素の輝度値から輝度平均値を差分した値を計算する平均値差分部70、メイン画像の小領域の輝度平均値に基づいて小領域内の画素が有効か無効かを判定する有効画素判定部80、この有効画素判定部80の判定結果に基づいて平均値差分データを選択的に出力するデータ選択部90、メイン元画像の輝度値から輝度平均値を差分した値とサブ元画像の輝度値から輝度平均値を差分した値との差の絶対値を総和してシティブロック距離を計算するステレオマッチング部100、シティブロック距離の最小値及び最大値等を評価してシティブロック距離の最小値が本当に2つの画像の小領域の一致を示しているものかどうかをチェックするシティブロック距離チェック部110等から構成されており、さらに、異常な距離データを排除するための特異点除去フィルタ部120を付属的に備えている。
【0020】
本形態では、元画像を横500×縦200画素の大きさとし、その中で処理範囲を横420×縦160として、横8×縦4画素の小領域でマッチングを取るようにしており、図3に示すように、メイン画像の横8×縦4画素の小領域内の各画素の輝度データMi,j(i=1〜8、j=1〜4)、サブ画像の横8×縦4画素の小領域内の各画素の輝度データSi,j(i=1〜8、j=1〜4)に対し、それぞれ以下の(1),(2)式で示す輝度平均値AM,SMを求める。但し、Σはi=1〜8,j=1〜4の総和を求めるものとする。
AM=ΣMi,j/32 …(1)
SM=ΣSi,j/32 …(2)
【0021】
そして、以下の(3)式で示すように、メイン元画像の輝度データMi,jから輝度平均値AMを減算した値とサブ画像の輝度データSi,jから輝度平均値SMを減算した値との差の絶対値を総和してシティブロック距離CBを演算する。但し、このシティブロック距離の演算で加算する画素は、以下に説明するように、Mi,j>(AM×k)又はMi,j>(AM−k)の有効判定条件を満たした画素であり、kは有効判定に用いる係数値である。
CB=Σ│(Mi,j−AM)−(Si,j−SM)│ …(3)
【0022】
小領域の輝度平均値は、元画像の4ライン毎に計算するようにしており、メイン画像平均値処理部50は、3個の2バイト加算器を組み合わせた4バイト加算ブロック51に、加算器とD−フリップフロップとシフトレジスタとを組み合わせた2つの加算ブロック52,53(図中、加算1,2)が並列接続された構成で、各加算ブロック52,53のデータがマルチプレクサ54を介してメイン平均値デュアルポートメモリ55に出力される。
【0023】
一方、サブ画像平均値処理部60は、横8×縦4画素の小領域を水平走査方向に1画素ずつずらしながら輝度平均値を計算するため、3個の2バイト加算器を組み合わせた4バイト加算ブロック61に、パラレル接続した9個の加算器(図中、加算1〜9)及び8個のマルチプレクサからなる加算平均ブロック62を接続した構成となっている。加算平均ブロック62では、加算1〜8の各2個毎の加算器出力を7個のマルチプレクサによる3段構成で処理し、さらに、最終段のマルチプレクサで3段構成のマルチプレクサ出力と加算9の加算器出力に対するデータセレクトを行って加算平均値を出力する。
【0024】
平均値差分部70は、元画像の4ライン分に対応して4つの平均値差分ブロック71,72,73,74(図中、平均値差分1〜4)からなり、それぞれに、メイン画像用の差分器とサブ画像用の差分器とが備えられている。メイン画像用の差分器では、元画像メモリ25のメイン画像データからメイン平均値デュアルポートメモリ55の平均値データを減算する処理をマルチプレクサ及び8段のシフトレジスタを介して横8バイト分を順次行い、サブ画像用の差分器では、元画像メモリ25のサブ画像データからサブ平均値デュアルポートメモリ65の平均値データを減算する処理を行う。
【0025】
有効画素判定部80は、同様に4つの元画像の4ライン分に対応した4つの有効判定部81〜84(図中、有効判定1〜4)と、有効判定のための係数値kを設定する判定値演算部85とを備えている。有効判定部81〜84は、それぞれに、乗算器(或いは差分器)とコンパレータとを備え、メイン平均値デュアルポートメモリ55からの小領域毎の輝度平均値に判定値演算部85にて設定された係数値kを乗算或いは減算した判定値と、元画像メモリ25からのメイン画像の画素輝度値とをコンパレータで比較し、判定値より明るい(輝度の高い)画素を有効とし、判定値以下の暗い(輝度の低い)画素を無効として、シティブロック距離の演算に有効な画素を抽出する。これにより、ノイズの影響の大きい暗い画素を排除してミスマッチングを防止することができ、赤外線画像等に適用することも可能となる。
【0026】
判定値演算部85で設定される係数値kは、本形態においては、元画像メモリ25のメイン画像に対して全画像の輝度平均値を求め、この輝度平均値に基づいて設定する。例えば、輝度レベルを256階調で表現した場合、図4に示すように、輝度レベルを、0〜63、64〜127、128〜191、192〜255の4段階に分けて係数値テーブルを作成し、各段階毎に、乗算の定数倍値(例えば、1倍、0.75倍、0.5倍、0.25倍)、或いは減算の定数値(例えば、128、64、32、0)を予め格納しておき、この係数値テーブルを参照することで係数値kを設定する。係数値kは、メイン画像全体の平均輝度が低い程、大きく設定される。
【0027】
データ選択部90は、4つの平均値差分ブロック71,72,73,74の各ブロック毎に2つずつの計8つの選択部91〜98(図中、選択1〜8)からなり、それぞれに、マルチプレクサを備えている。このマルチプレクサは、有効画素判定部80からの判定出力(コンパレータ出力)により、各ブロックからの出力データと“0”とを選択的に出力し、無効の場合、各ブロックからの出力データをクリアし、有効の場合、各ブロックからの出力データをスルーする。
【0028】
ステレオマッチング部100は、4個の差分器と4個の絶対値演算器と3個の加算器とをピラミッド状に接続した縦加算ブロック101に、横加算ブロック102を接続した構成となっている。縦加算ブロック101は、4段構成となっており、各平均値差分ブロック71,72,73,74のメイン画像データとサブ画像データとの差分を取る4個の差分器で1段目が構成され、2段目が4個の絶対値演算器で構成されている。2段目の絶対値演算の出力データは、2個毎に3段目の加算器(2個)で加算され、この3段目の2個の加算器の出力データが4段目の最終段の加算器に入力される。縦加算ブロック101の最終段の加算器出力は、加算器とD−フリップフロップとを組み合わせた横加算ブロック102に入力され、この横加算ブロック102からシティブロック距離の演算結果が出力される。
【0029】
以上の構成によるステレオ画像処理装置では、図5のタイムチャートに示すように、100ms毎の処理サイクルで距離画像を生成する。
【0030】
すなわち、処理サイクルの初めで画像をサンプルして画像調整を行い、残りの処理時間で必要な領域の距離画像を生成する。図5の例では、1サイクルで中央40ライン分(line00〜line27)すなわち横420画素×縦160画素についてのステレオ処理を行うようになっており、このステレオ処理では、1ライン分の処理の先頭で、横420×縦160画素の元画像の4ライン分について横8×縦4画素の小領域の輝度データの平均値を求める処理を行う。この平均化処理では、メイン平均値デュアルポートメモリ55にメイン元画像の各小領域の輝度平均値が40バイト分ストアされ、サブ平均値デュアルポートメモリ65には、サブ元画像の各小領域の輝度平均値が413バイト(420−7=バイト)分ストアされる。
【0031】
メイン元画像に対しては、メイン画像平均値処理部50の4バイト加算ブロック51でメイン元画像の縦4バイト分を加算し、この加算結果を次段の加算ブロック52(加算ブロック53)のD−フリップフロップにラッチされている前回の縦4バイト分のデータに加算する。これをパイプライン処理で8回繰り返すことにより、小領域に対する8×4=32バイト分の演算を行い、シフトレジスタでビットシフトして平均値を得る。2つの加算ブロック52,53は、演算遅れによって処理の流れが不均一となることを避けるためバンク切換えで使用するようにしており、メイン元画像の横320画素まで交互に32バイト分の演算を行い、マルチプレクサ54を介してメイン平均値デュアルポートメモリ55に平均値データ(第1の平均値)が40バイト(320/8=40バイト)分出力される。
【0032】
サブ元画像では、メイン元画像に対して横8×縦4画素の小領域の輝度平均値を水平走査方向に1画素ずつずらしながら100画素ずれまで計算するため、サブ画像平均値処理部60の4バイト加算ブロック61でサブ元画像の縦4バイト分を加算し、次段の加算平均ブロック62の加算1の加算器で1画素目から8画素目までの横8バイト分の加算を実行し、加算2の加算器で2画素目から9画素目までの横8バイト分の加算を実行し、加算3の加算器で3画素目から10画素目までの横8バイト分の加算を実行し、加算4の加算器で4画素目から11画素目までの横8バイト分の加算を実行し、加算5の加算器で5画素目から12画素目までの横8バイト分の加算を実行し、加算6の加算器で6画素目から13画素目までの横8バイト分の加算を実行し、加算7の加算器で7画素目から14画素目までの横8バイト分の加算を実行し、加算8の加算器で8画素目から15画素目までの横8バイト分の加算を実行し、加算9の加算器で9画素目から16画素目までの横8バイト分の加算を実行する。
【0033】
そして、次は、再び、加算1の加算器で10画素目から17画素目までの横8バイト分の加算を実行するというように、加算1の加算器から加算9の加算器を順次使用して多段接続したマルチプレクサを介して加算平均値を出力する。この平均値計算をサブ元画像の中央部420画素分実行し、サブ平均値デュアルポートメモリ65に平均値データ(第2の平均値)が413バイト(420−7=413バイト)分出力される。これと並行して、有効画素判定部80の判定値演算部85では、元画像メモリ25の全画像についての輝度平均値を求め、その輝度平均値に対して係数値kを設定し、有効判定部81〜84に出力する。
【0034】
そして、メイン画像での40個の小領域についてステレオ処理(area00〜area27)が開始され、シティブロック距離を演算するシティブロック処理が始まる。このシティブロック処理では、平均値差分ブロック71,72,73,74で、それぞれ元画像1ライン分の差分計算が行われ、メイン画像の小領域内の画素毎の輝度データから平均値を減算した差分データ群(第1のデータ群)、サブ画像の小領域内の画素毎の輝度データから平均値を減算した差分データ群(第2のデータ群)の個々のデータがデータ選択部90に順次出力され、それと並行して有効判定部81〜84で、メイン画像の小領域の輝度平均値に係数値kを乗算或いは減算した値と画素輝度値とを比較し、該当画素が有効か無効かを判定してデータ選択部90に判定結果を出力する。データ選択部90では、判定結果が有効の場合は、平均値差分ブロック71,72,73,74からのデータ群をそのままステレオマッチング部100に順次出力し、判定結果が無効の場合、ステレオマッチング部100に“0”を出力する。
【0035】
この処理は、1画素ずれ毎に100画素ずれまで順次行われ(dpx00〜dpx64)、ステレオマッチング部100の縦加算ブロック101では、初段で平均値差分ブロック71,72,73,74からそれぞれ出力されるメイン画像の差分データからサブ画像の差分データを減算し、2段目の絶対値演算器で絶対値演算を行い、3段目の2個の加算器の各々で、2段目の絶対値演算器からの2つの同時入力データを加算して4段目で前段の出力を加算する。
【0036】
そして、縦加算ブロック101での縦4バイト分の演算結果が横加算ブロック102に入力され、横8バイト分の処理に移る(row加算処理:row00H〜row7H)。この横加算ブロック102では、D−フリップフロップにラッチされている縦4バイト分のデータを順次加算して8×4=32画素分の総和を取り、シティブロック距離の演算値を出力する。
【0037】
ステレオマッチング部100から出力されたシティブロック距離は、シティブロック距離チェック部110において最小値及び最大値等が評価され、シティブロック距離の最小値が本当に2つの画像の小領域の一致を示しているものかどうかがチェックされる。そして、チェック条件を満足し、且つ、シティブロック距離が最小になる画素ズレ量が有効な距離データとして距離画像メモリ35にストアされ、2ライン遅れで局所的な異常データを排除するための特異点除去フィルタ処理が実施される。
【0038】
【発明の効果】
以上説明したように本発明によれば、画像の高周波成分のみをマッチング対象として低周波ノイズを除去するとともに、高周波ノイズに対しても有効な画素を選択することによりミスマッチングを生じることがなく、正確な距離情報を得ることができる。
【図面の簡単な説明】
【図1】ステレオ画像処理装置の基本構成図
【図2】ステレオ処理部のブロック図
【図3】メイン画像及びサブ画像の小領域のデータを示す説明図
【図4】係数値テーブルの説明図
【図5】画像処理のタイミングチャート
【符号の説明】
10 ステレオカメラ
30 ステレオ処理部
50 メイン画像平均化処理部
60 サブ画像平均化処理部
70 平均値差分部
80 有効画素判定部
90 データ選択部
100 ステレオマッチング部[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a stereo image processing apparatus that generates a distance image by processing a pair of images captured by a stereo camera.
[0002]
[Prior art]
In general, as a three-dimensional measurement technique based on images, a correlation between a pair of images obtained by capturing an object from different positions with a stereo camera composed of two cameras is obtained, and the mounting position and focal length of the stereo camera are determined from the parallax for the same object. Image processing based on a so-called stereo method is known in which a distance is obtained based on the principle of triangulation using camera parameters.
[0003]
As image processing by this stereo method, the present applicant previously measured the three-dimensional position of an object outside the vehicle by processing an image picked up by a stereo camera mounted on the vehicle in Japanese Patent Laid-Open No. 5-11409. The technology to do is proposed. In this technique, stereo matching for searching for a corresponding position by calculating a city block distance between a plurality of small areas is processed at high speed by a hardware circuit for a pair of images captured in stereo, and pixel shift of the corresponding small area is performed. The quantity is output as distance information.
[0004]
Furthermore, in order to perform accurate stereo matching without being affected by variations between a pair of images captured in stereo or low-frequency noise, the applicant of the present application disclosed in Japanese Patent Application Laid-Open No. 11-234701 has a main image average value processing unit. To calculate the average luminance value of the small area of the main image, the sub-image average value processing unit calculates the luminance average value of the small area of the sub-image one pixel at a time with respect to the main image, and the average value difference unit A value obtained by subtracting the average value from the luminance value of each pixel in the small area with respect to the image and the main image is calculated, and the value obtained by subtracting the average value from the luminance value of the main image in the stereo matching unit and the luminance value of the sub-image A technique for average value difference matching is proposed in which the absolute value of the difference from the value obtained by subtracting the average value is summed to calculate the city block distance. In this average value difference matching, only the high-frequency component of the image is targeted for matching, low-frequency noise is removed, the accuracy of the two images is slightly out of balance, and the effects of gain changes due to aging of cameras and analog circuit components are affected. On the other hand, accurate distance information can be obtained without causing mismatching.
[0005]
[Problems to be solved by the invention]
However, in the average value difference matching previously proposed by the present applicant, the luminance average value in a small area is calculated so as not to be affected by variations between a pair of stereo images and low-frequency noise, and the luminance average value and the pixel are calculated. Stereo matching is performed by calculating the city block distance based on the difference from the brightness of the image. For this reason, it cannot be denied that the ability to prevent mismatching is insufficient for an image on which random high frequency noise is superimposed, which has been a new problem.
[0006]
The present invention has been made in view of the above circumstances, and provides a stereo image processing apparatus capable of performing accurate stereo matching without being affected by noise, not only for low-frequency noise but also for images with high frequency noise. It is intended to provide.
[0007]
[Means for Solving the Problems]
In order to achieve the above object, the invention described in
[0008]
The invention according to
The invention described in
[0009]
That is, according to the first aspect of the present invention, the first average obtained by averaging the image data of each pixel in the small area from the image data of each pixel in the small area of the reference image with respect to the pair of images captured by the stereo camera. A first data group obtained by subtracting a value, and a second data group obtained by subtracting a second average value obtained by averaging the image data of each pixel in the small area from the image data of each pixel in the small area of the comparison image The image data of each pixel in the small area of the reference image is compared with a determination value set based on the average value of the image data of the entire image of the reference image to determine whether it is valid or not. Valid data is selected from the data group and the second data group. Then, by calculating the city block distance by summing the absolute values of the differences between the valid data of the first data group and the valid data of the second data group, there is not only low frequency noise but also high frequency noise. Even for images, accurate stereo matching is possible without being affected by noise.
[0010]
At this time, as in the invention described in
[0011]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings. 1 to 5 relate to an embodiment of the present invention, FIG. 1 is a basic configuration diagram of a stereo image processing apparatus, FIG. 2 is a block diagram of a stereo processing unit, and FIG. 3 is a small area of a main image and a sub image. FIG. 4 is an explanatory diagram showing data, FIG. 4 is an explanatory diagram of a coefficient value table, and FIG. 5 is a timing chart of image processing.
[0012]
FIG. 1 shows a three-dimensional distance information obtained by processing a pair of images obtained by stereo imaging of a target landscape, for example, mounted on a moving body such as an automobile or a helicopter, and based on the obtained distance information. 1 shows a basic configuration of a stereo image processing apparatus used for a device for recognizing an image, a
[0013]
The two cameras 10a and 10b constituting the
[0014]
The
[0015]
The
[0016]
The
[0017]
The stereo matching in the
[0018]
This average value difference matching with a pixel selection function has the advantage of average value difference matching, that is, only high frequency components of an image are targeted for matching and has an action equivalent to a high-pass filter, so that low frequency noise can be removed. In addition to the advantage of being able to reduce the effects of slight brightness imbalance between two images and the effects of gain changes due to aging of cameras and analog circuit components, pixels can also be selected for high-frequency noise By doing so, mismatching does not occur, and accurate distance information can be obtained.
[0019]
Specifically, the functional configuration of the
[0020]
In this embodiment, the size of the original image is 500 × 200 pixels, the processing range is 420 × 160, and matching is performed in a small region of 8 × 4 pixels. , Luminance data Mi, j (i = 1 to 8, j = 1 to 4) of each pixel in a small area of 8 × 4 pixels in the main image, and 8 × 4 pixels in the sub image. Average luminance values AM and SM shown in the following equations (1) and (2) are obtained for the luminance data Si, j (i = 1 to 8, j = 1 to 4) of each pixel in the small area of . Here, Σ is the sum of i = 1-8 and j = 1-4.
AM = ΣMi, j / 32 (1)
SM = ΣSi, j / 32 (2)
[0021]
Then, as shown in the following equation (3), a value obtained by subtracting the luminance average value AM from the luminance data Mi, j of the main original image and a value obtained by subtracting the luminance average value SM from the luminance data Si, j of the sub image The city block distance CB is calculated by summing up the absolute values of the differences. However, the pixels to be added in the calculation of the city block distance are pixels that satisfy the validity determination condition of Mi, j> (AM × k) or Mi, j> (AM−k) as described below. , K are coefficient values used for validity determination.
CB = Σ│ (Mi, j-AM)-(Si, j-SM) │ ... (3)
[0022]
The luminance average value of the small area is calculated every four lines of the original image, and the main image average
[0023]
On the other hand, the sub-image average value processing unit 60 calculates a luminance average value while shifting a small area of 8 × 4 pixels horizontally by one pixel at a time in the horizontal scanning direction. The adder block 61 is connected to nine adders (
[0024]
The average
[0025]
Similarly, the valid pixel determination unit 80 sets four validity determination units 81 to 84 (
[0026]
In the present embodiment, the coefficient value k set by the determination
[0027]
The data selection unit 90 is composed of a total of eight
[0028]
The
[0029]
In the stereo image processing apparatus having the above configuration, as shown in the time chart of FIG. 5, a distance image is generated at a processing cycle of every 100 ms.
[0030]
That is, image adjustment is performed by sampling an image at the beginning of the processing cycle, and a distance image of a necessary area is generated in the remaining processing time. In the example of FIG. 5, stereo processing is performed for 40 lines (
[0031]
For the main original image, the 4-
[0032]
In the sub-original image, the luminance average value of a small area of 8 × 4 pixels in the horizontal direction is calculated with respect to the main original image up to 100 pixel shift while shifting one pixel at a time in the horizontal scanning direction. The 4-byte addition block 61 adds the vertical 4 bytes of the sub-original image, and the
[0033]
Next, the adder of
[0034]
Then, stereo processing (area00 to area27) is started for 40 small regions in the main image, and city block processing for calculating the city block distance is started. In this city block processing, the difference calculation for one line of the original image is performed in the average value difference blocks 71, 72, 73, 74, respectively, and the average value is subtracted from the luminance data for each pixel in the small area of the main image. Individual data of the difference data group (first data group) and the difference data group (second data group) obtained by subtracting the average value from the luminance data for each pixel in the small area of the sub-image are sequentially input to the data selection unit 90. In parallel with this, the validity determination units 81 to 84 compare the pixel luminance value with the value obtained by multiplying or subtracting the coefficient value k from the luminance average value of the small area of the main image, and determine whether the corresponding pixel is valid or invalid. And the determination result is output to the data selection unit 90. In the data selection unit 90, when the determination result is valid, the data group from the average value difference blocks 71, 72, 73, 74 is sequentially output to the
[0035]
This process is sequentially performed up to 100 pixel shifts for each pixel shift (dpx00 to dpx64), and in the vertical addition block 101 of the
[0036]
Then, the calculation result for the vertical 4 bytes in the
[0037]
The city block distance output from the
[0038]
【The invention's effect】
As described above, according to the present invention, low-frequency noise is removed by matching only the high-frequency component of the image, and mismatching does not occur by selecting an effective pixel for high-frequency noise. Accurate distance information can be obtained.
[Brief description of the drawings]
FIG. 1 is a basic configuration diagram of a stereo image processing apparatus. FIG. 2 is a block diagram of a stereo processing unit. FIG. 3 is an explanatory diagram showing data of small areas of a main image and a sub image. FIG. 5 is a timing chart of image processing.
DESCRIPTION OF
Claims (3)
上記基準画像の小領域内の各画素の画像データを平均し、第1の平均値として算出する手段と、
上記比較画像の小領域内の各画素の画像データを平均し、第2の平均値として算出する手段と、
上記基準画像の小領域内の各画素の画像データから上記第1の平均値を差分し、第1のデータ群として算出する手段と、
上記比較画像の小領域内の各画素の画像データから上記第2の平均値を差分し、第2のデータ群として算出する手段と、
上記基準画像の小領域内の各画素の画像データを、上記基準画像の画像全体の画像データ平均値に基づいて設定された判定値と比較して有効か否かを判定し、上記第1のデータ群及び上記第2のデータ群の有効データを選択する手段と、
上記第1のデータ群の各有効データと上記第2のデータ群の各有効データとの差分の絶対値を総和し、上記シティブロック距離を演算する手段とを備えたことを特徴とするステレオ画像処理装置。For a pair of images composed of a reference image and a comparison image captured by a stereo camera, a corresponding small region is searched by calculating a city block distance between the small regions of each other image, and the target region is detected in the corresponding small region. In a stereo image processing apparatus for generating a distance image in which perspective information based on a pixel shift amount generated according to a distance is quantified,
Means for averaging the image data of each pixel in the small area of the reference image and calculating as a first average value;
Means for averaging the image data of each pixel in the small area of the comparison image and calculating as a second average value;
Means for subtracting the first average value from the image data of each pixel in the small area of the reference image and calculating as a first data group;
Means for subtracting the second average value from the image data of each pixel in the small area of the comparison image and calculating as a second data group;
The image data of each pixel in the small area of the reference image is compared with a determination value set based on an average value of image data of the entire image of the reference image to determine whether it is valid, and the first Means for selecting valid data of the data group and the second data group;
A stereo image comprising means for summing up absolute values of differences between the effective data of the first data group and the effective data of the second data group and calculating the city block distance. Processing equipment.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002091828A JP4037671B2 (en) | 2002-03-28 | 2002-03-28 | Stereo image processing device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002091828A JP4037671B2 (en) | 2002-03-28 | 2002-03-28 | Stereo image processing device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2003288584A JP2003288584A (en) | 2003-10-10 |
| JP4037671B2 true JP4037671B2 (en) | 2008-01-23 |
Family
ID=29236817
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2002091828A Expired - Fee Related JP4037671B2 (en) | 2002-03-28 | 2002-03-28 | Stereo image processing device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4037671B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6158779B2 (en) * | 2014-12-08 | 2017-07-05 | 株式会社Soken | Image processing device |
-
2002
- 2002-03-28 JP JP2002091828A patent/JP4037671B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2003288584A (en) | 2003-10-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR101200490B1 (en) | Image registration device and method | |
| CN110278346A (en) | Video defogging processing device and method | |
| US8041110B2 (en) | Pixel interpolation method | |
| WO2014044126A1 (en) | Coordinate acquisition device, system and method for real-time 3d reconstruction, and stereoscopic interactive device | |
| EP3062065A1 (en) | Imaging device and phase difference detection method | |
| CN117496043A (en) | Three-dimensional reconstruction method based on multi-channel polarization binocular image fusion | |
| CN109520480B (en) | Distance measurement method and distance measurement system based on binocular stereo vision | |
| CN109029380B (en) | Stereoscopic vision system based on film-coated multispectral camera and calibration ranging method thereof | |
| JP4403477B2 (en) | Image processing apparatus and image processing method | |
| JP3917285B2 (en) | Stereo image processing device | |
| CN109389629B (en) | Method for determining stereo matching self-adaptive parallax grade | |
| US9674503B2 (en) | Stereo matching apparatus using image property | |
| JP4037671B2 (en) | Stereo image processing device | |
| JPH0983804A (en) | Noise reduction device | |
| CN110942430A (en) | Method for improving motion blur robustness of TOF camera | |
| JP4605582B2 (en) | Stereo image recognition apparatus and method | |
| JPH1062154A (en) | Processing method of measured value, method and device for shape reconstruction | |
| JP4021036B2 (en) | Stereo image processing device | |
| JP5761979B2 (en) | Noise removal system and imaging apparatus | |
| KR101869226B1 (en) | Disparity map generating method for mono cameras | |
| JP4265927B2 (en) | Stereo image processing device | |
| KR100795974B1 (en) | A device that generates depth-map in real time by processing streaming stereo images | |
| JPH08287253A (en) | Object shape estimating method and object shape estimating apparatus | |
| KR101985287B1 (en) | Correcting device for color camera and thermal camera | |
| JP4197821B2 (en) | Image processing device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050303 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070626 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070823 |
|
| 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: 20071030 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20071101 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 4037671 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101109 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111109 Year of fee payment: 4 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121109 Year of fee payment: 5 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121109 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131109 Year of fee payment: 6 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| LAPS | Cancellation because of no payment of annual fees |