JP2003150940A - Stereo image processor - Google Patents

Stereo image processor

Info

Publication number
JP2003150940A
JP2003150940A JP2001351732A JP2001351732A JP2003150940A JP 2003150940 A JP2003150940 A JP 2003150940A JP 2001351732 A JP2001351732 A JP 2001351732A JP 2001351732 A JP2001351732 A JP 2001351732A JP 2003150940 A JP2003150940 A JP 2003150940A
Authority
JP
Japan
Prior art keywords
pixel
comparison
image
distance
pixels
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2001351732A
Other languages
Japanese (ja)
Inventor
Hiroyoshi Yamaguchi
博義 山口
Masaya Tanaka
昌也 田中
Tetsuya Shinpo
哲也 新保
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.)
Komatsu Ltd
Original Assignee
Komatsu Ltd
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 Komatsu Ltd filed Critical Komatsu Ltd
Priority to JP2001351732A priority Critical patent/JP2003150940A/en
Publication of JP2003150940A publication Critical patent/JP2003150940A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To measure the distances of a plurality of objects different in distance with good accuracy by stereo image processing. SOLUTION: Only a pixel whose value falls within a designated range in the images of a plurality of cameras is selected (13), and a corresponding point is searched by the selected pixel (19), thereby preventing measurement of the distance of a background with a weak pattern instead of the distance of an object with a strong pattern by mistake. A plurality of pixel select ranges are provided (13, 14), the ranges are searched for a plurality of corresponding points using the selected pixels (19, 20), and according to the degree of bias of a pattern of a reference image (23), the final distance may be selected from the plurality of corresponding point search results (21). According to the degree of difference in pixel value between the target pixel in the reference image and a corresponding candidate pixel in a compared image, a pair of cameras causing occlusion are detected, and the paired cameras may not be used in corresponding point search. Concerning each target pixel, when the coincidence of pattern matching is not good, it is judged that there is the possibility of wrong detection of an object outside the measurement range.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明が属する技術分野】本発明は、異なる位置に配置
された複数の撮像装置を用いて同一対象物を撮影して得
た複数の画像情報から、三角測量の原理を利用して対象
物体までの距離を計測するステレオ画像処理装置および
方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a plurality of image information obtained by photographing the same object using a plurality of image pickup devices arranged at different positions, to a target object using the principle of triangulation. The present invention relates to a stereo image processing device and method for measuring the distance of the image.

【0002】[0002]

【従来の技術】異なる位置に配置された2台以上のカメ
ラから三次元空間内の物体を撮影して得られた複数の画
像を用いてその物体までの距離を計測する方法として、
ステレオ画像処理の方法が知られている。このステレオ
画像処理は、パターンマッチングによる対応点探索を行
い物体までの距離を推定する方法である。以下に、この
対応点探索の処理について簡単に説明する。
2. Description of the Related Art As a method of measuring the distance to an object using a plurality of images obtained by photographing an object in a three-dimensional space from two or more cameras arranged at different positions,
A method of stereo image processing is known. This stereo image processing is a method of estimating a distance to an object by performing a corresponding point search by pattern matching. The process of searching for corresponding points will be briefly described below.

【0003】なお、本明細書では、複数のカメラの中の
特定の一台を「基準カメラ」といい、他の各カメラを
「比較カメラ」という。基準カメラと各比較カメラとの
ペアを「カメラペア」といい、比較カメラの台数と等し
い数のカメラペアが存在することになる。基準カメラの
画像を以下「基準画像」といい、各比較カメラの画像を
以下「比較画像」という。
In this specification, a specific one of the plurality of cameras is referred to as a "reference camera", and each of the other cameras is referred to as a "comparative camera". A pair of the standard camera and each comparative camera is called a "camera pair", and there are as many camera pairs as the number of comparative cameras. The image of the reference camera is hereinafter referred to as "reference image", and the image of each comparison camera is hereinafter referred to as "comparison image".

【0004】(1) 基準画像内から、距離計測のターゲ
ットとなる一つの画素を選ぶ。このターゲット画素に対
応する三次元空間内の物体までの距離として、或る距離
を仮定する。そして、その仮定された距離だけ離れた三
次元空間中の点に対応する各比較画像内の画素(以下
「対応候補画素」という)の位置を求める。
(1) From the reference image, one pixel as a target for distance measurement is selected. A certain distance is assumed as the distance to the object in the three-dimensional space corresponding to this target pixel. Then, the position of the pixel (hereinafter referred to as “corresponding candidate pixel”) in each comparison image corresponding to the point in the three-dimensional space separated by the assumed distance is obtained.

【0005】(2) 基準画像内に、ターゲット画素の位
置を中心とするマッチングウィンドウ(以下、「参照ウ
ィンドウ」という)を設定する。各比較画像内にも、対
応候補画素の位置を中心とするマッチングウインドウ
(以下「比較ウィンドウ」という)を設定する。
(2) A matching window centered on the position of the target pixel (hereinafter referred to as "reference window") is set in the reference image. A matching window centered on the position of the corresponding candidate pixel in each comparison image
(Hereinafter referred to as "comparison window") is set.

【0006】(3) カメラペア毎に、基準画像上の参照
ウインドウ内の各画素の画素値と、各比較画像上の比較
ウィンドウ内の対応する各画素の画素値とを比較し、画
素間の「相違度」を求める。なお、前記「相違度」として
は、画素値間の差の絶対値、あるいは、画素値間の差の
二乗などを用いる。
(3) For each camera pair, the pixel value of each pixel in the reference window on the standard image is compared with the pixel value of each corresponding pixel in the comparison window on each comparative image, and the pixel value between pixels is compared. "Difference" is calculated. As the “degree of difference”, the absolute value of the difference between pixel values, the square of the difference between pixel values, or the like is used.

【0007】(4) 参照ウインドウ内の全画素について
上記「相違度」を求め、それら「相違度」を参照ウイン
ドウ内の全画素について合計(以下、ウインドウ加算)
して、「ウインドウ加算した相違度」をカメラペア毎に求
める。次に、全カメラペアについて上記「ウインドウ加
算した相違度」を求め、それら「ウインドウ加算した相違
度」を全カメラペアについて合計(以下、カメラ加算)
して、「相違度の最終合計」を求める。
(4) The "difference" is calculated for all the pixels in the reference window, and the "difference" is summed for all the pixels in the reference window (hereinafter, window addition).
Then, the “window-added difference degree” is obtained for each camera pair. Next, the above "window added difference degree" is calculated for all camera pairs, and the "window added difference degree" is summed up for all camera pairs (hereinafter, camera addition).
Then, the “final sum of dissimilarity” is obtained.

【0008】(4-2) 上記(4)の処理に代えて、先に、参
照ウィンドウ内の各画素についての上記「相違度」をカ
メラ加算し、次に、その画素毎に「カメラ加算した相違
度」をウィンドウ加算して、「相違度の最終合計」を求め
てもよい。因みに、ハードウェア回路を用いて相違度の
加算処理を行う場合、この方法によればウィンドウ加算
回路の個数が1つで済むので、上記(4)の方法に比べて
回路構造がより簡単になる。
(4-2) Instead of the process of (4), the "difference" for each pixel in the reference window is added to the camera first, and then "the camera is added to each pixel". The "difference" may be added to the window to obtain the "final total difference". By the way, when the addition process of the dissimilarity is performed by using the hardware circuit, this method requires only one window addition circuit, so that the circuit structure becomes simpler than that of the above method (4). .

【0009】(5) ターゲット画素に対応する三次元空
間内の物体までの距離として、他に複数個の距離を更に
仮定し、それらの距離の各々についても、上述した処理
を行なって「相違度の最終合計」を求める。そして、「相
違度の最終合計」が最小となる一つの仮定距離を、ター
ゲット画素に対応する物体までの距離として推定する。
ここで、「相違度の最終合計」の最小となるということ
は、基準画像の参照ウインドウ内の画像パターンと、比
較画像の比較ウィンドウ内の画像パターンとが最も良く
類似するということを意味している。
(5) As the distance to the object in the three-dimensional space corresponding to the target pixel, a plurality of other distances are further assumed, and the above-mentioned processing is performed for each of these distances to obtain the difference degree. For the final sum of. Then, one assumed distance at which the “final sum of dissimilarity” is minimized is estimated as the distance to the object corresponding to the target pixel.
Here, the fact that the “final sum of dissimilarities” is the minimum means that the image pattern in the reference window of the standard image and the image pattern in the comparison window of the comparative image are most similar. There is.

【0010】以上が、従来のステレオ画像処理における
「対応点探索」の典型的方法である。基準画像内の全画
素について上記のような対応点探索を行うことにより、
基準画像に対応した距離画像が得られる。
The above is a typical method of "corresponding point search" in conventional stereo image processing. By performing the corresponding point search as described above for all the pixels in the reference image,
A range image corresponding to the reference image is obtained.

【0011】[0011]

【発明が解決しようとする課題】上述した従来技術に従
うステレオ画像処理方法には、以下の三つの問題点(1)
〜(3)がある。
The stereo image processing method according to the above-mentioned conventional technique has the following three problems (1).
There is ~ (3).

【0012】(1) 距離画像での物体輪郭の膨らみ 上述した対応点探索では参照ウインドウと比較ウィンド
ウとの間でパターンマッチングを行っている。しかし、
参照ウインドウ内に距離の異なる複数の物体が存在して
いる場合、或るいは、後述するオクル−ジョン(occlus
ion)(隠れ)が発生している場合、参照ウインドウ内
の画像パターンと比較ウィンドウ内の画像パターンとの
間の類似度が悪くなる。その結果、誤った距離が出力さ
れることがある。特に、例えば、遠い背景と近い物体と
が存在し、背景の画像の特徴が小さく(例えば、模様が
弱く)、物体の画像の特徴が大きい(例えば模様が強
い)ような場合、物体の周囲の背景の距離が、その物体
の強い模様の影響を受けて、その物体と同じ距離に誤っ
て推定されてしまうことがある。結果として、算出され
た距離画像において、近くの物体の輪郭が実物より膨ら
んでしまう。
(1) Swelling of object contour in range image In the above-mentioned corresponding point search, pattern matching is performed between the reference window and the comparison window. But,
If there are multiple objects with different distances in the reference window, or if there is an occlusion (occlus
Ion) (hidden) occurs, the degree of similarity between the image pattern in the reference window and the image pattern in the comparison window becomes poor. As a result, an incorrect distance may be output. In particular, for example, when there are a distant background and a near object, the background image has small characteristics (for example, the pattern is weak), and the object image has large characteristics (for example, the pattern is strong), The background distance may be erroneously estimated to be the same distance as the object due to the strong pattern of the object. As a result, in the calculated distance image, the contour of a nearby object swells more than the actual object.

【0013】これは、距離画像を用いて物体の領域を自
動的に切出すような応用においては重大な問題である。
This is a serious problem in an application in which a range of an object is automatically cut out using a range image.

【0014】ここで、上述した膨らみの主原因である模
様の強弱に関して捕捉説明をする。この明細書では、
「模様」を、画像のある領域内における画素値のばらつ
きによる画像の特徴と定義する。「模様の強さ」とは、
画像の特徴の大きさ、つまり画素値のばらつきの大きさ
である。よって、「模様が強い」とは画素値のばらつき
が大きいことを、「模様が弱い」とは画素値のばらつき
が小さいことを意味する。
The strength of the pattern, which is the main cause of the above-mentioned bulge, will be captured and explained. In this specification,
A “pattern” is defined as a feature of an image due to variations in pixel values within a certain area of the image. "Strength of pattern" means
It is the size of the feature of the image, that is, the size of the variation of the pixel value. Therefore, “strong pattern” means that the variation of pixel values is large, and “weak pattern” means that the variation of pixel values is small.

【0015】(2) 計測範囲外の物体の誤検知 対応点探索では、物体が存在すると思われる距離の範囲
内で、複数の距離を仮定する。処理時間の制限のため
に、仮定する距離の数にも制限がある。それら仮定距離
の最小値から最大値までの範囲を「計測範囲」という。
計測範囲外に存在する物体までの距離は計測不可能であ
る。しかしながら、上述した従来技術によれば、相違度
の最終合計が最小となる仮定距離がそのまま距離の計測
値として出力されるため、計測範囲外の物体については
誤った距離が計測されてしまう。特に、例えば、輻輳角
を持つカメラを用いて近くの物体の距離計測を精度高く
行う場合、計測範囲が格別に狭く設定されるため、計測
範囲外の物体の誤検知を防止することは重要な課題であ
る。
(2) False detection of an object outside the measurement range Corresponding point search assumes a plurality of distances within the range of the distance in which the object is likely to exist. Due to processing time limitations, there is also a limitation on the number of assumed distances. The range from the minimum value to the maximum value of these assumed distances is called "measurement range".
The distance to an object existing outside the measurement range cannot be measured. However, according to the above-described conventional technique, the assumed distance that minimizes the final sum of the dissimilarities is output as it is as the measured value of the distance, so that an incorrect distance is measured for an object outside the measurement range. In particular, for example, when measuring the distance of a nearby object with high accuracy using a camera having a convergence angle, the measurement range is set to be extremely narrow, so it is important to prevent erroneous detection of an object outside the measurement range. It is an issue.

【0016】 (3) オクルージョン(occlusion)(隠れ) 「オクル−ジョン」とは、或る物体が基準カメラには見
えるが一部の比較カメラには見ない(例えば、その物体
が別の物体の背後に隠れている)という状況をいう。オ
クル−ジョンが発生している場合、参照ウインドウと比
較ウィンドウとの間の画像パターンの類似度が悪くなる
ので、誤った距離が出力されることがある。このオクル
−ジョンの問題の改善策として、オクル−ジョンの発生
したカメラを検出し、対応点探索を行うときにそのカメ
ラの画像を除外するという方法が提案されている(筑波
大学の松浦、佐藤、中村及び大田氏の論文『隠れ検出の
可能な多眼ステレオ法』電子情報通信学会論文誌 D-II
Vol.J80-D-II NO.6 pp.1432-1440 1997年6月を参
照)。この方法においては、カメラペア毎にウインドウ
加算した相違度を求め、或るカメラペアのウインドウ加
算した相違度の値が所定値より大きいならば、オクル−
ジョンが発生しているとみなし、そのカメラペアの「ウ
インドウ加算した相違度」を、カメラ加算の処理から除
外する。
(3) Occlusion (Hidden) “Occlusion” means that an object is visible to a reference camera but not to some comparison cameras (for example, that object is different from another object). Hiding behind). When occlusion occurs, an incorrect distance may be output because the similarity of the image pattern between the reference window and the comparison window becomes poor. As a remedy for this problem of occlusion, a method of detecting a camera in which an occlusion has occurred and excluding the image of that camera when performing corresponding point search has been proposed (Matsuura and Sato of the University of Tsukuba). , Nakamura and Ota's paper "Multi-view stereo method with hidden detection" IEICE Transaction D-II
Vol.J80-D-II NO.6 pp.1432-1440 June 1997). In this method, the window-added dissimilarity is obtained for each camera pair, and if the window-added dissimilarity of a camera pair is larger than a predetermined value, the occlu-
John is considered to have occurred, and the “window-added difference degree” of the camera pair is excluded from the camera addition processing.

【0017】しかし、この方法を行うためには、全カメ
ラペアの各々毎に「ウインドウ加算した相違度」を計算
する必要がある。つまり、上述した対応点探索の手順に
おいて、(4-2)の加算方法は採用できず、(4)の方法を採
用せざるを得ない。その結果、加算処理を行なうための
ハードウェア回路は、カメラペアと同じ数のウィンドウ
加算回路を必要とし、その構造が複雑になる。
However, in order to carry out this method, it is necessary to calculate the "window added difference degree" for each of all camera pairs. That is, in the procedure of searching the corresponding points described above, the addition method of (4-2) cannot be adopted and the method of (4) must be adopted. As a result, the hardware circuit for performing the addition process requires the same number of window addition circuits as the camera pairs, which complicates the structure.

【0018】以上の問題に鑑み、本発明の目的は、ステ
レオ画像処理により、距離の異なる複数の物体の距離を
精度良く計測できるようにすることにある。
In view of the above problems, an object of the present invention is to enable the distance between a plurality of objects having different distances to be accurately measured by stereo image processing.

【0019】本発明の別の目的は、距離画像における物
体輪郭の膨らみの問題を解消することにある。
Another object of the present invention is to eliminate the problem of bulging of the object contour in the range image.

【0020】本発明のまた別の目的は、計測距離外にあ
る物体の誤検知を防止することにある。
Another object of the present invention is to prevent erroneous detection of an object located outside the measurement distance.

【0021】本発明のさらに別の目的は、簡単な構造の
回路でもってオクル−ジョンの問題を解消することにあ
る。
Still another object of the present invention is to solve the problem of occlusion with a circuit having a simple structure.

【0022】[0022]

【課題を解決するための手段】この欄の記述において、
カッコ内の数字は、添付の図面に記載の要素との対応関
係を例示するものであるが、これは、単なる説明のため
の例示にすぎず、本発明の技術的範囲を限定する趣旨で
はない。
[Means for Solving the Problems] In the description in this column,
The numbers in parentheses exemplify the correspondence with the elements described in the accompanying drawings, but this is merely an example for explanation and is not intended to limit the technical scope of the present invention. .

【0023】本発明の一つの態様に従う、1つの基準カ
メラからの基準画像(1)と少なくとも1つの比較カメ
ラからの比較画像(2)とを使用して対応点探索を行う
ステレオ画像処理装置は、基準画像及び比較画像の少な
くとも一方から、所定の画素値範囲外にある画素値を実
質的に持つ画素を除外し、残りの画素を選択する画素選
択部(3)と、前記基準画像内の各ターゲット画素毎
に、様々な仮定距離の各々について、前記基準画像と前
記比較画像との間のパターンマッチングを、前記画素選
択部により選択された画素を使用して行ない、それによ
り、各ターゲット画素の距離を計測する対応点探索部
(6)とを備える。
According to one aspect of the present invention, there is provided a stereo image processing apparatus for performing corresponding point search using a reference image (1) from one reference camera and a comparison image (2) from at least one comparison camera. A pixel selection unit (3) for excluding, from at least one of the reference image and the comparison image, pixels having pixel values substantially outside a predetermined pixel value range and selecting the remaining pixels; For each target pixel, for each of the various assumed distances, pattern matching between the reference image and the comparison image is performed using the pixels selected by the pixel selection unit, whereby each target pixel And a corresponding point search unit (6) for measuring the distance.

【0024】前記対応点探索部(6)は、各ターゲット
画素毎に、様々な仮定距離における前記パターンマッチ
ングの結果に基づいて、計測された距離の信頼度を算出
する手段を有することができる。
The corresponding point searching unit (6) can have means for calculating the reliability of the measured distance for each target pixel based on the result of the pattern matching at various assumed distances.

【0025】また、本発明の別の態様によれば、ステレ
オ画像処理装置は、異なる画素値範囲をもつ複数の画素
選択部(13,14)と、前記複数の画素選択部により
選択された画素をそれぞれ使用して、各ターゲット画素
の距離をそれぞれ計測する複数の対応点探索部(19、
20)と、各ターゲット画素毎に、前記複数の対応点探
索部により計測された複数の距離と、前記複数の距離に
ついて算出された信頼度とに基づいて、最終的な距離を
決定して出力する計測距離決定部(21)とを備える。
According to another aspect of the present invention, the stereo image processing apparatus has a plurality of pixel selection units (13, 14) having different pixel value ranges, and the pixels selected by the plurality of pixel selection units. Using a plurality of corresponding point search units (19,
20), and for each target pixel, the final distance is determined and output based on the plurality of distances measured by the plurality of corresponding point search units and the reliability calculated for the plurality of distances. And a measurement distance determining unit (21) for performing the measurement.

【0026】本発明のまた別の態様によれば、ステレオ
画像処理装置は、前記基準画像に含まれる画素値の範囲
を判定する画素値判定部(23)を更に備え、前記計測
距離決定部(21)は、前記複数の距離と、前記複数の
距離について算出された信頼度と、前記画素値判定部
(23)からの画素値範囲とから、前記最終的な距離を
決定する。
According to still another aspect of the present invention, the stereo image processing apparatus further includes a pixel value determination unit (23) for determining a range of pixel values included in the reference image, and the measured distance determination unit ( 21) determines the final distance from the plurality of distances, the reliability calculated for the plurality of distances, and the pixel value range from the pixel value determination unit (23).

【0027】本発明のまた別の態様に従う、1つの基準
カメラからの基準画像(31)と少なくとも1つの比較
カメラからの比較画像(32)とを使用して対応点探索
を行うステレオ画像処理装置は、基準画像内の各ターゲ
ット画素毎に、様々な仮定距離における前記基準画像と
前記比較画像との間のパターンマッチングを行なうこと
で、各ターゲット画素の距離を計測する第1の対応点探
索部(35)と、前記基準画像の模様強度を出力する模
様強度算出部(36)と、前記模様強度算出部(36)
から出力される模様強度に基づいて、前記第1の対応点
探索部(35)により計測された各ターゲット画素の距
離について、それを確定させるか否かを判断する距離確
定判断部(37)と、前記基準画像から、前記距離確定
判断部(37)によって距離が確定された画素を除外
し、前記比較画像から、前記基準画像から除外された画
素に前記確定された距離で対応する画素を除外し、前記
基準画像及び前記比較画像から残りの画素を選択する画
素選択部(38)と、前記基準画像内の少なくとも距離
が未確定の各ターゲット画素毎に、様々な仮定距離の各
々ついて、前記基準画像と前記比較画像との間のパター
ンマッチングを、前記画素選択部により選択された画素
を使用して行ない、それにより、前記距離が未確定の各
ターゲット画素の距離を計測する第2の対応点探索部
(41)とを備える。
According to yet another aspect of the invention, a stereo image processing device for performing corresponding point search using a reference image (31) from one reference camera and a comparison image (32) from at least one comparison camera. Is a first corresponding point search unit for measuring the distance of each target pixel by performing pattern matching between the reference image and the comparison image at various assumed distances for each target pixel in the reference image. (35), a pattern strength calculation unit (36) that outputs the pattern strength of the reference image, and the pattern strength calculation unit (36)
A distance determination determination unit (37) that determines whether or not to determine the distance of each target pixel measured by the first corresponding point search unit (35) based on the pattern intensity output from Pixels of which the distance is determined by the distance determination determining unit (37) are excluded from the reference image, and pixels of the comparison image corresponding to the pixels excluded from the reference image are excluded from the reference image. And a pixel selection unit (38) for selecting the remaining pixels from the reference image and the comparison image, and various assumed distances for each target pixel in the reference image for which at least the distance is undetermined. Pattern matching between a reference image and the comparison image is performed using the pixels selected by the pixel selection unit, whereby the distance of each target pixel whose distance has not been determined yet. And a second corresponding point searching unit (41) for measuring

【0028】本発明の更にまた別の態様に従う、1つの
基準カメラからの基準画像(51)と少なくとも1つの
比較カメラからの比較画像(52)とを使用して対応点
探索を行うステレオ画像処理装置は、基準画像内に各タ
ーゲット画素について参照ウィンドウを設定し、比較画
像内に様々な仮定距離の各々にて前記参照ウィンドウに
対応する比較ウィンドウを設定し、前記参照ウィンドウ
内の画素の画素値に基づいて画素値範囲を設定し、前記
比較ウィンドウから、前記設定された画素値範囲外の画
素値を実質的に持つ画素を除外し、残りの画素を選択す
る画素選択部(55)と、前記基準画像内の各ターゲッ
ト画素毎に、前記様々な仮定距離の各々について、前記
参照ウィンドウと前記比較ウィンドウとの間のパターン
マッチングを、前記比較ウィンドウ内の選択された画素
と、前記選択された画素に対応する前記参照ウィンドウ
内の画素とを使用して行ない、それにより、各ターゲッ
ト画素の距離を計測する対応点探索部(56)とを備え
る。
In accordance with yet another aspect of the present invention, stereo image processing for performing corresponding point search using a reference image (51) from one reference camera and a comparison image (52) from at least one comparison camera. The apparatus sets a reference window for each target pixel in the base image, sets a comparison window in the comparison image corresponding to the reference window at each of various assumed distances, and sets the pixel value of the pixel in the reference window. A pixel selection unit (55) for setting a pixel value range based on the above, excluding pixels having pixel values substantially outside the set pixel value range from the comparison window, and selecting the remaining pixels. Pattern matching between the reference window and the comparison window for each of the various assumed distances for each target pixel in the reference image, A corresponding point searching unit (56) for measuring the distance of each target pixel by using the selected pixel in the comparison window and the pixel in the reference window corresponding to the selected pixel. Equipped with.

【0029】本発明のまた別の態様に従う、1つの基準
カメラからの基準画像(71)と少なくとも1つの比較
カメラからの比較画像(72)とを使用して対応点探索
を行うステレオ画像処理装置は、基準画像及び比較画像
の少なくとも一方から、第1の画素値範囲外にある画素
値を実質的に持つ画素を除外し、残りの画素を選択する
第1の画素選択部(73)と、前記基準画像内の各ター
ゲット画素毎に、様々な仮定距離の各々について、前記
基準画像と前記比較画像との間のパターンマッチング
を、前記第1の画素選択部により選択された画素を使用
して行ない、それにより、各ターゲット画素の距離を計
測する第1の対応点探索部(79)と、前記基準画像及
び前記比較画像の少なくとも一方から、前記第1の画素
値範囲よりも狭い第2の画素値範囲外にある画素値を実
質的に持つ画素を除外し、残りの画素を選択する第2の
画素選択部(74)と、前記基準画像内の各ターゲット
画素毎に、様々な仮定距離の各々について、前記基準画
像と前記比較画像との間のパターンマッチングを、前記
第2の画素選択部により選択された画素を使用して行な
い、それにより、各ターゲット画素の距離を計測する第
2の対応点探索部(80)と、前記基準画像の模様の偏
り度合を出力する模様偏り算出部(83)と、模様偏り
算出部(83)からの出力と、前記第1の対応点探索部
(79)で計測された距離と、前記第2の対応点探索部
(80)で計測された距離とに基づいて、最終的な距離
を決める計測距離決定部(81)とを備える。
A stereo image processing apparatus for performing corresponding point search using a reference image (71) from one reference camera and a comparison image (72) from at least one comparison camera according to another aspect of the present invention. A first pixel selection unit (73) that excludes, from at least one of the reference image and the comparison image, pixels that substantially have a pixel value outside the first pixel value range, and selects the remaining pixels; For each target pixel in the reference image, for each of various assumed distances, pattern matching between the reference image and the comparison image, using the pixels selected by the first pixel selection unit. The first corresponding point searching unit (79) for measuring the distance of each target pixel, and the second narrower than the first pixel value range from at least one of the reference image and the comparison image. Pixel value A second pixel selection unit (74) that excludes pixels that substantially have pixel values outside the range and selects the remaining pixels, and various assumed distances for each target pixel in the reference image. The pattern matching between the reference image and the comparison image is performed using the pixels selected by the second pixel selection unit, thereby measuring the distance of each target pixel. A point search unit (80), a pattern bias calculation unit (83) that outputs the pattern bias degree of the reference image, an output from the pattern bias calculation unit (83), and the first corresponding point search unit (79). ) And a measured distance determination unit (81) that determines a final distance based on the distance measured by the second corresponding point search unit (80).

【0030】本発明の更に別の態様に従う、1つの基準
カメラからの基準画像(91)と少なくとも1つの比較
カメラからの比較画像(92)とを使用して対応点探索
を行うステレオ画像処理装置は、前記基準画像内の各タ
ーゲット画素毎に、様々な仮定距離の各々について、前
記基準画像と前記比較画像との間のパターンマッチング
を行ない、それにより、各ターゲット画素の距離を計測
する対応点探索部(96)と、前記計測された距離につ
いて信頼度を出力する信頼度出力部(98)とを備え
る。そして、前記計測された距離についてのパターンマ
ッチングの結果値に応じて(S2)、又は、前記計測され
た距離についてのパターンマッチングの結果値と他の仮
定距離についての前記パターンマッチングの結果値中の
最も劣る値との間の差に応じて(S3)、前記計測された
距離についての信頼度が値を変わる(S5,S4)ようにな
っている。
In accordance with yet another aspect of the present invention, a stereo image processing apparatus for performing corresponding point search using a reference image (91) from one reference camera and a comparison image (92) from at least one comparison camera. For each target pixel in the reference image, for each of the various assumed distances, performs pattern matching between the reference image and the comparison image, thereby corresponding points for measuring the distance of each target pixel. A search unit (96) and a reliability output unit (98) that outputs a reliability for the measured distance are provided. Then, according to the result value of the pattern matching for the measured distance (S2), or, in the result value of the pattern matching for the result value of the pattern matching for the measured distance and other assumed distances. The reliability of the measured distance changes according to the difference between the worst value (S3) and the value (S5, S4).

【0031】本発明のまた別の態様に従う、1つの基準
カメラからの基準画像と複数の比較カメラからの複数の
比較画像とを使用して対応点探索を行うステレオ画像処
理装置は、様々な仮定距離の各々について、前記基準画
像中のターゲット画素と各比較画像中の対応候補画素と
の間の相違度に基づいて、前記複数の比較カメラの中か
ら、オクル−ジョンが生じている可能性のある一部の比
較カメラを選び無視する手段(S11〜S14)と、様々な仮
定距離の各々について、前記基準画像に設定された参照
ウィンドウ内の各画素毎に、無視された比較カメラを除
く残りの比較カメラからの比較画像の各々に設定された
比較ウィンドウ内の対応する画素との間の相違度を求
め、各画素毎に求めた前記相違度を、前記残りの比較カ
メラの全部についてカメラ加算する手段(S15)と、カ
メラ加算された相違度を、前記参照ウィンドウ内の全画
素についてウィンドウ加算して、相違度の最終合計を求
める手段(S16,S17)と、様々な仮定距離の各々につい
て求めた前記相違度の最終合計に基づいて、前記ターゲ
ット画素の距離を計測する手段とを備える。
According to still another aspect of the present invention, a stereo image processing apparatus that performs a corresponding point search using a reference image from one reference camera and a plurality of comparison images from a plurality of comparison cameras has various assumptions. For each of the distances, occlusion may occur among the plurality of comparison cameras based on the degree of difference between the target pixel in the reference image and the corresponding candidate pixel in each comparison image. Means for selecting and ignoring some of the comparison cameras (S11-S14), and for each of the various hypothetical distances, for each pixel in the reference window set in the reference image, the remainder excluding the ignored comparison cameras. Of each of the comparison images from the comparison cameras of the respective comparison cameras, the degree of difference with the corresponding pixel in the comparison window set for each of the comparison images is obtained, and the difference obtained for each pixel is calculated for all the remaining comparison cameras. La addition means (S15), means for adding the camera-added dissimilarity to all pixels in the reference window by window addition, and means (S16, S17) for obtaining the final dissimilarity, and various assumed distances. Means for measuring the distance of the target pixel based on the final sum of the dissimilarity degrees obtained for each.

【0032】[0032]

【発明の実施の形態】以下、本発明の様々な実施形態を
説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Various embodiments of the present invention will be described below.

【0033】1. 物体輪郭の膨らみの問題に対処した
実施形態 まず、距離画像にて物体輪郭が膨らむという問題に対処
した幾つかの実施形態を説明する。これらの実施形態で
は、次の2つの原理が応用されている。
1. Embodiments Addressing the Problem of Swelling of the Object Contour First, some embodiments will be described that address the problem of the object contour swelling in the range image. In these embodiments, the following two principles are applied.

【0034】(1) 第1の原理 物体輪郭が膨らむという問題は、次の条件a)〜d)下で生
じ易い。
(1) First Principle The problem that the contour of the object swells easily occurs under the following conditions a) to d).

【0035】a) 距離の異なる2つ以上の物体、例えば
近い物体と遠い背景、が三次元空間中に存在し; b) 基準画像中の参照ウインドウには背景が映ってい
て、その背景が距離計測のターゲットであり; c) 1以上の比較カメラの比較画像内の比較ウィンドウ
には、近くの物体は映っているが、その物体によるオク
ル−ジョンのために、ターゲットの背景は映っておら
ず;且つ d) ターゲットの背景とそれとは異なる場所の背景との
間の相違度の値に比べ、ターゲットの背景と上記物体と
の間の相違度の値の方が非常に大きい。
A) two or more objects having different distances, for example, a near object and a distant background exist in a three-dimensional space; b) the reference window in the standard image shows the background, and the background is the distance. It is the target of the measurement; c) The comparison window in the comparison image of one or more comparison cameras shows a nearby object, but due to the occlusion of that object, the background of the target is not. And d) the dissimilarity value between the target background and the object is much greater than the dissimilarity value between the target background and the background at a different location.

【0036】上記条件a)〜d)下の対応点探索において
は、相違度の最終合計の極小ピークが現れるのは、仮定
距離がターゲットの背景の実際の距離(正解)に等しい
ときと、仮定距離が近くの物体の実際の距離に等しいと
きである。しかし、前者の極小ピーク値よりも、後者の
極小ピーク値の方が小さくなる(つまり、後者の方が正
解に見える)場合がある。この場合、ターゲットの背景
の計測距離として、近くの物体の距離に等しい誤った値
が出力されることになる。
In the corresponding point search under the above conditions a) to d), the minimum peak of the final sum of the dissimilarities appears when the assumed distance is equal to the actual distance (correct answer) of the target background. When the distance is equal to the actual distance of a nearby object. However, the latter minimum peak value may be smaller than the former minimum peak value (that is, the latter seems to be the correct answer). In this case, an erroneous value equal to the distance of a nearby object is output as the measured distance of the background of the target.

【0037】上記の問題は次の方法A)〜B)で軽減するこ
とができる。
The above problems can be reduced by the following methods A) to B).

【0038】A) 各カメラの画像中から、所定の画素値
範囲に含まれる画素値をもつ画素のみを選択する。或い
は、各カメラの画像中から、その画素の近傍領域の画素
値が所定の画素値範囲に含まれるような画素のみを選択
する。
A) From the images of each camera, only the pixels having the pixel values included in the predetermined pixel value range are selected. Alternatively, from the image of each camera, only the pixel whose pixel value in the neighborhood area of the pixel is included in the predetermined pixel value range is selected.

【0039】B) そして、選択された画素のみを使用し
て対応点探索を行う。
B) Then, the corresponding points are searched using only the selected pixels.

【0040】(2) 第2の原理 物体輪郭が膨らむという問題は、また、次の条件e)〜h)
下でも生じ易い。
(2) Second Principle The problem that the contour of the object swells is also caused by the following conditions e) to h).
It easily occurs even under.

【0041】e) 距離の異なる2つ以上の物体、例えば
近い物体と遠い背景、が三次元空間中に存在し; f) 基準画像中の参照ウインドウに背景と物体の双方が
映っていて、その背景が距離計測のターゲットであり; g) ターゲットの背景の画素値のばらつきが小さく;且
つ h) ターゲットの背景と近くの物体との間の画素値の差
が大きい。
E) two or more objects with different distances, eg near object and distant background, exist in three-dimensional space; f) both the background and the object are reflected in the reference window in the standard image, and The background is the target for distance measurement; g) the variation in the pixel value of the target background is small; and h) the difference in pixel value between the target background and nearby objects is large.

【0042】上記の条件e)〜h)下での対応点探索におい
ても、相違度の最終合計の極小ピークが、既に説明した
条件a)〜d)下のときに類似した形で現れる場合がある。
その場合にも、ターゲットの背景の計測距離として、近
くの物体の距離に等しい誤った値が出力されることにな
る。
Also in the corresponding point search under the above conditions e) to h), the minimum peak of the final sum of the dissimilarities may appear in a similar form under the conditions a) to d) already explained. is there.
Even in that case, an erroneous value equal to the distance of the nearby object is output as the measured distance of the target background.

【0043】上記の問題は次の方法C)〜G)で軽減する
ことができる。
The above problems can be reduced by the following methods C) to G).

【0044】C) 複数の画素値範囲を設定する。C) Set a plurality of pixel value ranges.

【0045】D) 各カメラの画像から、上記複数の画素
値範囲をそれぞれ用いて、上記A)に述べたやり方で画素
を選択する。それにより、各カメラ毎に、上記複数の画
素値範囲に対応した選択画素からそれぞれ構成される複
数の画像が得られる。
D) A pixel is selected from the image of each camera in the manner described in A) above, using each of the plurality of pixel value ranges. Thereby, for each camera, a plurality of images respectively composed of the selected pixels corresponding to the plurality of pixel value ranges are obtained.

【0046】E) 同じ画素値範囲に対応した複数カメラ
の画像を用いて対応点探索を行う。複数回の対応点探索
が、それぞれ複数の画素値範囲に対応して行なわれる。
E) Corresponding point search is performed using images from a plurality of cameras corresponding to the same pixel value range. Corresponding point searches are performed a plurality of times for a plurality of pixel value ranges.

【0047】F) 基準画像の参照ウインドウ内の模様
(画素値のばらつき)の偏り度合を検出する。
F) The degree of deviation of the pattern (pixel value variation) in the reference window of the standard image is detected.

【0048】G) 検出された模様偏り度合に基づき、上
記の複数回の対応点探索の結果から、最終的に出力すべ
き距離を決定する。
G) Based on the detected degree of pattern deviation, the distance to be finally output is determined from the results of the above-described corresponding point search.

【0049】〔1〕 第1の実施形態 図1に、この実施形態の構成を示す。この実施形態は、
上述した原理(1)を応用して、物体輪郭の膨らみという
問題を改善するものである。
[1] First Embodiment FIG. 1 shows the configuration of this embodiment. This embodiment is
By applying the above-mentioned principle (1), the problem of bulging of the contour of an object is improved.

【0050】物体輪郭が膨らむという問題は、典型的に
は、背景の模様が弱く(画素値のばらつきが小さく)、
物体の模様が強い(画素値のばらつきが大きい)場合に
発生し得る。或いは、背景および物体の模様が共に弱く
ても、お互いの画素値に大きな差がある場合にも、この
問題は発生し得る。
The problem that the object contour is bulging is typically caused by a weak background pattern (small variation in pixel values).
This may occur when the pattern of the object is strong (the variation in pixel values is large). Alternatively, even if the background and the pattern of the object are both weak, this problem may occur when there is a large difference in the pixel values of each other.

【0051】図1に、この実施形態の要部の構成を示
す。
FIG. 1 shows the configuration of the main part of this embodiment.

【0052】図1には示してないが、従来と同様、1つ
の基準カメラと1又はそれ以上の比較カメラが、ステレ
オ画像処理の原理に従って異なる位置に配置されて、そ
れぞれの位置から同じ三次元空間を撮影する。比較カメ
ラの数は1つでもよいが、計測精度を高めるためには、
複数ある方が望ましい。例えば、3×3平面マトリック
ス状に9つのカメラが配置されていて、中心位置のカメ
ラが基準カメラであり、その周囲の8つのカメラが比較
カメラであり、基準カメラの正面に広がる三次元空間を
それら9つのカメラが撮影する。本実施形態では、複数
の比較カメラがあるものとする。このようなカメラ配置
は、後述する他の実施形態でも共通に採用される。
Although not shown in FIG. 1, as in the conventional case, one reference camera and one or more comparison cameras are arranged at different positions according to the principle of stereo image processing, and the same three-dimensional image is obtained from each position. Take a picture of the space. The number of comparison cameras may be one, but in order to improve the measurement accuracy,
It is desirable to have more than one. For example, nine cameras are arranged in a 3 × 3 plane matrix, the central camera is the reference camera, and the eight cameras around it are comparison cameras. These nine cameras shoot. In this embodiment, it is assumed that there are a plurality of comparison cameras. Such a camera arrangement is commonly adopted in other embodiments described later.

【0053】図1に示すように、基準画像入力部1は、
基準カメラから基準画像を入力して、その基準画像を画
素選択部3へ出力する。比較画像入力部2は、複数の比
較カメラからそれぞれの比較画像を入力して、それらの
比較画像を画素選択部3へ出力する。
As shown in FIG. 1, the reference image input unit 1 is
A reference image is input from the reference camera and the reference image is output to the pixel selection unit 3. The comparison image input unit 2 inputs each comparison image from a plurality of comparison cameras and outputs the comparison images to the pixel selection unit 3.

【0054】画素選択部3は、予め設定された1又はそ
れ以上の画素値範囲を記憶している。この画素値範囲の
設定は、ユーザの任意により変更することが可能であ
る。画素選択部3は、入力された画像に対して、記憶さ
れた画素値範囲を用いて、画素選択処理を行なう。画素
選択処理では、その画像内の画素のうち、適用される画
素値範囲外の画素値をもつ画素のみに対して、マスク情
報が付加され(つまり、除外され)、その画素値範囲内
の画素値をもつ画素には、マスク情報は付加されない
(つまり、選択される)。
The pixel selection section 3 stores one or more preset pixel value ranges. The setting of the pixel value range can be changed by the user. The pixel selection unit 3 performs pixel selection processing on the input image using the stored pixel value range. In the pixel selection process, the mask information is added (that is, excluded) only to the pixels having the pixel value outside the applicable pixel value range among the pixels in the image, and the pixels within the pixel value range are included. Mask information is not added (that is, selected) to pixels having a value.

【0055】上記の画素選択処理は、基準画像及び複数
の比較画像の全部に行うようにすることもできるし、基
準画像のみに行うようにすることもできるし、或るい
は、比較画像のみに行なうようにすることもできる。全
部の画像に対して、同じ画素値範囲を適用することもで
きるし、或るいは、画像毎の特性のばらつき等を考慮し
て、画像毎に適用される画素値範囲を違えるようにする
こともできる。
The above-mentioned pixel selection processing can be performed on all of the reference image and the plurality of comparison images, can be performed only on the reference image, or can be performed only on the comparison image. You can also do it. The same pixel value range can be applied to all images, or the pixel value range applied to each image can be changed in consideration of variations in characteristics between images. You can also

【0056】1つの画像に適用する画素値範囲は1つの
連続した範囲であってもよいし、2以上のサブ範囲に分
かれていてもよい。例えば、その画像の画素値が輝度で
ある場合、適度な1つの連続した輝度範囲を用いて画素
選択処理を行なうことにより、輝度が小さすぎる又は大
きすぎる領域を除外し、適度な輝度をもつ領域のみを選
択することができる。また、例えば、その画像の画素値
が輝度の空間的変化率(模様の強さ)を表す輝度微分値
である場合、プラス側とマイナス側にそれぞれ設定され
た2つの適度な輝度微分値のサブ範囲(模様の強さが適
度な領域を意味する)を用いて画素選択処理を行うこと
により、輝度微分値の絶対値が小さすぎる又は大きすぎ
る(模様が弱すぎる又は強すぎる領域)を除外し、模様
の強さが適度な領域のみを選択することができる。
The pixel value range applied to one image may be one continuous range or may be divided into two or more sub-ranges. For example, when the pixel value of the image is luminance, a pixel selection process is performed by using one appropriate continuous luminance range to exclude an area having too small or too large luminance and an area having appropriate luminance. You can only choose. Further, for example, when the pixel value of the image is a brightness differential value that represents the spatial change rate of brightness (pattern intensity), two appropriate brightness differential value sub-values set on the plus side and the minus side, respectively. By performing pixel selection processing using a range (meaning an area where the pattern strength is appropriate), the absolute value of the brightness differential value is too small or too large (area where the pattern is too weak or too strong) is excluded. , It is possible to select only the region where the pattern strength is appropriate.

【0057】画素を選択するか否かの判断は、その画素
自体の画素値に基づいて行うだけでなく、その画素を含
むその画素近傍の領域の画像値に基づいて行うようにし
てもよい。例えば、その画素を中心とした適当なサイズ
のウインドウを設定し、そのウインドウ内の全ての画素
値の加算値、或いは、そのウィンドウ内の画素値の平均
値が、設定された画素値範囲外であれば、その画素を除
外することができる。或いは、そのウインドウ内の全画
素値が設定された画素値範囲内にある場合には、そのウ
ィンドウの中心の画素を選択するが、そうでない場合に
は、その中心の画素を除外するようにしてもよい。何れ
の選択方法を用いるにせよ、設定された画素値範囲によ
って除外される(マスク情報が付される)ことになる画素
を、この明細書では、「設定された画素値範囲外の画素
値を実質的に持つ画素」と呼ぶ。
The decision as to whether or not to select a pixel may be made not only based on the pixel value of the pixel itself, but also based on the image value of the area near the pixel including the pixel. For example, if you set a window of an appropriate size centered on that pixel, and the sum of all pixel values in that window, or the average value of the pixel values in that window is outside the set pixel value range. If so, that pixel can be excluded. Alternatively, if all the pixel values in the window are within the set pixel value range, the pixel at the center of the window is selected, but if not, the pixel at the center is excluded. Good. Regardless of which selection method is used, in this specification, a pixel that is to be excluded (mask information is attached) by the set pixel value range is referred to as “a pixel value outside the set pixel value range. It is referred to as a “pixel that substantially has”.

【0058】画像選択部3から出力された基準画像は基
準画像記憶部4に記憶される。画像選択部3から出力さ
れた比較画像は比較画像記憶部5に記憶される。対応点
探索部6が、基準画像記憶部4内の基準画像と比較画像
記憶部5内の比較画像とを読み込み、下記のようにして
対応点探索を行う。
The reference image output from the image selection unit 3 is stored in the reference image storage unit 4. The comparison image output from the image selection unit 3 is stored in the comparison image storage unit 5. The corresponding point search unit 6 reads the reference image in the reference image storage unit 4 and the comparison image in the comparison image storage unit 5, and performs the corresponding point search as follows.

【0059】対応点探索では、基準画像中から一つのタ
ーゲット画素を選び、そのターゲット画素を中心として
参照ウインドウを設定する。次に、ターゲット画素に対
応する物体までの距離を仮定する。続いて、各比較画像
中で、その仮定した距離に対応する3次元空間中の点に
対応する対応候補画素を求め、その対応候補画素を中心
とする比較ウィンドウを設定する。次に、参照ウィンド
ウ内のマスク情報の付加されていない(つまり、選択さ
れた)画素と、それに位置的に対応する各比較ウィンド
ウ内のマスク情報の付加されていない(つまり、選択さ
れた)画素との間の相違度を求める。相違度としては、
例えば、対応する画素間の画素値の差の絶対値を使用す
ることができる。次に、それらの相違度のウィンドウ加
算とカメラ加算(どちらを先に行ってもよい)(カメラ
ペアが一つの場合には、カメラ加算は不要である)を行
って、相違度の最終合計を求める。
In the corresponding point search, one target pixel is selected from the standard image, and the reference window is set with the target pixel as the center. Next, assume the distance to the object corresponding to the target pixel. Then, in each comparison image, a corresponding candidate pixel corresponding to a point in the three-dimensional space corresponding to the assumed distance is obtained, and a comparison window centered on the corresponding candidate pixel is set. Next, the pixels without mask information (that is, selected) in the reference window and the pixels without mask information (that is, selected) in each comparison window that positionally corresponds to the pixel Find the difference between The difference is
For example, the absolute value of the difference in pixel value between corresponding pixels can be used. Next, perform window addition of these dissimilarities and camera addition (whichever may be done first) (camera addition is not necessary when there is one camera pair) to obtain the final sum of dissimilarities. Ask.

【0060】このように、基準画像についても比較画像
についても、所定の画素値範囲によって選択された画素
のみを用いて、相違度が計算される。よって、基準画像
の画素と、これに対応する各比較画像中の画素の少なく
と一方が選択されていない場合には、そのペアの画素間
の相違度は計算されない。しかし、この方法に代えて、
次の方法を採用しても良い。すなわち、基準画像中の画
素は選択されているが、それに対応する比較画像中の画
素は選択されていない場合、その比較画像中の画素の画
素値を、画素選択で用いた画素値範囲の中間値に置き換
える。例えば、その画素値範囲が0〜100であり、そ
の比較画像中の画素の画素値が150である場合には、
その画素値を50に置き換える。その後に、そのペアの
画素間の相違度を計算し、これも相違度の最終合計に算
入する。
In this way, the degree of difference is calculated for both the reference image and the comparison image using only the pixels selected by the predetermined pixel value range. Therefore, when the pixel of the reference image and at least one of the corresponding pixels in each comparison image are not selected, the degree of difference between the pixels of the pair is not calculated. But instead of this method,
The following method may be adopted. That is, when the pixel in the reference image is selected but the corresponding pixel in the comparison image is not selected, the pixel value of the pixel in the comparison image is set to the middle of the pixel value range used in the pixel selection. Replace with the value. For example, when the pixel value range is 0 to 100 and the pixel value of the pixel in the comparison image is 150,
Replace the pixel value with 50. After that, the dissimilarity between the pixels of the pair is calculated and also included in the final dissimilarity sum.

【0061】対応点探索部6は、計測範囲内で仮定距離
を様々に変えて、各仮定距離について、上記の処理を行
なって、最終的な相違度を求める。そして、対応点探索
部6は、最終的な相違度が最小となる仮定距離を選び、
それを、そのターゲット画素についての計測距離とし
て、距離画像出力部7に出力する。
The corresponding point searching unit 6 variously changes the assumed distance within the measurement range, performs the above process for each assumed distance, and obtains the final difference. Then, the corresponding point searching unit 6 selects an assumed distance that minimizes the final degree of difference,
It is output to the distance image output unit 7 as the measured distance for the target pixel.

【0062】対応点探索部6は、基準画像中の全ての画
素を順次にターゲット画素として選び、上記の対応点探
索を行なう。それにより、全ての画素について計測距離
が出力される。距離画像出力部7は、こうして出来上が
った距離画像を出力する。
The corresponding point searching unit 6 sequentially selects all the pixels in the reference image as target pixels and performs the above corresponding point search. As a result, the measured distance is output for all pixels. The distance image output unit 7 outputs the distance image thus completed.

【0063】さて、本実施形態において、画素選択で使
用される画素値範囲が狭いと、除外される画素の数が多
くて、対応点探索を行う際、十分なパターンマッチング
を行うことができず間違った計測距離を出力することに
なる可能性がある。そこで、距離画像出力部7では、下
記のような対応点探索の信頼性を表す信頼度を求め、信
頼度の高い画素の計測距離のみを出力しても良い。
In the present embodiment, if the pixel value range used for pixel selection is narrow, the number of pixels to be excluded is large, and sufficient pattern matching cannot be performed when searching for corresponding points. It may output the wrong measurement distance. Therefore, the distance image output unit 7 may obtain the reliability indicating the reliability of the corresponding point search as described below, and output only the measured distance of the pixel with high reliability.

【0064】すなわち、例えば図2に示すように、複数
の仮定距離中のn番目の仮定距離Z(n)が計測距離として
出力されたとする。その場合、その計測距離Z(n)につい
ての相違度の最終合計をSSAD(n)とする。また、この計
測距離Z(n)の前隣と後隣の仮定距離Z(n-1)およびZ(n+1)
についての相違度の最終合計をSSAD(n-1)およびSSAD(n+
1)とする。そして、SSAD(n-1)とSSAD(n)の差の絶対値、
およびSSAD(n+1)とSSAD(n)の差の絶対値の合計を、信頼
度REとする。つまり、 RE=|SSAD(n-1)-SSAD(n)|+|SSAD(n+1)-SSAD(n)| である。このREの値が大きいほど、パターンマッチング
の信頼性が高いと考えることができ、よって、計測距離
Z(n)の信頼性が高いと考えることができる。
That is, for example, as shown in FIG. 2, it is assumed that the n-th assumed distance Z (n) among a plurality of assumed distances is output as the measured distance. In that case, SSAD (n) is the final sum of the dissimilarities for the measured distance Z (n). The assumed distances Z (n-1) and Z (n + 1) before and after the measured distance Z (n)
The final sum of dissimilarities for SSAD (n-1) and SSAD (n +
1) And the absolute value of the difference between SSAD (n-1) and SSAD (n),
And the sum of the absolute values of the differences between SSAD (n + 1) and SSAD (n) is taken as the reliability RE. That is, RE = | SSAD (n-1) -SSAD (n) | + | SSAD (n + 1) -SSAD (n) |. It can be considered that the larger the value of RE, the higher the reliability of pattern matching, and therefore the measured distance
It can be considered that Z (n) has high reliability.

【0065】或いは、別の方法として、例えば図3に示
すように、複数の仮定距離中のn番目の仮定距離Z(n)が
計測距離として出力され、また、m番目の仮定距離Z(m)
にて相違度の最終合計について2番目に小さい極小ピー
クが現れていたとする。その場合、計測距離Z(n)での相
違度の最終合計SSAD(n)と、2番目の極小ピークの値SSAD
(m)の差の絶対値を、その計測距離Z(n)信頼度REとす
る。つまり、 RE=|SSAD(n)−SSAD(m)| である。このREの値が大きいほど、パターンマッチング
の信頼性が高いと考えることができ、よって、計測距離
Z(n)の信頼性が高いと考えることができる。
Alternatively, as another method, for example, as shown in FIG. 3, the n-th assumed distance Z (n) among a plurality of assumed distances is output as the measured distance, and the m-th assumed distance Z (m )
Suppose that the second smallest minimum peak appeared in the final total sum of dissimilarities. In that case, the final sum of the dissimilarity at the measured distance Z (n), SSDA (n), and the value of the second minimum peak, SSDA
Let the absolute value of the difference of (m) be the measurement distance Z (n) reliability RE. That is, RE = | SSAD (n) −SSAD (m) |. It can be considered that the larger the value of RE, the higher the reliability of pattern matching, and therefore the measured distance
It can be considered that Z (n) has high reliability.

【0066】また、別の方法として、距離画像の平坦度
を求めて、それを信頼度として用いることもできる。
As another method, the flatness of the range image can be obtained and used as the reliability.

【0067】すなわち、パターンマッチングの信頼性が
低く、誤った距離画像が出力された場合には、例えば、
平面状の物体を計測しているのにもかかわらず距離画像
が平面状にならずに、隣同士の画素間の距離が大きく異
なることがある。そこで、距離画像にSobel処理(1次微
分処理)を行い、その結果をその距離画像の平坦度と
し、平坦度が低い(距離変化が大きい)画素は信頼度RE
が低いとすることができる。或いは、距離画像内の各画
素を中心に所定サイズのウインドウを設定し、そのウィ
ンドウ中の距離の最大値と最小値の差の逆数を、その画
素の平坦度として用いることもできる。さらに、1画素
のみの計測距離がその周辺近傍の画素の計測距離と大き
く異なる場合、その画素の信頼度REを低く出力すること
もできる。また、ある領域の平坦度が高くても、その領
域がとても狭い場合には、その領域の信頼度REを低くす
るようにしてもよい。
That is, when the reliability of the pattern matching is low and an incorrect range image is output, for example,
The distance image may not be planar even though a planar object is being measured, and the distance between adjacent pixels may be significantly different. Therefore, Sobel processing (first-order differentiation processing) is performed on the distance image, and the result is used as the flatness of the distance image. Pixels with low flatness (large distance change) have reliability RE.
Can be low. Alternatively, it is possible to set a window of a predetermined size around each pixel in the distance image and use the reciprocal of the difference between the maximum value and the minimum value of the distance in the window as the flatness of the pixel. Furthermore, when the measured distance of only one pixel is significantly different from the measured distances of pixels in the vicinity of the periphery, the reliability RE of the pixel can be output low. Further, even if the flatness of a certain region is high, if the region is very narrow, the reliability RE of that region may be lowered.

【0068】本実施形態によれば、基準画像又は比較画
像の中から、所定の画素値範囲外の画素値を実質的に持
つ画素を除外し、残りの画素を用いて対応点探索を行
う。これにより、対応点探索で使用される画素の画素値
のばらつきが小さくなる。つまり、基準画像及び比較画
像中の模様が弱い部分だけが対応点探索で用られること
になる。従って、物体輪郭の膨らみが発生する一条件
「参照ウインドウ内の背景の模様が弱く、物体の模様が
強い」が成立する頻度が減り、その結果として、背景の
距離が誤って近い物体の距離として計測されにくくな
る。また、各画素の近傍領域の画像値を使用してその画
素を選択するか否かを判断する場合には、もし、一つの
画素のみについて画素値の検出エラーなどが発生して
も、そのエラーの影響を除去できるので、安定した結果
を得ることができる。
According to the present embodiment, pixels having substantially pixel values outside the predetermined pixel value range are excluded from the reference image or comparison image, and the corresponding points are searched using the remaining pixels. This reduces variations in pixel values of pixels used in the corresponding point search. That is, only the weak pattern portions in the reference image and the comparison image are used in the corresponding point search. Therefore, the frequency of the condition "a background pattern in the reference window is weak and the object pattern is strong" that causes the bulge of the object contour to decrease is reduced, and as a result, the background distance is erroneously determined to be close to the object distance. It becomes difficult to measure. In addition, when determining whether to select a pixel using the image value in the vicinity of each pixel, even if a pixel value detection error occurs for only one pixel, the error Since the effect of can be removed, stable results can be obtained.

【0069】〔2〕 第2の実施形態 図4に、この実施形態の構成を示す。この実施形態は、
上述した原理(1)を応用している。
[2] Second Embodiment FIG. 4 shows the configuration of this embodiment. This embodiment is
It applies the above-mentioned principle (1).

【0070】この実施形態は、複数の画素選択部13、
14を備える。2つの画素選択部13、14が例示され
ているが、より多くの画素選択部が設けられても良い。
これらの画素選択部13、14には、それぞれ異なる画
素値範囲が設定される。それらの画素値範囲は、互いに
部分的に重複していてもよい。各画素選択部13、14
は、それぞれの画素値範囲を用いて、入力画像に対し
て、第1の実施形態で説明したと同様の画素選択処理を
行う。第1の画素選択部13から出力された基準画像と
比較画像は基準画像記憶部15と比較画像記憶部16に
格納される。第2の画素選択部14から出力された基準
画像と比較画像は基準画像記憶部17と比較画像記憶部
18に格納される。
In this embodiment, a plurality of pixel selection units 13,
14 is provided. Two pixel selection units 13 and 14 are illustrated, but more pixel selection units may be provided.
Different pixel value ranges are set in the pixel selection units 13 and 14, respectively. The pixel value ranges may partially overlap each other. Each pixel selection unit 13, 14
Performs pixel selection processing similar to that described in the first embodiment on the input image using the respective pixel value ranges. The reference image and the comparison image output from the first pixel selection unit 13 are stored in the reference image storage unit 15 and the comparison image storage unit 16. The reference image and the comparison image output from the second pixel selection unit 14 are stored in the reference image storage unit 17 and the comparison image storage unit 18.

【0071】複数の画素選択部13、14にそれぞれ対
応して複数の対応点探索部19、20が設けられる。そ
れら対応点探索部19、20は、それぞれ、対応する画
素選択部13、14から出力された基準画像と比較画像
のセットを用いて、第1の実施形態で説明したと同様の
方法で対応点探索を行い、その結果の画素毎の計測距離
を計測距離選択部21に出力する。各対応点探索部1
9、20は、また、第1の実施形態で説明したと同様の
方法で画素毎の計測距離の信頼度を計算し、その信頼度
も計測距離選択部21に出力する。
A plurality of corresponding point searching units 19 and 20 are provided corresponding to the plurality of pixel selecting units 13 and 14, respectively. The corresponding point searching units 19 and 20 use the sets of the reference image and the comparison image output from the corresponding pixel selecting units 13 and 14, respectively, in the same manner as described in the first embodiment. The search is performed, and the measurement distance for each pixel obtained as a result is output to the measurement distance selection unit 21. Each corresponding point search unit 1
Also, 9 and 20 calculate the reliability of the measured distance for each pixel by the same method as described in the first embodiment, and also output the reliability to the measured distance selection unit 21.

【0072】計測距離選択部21は、複数の対応点探索
部19、20から入力した画素毎の計測距離の信頼度
を、同じ画素のもの同士で比較し、信頼度が最も高い計
測距離を、その画素の最終的な計測距離として選択し
て、距離画像出力部22に出力する。
The measurement distance selection unit 21 compares the reliability of the measurement distance for each pixel, which is input from the corresponding point search units 19 and 20, for the same pixels, and determines the measurement distance with the highest reliability. It is selected as the final measurement distance of the pixel and output to the distance image output unit 22.

【0073】この実施形態によれば、異なる複数の画素
値範囲をそれぞれ用いて行った複数の対応点探索の結果
中から、最も信頼度の高い結果を画素毎にに選んで最終
的な距離画像を生成できるため、出力された距離画像に
含まれる高い信頼性をもつ画素の割合が一層高くなる。
According to this embodiment, the result with the highest reliability is selected for each pixel from the results of the corresponding point search performed using the different pixel value ranges, and the final range image is selected. Can be generated, the proportion of highly reliable pixels included in the output range image is further increased.

【0074】〔3〕 第3の実施形態 図5に、この実施形態の構成を示す。この実施形態は、
上述した原理(1)を応用している。
[3] Third Embodiment FIG. 5 shows the configuration of this embodiment. This embodiment is
It applies the above-mentioned principle (1).

【0075】この実施形態は、上述した第2の実施形態
の構成に加えて、画素値範囲判定部23を具備する。画
素値範囲判定部23は、以下のような処理を行う。
This embodiment includes a pixel value range determination unit 23 in addition to the configuration of the second embodiment described above. The pixel value range determination unit 23 performs the following processing.

【0076】画素値範囲判定部23は、基準画像入力部
11から基準画像を入力し、基準画像中の各画素の画素
値が、複数の画素選択部13、14に設定された複数の
画素値範囲のどれに含まれるかを判定し、その結果を計
測距離選択部21に出力する。なお、この判定は、各画
素それ自体の画素値に対して行う代わりに、例えば、各
画素を中心とした所定サイズのウインドウ内の画素値の
代表値(例えば平均値)に対して行うようにしてもよ
い。
The pixel value range determination unit 23 inputs the reference image from the reference image input unit 11, and the pixel value of each pixel in the reference image is set to the plurality of pixel selection units 13 and 14. Which of the ranges is included is determined, and the result is output to the measured distance selection unit 21. Note that this determination is made, for example, on a representative value (for example, an average value) of pixel values in a window of a predetermined size centered on each pixel, instead of making a determination on the pixel value of each pixel itself. May be.

【0077】上記複数の画素値範囲は、部分的に重なっ
ている場合があり、その場合、一つの画素に対する上記
画素値範囲判定の結果が複数の範囲を指すことがある。
また、上記画素値範囲判定の結果が、どの範囲も指さな
いこともある。
The plurality of pixel value ranges may partially overlap each other, in which case the result of the pixel value range determination for one pixel may indicate a plurality of ranges.
Further, the result of the pixel value range determination may not point to any range.

【0078】計測距離選択部21は、複数の対応点探索
部19、20から複数の距離画像および各距離画像にお
ける画素毎の計測距離の信頼度を入力し、さらに、画素
値範囲判定部23から画素毎の判定結果も入力する。そ
して、計測距離選択部21は、画素毎に、信頼度だけで
なく判定結果も考慮して、複数の計測距離中の何れを採
用するかを選択し、選択した計測距離をその画素の距離
画像として出力する。判定結果の考慮の仕方としては、
例えば、同じ画素について、複数の計測距離信頼度の値
が同等に近かったり、或いは、その複数の計測距離の信
頼度が全てかなり低いような場合、その複数の計測距離
中、判定結果が示す画素値範囲の方の計測距離を選ぶと
いうような方法がある。
The measured distance selection unit 21 inputs a plurality of distance images and reliability of the measured distance for each pixel in each distance image from the corresponding point search units 19 and 20, and further from the pixel value range determination unit 23. The judgment result for each pixel is also input. Then, the measurement distance selection unit 21 selects which of a plurality of measurement distances is to be adopted for each pixel in consideration of not only the reliability but also the determination result, and the selected measurement distance is used as a distance image of the pixel. Output as. As a method of considering the judgment result,
For example, for the same pixel, if the values of reliability of a plurality of measurement distances are nearly equal to each other, or if the reliability of the plurality of measurement distances is all fairly low, the pixel indicated by the determination result in the plurality of measurement distances There is a method such as selecting the measurement distance in the value range.

【0079】この実施形態によれば、上記判定結果を利
用することで、得られた距離画像に含まれる信頼性の高
い画素の割合が一層高くなる。
According to this embodiment, by utilizing the above determination result, the ratio of highly reliable pixels included in the obtained range image is further increased.

【0080】〔4〕 第4の実施形態 図6に、この実施形態の構成を示す。この実施形態は、
上述した原理(1)を応用している。
[4] Fourth Embodiment FIG. 6 shows the configuration of this embodiment. This embodiment is
It applies the above-mentioned principle (1).

【0081】この実施形態では、模様強度算出部36
が、基準画像の各画素について模様強度を計算する。対
応点探索部35が、従来と同様の方法で1回目の対応点
探索を行なって、基準画像の各画素について、計測距離
を出力する。対応点探索部35は、また、第1の実施形
態で説明したような方法で、画素毎の計測距離の信頼度
も出力する。そして、距離確定部37が、対応点探索部
35からの画素毎の計測距離の中から、信頼度が高くか
つ模様強度が強いと判断された画素の計測距離のみを、
その画素の距離として確定させ、その確定された距離を
距離画像出力部42へ出力する。
In this embodiment, the pattern strength calculation unit 36
Calculates the pattern intensity for each pixel of the reference image. The corresponding point searching unit 35 performs the first corresponding point search in the same manner as the conventional method, and outputs the measured distance for each pixel of the reference image. The corresponding point searching unit 35 also outputs the reliability of the measured distance for each pixel by the method described in the first embodiment. Then, the distance determination unit 37 calculates only the measured distances of the pixels determined to have high reliability and strong pattern strength from the measured distances for each pixel from the corresponding point search unit 35.
The distance is determined as the pixel distance, and the determined distance is output to the distance image output unit 42.

【0082】さらに、上記処理で距離の確定した画素の
画素値は使用せずに、対応点探索部41が2回目の対応
点探索を行って、まだ距離の確定していない画素につい
て計測距離を求め、それを距離画像出力部42に出力す
る。
Furthermore, the corresponding point searching unit 41 performs the second corresponding point search without using the pixel value of the pixel whose distance is fixed in the above processing, and the measured distance is calculated for the pixel whose distance is not fixed yet. Obtained and output it to the distance image output unit 42.

【0083】なお、1回目と2回目の対応点探索で用い
られるマッチングウィンドウ(参照ウィンドウ及び比較
ウィンドウ)のサイズは、同じでもよいし、違っていて
も良い。特に、1回目より2回目の方のウィンドウサイズ
をより大きくすることができる。
The sizes of the matching windows (reference window and comparison window) used in the first and second corresponding point searches may be the same or different. In particular, the window size of the second time can be made larger than that of the first time.

【0084】模様強度算出部36では、模様強度とし
て、輝度画像をSobelやLogなどの方法で微分処理した画
像を用いることができる。基準画像入力部31からの入
力が輝度画像である場合には、それを上記のように微分
処理することで模様強度を得ることができる。一方、基
準画像入力部31からの入力がすでに輝度画像を微分処
理した画像である場合には、その入力された画素値をそ
のまま模様強度として使用することができる。ただし、
Log画像のように、模様が無いときは画素値が零とな
り、模様が強いほどプラス又はマイナス方向に画素値が
大きくなる画像の場合は、その画素値の絶対値を模様強
度として使用する。或いは、各画素を中心とした所定サ
イズのウインドウを設定し、そのウインドウ内の全画素
の模様強度を加算した結果や平均値を、その画素の模様
強度として用いても良い。
In the pattern strength calculation unit 36, an image obtained by differentiating a luminance image by a method such as Sobel or Log can be used as the pattern strength. When the input from the reference image input unit 31 is a luminance image, the pattern strength can be obtained by differentiating the luminance image as described above. On the other hand, when the input from the reference image input unit 31 is the image obtained by differentiating the luminance image, the input pixel value can be used as it is as the pattern intensity. However,
In the case of an image, such as a Log image, in which the pixel value is zero when there is no pattern and the pixel value increases in the plus or minus direction as the pattern becomes stronger, the absolute value of the pixel value is used as the pattern strength. Alternatively, a window of a predetermined size centered on each pixel may be set, and the result or average value of the pattern intensities of all pixels in the window may be used as the pattern intensity of the pixel.

【0085】距離確定部37は、基準画像中の各画素に
ついて、1回目の対応点探索によって求まった計測距離
の信頼度が所定の閾値以上であり、かつ、模様強度が所
定の閾値以上である場合にのみ、その計測距離をその画
素の距離として確定させ、その確定した距離と、その画
素の座標とを、距離画像出力部42及び画素選択部38
に出力する。
For each pixel in the reference image, the distance determining unit 37 has the reliability of the measured distance obtained by the first corresponding point search of a predetermined threshold value or more, and the pattern strength of a predetermined threshold value or more. Only in that case, the measured distance is fixed as the distance of the pixel, and the fixed distance and the coordinates of the pixel are set to the distance image output unit 42 and the pixel selection unit 38.
Output to.

【0086】画素選択部38は、基準画像記憶部33か
ら基準画像を入力し、距離確定部37から入力された座
標と同じ座標の基準画像内の画素にマスク情報を付加す
る。また、画素選択部38は、比較画像記憶部34から
各比較画像を入力し、距離確定部37から通知された座
標と確定距離とに対応した各比較画像内の画素を求め、
その画素にマスク情報を付加する。そのマスク情報は、
該当の画素のみに付加しても良いし、その画素を中心と
した所定サイズのウインドウを設定し、そのウインドウ
内の全画素に付加しても良い。
The pixel selection unit 38 inputs the reference image from the reference image storage unit 33 and adds mask information to the pixels in the reference image having the same coordinates as the coordinates input from the distance fixing unit 37. Further, the pixel selection unit 38 inputs each comparison image from the comparison image storage unit 34, obtains the pixel in each comparison image corresponding to the coordinates and the determined distance notified from the distance determination unit 37,
Mask information is added to the pixel. The mask information is
It may be added only to the corresponding pixel, or a window of a predetermined size centered on that pixel may be set and added to all pixels in that window.

【0087】マスク情報が付加された基準画像は基準画
像記憶部39に記憶され、また、マスク情報が付加され
た各比較画像は比較画像記憶部40に記憶される。
The reference image to which the mask information is added is stored in the reference image storage unit 39, and each comparison image to which the mask information is added is stored in the comparison image storage unit 40.

【0088】対応点探索部41は、基準画像記憶部39
および比較画像記憶部40に記憶されている画像を使用
して2回目の対応点探索を行う。このとき、対応点探索
部41は、第1の実施形態で説明したように、基準画像
と各比較画像の位置的に対応し合うペアの画素の少なく
とも一方にマスク情報が付加されている場合、そのペア
の画素の間の相違度は無視する。或いは、対応点探索部
41は、第1の実施形態で説明したように、そのペアの
画素のうち比較画像の方の画素にのみマスク情報が付加
されている場合、その比較画像の方の画素の値を、所定
の画素値範囲(例えば、基準画像又は各比較画像の全画
素値の分布範囲)の中間値付近の値に置き換えた上で、
そのペアの画素間の相違度を算出して、それを相違度の
最終合計の計算で使用する。
The corresponding point searching unit 41 includes a reference image storage unit 39.
And the second corresponding point search is performed using the image stored in the comparison image storage unit 40. At this time, the corresponding point searching unit 41, as described in the first embodiment, when the mask information is added to at least one of the pair of pixels that are positionally corresponding to the reference image and each comparison image, The dissimilarity between the pixels of the pair is ignored. Alternatively, the corresponding point searching unit 41, as described in the first embodiment, when the mask information is added only to the pixel of the comparative image among the pixels of the pair, the pixel of the comparative image is added. After replacing the value of with a value near a middle value of a predetermined pixel value range (for example, a distribution range of all pixel values of the reference image or each comparison image),
The dissimilarity between the pixels in the pair is calculated and used in the final dissimilarity sum calculation.

【0089】距離画像出力部42は、距離確定部37か
ら入力される基準画像内の一部の画素についての確定距
離と、対応点探索部41から入力される残りの画素につ
いての計測距離とを統合して、最終的な距離画像を生成
し出力する。
The distance image output unit 42 outputs the determined distances for some pixels in the reference image input from the distance determination unit 37 and the measured distances for the remaining pixels input from the corresponding point search unit 41. Integrate to generate and output the final range image.

【0090】1回目と2回目の対応点探索で用いられる
マッチングウィンドウ(参照ウィンドウ及び比較ウィン
ドウ)のサイズは、同じでもよいし、違っていても良
い。特に、2回目の対応点探索では1回目の対応点探索と
比べて、より弱い模様の画像を使用するために対応点探
索の信頼性が低くなる。この低い信頼性を補償するため
に、1回目より2回目の方のマッチングウィンドウサイズ
をより大きくすることができる。
The sizes of the matching windows (reference window and comparison window) used in the first and second corresponding point searches may be the same or different. In particular, in the second corresponding point search, the reliability of the corresponding point search is lower than that in the first corresponding point search because the image having a weaker pattern is used. To compensate for this low reliability, the second matching window size can be made larger than the first matching window size.

【0091】この実施形態によれば、まず、1回目の対
応点探索で、模様の強い画素(そこでは、物体輪郭の膨
れの問題が元来発生し難い)に関して距離を求め、次
に、その模様の強い画素をマスクしてから、2回目の対
応点探索で、模様の弱い画素について距離を求めること
により、模様の強い画素からの悪影響が除去され、物体
輪郭の膨れが発生し難くなる。
According to this embodiment, first, in the first corresponding point search, the distance is obtained with respect to the pixel having a strong pattern (where the problem of the bulging of the object contour is not likely to occur originally), and then the distance is calculated. By masking the pixels with a strong pattern and then finding the distances with respect to the pixels with a weak pattern in the second corresponding point search, the adverse effect from the pixels with a strong pattern is removed, and the bulging of the object contour is less likely to occur.

【0092】〔5〕 第5の実施形態 図7は、この実施形態の構成を示す。この実施形態は、
上述した原理(1)を応用している。
[5] Fifth Embodiment FIG. 7 shows the configuration of this embodiment. This embodiment is
It applies the above-mentioned principle (1).

【0093】この実施形態では、画素選択部55と対応
点探索部56が、基準画像内の各画素について、以下の
処理を行う。基準画像の全ての画素について、以下の処
理が繰り返し実行されることになる。
In this embodiment, the pixel selection unit 55 and the corresponding point search unit 56 perform the following processing for each pixel in the reference image. The following processing is repeatedly executed for all the pixels of the reference image.

【0094】画素選択部55では、予め画素値範囲が設
定されている。画素選択部55は、基準画像中の或るタ
ーゲット画素について対応点探索が行われる際、その所
定の画素値範囲外の画素値をもつ画素全部に、マスク情
報を付加する。
In the pixel selection section 55, the pixel value range is set in advance. When the corresponding point search is performed for a certain target pixel in the reference image, the pixel selection unit 55 adds mask information to all pixels having a pixel value outside the predetermined pixel value range.

【0095】次に、画素選択部55は、参照ウインドウ
内のマスク情報が付加されていない画素が持つ画素値中
での最大値G1maxと最小値G1minを求める。或いは、画
素選択部55は、参照ウインドウ内の全画素の画素値中
で、最大値G1maxと最小値G 1minを求めても良い。
Next, the pixel selection section 55 displays the reference window.
Among the pixel values of the pixels in which the mask information is not added
Maximum value G at1maxAnd the minimum G1 minAsk for. Alternatively, the picture
The element selection unit 55 calculates the pixel values of all the pixels in the reference window.
And the maximum value G1maxAnd the minimum G 1 minMay be asked.

【0096】さらに、画素選択部55は、各比較画像内
の各比較ウィンドウ中の画素のうち、上記最大値G1max
と最小値G1minの間に入っていない画素値をもつ画素全
部に対して、マスク情報を付加する。
Further, the pixel selection unit 55 selects the maximum value G 1max among the pixels in each comparison window in each comparison image.
And mask information is added to all the pixels having a pixel value that is not between the minimum value G 1min and the minimum value G 1min .

【0097】対応点探索部56は、画素選択部55から
出力された参照ウィンドウ及び各比較ウィンドウを用い
て、第1の実施形態で説明したと同様の方法で対応点探
索を行う。すなわち、対応点探索では、参照ウインドウ
内と各比較ウィンドウ内の位置的に対応し合うペアの画
素の少なくとも一方にマスク情報が付加されている場
合、そのペアの画素間の相違度は無視する。或いは、そ
のペアの画素のうち比較画像の方の画素にのみマスク情
報が付加されている場合、その比較画像の方の画素の値
を、上記画素値範囲の中間値付近の値に置き換えた上
で、そのペアの画素間の相違度を算出して、それを相違
度の最終合計の計算で使用する。
The corresponding point search unit 56 uses the reference window and each comparison window output from the pixel selection unit 55 to perform a corresponding point search by the same method as described in the first embodiment. That is, in the corresponding point search, when the mask information is added to at least one of the pair of pixels that correspond positionally in the reference window and each comparison window, the degree of difference between the pixels of the pair is ignored. Alternatively, when the mask information is added only to the pixel of the comparison image of the pixels of the pair, the value of the pixel of the comparison image is replaced with a value near the intermediate value of the pixel value range. Then, the dissimilarity between the pixels in the pair is calculated and used in the calculation of the final sum of the dissimilarities.

【0098】この実施形態によれば、対応点探索を行う
際に、基準画像の各参照ウインドウごとに画素値範囲
(上記最大値G1maxと最小値G1min)を自動設定し、そ
の画素値範囲を使用して各比較ウィンドウ中の画素の選
択を行うことにより、1つの対応点探索部56を用いる
だけで、図4に示した第2の実施形態のように複数の対
応点探索部を用いた場合とほぼ同等の信頼性をもつ距離
画像が得られる。
According to this embodiment, when performing the corresponding point search, the pixel value range (the maximum value G 1max and the minimum value G 1min ) is automatically set for each reference window of the standard image, and the pixel value range is set. By selecting pixels in each comparison window by using, a plurality of corresponding point searching units can be used as in the second embodiment shown in FIG. 4 by using only one corresponding point searching unit 56. A range image is obtained with almost the same reliability as when there was.

【0099】さらに、図4に示した第2の実施形態で
は、最適と考えられる画素値範囲を予め設定しておく必
要がある。また、第2の実施形態では、対応点探索を連
続して行う際に画像の模様が大きく変化する場合には、
設定される画素値範囲の数を多くしておく必要がある。
これに対し、本実施形態では、毎回の対応点探索で、最
適な画素値範囲が自動的に設定される。
Furthermore, in the second embodiment shown in FIG. 4, it is necessary to preset the pixel value range considered to be optimum. Further, in the second embodiment, when the pattern of the image changes greatly when continuously performing the corresponding point search,
It is necessary to increase the number of pixel value ranges to be set.
On the other hand, in this embodiment, the optimum pixel value range is automatically set in each corresponding point search.

【0100】〔6〕 第6の実施形態 図8は、この実施形態の構成を示す。この実施形態は、
上述した原理(2)を応用している。
[6] Sixth Embodiment FIG. 8 shows the configuration of this embodiment. This embodiment is
The principle (2) described above is applied.

【0101】上述した原理(2)によれば、物体輪郭の膨
らみが発生する条件は「参照ウィンドウにおいてターゲ
ット画素が遠くの背景上にあり、その背景の画素値のば
らつきが小さく、かつ、その背景と近くの物体の画素値
の差が大きい」ことである。この条件は、例えば、背景
の模様が弱く、物体の模様が強い場合や、背景と物体の
模様が共に弱いが、お互いの画素値に大きな差がある場
合などに成立する。
According to the above-mentioned principle (2), the condition that the swelling of the object contour occurs is that "the target pixel is on a background far away in the reference window, the variation of the pixel value of the background is small, and the background is small. There is a large difference in the pixel values of the nearby objects. " This condition is satisfied, for example, when the pattern of the background is weak and the pattern of the object is strong, or when the patterns of the background and the object are both weak but there is a large difference in pixel value between them.

【0102】この実施形態では、基準画像内の参照ウイ
ンドウ内の模様の偏り度合を求める模様偏り算出部83
を備える。参照ウインドウ内の模様に偏りがある場合、
上記の条件成立による物体輪郭の膨れが発生する可能性
がある。
In this embodiment, the pattern deviation calculator 83 for obtaining the degree of pattern deviation in the reference window in the standard image.
Equipped with. If the pattern in the reference window is biased,
The swelling of the contour of the object may occur due to the satisfaction of the above conditions.

【0103】2つの画素選択部73、74にはそれぞれ
画素値範囲が設定される。ここで、第2の画素選択部7
4に設定される画素値範囲の幅は、第1の画素選択部7
3のそれよりも狭い。したがって、第2の画素選択部7
4で選択された画素は、第1の画素選択部73で選択さ
れた画素よりも、模様のより弱い画像のみに絞られてい
る。なお、画素選択部の数は2に限定されるわけではな
く、それぞれ異なる広さの画素値範囲をもった3以上の
画素選択部を設けてもよい。
A pixel value range is set in each of the two pixel selection units 73 and 74. Here, the second pixel selection unit 7
The width of the pixel value range set to 4 is determined by the first pixel selection unit 7
Narrower than that of 3. Therefore, the second pixel selection unit 7
The pixels selected in 4 are narrowed down to only images with a weaker pattern than the pixels selected in the first pixel selection unit 73. Note that the number of pixel selection units is not limited to two, and three or more pixel selection units each having a different range of pixel value may be provided.

【0104】第2の画素選択部74で選択された模様の
弱い画素のみを使用して、対応点探索を行うことによ
り、誤った距離が計測される画素数を減らすことができ
る。
By performing the corresponding point search by using only the pixels having the weak pattern selected by the second pixel selecting section 74, the number of pixels for which the erroneous distance is measured can be reduced.

【0105】そこで、計測距離選択部81は、2つの対
応点探索部79、80から参照ウィンドウ中の各画素に
ついての2つの計測距離を入力し、また、模様偏り算出
部83から参照ウィンドウ中の各画素についての模様偏
り度合を入力し、模様の偏りがあると判断された画素に
ついては、模様の弱い画素のみを使用する第2の対応点
探索部80からの計測距離を選択し、それ以外の模様の
偏りがないと判断された画素については、第1の対応点
探索部79からの計測距離を選択し、選択された計測距
離を距離画像出力部82に出力する。
Therefore, the measurement distance selection unit 81 inputs two measurement distances for each pixel in the reference window from the two corresponding point search units 79 and 80, and the pattern bias calculation unit 83 inputs the measurement distance in the reference window. The degree of pattern bias for each pixel is input, and for pixels determined to have a pattern bias, a measurement distance from the second corresponding point search unit 80 that uses only weak pixels of the pattern is selected, and otherwise. For pixels determined to have no pattern bias, the measurement distance from the first corresponding point searching unit 79 is selected, and the selected measurement distance is output to the distance image output unit 82.

【0106】或いは、上記処理に代えて、次の処理を行
っても良い。すなわち、模様偏り算出部83にて、各画
素での模様偏りの方向(模様が弱い方から強い方に変化
する方向であり、後述の模様偏り算出例では、模様の偏
り度合のi成分、j成分をベクトルとした際のベクトル
の方向)を求める。計測距離選択部81において、第1
の対応点探索部79からの距離画像における各画素での
距離変化の方向(各画素での距離が遠くから近くへ変化
する方向)を求める。そして、模様の偏りがあると判断
された画素において、模様偏りの方向と距離変化の方向
とが一致した場合(又は、両方向間の相違が所定値以下
で小さい場合)、第2の対応点探索部80からの計測距
離を選択して、距離画像出力部82に出力する。それ以
外の場合には、第1の対応点探索部79からの計測距離
を選択して、距離画像出力部82に出力する。
Alternatively, the following processing may be performed instead of the above processing. That is, in the pattern deviation calculation unit 83, the direction of the pattern deviation in each pixel (the direction in which the pattern changes from the weak one to the strong one. In the pattern deviation calculation example described later, the i component of the degree of pattern deviation, j The direction of the vector when the component is a vector) is calculated. In the measurement distance selection unit 81, the first
The direction of distance change at each pixel in the distance image from the corresponding point searching unit 79 (direction in which the distance at each pixel changes from distant to near) is obtained. Then, in the pixel determined to have the pattern bias, if the pattern bias direction and the distance change direction match (or if the difference between the two directions is smaller than a predetermined value), the second corresponding point search is performed. The measurement distance from the unit 80 is selected and output to the distance image output unit 82. In other cases, the measured distance from the first corresponding point searching unit 79 is selected and output to the distance image output unit 82.

【0107】後者の処理において、模様偏りの方向と距
離変化の方向とが一致した場合、又は、両方向間の相違
が所定値以下で小さい場合、参照ウインドウ内に模様の
強度が異なり且つ距離も異なる2つ以上の物体が存在す
る可能性が高いことを意味している。このような場合に
は、物体輪郭の膨れが発生する可能性があるため、第2
の対応点探索部80からの計測距離が選択される。上記
場合以外の場合には、模様強度と距離の双方で異なる2
つ以上の物体が存在する可能性は低く、よって、物体輪
郭の膨れが発生する可能性は低いので、第1の対応点探
索部79からの計測距離を選択することができる。
In the latter process, if the pattern bias direction and the distance change direction match, or if the difference between the two directions is smaller than a predetermined value and is small, the intensity of the pattern is different and the distance is also different in the reference window. It means that there is a high probability that there are two or more objects. In such a case, bulging of the contour of the object may occur, so the second
The measurement distance from the corresponding point search unit 80 is selected. In cases other than the above case, both pattern strength and distance are different.
Since it is unlikely that there is one or more objects, and therefore the possibility that bulging of the object contour will occur, the measurement distance from the first corresponding point searching unit 79 can be selected.

【0108】模様偏り算出部83は、模様の偏り度合を
例えば下記のようにして求める。
The pattern bias calculation unit 83 obtains the pattern bias degree in the following manner, for example.

【0109】基準画像入力部71から入力される基準画
像が輝度画像である場合、模様偏り算出部83は、その
輝度画像に例えば微分処理を施すなどして、Sobel画像
やLog画像のように各画素の画素値がその画素での模様
強度を表すような模様強度画像に変換する。次いで、基
準画像入力部71は、その模様強度画像において、図9
に示すように座標(i,j)の画素P(i,j)を中心とした所定
サイズ(2A+1)画素×(2B+1)画素(図9の例で
は、A=2、B=2の5画素×5画素)のウィンドウを設定
し、このウインドウ内の画素値の重心位置を求め、その
重心位置の座標とその画素P(i,j)の座標(i,j)との差を
求め、この座標差をその画素P(i,j)での模様偏り度合と
する。
When the reference image input from the reference image input unit 71 is a luminance image, the pattern bias calculation unit 83 applies a differentiating process to the luminance image, for example, to obtain each image like a Sobel image or a Log image. It is converted into a pattern intensity image in which the pixel value of the pixel represents the pattern intensity at that pixel. Next, the reference image input unit 71 uses the pattern intensity image shown in FIG.
As shown in, the pixel P (i, j) of the coordinate (i, j) has a predetermined size (2A + 1) pixels × (2B + 1) pixels (A = 2, B = in the example of FIG. 9). (2 pixels of 5 pixels x 5 pixels) is set, the barycentric position of the pixel value in this window is determined, and the difference between the coordinates of the barycentric position and the coordinates (i, j) of the pixel P (i, j) And the coordinate difference is defined as the degree of pattern deviation at the pixel P (i, j).

【0110】一方、基準画像入力部71から入力される
画像がSobel画像やLog画像のような輝度画像を微分処理
した画像である場合には、模様偏り算出部83は、その
入力基準画像をそのまま上記模様強度画像として使用し
て、上述した方法で重心位置を求め、その重心位置との
座標差をその画素P(i,j)での模様偏り度合とする。
On the other hand, when the image input from the reference image input unit 71 is an image obtained by differentiating a luminance image such as a Sobel image or a Log image, the pattern bias calculation unit 83 uses the input reference image as it is. The barycentric position is obtained by the method described above using the pattern strength image, and the coordinate difference from the barycentric position is taken as the pattern deviation degree at the pixel P (i, j).

【0111】より具体的に説明すると、模様偏り算出部
83は、次のようにして、模様偏り度合のi成分とj成
分を求める。
More specifically, the pattern deviation calculating section 83 obtains the i component and the j component of the pattern deviation degree as follows.

【0112】まず、模様強度画像内に設定された図9に
示したウインドウ内で、各画素P(k,l)の座標(k,l)のi
成分と、そのウインドウの中心画素P(i,j)の座標(i,j)
のi成分との差mを求め、その差mとその画素P(k,l)の
画素値V(k,l)との積を求める。そのウィンドウ内の全て
の画素について、同様の方法で上記積を求める。そし
て、そのウィンドウ内の全画素の積を加算し、その総和
をウインドウ内の全画素数で除算する。この除算の商
を、中心画素P(i,j)での模様の偏り度合のi成分とす
る。つまり、
First, in the window shown in FIG. 9 set in the pattern intensity image, i of the coordinate (k, l) of each pixel P (k, l) is calculated.
Component and coordinates (i, j) of the center pixel P (i, j) of the window
The difference m from the i component of the pixel is calculated, and the product of the difference m and the pixel value V (k, l) of the pixel P (k, l) is calculated. The above product is obtained in the same manner for all the pixels in the window. Then, the products of all the pixels in the window are added, and the sum is divided by the total number of pixels in the window. The quotient of this division is taken as the i component of the degree of pattern deviation at the central pixel P (i, j). That is,

【0113】[0113]

【数1】 である。[Equation 1] Is.

【0114】また、模様強度画像内に設定された図9に
示したウインドウ内で、各画素P(k,l)の座標(k,l)のj
成分と、そのウインドウの中心画素P(i,j)の座標(i,j)
のj成分との差nを求め、その差nとその画素P(k,l)の
画素値V(k,l)との積を求める。そのウィンドウ内の全て
の画素について、同様の方法で上記積を求める。そし
て、そのウィンドウ内の全画素について上記積を加算
し、その総和をウインドウ内の全画素数で除算する。こ
の除算の商を、中心画素P(i,j)での模様の偏り度合のj
成分とする。つまり、
Further, within the window shown in FIG. 9 set in the pattern intensity image, j of the coordinates (k, l) of each pixel P (k, l) is j.
Component and coordinates (i, j) of the center pixel P (i, j) of the window
The difference n from the j component of the pixel is calculated, and the product of the difference n and the pixel value V (k, l) of the pixel P (k, l) is calculated. The above product is obtained in the same manner for all the pixels in the window. Then, the products are added to all the pixels in the window, and the sum is divided by the total number of pixels in the window. The quotient of this division is taken to be j, which is the degree of pattern deviation at the central pixel P (i, j).
As an ingredient. That is,

【0115】[0115]

【数2】 である。[Equation 2] Is.

【0116】上記のようにして求めた各画素での模様の
偏り度合は、その画素を中心とする近傍領域の模様に偏
りが小さい場合には小さくなり、模様に偏りが大きいほ
ど大きくなる。
The degree of deviation of the pattern in each pixel obtained as described above is small when the deviation of the pattern in the neighboring area centering on the pixel is small, and becomes large as the deviation of the pattern is large.

【0117】模様偏り算出部83は、上記模様の偏り度
合のi成分の絶対値あるいはj成分の絶対値の少なくと
もどちらかが、またはi成分を2乗した値とj成分を2
乗した値の合計が所定値以上の場合、その画素は模様の
偏りがあると判断する。
The pattern bias calculator 83 calculates at least either the absolute value of the i component or the absolute value of the j component of the degree of pattern bias, or the value obtained by squaring the i component and the j component.
When the sum of the multiplied values is equal to or larger than the predetermined value, it is determined that the pixel has a pattern bias.

【0118】本実施形態によれば、参照ウインドウ内に
模様の偏りがある場合は、参照ウインドウ及び各比較ウ
ィンドウ内の模様の弱い(画素値のばらつきが小さい)
画素のみを使用して、対応点探索を行うことにより、誤
った距離を出力する画素数を減らすことができる。
According to the present embodiment, when the reference window has a biased pattern, the pattern in the reference window and each comparison window is weak (the variation in pixel value is small).
By performing the corresponding point search using only pixels, the number of pixels outputting an incorrect distance can be reduced.

【0119】2. 計測範囲外の物体の誤検知の問題に
対処した実施形態 〔7〕 第7の実施形態 図10に、この実施形態の構成を示す。
2. Embodiment [7] Seventh Embodiment Addressing Problem of False Detection of Object Outside Measurement Range FIG. 10 shows the configuration of this embodiment.

【0120】この実施形態は、距離画像を出力する距離
画像出力部97の他に、その距離画像内の各画素の計測
距離の信頼度を出力する信頼度出力部98を備える。ま
た、模様強度算出部93を設け、そこで、基準画像入力
部91から入力される基準画像内の各画素での模様強度
(例えば、その画素を中心とする近傍領域での画素値の
ばらつきの大きさ)を算出する。算出された模様強度は
対応点探索部96に入力される。
This embodiment comprises a distance image output unit 97 for outputting a distance image, and a reliability output unit 98 for outputting the reliability of the measured distance of each pixel in the distance image. In addition, a pattern intensity calculation unit 93 is provided, in which the pattern intensity at each pixel in the reference image input from the reference image input unit 91 (for example, a large variation in pixel value in a neighboring region centered on the pixel). Is calculated. The calculated pattern intensity is input to the corresponding point searching unit 96.

【0121】対応点探索部96は、基準画像内の各ター
ゲット画素について、既に説明したような方法で対応点
探索を行って、その結果の計測距離を距離画像出力部9
7へ出力する。さらに、対応点探索部96は、各ターゲ
ット画素の計測距離について信頼度を次のようにして求
めて、信頼度出力部98へ出力する。
The corresponding point searching unit 96 performs corresponding point searching for each target pixel in the reference image by the method already described, and the resulting measured distance is calculated by the distance image output unit 9
Output to 7. Further, the corresponding point searching unit 96 obtains the reliability for the measurement distance of each target pixel as follows and outputs it to the reliability output unit 98.

【0122】図11、その信頼度を求める処理の流れを
示している。
FIG. 11 shows the flow of processing for obtaining the reliability.

【0123】対応点探索部96は、まず、ステップS1
で、各ターゲット画素について、その模様強度が或る閾
値Aより大きいか否かにより、正常に距離計測ができる
か否かを判断する。模様強度がその閾値A以下のターゲ
ット画素については、模様が弱すぎて正常な距離計測が
できない可能性があるため、処理はステップS4へ進み、
計測距離の信頼度として低い値、例えば零が、信頼度出
力部98へ出力される。
The corresponding point searching unit 96 firstly executes step S1.
Then, for each target pixel, it is determined whether or not the distance can be normally measured depending on whether or not the pattern strength is larger than a certain threshold value A. For target pixels whose pattern strength is less than or equal to the threshold value A, since the pattern may be too weak to perform normal distance measurement, the process proceeds to step S4,
A low value of the reliability of the measured distance, for example, zero is output to the reliability output unit 98.

【0124】一方、模様強度がその閾値より大きいター
ゲット画素については、処理はステップS2及びS3へ進
む。ステップS2で、相違度の最終合計SSADの最小値SSAD
minが或る閾値Bより大きい場合が検出され、また、ステ
ップS3で、相違度の最終合計SSADの最大値SSADmaxと最
小値SSADminの差が或る閾値Cより小さい場合が検出さ
れ、そのいずれかの場合が検出されたならば、計測範囲
外の物体を誤って検知している可能性があることを意味
するので、処理はステップS4へ進み、計測距離の信頼度
として低い値、例えば零が、信頼度出力部98へ出力さ
れる。
On the other hand, for a target pixel whose pattern intensity is larger than the threshold value, the process proceeds to steps S2 and S3. In step S2, the minimum value SSAD of the final total dissimilarity SSAD
It is detected that min is larger than a certain threshold value B, and in step S3, it is detected that the difference between the maximum value SSADmax and the minimum value SSADmin of the final sum SSAD of the dissimilarities is smaller than a certain threshold value C, and either of them is detected. If the case is detected, it means that an object outside the measurement range may have been erroneously detected, so the process proceeds to step S4, and the reliability of the measurement distance is low, for example, zero. , To the reliability output unit 98.

【0125】上記いずれの場合にも該当しなければ、正
常な距離計測が行われたと判断され、処理はステップS5
へ進み、第1の実施形態で説明したような方法で、計測
距離の信頼度が計算されて、信頼度出力部98へ出力さ
れる。
If neither of the above cases applies, it is determined that normal distance measurement has been performed, and the process proceeds to step S5.
Then, the reliability of the measured distance is calculated by the method described in the first embodiment, and is output to the reliability output unit 98.

【0126】図12と図13は、上記のステップS2とS3
で計測範囲外の物体の誤検知の可能性があると判断され
る例を示している。
12 and 13 show steps S2 and S3 above.
Shows an example in which it is determined that there is a possibility of false detection of an object outside the measurement range.

【0127】図12に示すように、相違度の最終合計の
最小値SSADminが所定の閾値Bより大きい場合、計測範囲
外の物体の誤検知の可能性がある。よって、計測距離Z
の信頼度として零値が出力される。
As shown in FIG. 12, when the minimum value SSADmin of the final sum of the dissimilarities is larger than the predetermined threshold value B, an object outside the measurement range may be erroneously detected. Therefore, the measurement distance Z
A zero value is output as the reliability of.

【0128】また、図13に示すように、相違度の最終
合計の最大値SSADmaxと最小値SSADminの差 (SSAD30−SS
AD33)が所定の閾値Cより小さい場合にも、計測範囲外の
物体の誤検知の可能性がある。よって、計測距離Zの信
頼度として零値が出力される。
Further, as shown in FIG. 13, the difference between the maximum value SSADmax and the minimum value SSADmin of the final sum of the dissimilarity (SSAD 30 −SS
Even if AD 33 ) is smaller than the predetermined threshold value C, there is a possibility of false detection of an object outside the measurement range. Therefore, a zero value is output as the reliability of the measurement distance Z.

【0129】この実施形態によれば、各画素毎に、計測
範囲外の物体の誤検知の可能性があるか否かが出力され
た信頼度に現れるので、出力された距離画像を使用する
際、その誤検知の可能性のある計測距離を除外するなど
して、この問題に対処することができる。
According to this embodiment, whether or not there is a possibility of erroneous detection of an object outside the measurement range appears for each pixel in the output reliability, so that when using the output distance image. It is possible to deal with this problem by excluding the measurement distance that may cause the false detection.

【0130】3. オクルージョンの問題に対処した実
施形態 〔1〕 第8の実施形態 或るカメラペアにてオクルージョンが生じている場合、
そのオクル−ジョンが生じている画像部分については、
参照ウィンドウと比較ウィンドウの位置的に対応するペ
アの画素間の相違度がかなり大きい値になると考えられ
る。このことに鑑み、この実施形態は、まず、各カメラ
ペア毎にターゲット画素と対応候補画素との間の相違度
を求め、その相違度がかなり大きい場合には、そのカメ
ラペアでオクル−ジョンが発生しているとみなして、そ
のカメラペアは無視し、残りのカメラペアの相違度のみ
を用いて、まず、各画素毎に相違度のカメラ加算を行
い、最後に、カメラ加算された相違度のウインドウ加算
を行って相違度の最終合計を求める。
3. Embodiment for Addressing Occlusion Problem [1] Eighth Embodiment When occlusion occurs in a camera pair,
For the image part where the occlusion occurs,
It is considered that the degree of difference between the pixels of the pair that correspond in position to the reference window and the comparison window has a considerably large value. In view of this, in the present embodiment, first, the degree of difference between the target pixel and the corresponding candidate pixel is obtained for each camera pair, and if the degree of difference is considerably large, the occlusion occurs in the camera pair. Assuming that the camera pair has occurred, the camera pair is ignored, and only the dissimilarity of the remaining camera pairs is used. Window addition is performed to obtain the final total difference.

【0131】図14は、この実施形態において、対応点
探索で相違度の最終合計を計算する処理の流れを示す。
なお、対応点探索以外の処理については、従来技術と同
様であってもよいし、先述した第1〜第7の実施形態のど
れかと同様であってもよい。いずれにせよ、対応点探索
では、図14に示す手順で相違度の最終合計が計算され
る。
FIG. 14 shows the flow of processing for calculating the final sum of dissimilarities in the corresponding point search in this embodiment.
Note that the processing other than the corresponding point search may be the same as that of the conventional technique, or may be the same as that of any of the above-described first to seventh embodiments. In any case, in the corresponding point search, the final sum of dissimilarities is calculated by the procedure shown in FIG.

【0132】図14に示すように、ステップS11とS12
で、ターゲット画素(i,j)と仮定距離Znとが選ばれ
る。次に、ステップS13で、各カメラペアk毎に、選ば
れたターゲット画素(i,j)と仮定距離Znに対応する比
較画像内の対応点候補画素の画素値と、そのターゲット
画素(i,j)の画素値との間の相違度ADk(i,j,Zn)が計
算される。次に、ステップS14で、全てのカメラペアの
相違度ADk(i,j,Zn)の中で最大の相違度が得られたカ
メラペアが選ばれる。その選ばれたカメラは、そこでは
オクル−ジョンが発生しているとみなされて、無視され
る。次に、ステップS15で、無視されたカメラペアを除
いた残りのカメラペアに関して、参照ウィンドウ内の各
画素毎に、比較ウィンドウ内の対応する画素との相違度
が計算されてカメラ加算される。次に、ステップS16
で、参照ウィンドウ内の各画素毎の「カメラ加算された
相違度」がウィンドウ加算される。そのウィンドウ加算
の結果が、ステップS17で、そのターゲット画素(i,j)
についての仮定距離Znにおける「相違度の最終合計」SSAD
(i,j,Zn)として出力される。
As shown in FIG. 14, steps S11 and S12
, The target pixel (i, j) and the assumed distance Zn are selected. Next, in step S13, for each camera pair k, the pixel value of the corresponding point candidate pixel in the comparison image corresponding to the selected target pixel (i, j) and the assumed distance Zn and the target pixel (i, j The difference ADk (i, j, Zn) between the pixel value of j) and the pixel value of j) is calculated. Next, in step S14, the camera pair that has the largest difference among the difference ADk (i, j, Zn) of all camera pairs is selected. The chosen camera is considered there to be occluded and is ignored. Next, in step S15, for each of the remaining camera pairs excluding the ignored camera pair, the degree of difference from the corresponding pixel in the comparison window is calculated for each pixel in the reference window, and the camera addition is performed. Next, step S16
Then, the "camera-added difference degree" for each pixel in the reference window is window-added. The result of the window addition is the target pixel (i, j) in step S17.
"Final sum of dissimilarities" at the assumed distance Zn of
It is output as (i, j, Zn).

【0133】なお、上記ステップS14では、相違度ADk
(i,j,Zn)が最大のカメラペアを無視するという方法に
代えて、相違度ADk(i,j,Zn)が上位所定順位内に入っ
た所定数のカメラペアを無視するようにしてもよいし、
或るいは、相違度ADk(i,j,Zn)が所定の閾値以上にな
ったカメラペアを無視するようにしてもよい。無視する
カメラペアの数や閾値などは、計測する物体の種類や使
用するカメラの配置などを考慮して決めれば良い。例え
ば、9台のカメラが3×3マトリックス状に配置されて
いる場合、カメラペアは8つあるが、そのうち、3つの
カメラペアを無視して、残りの5つのカメラペアを用い
て相違度の最終合計を計算する、というようにである。
In step S14, the difference ADk
Instead of ignoring the camera pair with the largest (i, j, Zn), ignore the given number of camera pairs whose dissimilarity ADk (i, j, Zn) is in the upper predetermined order. Good
Alternatively, a camera pair whose dissimilarity ADk (i, j, Zn) is equal to or higher than a predetermined threshold may be ignored. The number of camera pairs to be ignored, the threshold value, and the like may be determined in consideration of the type of object to be measured and the arrangement of cameras to be used. For example, when 9 cameras are arranged in a 3 × 3 matrix, there are 8 camera pairs, but among them, 3 camera pairs are ignored, and the remaining 5 camera pairs are used to calculate the difference degree. Calculate the final sum, and so on.

【0134】従来技術では、ウインドウ加算された相違
度を用いてオクル−ジョンを検出するのに対し、本実施
形態では、ターゲット画素と対応候補画素との間の相違
度に基づいてオクル−ジョンを検出するため、ウィンド
ウ加算を行う前に、オクル−ジョンが発生している可能
性のあるカメラペアを除去することができる。そのた
め、本実施形態では、相違度の最終合計を計算する際、
画素毎の相違度のカメラ加算を行った後に、カメラ加算
された相違度のウィンドウ加算を行うことができる。結
果として、カメラ数が多い場合でもウインドウ加算の処
理は一回だけ行えば良いので、1つのウィンドウ加算回
路をもった簡単な回路で本実施形態は実現できる。
In the prior art, the occlusion is detected by using the window-added difference, whereas in the present embodiment, the occlusion is detected based on the difference between the target pixel and the corresponding candidate pixel. For detection, camera pairs that may have occluded can be removed before performing the window addition. Therefore, in the present embodiment, when calculating the final sum of dissimilarities,
After the camera addition of the dissimilarity for each pixel is performed, the window addition of the camera-added dissimilarity can be performed. As a result, even if the number of cameras is large, the window addition process needs to be performed only once, so that this embodiment can be realized by a simple circuit having one window addition circuit.

【0135】また、本実施形態によれば、オクル−ジョ
ンの問題が軽減されるので、オクル−ジョンが原因とな
る物体輪郭の膨らみの問題も軽減される。
Further, according to this embodiment, since the problem of occlusion is reduced, the problem of bulging of the object contour caused by occlusion is also reduced.

【0136】以上、本発明の実施形態を説明したが、こ
れは本発明の説明のための例示であり、この実施形態の
みに本発明の範囲を限定する趣旨ではない。従って、本
発明は、その要旨を逸脱することなく、他の様々な形態
で実施することが可能である。本発明は、プログラムさ
れた1台又はそれ以上のコンピュータを用いて実施する
こともできるし、専用ハードウェア回路を用いて実施す
ることもできるし、或いは、プログラムされたコンピュ
ータと専用ハードウェア回路との組み合わせを用いて実
施することもできる。
Although the embodiment of the present invention has been described above, this is merely an example for explaining the present invention, and the scope of the present invention is not limited to this embodiment. Therefore, the present invention can be implemented in various other modes without departing from the gist thereof. The present invention can be implemented using one or more programmed computers, can be implemented using dedicated hardware circuits, or can be programmed computers and dedicated hardware circuits. It is also possible to use a combination of

【図面の簡単な説明】[Brief description of drawings]

【図1】 本発明の第1の実施形態の構成を示すブロッ
ク図。
FIG. 1 is a block diagram showing a configuration of a first embodiment of the present invention.

【図2】 計測距離の信頼度の一例を説明する図。FIG. 2 is a diagram illustrating an example of reliability of measured distance.

【図3】 計測距離の信頼度の別の例を説明する図。FIG. 3 is a diagram illustrating another example of the reliability of the measured distance.

【図4】 本発明の第2の実施形態の構成を示すブロッ
ク図。
FIG. 4 is a block diagram showing a configuration of a second exemplary embodiment of the present invention.

【図5】 本発明の第3の実施形態の構成を示すブロッ
ク図。
FIG. 5 is a block diagram showing a configuration of a third exemplary embodiment of the present invention.

【図6】 本発明の第4の実施形態の構成を示すブロッ
ク図。
FIG. 6 is a block diagram showing a configuration of a fourth exemplary embodiment of the present invention.

【図7】 本発明の第5の実施形態の構成を示すブロッ
ク図。
FIG. 7 is a block diagram showing the configuration of a fifth embodiment of the present invention.

【図8】 本発明の第6の実施形態の構成を示すブロッ
ク図。
FIG. 8 is a block diagram showing a configuration of a sixth exemplary embodiment of the present invention.

【図9】 模様の偏り度合を計算するときに設定される
ウィンドウを示す図。
FIG. 9 is a diagram showing a window set when calculating the degree of deviation of a pattern.

【図10】 本発明の第7の実施形態の構成を示すブロ
ック図。
FIG. 10 is a block diagram showing a configuration of a seventh exemplary embodiment of the present invention.

【図11】 同実施形態における信頼度を計算する処理
を示すフローチャート。
FIG. 11 is a flowchart showing a process of calculating reliability in the embodiment.

【図12】 計測範囲外の物体の誤検知の可能性のある
例を示す図。
FIG. 12 is a diagram showing an example in which an object outside the measurement range may be erroneously detected.

【図13】 計測範囲外の物体の誤検知の可能性のある
別の例を示す図。
FIG. 13 is a diagram showing another example in which an object outside the measurement range may be erroneously detected.

【図14】 本発明の第8の実施形態において相違度の
最終合計を計算する処理を示すフローチャート。
FIG. 14 is a flowchart showing a process of calculating a final sum of dissimilarities in the eighth embodiment of the present invention.

【符号の説明】[Explanation of symbols]

1、11、31、51、71、91 基準画像入力部 2、12、32、52、72、92 比較画像入力部 3、13、14、38、55、73、74 画素選択部 6、19、20、35、51、56、79、80、96
対応点検索部 7、22、52、57、82、97 距離画像出力部 21、61 計測距離選択部 37 距離確定部 36、93 模様強度算出部 83 模様偏り算出部
1, 11, 31, 51, 71, 91 Reference image input section 2, 12, 32, 52, 72, 92 Comparative image input section 3, 13, 14, 38, 55, 73, 74 Pixel selection section 6, 19, 20, 35, 51, 56, 79, 80, 96
Corresponding point search unit 7, 22, 52, 57, 82, 97 Distance image output unit 21, 61 Measurement distance selection unit 37 Distance determination unit 36, 93 Pattern strength calculation unit 83 Pattern bias calculation unit

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.7 識別記号 FI テーマコート゛(参考) H04N 7/18 H04N 7/18 C (72)発明者 新保 哲也 神奈川県平塚市万田1200 株式会社小松製 作所研究所内 Fターム(参考) 2F065 AA04 AA06 BB05 DD03 DD04 FF05 JJ03 JJ05 JJ26 KK01 QQ07 QQ24 QQ25 QQ32 QQ36 QQ37 QQ39 UU05 5B057 BA13 CA08 CA12 CA13 CA16 CB12 CB13 CB16 DC02 DC22 DC33 5C054 AA01 CA04 CC02 EH07 FC15 FD02 GA00 HA05 5L096 AA06 AA09 CA05 CA24 DA02 FA66 GA02 GA17 HA07 JA18─────────────────────────────────────────────────── ─── Continuation of front page (51) Int.Cl. 7 identification code FI theme code (reference) H04N 7/18 H04N 7/18 C (72) Inventor Tetsuya Shinbo 1200 Manda, Hiratsuka-shi, Kanagawa Product made by Komatsu Co., Ltd. Tokoro Institute in the F-term (reference) 2F065 AA04 AA06 BB05 DD03 DD04 FF05 JJ03 JJ05 JJ26 KK01 QQ07 QQ24 QQ25 QQ32 QQ36 QQ37 QQ39 UU05 5B057 BA13 CA08 CA12 CA13 CA16 CB12 CB13 CB16 DC02 DC22 DC33 5C054 AA01 CA04 CC02 EH07 FC15 FD02 GA00 HA05 5L096 AA06 AA09 CA05 CA24 DA02 FA66 GA02 GA17 HA07 JA18

Claims (14)

【特許請求の範囲】[Claims] 【請求項1】 1つの基準カメラからの基準画像(1)
と少なくとも1つの比較カメラからの比較画像(2)と
を使用して対応点探索を行うステレオ画像処理装置にお
いて、 基準画像及び比較画像の少なくとも一方から、所定の画
素値範囲外にある画素値を実質的に持つ画素を除外し、
残りの画素を選択する画素選択部(3)と、 前記基準画像内の各ターゲット画素毎に、様々な仮定距
離の各々について、前記基準画像と前記比較画像との間
のパターンマッチングを、前記画素選択部により選択さ
れた画素を使用して行ない、それにより、各ターゲット
画素の距離を計測する対応点探索部(6)とを備えたス
テレオ画像処理装置。
1. A reference image (1) from one reference camera.
In a stereo image processing device which performs a corresponding point search by using a comparison image (2) from at least one comparison camera, a pixel value outside a predetermined pixel value range is detected from at least one of the reference image and the comparison image. Excluding the pixels that you have,
A pixel selection unit (3) that selects the remaining pixels, and pattern matching between the reference image and the comparison image for each of the various assumed distances for each target pixel in the reference image. A stereo image processing apparatus comprising: a corresponding point search unit (6) for measuring the distance of each target pixel by using the pixel selected by the selection unit.
【請求項2】 異なる画素値範囲をもつ複数の画素選択
部(13,14)と、 前記複数の画素選択部により選択された画素をそれぞれ
使用して、各ターゲット画素の距離をそれぞれ計測する
と共に、計測された距離について信頼度を算出する複数
の対応点探索部(19、20)と、 各ターゲット画素毎に、前記複数の対応点探索部により
計測された複数の距離と、前記複数の距離について算出
された信頼度とに基づいて、最終的な距離を決定して出
力する計測距離決定部(21)とを更に備えた請求項1
記載のステレオ画像処理装置。
2. A plurality of pixel selection units (13, 14) having different pixel value ranges, and pixels respectively selected by the plurality of pixel selection units are used to measure the distance of each target pixel. A plurality of corresponding point search units (19, 20) for calculating the reliability of the measured distance, a plurality of distances measured by the plurality of corresponding point search units for each target pixel, and a plurality of the distances. The measurement distance determination unit (21) for determining and outputting a final distance based on the reliability calculated for
The stereo image processing device described.
【請求項3】 前記基準画像に含まれる画素値の範囲を
判定する画素値判定部(23)を更に備え、 前記計測距離決定部(21)は、前記複数の距離と、前
記複数の距離について算出された信頼度と、前記画素値
判定部(23)からの画素値範囲とから、前記最終的な
距離を決定する請求項2記載のステレオ画像処理装置。
3. A pixel value determination unit (23) for determining a range of pixel values included in the reference image, wherein the measured distance determination unit (21) determines the plurality of distances and the plurality of distances. The stereo image processing device according to claim 2, wherein the final distance is determined from the calculated reliability and the pixel value range from the pixel value determination unit (23).
【請求項4】 1つの基準カメラからの基準画像(3
1)と少なくとも1つの比較カメラからの比較画像(3
2)とを使用して対応点探索を行うステレオ画像処理装
置において、 基準画像内の各ターゲット画素毎に、様々な仮定距離に
おける前記基準画像と前記比較画像との間のパターンマ
ッチングを行なうことで、各ターゲット画素の距離を計
測する第1の対応点探索部(35)と、 前記基準画像の模様強度を出力する模様強度算出部(3
6)と、 前記模様強度算出部(36)から出力される模様強度に
基づいて、前記第1の対応点探索部(35)により計測
された各ターゲット画素の距離について、それを確定さ
せるか否かを判断する距離確定判断部(37)と、 前記基準画像から、前記距離確定判断部(37)によっ
て距離が確定された画素を除外し、前記比較画像から、
前記基準画像から除外された画素に前記確定された距離
で対応する画素を除外し、前記基準画像及び前記比較画
像から残りの画素を選択する画素選択部(38)と、 前記基準画像内の少なくとも距離が未確定の各ターゲッ
ト画素毎に、様々な仮定距離の各々ついて、前記基準画
像と前記比較画像との間のパターンマッチングを、前記
画素選択部により選択された画素を使用して行ない、そ
れにより、前記距離が未確定の各ターゲット画素の距離
を計測する第2の対応点探索部(41)と、を備えたス
テレオ画像処理装置。
4. A reference image (3 from one reference camera).
1) and comparison images from at least one comparison camera (3
2) In a stereo image processing device that searches for corresponding points using and, by performing pattern matching between the reference image and the comparison image at various assumed distances for each target pixel in the reference image. , A first corresponding point searching unit (35) for measuring the distance of each target pixel, and a pattern intensity calculating unit (3) for outputting the pattern intensity of the reference image.
6) and whether or not to fix the distance of each target pixel measured by the first corresponding point searching unit (35) based on the pattern strength output from the pattern strength calculating unit (36). A distance determination determination unit (37) that determines whether or not the pixel whose distance has been determined by the distance determination determination unit (37) is excluded from the reference image, and from the comparison image,
A pixel selecting unit (38) for excluding pixels corresponding to the pixels excluded from the reference image at the determined distance and selecting the remaining pixels from the reference image and the comparison image; Pattern matching between the reference image and the comparison image is performed using the pixels selected by the pixel selection unit for each of the various assumed distances for each target pixel whose distance is undetermined. The second corresponding point searching unit (41) for measuring the distance of each target pixel whose distance is undetermined, according to the stereo image processing apparatus.
【請求項5】 1つの基準カメラからの基準画像(5
1)と少なくとも1つの比較カメラからの比較画像(5
2)とを使用して対応点探索を行うステレオ画像処理装
置において、 基準画像内に各ターゲット画素について参照ウィンドウ
を設定し、比較画像内に様々な仮定距離の各々にて前記
参照ウィンドウに対応する比較ウィンドウを設定し、前
記参照ウィンドウ内の画素の画素値に基づいて画素値範
囲を設定し、前記比較ウィンドウから、前記設定された
画素値範囲外の画素値を実質的に持つ画素を除外し、残
りの画素を選択する画素選択部(55)と、 前記基準画像内の各ターゲット画素毎に、前記様々な仮
定距離の各々について、前記参照ウィンドウと前記比較
ウィンドウとの間のパターンマッチングを、前記比較ウ
ィンドウ内の選択された画素と、前記選択された画素に
対応する前記参照ウィンドウ内の画素とを使用して行な
い、それにより、各ターゲット画素の距離を計測する対
応点探索部(56)とを備えたステレオ画像処理装置。
5. A reference image from one reference camera (5
1) and comparison images from at least one comparison camera (5
2) In a stereo image processing apparatus that performs a corresponding point search using and, a reference window is set for each target pixel in a standard image, and the reference window is set at each of various assumed distances in a comparison image. A comparison window is set, a pixel value range is set based on pixel values of pixels in the reference window, and pixels having substantially pixel values outside the set pixel value range are excluded from the comparison window. , A pixel selection unit (55) that selects the remaining pixels, and pattern matching between the reference window and the comparison window for each of the various assumed distances for each target pixel in the reference image, Using the selected pixel in the comparison window and the pixel in the reference window corresponding to the selected pixel, thereby , The stereo image processing apparatus including a corresponding point searching unit (56) for measuring the distance of each target pixel.
【請求項6】 1つの基準カメラからの基準画像(7
1)と少なくとも1つの比較カメラからの比較画像(7
2)とを使用して対応点探索を行うステレオ画像処理装
置において、 基準画像及び比較画像の少なくとも一方から、第1の画
素値範囲外にある画素値を実質的に持つ画素を除外し、
残りの画素を選択する第1の画素選択部(73)と、 前記基準画像内の各ターゲット画素毎に、様々な仮定距
離の各々について、前記基準画像と前記比較画像との間
のパターンマッチングを、前記第1の画素選択部により
選択された画素を使用して行ない、それにより、各ター
ゲット画素の距離を計測する第1の対応点探索部(7
9)と、 前記基準画像及び前記比較画像の少なくとも一方から、
前記第1の画素値範囲よりも狭い第2の画素値範囲外にあ
る画素値を実質的に持つ画素を除外し、残りの画素を選
択する第2の画素選択部(74)と、 前記基準画像内の各ターゲット画素毎に、様々な仮定距
離の各々について、前記基準画像と前記比較画像との間
のパターンマッチングを、前記第2の画素選択部により
選択された画素を使用して行ない、それにより、各ター
ゲット画素の距離を計測する第2の対応点探索部(8
0)と、 前記基準画像の模様の偏り度合を出力する模様偏り算出
部(83)と、 模様偏り算出部(83)からの出力と、前記第1の対応
点探索部(79)で計測された距離と、前記第2の対応
点探索部(80)で計測された距離とに基づいて、最終
的な距離を決める計測距離決定部(81)とを備えたス
テレオ画像処理装置。
6. A reference image (7) from one reference camera.
1) and comparison images from at least one comparison camera (7
2) In a stereo image processing apparatus that performs a corresponding point search using and, excludes pixels having pixel values outside the first pixel value range from at least one of the reference image and the comparison image,
A first pixel selection unit (73) for selecting the remaining pixels, and pattern matching between the reference image and the comparison image for each of various target distances for each target pixel in the reference image. , A first corresponding point search unit (7) for measuring the distance of each target pixel by using the pixels selected by the first pixel selection unit.
9) and from at least one of the reference image and the comparison image,
A second pixel selection unit (74) for excluding pixels substantially having a pixel value outside the second pixel value range narrower than the first pixel value range and selecting the remaining pixels; Pattern matching between the reference image and the comparison image for each of the various assumed distances for each target pixel in the image using the pixels selected by the second pixel selection unit; As a result, a second corresponding point search unit (8) for measuring the distance of each target pixel
0), the pattern bias calculation unit (83) that outputs the pattern bias degree of the reference image, the output from the pattern bias calculation unit (83), and the first corresponding point search unit (79) A stereo image processing apparatus including a measured distance determining unit (81) that determines a final distance based on the measured distance and the distance measured by the second corresponding point searching unit (80).
【請求項7】 1つの基準カメラからの基準画像(9
1)と少なくとも1つの比較カメラからの比較画像(9
2)とを使用して対応点探索を行うステレオ画像処理装
置において、 前記基準画像内の各ターゲット画素毎に、様々な仮定距
離の各々について、前記基準画像と前記比較画像との間
のパターンマッチングを行ない、それにより、各ターゲ
ット画素の距離を計測する対応点探索部(96)と、 前記計測された距離について信頼度を出力する信頼度出
力部(98)とを備え、 前記計測された距離についてのパターンマッチングの結
果値に応じて(S2)、又は、前記計測された距離につい
てのパターンマッチングの結果値と他の仮定距離につい
ての前記パターンマッチングの結果値中の最も劣る値と
の間の差に応じて(S3)、前記計測された距離について
の信頼度の値を変える(S5,S4)ように構成されたステ
レオ画像処理装置。
7. A reference image (9) from one reference camera.
1) and comparison images from at least one comparison camera (9
2) In a stereo image processing device that performs a corresponding point search using and, for each target pixel in the reference image, for each of various assumed distances, pattern matching between the reference image and the comparison image. And a reliability output unit (98) for outputting a reliability for the measured distance, and the measured distance is measured by the corresponding point searching unit (96) for measuring the distance of each target pixel. Depending on the result value of the pattern matching for (S2), or between the result value of the pattern matching for the measured distance and the poorest value among the result values of the pattern matching for other assumed distances. A stereo image processing apparatus configured to change the reliability value for the measured distance (S5, S4) according to the difference (S3).
【請求項8】 1つの基準カメラからの基準画像と複数
の比較カメラからの複数の比較画像とを使用して対応点
探索を行うステレオ画像処理装置において、 様々な仮定距離の各々について、前記基準画像中のター
ゲット画素と各比較画像中の対応候補画素との間の相違
度に基づいて、前記複数の比較カメラの中から、オクル
−ジョンが生じている可能性のある一部の比較カメラを
選び無視する手段(S11〜S14)と、 様々な仮定距離の各々について、前記基準画像に設定さ
れた参照ウィンドウ内の各画素毎に、無視された比較カ
メラを除く残りの比較カメラからの比較画像の各々に設
定された比較ウィンドウ内の対応する画素との間の相違
度を求め、各画素毎に求めた前記相違度を、前記残りの
比較カメラの全部についてカメラ加算する手段(S15)
と、 カメラ加算された相違度を、前記参照ウィンドウ内の全
画素についてウィンドウ加算して、相違度の最終合計を
求める手段(S16,S17)と、 様々な仮定距離の各々について求めた前記相違度の最終
合計に基づいて、前記ターゲット画素の距離を計測する
手段とを備えたステレオ画像処理装置。
8. A stereo image processing apparatus which performs a corresponding point search using a reference image from one reference camera and a plurality of comparison images from a plurality of comparison cameras, wherein the reference is obtained for each of various assumed distances. Based on the degree of dissimilarity between the target pixel in the image and the corresponding candidate pixel in each comparison image, some comparison cameras in which occlusion may occur are selected from among the plurality of comparison cameras. Means for selecting and ignoring (S11 to S14), and for each of the various assumed distances, for each pixel in the reference window set in the standard image, comparison images from the remaining comparison cameras excluding the ignored comparison cameras. Means for obtaining the degree of difference between each pixel and the corresponding pixel in the comparison window, and adding the obtained degree of difference for each pixel to all the remaining comparison cameras (S15
And a means for window-adding the camera-added dissimilarity for all pixels in the reference window to obtain a final sum of dissimilarities, and the dissimilarity obtained for each of various assumed distances. And a means for measuring the distance of the target pixel based on the final sum of.
【請求項9】 1つの基準カメラからの基準画像(1)
と少なくとも1つの比較カメラからの比較画像(2)と
を使用して対応点探索を行うステレオ画像処理方法にお
いて、 基準画像及び比較画像の少なくとも一方から、所定の画
素値範囲外にある画素値を実質的に持つ画素を除外し、
残りの画素を選択する画素選択ステップ(3)と、 前記基準画像内の各ターゲット画素毎に、様々な仮定距
離の各々について、前記基準画像と前記比較画像との間
のパターンマッチングを、前記画素選択ステップで選択
された画素を使用して行ない、それにより、各ターゲッ
ト画素の距離を計測する対応点探索ステップ(6)とを
備えたステレオ画像処理方法。
9. Reference image (1) from one reference camera.
And a comparison image (2) from at least one comparison camera, a stereo image processing method for searching for corresponding points, wherein pixel values outside a predetermined pixel value range are extracted from at least one of the reference image and the comparison image. Excluding the pixels that you have,
A pixel selection step (3) of selecting the remaining pixels, and pattern matching between the reference image and the comparison image for each of various target distances for each target pixel in the reference image, A stereo image processing method, comprising: using the pixels selected in the selection step, thereby measuring a distance between each target pixel and a corresponding point searching step (6).
【請求項10】 1つの基準カメラからの基準画像(3
1)と少なくとも1つの比較カメラからの比較画像(3
2)とを使用して対応点探索を行うステレオ画像処理方
法において、 基準画像内の各ターゲット画素毎に、様々な仮定距離に
おける前記基準画像と前記比較画像との間のパターンマ
ッチングを行なうことで、各ターゲット画素の距離を計
測する第1の対応点探索ステップ(35)と、 前記基準画像の模様強度を出力する模様強度算出ステッ
プ(36)と、 前記模様強度算出ステップ(36)から出力される模様
強度に基づいて、前記第1の対応点探索ステップ(3
5)により計測された各ターゲット画素の距離につい
て、それを確定させるか否かを判断する距離確定判断ス
テップ(37)と、 前記基準画像から、前記距離確定判断ステップ(37)
によって距離が確定された画素を除外し、前記比較画像
から、前記基準画像から除外された画素に前記確定され
た距離で対応する画素を除外し、前記基準画像及び前記
比較画像から残りの画素を選択する画素選択ステップ
(38)と、 前記基準画像内の少なくとも距離が未確定の各ターゲッ
ト画素毎に、様々な仮定距離の各々ついて、前記基準画
像と前記比較画像との間のパターンマッチングを、前記
画素選択ステップで選択された画素を使用して行ない、
それにより、前記距離が未確定の各ターゲット画素の距
離を計測する第2の対応点探索ステップ(41)と、を
備えたステレオ画像処理方法。
10. A reference image (3 from one reference camera).
1) and comparison images from at least one comparison camera (3
2) In the stereo image processing method for searching corresponding points using and, by performing pattern matching between the reference image and the comparison image at various assumed distances for each target pixel in the reference image. , A first corresponding point search step (35) for measuring the distance of each target pixel, a pattern intensity calculation step (36) for outputting the pattern intensity of the reference image, and a pattern intensity calculation step (36) for output. Based on the pattern strength, the first corresponding point searching step (3
Regarding the distance of each target pixel measured in 5), a distance confirmation determination step (37) of determining whether or not to confirm the distance, and a distance determination determination step (37) from the reference image.
The pixels whose distances have been determined by are excluded from the comparison image, the pixels corresponding to the pixels excluded from the reference image at the determined distance are excluded, and the remaining pixels are removed from the reference image and the comparison image. A pixel selection step of selecting (38), and pattern matching between the reference image and the comparison image for each of various assumed distances for each target pixel of which at least distance is undetermined in the reference image, Using the pixels selected in the pixel selection step,
Thereby, a second corresponding point searching step (41) of measuring the distance of each target pixel whose distance is undetermined, is provided.
【請求項11】 1つの基準カメラからの基準画像(5
1)と少なくとも1つの比較カメラからの比較画像(5
2)とを使用して対応点探索を行うステレオ画像処理方
法において、 基準画像内に各ターゲット画素について参照ウィンドウ
を設定し、前記参照ウィンドウ内の画素の画素値に基づ
いて画素値範囲を設定する画素値範囲設定ステップ(5
5)と、 比較画像内に様々な仮定距離の各々にて前記参照ウィン
ドウに対応する比較ウィンドウを設定し、前記比較ウィ
ンドウから、前記設定された画素値範囲外の画素値を実
質的に持つ画素を除外し、残りの画素を選択する画素選
択ステップ(55)と、 前記基準画像内の各ターゲット画素毎に、前記様々な仮
定距離の各々について、前記参照ウィンドウと前記比較
ウィンドウとの間のパターンマッチングを、前記比較ウ
ィンドウ内の選択された画素と、前記選択された画素に
対応する前記参照ウィンドウ内の画素とを使用して行な
い、それにより、各ターゲット画素の距離を計測する対
応点探索ステップ(56)とを備えたステレオ画像処理
方法。
11. A reference image from one reference camera (5
1) and comparison images from at least one comparison camera (5
2) In a stereo image processing method for performing a corresponding point search using and, a reference window is set for each target pixel in a standard image, and a pixel value range is set based on pixel values of pixels in the reference window. Pixel value range setting step (5
5) and setting a comparison window corresponding to the reference window at each of various assumed distances in the comparison image, and pixels having substantially pixel values outside the set pixel value range from the comparison window. And selecting the remaining pixels, a pattern between the reference window and the comparison window for each of the various assumed distances for each target pixel in the reference image. Matching is performed using the selected pixel in the comparison window and the pixel in the reference window corresponding to the selected pixel, thereby finding a corresponding point for measuring the distance of each target pixel. (56) A stereo image processing method comprising:
【請求項12】 1つの基準カメラからの基準画像(9
1)と少なくとも1つの比較カメラからの比較画像(9
2)とを使用して対応点探索を行うステレオ画像処理方
法において、 前記基準画像内の各ターゲット画素毎に、様々な仮定距
離の各々について、前記基準画像と前記比較画像との間
のパターンマッチングを行ない、それにより、各ターゲ
ット画素の距離を計測する対応点探索ステップ(96)
と、 前記計測された距離について信頼度を出力する信頼度出
力ステップ(98)とを備え、 前記信頼度出力ステップ(98)が、前記計測された距
離についてのパターンマッチングの結果値に応じて(S
2)、又は、前記計測された距離についてのパターンマ
ッチングの結果値と他の仮定距離についての前記パター
ンマッチングの結果値中の最も劣る値との間の差に応じ
て(S3)、前記計測された距離についての信頼度の値を
変えるステップ(S5,S4)を有するステレオ画像処理方
法。
12. A reference image (9) from one reference camera.
1) and comparison images from at least one comparison camera (9
2) A stereo image processing method for performing corresponding point search using and, for each target pixel in the reference image, for each of various assumed distances, pattern matching between the reference image and the comparison image. Corresponding point search step (96) for measuring the distance of each target pixel.
And a reliability output step (98) for outputting a reliability for the measured distance, the reliability output step (98) depending on a result value of the pattern matching for the measured distance ( S
2), or depending on the difference between the pattern matching result value for the measured distance and the poorest value among the pattern matching result values for other assumed distances (S3), the measured A stereo image processing method having steps (S5, S4) of changing a reliability value for a distance.
【請求項13】 1つの基準カメラからの基準画像と複
数の比較カメラからの複数の比較画像とを使用して対応
点探索を行うステレオ画像処理方法において、 様々な仮定距離の各々について、前記基準画像中のター
ゲット画素と各比較画像中の対応候補画素との間の相違
度に基づいて、前記複数の比較カメラの中から、オクル
−ジョンが生じている可能性のある一部の比較カメラを
選び無視するステップ(S11〜S14)と、 様々な仮定距離の各々について、前記基準画像に設定さ
れた参照ウィンドウ内の各画素毎に、無視された比較カ
メラを除く残りの比較カメラからの比較画像の各々に設
定された比較ウィンドウ内の対応する画素との間の相違
度を求め、各画素毎に求めた前記相違度を、前記残りの
比較カメラの全部についてカメラ加算するステップ(S1
5)と、 カメラ加算された相違度を、前記参照ウィンドウ内の全
画素についてウィンドウ加算して、相違度の最終合計を
求めるステップ(S16,S17)と、 様々な仮定距離の各々について求めた前記相違度の最終
合計に基づいて、前記ターゲット画素の距離を計測する
ステップとを備えたステレオ画像処理方法。
13. A stereo image processing method for searching corresponding points using a reference image from one reference camera and a plurality of comparison images from a plurality of comparison cameras, wherein the reference is obtained for each of various assumed distances. Based on the degree of dissimilarity between the target pixel in the image and the corresponding candidate pixel in each comparison image, some comparison cameras in which occlusion may occur are selected from among the plurality of comparison cameras. Steps (S11 to S14) of selecting and ignoring, and for each of the various assumed distances, for each pixel in the reference window set in the reference image, comparison images from the remaining comparison cameras except the ignored comparison camera. The difference between each pixel and the corresponding pixel in the comparison window is calculated, and the difference calculated for each pixel is added to all remaining comparison cameras by camera addition. -Up (S1
5), the step of adding the camera-added dissimilarity to all pixels in the reference window to obtain the final sum of the dissimilarity (S16, S17), and Measuring the distance of the target pixel based on the final sum of the dissimilarities.
【請求項14】 1つの基準カメラからの基準画像
(1)と少なくとも1つの比較カメラからの比較画像
(2)とを使用して対応点探索を行うステレオ画像処理
方法を、コンピュータに実行させるためのコンピュータ
プログラムにおいて、 前記ステレオ画像処理方法が、 基準画像及び比較画像の少なくとも一方から、所定の画
素値範囲外にある画素値を実質的に持つ画素を除外し、
残りの画素を選択する画素選択ステップ(3)と、 前記基準画像内の各ターゲット画素毎に、様々な仮定距
離の各々について、前記基準画像と前記比較画像との間
のパターンマッチングを、前記画素選択ステップで選択
された画素を使用して行ない、それにより、各ターゲッ
ト画素の距離を計測する対応点探索ステップ(6)とを
備えたステレオ画像処理方法のためのコンピュータプロ
グラム。
14. A stereo image processing method for causing a computer to perform a corresponding point search using a reference image (1) from one reference camera and a comparison image (2) from at least one comparison camera. In the computer program of, the stereo image processing method, from at least one of the reference image and the comparison image, excludes pixels having substantially a pixel value outside a predetermined pixel value range,
A pixel selection step (3) of selecting the remaining pixels, and pattern matching between the reference image and the comparison image for each of various target distances for each target pixel in the reference image, A computer program for a stereo image processing method, comprising: using the pixels selected in the selection step, thereby finding the distance of each target pixel (6).
JP2001351732A 2001-11-16 2001-11-16 Stereo image processor Pending JP2003150940A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001351732A JP2003150940A (en) 2001-11-16 2001-11-16 Stereo image processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001351732A JP2003150940A (en) 2001-11-16 2001-11-16 Stereo image processor

Publications (1)

Publication Number Publication Date
JP2003150940A true JP2003150940A (en) 2003-05-23

Family

ID=19164006

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001351732A Pending JP2003150940A (en) 2001-11-16 2001-11-16 Stereo image processor

Country Status (1)

Country Link
JP (1) JP2003150940A (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007047610A1 (en) * 2005-10-14 2007-04-26 Microsoft Corporation Occlusion handling in stereo imaging
JP2007172500A (en) * 2005-12-26 2007-07-05 Fuji Heavy Ind Ltd Data processor
JP2009285997A (en) * 2008-05-29 2009-12-10 Noritsu Koki Co Ltd Image defect detecting method, and image forming apparatus
JP2010225092A (en) * 2009-03-25 2010-10-07 Fujitsu Ltd Image processor and image processing system
CN101344967B (en) * 2008-09-02 2011-03-16 西北工业大学 Detection method for small mobile objective in astronomical image
JP2011095131A (en) * 2009-10-30 2011-05-12 Dainippon Screen Mfg Co Ltd Image processing method
JP2012073813A (en) * 2010-09-29 2012-04-12 National Institute Of Information & Communication Technology Depth estimation device, depth estimation method, and depth estimation program
JP2012222382A (en) * 2011-04-04 2012-11-12 Fujitsu Semiconductor Ltd Filtering processing circuit and matching circuit having the same
JP2015106290A (en) * 2013-11-29 2015-06-08 キヤノン株式会社 Image processing apparatus, image processing method, and program
JP2015152417A (en) * 2014-02-14 2015-08-24 株式会社ソシオネクスト Object recognition device, object recognition method, and object recognition program
KR20160112226A (en) * 2015-03-18 2016-09-28 삼성전자주식회사 Image Process Device and Denoising System Having the Same
US11361466B2 (en) 2018-11-30 2022-06-14 Casio Computer Co., Ltd. Position information acquisition device, position information acquisition method, recording medium, and position information acquisition system
JP2022130613A (en) * 2020-10-27 2022-09-06 株式会社ニコン Detection device, detection method, information processing device, and processing program
US11682134B2 (en) 2016-02-26 2023-06-20 Nikon Corporation Object detection device, method, information processing device, and storage medium calculating reliability information of detected image data for object shape determination

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007047610A1 (en) * 2005-10-14 2007-04-26 Microsoft Corporation Occlusion handling in stereo imaging
US8300085B2 (en) 2005-10-14 2012-10-30 Microsoft Corporation Occlusion handling in stereo imaging
JP2007172500A (en) * 2005-12-26 2007-07-05 Fuji Heavy Ind Ltd Data processor
JP2009285997A (en) * 2008-05-29 2009-12-10 Noritsu Koki Co Ltd Image defect detecting method, and image forming apparatus
CN101344967B (en) * 2008-09-02 2011-03-16 西北工业大学 Detection method for small mobile objective in astronomical image
JP2010225092A (en) * 2009-03-25 2010-10-07 Fujitsu Ltd Image processor and image processing system
JP2011095131A (en) * 2009-10-30 2011-05-12 Dainippon Screen Mfg Co Ltd Image processing method
JP2012073813A (en) * 2010-09-29 2012-04-12 National Institute Of Information & Communication Technology Depth estimation device, depth estimation method, and depth estimation program
JP2012222382A (en) * 2011-04-04 2012-11-12 Fujitsu Semiconductor Ltd Filtering processing circuit and matching circuit having the same
JP2015106290A (en) * 2013-11-29 2015-06-08 キヤノン株式会社 Image processing apparatus, image processing method, and program
JP2015152417A (en) * 2014-02-14 2015-08-24 株式会社ソシオネクスト Object recognition device, object recognition method, and object recognition program
KR20160112226A (en) * 2015-03-18 2016-09-28 삼성전자주식회사 Image Process Device and Denoising System Having the Same
KR102346961B1 (en) * 2015-03-18 2022-01-04 삼성전자주식회사 Image Process Device and Denoising System Having the Same
US11682134B2 (en) 2016-02-26 2023-06-20 Nikon Corporation Object detection device, method, information processing device, and storage medium calculating reliability information of detected image data for object shape determination
US11361466B2 (en) 2018-11-30 2022-06-14 Casio Computer Co., Ltd. Position information acquisition device, position information acquisition method, recording medium, and position information acquisition system
US11816861B2 (en) 2018-11-30 2023-11-14 Casio Computer Co., Ltd. Position information acquisition device, position information acquisition method, recording medium, and position information acquisition system
JP2022130613A (en) * 2020-10-27 2022-09-06 株式会社ニコン Detection device, detection method, information processing device, and processing program

Similar Documents

Publication Publication Date Title
US7317474B2 (en) Obstacle detection apparatus and method
US7471809B2 (en) Method, apparatus, and program for processing stereo image
US6865289B1 (en) Detection and removal of image occlusion errors
US8054881B2 (en) Video stabilization in real-time using computationally efficient corner detection and correspondence
JP3054681B2 (en) Image processing method
JP2003150940A (en) Stereo image processor
JP2007164816A (en) Vector correlation system for automatically locating pattern in image
US20050002559A1 (en) Depth measuring method and depth measuring apparatus
US20060152584A1 (en) Method for calculating a transform coordinate on a second video of an object having a target coordinate on a first video and related operation process and video surveillance system
JP2005309746A (en) Method and program for tracking moving body, recording medium therefor, and moving body tracking device
US6480620B1 (en) Method of and an apparatus for 3-dimensional structure estimation
JP2000121319A (en) Image processor, image processing method and supply medium
JP2000331148A (en) Obstacle detector
US20130331145A1 (en) Measuring system for mobile three dimensional imaging system
WO2021128242A1 (en) Picture target point correction method, apparatus and device, and storage medium
JP2802034B2 (en) 3D object measurement method
JPH11125522A (en) Image processor and method
JP2001012946A (en) Dynamic image processor and processing method
JP2807137B2 (en) 3D shape detection method
US11516448B2 (en) Method and apparatus for compensating projection images
JP2002247604A (en) Parallax amount measuring device
JPH0721475A (en) Intruder monitoring device
JP2000149017A (en) Image processing device, method and supply medium thereof
JPH096947A (en) Object tracking device
JP2015170205A (en) Feature amount generation device, feature amount generation method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040318

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070305

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070307

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070702