JPH0229878A - Image processing method - Google Patents

Image processing method

Info

Publication number
JPH0229878A
JPH0229878A JP63180621A JP18062188A JPH0229878A JP H0229878 A JPH0229878 A JP H0229878A JP 63180621 A JP63180621 A JP 63180621A JP 18062188 A JP18062188 A JP 18062188A JP H0229878 A JPH0229878 A JP H0229878A
Authority
JP
Japan
Prior art keywords
pixel
pixels
texture area
data
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP63180621A
Other languages
Japanese (ja)
Other versions
JP2843034B2 (en
Inventor
Fumiaki Tomita
文明 富田
Atsushi Sato
淳 佐藤
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.)
National Institute of Advanced Industrial Science and Technology AIST
Aisin Corp
Original Assignee
Agency of Industrial Science and Technology
Aisin Seiki 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 Agency of Industrial Science and Technology, Aisin Seiki Co Ltd filed Critical Agency of Industrial Science and Technology
Priority to JP63180621A priority Critical patent/JP2843034B2/en
Publication of JPH0229878A publication Critical patent/JPH0229878A/en
Application granted granted Critical
Publication of JP2843034B2 publication Critical patent/JP2843034B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To simplify image processing by expanding data corresponding to picture elements constituting the boundary of a texture area to its inside. CONSTITUTION:Since a certain kind of constitutional elements exist in the texture area in comparatively high density and the elements have almost equal characteristics in a restricted range, the data corresponding to the picture elements constituting the boundary of the texture area are expanded to the inside. Since the processing required for said expansion is only the processing for finding out correlation between the picture elements of the 1st texture area and the picture elements of the 2nd texture area indicated by the corresponding data included in picture elements adjacent to said picture elements or their peripheral picture elements and the processing for finding out data corresponding to the picture elements of the 1st texture area from the correlation, the processing is extremely simple.

Description

【発明の詳細な説明】 〔発明の目的〕 (産業上の利用分野) 本発明は、複数のテクスチャ領域間でそれぞれの構成画
素の対応付けを行なう技術に関し、例えば、ステレオ画
像内の対応領域間で構成画像の視差を検出する技術に関
する。
[Detailed Description of the Invention] [Object of the Invention] (Industrial Field of Application) The present invention relates to a technique for associating component pixels between a plurality of texture areas, for example, for mapping between corresponding areas in a stereo image. The present invention relates to a technique for detecting parallax in composed images.

(従来の技術) 一般的な画像には各種の性質を有する領域が混在してい
る。テクスチャはそれらの中から各領域をか何であるか
を視覚により判断する上で重要な役割りを果している0
例えば、メロンを含む画像においては、メロンのテクス
チャ(模様)が、メロンの領域を他から分離していると
ともに、遠くのテクスチャは細かく、近くのテクスチャ
は粗く見えることから、その遠近感、すなわち立体形状
を表現している。
(Prior Art) A typical image includes regions having various properties. Texture plays an important role in visually determining the identity of each area.
For example, in an image containing a melon, the texture (pattern) of the melon separates the area of the melon from other areas, and the distant texture appears fine and the nearby texture appears coarse, so the perspective, or three-dimensional It expresses the shape.

つまり、例えば、撮像面を実質的に同一面にし、光軸を
互いに平行にする2つのカメラにより、同一の対象を撮
像し、各テクスチャ領域を構成する画素についてそれぞ
れ対応付けを行ない、視差を求めることにより、対象ま
での距離が求まり、それを立体的な画像に再現すること
が可能になる。
In other words, for example, the same object is imaged using two cameras whose imaging planes are substantially the same and their optical axes are parallel to each other, and the pixels constituting each texture area are associated with each other to find the parallax. This allows the distance to the target to be determined and reproduced in a three-dimensional image.

従来より、各画像から構成要素を線分として抽出し、そ
れぞれの特徴量を求めて抽出した線分どうしを対応付け
する方法が知られている。
BACKGROUND ART Conventionally, a method has been known in which constituent elements are extracted as line segments from each image, feature amounts of each are determined, and the extracted line segments are associated with each other.

(発明が解決しようとするll1I) しかしながら、この方法は専ら単純な画像についてのみ
有効であり、テクスチャ領域のように非常に多くの構成
要素を高密度で含んでいる領域に適用すると、各構成要
素をそれぞれ独立に識別可能な線分として抽出するため
には、厖大なメモリが必要となる。また、それを解決し
たとしても、構成要素の空間的な密度が高いため対応候
補となる線分が増大し、1つ1つの線分について対応を
検討することは事実上不可能に近い。
(ll1I to be solved by the invention) However, this method is only effective for simple images, and when applied to an area containing a large number of constituent elements at high density, such as a texture area, each constituent element In order to extract each line segment as independently distinguishable line segments, a huge amount of memory is required. Furthermore, even if this problem is solved, the number of line segments that are correspondence candidates increases due to the high spatial density of the constituent elements, and it is virtually impossible to consider correspondence for each line segment.

本発明は、簡単な処理により、複数のテクスチャ領域間
で、それぞれの構成画素の対応付は適切に行なう画像処
理方法を提供することを目的とする。
SUMMARY OF THE INVENTION An object of the present invention is to provide an image processing method that appropriately associates constituent pixels of a plurality of texture areas with each other through simple processing.

〔発明の構成〕[Structure of the invention]

(11題を解決するための手段) 上記目的を達成するため、本発明においては、微小区分
の画素で構成される原画像から分割した第1のテクスチ
ャ領域と第2のテクスチャ領域に対し。
(Means for Solving Problem 11) In order to achieve the above object, in the present invention, the first texture area and the second texture area are divided from an original image composed of pixels of minute sections.

第1のテクスチャ領域の境界線の特徴量と。A feature amount of a boundary line of a first texture area.

第2のテクスチャ領域の境界線の特徴量とを比較して第
1のテクスチャ領域の境界線を構成する画素と、第2の
テクスチャ領域の境界線を構成する画素との対応関係を
示す対応データを第1のテクスチャ領域の境界線を構成
する画素のそれぞれに対応付けて求め、 第1のテクスチャ領域内の画素と、少なくともそれに隣
接する画素の対応データで示される第2のテクスチャ領
域の画素と相関関係から、該第1のテクスチャ領域内の
画素の対応データを求め、第1のテクスチャ領域内の各
画素の対応データにより、それぞれに対応する第2のテ
クスチャ領域の画素を求めるものとする。
Correspondence data indicating the correspondence between pixels forming the border of the first texture area and pixels forming the border of the second texture area by comparing the feature amount of the border of the second texture area is determined in association with each of the pixels forming the boundary line of the first texture area, and the pixels in the first texture area and the pixels in the second texture area indicated by the corresponding data of at least the pixels adjacent thereto. It is assumed that correspondence data of pixels in the first texture area is determined from the correlation, and corresponding pixels of the second texture area are determined from correspondence data of each pixel in the first texture area.

(作用) これによれば、テクスチャ領域では、ある種の構成要素
が比較的高密度で存在し、限られた範囲では略等しい特
性を有することから、テクスチャ領域の境界線の構成す
る画素に求めた対応データをその内側に拡張している。
(Effect) According to this, in a texture area, certain types of constituent elements exist at a relatively high density and have approximately equal characteristics in a limited range. The corresponding data is expanded inside it.

これに要する処理は。What is the process required for this?

第1のテクスチャ領域の画素と、その画素に隣接する画
素が有する対応データで示される第2のテクスチャ領域
の画素またはその周辺の画素との相関を求める処理、お
よび相関からその第1のテクスチャ領域の画素の対応デ
ータを求める処理のみであり、至って簡単である。この
場合、上記述べたテクスチャ領域の特性に本発明の根拠
があるので、その処理の信頼性は高い。
A process for determining a correlation between a pixel in a first texture area and a pixel in a second texture area or its surrounding pixels indicated by corresponding data of a pixel adjacent to the pixel, and a process for determining the correlation between a pixel in the first texture area and a pixel in the second texture area or its surrounding pixels; The only process required is to obtain the corresponding data of the pixels, and is extremely simple. In this case, the reliability of the processing is high because the present invention is based on the characteristics of the texture area described above.

なお、本発明の好ましい実施例においては、第1のテク
スチャ領域と第2のテクスチャ領域を、それぞれ同一対
象を有する異なる原画像から分割する。また、第1のテ
クスチャ領域内の画素の対応データは、第1のテクスチ
ャ領域内を一定の方向から逐次構成画素を注目すること
により求めた後、それとは逆の方向から逐次構成画素を
注目することによりそれを補正して求めている。これに
より処理精度が非常に高くなる。
In a preferred embodiment of the present invention, the first texture region and the second texture region are each divided from different original images having the same object. Furthermore, the correspondence data of pixels in the first texture area is obtained by sequentially focusing on the constituent pixels in the first texture area from a certain direction, and then sequentially observing the constituent pixels from the opposite direction. Therefore, we are correcting it. This greatly increases processing accuracy.

ここで、本発明は、対応を求めるテクスチャ領域を2つ
に限る意図がないことを付記しておく。
It should be noted here that the present invention does not intend to limit the number of texture regions for which correspondence is sought to two.

つまり、3以上のテクスチャ領域があるときには、その
任意の1つを第1のテクスチャ領域とし、他を第2のテ
クスチャ領域とすれば、全く同じ手順で対応する画素が
求まるからである。
That is, when there are three or more texture areas, if any one of them is set as the first texture area and the others are set as the second texture area, the corresponding pixels can be found using exactly the same procedure.

本発明の他の目的および特徴は、以下の図面を参照した
実施例説明より明らかになろう。
Other objects and features of the present invention will become apparent from the following description of embodiments with reference to the drawings.

(実施例) 第1a図に、本発明を一例で実施する、画像処理装置の
構成を示す。
(Embodiment) FIG. 1a shows the configuration of an image processing apparatus that implements the present invention by way of example.

この装置は、コンピュータ1.ITVカメラユニット2
ならびに39画像メモリ4.デイスプレィ5.プリンタ
6、フロッピーディスク7、およびキーボードターミナ
ル8等でなる。
This device consists of a computer 1. ITV camera unit 2
and 39 image memory 4. Display 5. It consists of a printer 6, a floppy disk 7, a keyboard terminal 8, etc.

ITVカメラユニット2および3は、それぞれ、前方の
シーンを撮像して512 X 512画素区分でアナロ
グデータを出力する同諸元のITVカメラ21゜31、
および、ITVカメラ21または31の出力アナログデ
ータをデジタル変換して256階gの原画像データを生
成するA/Dコンバータ22゜32でなる。
The ITV camera units 2 and 3 are ITV cameras 21 and 31 with the same specifications, respectively, which image the scene in front and output analog data in 512 x 512 pixel divisions.
and A/D converters 22 and 32 that digitally convert the output analog data of the ITV camera 21 or 31 to generate original image data of the 256th floor g.

ITV’カメラ21と31とは、第1b図に示すように
(ただし、これはITVカメラ21および31による撮
像のモデルを示し、各カメラの構造を示すものではない
)、ITVカメラ21を左にITVカメラ31を右にし
て水平に並べられており、それぞれの光軸211および
311は平行であり、かつ、それぞれの撮像面212お
よび312は同一面にある。したがって、各撮像面の上
辺をそれぞれXL軸yXR軸、左辺をそれぞれYL軸、
YR軸とするとき、XL軸とXR軸は同一直線上にあり
、YL軸と7代軸とは平行になる。なお、以下において
は、ITVカメラ21が撮像した画像を左画像と、IT
Vカメラ31が撮像した画像を右画像と呼ぶものとする
The ITV' cameras 21 and 31 are shown in FIG. They are arranged horizontally with the ITV camera 31 on the right, their optical axes 211 and 311 are parallel, and their imaging planes 212 and 312 are on the same plane. Therefore, the top side of each imaging plane is the XL axis, yXR axis, and the left side is the YL axis, respectively.
When the YR axis is used, the XL axis and the XR axis are on the same straight line, and the YL axis and the 7th generation axis are parallel. Note that in the following, the image captured by the ITV camera 21 will be referred to as the left image and the ITV camera 21.
The image captured by the V camera 31 will be referred to as a right image.

画像メモリ4は読み書き自在であり、左画像や右画像の
原画像データを始めとして種々の処理データを記憶する
The image memory 4 is readable and writable, and stores various processed data including original image data of the left image and right image.

デイスプレィユニット5およびプリンタ6はコンピュー
タ1の処理結果等を出力し、フロッピーディスク7はそ
の処理結果等を登録しておく。また、キーボードターミ
ナル8はオペレータにより操作されて、各種の指示が入
力される。
The display unit 5 and printer 6 output the processing results of the computer 1, and the floppy disk 7 registers the processing results. Further, the keyboard terminal 8 is operated by an operator to input various instructions.

コンピュータ1には、さらにホストコンピュータが接続
されており、そこから与えられた指示、またはキーボー
ドターミナル8より与えられた指示に従って各部を制御
し、対応する処理を行なう。
A host computer is further connected to the computer 1, and controls each section according to instructions given from the host computer or instructions given from the keyboard terminal 8, and performs corresponding processing.

以下、その処理のうち、前方のシーンの3次元グラフィ
ック表示を行なうための、″立体処理″について説明す
る。
Among these processes, "stereoscopic processing" for displaying three-dimensional graphics of the scene in front will be described below.

第2図は、キーボードターミナル8より与えられた立体
処理実行指示により起動される立体処理ルーチンの概略
を示すゼネラルフローであり、第3a図〜第3h図はそ
の中の重要ステップを詳細に示すサブフローである。
FIG. 2 is a general flow showing an outline of a stereoscopic processing routine that is activated by a stereoscopic processing execution instruction given from the keyboard terminal 8, and FIGS. 3a to 3h are subflows showing important steps therein in detail. It is.

コンピュータ1は、立体処理の開始に当って、Sl (
フローチャートのステップに付した番号を示す:以下同
義)において画像メモリ4およびこの処理で用いるレジ
スタを初期化し、S2においてITVカメラユニット2
および3を介して左画像および右画像の原画像データを
画像メモリ4内に書き込む。この後、S3において、各
画像の画像分割を行なう。
At the start of the three-dimensional processing, the computer 1 uses Sl (
In S2, the image memory 4 and the registers used in this process are initialized, and in S2 the ITV camera unit 2 is initialized.
and 3, the original image data of the left image and the right image are written into the image memory 4. After this, in S3, each image is divided.

この画像分割について第3a図を参照して説明する。This image division will be explained with reference to FIG. 3a.

5101においては、左画像に対して順方向ラスタスキ
ャンを設定する。順方向ラスタスキャンは、第1b図に
示す撮像領域212 (312)内を、XL(XR)軸
を主走査軸とし、YL(YR)軸を副走査軸として左上
端画素から右下画素に至る経路で各画素に注目する走査
をいい、ここでは、その走査開始位置を初期化する。な
お、因みに後述する逆方向ラスタスキャンは、この逆に
、右下端画素から左上画素に至る経路で各画素に注目す
る走査をいう。
In 5101, forward raster scan is set for the left image. Forward raster scanning is performed within the imaging area 212 (312) shown in Figure 1b, with the XL (XR) axis as the main scanning axis and the YL (YR) axis as the sub-scanning axis, from the upper left pixel to the lower right pixel. This is a scan that focuses on each pixel along the path, and here the scan start position is initialized. Incidentally, the reverse raster scan, which will be described later, refers to a scan in which each pixel is focused on a path from the lower right pixel to the upper left pixel.

8102〜5105では、順方向ラスタスキャンを行な
いながら微分データおよび傾きデータを生成し、微分デ
ータのヒストグラムを作成する。
In steps 8102 to 5105, differential data and slope data are generated while performing forward raster scanning, and a histogram of the differential data is created.

微分データは、注目画素およびその8近傍画素の原画像
データを第4図に示すように呼称するとき、 (pz +P2 +P8)−(pa +ps +pa)
で与えられる主走査方向微分データと。
The differential data is (pz +P2 +P8) - (pa +ps +pa) when the original image data of the pixel of interest and its 8 neighboring pixels are called as shown in Figure 4.
The main scanning direction differential data given by .

(P2 +Pa +P4)−(P6 +P7 +ps 
)で与えられる副走査方向微分データとの和であり。
(P2 +Pa +P4) - (P6 +P7 +ps
) is the sum of the sub-scanning direction differential data given by

原画像データの空間的な変化量を示す、また、傾きデー
タは、上記の主走査方向微分データと副走査方向微分デ
ータとの比、すなわち、 副走査方向微分データl主走査方向微分データを8分類
したものであり、原画像データが空間的に変化して行く
方向を示す、コンピュータ1は。
The tilt data, which indicates the amount of spatial change in the original image data, is the ratio of the above-mentioned main scanning direction differential data and sub-scanning direction differential data, i.e., sub-scanning direction differential data l main scanning direction differential data to 8 The computer 1 shows the direction in which the original image data spatially changes.

これらのデータを各・画素に対応付けして画像メモリ4
に書き込む。
These data are associated with each pixel and stored in the image memory 4.
write to.

ヒストグラムは微分データの大きさと出現頻度を求めた
ものであり、コンピュータ1は順方向ラスクスキャンを
終了すると、5106においてこのヒストグラムより閾
値を設定して微分データを2値化し、2値化データを各
画素に対応付けして記憶する。
The histogram is obtained by determining the size and appearance frequency of the differential data. When the computer 1 completes the forward rask scan, the computer 1 sets a threshold value from this histogram in step 5106, binarizes the differential data, and converts the binarized data into individual data. It is stored in association with the pixel.

このようにして2値化した結果、原画像データが空間的
に急激に変化する部位、すなわちパエッジ〃が検出され
る。このエツジが、前方シーンに存在する物の輪郭やテ
クスチャを示しているときにはそれが連続となることが
好ましいが、撮像条件等により、必ずしも連続とはなら
ない、そこで、5107において再び順方向ラスクスキ
ャンを設定すると、3108以下において不連続なエツ
ジを接続する処理を行なう。
As a result of binarization in this manner, a region where the original image data changes rapidly spatially, that is, a part edge is detected. It is preferable that these edges be continuous when they indicate the outline or texture of an object existing in the front scene, but they are not necessarily continuous depending on the imaging conditions, etc. Therefore, forward rask scanning is performed again in 5107. When set, processing is performed to connect discontinuous edges below 3108.

8108において、未だ接続処理を行なっていないエツ
ジの端点画素(エツジの切れ目画素)を検出すると順方
向ラスクスキャンを中断して、その画素を注目画素とし
、5109においてその8近傍画素から、注目画素の傾
きデータが示す方向にある画素を延長候補画素に選定し
、5110においてその判定を行なう、ここでは、延長
候補画素、および、それに注目画素の傾きデータと直交
する方向に連結する両側2画素の微分データを比較し、
延長候補画素対応微分データが最大であれば尾根と判定
する。
In 8108, when an end point pixel of an edge (edge break pixel) that has not yet been subjected to connection processing is detected, the forward rask scan is interrupted, that pixel is set as the pixel of interest, and in 5109, the pixel of interest is selected from its 8 neighboring pixels. A pixel in the direction indicated by the tilt data is selected as an extension candidate pixel, and the determination is made in 5110. Here, the extension candidate pixel and the differential of two pixels on both sides connected to it in a direction orthogonal to the tilt data of the pixel of interest are selected. Compare the data and
If the differential data corresponding to the extension candidate pixel is maximum, it is determined to be a ridge.

尾根と判定した場合には5111においてその延長候補
画素にエツジを延長する。このとき、延長した画素が再
び端点画素となる場合には5112から5109に戻り
それに注目して上記を繰り返すが、そうでないとき番;
はエツジが接続されたことになるので、5115に進み
順方向ラスクスキャンを再開する。また、・尾根で゛な
いと判定した場合には5113において上記の延長候補
画素の両側2画素のうちの山側の画素に延長候補画素を
更新する。
If it is determined that the edge is a ridge, the edge is extended to that extension candidate pixel in step 5111. At this time, if the extended pixel becomes an endpoint pixel again, the process returns from 5112 to 5109 and the above is repeated, paying attention to it, but if not;
Since the edge has been connected, the process proceeds to 5115 and restarts the forward rask scan. If it is determined that the pixel is not a ridge, the extension candidate pixel is updated in step 5113 to the pixel on the mountain side of the two pixels on both sides of the extension candidate pixel.

この・とき、更新した延長候補画素が注目画素の8近傍
にあれば5110に戻り上記の判定を行なうが、それを
□外れた場合にはエツジは切れているものとして511
5に進み順方向ラスクスキャンを再開する。
At this time, if the updated extension candidate pixel is in the 8 neighborhood of the pixel of interest, the process returns to 5110 and performs the above determination; however, if it is outside of □, the edge is assumed to be cut and the process returns to 5110.
Proceed to step 5 and restart the forward rask scan.

左画像について以上の画像分割を終了すると、全く同じ
手順で右画像の画像分割を実行する。
After completing the above image segmentation for the left image, image segmentation for the right image is performed using exactly the same procedure.

第5a図および第5b図は、ある左画像および右画像に
対してそれぞれ画像分割を行なった結果を示す、これよ
り、ポット、メロン、カップならびにソーヤの輪郭およ
びメロンのテクスチャが線画で明確に表わされているこ
とがわかる。
Figures 5a and 5b show the results of image segmentation for a certain left image and right image, respectively. From this, the contours of the pot, melon, cup, and sawyer and the texture of the melon are clearly represented in the line drawings. I can see that I am being ignored.

コンピュータ1は1画像分割を終了すると84において
各画像の高エツジ密度領域の抽出を行なう、これについ
て第3b図を参照して説明する。
When the computer 1 finishes dividing one image, it extracts high edge density regions of each image at 84, which will be described with reference to FIG. 3b.

ここでは、8201において左画像に対する順方向ラス
クスキャンを設定し、S 202〜5213でなるルー
プを実行する。
Here, a forward rask scan is set for the left image in step 8201, and a loop consisting of steps S202 to S5213 is executed.

5202においては注目画素を中心とするnXn画素(
本実施例ではn=21とした)でなるウィンドを設定し
、5203においてはレジスタMeをクリアし、520
4においてはウィンド内の順方向ラスクスキャンを設定
する。
5202, nXn pixels (
In this example, n=21) is set, register Me is cleared in 5203, and 520
4, a forward rask scan within the window is set.

8205〜5208はウィンド内のエツジ構成画素をカ
ウントするループであり、その数はレジスタM6に格納
される。
8205 to 5208 are loops for counting edge constituent pixels within the window, and the number is stored in register M6.

3209〜8211は、ウィンド内の全画素(n X 
n)に対するエツジ構成画素(レジスタMeの値)の割
合(M e/n X n)からエツジ密度を判定し、所
定密度Pa” (本実施例では1/6とした)を超える
とき、高エツジ密度領域の画素であるとしてその注目画
素に対応して“高′″(高エツジ密度領域の画素を示す
ラベル)を書き込む。
3209 to 8211 are all pixels within the window (n
The edge density is determined from the ratio (M e/n x n) of the edge constituent pixels (value of the register Me) to Assuming that the pixel is a pixel in a high density area, "high" (a label indicating a pixel in a high edge density area) is written corresponding to the pixel of interest.

左画像について以上の高エツジ密度領域の抽出を終了す
ると、全く同じ手順で右画像の高エツジ密度領域の抽出
を実行する6 第6a図および第6b図は、前述した第5a図および第
5b図について、それぞれ高エツジ密度領域の抽出を行
なった結果であり、抽出領域を黒画素で示している。こ
れらの図には、第5a図および第5b図より高エツジ密
度領域と当然予想されるメロンを示す領域が抽出されて
いるが、その輪郭はあまり鮮明ではない。
When the extraction of the high edge density region for the left image is completed, the extraction of the high edge density region for the right image is performed in exactly the same procedure. These are the results of extracting high edge density regions for each, and the extracted regions are shown as black pixels. In these figures, an area indicating a melon, which is naturally expected to be a high edge density area from FIGS. 5a and 5b, is extracted, but its outline is not very clear.

コンピュータ1は、高エツジ密度領域の抽出を終了する
と85において各画像の領域のラベリングを行なう。こ
れについて第3C図を参照して説明する。
When the computer 1 finishes extracting the high edge density regions, it labels the regions of each image in step 85. This will be explained with reference to FIG. 3C.

5301においては左画像に対する順方向ラスタスキャ
ンを設定し、5302においてはラベルデータを−様な
面の領域用の初期値L″にセットする。
In step 5301, forward raster scan is set for the left image, and in step 5302, label data is set to an initial value L'' for the region of the --like surface.

注目画素がエツジ構成画素であり、かつ、ラベリングの
済んでいない画素であれば、順方向ラスタスキャンを中
断して、 5305においてレジスタMtおよびMrを
クリアし、5306〜5311でなるループにおいて、
エツジを追跡しながら、エツジを構成する画素に対応付
けてラベルデータLを書き込み、レジスタMrにそのエ
ツジを構成する画素数をカウントし、レジスタMtにそ
のエツジの高エツジ密度領域に含まれる部分の画素数を
カウントする。このエツジ追跡においては、分岐がある
毎に追跡方向に対して一定方向のエツジを選択する。し
たがって、第7a図に示すように、エツジが複数の閉じ
た領域を構成しているときには、そのうちの、最小単位
となる閉領域(例えばR1)の周縁を追跡することにな
る。また、レジスタMrのカウント値はその閉領域の周
縁画素数を、レジスタMtのカウント値は高エツジ密度
領域の抽出による画像(ハツチングで示す)を重ねたと
きにそれに含まれるその閉領域の周縁画素数をそれぞれ
示すものとなる。
If the pixel of interest is an edge constituent pixel and has not been labeled, forward raster scanning is interrupted, registers Mt and Mr are cleared in 5305, and in a loop consisting of 5306 to 5311,
While tracking the edge, label data L is written in association with the pixels that make up the edge, the number of pixels that make up the edge is counted in the register Mr, and the number of pixels included in the high edge density area of the edge is written in the register Mt. Count the number of pixels. In this edge tracking, an edge in a certain direction with respect to the tracking direction is selected every time there is a branch. Therefore, as shown in FIG. 7a, when edges constitute a plurality of closed regions, the periphery of the smallest unit of the closed regions (for example, R1) is tracked. In addition, the count value of the register Mr indicates the number of peripheral pixels of the closed region, and the count value of the register Mt indicates the number of peripheral pixels of the closed region included when images (indicated by hatching) extracted from the high edge density region are superimposed. Each number represents a number.

5312においては、レジスタMrのカウント値とレジ
スタMtのカウント値の比を求める。この比は、追跡し
たエツジのうち、高エツジ密度領域に含まれる割合を示
すものであり、この比が所定値Ms” (本実施例では
0.5としている)以下のときには−様な面の領域と判
定し、5314においてラベルデータLを1インクリメ
ントした後、順方向ラスタスキャンを再開するが、所定
値Msを超えるときにはテクスチャ領域と判定し、53
15〜5317において再度エツジを追跡しながら、エ
ツジを構成する画素に対応付けて書き込んだラベルデー
タをt“に書き換えた後、順方向ラスタスキャンを再開
する。
At 5312, the ratio between the count value of register Mr and the count value of register Mt is determined. This ratio indicates the proportion of traced edges that are included in the high edge density region, and when this ratio is less than a predetermined value Ms" (0.5 in this example), the --like surface is After determining that the area is a texture area and incrementing the label data L by 1 in 5314, forward raster scanning is restarted, but when it exceeds a predetermined value Ms, it is determined that it is a texture area, and the label data L is incremented by 1 in 5314.
15 to 5317, while tracing the edge again, the label data written in association with the pixels constituting the edge is rewritten to t'', and then the forward raster scan is resumed.

以上の処理により、−様な面の領域のエツジには、それ
ぞれを識別するラベルが付され、テクスチャ領域のエツ
ジには共通のラベルt′が付される。これは、テクスチ
ャ領域のエツジは第5a図および第5b図に示されるよ
うに無数にあり、そ九ぞれに独立なラベルを付すること
か実際的でないとの判断による。例えば、第7a図の場
合には、各小領域を構成するエツジの全部あるいは殆ど
が高エツジ密度領域に含まれているので、その全ての画
素に対応するラベルデータはt″となる。
As a result of the above processing, the edges of the --like surface area are labeled with labels that identify them, and the edges of the texture area are assigned a common label t'. This is because the texture area has an infinite number of edges as shown in FIGS. 5a and 5b, and it was determined that it would be impractical to label each edge independently. For example, in the case of FIG. 7a, all or most of the edges constituting each small area are included in the high edge density area, so the label data corresponding to all the pixels is t''.

5321〜5327でなるループにおいては、順方向ラ
スタスキャンを行いながら、エツジで閉じられる領域内
に、そのエツジと同じラベルを付する。
In the loop consisting of 5321 to 5327, the same label as the edge is attached to the region closed by the edge while performing forward raster scanning.

つまり、注目画素のラベルデータが初期化のままのとき
(0)には、その上下左右に連続する画像に付されたラ
ベルデータを各方向毎に読み取り、各方向に共通するラ
ベルデータがあるときはそのラベルデータを注目画素の
ラベルデータとして書き込み、共通するラベルデータが
ないときは背景画素であることを示すラベルデータ# 
A 11を注目画素のラベルデータとして書き込む。た
だし、これにおいて、エツジで閉じられる領域内に別の
エツジで閉じられる領域があり、各方向に共通するラベ
ルデータは複数になるときには、複数の共通するラベル
データのうち、ラスタスキャンにおいて出現した順序が
最も新しいものを注目画素のラベルデータとする。
In other words, when the label data of the pixel of interest remains initialized (0), label data attached to consecutive images above, below, left, and right is read in each direction, and when there is common label data in each direction, writes that label data as the label data of the pixel of interest, and if there is no common label data, label data # indicating that it is a background pixel is written.
Write A11 as label data of the pixel of interest. However, in this case, if there is an area closed by another edge within the area closed by an edge, and there is more than one label data common in each direction, the order in which the multiple common label data appear in the raster scan Let the newest one be the label data of the pixel of interest.

例えば、ラベルデータL1を付したエツジで囲まれる領
域A1内にラベルデータL2を付したエツジで囲まれる
領域A2があるとき、ラスタスキャンにおいては、領域
A1外の画素、領域A1内であって領域A2外の画素、
領域A2内の画素、領域A1内であって領域A2外の画
素、領域Ai外の画素、の順で注目し、領域A1外の画
素に注目したときには共通するラベルデータがな−ので
ラベルデータ“A”を注目画素のラベルデータとして書
き込み、領域Ai内であって領域A2外の画素に注目し
たときには共通するラベルデータL1を検出するのでそ
れを注目画素のラベルデータとして書き込み、領域A2
内の画素に注目したときには共通するラベルデータL1
およびL2を検出するが、そのうち後から出現したラベ
ルデータL2をその注目画素のラベルデータとする。
For example, when there is an area A2 surrounded by edges with label data L2 within an area A1 surrounded by edges with label data L1, in raster scanning, pixels outside area A1, pixels within area A1 and areas Pixels outside A2,
Pay attention to pixels in area A2, pixels in area A1 but outside area A2, and pixels outside area Ai in that order. When paying attention to pixels outside area A1, there is no common label data, so label data "A'' is written as label data of the pixel of interest, and when paying attention to a pixel within area Ai but outside area A2, common label data L1 is detected, so it is written as label data of the pixel of interest, and area A2
When paying attention to the pixels within, the common label data L1
and L2 are detected, and the label data L2 that appears later is taken as the label data of the pixel of interest.

以上の左画像に対する処理と同様の処理を右画像に対し
て実行する。
Processing similar to the above processing for the left image is executed for the right image.

第8a図および第8b図は、前述した第5a図および第
6a図あるいは第5b図および第6b図を構成するデー
タを用いて上記の処理を行ない、テクスチャ領域のみを
示した結果である。これらの図と第6a図および第6b
図とを比較すると、メロンを示す領域が鮮明に抽出され
ていることがわかる。これは、第7b図に示すように、
エツジを基準に高エツジ密度領域を切出したため、境界
が連続したことによる。
FIGS. 8a and 8b show the results of performing the above processing using the data constituting the aforementioned FIGS. 5a and 6a or FIGS. 5b and 6b, and showing only the texture area. These figures and figures 6a and 6b
Comparing with the figure, it can be seen that the area indicating the melon is clearly extracted. This is shown in Figure 7b,
This is because the boundary is continuous because the high edge density region was extracted based on the edges.

コンピュータ1は、領域のラベリングを終了すると86
において各画像のテクスチャ領域の統合およびラベリン
グを行なう、これについて第3d図を参照して説明する
When the computer 1 finishes labeling the area, it returns 86
In this step, the texture regions of each image are integrated and labeled, which will be described with reference to FIG. 3d.

5401においては左画像に対する順方向ラスタスキャ
ンを設定し、5402においてはラベルデータをテクス
チャ領域用の初期値T“にセットする。
In 5401, forward raster scan is set for the left image, and in 5402, label data is set to an initial value T'' for the texture area.

テクスチャ領域には、前述のラベリングによりラベルデ
ータとして共通の値t0を書き込んでいるので、540
3および5404においてそれを見ながらテクスチャ領
域の画素を探索する。その画素が領域境界の画素であり
、未処理であれば、順方向うスタスキャンを中断し、S
40フ〜5409でなるループにおいて、領域境界画素
を追跡しながら各画素に対応付けしてラベルデータをT
に書換える。
In the texture area, the common value t0 is written as label data by the above-mentioned labeling, so 540
3 and 5404, the pixels of the texture area are searched for while looking at it. If the pixel is a pixel at the boundary of the area and has not been processed, forward scan is interrupted and S
In the loop consisting of steps 40 to 5409, label data is assigned to each pixel while tracking region boundary pixels.
Rewrite it to .

1つのテクスチャ領域についてこれを終了すると、54
10においてラベルデータTを1インクリメントするの
で、順方向ラスタスキャンを終了すると、各テクスチャ
領域を識別するラベルが、各テクスチャ領域の境界画素
に対応して付される。
Finishing this for one texture area leaves 54
Since the label data T is incremented by one in step 10, when the forward raster scan is completed, a label for identifying each texture area is attached corresponding to the boundary pixel of each texture area.

次に、 8414〜5419でなるループにおいて、順
方向ラスタスキャンを行いながら、各テクスチャ領域の
境界画素に対応して付したラベルをその領域内の全画素
に付する。これは、ラベルデータt”により弁別できる
各テクスチャ領域内の画素を検出する毎に、その左隣の
画素(以下左画素:周縁画素または処理済み画素である
)に対応するラベルデータを読み取り、それを用いて注
目画素対応のラベルデータを書き換えることによりなさ
れる。
Next, in a loop consisting of steps 8414 to 5419, while forward raster scanning is performed, the labels attached corresponding to the boundary pixels of each texture area are attached to all pixels in that area. Each time a pixel in each texture area that can be distinguished by label data t'' is detected, the label data corresponding to the pixel to the left of the pixel (hereinafter left pixel: peripheral pixel or processed pixel) is read and the label data is read. This is done by rewriting the label data corresponding to the pixel of interest using .

以上と同様の処理を右画像に対しても行なう。Processing similar to the above is also performed on the right image.

このように、83〜S6の処理を実行した結果、左右画
像毎に、−様な面の領域とテクスチャ領域が、それぞれ
独立な領域として認識される単位で分割される。
In this way, as a result of executing the processes from 83 to S6, the --like surface area and texture area are divided into units that are recognized as independent areas for each left and right image.

続いて、コンピュータ1は、S7において左画像の各領
域の境界線と右画像の各領域の境界線とを特徴量により
対応付ける。これについて第3e図を参照して説明する
Subsequently, in S7, the computer 1 associates the boundaries of each area of the left image with the boundaries of each area of the right image using feature amounts. This will be explained with reference to FIG. 3e.

5501においては左画像に対する以下の5502〜5
512でなるループの順方向ラスタスキャン処理を設定
する。
In 5501, the following 5502 to 5 for the left image
The forward raster scan process of the loop consisting of 512 is set.

5502においては注目画素に対応するラベルデータを
読み取り、それが″A”でなければ、その注目画素は−
様な面の領域またはテクスチャ領域に属するので、55
04において、そのラベルデータに対応付けした画素カ
ウンタを1アツプし、そのラベルデータに対応付けした
和階調を格納するレジスタに注目画素の原画像データ(
階調データ)を加え、そのラベルデータに対応付けした
2乗和階調を格納するレジスタに注目画素の原画像デー
タの2乗を加える。
At 5502, the label data corresponding to the pixel of interest is read, and if it is not "A", the pixel of interest is -
Since it belongs to a similar surface area or texture area, 55
04, the pixel counter associated with the label data is incremented by 1, and the original image data of the pixel of interest (
gradation data) is added, and the square of the original image data of the pixel of interest is added to a register that stores the sum-of-squares gradation associated with the label data.

このときの注目画素が、未処理の境界画素であれば、順
方向ラスタスキャンを中断し、8507〜5509でな
るループにおいて、領域を左に見ながら境界画素を追跡
し、注目画素とその4つ先(追跡において)の画素の座
標から直線近似により注目画素のベクトルデータを求め
、注目画素に対応付けて書き込む。これを終了すると、
5510においてそのとき求めたベクトルデータを参照
し、ベクトルデータの近似性および画素の連続性からそ
の領域の境界線をセグメンテーションし、各セグメント
のラベル、始点および終点の座標、所属領域のラベルを
テーブルにまとめる。
If the pixel of interest at this time is an unprocessed boundary pixel, the forward raster scan is interrupted, and in a loop consisting of 8507 to 5509, the boundary pixel is traced while looking at the area to the left, and the pixel of interest and its four Vector data of the pixel of interest is obtained from the coordinates of the previous pixel (in tracking) by linear approximation, and is written in association with the pixel of interest. When you finish this,
In step 5510, the vector data obtained at that time is referred to, and the boundary line of the area is segmented based on the proximity of the vector data and the continuity of pixels, and the label of each segment, the coordinates of the start point and end point, and the label of the area to which it belongs are placed in a table. Summarize.

この後、順方向ラスクスキャンを再開し、上記を繰り返
すと、各領域の境界線のセグメンテーションが完了し、
各領域毎にその構成画素数、構成画素対応の原画像デー
タの総和および2乗和が求まるので、5513において
はこれらのデータを用いて各領域の平均階調および階調
の分散を求める。
After this, restart the forward rask scan and repeat the above to complete the segmentation of the boundaries of each region,
Since the number of constituent pixels and the sum and square sum of the original image data corresponding to the constituent pixels are determined for each region, in step 5513, these data are used to find the average gradation and gradation variance of each region.

各領域の構成画素数、平均階調および分散は、それぞれ
の領域の特徴量となる。
The number of constituent pixels, average gradation, and variance of each region are the feature amounts of each region.

5514においては、上記と同様にして右画像内の各領
域の境界線のセグメンテーション、および各領域の特徴
量検出を実行する。
In step 5514, segmentation of the boundaries of each area in the right image and feature amount detection of each area are performed in the same manner as above.

、S 515においては、左画像の各領域と右画像の各
領域とを対応付けする。この際、左画像の領域の特徴量
と、その候補となる右画像の領域の特徴量が許容範囲で
等しいことを条件とする。
, S515, each region of the left image is associated with each region of the right image. At this time, the condition is that the feature amount of the region of the left image and the feature amount of the region of the right image that is a candidate thereof are equal within a permissible range.

8516においては、左右画像で互いに対応付けされた
領域の境界線のセグメントを対応付ける。
In step 8516, segments of the boundaries of mutually correlated regions in the left and right images are correlated.

ここでは、両セグメントの始点および終点が許容範囲に
おいて等しいエピポーラ線上にあり、かつ、それらを結
ぶ線分の傾きおよび長さが許容範囲で等しく、その線分
に対して領域の存在する方向が等しいことを条件とする
。このようにして、左右画像の境界線のセグメントを対
応付けると、左画像の境界線のセグメントを構成する画
素に対する、右画像の境界線のセグメントを構成する画
素との視差(各画像を重ねたときの主走査方向のずれ)
を求め、前者(左画像の境界線のセグメントを構成する
画素)に対応付けて記憶する。
Here, the start and end points of both segments are on the same epipolar line within a tolerance range, the slope and length of the line segment connecting them are equal within a tolerance range, and the direction in which the area exists with respect to the line segment is equal. The condition is that. In this way, when the border segments of the left and right images are associated, the parallax between the pixels that make up the border segment of the left image and the pixels that make up the border segment of the right image (when the images are overlapped) deviation in the main scanning direction)
is determined and stored in association with the former (pixels forming the segment of the boundary line of the left image).

コンピュータ1は、さらに、S8において左画像の各テ
クスチャ領域の境界線と右画像の各テクスチャ領域の境
界線とを相関により対応付ける。
Further, in S8, the computer 1 correlates the boundaries of each texture area of the left image with the boundaries of each texture area of the right image.

これについて第3f図を参照して説明する。This will be explained with reference to FIG. 3f.

5601においては左画像に対する以下の5602〜5
618でなるループの順方向ラスクスキャン処理を設定
する。
In 5601, the following 5602 to 5 for the left image
The forward rask scan process of the loop consisting of 618 is set.

8602〜5605において、未処理のテクスチャ領域
の境界画素を検出すると、順方向ラスクスキャンを中断
して8606以下に進む。
When a boundary pixel of an unprocessed texture area is detected in steps 8602 to 5605, the forward rask scan is interrupted and the process proceeds to steps 8606 and subsequent steps.

未処理の境界画素は、前述の特徴量による境界線の対応
付けにおいて対応画素との視差データを有しているので
、8606においてそれを読み取り。
Since the unprocessed boundary pixel has parallax data with the corresponding pixel in the boundary line association using the feature amount described above, it is read in 8606.

レジスタDに格納する。Store in register D.

5607においては、注目画素(検出した未処理の境界
画素)を中心とするm X m ’画素(本実施例では
m = m ’ = 7とした)に対応する原画像デー
タの総和(以下m X m ’和階調という)を演算し
てレジスタEおよびe□に格納し、S 6011におい
ては、視差データD(レジスタDの値−便宜上同記号を
用いている:他について同義)がら2を減じた値をレジ
スタiに、それに2を加えた値をレジスタIに、それぞ
れ格納する。
5607, the sum of original image data (hereinafter m m' sum gradation) is calculated and stored in registers E and e□, and in S 6011, 2 is subtracted from the parallax data D (value of register D - the same symbol is used for convenience; the same meaning for the others). The obtained value is stored in register i, and the value obtained by adding 2 to it is stored in register I, respectively.

5609において注目画素との視差がiとなる右画像の
画素(以下右画像の視差1画素という)のm X m 
’和階調を求めてレジスタaiに格納し。
In 5609, m X m of the pixel of the right image whose parallax with the pixel of interest is i (hereinafter referred to as the parallax 1 pixel of the right image)
'Determine the Japanese gradation and store it in register ai.

S 610においては、レジスタeOの値とレジスタe
iの値の差、すなわち、注目画素のm X m ’和階
調と視差1画素のm X m ’和階調の差と、レジス
タEの値とを比較する。このとき、前者が後者未満であ
ればS 611においてレジスタEに前者を格納し、レ
ジスタDにレジスタiの値を格納する。
In S 610, the value of register eO and register e
The difference in the value of i, that is, the difference between the m x m ' sum gradation of the pixel of interest and the m x m ' sum gradation of the pixel with one parallax, is compared with the value of register E. At this time, if the former is less than the latter, the former is stored in register E and the value of register i is stored in register D in S611.

この後、5612においてレジスタiを1インクリメン
トし、その値がレジスタ■の値を超えるまで、上記の処
理を繰り返す。
Thereafter, in step 5612, register i is incremented by 1, and the above process is repeated until the value exceeds the value of register (2).

つまり、本実施例においては、左右画像の互いに相関の
高い画素は、同一エピポーラ線上にあり。
In other words, in this embodiment, pixels that are highly correlated with each other in the left and right images are on the same epipolar line.

かつ、その周囲の階調が略等しいものとして、3609
〜5613において、注目画素のm x m ’和階調
に最も近いmXm’Xm調和有する右画素(相関が最も
高い右画素)を、右画像の視差り画素および主走査軸に
沿ったその前後4画素の中から選出している。
And assuming that the surrounding gradations are approximately equal, 3609
~ 5613, the right pixel (the right pixel with the highest correlation) having the mXm'Xm harmonic closest to the m x m' sum gradation of the pixel of interest is selected as the parallax pixel of the right image and the four pixels before and after it along the main scanning axis. It is selected from pixels.

5614においては、レジスタEの値、すなわち、注目
画素とこのとき選出した右画素の各mXm・和階調の差
を相関データとし、レジスタDの値、すなわち、その右
画素の視差を視差データとして注目画素に対応付けて記
憶する。
In 5614, the value of register E, that is, the difference in each mXm/sum gradation between the pixel of interest and the right pixel selected at this time, is used as correlation data, and the value of register D, that is, the parallax of the right pixel, is used as parallax data. It is stored in association with the pixel of interest.

5615において領域を左に見ながら境界画素を更新し
、8606以下の処理を繰り返す。
At step 5615, the boundary pixels are updated while looking at the area to the left, and the processing from step 8606 is repeated.

1つのテクスチャ領域の境界線について上記の相関によ
る対応付けを終了すると順方向ラスクスキャンを再開し
、全テクスチャ領域の境界線対応付けを行なう。
When the correlation based on the above-mentioned correlation is completed for the boundary line of one texture area, the forward rask scan is restarted, and the boundary line correspondence of all texture areas is performed.

第9a図は左画像のテクスチャ領域の境界線を示し、第
9b図は相関による対応付けを行なった結果の右画像、
すなわち、左画像の境界線を構成する画素の視差データ
で示される右画素を示す6以上のようにして、左右画像
のテクスチャ領域の境界線の対応付けを終了すると、次
に、S9において順方向ラスクスキャンを行ないながら
、各テクスチャ領域の左側の境界線の視差データに基づ
いて、その内側の画素の対応付けを行なう。
FIG. 9a shows the boundary line of the texture area of the left image, and FIG. 9b shows the right image as a result of correlation-based correspondence.
That is, after completing the correspondence between the boundaries of the texture areas of the left and right images in the manner shown in 6 or more indicating the right pixel indicated by the parallax data of the pixels forming the boundary of the left image, next, in S9, the forward direction While performing the rask scan, the pixels inside each texture area are associated with each other based on the parallax data of the left boundary line of each texture area.

まず、その処理の概念を第10a図、第10b図および
第10c図を参照して説明する。
First, the concept of the process will be explained with reference to FIGS. 10a, 10b, and 10c.

例えば、左画像の順方向ラスクスキャンを行なって注目
画素Po  (第4図に示した記号を準用:他について
同じ)を移動している間に、あるテクスチャ領域の左側
の境界線B−の構成画素の右隣の画素を検出したものと
する。この場合、注目画素Paの左隣の画素(左画素)
psは左側の境界線BLの構成画素となり、直上の画素
(上画素)psは処理を終了した画素となり、それぞれ
は視差データQあるいはUを有している1本実施例にお
いては隣接画素は互いに略等しい視差データを有するも
のと仮定し、これらの視差データaおよびUを注目画素
Paに適用して右画像の視差Ω画素po’ならびに主走
査軸に沿ったその前後4画素、および、右画像の視差上
画素po”ならびに主走査軸に沿ったその前後4画素を
求め、これらについて注目画素Poとの相関を検討する
。さらにその内側では、処理済みの視差データを用いて
同様の検討を繰り返す。
For example, while performing a forward rask scan of the left image and moving the pixel of interest Po (symbols shown in Fig. 4 apply mutatis mutandis; the same applies to the others), the configuration of the left boundary line B- of a certain texture area Assume that the pixel to the right of the pixel is detected. In this case, the pixel to the left of the pixel of interest Pa (left pixel)
ps is a constituent pixel of the left border line BL, and the pixel immediately above (upper pixel) ps is a pixel that has completed processing, each having parallax data Q or U. In this embodiment, adjacent pixels are Assuming that they have substantially equal parallax data, these parallax data a and U are applied to the pixel of interest Pa to obtain the parallax Ω pixel po' of the right image, the four pixels before and after it along the main scanning axis, and the right image. The above parallax pixel po" and the four pixels before and after it along the main scanning axis are determined, and the correlation with the pixel of interest Po is examined for these.Furthermore, inside this, the same examination is repeated using the processed parallax data. .

より具体的に第3g図を参照して説明する。This will be explained in more detail with reference to FIG. 3g.

5701において左画像に対して順方向ラスクスキャン
処理を設定し、 8702〜5705において未処理の
テクスチャ領域内画素を探索する。これを検出すると8
706以下に進む。
In step 5701, forward rask scan processing is set for the left image, and in steps 8702 to 5705, unprocessed pixels in the texture area are searched for. When this is detected, 8
Proceed to 706 and below.

8706においては注目画素の左画素の視差データを読
み取ってレジスタaに、上画素の視差データを読み取っ
てレジスタUに、それぞれ格納し、8707においては
注目画素のm X m ’和階調を演算してレジスタE
およびegに格納し、870Bにおいては視差データU
から2を減じた値をレジスタiに格納する。
In 8706, the parallax data of the pixel to the left of the pixel of interest is read and stored in register a, and the parallax data of the upper pixel is read and stored in register U. In 8707, the m x m ' sum gradation of the pixel of interest is calculated. Register E
and eg, and in 870B, parallax data U
The value obtained by subtracting 2 from 2 is stored in register i.

8710〜S 714テなるループは、前述したS 6
09〜5613でなるループと同じ処理を行なっており
、注目画素のm X m ’和階調に最も近いm X 
m ’和階調を有する右画素(相関が最も高い右画素)
を。
The loop from 8710 to S714 is the above-mentioned S6
The same processing as the loop consisting of 09 to 5613 is performed, and m
m' Right pixel with Japanese gradation (right pixel with the highest correlation)
of.

視差Qで指定される右画素および主走査軸に沿ったその
前後4画素の中から選出し、注目画素とその右画素の各
m x m ’和階調の差をレジスタEに、その右画素
の視差をレジスタDにそれぞれ格納している。
Select from the right pixel specified by the parallax Q and the four pixels before and after it along the main scanning axis, and store the m x m ' sum gradation difference between the pixel of interest and the pixel to its right in register E, and register the pixel to its right. The parallaxes of are stored in register D, respectively.

次に、5717〜5721でなるループにおいて視差デ
ータUを用いて全く同じ処理を行なう、これにより、右
画像の視差a画素ならびにその前後4画素および右画像
の視差上画素ならびにその前後4画素の中から、相関が
最も高い右画素が選択され、レジスタEにはその相関デ
ータが、レジスタDにはその画素の視差データが、それ
ぞれ格納されるので、5722においてそれらのデータ
を注目画素に対応付けて記憶する。
Next, in the loop consisting of 5717 to 5721, exactly the same processing is performed using the parallax data U, and thereby, the parallax a pixel of the right image and the 4 pixels before and after it, the pixel on the parallax of the right image, and the 4 pixels before and after it. The right pixel with the highest correlation is selected, and the correlation data is stored in register E, and the parallax data of that pixel is stored in register D. In 5722, these data are associated with the pixel of interest. Remember.

以上説明したように、この処理は左側の境界線の視差デ
ータをその内側の各画素に伝播させるものということが
できる。したがって、注目画素が左側の境界線から離れ
るに従ってその視差データの不確かさが増す、そこで、
S10において、今度は逆方向ラスクスキャンによりそ
の対応を補正する。
As explained above, this process can be said to propagate the parallax data of the left boundary line to each pixel inside the left boundary line. Therefore, as the pixel of interest moves away from the left border, the uncertainty of its disparity data increases.
In S10, the correspondence is corrected by reverse rask scanning.

第11a図〜第11c図を参照されたい。例えば、左画
像の逆方向ラスクスキャンを行なって注目画素Poを移
動している間に、あるテクスチャ領域の右側の境界線B
8の構成画素の左隣の画素を検出したものとする。この
注目画素p。は前述の初期対応処理で求めた視差データ
Dを有しており、また、その右隣の画素(右画素)ps
は右側の境界線BRの構成画素であるので、当然視差デ
ータrを有している。本来であれば、これらの視差デー
タは略等しくなるはずであるが、このときの注目画素P
aが左側の境界線BLから大きく離れているときには前
述したようにそれが異なることがある。その場合には、
右画像の視差り画素Paおよび右画像の視差1画素Po
IIならびに主走査軸に沿ったその前後4画素について
注目画素P。
Please refer to Figures 11a-11c. For example, while performing reverse rask scan of the left image and moving the pixel of interest Po, the right border B of a certain texture area
It is assumed that the pixel to the left of the constituent pixel No. 8 is detected. This pixel of interest p. has the parallax data D obtained in the above-mentioned initial correspondence process, and the pixel to the right of it (right pixel) ps
is a constituent pixel of the right boundary line BR, so it naturally has parallax data r. Normally, these parallax data should be approximately equal, but the pixel of interest P at this time
When a is far away from the left boundary line BL, it may be different as described above. In that case,
Parallax pixel Pa of the right image and parallax 1 pixel Po of the right image
II and the four pixels before and after it along the main scanning axis are the pixel of interest P.

との相関を検討する。さらにその内側では、処理済みの
視差データを用いて同様の検討を行なう。
Consider the correlation with Further inside, a similar study is performed using processed parallax data.

より具体的に第3h図を参照して説明する。This will be explained in more detail with reference to FIG. 3h.

5801において左画像に対して逆方向ラスクスキャン
処理を設定し、5802〜5805において未処理のテ
クスチャ領域内画素を探索する。;れを検出すると88
06以下に進む。
In 5801, reverse rask scan processing is set for the left image, and in 5802 to 5805, unprocessed pixels in the texture area are searched for. ;88 when detecting
Proceed to 06 and below.

8806においては注目画素の相関データを読み取って
レジスタEに、その視差データを読み取ってレジスタD
に、注目画素の右画素の視差データを読み取ってレジス
タrに、それぞれ格納し、5807においては注目画素
のmXm’Xm調和演算してレジスタeQに格納する。
At 8806, correlation data of the pixel of interest is read and stored in register E, and its parallax data is read and stored in register D.
Then, the parallax data of the pixel to the right of the pixel of interest is read and stored in the register r, and in step 5807, the mXm'Xm harmonic calculation of the pixel of interest is performed and stored in the register eQ.

8808においては、注目画素の視差データDと右画素
の視差データrとを比較し、それらの差が所定値Ps 
 (本実施例では2とする)未満であれば、その注目画
素の相関データEと視差データDを確定するが、そうで
ないときに1i8809以下の処理を行なう。
At 8808, the disparity data D of the pixel of interest and the disparity data r of the right pixel are compared, and the difference between them is set to a predetermined value Ps.
If it is less than (2 in this embodiment), the correlation data E and parallax data D of the pixel of interest are determined, but if not, the processing from 1i8809 onwards is performed.

8809以下は前述と同様であり、視差データrを用い
て右画像の視差り画素および、視差1画素とその前後4
画素の中から注目画素との相関の最も高い右画素を選出
し、注目画素に対応して記憶している相関データおよび
視差データをそれぞれ補正する。
The steps below 8809 are the same as above, and the parallax pixels of the right image, the 1 parallax pixel, and 4 pixels before and after it are calculated using the parallax data r.
The right pixel with the highest correlation with the pixel of interest is selected from among the pixels, and the correlation data and parallax data stored corresponding to the pixel of interest are each corrected.

以上、S10までの処理を終了すると、コンピュータ1
は、それぞれの画素に対応付けた視差データにより、各
ITVカメラユニットの設置位置から各画素に対応する
対象物上の点までの距離を算出する。これについて再度
第1b図を参照されたい。
After completing the processing up to S10, the computer 1
calculates the distance from the installation position of each ITV camera unit to the point on the object corresponding to each pixel using parallax data associated with each pixel. In this regard, please refer again to FIG. 1b.

同一の対象物上の点QをITVカメラ21および31で
撮像し、その画像について上記の処理を行なった結果、
左画像の画素QLと右画像の画素QRとが対応している
ことがわかったものとする。
As a result of imaging the point Q on the same object with the ITV cameras 21 and 31 and performing the above processing on the image,
Assume that it is found that the pixel QL of the left image corresponds to the pixel QR of the right image.

つまり点Qは、ITVカメラ21の焦点OLとその撮像
面211の画素QLとを結ぶ直線と、ITVカメラ31
の焦点?58とその撮像面311の画素QRとを結ぶ直
線との交点に存在することになる。
In other words, point Q is a straight line connecting the focal point OL of the ITV camera 21 and the pixel QL of the imaging surface 211, and the point Q
The focus of? 58 and the straight line connecting the pixel QR of the imaging surface 311.

したがって、ITVカメラ21および31の光軸間距離
2a、それらの焦点距離fを用いれば、画素QLとQR
との視差りより、 Z = 2 a f / D          ”・
(1)として対象物上の点Qまでの距離Zが求まる。
Therefore, if the distance 2a between the optical axes of the ITV cameras 21 and 31 and their focal length f are used, the pixels QL and QR
From the parallax with Z = 2 a f / D ”・
As (1), the distance Z to the point Q on the object is found.

Sttにおいてこの第(1)式に従って各画素毎に対応
する対象物上の点までの距離データを求め、S12にお
いてその距離データを用いてデイスプレィ5上に対象物
の立体表示を行なう。第12図はその一例を示し、第5
a図や第5b図等に示したものと同じ原画像の処理結果
を、そのうちのテクスチャ領域(メロン)のみについて
立体表示を行なったものである。この図を参照すると、
メロンの球形の曲面がよく表現されており、本実施例に
よる左画像と右画像との対応結果が正しいことがわかる
In Stt, distance data to the corresponding point on the object is obtained for each pixel according to equation (1), and in S12, a three-dimensional display of the object is performed on the display 5 using the distance data. Figure 12 shows an example.
The processing result of the same original image as shown in FIG. Referring to this diagram:
The spherical curved surface of the melon is well expressed, and it can be seen that the correspondence result between the left image and the right image according to this example is correct.

以上をまとめると、本実施例においてはITVカメラ2
1および31により撮像した左画像と右画像について次
の処理を加える。
To summarize the above, in this embodiment, the ITV camera 2
The following processing is applied to the left image and right image captured in steps 1 and 31.

(1)各画像毎に微分し、エツジを抽出による画像分割
を行なう; (2)各画像毎に空間的にエツジの存在密度が高い領域
を抽出する; (3)各画像のエツジ密度の低い領域にはそれぞれ個別
のラベルを、エツジ密度の高い領域には共通のラベルを
、それぞれ付する; (4)各画像のエツジ密度の高い領域のうち、それぞれ
独立な領域として認識可能な一塊りの領域をテクスチャ
領域として個別のラベルを付する;(5)各画像の各抽
出領域の境界線をセグメンテーションし、左画像のセグ
メントと右画像のセグメントとを特徴量に基づいて対応
付けする:(6)左画像のテクスチャ領域の境界線と右
画像のテクスチャ領域の境界線とを相関に基づいて対応
付けする; (7)左画像のテクスチャ領域の左側の境界線の視差デ
ータによりその領域内画素の視差データを求める; (8)左画像のテクスチャ領域の右側の境界線の視差デ
ータによりその領域内画素の視差データを補正する; (9)各画素の視差データよりカメラ設置位置から各画
素対応の対称物上の点までの距離を求め。
(1) Perform image segmentation by differentiating each image and extracting edges; (2) Extract regions with high spatial density of edges for each image; (3) Extract areas with low edge density in each image Each region is given an individual label, and regions with high edge density are given a common label. (4) Among the regions with high edge density in each image, a group of regions that can be recognized as independent regions Individually label the region as a texture region; (5) Segment the border of each extraction region in each image, and associate the segments of the left image and the segments of the right image based on the feature amount: (6 ) Correlate the boundary line of the texture area in the left image with the boundary line of the texture area in the right image based on correlation; (7) Use the disparity data of the left boundary line of the texture area in the left image to find the pixels in that area. Obtain parallax data; (8) Correct the parallax data of the pixels in the area using the parallax data of the right border of the texture region in the left image; (9) Calculate the parallax data of each pixel from the camera installation position using the parallax data of each pixel. Find the distance to the point on the object.

立体表示を行なう。Performs 3D display.

つまり、本実施例では、画像のテクスチャ領域とそうで
ない領域とを分割しているので、各領域に対して適切な
処理を行なうことができる。この分割においては、テク
スチャ領域内には、その構成基礎となる要素がある程度
の密度で配列されていることに注目しているので、処理
が簡単であり、また適切である。
That is, in this embodiment, since the image is divided into texture areas and non-texture areas, appropriate processing can be performed on each area. In this division, attention is paid to the fact that elements forming the basis of the texture area are arranged with a certain degree of density within the texture area, so the processing is simple and appropriate.

また、左画像と右画像との対応を求める際には、隣接す
る画素間の視差が略等しいことに注目して、まず領域の
境界の対応付けを行ない、左側の境界の視差に基づいて
領域内の視差を求めた後、右側の境界の視差に基づいて
これを補正している。テクスチャー領域のように構成要
素が多く、特徴量による対応付けが回置な場合にも簡単
かつ正確にこれをなし得る。
In addition, when determining the correspondence between the left image and the right image, note that the parallax between adjacent pixels is approximately equal, first correlate the boundaries of the regions, and then use the parallax of the left border to After determining the parallax within, this is corrected based on the parallax of the right border. This can be done easily and accurately even when there are many constituent elements, such as a texture area, and the correspondence based on feature amounts is inverted.

なお、上記実施例においては、左右の2画像を用いてい
るが、さらに多くの画像を処理する場合には上記同様の
処理をそれぞれについて行なえば良い。
Note that in the above embodiment, two images, left and right, are used, but if more images are to be processed, the same processing as described above may be performed for each.

また、エツジの抽出やエツジで囲む領域内画素のラベリ
ング(エツジのラベルの領域内伝播)、あるいは境界の
セグメンテーション等の手法は、−例を示したものであ
ることを付記しておく。
It should also be noted that techniques such as edge extraction, labeling of pixels within a region surrounded by edges (intra-region propagation of edge labels), and boundary segmentation are merely examples.

〔発明の効果〕〔Effect of the invention〕

以上説明したとおり、本発明によれば、テクスチャ領域
では、ある種の構成要素が比較的高密度で存在し、空間
的な限られた範囲では略等しい特性を有することに注目
し、テクスチャ領域の境界線の構成する画素に求めた対
応データをその内側に拡張しているので、処理が至って
簡単であり、信頼性も高い。
As explained above, according to the present invention, it is noted that certain constituent elements exist in a relatively high density in a texture region and have substantially equal characteristics in a limited spatial range, and Since the corresponding data found for the pixels forming the boundary line is expanded inside the boundary line, the processing is extremely simple and highly reliable.

また、実施例説明に示したように、第1のテクスチャ領
域内の画素の対応データを、第1のテクスチャ領域内を
一定の方向から逐次構成画素を注目することにより求め
た後、それとは逆の方向から逐次構成画素を注目するこ
とによりそれを補正すれば、処理精度が非常に高くなる
In addition, as shown in the example description, the corresponding data of pixels in the first texture area is obtained by sequentially focusing on the constituent pixels in the first texture area from a certain direction, and then the data is obtained in the opposite direction. If this is corrected by sequentially paying attention to the constituent pixels from the direction, the processing accuracy will be extremely high.

なお、対応を求めるテクスチャ領域が3以上の場合には
、その任意の1つを第1のテクスチャ領域とし、他を第
2のテクスチャ領域とす九ば、全く同じ手順で対応する
画素を求めることができる。
Note that if there are three or more texture regions for which correspondence is sought, any one of them is set as the first texture region, and the others are set as the second texture region, and the corresponding pixels are obtained using exactly the same procedure. I can do it.

【図面の簡単な説明】[Brief explanation of the drawing]

第1a図は本発明を一例で実施する画像処理装置の構成
を示すブロック図であり、第1b図は第1a図に示した
ITVカメラ21と31による撮像のモデルを示す模式
図である。 第2図、第3a図、第3b図、第3c図、第3d図。 第3al!l、第3f図、第3g図および第3h図は第
1a図に示したコンピュータ1の動作を示すフローチャ
ートである。 第4図は注目画素と8近傍画素との空間的な関係を示す
平面図である。 第5a図、第5b図、第6a図、第6b図、第7a図、
第7b図、第8a図、第8b図、第9a図、第9b図、
第10a図、第10b図、第10c図、第11a図、第
11b図、第11c図および第12図は第1a図に示し
たコンピュータ1の処理の具体的な例を示す平面図であ
る。 1:コンピュータ 2.3:ITVカメラユニット 21.31 : I T Vカメラ 22.32 : A / Dコンバータ4:画像メモリ 5:デイスプレィ 6:プリンタ 7:フロッピーディスク 8:キーボードターミナル 第 b 図 第 a 第2 図 図 第 ラa 図 第 a 図 第 b 図 第’+IJ 図 第 8a [′に1 第 a [ス1 第 81′1 図 第 b じ4
FIG. 1a is a block diagram showing the configuration of an image processing apparatus implementing the present invention as an example, and FIG. 1b is a schematic diagram showing a model of imaging by the ITV cameras 21 and 31 shown in FIG. 1a. Figures 2, 3a, 3b, 3c, and 3d. 3rd al! 1, 3f, 3g and 3h are flowcharts showing the operation of the computer 1 shown in FIG. 1a. FIG. 4 is a plan view showing the spatial relationship between the pixel of interest and eight neighboring pixels. Figures 5a, 5b, 6a, 6b, 7a,
Figure 7b, Figure 8a, Figure 8b, Figure 9a, Figure 9b,
10a, 10b, 10c, 11a, 11b, 11c, and 12 are plan views showing specific examples of the processing of the computer 1 shown in FIG. 1a. 1: Computer 2.3: ITV camera unit 21.31: ITV camera 22.32: A/D converter 4: Image memory 5: Display 6: Printer 7: Floppy disk 8: Keyboard terminal Figure b Figure a 2 Figure Laa Figure a Figure b Figure '+IJ Figure 8a [' to 1 Figure a [S1 Figure 81'1 Figure b Figure

Claims (4)

【特許請求の範囲】[Claims] (1)微小区分の画素で構成される原画像から分割した
第1のテクスチャ領域と第2のテクスチャ領域に対し、 第1のテクスチャ領域の境界線の特徴量と、第2のテク
スチャ領域の境界線の特徴量とを比較して第1のテクス
チャ領域の境界線を構成する画素と、第2のテクスチャ
領域の境界線を構成する画素との対応関係を示す対応デ
ータを第1のテクスチャ領域の境界線を構成する画素の
それぞれに対応付けて求め、 第1のテクスチャ領域内の画素と、少なくともそれに隣
接する画素の対応データで示される第2のテクスチャ領
域の画素と相関関係から、該第1のテクスチャ領域内の
画素の対応データを求め、第1のテクスチャ領域内の各
画素の対応データにより、それぞれに対応する第2のテ
クスチャ領域の画素を求める、画像処理方法。
(1) For the first texture area and the second texture area divided from the original image composed of pixels of minute sections, the feature amount of the boundary line of the first texture area and the boundary of the second texture area By comparing the line feature amounts, correspondence data indicating the correspondence between pixels forming the boundary line of the first texture area and pixels forming the boundary line of the second texture area is obtained from the first texture area. It is determined in association with each of the pixels constituting the boundary line, and from the correlation between the pixels in the first texture area and the pixels in the second texture area indicated by the corresponding data of at least the pixels adjacent to the first texture area. An image processing method that calculates corresponding data of pixels in a texture area, and calculates corresponding pixels of a second texture area based on the corresponding data of each pixel in the first texture area.
(2)前記第1のテクスチャ領域内の画素の対応データ
は、少なくとも第1のテクスチャ領域内を一定の方向か
ら、逐次構成画素を注目することにより求める、前記特
許請求の範囲第(1)項記載の画像処理方法。
(2) The correspondence data of the pixels in the first texture area is obtained by sequentially focusing on the constituent pixels in at least the first texture area from a certain direction. Image processing method described.
(3)前記第1のテクスチャ領域内の画素の対応データ
は、少なくとも第1のテクスチャ領域内を一定の方向か
ら、逐次構成画素を注目することにより求めた後、それ
とは逆の方向から、逐次構成画素を注目することにより
それを補正して求める、前記特許請求の範囲第(1)項
記載の画像処理方法。
(3) The corresponding data of the pixels in the first texture area is obtained by sequentially focusing on the constituent pixels in at least the first texture area from a certain direction, and then sequentially from the opposite direction. The image processing method according to claim 1, wherein the image processing method is performed by focusing on constituent pixels and correcting them.
(4)前記第1のテクスチャ領域と第2のテクスチャ領
域は、それぞれ同一対象を有する異なる原画像から分割
する、前記特許請求の範囲第(1)項、第(2)項また
は第(3)項記載の画像処理方法。
(4) Claims (1), (2), or (3), wherein the first texture area and the second texture area are each divided from different original images having the same object. Image processing method described in section.
JP63180621A 1988-07-20 1988-07-20 Image processing method Expired - Lifetime JP2843034B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63180621A JP2843034B2 (en) 1988-07-20 1988-07-20 Image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63180621A JP2843034B2 (en) 1988-07-20 1988-07-20 Image processing method

Publications (2)

Publication Number Publication Date
JPH0229878A true JPH0229878A (en) 1990-01-31
JP2843034B2 JP2843034B2 (en) 1999-01-06

Family

ID=16086416

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63180621A Expired - Lifetime JP2843034B2 (en) 1988-07-20 1988-07-20 Image processing method

Country Status (1)

Country Link
JP (1) JP2843034B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5463697A (en) * 1992-08-04 1995-10-31 Aisin Seiki Kabushiki Kaisha Apparatus for detecting an edge of an image
CN116452596A (en) * 2023-06-20 2023-07-18 深圳市捷超行模具有限公司 Visual detection method for glue overflow of injection molding of silica gel toy

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5463697A (en) * 1992-08-04 1995-10-31 Aisin Seiki Kabushiki Kaisha Apparatus for detecting an edge of an image
CN116452596A (en) * 2023-06-20 2023-07-18 深圳市捷超行模具有限公司 Visual detection method for glue overflow of injection molding of silica gel toy
CN116452596B (en) * 2023-06-20 2023-09-22 深圳市捷超行模具有限公司 Visual detection method for glue overflow of injection molding of silica gel toy

Also Published As

Publication number Publication date
JP2843034B2 (en) 1999-01-06

Similar Documents

Publication Publication Date Title
US20200027276A1 (en) Method and Apparatus for Representing a Virtual Object in a Real Environment
KR100411875B1 (en) Method for Stereo Image Disparity Map Fusion And Method for Display 3-Dimension Image By Using it
JP3242529B2 (en) Stereo image matching method and stereo image parallax measurement method
US5436672A (en) Video processing system for modifying a zone in successive images
JP5699788B2 (en) Screen area detection method and system
Rashidi et al. Innovative stereo vision-based approach to generate dense depth map of transportation infrastructure
JP3054681B2 (en) Image processing method
JP5538868B2 (en) Image processing apparatus, image processing method and program
JP4427052B2 (en) Image processing apparatus and area tracking program
JP2961264B1 (en) Three-dimensional object model generation method and computer-readable recording medium recording three-dimensional object model generation program
US5974170A (en) Method of detecting relief contours in a pair of stereoscopic images
JPH0991436A (en) Image processing method and device therefor
JP4337203B2 (en) Distance image generating apparatus, distance image generating method, and program providing medium
JPH05215547A (en) Method for determining corresponding points between stereo images
JPH11248431A (en) Three-dimensional model forming apparatus and computer readable medium recorded with three-dimensional model generating program
JPH08329110A (en) Method for processing picture
JPH0229878A (en) Image processing method
TWI595446B (en) Method for improving occluded edge quality in augmented reality based on depth camera
JPH0229879A (en) Image processing method
JP2000331160A (en) Device and method for matching and recording medium stored with matching program
JP3419968B2 (en) Image recognition device and method
JP3315175B2 (en) 3D measuring device
JPH07193716A (en) Edge emphasizing device
Arefi et al. Ridge based decomposition of complex buildings for 3D model generation from high resolution digital surface models
JP7024401B2 (en) Information processing equipment, programs, and information processing methods

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313117

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

EXPY Cancellation because of completion of term