JPH10334244A - Stereo matching device - Google Patents

Stereo matching device

Info

Publication number
JPH10334244A
JPH10334244A JP9161891A JP16189197A JPH10334244A JP H10334244 A JPH10334244 A JP H10334244A JP 9161891 A JP9161891 A JP 9161891A JP 16189197 A JP16189197 A JP 16189197A JP H10334244 A JPH10334244 A JP H10334244A
Authority
JP
Japan
Prior art keywords
pixels
image
pixel
stereo
matching
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
JP9161891A
Other languages
Japanese (ja)
Inventor
Katsumasa Onda
勝政 恩田
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP9161891A priority Critical patent/JPH10334244A/en
Publication of JPH10334244A publication Critical patent/JPH10334244A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To execute stereo matching at a high speed by compositing stereoscopic images and writing the composited image to a memory corresponding to each horizontal line to attain evaluation of coincidence of a small rectangular area for each clock with a simple circuit configuration. SOLUTION: Pixels of a left image 101 and a right image 102 are composited between corresponding pixels in a way that high-order 8 bits are pixels for the right image and low-order 8 bits are pixels for the left image as 16-bit pixels and written in memories M0 -M3 . Data 104-107 read sequentially synchronously with a clock signal are given to linear matching circuits 123-126 and a difference absolute sum of 4 pixels in the horizontal direction is calculated synchronously with the clock signal. The difference absolute sum is added by adders 128-130 and a difference absolute sum 114 of all pixels in the small rectangular area is obtained for each clock. A minimum value/parallax detection circuit 131 detects/reserves the minimum difference absolute sum and the parallax in a retrieval range and outputs a result 115 at the end of retrieval.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、ステレオ画像間の
対応付け(ステレオマッチング)を高速で行う高速ステ
レオマッチング装置に関するものである。
[0001] 1. Field of the Invention [0002] The present invention relates to a high-speed stereo matching apparatus for performing high-speed matching (stereo matching) between stereo images.

【0002】[0002]

【従来の技術】ステレオ画像による3次元計測(以下、
「ステレオ画像計測」という)の原理について図9を用
いて説明する。図9において、実空間を表す座標として
(x,y,z)を用い、画像面(カメラの撮像面)上の
位置を表す座標として(X,Y)を用いる。ただし、2
台のカメラ8L、8Rを区別するために、左カメラの画
像面上の位置を表す座標として(XL、YL)を用い、右
カメラの画像面上の位置を表す座標として(XR、YR
を用いる。x軸とXL軸、x軸とXR軸、y軸とYL軸、
y軸とYR軸は各々互いに平行であり、z軸は2台のカ
メラの光軸にともに平行であるとする。実空間座標系の
原点を左右カメラの投影中心の中点にとり、投影中心間
の距離を基線長と呼びその長さを2aで表すことにす
る。また、投影中心と画像面との距離(焦点距離)をf
で表す。
2. Description of the Related Art Three-dimensional measurement using stereo images (hereinafter, referred to as "stereo")
The principle of “stereo image measurement” will be described with reference to FIG. In FIG. 9, (x, y, z) is used as coordinates representing a real space, and (X, Y) is used as coordinates representing a position on an image plane (an imaging plane of a camera). However, 2
Pedestal camera 8L, to distinguish 8R, (X L, Y L ) position as coordinates representing the image on the surface of the left camera using a right camera (X R position as coordinates representing the image on the surface of, Y R )
Is used. x-axis and the X L-axis, x-axis and X R-axis, y-axis and the Y L axis,
It is assumed that the y axis and the Y R axis are parallel to each other, and the z axis is both parallel to the optical axes of the two cameras. The origin of the real space coordinate system is set at the midpoint of the projection centers of the left and right cameras, and the distance between the projection centers is called a base line length, and the length is represented by 2a. Also, the distance (focal length) between the projection center and the image plane is f
Expressed by

【0003】今、実空間内の点pが左画像面上の点PL
(XL、YL)、右画像面上の点PR(XR、YR)にそれ
ぞれ投影されたとする。ステレオ画像計測では、画像面
上においてPL、PRを決定し(ステレオマッチング)、
三角測量の原理に基づいて点pの実空間座標(x,y,
z)を求める。ここでは、2台のカメラの光軸が同一平
面上にありx軸とX軸とを平行にとっていることから、
LとYRとは同じ値をとる。画像面上の座標XL、YL
R、YRと実空間内の座標x、y,zとの関係は、
Now, a point p in the real space is a point P L on the left image plane.
(X L , Y L ) and projected onto a point P R (X R , Y R ) on the right image plane. In stereo image measurement, P L and P R are determined on the image plane (stereo matching),
Based on the principle of triangulation, the real space coordinates (x, y,
z). Here, since the optical axes of the two cameras are on the same plane and the x-axis and the X-axis are parallel,
Y L and Y R have the same value. Coordinates X L , Y L ,
The relationship between X R , Y R and the coordinates x, y, z in the real space is

【数1】 あるいは、(Equation 1) Or,

【数2】 と求められる。(Equation 2) Is required.

【0004】ここで、 d=XL−XR (3) は視差を表している。(2)式からa>0であるので XL>XR かつ、YL=YR (4) が成り立つ。[0004] Here, d = X L -X R ( 3) represents the parallax. (2) and X L> X R because it is a> 0 from the equation, Y L = Y R (4 ) is satisfied.

【0005】これは、一方の画像面上の1点の他方の画
像面上での対応点は、同じ走査線上、かつXL>XRの範
囲に存在することを表す。したがって、一方の画像上の
1点に対応した他方の画像上の点は、対応点が存在する
可能性のある直線に沿ったある小領域について画像の類
似性を調べて見いだすことができる。
[0005] This means that a point on one image plane corresponding to another point on the other image plane is on the same scanning line and in the range of X L > X R. Therefore, a point on the other image corresponding to one point on one image can be found by examining the similarity of the image for a certain small area along a straight line where the corresponding point may exist.

【0006】次に、類似性の評価方法について説明す
る。類似性の評価方法の一例として、尾上守夫他編「画
像処理ハンドブック」(昭晃堂)に両画像間の相互相関
値を調べる方法が記載されている。図10を用いて、両
画像間の相互相関値を調べる方法について説明する。
Next, a method of evaluating similarity will be described. As an example of a similarity evaluation method, a method of examining a cross-correlation value between both images is described in "Image Processing Handbook" by Morio Onoe et al. A method of checking the cross-correlation value between the two images will be described with reference to FIG.

【0007】いま、右画像上のある画素903に対応す
る左画像中の点(対応点)を決定するものとする。対応
点を決定したい右画像上の画素903を中心とする大き
さn×m画素の矩形小領域904を設定し、その内部に
おける画素の輝度値をΙR(i,j)とする。一方、
(4)式の条件を満たす左画像上の画素を中心とする大
きさn×m画素の矩形小領域905の内部における画素
の輝度値をΙL(i,j)とする。それぞれの小領域につ
いての輝度値の平均と分散をμL、μR、σL2、σR
2とすると、これらの小領域間の相互相関値は次式で与
えられる。
Now, it is assumed that a point (corresponding point) in the left image corresponding to a certain pixel 903 on the right image is determined. A rectangular small area 904 having a size of n × m pixels centering on a pixel 903 on the right image for which a corresponding point is to be determined is set, and the luminance value of the pixel inside the small area is Ι R (i, j). on the other hand,
Let the luminance value of the pixel inside the rectangular small area 905 of size n × m pixels centered on the pixel on the left image that satisfies the condition of the expression (4) be と す るL (i, j). ΜL, μR, σL2, σR are the average and variance of the luminance value for each small area.
Assuming that 2, the cross-correlation value between these small areas is given by the following equation.

【数3】 対応点が存在する可能性のある直線(この場合、走査
線)に沿ってこの値を計算し、この値が最大となる部分
を対応点とする。
(Equation 3) This value is calculated along a straight line (in this case, a scanning line) in which there is a possibility that a corresponding point exists, and a portion where this value becomes the maximum is defined as a corresponding point.

【0008】この方法では、対応点を画素単位に決定す
ることができ、また対応点が決まればその対応点の座標
位置から(3)式を用いて、画素毎の視差が求まること
になる。しかしながら、対応点の決定には非常に多くの
演算量を要することになる。対応点を決定するすべての
画素について、上式の演算を対応点が存在する可能性の
ある範囲全域にわたって実行するからである。
According to this method, the corresponding point can be determined on a pixel-by-pixel basis, and if the corresponding point is determined, the parallax for each pixel can be obtained from the coordinate position of the corresponding point using equation (3). However, the determination of the corresponding point requires an extremely large amount of calculation. This is because the calculation of the above expression is performed for all the pixels for determining the corresponding points over the entire range where the corresponding points may exist.

【0009】相関計算のための小領域の大きさを小さく
すれば演算速度は速くできるが、画像の歪みや雑音の影
響を受けやすくなり、対応点検出の安定性が悪くなる。
逆に、小領域の大きさを大きくすると、多くの演算時間
を要するのみでなく、相関値の変化が緩やかになりす
ぎ、対応点検出の精度が低下する。小領域の大きさは、
対象とする画像の性質により適当に設定することが必要
である。
If the size of the small area for correlation calculation is reduced, the calculation speed can be increased, but the influence of image distortion and noise is increased, and the stability of corresponding point detection is deteriorated.
Conversely, if the size of the small area is increased, not only does it require a lot of calculation time, but also the change in the correlation value becomes too gradual, and the accuracy of corresponding point detection is reduced. The size of the small area is
It is necessary to set appropriately according to the properties of the target image.

【0010】以上説明したように、画素毎に対応点を決
定する方法では膨大な演算量を必要とする。そこで、画
像をある大きさのブロックの単位に分割し、ブロック毎
に対応領域を決定する方法がある。ブロック毎に左右画
像間の対応領域を求める方法としては、たとえば、特開
平5―114099号がある。
As described above, the method of determining a corresponding point for each pixel requires a huge amount of calculation. Therefore, there is a method of dividing an image into blocks each having a certain size and determining a corresponding area for each block. As a method of obtaining the corresponding area between the left and right images for each block, there is, for example, Japanese Patent Application Laid-Open No. 5-114099.

【0011】図11を用いて上記公開公報記載の方法に
ついて説明する。今、右画像1002を基準とし、右画
像をn×m画素のサイズのブロック1004を1単位と
して分割し、分割されたブロック毎に左画像1001中
より対応領域を探索し視差を求める。対応領域決定のた
めの類似度評価式として、
The method described in the above publication will be described with reference to FIG. Now, based on the right image 1002, the right image is divided into blocks 1004 each having a size of nxm pixels as one unit, and a corresponding area is searched from the left image 1001 for each divided block to obtain parallax. As a similarity evaluation formula for determining the corresponding area,

【数4】 を用いる。ここでLi、Riはそれぞれ左ブロック100
3、右ブロック1004内のi番目の画素における輝度
値である。この評価式は、(5)式のような平均値を引
く等の操作を伴わないため類似度評価式(5)式に比べ
れば演算量は少なくて済む。
(Equation 4) Is used. Here, Li and Ri are the left blocks 100, respectively.
3. Luminance values at the i-th pixel in the right block 1004. Since this evaluation expression does not involve an operation such as subtracting an average value as in Expression (5), the amount of calculation is smaller than that of Expression (5).

【0012】以上説明したように、ステレオ画像の対応
付け処理には、膨大な演算量を要するため、実用化に際
しては、これらの演算を高速に実行するハードウェア
(ステレオマッチング回路)が必要となる。前述の特開
平5―114099号には、具体的なステレオマッチン
グ回路の構成についても開示されている。これは、51
2(H)×200(V)画素からなる画像を、4×4画
素からなる矩形小領域(水平128、垂直20)に分割
し、前記矩形小領域毎にステレオマッチングを実行する
ことによって実空間の3次元(例えば距離)情報を計測
するものである。前記ステレオマッチング回路では、2
クロックに1回の割合で前記矩形小領域の一致度評価を
行う。すなわち、2クロックに1回、(6)式の演算を
実行するような構成になっており、探索範囲が100画
素の場合、約200クロックでひとつの矩形小領域のマ
ッチングを終了する。この装置では、合計128×20
ケの矩形小領域のステレオマッチングをおよそ0.07
6秒で実行することができる。
As described above, the processing of associating a stereo image requires an enormous amount of calculation. Therefore, in practical use, hardware (stereo matching circuit) that executes these calculations at high speed is required. . The above-mentioned Japanese Patent Application Laid-Open No. 5-114099 also discloses a specific configuration of a stereo matching circuit. This is 51
An image consisting of 2 (H) × 200 (V) pixels is divided into rectangular small areas (128 horizontal, 20 vertical) each consisting of 4 × 4 pixels, and stereo matching is performed for each rectangular small area, thereby real space is obtained. (For example, distance) information is measured. In the stereo matching circuit, 2
The degree of coincidence of the rectangular small area is evaluated once every clock. That is, the configuration is such that the operation of the expression (6) is executed once every two clocks. When the search range is 100 pixels, the matching of one rectangular small area is completed in about 200 clocks. In this device, a total of 128 × 20
Approximately 0.07
It can run in 6 seconds.

【0013】[0013]

【発明が解決しようとする課題】上記したように、従来
のステレオマッチング回路は、2クロックに1回の割で
矩形小領域の一致度評価を行うような構成になってお
り、画面全体のステレオマッチングをおよそ0.076
秒で計測することができる。
As described above, the conventional stereo matching circuit has a structure in which the degree of coincidence of a rectangular small area is evaluated once every two clocks. Match about 0.076
It can be measured in seconds.

【0014】しかしながら、上記回路構成でさらに処理
時間を短縮するためには、クロックの周波数を上げるし
かないため、回路構成が複雑化する問題がある。
However, in order to further reduce the processing time in the above-described circuit configuration, there is no other way but to increase the frequency of the clock, so that there is a problem that the circuit configuration becomes complicated.

【0015】本発明は、以上のような実状に鑑みてなさ
れたもので、簡単な回路構成で、しかも1クロックに1
回の割合で矩形小領域の一致度評価を行うことができ、
上記従来装置に比べ約1/2の時間でステレオマッチン
グが可能な、優れた高速ステレオマッチング装置を提供
することを目的とする。
The present invention has been made in view of the above situation, and has a simple circuit configuration and one clock per clock.
It is possible to evaluate the degree of coincidence of rectangular small areas at the rate of
It is an object of the present invention to provide an excellent high-speed stereo matching device capable of performing stereo matching in about 1/2 time as compared with the conventional device.

【0016】[0016]

【課題を解決するための手段】上記目的を達成するため
に、本発明は次のような手段を講じた。請求項1記載の
発明は、ステレオ画像上の各ブロックについて同一画素
位置の画素データを合成する合成手段と、前記ブロック
の垂直方向の各画素位置に対応して設けられた複数のメ
モリと、前記メモリに対して対応する垂直方向の画素位
置の合成データを書き込むメモリ制御手段と、前記各メ
モリに書き込まれた合成データを同時に読み出してステ
レオマッチングを行うマッチング手段とを具備する構成
を採る。
In order to achieve the above object, the present invention takes the following measures. The invention according to claim 1, wherein a synthesizing means for synthesizing pixel data at the same pixel position for each block on the stereo image, a plurality of memories provided corresponding to each pixel position in the vertical direction of the block, A configuration is provided that includes a memory control unit that writes synthesized data at a corresponding pixel position in the vertical direction to the memory, and a matching unit that simultaneously reads the synthesized data written in each memory and performs stereo matching.

【0017】この構成により、ステレオ画像を合成して
水平ライン毎に各々対応するメモリに書き込むようにし
たので、簡単な回路構成で、1クロック毎に矩形小領域
の一致度評価を行うことが可能となり、非常に高速にス
テレオマッチングを実行することができるという効果を
有する。
With this configuration, a stereo image is synthesized and written into the corresponding memory for each horizontal line, so that it is possible to evaluate the degree of coincidence of a rectangular small area for each clock with a simple circuit configuration. Thus, there is an effect that the stereo matching can be executed at a very high speed.

【0018】請求項2記載の発明は、請求項1記載のス
テレオマッチング装置において、メモリ制御手段が、ス
テレオ画像の水平方向画素数がNH、垂直方向画素数が
Vの場合、1ブロック分の合成データからなる合成画
像の水平方向の画素位置を表すインデックスをx(0≦
x≦NH-1)、垂直方向の画素位置を表すインデックス
をy(0≦y≦NV-1)とし、kを0〜((NV/n)−1)
の正の整数(nは定数)とするとき、下記インデックス
y、 y=n×kの合成画素値をメモリM0 y=n×k+1の合成画素値をメモリM1 : : y=n×k+(n−1)の合成画素値をメモリMn-1 に基づいて合成データを書き込む構成を採る。
According to a second aspect of the present invention, in the stereo matching apparatus according to the first aspect, when the number of horizontal pixels of the stereo image is N H and the number of vertical pixels of the stereo image is N V , the memory control means includes one block. The index representing the pixel position in the horizontal direction of the composite image composed of the composite data of
x ≦ N H −1), the index indicating the pixel position in the vertical direction is y (0 ≦ y ≦ N V −1), and k is 0 to ((N V / n) −1).
When a positive integer of n is a constant (n is a constant), a composite pixel value of the following index y, y = n × k is stored in memory M 0 and a composite pixel value of y = n × k + 1 is stored in memory M 1 :: y = n × k + A configuration is employed in which the synthesized pixel value of (n-1) is written based on the memory M n-1 .

【0019】この構成により、ステレオ画像を合成した
合成データを水平ライン毎に各々対応するメモリに書き
込むことができ、簡単な回路構成で、1クロック毎に矩
形小領域の一致度評価を行うことが可能となる。
With this configuration, the synthesized data obtained by synthesizing the stereo image can be written into the corresponding memory for each horizontal line, and the coincidence evaluation of the rectangular small area can be evaluated for each clock with a simple circuit configuration. It becomes possible.

【0020】請求項3記載の発明は、請求項1又は請求
項2記載のステレオマッチング装置において、マッチン
グ手段に、夫々対応するメモリから読み出された合成デ
ータを画像別に保存すると共にクロックに同期してステ
レオ画像間の水平方向の相関値を検出する複数のマッチ
ング回路を備える構成を採る。
According to a third aspect of the present invention, in the stereo matching apparatus according to the first or second aspect, the matching data is stored in the matching means for each image and stored in synchronism with a clock. And a plurality of matching circuits for detecting a horizontal correlation value between stereo images.

【0021】この構成により、1クロックでステレオ画
像間の水平方向の相関値を検出することができるので、
1クロック毎に矩形小領域の一致度評価を行うことが可
能となる。
With this configuration, a horizontal correlation value between stereo images can be detected with one clock.
It is possible to evaluate the degree of coincidence of a rectangular small area for each clock.

【0022】[0022]

【発明の実施の形態】以下、本発明の実施の形態につい
て、図面を参照しながら詳細に説明する。
Embodiments of the present invention will be described below in detail with reference to the drawings.

【0023】なお、以下の説明に於いては、従来技術で
引用した特開平5―114099号のステレオマッチン
グ方法を、本発明の高速ステレオマッチング回路で実現
する場合を例に説明を行う。したがって、図6に示すよ
うに、入力画像401(左画像および右画像)のサイズ
は、水平方向画素数NHが512画素、垂直方向画素数
Vが200画素、1画素当たりのビット数Aは8ビッ
トとする。また、入力画像を4×4画素からなる矩形小
領域402で分割し、合計128×50ケの矩形小領域
についてステレオマッチング処理を行うものとする。
In the following description, a case will be described as an example where the stereo matching method disclosed in Japanese Patent Laid-Open No. 5-114099 cited in the prior art is realized by the high-speed stereo matching circuit of the present invention. Accordingly, as shown in FIG. 6, the size of the input image 401 (left and right images) are 512 pixels in the horizontal direction pixel number N H, 200 pixels in the vertical direction pixel number N V, the number of bits per pixel A Is 8 bits. It is also assumed that the input image is divided by a rectangular small area 402 composed of 4 × 4 pixels, and stereo matching processing is performed on a total of 128 × 50 rectangular small areas.

【0024】図1は、本発明の一実施の形態に係る高速
ステレオマッチング回路のブロック図を示したものであ
る。
FIG. 1 is a block diagram showing a high-speed stereo matching circuit according to an embodiment of the present invention.

【0025】この高速ステレオマッチング回路は、水平
方向画素数がNH(=512)、垂直方向画素数がN
V(=200)、1画素当たりA(=8)ビットの画素
値を有する2系統の画像(左画像101および右画像1
02)が入力される。
In this high-speed stereo matching circuit, the number of pixels in the horizontal direction is N H (= 512) and the number of pixels in the vertical direction is N
V (= 200) Two systems of images having a pixel value of A (= 8) bits per pixel (left image 101 and right image 1
02) is input.

【0026】本実施の形態の高速ステレオマッチング回
路には、左画像101と右画像102との合成画像が後
述するルールにしたがって書き込まれるメモリM0〜M3
119〜122が備えられ、各メモリM0〜M3119〜
122から読み出される4系統のデータ104〜107
が入力される1次元マッチング回路123〜126が備
えられている。さらに、高速ステレオマッチング回路に
は、1次元マッチング回路123〜126の出力108
と109並びに110と111をそれぞれ加算する加算
器128、129と、加算器128、129の出力11
2、113を加算する加算器130と、加算器130の
出力114から最小の差分絶対値和を検出する最小値/
視差検出回路131と、コントローラ127が備えられ
ている。
In the high-speed stereo matching circuit according to the present embodiment, memories M 0 to M 3 in which a composite image of the left image 101 and the right image 102 are written in accordance with rules described later.
119 to 122, each of the memories M 0 to M 3 119 to
4 systems of data 104 to 107 read from 122
Are input to one-dimensional matching circuits 123 to 126. Further, the output 108 of the one-dimensional matching circuits 123 to 126 is provided in the high-speed stereo matching circuit.
And 109, and 110 and 111, respectively, and the outputs 11 of the adders 128 and 129.
2, 113, and a minimum value / to detect a minimum sum of absolute differences from an output 114 of the adder 130.
A parallax detection circuit 131 and a controller 127 are provided.

【0027】図2は1次元マッチング回路(123〜1
26)の機能ブロックである。1次元マッチング回路
は、参照データ保持ブロック601とスキャンデータ保
持ブロック602を備える。参照データ保持ブロック6
01は、4つのイネーブル付きDフリップフロップ60
3〜606を直列接続した構成であり、スキャンデータ
保持ブロック602は4つのDフリップフロップ607
〜610を直列接続した構成である。イネーブル付きD
フリップフロップ603〜606はコントローラ127
からの制御信号によって制御される。同一段に配置され
たイネーブル付きDフリップフロップ603〜606及
びDフリップフロップ607〜610の各出力を差分絶
対値回路611〜614に入力している。差分絶対値回
路611、612が一方の加算器615に接続され、残
りの差分絶対値回路613,614がもう一方の加算器
616に接続される。これら2つの加算器615,61
6を加算器617に接続している。
FIG. 2 shows a one-dimensional matching circuit (123 to 1).
26) is a functional block. The one-dimensional matching circuit includes a reference data holding block 601 and a scan data holding block 602. Reference data holding block 6
01 denotes four D flip-flops with enable 60
The scan data holding block 602 includes four D flip-flops 607.
610 are connected in series. D with enable
The flip-flops 603 to 606 are connected to the controller 127.
Is controlled by a control signal from The outputs of the D flip-flops with enable 603 to 606 and D flip-flops 607 to 610 arranged in the same stage are input to absolute difference circuits 611 to 614. The difference absolute value circuits 611 and 612 are connected to one adder 615, and the remaining difference absolute value circuits 613 and 614 are connected to the other adder 616. These two adders 615, 61
6 is connected to the adder 617.

【0028】以上のように構成された高速ステレオマッ
チングの動作について説明する。まず、入力と同時に、
左画像101および右画像102の各々対応する画素位
置どうしで画素毎に、上位8ビットが一方(右画像)の
画素値、下位8ビットがもう一方(左画像)の画素値と
なる16ビットの値(以下、「合成画素値」と呼ぶ)に
合成される。この合成画素値は、後記のルールにしたが
ってn個の対応するメモリM0〜M3(n=4)にそれぞ
れ書き込まれる。“n”は、矩形小領域の垂直方向の画
素数(=4)と同じ値にとる。メモリへの書き込み制御
はコントローラ127からの制御信号116によって行
う。なお、合成画素値で構成される画像を合成画像と呼
ぶことにするが、この合成画像は、水平方向画素数が5
12、垂直方向画素数が200、1画素当たり16ビッ
トの画素値をもつ画像となる。
The operation of the high-speed stereo matching configured as described above will be described. First, at the same time as input,
At each pixel position corresponding to each of the left image 101 and the right image 102, for each pixel, the upper 8 bits are 16-bit pixels each having a pixel value of one (right image) and the lower 8 bits are pixel values of the other (left image). (Hereinafter referred to as “combined pixel value”). The composite pixel value is written into n corresponding memories M 0 to M 3 (n = 4) in accordance with the rules described later. “N” takes the same value as the number of pixels (= 4) in the vertical direction of the rectangular small area. Writing control to the memory is performed by a control signal 116 from the controller 127. Note that an image composed of composite pixel values will be referred to as a composite image.
12, an image having 200 pixels in the vertical direction and a pixel value of 16 bits per pixel.

【0029】<ルール>合成画像の水平方向の画素位置
を表すインデックスをx(0≦x≦511)、垂直方向の
画素位置を表すインデックスをy(0≦y≦199)と
し、kを0〜49の正の整数とするとき、 y=4×kの合成画素値をメモリM0 y=4×k+1の合成画素値をメモリM1 y=4×k+2の合成画素値をメモリM2 y=4×k+3の合成画素値をメモリM3 に書き込むものとする。
<Rule> The index indicating the pixel position in the horizontal direction of the composite image is x (0 ≦ x ≦ 511), the index indicating the pixel position in the vertical direction is y (0 ≦ y ≦ 199), and k is 0 to 0. When a positive integer of 49 is used, the combined pixel value of y = 4 × k is stored in the memory M 0 y = 4 × k + 1 The stored pixel value of the memory M 1 y = 4 × k + 2 is stored in the memory M 2 y = the composite pixel value of 4 × k + 3 shall be written in the memory M 3.

【0030】したがって、図3に示すように、合成画像
の垂直方向インデックスy(0≦y≦199)毎に、 y=0、4、8、…、196の合成画素値はメモリM0 y=1、5、9、…、197の合成画素値はメモリM1 y=2、6、10、…、198の合成画素値はメモリM
2 y=3、7、11、…、199の合成画素値はメモリM
3 に書き込まれることになる。一例として、メモリM0
のデータ格納例を図4に示し、メモリM1へのデータ格
納例を図5に示す。
[0030] Therefore, as shown in FIG. 3, the vertical direction index y (0 ≦ y ≦ 199) each of the composite image, y = 0, 4, 8, ..., composite pixel value of 196 memory M 0 y = The combined pixel values of 1 , 5, 9,... 197 are the memory M 1 y = 2, 6, 10,.
The combined pixel values of 2 y = 3, 7, 11,...
Will be written to 3 . As an example, an example of data storage memory M 0 F shown in FIG. 4, showing an example of data storage into the memory M 1 in FIG.

【0031】以上のようにして、合成画像がメモリM0
〜M3に書き込まれた後、コントローラ127からの制
御信号116によって、同じアドレスのデータ(画素
値)が1クロック周期でメモリM0〜M3から同時にx=
0、1、2、3、…の順で読み出される。
As described above, the composite image is stored in the memory M 0.
After being written to ~M 3, the control signal 116 from the controller 127, data of the same address (pixel value) at the same time from the memory M 0 ~M 3 in 1 clock cycle x =
Are read in the order of 0, 1, 2, 3,...

【0032】クロックに同期して順次読み出される4系
統のデータ104〜107は、それぞれ1次元マッチン
グ回路123〜126に入力され水平方向4画素の差分
絶対値和がクロックに同期して演算される。1次元マッ
チング回路123〜126から出力される水平方向4画
素の差分絶対値和は、加算器128〜130によってさ
らに加算され、最終的に矩形小領域内のすべての画素
(4×4)の差分絶対値和すなわち(6)式の演算結果
114が1クロック毎に得られる。最小値/視差検出回
路131では、探索範囲100画素に渡って1クロック
毎に得られる差分絶対値和のうち、最小となる値とその
ときの視差を検出/保持し、探索終了時にその結果11
5を出力する。
The four systems of data 104 to 107 sequentially read out in synchronization with the clock are input to one-dimensional matching circuits 123 to 126, respectively, and the sum of absolute differences of four pixels in the horizontal direction is calculated in synchronization with the clock. The sum of absolute differences of the four pixels in the horizontal direction output from the one-dimensional matching circuits 123 to 126 is further added by adders 128 to 130, and finally the difference of all the pixels (4 × 4) in the rectangular small area is obtained. The sum of absolute values, that is, the calculation result 114 of the equation (6) is obtained every clock. The minimum value / parallax detection circuit 131 detects / holds the minimum value and the parallax at that time among the sum of absolute differences obtained for each clock over 100 pixels in the search range, and when the search ends, the result 11
5 is output.

【0033】一例として、図7に示す画像左上の矩形小
領域501を例にマッチング処理の流れを説明する。y
=0およびy=1およびy=2およびy=3の画素デー
タ(k=0)が、それぞれメモリM0〜M3からx=0、
1、2、3、…の順で同時に読み出され、それぞれ1次
元マッチング回路123〜126に入力される。
As an example, the flow of the matching process will be described using the rectangular small area 501 at the upper left of the image shown in FIG. 7 as an example. y
= 0, y = 1, y = 2, and y = 3 are respectively stored in the memories M 0 to M 3 as x = 0,
Are simultaneously read out in the order of 1, 2, 3,... And input to the one-dimensional matching circuits 123 to 126, respectively.

【0034】図8に1次元マッチング回路の動作タイミ
ングを示す。1次元マッチング回路123には、y=0
の画素データが、x=0、1、2、3、…の順で入力さ
れる。入力された画素データ16ビットは、右画像デー
タ(上位8ビット)と左画像データ(下位8ビット)に
分離され、右画像データは参照データ保持ブロック60
1へ、右画像データはスキャンデータ保持ブロック60
2へ入力される。
FIG. 8 shows the operation timing of the one-dimensional matching circuit. In the one-dimensional matching circuit 123, y = 0
Are input in the order of x = 0, 1, 2, 3,.... The input 16 bits of pixel data are separated into right image data (upper 8 bits) and left image data (lower 8 bits).
1, the right image data is the scan data holding block 60
2 is input.

【0035】参照データ保持ブロック601では、イネ
ーブル付きDフリップフロップ603に(x,y)=
(0、0)の画素データが、イネーブル付きDフリップ
フロップ604に(x,y)=(1、0)の画素データ
が、イネーブル付きDフリップフロップ605に(x,
y)=(2、0)の画素データが、イネーブル付きDフ
リップフロップ605に(x,y)=(3、0)の画素
データがそれぞれ保持されるように、コントローラ12
7からの制御信号117によって制御される。イネーブ
ル付きDフリップフロップ603〜605は制御信号1
17がアクティブのときのみ入力データをクロックの立
ち上がりに同期してラッチするようなフリップフロップ
である。
In the reference data holding block 601, (x, y) =
The pixel data of (0, 0) is stored in the D flip-flop 604 with enable, and the pixel data of (x, y) = (1, 0) is stored in the D flip-flop 605 with enable (x, y).
The controller 12 controls the pixel data of (y) = (2, 0) and the pixel data of (x, y) = (3, 0) in the D flip-flop 605 with enable.
7 is controlled by the control signal 117. The D flip-flops 603 to 605 with enable control signal 1
This is a flip-flop that latches input data in synchronization with the rise of the clock only when 17 is active.

【0036】一方、スキャンデータ保持ブロック602
では、クロックに同期して入力される左画像データがD
フリップフロップで構成されたシフトレジスタ607〜
610によって、1クロック毎に1画素ずつシフトされ
ていく。
On the other hand, the scan data holding block 602
Then, the left image data input in synchronization with the clock is D
Shift register 607 composed of flip-flops
610 shifts one pixel at a time for each clock.

【0037】参照データ保持ブロック601に保持され
ている画素データ(y=0のx=0、1、2、3の4画
素)と、スキャンデータ保持ブロック602でクロック
毎にシフトされ逐次更新される画素データ(4画素)
は、それぞれ、差分絶対値回路611〜614にて画素
毎の差分絶対値が演算され、加算器615〜617にて
4画素分の差分絶対値の総和がとられて1次元マッチン
グ回路123から出力される。
The pixel data held in the reference data holding block 601 (x = 0 for y = 0, 1, 2, 3 pixels) and the scan data holding block 602 are shifted and updated successively for each clock. Pixel data (4 pixels)
Are respectively calculated by the difference absolute value circuits 611 to 614, and the sum of the difference absolute values of the four pixels is calculated by the adders 615 to 617, and the sum is output from the one-dimensional matching circuit 123. Is done.

【0038】同様に、1次元マッチング回路124には
y=1、1次元マッチング回路125にはy=2、1次
元マッチング回路126にはy=3の画素データが、そ
れぞれx=0、1、2、3、…の順で入力され同様に処
理される。
Similarly, pixel data of y = 1 in the one-dimensional matching circuit 124, y = 2 in the one-dimensional matching circuit 125, and y = 3 in the one-dimensional matching circuit 126, x = 0, 1,. Are input in the order of 2, 3,... And processed similarly.

【0039】上述のように、4ライン分(y=0、1、
2、3)の差分絶対値和が並列に演算され、矩形小領域
501の一致度評価すなわち(6)式の演算は、1クロ
ックに1度実行されることになる。これを探索範囲全域
に渡って(例えば100画素)実行し、その最小値およ
び最小値を与える視差が、最小値/視差検出回路131
で検出されて保持され、探索終了時に結果115として
出力される。
As described above, four lines (y = 0, 1,
The sums of the absolute differences 2 and 3) are calculated in parallel, and the evaluation of the degree of coincidence of the rectangular small area 501, that is, the calculation of the expression (6) is executed once per clock. This is executed over the entire search range (for example, 100 pixels), and the minimum value and the parallax giving the minimum value are calculated by the minimum value / parallax detection circuit 131.
Are detected and held, and output as a result 115 at the end of the search.

【0040】最小値/視差検出回路131への制御信号
118は、(1クロック毎に更新される)現在の視差お
よび矩形小領域毎の評価結果出力タイミング(評価終了
タイミング)である。
The control signal 118 to the minimum value / parallax detection circuit 131 is the current parallax (updated every clock) and the evaluation result output timing (evaluation end timing) for each rectangular small area.

【0041】以上説明したように、本発明の実施の形態
によれば、ひとつの矩形小領域のマッチングは探索範囲
を100画素とした場合、およそ100クロックで実行
することが可能であり、特開平5―114099号に記
載の回路構成に比べ、同じクロック周波数を用いた場
合、約1/2の時間(0.076÷2=0.036秒)で
ステレオマッチングを実行することができる。
As described above, according to the embodiment of the present invention, matching of one rectangular small area can be executed in about 100 clocks when the search range is 100 pixels. Compared with the circuit configuration described in 5-114099, when the same clock frequency is used, stereo matching can be performed in about 1/2 time (0.076 / 2 = 0.036 seconds).

【0042】なお、以上の説明では、特開平5―114
099号に記載のステレオマッチング方法(左右画像の
差分絶対値和を一致度評価に用いる方法)を本発明の高
速ステレオマッチング回路で実現する場合を例に説明を
行ったが、本発明は、前記ステレオマッチング方法に限
定されるものではない。
In the above description, Japanese Patent Application Laid-Open No. 5-114
The stereo matching method described in Japanese Patent Application No. 099 (method of using the sum of absolute differences between left and right images for matching evaluation) has been described as an example of a case where the high-speed stereo matching circuit of the present invention is used. It is not limited to the stereo matching method.

【0043】[0043]

【発明の効果】以上説明したように、本発明によれば、
簡単な回路構成で、1クロック毎に矩形小領域の一致度
評価を行うことが可能となり、非常に高速にステレオマ
ッチングを実行することができるという効果を有する。
As described above, according to the present invention,
With a simple circuit configuration, it is possible to evaluate the degree of coincidence of a small rectangular area for each clock, and this has the effect that stereo matching can be performed very quickly.

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

【図1】本発明の一実施の形態に係る高速ステレオマッ
チング回路のブロック図。
FIG. 1 is a block diagram of a high-speed stereo matching circuit according to one embodiment of the present invention.

【図2】上記実施の形態における1次元マッチング回路
のブロック図。
FIG. 2 is a block diagram of a one-dimensional matching circuit in the embodiment.

【図3】上記実施の形態における高速ステレオマッチン
グ回路のメモリ構成を説明するための図。
FIG. 3 is a diagram illustrating a memory configuration of a high-speed stereo matching circuit according to the embodiment.

【図4】上記実施の形態におけるメモリM0へのデータ
格納方法の具体例を示すメモリ構成図。
[4] memory configuration diagram showing a specific example of a method of storing data into the memory M 0 in the above embodiment.

【図5】上記実施の形態におけるメモリM1へのデータ
格納方法の具体例を示すメモリ構成図。
[5] a memory configuration diagram showing a specific example of a method of storing data into the memory M 1 in the above embodiment.

【図6】上記実施の形態における入力画像のサイズおよ
び矩形小領域への分割方法の一例を示す図。
FIG. 6 is a diagram showing an example of a method for dividing an input image into small rectangular areas according to the embodiment.

【図7】上記実施の形態における矩形小領域毎のマッチ
ングの処理の説明図。
FIG. 7 is an explanatory diagram of a matching process for each rectangular small area in the embodiment.

【図8】上記実施の形態における本発明の高速ステレオ
マッチング回路における、1次元マッチング回路の動作
タイミングを説明するための図。
FIG. 8 is a diagram for explaining operation timing of a one-dimensional matching circuit in the high-speed stereo matching circuit of the present invention in the above embodiment.

【図9】ステレオ画像による3次元情報計測方法の原理
説明図。
FIG. 9 is a diagram illustrating the principle of a three-dimensional information measurement method using stereo images.

【図10】ステレオ画像による3次元情報計測のステレ
オマッチング法の説明図。
FIG. 10 is an explanatory diagram of a stereo matching method of three-dimensional information measurement using a stereo image.

【図11】ステレオ画像による3次元情報計測の別のス
テレオマッチング法の説明図。
FIG. 11 is an explanatory diagram of another stereo matching method of three-dimensional information measurement using a stereo image.

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

101…左画像、 102…右画像、 103…合成画像、 123〜126…1次元マッチング回路 127…コントローラ、 128〜130…加算器 131…最小値/視差検出回路 401…入力画像、 402…矩形小領域、 501…矩形小領域、 601…参照データ保持ブロック、 602…スキャンデータ保持ブロック、 603〜606…イネーブル付きDフリップフロップ、 607〜610…Dフリップフロップ、 611〜614…差分絶対値回路、 615〜617…加算器、 Reference numeral 101: left image, 102: right image, 103: composite image, 123 to 126: one-dimensional matching circuit 127: controller, 128 to 130: adder 131: minimum value / disparity detection circuit 401: input image, 402: rectangular small Area: 501: rectangular small area, 601: reference data holding block, 602: scan data holding block, 603 to 606: D flip-flop with enable, 607 to 610: D flip-flop, 611 to 614: absolute difference circuit, ~ 617 ... adder,

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 ステレオ画像上の各ブロックについて同
一画素位置の画素データを合成する合成手段と、前記ブ
ロックの垂直方向の各画素位置に対応して設けられた複
数のメモリと、前記メモリに対して対応する垂直方向の
画素位置の合成データを書き込むメモリ制御手段と、前
記各メモリに書き込まれた合成データを同時に読み出し
てステレオマッチングを行うマッチング手段とを具備す
るステレオマッチング装置。
1. A synthesizing means for synthesizing pixel data at the same pixel position for each block on a stereo image, a plurality of memories provided corresponding to each pixel position in a vertical direction of the block, And a matching unit for simultaneously reading out the combined data written in each of the memories and performing stereo matching.
【請求項2】 メモリ制御手段は、ステレオ画像の水平
方向画素数がNH、垂直方向画素数がNVの場合、1ブロ
ック分の合成データからなる合成画像の水平方向の画素
位置を表すインデックスをx(0≦x≦NH-1)、垂直方
向の画素位置を表すインデックスをy(0≦y≦NV-1)
とし、kを0〜((NV/n)−1)の正の整数(nは定
数)とするとき、下記インデックスy、 y=n×kの合成画素値をメモリM0 y=n×k+1の合成画素値をメモリM1 : : y=n×k+(n−1)の合成画素値をメモリMn-1 に基づいて合成データを書き込むことを特徴とする請求
項1記載のステレオマッチング装置。
2. The memory control means according to claim 1, wherein when the number of pixels in the horizontal direction of the stereo image is N H and the number of pixels in the vertical direction is N V , an index representing a horizontal pixel position of the composite image composed of one block of composite data. Is x (0 ≦ x ≦ N H −1), and an index representing a pixel position in the vertical direction is y (0 ≦ y ≦ N V −1).
When k is a positive integer of 0 to ((N V / n) −1) (n is a constant), the composite pixel value of the following index y, y = n × k is stored in the memory M 0 y = n × k + 1 of the composite pixel value memory M 1:: y = n × k + stereo matching according to claim 1, wherein the composite pixel value of (n-1) and writes the combined data based on the memory M n-1 apparatus.
【請求項3】 マッチング手段は、夫々対応するメモリ
から読み出された合成データを画像別に保存すると共に
クロックに同期してステレオ画像間の水平方向の相関値
を検出する複数のマッチング回路を備えることを特徴と
する請求項1又は請求項2記載のステレオマッチング装
置。
3. The matching means includes a plurality of matching circuits for storing combined data read from corresponding memories for each image and detecting a horizontal correlation value between stereo images in synchronization with a clock. The stereo matching device according to claim 1 or 2, wherein:
JP9161891A 1997-06-04 1997-06-04 Stereo matching device Pending JPH10334244A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9161891A JPH10334244A (en) 1997-06-04 1997-06-04 Stereo matching device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9161891A JPH10334244A (en) 1997-06-04 1997-06-04 Stereo matching device

Publications (1)

Publication Number Publication Date
JPH10334244A true JPH10334244A (en) 1998-12-18

Family

ID=15743975

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9161891A Pending JPH10334244A (en) 1997-06-04 1997-06-04 Stereo matching device

Country Status (1)

Country Link
JP (1) JPH10334244A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999058927A1 (en) * 1998-05-08 1999-11-18 Sony Corporation Image generating device and method
JP2010055508A (en) * 2008-08-29 2010-03-11 Sony Corp Input/output device
JP2016009427A (en) * 2014-06-26 2016-01-18 株式会社リコー Image processor, image processing method, and device control system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999058927A1 (en) * 1998-05-08 1999-11-18 Sony Corporation Image generating device and method
US7015951B1 (en) 1998-05-08 2006-03-21 Sony Corporation Picture generating apparatus and picture generating method
JP2010055508A (en) * 2008-08-29 2010-03-11 Sony Corp Input/output device
US8681123B2 (en) 2008-08-29 2014-03-25 Sony Corporation Input/output device
US9164626B2 (en) 2008-08-29 2015-10-20 Sony Corporation Input/output device
JP2016009427A (en) * 2014-06-26 2016-01-18 株式会社リコー Image processor, image processing method, and device control system

Similar Documents

Publication Publication Date Title
US5202928A (en) Surface generation method from boundaries of stereo images
US4677476A (en) Method for detecting a movement of a television signal
CN110070598B (en) Mobile terminal for 3D scanning reconstruction and 3D scanning reconstruction method thereof
US20050008220A1 (en) Method, apparatus, and program for processing stereo image
JP2002024807A (en) Object movement tracking technique and recording medium
US6049625A (en) Method of and an apparatus for 3-dimensional structure estimation
JP2961264B1 (en) Three-dimensional object model generation method and computer-readable recording medium recording three-dimensional object model generation program
JPH08223578A (en) Method for searching motion vector and device therefor
JPH08292014A (en) Measuring method of pattern position and device thereof
JPH10334244A (en) Stereo matching device
JP2001338280A (en) Three-dimensional space information input device
US6483949B1 (en) Image processing apparatus and method, and medium therefor
JP3221384B2 (en) 3D coordinate measuring device
JPH10320558A (en) Calibration method, corresponding point search method and device therefor, focus distance detection method and device therefor, three-dimensional position information detection method and device therefor, and recording medium
JP2000171214A (en) Corresponding point retrieving method and three- dimensional position measuring method utilizing same
US6625301B2 (en) Image processing apparatus, image processing method and transmission medium
JPH0875454A (en) Range finding device
JPH08329110A (en) Method for processing picture
JP2961140B2 (en) Image processing method
JP3047017B2 (en) Image processing method
US5682438A (en) Method and apparatus for determining a motion vector
JP2000028355A (en) Three-dimensional image processing device
JP2003331263A (en) Map generating method for making camera image correspond to real spatial coordinate, map generating apparatus for making camera image correspond to real spatial coordinate, and program and recording medium
CN117635849B (en) Dynamic real-time high-precision three-dimensional imaging system
JP2001124519A (en) Recurring correspondent point survey method, three- dimensional position measuring method thereof, these devices and recording medium