JPH1021403A - Method and device for extracting correspondent points - Google Patents

Method and device for extracting correspondent points

Info

Publication number
JPH1021403A
JPH1021403A JP8194103A JP19410396A JPH1021403A JP H1021403 A JPH1021403 A JP H1021403A JP 8194103 A JP8194103 A JP 8194103A JP 19410396 A JP19410396 A JP 19410396A JP H1021403 A JPH1021403 A JP H1021403A
Authority
JP
Japan
Prior art keywords
template
corresponding point
point
image
similarity
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
JP8194103A
Other languages
Japanese (ja)
Inventor
Katsuhiko Mori
克彦 森
Katsumi Iijima
克己 飯島
Kotaro Yano
光太郎 矢野
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP8194103A priority Critical patent/JPH1021403A/en
Priority to US08/803,127 priority patent/US6493465B2/en
Publication of JPH1021403A publication Critical patent/JPH1021403A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a method and a device for extracting correspondent points by which high-accuracy correspondent point extracting processing can be performed over all the area without discrimination of object or background in the image to be used. SOLUTION: A template image preparing part 106 prepares a template image by receiving template size data preserved in a data preserving part 105, template size data from a template size change part 109 or a reference image from a reference image memory 102 and an evaluation function operating part 107 operates an evaluation value between the reference image and the image to be searched preserved in an image memory 103 to be searched and outputs correspondent point candidates and their evaluation values.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、被写体の距離情報
を求める際に用いる対応点抽出方法及び装置に関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a corresponding point extraction method and apparatus used for obtaining distance information of a subject.

【0002】[0002]

【従来の技術】従来より、被写体の距離情報を画像を使
用して用いる手法として、図24(a)に示すように2
台以上のカメラ24a,24bを使用して被写体24c
を撮影し、各カメラ24a,24b間の視差を利用する
手法と、図24(b)に示すように1台のカメラ24d
が矢印方向に移動しながら被写体24cを撮影し、得ら
れる時系列画像間の運動視差を利用する手法等が知られ
ている。
2. Description of the Related Art Conventionally, as a method of using distance information of a subject using an image, as shown in FIG.
Object 24c using more than one camera 24a, 24b
And a method using the parallax between the cameras 24a and 24b, and one camera 24d as shown in FIG.
There is known a method of photographing a subject 24c while moving in the direction of an arrow, and using a motion parallax between obtained time-series images.

【0003】上述した図24(a),(b)に示す両手
法において、距離を求める際に必要となる視差を求める
ために対応点抽出が行われる。この対応点抽出とは、図
24(a)に示す手法では、同期をとって左側カメラ2
4aで得られた画像と右側カメラ24bで得られた画像
上の全ての点での対応点を求めることである。また、図
24(b)に示す手法では、ある位置で得られた画像と
移動後の位置で得られた画像上の全ての点で対応点を求
めることである。なお、画像中、全点で対応を求めるの
は、画像中のどこに被写体が写っているのかが分からな
いためである。
In both of the methods shown in FIGS. 24 (a) and 24 (b), corresponding points are extracted in order to obtain a parallax required for obtaining a distance. In the method shown in FIG. 24A, the corresponding point extraction means that the left camera 2
The purpose is to find corresponding points at all points on the image obtained by 4a and the image obtained by the right camera 24b. In the method shown in FIG. 24 (b), corresponding points are obtained at all points on the image obtained at a certain position and the image obtained at the moved position. Note that the reason why the correspondence is obtained at all points in the image is that it is not possible to know where in the image the subject appears.

【0004】この対応点抽出処理方法の代表的な手法の
1つとしてテンプレートマッチング法が知られている。
このテンプレートマッチング法とは、図25(a)に示
すように基準となる画像25a中の対応点をとりたい1
点Pを囲むテンプレート25bを考え、そのテンプレー
ト25bを探索される画像25c上全域に移動させ、各
点における類似度を計算することにより対応点を決定す
る方法である。
[0004] A template matching method is known as one of the representative methods of the corresponding point extraction processing method.
This template matching method is used to find a corresponding point in a reference image 25a as shown in FIG.
In this method, the template 25b surrounding the point P is considered, the template 25b is moved to the entire area on the image 25c to be searched, and the corresponding point is determined by calculating the similarity at each point.

【0005】類似度を求める評価関数としては、下記
(1)式のように輝度値の差分を使用する関数や下記
(2)式のように輝度値の相関値を使用する関数があ
る。
As an evaluation function for obtaining the similarity, there are a function using a difference between luminance values as in the following equation (1) and a function using a correlation value between luminance values as in the following equation (2).

【0006】[0006]

【数1】 (Equation 1)

【0007】[0007]

【数2】 上記(1),(2)式中でF(i,j)は、テンプレー
トを、A(i,j)は探索される画像を表わしている。
つまり、上記(1),(2)式は、探索される画像上で
テンプレートの位置を(x,y)だけ移動させた時の類
似度を示す。なお、(1)式を用いると、E(x,y)
が最小となった点が対応点であり、理論上でE(x,
y)の最小値は0となる。また、(2)式を用いると、
σ(x,y)が最大となった点が対応点であり、理論上
σ(x,y)の最大値は1となる。
(Equation 2) In the above equations (1) and (2), F (i, j) represents a template, and A (i, j) represents an image to be searched.
That is, the above equations (1) and (2) show the similarity when the position of the template is moved by (x, y) on the searched image. In addition, using equation (1), E (x, y)
Is the corresponding point, and theoretically E (x,
The minimum value of y) is 0. Also, using equation (2),
The point where σ (x, y) is the maximum is the corresponding point, and the maximum value of σ (x, y) is 1 in theory.

【0008】また、別の評価関数として下記(3)式の
ようにテンプレート内全体で、テンプレート内の各画素
と探索される画像上の1画素との差分があるしきい値ε
以下の画素数を求めて、その画素数が最多の点を対応点
とする関数がある。
In addition, as another evaluation function, a threshold value ε having a difference between each pixel in the template and one pixel on the image to be searched in the entire template as shown in the following equation (3).
There is a function that obtains the following number of pixels and uses the point having the largest number of pixels as the corresponding point.

【0009】[0009]

【数3】 (3)式を用いると、C(x,y)が最大になった点が
対応点であり、理論上最大値はテンプレート内の全画素
数となる。
(Equation 3) Using equation (3), the point where C (x, y) is the maximum is the corresponding point, and the maximum value is theoretically the total number of pixels in the template.

【0010】従来は、上記のような対応点抽出法を用い
て、画像中の各点における視差量を求め、その視差量と
カメラの焦点距離及びカメラの位置情報を使用し、三角
測量則を用いて被写体の距離情報を画像より得ていた。
Conventionally, the amount of parallax at each point in an image is obtained by using the corresponding point extraction method as described above, and the triangulation rule is calculated using the amount of parallax, the focal length of the camera, and the position information of the camera. The distance information of the subject is obtained from the image by using this method.

【0011】[0011]

【発明が解決しようとする課題】しかしながら、上述し
た従来例で示したテンプレートマッチング法にあって
は、カメラから有限距離に存在する被写体を撮像した画
像間の対応点抽出処理を行うと、被写体のある部分で抽
出精度が大きく低下するという問題点があった。
However, according to the template matching method shown in the above-mentioned conventional example, when a corresponding point extraction process is performed between images obtained by capturing an object at a finite distance from a camera, the object is not identified. There is a problem that the extraction accuracy is greatly reduced in a certain part.

【0012】図26はそのことを示す図である。同図は
図24(a)で示した2台のカメラ24a,24bを有
する撮像系で、被写体24cとして車を撮像した画像を
示すもので、図26(a)は左のカメラ24aにより得
られた画像を、図26(b),(c)は右のカメラ24
bにより得られた画像をそれぞれ示す。なお、説明の便
宜上、車を被写体、家や木を背景とし、家や木は車から
距離が離れているものとする。
FIG. 26 is a diagram showing this. FIG. 24A shows an image of a car taken as a subject 24c in an imaging system having two cameras 24a and 24b shown in FIG. 24A, and FIG. 26A is obtained by the left camera 24a. 26 (b) and 26 (c) show the right camera 24.
Each image obtained by b is shown. For convenience of explanation, it is assumed that a car is a subject, a house or a tree is a background, and a house or a tree is far from the car.

【0013】ここで、図26(a)の画像を基準とし、
テンプレートを切り出すことを考える。このときテンプ
レートのサイズには、ある程度の大きさが必要である。
なぜなら、図26(a)の画像中のA点や車のドアB点
の辺りは画像の輝度値の変化が余りなく、目立った特徴
がある領域ではなく、周囲にも同じような領域が存在す
る。また、木の葉が重なっているC点の辺りでも周囲に
同じような輝度分布の領域が存在する。このような領域
でも正確な対応点抽出を行うために、テンプレートのサ
イズは、ある程度の大きさが必要となる。
Here, based on the image shown in FIG.
Consider cutting out a template. At this time, the template needs to have a certain size.
The reason is that the brightness value of the image around the point A and the point B of the car in the image of FIG. I do. In addition, there is a similar luminance distribution area around point C where the leaves of the tree overlap. In order to accurately extract corresponding points even in such an area, the size of the template needs to be a certain size.

【0014】例えば、図26(a)の画像中のB点から
図示する大きさにテンプレートのサイズを決定したとす
ると、ドアの他にもタイヤ等がテンプレート261に入
るので、対応点を正確に決定することができる。
For example, if the size of the template is determined from the point B in the image of FIG. 26A to the size shown in the figure, tires and the like enter the template 261 in addition to the door. Can be determined.

【0015】続いて図26(a)の画像中の被写体であ
る車の端部のD点について考える。このD点でB点と同
様のテンプレートのサイズでテンプレート262を作成
すると、このテンプレート262には被写体である車の
他に背景である家が入る。このテンプレート262を用
いて対応点抽出を行うと、図26(c)に示すように正
しい対応点であるE点ではなく、誤っているF点を対応
点という誤対応が起きる。
Next, consider the point D at the end of the car, which is the subject in the image of FIG. When the template 262 is created at the point D at the same template size as the point B, the template 262 includes a house as a background in addition to a car as a subject. When the corresponding points are extracted using the template 262, an erroneous correspondence occurs in which an erroneous point F is a corresponding point instead of the correct point E as shown in FIG. 26C.

【0016】これは、E点で対応点の評価関数を求めた
際に、被写体である車の部分は良いが、背景の部分が異
なるため、その領域の評価関数の値が悪くなり、E点は
対応点ではないと判断してしまったためである。また、
F点で対応点の評価関数を求めた際には、背景の部分が
同じでその領域の評価関数の値が良く、また、被写体で
ある車の部分は異なるが、たまたま同じような輝度値の
領域が多かったために、その領域の評価関数の値が良く
なり、F点を対応点と認識してしまったために起こった
ことである。このような誤対応は、背景である家や木と
比較して、被写体である車の方が手前にあるため視差量
が異なることにより生じる現象で、このため有限距離に
存在する被写体を撮像したときには、被写体と背景の接
する近傍領域、また、被写体中にも距離が大きく変化す
る部分が存在するときにはその近傍領域で、対応点抽出
精度が劣化することになる。
This is because when the evaluation function of the corresponding point at the point E is obtained, the part of the car which is the subject is good, but the background part is different, so that the value of the evaluation function in that area becomes bad, Is not a corresponding point. Also,
When the evaluation function of the corresponding point is obtained at the point F, the value of the evaluation function in the background is the same and the area is good, and the car part which is the subject is different, but happens to have the same luminance value. This is caused by the fact that the value of the evaluation function in the area is improved because the number of areas is large, and the point F is recognized as the corresponding point. Such an erroneous response is a phenomenon caused by a difference in the amount of parallax due to a car being a subject being in front of a house or a tree being a background, and therefore, a subject existing at a finite distance is imaged. In some cases, the corresponding point extraction accuracy is degraded in a neighboring region where the subject and the background are in contact, or in a region where the distance greatly changes even in the subject.

【0017】上述したように対応点抽出処理にテンプレ
ートマッチング法を用いると、使用するテンプレートの
サイズは、ある程度大きくしなければならず、また、有
限距離に存在する被写体を撮像した画像間の対応点抽出
処理をある程度の大きさのテンプレートを用いて行う
と、被写体と背景の接する近傍領域で対応点抽出精度が
劣化するという問題があった。
As described above, when the template matching method is used for the corresponding point extraction processing, the size of the template to be used must be increased to some extent, and the corresponding points between images obtained by capturing an object at a finite distance are taken. If the extraction process is performed using a template having a certain size, there is a problem that the accuracy of extracting corresponding points is deteriorated in a neighboring region where the subject and the background are in contact.

【0018】また、上記(3)式で示した評価関数は、
上記のような被写体と背景の接する近傍領域で対応点抽
出精度が劣化するのを防ぐのにある程度有効である。し
かし、テンプレート内に背景が大部分入ったとき等は、
テンプレート内の画素で探索される画像上の1画素との
差分値があるしきい値εより小さい画素の数が、テンプ
レートの背景に引かれたときの方が多くなり、対応点抽
出精度が劣化するという問題があった。
The evaluation function expressed by the above equation (3) is:
This is effective to some extent in preventing the corresponding point extraction accuracy from deteriorating in the vicinity area where the subject is in contact with the background. However, when most of the background is included in the template,
The number of pixels whose difference value from one pixel on the image searched for by the pixels in the template is smaller than a certain threshold ε is larger when the background is drawn on the template, and the corresponding point extraction accuracy is deteriorated. There was a problem of doing.

【0019】また、上記図24(a),(b)に示すよ
うな手法により得られた画像には対応点が存在しないオ
クルージョン領域と呼ばれる領域が存在し、その領域の
検出が困難であるという問題があった。
Also, an image obtained by the method shown in FIGS. 24A and 24B has an area called an occlusion area having no corresponding point, and it is difficult to detect the area. There was a problem.

【0020】例えば、図12(a)の画像中のI点の対
応点は図12(b)の画像では被写体の車に隠されてし
まい、この画像中には存在しない。このような領域をオ
クルージョン領域というが、この領域内の点には対応点
が存在しないので、この領域の点の結果は対応点抽出結
果として使用してはいけない。この領域の検出方法とし
て、基準画像中の対応点候補が、探索される画像中で得
られたら、次にその点を中心に探索される画像中でテン
プレートを作成し、そのテンプレートを用いて基準画像
中でそのテンプレートで対応点を探索し、得られた基準
画像中の対応点候補と基のテンプレートの中心点が一致
していれば、探索される画像中の対応点候補は基準画像
中の点の対応点であり、一致していなければ対応点では
ないと判断する手法がある。
For example, the point corresponding to point I in the image of FIG. 12A is hidden by the subject car in the image of FIG. 12B, and does not exist in this image. Such an area is called an occlusion area. Since there is no corresponding point at a point in this area, a result of a point in this area must not be used as a corresponding point extraction result. As a method for detecting this area, when a corresponding point candidate in the reference image is obtained in the image to be searched, a template is created in the image to be searched centering on that point, and the template is used as a reference. A corresponding point is searched for by the template in the image, and if the corresponding point candidate in the obtained reference image matches the center point of the original template, the corresponding point candidate in the searched image is found in the reference image. There is a method of judging that a point is a corresponding point, and if they do not match, it is not a corresponding point.

【0021】しかし、この手法の考え方だけでは、図1
2(a)の画像中のJ点の対応点候補が、背景の窓によ
って誤って図12(b)の画像中のK点であると抽出さ
れ、次にこのK点を中心としたテンプレートでの対応点
が再び誤って図12(a)の画像中のJ点であると抽出
されたとき、つまり2回誤抽出したときや、図12
(a)の画像中のL点の対応点が正しく図12(b)の
画像中のM点であると抽出されたのに、そのM点の対応
点が図12(a)の画像中のN点と背景の木や地面のた
めに誤抽出されたとき等、誤った判定を行うことが多々
あった。
However, the concept of this method alone is not enough for FIG.
The corresponding point candidate of the J point in the image of FIG. 2 (a) is erroneously extracted as the K point in the image of FIG. 12 (b) by the background window. 12 is incorrectly extracted again as the point J in the image of FIG. 12A, that is, when the erroneous extraction is performed twice,
Although the corresponding point of the L point in the image of FIG. 12A is correctly extracted as the M point in the image of FIG. 12B, the corresponding point of the M point in the image of FIG. In many cases, erroneous determinations are made, for example, when erroneous extraction is performed due to N points and a background tree or ground.

【0022】本発明は上述した従来の技術の有するこの
ような問題点に鑑みてなされたものであり、その第1の
目的とするところは、使用する画像中の被写体、背景の
区別なく全域で高精度の対応点抽出処理を行うことがで
きる対応点抽出方法及び装置を提供しようとするもので
ある。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned problems of the prior art, and a first object of the present invention is to provide a method that uses the entire area without discrimination between a subject and a background in an image to be used. An object of the present invention is to provide a corresponding point extraction method and apparatus capable of performing highly accurate corresponding point extraction processing.

【0023】また、本発明の第2の目的とするところ
は、使用する画像中の被写体、背景の区別なく全域で高
精度の対応点抽出処理を行うことができると共に、その
処理時間を短縮することができる対応点抽出方法及び装
置を提供しようとするものである。
A second object of the present invention is to perform high-accuracy corresponding point extraction processing over the entire area without discrimination between a subject and a background in an image to be used, and to shorten the processing time. And a corresponding point extraction method and apparatus.

【0024】また、本発明の第3の目的とするところ
は、使用する画像中のオクルージョン領域、距離の大き
く変化する領域を精度よく求めることができ、高精度の
対応点抽出処理を行うことができる対応点抽出方法及び
装置を提供しようとするものである。
A third object of the present invention is to accurately determine an occlusion region and a region where a distance greatly changes in an image to be used, and to perform a highly accurate corresponding point extraction process. It is an object of the present invention to provide a corresponding point extraction method and apparatus that can be used.

【0025】[0025]

【課題を解決するための手段】上記第1の目的を達成す
るために請求項1記載の対応点抽出方法は、複数の画像
間の対応をテンプレートマッチング法に基づいて求める
対応点抽出方法において、前記テンプレートマッチング
法は、ある特定の条件を満たす点において2種類以上の
テンプレートを用いて対応点を決定することを特徴とす
るものである。
According to a first aspect of the present invention, there is provided a corresponding point extracting method for determining correspondence between a plurality of images based on a template matching method. The template matching method is characterized in that two or more types of templates are used to determine corresponding points at points satisfying a specific condition.

【0026】また、上記第1の目的を達成するために請
求項2記載の対応点抽出方法は、請求項1記載の対応点
抽出方法において、前記2種類以上のテンプレートは、
テンプレートの面積を変化させたテンプレートであるこ
とを特徴とするものである。
According to a second aspect of the present invention, there is provided a method for extracting corresponding points according to the first aspect.
The template is characterized in that the area of the template is changed.

【0027】また、上記第1の目的を達成するために請
求項3記載の対応点抽出方法は、請求項1記載の対応点
抽出方法において、前記2種類以上のテンプレートは、
テンプレート内のエッジによりテンプレートを変形させ
たテンプレートを含むことを特徴とするものである。
According to a third aspect of the present invention, there is provided a method for extracting a corresponding point according to the first aspect, wherein the two or more types of templates include:
The present invention is characterized by including a template obtained by deforming a template by an edge in the template.

【0028】また、上記第2の目的を達成するために請
求項4記載の対応点抽出方法は、請求項1記載の対応点
抽出方法において、前記2種類め以降のテンプレートに
よる演算は、それ以前の種類のテンプレートによる演算
で候補となった点に対して行うことを特徴とするもので
ある。
According to a fourth aspect of the present invention, there is provided a method for extracting corresponding points according to the first aspect of the present invention, wherein the operation of the second and subsequent templates is performed by using the second and subsequent templates. Are performed on points that have become candidates in the calculation using the template of the above type.

【0029】また、上記第2の目的を達成するために請
求項5記載の対応点抽出方法は、請求項1記載の対応点
抽出方法において、1種類め以降のテンプレートによる
演算結果に基づき2種類めのテンプレートを用いるよう
にそれ以前のテンプレートによる演算結果を判断してか
ら次のテンプレートによる演算を行うことを特徴とする
ものである。
According to a fifth aspect of the present invention, there is provided a method for extracting a corresponding point according to the first aspect of the present invention, comprising the steps of: It is characterized in that a calculation result based on a previous template is determined and then a calculation based on the next template is performed so as to use a template.

【0030】また、上記第2の目的を達成するために請
求項6記載の対応点抽出方法は、請求項1記載の対応点
抽出方法において、同時に2種類以上のテンプレートに
よる演算を行い、その中から1つの演算結果を選択する
ことを特徴とするものである。
According to a sixth aspect of the present invention, there is provided a corresponding point extracting method according to the first aspect of the present invention, wherein two or more types of templates are simultaneously operated. Is selected from the calculation results.

【0031】また、上記第1の目的を達成するために請
求項7記載の対応点抽出方法は、請求項1記載の対応点
抽出方法において、前記ある特定の条件を満たす点と
は、複数画像間の視差の分布が急峻に変化する領域内の
点であることを特徴とするものである。
According to a seventh aspect of the present invention, there is provided a method for extracting corresponding points according to the first aspect of the present invention, wherein the point satisfying the specific condition is a plurality of images. The distribution of parallax between the points is a point in a region where the distribution changes sharply.

【0032】また、上記第1の目的を達成するために請
求項8記載の対応点抽出方法は、請求項7記載の対応点
抽出方法において、前記複数画像間の視差の分布が急峻
に変化する領域内の点か否かの判断を、テンプレートマ
ッチングの評価値を用いて行うことを特徴とするもので
ある。
According to another aspect of the present invention, there is provided a method for extracting corresponding points, wherein the distribution of parallax between the plurality of images changes sharply. It is characterized in that the determination as to whether or not the point is within the region is performed using the evaluation value of the template matching.

【0033】また、上記第3の目的を達成するために請
求項9記載の対応点抽出方法は、請求項7記載の対応点
抽出方法において、前記複数画像間の視差の分布が急峻
に変化する領域内の点か否かの判断を、テンプレートマ
ッチングの評価値と、基準となる点と該点の対応点を候
補とが一致するか否かの判断結果とを用いて行うことを
特徴とするものである。
According to a ninth aspect of the present invention, in order to achieve the third object, in the corresponding point extracting method according to the seventh aspect, the distribution of parallax between the plurality of images changes sharply. The determination as to whether or not the point is within the region is performed using the evaluation value of the template matching and the determination result as to whether or not the reference point and the corresponding point of the point match the candidate. Things.

【0034】また、上記第3の目的を達成するために請
求項10記載の対応点抽出方法は、請求項7記載の対応
点抽出方法において、前記複数画像間の視差の分布が急
峻に変化する領域内の点か否かの判断を、前記複数画像
間の視差の分布が急峻に変化する領域内の点では以前の
テンプレートに含まれるテンプレートを使用し且つ類似
度の評価関数にテンプレート内の各要素の画素値と探索
される画像内の画素の画素値の差があるしきい値以下の
画素数を用いて行うことを特徴とするものである。
According to a tenth aspect of the present invention, in order to achieve the third object, in the corresponding point extracting method according to the seventh aspect, the distribution of parallax between the plurality of images changes sharply. The determination as to whether or not the point is within the region is performed by using the template included in the previous template at the point within the region where the disparity distribution of the parallax between the plurality of images changes steeply, and using each of the templates in the template as the similarity evaluation function. The difference between the pixel value of the element and the pixel value of the pixel in the image to be searched is obtained by using the number of pixels equal to or less than a certain threshold value.

【0035】また、上記第1の目的を達成するために請
求項11記載の対応点抽出装置は、複数の画像間の対応
をテンプレートマッチング法に基づき明らかにする対応
点抽出装置において、前記テンプレートマッチング法
は、ある特定の条件を満たす点では2種類以上のテンプ
レートを用いて対応点を決定することを特徴とするもの
である。
In order to achieve the first object, a corresponding point extracting apparatus according to claim 11, wherein the correspondence between a plurality of images is clarified based on a template matching method. The method is characterized in that at points satisfying a specific condition, corresponding points are determined using two or more types of templates.

【0036】また、上記第1の目的を達成するために請
求項12記載の対応点抽出装置は、請求項11記載の対
応点抽出装置において、前記2種類以上のテンプレート
は、テンプレートの面積を変化させたテンプレートであ
ることを特徴とするものである。
According to a twelfth aspect of the present invention, there is provided a corresponding point extracting apparatus according to the eleventh aspect, wherein the two or more types of templates change the area of the template. It is characterized in that it is a template that has been made.

【0037】また、上記第1の目的を達成するために請
求項13記載の対応点抽出装置は、請求項11記載の対
応点抽出装置において、前記2種類以上のテンプレート
は、テンプレート内のエッジによりテンプレートを変形
させたテンプレートを含むことを特徴とするものであ
る。
According to a thirteenth aspect of the present invention, there is provided a corresponding point extracting apparatus according to the thirteenth aspect, wherein the two or more types of templates are defined by edges in the template. It is characterized by including a template obtained by deforming the template.

【0038】また、上記第2の目的を達成するために請
求項14記載の対応点抽出装置は、請求項11記載の対
応点抽出装置において、前記2種類め以降のテンプレー
トによる演算は、それ以前の種類のテンプレートによる
演算で候補となった点に対して行うことを特徴とするも
のである。
In order to achieve the second object, a corresponding point extracting apparatus according to claim 14 is the same as the corresponding point extracting apparatus according to claim 11, wherein the calculation using the second and subsequent templates is performed earlier. Are performed on points that have become candidates in the calculation using the template of the above type.

【0039】また、上記第2の目的を達成するために請
求項15記載の対応点抽出装置は、請求項11記載の対
応点抽出装置において、1種類め以降のテンプレートに
よる演算結果に基づき2種類めのテンプレートを用いる
ようにそれ以前のテンプレートによる演算結果を判断し
てから次のテンプレートによる演算を行うことを特徴と
するものである。
According to another aspect of the present invention, there is provided a corresponding point extracting apparatus according to the present invention, wherein two types of corresponding point extracting apparatuses are provided based on the calculation results of the first and subsequent templates. It is characterized in that a calculation result based on a previous template is determined and then a calculation based on the next template is performed so as to use a template.

【0040】また、上記第2の目的を達成するために請
求項16記載の対応点抽出装置は、請求項11記載の対
応点抽出装置において、同時に2種類以上のテンプレー
トによる演算を行い、その中から1つの演算結果を選択
することを特徴とするものである。
In order to achieve the second object, a corresponding point extracting apparatus according to claim 16 performs the operation using two or more types of templates simultaneously in the corresponding point extracting apparatus according to claim 11, wherein Is selected from the calculation results.

【0041】また、上記第1の目的を達成するために請
求項17記載の対応点抽出装置は、請求項11記載の対
応点抽出装置において、前記ある特定の条件を満たす点
とは、複数画像間の視差の分布が急峻に変化する領域内
の点であることを特徴とするものである。
According to a seventeenth aspect of the present invention, in the corresponding point extracting apparatus according to the eleventh aspect, the point satisfying the specific condition is defined by a plurality of images. The distribution of parallax between the points is a point in a region where the distribution changes sharply.

【0042】また、上記第1の目的を達成するために請
求項18記載の対応点抽出装置は、請求項17記載の対
応点抽出装置において、前記複数画像間の視差の分布が
急峻に変化する領域内の点か否かの判断を、テンプレー
トマッチングの評価値を用いて行うことを特徴とするも
のである。
In order to achieve the first object, a corresponding point extracting device according to claim 18 is the corresponding point extracting device according to claim 17, wherein the distribution of parallax between the plurality of images changes sharply. It is characterized in that the determination as to whether or not the point is within the region is performed using the evaluation value of the template matching.

【0043】また、上記第3の目的を達成するために請
求項19記載の対応点抽出装置は、請求項17記載の対
応点抽出装置において、前記複数画像間の視差の分布が
急峻に変化する領域内の点か否かの判断を、テンプレー
トマッチングの評価値と、基準となる点と該点の対応点
を候補とが一致するか否かの判断結果とを用いて行うこ
とを特徴とするものである。
According to a third aspect of the present invention, in order to achieve the third object, in the corresponding point extracting apparatus according to the seventeenth aspect, the distribution of parallax between the plurality of images changes sharply. The determination as to whether or not the point is within the region is performed using the evaluation value of the template matching and the determination result as to whether or not the reference point and the corresponding point of the point match the candidate. Things.

【0044】また、上記第3の目的を達成するために請
求項20記載の対応点抽出装置は、請求項17記載の対
応点抽出装置において、前記複数画像間の視差の分布が
急峻に変化する領域内の点か否かの判断を、前記複数画
像間の視差の分布が急峻に変化する領域内の点では以前
のテンプレートに含まれるテンプレートを使用し且つ類
似度の評価関数にテンプレート内の各要素の画素値と探
索される画像内の画素の画素値の差があるしきい値以下
の画素数を用いて行うことを特徴とするものである。
According to a twentieth aspect of the present invention, in order to achieve the third object, in the corresponding point extracting apparatus according to the seventeenth aspect, the distribution of parallax between the plurality of images changes sharply. The determination as to whether or not the point is within the region is performed by using the template included in the previous template at the point within the region where the disparity distribution of the parallax between the plurality of images changes steeply, and using each of the templates in the template as the similarity evaluation function. The difference between the pixel value of the element and the pixel value of the pixel in the image to be searched is obtained by using the number of pixels equal to or less than a certain threshold value.

【0045】また、上記第1の目的を達成するために請
求項21記載の対応点抽出方法は、入力された複数の画
像の中の1枚の画像から、最初に所定の判断基準に基づ
きテンプレートを作成し、該作成されたテンプレートの
各画素の画素値と前記入力された他の画像内の画素の画
素値を用いて類似度を求め、該求めた類似度からある特
定条件を判断し、該判断結果に基づき他のテンプレート
を作成することを特徴とするものである。
In order to achieve the first object, a corresponding point extracting method according to a twenty-first aspect of the present invention provides a method for extracting a template from a single image among a plurality of input images based on a predetermined criterion first. Is created, the similarity is determined using the pixel value of each pixel of the created template and the pixel value of the pixel in the input other image, and a specific condition is determined from the obtained similarity. Another template is created based on the determination result.

【0046】また、上記第1の目的を達成するために請
求項22記載の対応点抽出方法は、請求項21記載の対
応点抽出方法において、テンプレートの面積を変化させ
たテンプレートを作成を作成することを特徴とするもの
である。
In order to achieve the first object, a corresponding point extracting method according to a twenty-second aspect is the same as the corresponding point extracting method according to the twenty-first aspect, wherein the template is created by changing the area of the template. It is characterized by the following.

【0047】また、上記第1の目的を達成するために請
求項23記載の対応点抽出方法は、請求項21記載の対
応点抽出方法において、ある特定条件の判断は、入力さ
れた類似度とあるしきい値とを比較して行うことを特徴
とするものである。
In order to achieve the first object, a corresponding point extracting method according to a twenty-third aspect is characterized in that, in the corresponding point extracting method according to the twenty-first aspect, the determination of a specific condition is based on the input similarity. It is characterized in that the comparison is performed with a certain threshold value.

【0048】また、上記第1の目的を達成するために請
求項24記載の対応点抽出方法は、請求項21記載の対
応点抽出方法において、ある特定条件の判断は、入力さ
れた複数の類似度の差があるしきい値より小さいときを
判断して行うことを特徴とするものである。
In order to achieve the first object, a corresponding point extracting method according to a twenty-fourth aspect is characterized in that, in the corresponding point extracting method according to the twenty-first aspect, the determination of a specific condition is based on a plurality of inputted similarities. It is characterized in that the judgment is made when the difference between the degrees is smaller than a certain threshold value.

【0049】また、上記第1の目的を達成するために請
求項25記載の対応点抽出方法は、請求項21記載の対
応点抽出方法において、ある特定条件の判断は、複数画
像間の視差の分布が急峻に変化する領域内の画素を判断
して行うことを特徴とするものである。
In order to achieve the first object, a corresponding point extracting method according to a twenty-fifth aspect is characterized in that, in the corresponding point extracting method according to the twenty-first aspect, the determination of a specific condition is based on parallax between a plurality of images. The method is characterized by determining pixels in an area where the distribution changes sharply.

【0050】また、上記第2の目的を達成するために請
求項26記載の対応点抽出方法は、請求項21記載の対
応点抽出方法において、最初のテンプレートを作成する
ための前記所定の判断基準とは、テンプレートの中心点
の近傍画素の点のテンプレートサイズであることを特徴
とするものである。
According to a twenty-sixth aspect of the present invention, there is provided a method for extracting a corresponding point, comprising the steps of: Is the template size of the point of the pixel near the center point of the template.

【0051】また、上記第2の目的を達成するために請
求項27記載の対応点抽出方法は、請求項21記載の対
応点抽出方法において、最初のテンプレートを作成する
ための前記所定の判断基準とは、テンプレート中の強い
エッジの有無であることを特徴とするものである。
According to a twenty-seventh aspect of the present invention, in the corresponding point extracting method according to the twenty-first aspect, the predetermined criterion for creating an initial template is provided. Is characterized by the presence or absence of a strong edge in the template.

【0052】また、上記第1の目的を達成するために請
求項28記載の対応点抽出装置は、入力された複数の画
像の中の1枚の画像から最初に前記所定の判断基準に基
づきテンプレートを作成する第1のテンプレート作成手
段と、該テンプレート作成手段により作成されたテンプ
レートの各画素の画素値と前記入力された他の画像内の
画素の画素値を用いて類似度を求める類似度演算手段
と、該類似度演算手段により求めた類似度からある特定
条件を判断する特定条件判断手段と、該特定条件判断手
段の判断結果に基づき他のテンプレートを作成する第2
のテンプレート作成手段とを具備したことを特徴とする
ものである。
In order to achieve the first object, the corresponding point extracting apparatus according to the twenty-eighth aspect is characterized in that a template is first selected from one of a plurality of input images based on the predetermined criterion. And a similarity calculation for calculating a similarity using a pixel value of each pixel of the template created by the template creating unit and a pixel value of a pixel in the input other image. Means, a specific condition determining means for determining a specific condition from the similarity obtained by the similarity calculating means, and a second template for creating another template based on the determination result of the specific condition determining means.
And a template creation means.

【0053】また、上記第1の目的を達成するために請
求項29記載の対応点抽出装置は、請求項28記載の対
応点抽出装置において、前記第2のテンプレート作成手
段は、テンプレートの面積を変化させたテンプレートを
作成することを特徴とするものである。
In order to achieve the first object, a corresponding point extracting apparatus according to claim 29 is characterized in that in the corresponding point extracting apparatus according to claim 28, the second template creating means reduces the area of the template. It is characterized in that a changed template is created.

【0054】また、上記第1の目的を達成するために請
求項30記載の対応点抽出装置は、請求項28記載の対
応点抽出装置において、前記特定条件判断手段は、入力
された類似度とあるしきい値とを比較してある特定条件
を判断することを特徴とするものである。
In order to achieve the first object, a corresponding point extracting apparatus according to claim 30 is characterized in that, in the corresponding point extracting apparatus according to claim 28, the specific condition judging means determines whether the inputted similarity is equal to the inputted similarity. It is characterized in that a specific condition is determined by comparing with a certain threshold value.

【0055】また、上記第1の目的を達成するため請求
項31記載の対応点抽出装置は、請求項28記載の対応
点抽出装置において、前記特定条件判断手段は、入力さ
れた複数の類似度の差があるしきい値より小さいときを
判断してある特定条件を判断することを特徴とするもの
である。
In order to achieve the first object, a corresponding point extracting apparatus according to claim 31 is the corresponding point extracting apparatus according to claim 28, wherein the specific condition judging means includes a plurality of inputted similarities. And determining a specific condition by determining when the difference is smaller than a certain threshold value.

【0056】また、上記第1の目的を達成するため請求
項32記載の対応点抽出装置は、請求項28記載の対応
点抽出装置において、前記特定条件判断手段は、複数画
像間の視差の分布が急峻に変化する領域内の画素を判断
してある特定条件を判断することを特徴とするものであ
る。
According to a thirty-second aspect of the present invention, in the corresponding point extracting apparatus according to the thirty-second aspect, the specific condition judging means includes a disparity distribution between a plurality of images. Is characterized by judging a pixel in an area where abruptly changes, and judging a specific condition.

【0057】また、上記第2の目的を達成するため請求
項33記載の対応点抽出装置は、請求項28記載の対応
点抽出装置において、最初のテンプレートを作成するた
めの前記所定の判断基準とは、テンプレートの中心点の
近傍画素の点のテンプレートサイズであることを特徴と
するものである。
In order to achieve the second object, a corresponding point extracting apparatus according to claim 33 is the corresponding point extracting apparatus according to claim 28, wherein the predetermined criterion for creating an initial template is the same as that of the corresponding point extracting apparatus. Is the template size of the point of the pixel near the center point of the template.

【0058】また、上記第2の目的を達成するため請求
項34記載の対応点抽出装置は、請求項28記載の対応
点抽出装置において、最初のテンプレートを作成するた
めの前記所定の判断基準とは、テンプレート中の強いエ
ッジの有無であることを特徴とするものである。
According to a thirty-fourth aspect of the present invention, there is provided a corresponding point extracting apparatus according to the twenty-eighth aspect, wherein the predetermined criterion for creating an initial template is the same as that of the corresponding point extracting apparatus. Is characterized by the presence or absence of a strong edge in the template.

【0059】また、上記第2の目的を達成するため請求
項35記載の対応点抽出方法は、入力された複数の画像
の内の1枚の画像から直前に求めた点で使用したテンプ
レートサイズを使用してテンプレートを作成し、該作成
されたテンプレートの各画素の画素値と前記入力された
他の画像内の画素の画素値を用いて類似度を求め、該求
めた類似度から入力された類似度があるしきい値より小
さいときを判断し、該判断結果に基づきテンプレートの
面積を変化させたテンプレートを作成することを特徴と
するものである。
In order to achieve the second object, a corresponding point extracting method according to claim 35 is characterized in that a template size used at a point obtained immediately before from one of a plurality of input images is used. A template is created using the calculated template, and a similarity is calculated using the pixel values of the respective pixels of the created template and the pixel values of the pixels in the input other image. It is characterized in that a judgment is made when the similarity is smaller than a certain threshold value, and a template in which the area of the template is changed is created based on the judgment result.

【0060】また、上記第2の目的を達成するため請求
項36記載の対応点抽出方法は、入力された複数の画像
の内の1枚の画像から直前に求めた点で使用したテンプ
レートサイズを使用してテンプレートを作成し、該作成
されたテンプレートの各画素の画素値と前記入力された
他の画像内の画素の画素値を用いて類似度を求め、該求
めた類似度から入力された複数の類似度の差があるしき
い値より小さいときを判断し、該判断結果に基づきテン
プレートの面積を変化させたテンプレートを作成するこ
とを特徴とするものである。
In order to achieve the second object, a corresponding point extracting method according to claim 36 is characterized in that a template size used at a point obtained immediately before from one of a plurality of input images is used. A template is created using the calculated template, and a similarity is calculated using the pixel values of the respective pixels of the created template and the pixel values of the pixels in the input other image. It is characterized in that a judgment is made when a plurality of differences in similarity are smaller than a certain threshold value, and a template in which the area of the template is changed is created based on the judgment result.

【0061】また、上記第2の目的を達成するため請求
項37記載の対応点抽出方法は、入力された複数の画像
の内の1枚の画像から直前に求めた点で使用したテンプ
レートサイズを使用してテンプレートを作成し、該作成
されたテンプレートの各画素の画素値と前記入力された
他の画像内の画素の画素値を用いて類似度を求め、該求
めた類似度から複数画像間の視差の分布が急峻に変化す
る領域内の画素を判断し、該判断結果に基づきテンプレ
ートの面積を変化させたテンプレートを作成することを
特徴とするものである。
In order to achieve the second object, a corresponding point extracting method according to claim 37 is characterized in that a template size used at a point obtained immediately before from one of a plurality of input images is used. A similarity is calculated using the pixel value of each pixel of the generated template and the pixel value of the pixel in the input other image, and a plurality of images are calculated from the calculated similarity. The method is characterized in that pixels in an area where the distribution of parallax changes sharply are determined, and a template in which the area of the template is changed is created based on the determination result.

【0062】また、上記第2の目的を達成するため請求
項38記載の対応点抽出装置は、入力された複数の画像
の内の1枚の画像から直前に求めた点で使用したテンプ
レートサイズを使用してテンプレートを作成する第1の
テンプレート作成手段と、該第1のテンプレート作成手
段により作成されたテンプレートの各画素の画素値と前
記入力された他の画像内の画素の画素値を用いて類似度
を求める類似度演算手段と、該類似度演算手段により求
めた類似度から入力された類似度があるしきい値より小
さいときを判断する判断手段と、該判断手段の判断結果
に基づきテンプレートの面積を変化させたテンプレート
を作成する第2のテンプレート作成手段とを具備したこ
とを特徴とするものである。
In order to attain the second object, the corresponding point extracting apparatus according to claim 38 uses a template size used at a point obtained immediately before from one of a plurality of input images. A first template creation unit for creating a template using the first template creation unit, and a pixel value of each pixel of the template created by the first template creation unit and a pixel value of a pixel in the input other image. Similarity calculating means for obtaining similarity, determining means for determining when the similarity input from the similarity calculated by the similarity calculating means is smaller than a certain threshold value, and a template based on the determination result of the determining means And a second template creating means for creating a template having a changed area.

【0063】また、上記第2の目的を達成するため請求
項39記載の対応点抽出装置は、入力された複数の画像
の内の1枚の画像から直前に求めた点で使用したテンプ
レートサイズを使用してテンプレートを作成する第1の
テンプレート作成手段と、該第1のテンプレート作成手
段により作成されたテンプレートの各画素の画素値と前
記入力された他の画像内の画素の画素値を用いて類似度
を求める類似度演算手段と、該類似度演算手段により求
めた類似度から入力された複数の類似度の差があるしき
い値より小さいときを判断する判断手段と、該判断手段
の判断結果に基づきテンプレートの面積を変化させたテ
ンプレートを作成する第2のテンプレート作成手段とを
具備したことを特徴とするものである。
In order to attain the second object, the corresponding point extracting apparatus according to claim 39 uses a template size used at a point obtained immediately before from one of a plurality of input images. A first template creation unit for creating a template using the first template creation unit, and a pixel value of each pixel of the template created by the first template creation unit and a pixel value of a pixel in the input other image. Similarity calculating means for obtaining similarity, determining means for determining when a difference between a plurality of similarities input from the similarity calculated by the similarity calculating means is smaller than a certain threshold value, and determining by the determining means And a second template creating means for creating a template in which the area of the template is changed based on the result.

【0064】また、上記第2の目的を達成するため請求
項40記載の対応点抽出装置は、入力された複数の画像
の内の1枚の画像から直前に求めた点で使用したテンプ
レートサイズを使用してテンプレートを作成する第1の
テンプレート作成手段と、該第1のテンプレート作成手
段により作成されたテンプレートの各画素の画素値と前
記入力された他の画像内の画素の画素値を用いて類似度
を求める類似度演算手段と、該類似度演算手段により求
めた類似度から複数画像間の視差の分布が急峻に変化す
る領域内の画素を判断する判断手段と、該判断手段の判
断結果に基づきテンプレートの面積を変化させたテンプ
レートを作成する第2のテンプレート作成手段とを具備
したことを特徴とするものである。
In order to achieve the second object, the corresponding point extracting apparatus according to claim 40, further comprises a template size used at a point obtained immediately before from one of a plurality of input images. A first template creation unit for creating a template using the first template creation unit, and a pixel value of each pixel of the template created by the first template creation unit and a pixel value of a pixel in the input other image. Similarity calculating means for obtaining similarity; determining means for determining, from the similarity calculated by the similarity calculating means, a pixel in an area in which the distribution of parallax between a plurality of images changes sharply; And a second template creating means for creating a template in which the area of the template is changed based on.

【0065】[0065]

【発明の実施の形態】以下、本発明の各実施の形態を図
1〜図23に基づき説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments of the present invention will be described below with reference to FIGS.

【0066】(第1の実施の形態)まず、本発明の第1
の実施の形態を図1〜図4に基づき説明する。図1は、
本発明の第1の実施の形態に係る対応点抽出装置の構成
を示すブロック図であり、同図中、101は画像入力手
段で、例えば図24(a)に示すような2台のカメラを
有している。102は基準画像メモリ、103は探索さ
れる画像メモリ、104はアドレス発生部、105はデ
ータ保管部、106はテンプレート画像作成部、107
は評価関数演算部、108は判断部、109はテンプレ
ートサイズ変更部である。
(First Embodiment) First, the first embodiment of the present invention will be described.
The embodiment will be described with reference to FIGS. FIG.
FIG. 2 is a block diagram showing a configuration of a corresponding point extraction device according to the first embodiment of the present invention. In the figure, reference numeral 101 denotes image input means, for example, two cameras as shown in FIG. Have. 102 is a reference image memory, 103 is an image memory to be searched, 104 is an address generation unit, 105 is a data storage unit, 106 is a template image creation unit, 107
Denotes an evaluation function calculation unit, 108 denotes a determination unit, and 109 denotes a template size change unit.

【0067】図1において、画像入力手段101から画
像が入力され、その入力された画像が基準画像メモリ1
02及び探索される画像メモリ103にそれぞれ保持さ
れる。アドレス発生部104からは、基準画像メモリ1
02中の1点を示すアドレスが、また、データ保管部1
05からは、最初のテンプレートサイズがテンプレート
画像作成部106に送られ、このテンプレート画像作成
部106において基準画像メモリ102を用いてそのア
ドレスが示す点を中心に、そのテンプレートサイズのテ
ンプレート画像が作成される。評価関数演算部107で
はテンプレート画像作成部106から入力されたテンプ
レート画像と、探索される画像メモリ103から入力さ
れる探索される画像との間で、従来技術で説明した
(1)式〜(3)式の内の1つの類似度の評価関数を用
いて評価値が演算され、対応点候補とその点の評価値が
出力される。判断部108では大きなテンプレートであ
るならば得られた評価値から、テンプレートの中心点が
画像中で距離が大きく変化する領域内の点か否かを判断
し、その領域内の点ならばテンプレートサイズ変更部1
09に信号を送り、新しいテンプレートサイズがテンプ
レート画像作成部106に送られ、そこで作成される新
しいテンプレートを用いて評価関数演算部107で再び
評価関数を計算し、対応点を決定する。また、テンプレ
ートの中心点が画像中で距離が大きく変化する領域内の
点でないならば、その対応点結果を出力する。
In FIG. 1, an image is input from the image input means 101 and the input image is stored in the reference image memory 1.
02 and the image memory 103 to be searched for, respectively. From the address generation unit 104, the reference image memory 1
02 is an address indicating one point in the data storage unit 1
From 05, the initial template size is sent to the template image creation unit 106, and the template image creation unit 106 creates a template image of the template size around the point indicated by the address using the reference image memory 102. You. In the evaluation function calculation unit 107, the expressions (1) to (3) described in the related art are used between the template image input from the template image creation unit 106 and the searched image input from the searched image memory 103. The evaluation value is calculated by using one of the similarity evaluation functions in the expression, and the corresponding point candidate and the evaluation value of the point are output. The determination unit 108 determines whether or not the center point of the template is a point in an area where the distance greatly changes in the image from the obtained evaluation value if the template is a large template. Change part 1
09, a new template size is sent to the template image creation unit 106, and the evaluation function is calculated again by the evaluation function calculation unit 107 using the new template created there, and the corresponding points are determined. If the center point of the template is not a point in the area where the distance greatly changes in the image, the corresponding point result is output.

【0068】以上の構成において、アドレス発生部10
4は基準画像メモリ102中の1点を示すアドレスを発
生させる動作を実行し、データ保管部105は1回目の
テンプレートマッチングのテンプレートサイズデータを
保管しておき、そのデータをテンプレート画像作成部1
06へ送る動作を実行する。テンプレート画像作成部1
06はアドレス発生部104からアドレス、データ保管
部105からテンプレートサイズデータまたはテンプレ
ートサイズ変更部109からのテンプレートサイズ、基
準画像メモリ102から基準画像を受け取り、テンプレ
ート画像を作成する動作を実行する。評価関数演算部1
07ではテンプレート画像と探索される画像との評価値
を上記(1)式〜(3)式の内の1つに基づいて計算
し、対応点候補とその評価値を出力する動作を実行す
る。
In the above configuration, the address generator 10
4 executes an operation of generating an address indicating one point in the reference image memory 102, the data storage unit 105 stores template size data for the first template matching, and stores the data in the template image generation unit 1
The operation of sending to 06 is performed. Template image creation unit 1
Reference numeral 06 receives the address from the address generation unit 104, the template size data from the data storage unit 105 or the template size from the template size change unit 109, and the reference image from the reference image memory 102, and executes the operation of creating the template image. Evaluation function operation unit 1
In step 07, the evaluation value of the template image and the searched image is calculated based on one of the above equations (1) to (3), and the operation of outputting the corresponding point candidate and its evaluation value is executed.

【0069】この評価関数演算部107の処理動作につ
いて、図2のフローチャートを用いて説明する。このフ
ローチャートでは、評価関数に上記(2)式の相関値σ
(x,y)を用いている。
The processing operation of the evaluation function calculation unit 107 will be described with reference to the flowchart of FIG. In this flowchart, the evaluation function uses the correlation value σ of the above equation (2).
(X, y) is used.

【0070】尚、対応点候補の座標値を(X,Y)と
し、相関値をσ(x,y)とする。
It is assumed that the coordinate value of the corresponding point candidate is (X, Y) and the correlation value is σ (x, y).

【0071】図2のステップS201でテンプレート画
像及び探索される画像をそれぞれ入力し、次のステップ
S202で評価値を初期化する(ここではσx,y=
0)。次にステップS203で探索される画像から1点
を選択し、その点とテンプレートの中心を合わせ、次の
ステップS204で評価値を演算する。次にステップS
205で前記ステップS204において演算した評価値
が今までの評価値より(ここでは相関値なので)高いか
否かを判断し、高いと判断された場合は、次のステップ
S206で対応点候補として座標を保持し、今までの評
価値も入れ換えた後、次のステップS207へ進む。ま
た、前記ステップS205において演算した評価値が今
までの評価値より低いと判断された場合は、前記ステッ
プS206をスキップしてステップS207へ進む。
In step S201 of FIG. 2, a template image and an image to be searched are input, and an evaluation value is initialized in the next step S202 (here, σx, y =
0). Next, one point is selected from the image searched in step S203, the point is aligned with the center of the template, and an evaluation value is calculated in the next step S204. Next, step S
In step 205, it is determined whether or not the evaluation value calculated in step S204 is higher than the evaluation value up to now (because it is a correlation value). If it is determined to be higher, the coordinates are determined as corresponding point candidates in next step S206. After the previous evaluation values are replaced, the process proceeds to the next step S207. If it is determined in step S205 that the calculated evaluation value is lower than the previous evaluation value, the process skips step S206 and proceeds to step S207.

【0072】このステップS207では探索される画像
中で全ての点に関して処理を行ったか否かを判断し、全
ての点に関して処理を行ったと判断された場合は、次の
ステップS208でそのとき保持している対応点候補の
座標値(X,Y)と評価値(ここではσx,y)を出力し
た後、本処理動作を終了する。また、前記ステップS2
07において全ての点に関して処理を行っていないと判
断された場合は、次の点に関して評価値を求めるために
前記ステップS203へ戻って再び探索される画像から
次の1点を選択して再び評価値の演算を行う。
In this step S207, it is determined whether or not processing has been performed for all points in the image to be searched. If it is determined that processing has been performed for all points, the processing is held in the next step S208. After outputting the coordinate values (X, Y) and the evaluation values (here, σx, y) of the corresponding corresponding point candidates, this processing operation ends. Step S2
If it is determined in step 07 that processing has not been performed for all points, the process returns to step S203 to obtain an evaluation value for the next point, selects the next one point from the searched image again, and evaluates again. Performs a value operation.

【0073】以上詳述したように評価関数演算部107
は動作する。
As described in detail above, the evaluation function calculator 107
Works.

【0074】判断部108ではテンプレートサイズが1
回目の大きさならば、得られた評価値からテンプレート
の中心点が距離の大きく変化する領域内の点か否かを判
断する動作を実行する。また、テンプレートサイズが2
回目の大きさならば、対応点候補を対応点として出力す
るように動作する。判断部108におけるテンプレート
の中心点が距離の大きく変化する領域内の点か否かの判
断の仕方は、評価値があるしきい値(ここではσthとす
る)より高いか否かを求めることである。なぜならば、
図3(a)中のP点を中心にテンプレート31を作成
し、対応点を図3(b)中で求めるとき、例えばライン
L上の点での評価値をプロットすると、図4(a)のよ
うになる。ここで評価値は、上記(2)式のσを使用し
たP点は、距離の大きく変化する領域内の点ではないた
め、図4(a)のように評価値σの高いピークが出て対
応点を決定できる。
The determination unit 108 determines that the template size is 1
If the size is the first time, an operation of determining whether or not the center point of the template is a point in an area where the distance greatly changes is executed based on the obtained evaluation value. If the template size is 2
If the size is the first time, it operates to output the corresponding point candidate as the corresponding point. The determination unit 108 determines whether or not the center point of the template is a point in a region where the distance greatly changes by determining whether or not the evaluation value is higher than a certain threshold value (here, σth). is there. because,
When the template 31 is created around the point P in FIG. 3A and the corresponding point is obtained in FIG. 3B, for example, when the evaluation value at a point on the line L is plotted, FIG. become that way. Here, as for the evaluation value, the point P using σ in the above equation (2) is not a point in the region where the distance greatly changes, and a peak having a high evaluation value σ appears as shown in FIG. The corresponding points can be determined.

【0075】しかし、図3(a)中のQ点を中心にテン
プレート32を作成し、対応点を図3(b)中で求める
とき、例えばラインM上の点での評価値をプロットする
と、図4(b)のようになる。これは上述した問題点で
示したように、テンプレート内に距離の大きく異なる領
域があるためで、図3(c)のようにテンプレート中の
領域Rにより評価値が向上した山が左側の山で、領域S
により評価値が向上した山が右側の山である。このよう
に、距離の大きく変化する領域内に存在する点の対応点
候補の評価値は、それ以外の領域の点の評価値と比較す
るとかなり低くなる(σを使用した場合)。このような
事実により、評価値があるしきい値σthより高いか低い
かでテンプレートの中心点が大きく変化する領域内の点
か否かの判断を行うことができる。この判断は評価値の
計算に上記(1)式を使用したならば、評価値Ε(x,y)
がしきい値σthより高ければその領域内の点となり、ま
た、上記(2)式を使用したならば、評価値σ(x,y)が
しきい値σthより低ければその領域内の点となり、更
に、上記(3)式を使用したならば、評価値C(x,y)が
しきい値Cthより低ければその領域内の点となる。
However, when the template 32 is created centering on the point Q in FIG. 3A and the corresponding points are obtained in FIG. 3B, for example, when the evaluation value at a point on the line M is plotted, The result is as shown in FIG. This is because, as shown in the above-mentioned problem, there are regions in the template having greatly different distances, and as shown in FIG. 3C, the mountain whose evaluation value is improved by the region R in the template is the mountain on the left side. , Area S
The mountain whose evaluation value is improved is the mountain on the right. As described above, the evaluation value of the corresponding point candidate of the point existing in the area where the distance greatly changes is considerably lower than the evaluation value of the point in the other area (when σ is used). Due to such a fact, it is possible to determine whether or not the center point of the template is a point in an area where the evaluation value is higher or lower than a certain threshold value σth. This judgment is based on the evaluation value Ε (x, y) if the above equation (1) is used for calculating the evaluation value.
Is higher than the threshold value σth, the point is in the area. If the above equation (2) is used, if the evaluation value σ (x, y) is lower than the threshold value σth, the point is in the area. Further, if the above equation (3) is used, if the evaluation value C (x, y) is lower than the threshold value Cth, the point is within the area.

【0076】テンプレートサイズ変更部109は判断部
108でテンプレートの中心点が距離の大きく変化する
領域内の点と判断されたときに、テンプレートサイズを
小さく変更してテンプレート画像作成部106へ出力す
るように動作する。
When the determining unit 108 determines that the center point of the template is in a region where the distance changes greatly, the template size changing unit 109 changes the template size to a smaller size and outputs it to the template image creating unit 106. Works.

【0077】以上詳述したように動作する各部を図1の
ように構成すると、精度の高い対応点抽出処理が可能と
なり、精度の高い被写体の距離分布を求めることができ
る。
When the components operating as described in detail above are configured as shown in FIG. 1, highly accurate corresponding point extraction processing can be performed, and a highly accurate object distance distribution can be obtained.

【0078】なお、本実施の形態においては、テンプレ
ートサイズは大小の2種類であったが、小さくしてもな
お対応点が分かりにくいときは更に小さくする等、いく
つもの種類のサイズのテンプレートを使用しても良い。
In the present embodiment, there are two types of template sizes, large and small. However, if the corresponding points are still difficult to understand even if the template size is small, templates of various sizes are used. You may.

【0079】(第2の実施の形態)次に、本発明の第2
の実施の形態を図5〜図7に基づき説明する。
(Second Embodiment) Next, a second embodiment of the present invention will be described.
Will be described with reference to FIGS.

【0080】図5は本発明の第2の実施の形態に係る対
応点抽出装置の構成を示すブロック図であり、同図にお
いて上述した第1の実施の形態における図1と同一部分
には同一符号が付してある。図5において図1と異なる
点は、図1の構成からテンプレートサイズ変更部109
を削除して、エッジマスクテンプレート作成部110を
付加したことである。
FIG. 5 is a block diagram showing a configuration of a corresponding point extracting apparatus according to a second embodiment of the present invention. In FIG. 5, the same parts as those in FIG. The code is attached. 5 is different from FIG. 1 in that the template size changing unit 109 differs from the configuration in FIG.
Is deleted, and the edge mask template creating unit 110 is added.

【0081】図5において、第1実施の形態と同様に、
画像入力手段101から画像が入力され、その入力され
た画像が基準画像メモリ102及び探索される画像メモ
リ103にそれぞれ保持される。アドレス発生部104
からは、基準画像メモリ102中の1点を示すアドレス
が、また、データ保管部105からは、最初のテンプレ
ートサイズがテンプレート画像作成部106に送られ、
このテンプレート画像作成部106において基準画像メ
モリ102を用いてそのアドレスが示す点を中心に、そ
のテンプレートサイズのテンプレート画像が作成され
る。評価関数演算部107ではテンプレート画像作成部
106から入力されたテンプレート画像と、探索される
画像メモリ103から入力される探索される画像との間
で、従来技術で説明した(1)式〜(3)式の内の1つ
の類似度の評価関数を用いて評価値が演算され、対応点
候補とその点の評価値が出力される。判断部108では
テンプレートが大きなテンプレートであるならば得られ
た評価値から、テンプレートの中心点が画像中で距離が
大きく変化する領域内の点か否かを判断し、その領域内
の点ならばエッジマスクテンプレート作成部110に信
号を送り、強いエッジの外側にマスクをかけるようにし
てテンプレート画像を変更し、新しいテンプレート画像
を用いて評価関数演算部107で再び評価関数を計算
し、対応点を決定する。また、テンプレートの中心点が
画像中で距離が大きく変化する領域内の点でないなら
ば、その対応点結果を出力する。
In FIG. 5, as in the first embodiment,
An image is input from the image input unit 101, and the input image is stored in the reference image memory 102 and the searched image memory 103, respectively. Address generator 104
, An address indicating one point in the reference image memory 102 is sent from the data storage unit 105, and an initial template size is sent to the template image creation unit 106 from the data storage unit 105.
The template image creating unit 106 creates a template image of the template size around the point indicated by the address using the reference image memory 102. In the evaluation function calculation unit 107, the expressions (1) to (3) described in the related art are used between the template image input from the template image creation unit 106 and the searched image input from the searched image memory 103. The evaluation value is calculated by using one of the similarity evaluation functions in the expression, and the corresponding point candidate and the evaluation value of the point are output. If the template is a large template, the determining unit 108 determines from the obtained evaluation value whether or not the center point of the template is a point in an area where the distance greatly changes in the image. A signal is sent to the edge mask template creating unit 110, the template image is changed so as to mask the outside of the strong edge, the evaluation function is calculated again by the evaluation function operation unit 107 using the new template image, and the corresponding point is determined. decide. If the center point of the template is not a point in the area where the distance greatly changes in the image, the corresponding point result is output.

【0082】以上の構成において第1実施の形態と異な
るのは、エッジマスクテンプレート作成部110であ
る。第1実施の形態ではテンプレートの中心点が画像中
で内の点であるときはテンプレートサイズを小さくした
が、本実施の形態では、強いエッジでテンプレートを分
けて中心点を含む方のテンプレートでマッチングを行
う。なぜならば、距離が大きく変化する領域ではテクス
チャが異なり、強いエッジが現れるためである。そこ
で、テンプレートを分けることによりテンプレート内の
距離の異なる部位の評価値の影響がなくなるからであ
る。
The above configuration differs from the first embodiment in an edge mask template creating section 110. In the first embodiment, when the center point of the template is an inner point in the image, the template size is reduced. However, in the present embodiment, the template is divided by strong edges and matching is performed using the template including the center point. I do. This is because the texture is different in a region where the distance greatly changes, and a strong edge appears. Therefore, dividing the template eliminates the influence of the evaluation values of the portions having different distances in the template.

【0083】次にエッジマスクテンプレート作成部11
0の処理動作について、図6のフローチャートを用いて
説明する。本実施の形態ではテンプレートを分けるので
はなく、評価値演算に使用しないようにテンプレートに
マスクをするようにしたものである。
Next, an edge mask template creating section 11
The processing operation of 0 will be described with reference to the flowchart of FIG. In the present embodiment, a template is masked so as not to be used for the evaluation value calculation, instead of dividing the template.

【0084】図6のステップS601でテンプレート画
像が入力され、次のステップS602でソーベルフィル
タ等の手法でテンプレート画像のエッジ画像を作成す
る。次にステップS603であるしきい値より強いエッ
ジを、前記ステップS602において作成されたエッジ
より抽出する。次にステップS604で前記ステップS
603において得られた強エッジ画像の中からテンプレ
ート中心点に近い物を抽出する。次にステップS605
でテンプレートの中心からみてそのエッジの内側と外側
に分けて外側をマスクする。次にステップS606で前
記ステップS605においてマスクされたマスク画像と
テンプレート画像とを重ねてエッジマスクテンプレート
画像を作成した後、本処理動作を終了する。
In step S601 of FIG. 6, a template image is input, and in the next step S602, an edge image of the template image is created by a technique such as a Sobel filter. Next, an edge stronger than the threshold value in step S603 is extracted from the edge created in step S602. Next, in step S604, the step S
In step 603, an object close to the template center point is extracted from the strong edge images obtained. Next, step S605
2. Mask the outside by dividing into the inside and outside of the edge as viewed from the center of the template. Next, in step S606, the mask image masked in step S605 and the template image are overlapped to create an edge mask template image, and then this processing operation ends.

【0085】図7は以上の処理を模式的に示す図であ
り、同図(a)はテンプレート画像、(b)はエッジ画
像、(c)は強エッジ画像、(d)は近エッジ画像、
(e)はマスク画像、(f)はエッジマスクテンプレー
ト画像である。
FIGS. 7A and 7B schematically show the above processing. FIG. 7A shows a template image, FIG. 7B shows an edge image, FIG. 7C shows a strong edge image, FIG.
(E) is a mask image, and (f) is an edge mask template image.

【0086】エッジマスクテンプレート画像を用いて対
応点抽出を行うことにより、処理時間が余分にかかる
が、高精度な対応点抽出を行うことができ、精度の高い
被写体の距離分布を求めることが可能となる。
[0086] By performing the corresponding point extraction using the edge mask template image, it takes extra processing time, but it is possible to perform the corresponding point extraction with high accuracy and obtain the distance distribution of the object with high accuracy. Becomes

【0087】なお、本実施の形態では、テンプレートに
近いエッジを選択したが、そのエッジが被写体と背景を
分離するエッジとは限らないので、中心から遠いエッジ
から順々にエッジマスクテンプレート画像を作成してい
き、何回も繰り返すことは有効である。
In this embodiment, an edge close to the template is selected. However, since the edge is not limited to an edge separating the subject from the background, an edge mask template image is created sequentially from an edge far from the center. It is effective to repeat it many times.

【0088】(第3の実施の形態)次に、本発明の第3
の実施の形態を図8に基づき説明する。図8は本発明の
第3の実施の形態に係る対応点抽出装置における評価関
数演算部の処理動作を示すフローチャートである。
(Third Embodiment) Next, a third embodiment of the present invention will be described.
The embodiment will be described with reference to FIG. FIG. 8 is a flowchart showing the processing operation of the evaluation function calculation unit in the corresponding point extraction device according to the third embodiment of the present invention.

【0089】上述した第1及び第2の実施の形態では、
テンプレートの中心点が、距離が大きく変化する領域内
の点であるときにはテンプレートサイズを小さくした
り、エッジマスクテンプレート画像で再度テンプレート
マッチングを、探索される画像中、全域に対して行って
いた。しかし、小さいテンプレートサイズやエッジマス
クテンプレート画像でテンプレートマッチングを行うと
言うことは、他の類似しているところにつかまり、誤対
応の原因になるばかりでなく、処理時間が多くかかるこ
とになる。
In the first and second embodiments described above,
When the center point of the template is a point in a region where the distance greatly changes, the template size is reduced or template matching is performed again on the edge mask template image for the entire region in the searched image. However, performing template matching with a small template size or an edge mask template image is not only a cause for other similar points, causing an erroneous correspondence but also requires a long processing time.

【0090】そこで、本実施の形態では、最初に行った
テンプレートマッチングの結果を利用して最初の評価値
があるしきい値よりも高い点のみ2回目以降の評価値演
算を行うようにしたものである。
Therefore, in the present embodiment, the second and subsequent evaluation value calculations are performed only at points where the first evaluation value is higher than a certain threshold value by using the result of the template matching performed first. It is.

【0091】図8のフローチャートでは、評価値演算に
上述した(2)式の相関値σ(x,y)を用い、また、対応
点候補の座標値を(X,Y)、その点の評価値をσ(X,
Y)、1回目の評価値を保持する配列をH(x,y)とし、テ
ンプレートサイズの変更後、エッジマスクテンプレート
画像での評価値演算を行うか否かの判断に用いるしきい
値をHthとする。
In the flowchart of FIG. 8, the correlation value σ (x, y) of the above equation (2) is used for the evaluation value calculation, and the coordinate value of the corresponding point candidate is (X, Y). The value is σ (X,
Y) The array holding the first evaluation value is H (x, y), and after changing the template size, the threshold value used to determine whether to perform the evaluation value calculation on the edge mask template image is Hth And

【0092】図8のステップS801でテンプレート画
像及び探索される画像をそれぞれ入力し、次のステップ
S802で評価値を初期化する(ここではσx,y=
0)。次にステップS803で探索される画像から1点
を選択し、次のステップS804でこの点の評価関数演
算が1回目か否かを判断する。そして、1回目の場合は
次のステップS805へ進み、また、1回目でない場合
はステップS811でその点の評価値H(x,y)がしきい
値Hthより高いか(良いか)否かを判断し(この場合は
相関値であるから大きい方が良い)、低い(悪い)場合
は前記ステップS803へ戻って探索される画像から次
の1点を選択し、高い(良い)場合は前記ステップS8
05へ進む。
In step S801 in FIG. 8, a template image and an image to be searched are input, and an evaluation value is initialized in the next step S802 (here, σx, y =
0). Next, one point is selected from the searched image in step S803, and in the next step S804, it is determined whether or not the evaluation function calculation of this point is the first time. If it is the first time, the process proceeds to the next step S805. If it is not the first time, it is determined in step S811 whether the evaluation value H (x, y) at that point is higher than the threshold value Hth (good). Judgment (in this case, the correlation value is larger, the larger is better). If it is lower (bad), the process returns to step S803 to select the next one point from the image to be searched. S8
Go to 05.

【0093】このステップS805では評価値を演算
し、次のステップS806で前記ステップS805にお
いて演算した評価値(ここではσ(x,y))をH(x,y)に書
き込む。次にステップS807で前記ステップS805
において演算した評価値が今までの評価値より高いか否
かを判断し、高いと判断された場合は、次のステップS
808で対応点候補として座標を保持し、今までの評価
値(ここではσX,Y)も入れ換えた後、次のステップS
809へ進む。また、前記ステップS807において演
算した評価値が今までの評価値より低いと判断された場
合は、前記ステップS808をスキップしてステップS
809へ進む。
In this step S805, the evaluation value is calculated, and in the next step S806, the evaluation value (here, σ (x, y)) calculated in step S805 is written in H (x, y). Next, in step S807, the aforementioned step S805 is performed.
It is determined whether or not the evaluation value calculated in is higher than the previous evaluation value. If it is determined that the evaluation value is higher, the next step S
At step 808, the coordinates are held as the corresponding point candidates, and the evaluation values (σX, Y in this case) are replaced, and the next step S
Go to 809. If it is determined that the evaluation value calculated in step S807 is lower than the previous evaluation value, step S808 is skipped and step S808 is skipped.
Go to 809.

【0094】このステップS809では探索される画像
中で全ての点に関して処理を行ったか否かを判断し、全
ての点に関して処理を行ったと判断された場合は、次の
ステップS810でそのとき保持している対応点候補の
座標値(X,Y)と評価値(ここではσx,y)を出力し
た後、本処理動作を終了する。また、前記ステップS8
09において全ての点に関して処理を行っていないと判
断された場合は、次の点に関して評価値を求めるために
前記ステップS803へ戻って再び探索される画像から
次の1点を選択して再び評価値の演算を行う。
In this step S809, it is determined whether or not processing has been performed for all points in the image to be searched. If it is determined that processing has been performed for all points, the next step S810 holds the data. After outputting the coordinate values (X, Y) and the evaluation values (here, σx, y) of the corresponding corresponding point candidates, this processing operation ends. Step S8
If it is determined in step 09 that all points have not been processed, the process returns to step S803 to obtain an evaluation value for the next point, selects the next one point from the searched image again, and evaluates again. Performs a value operation.

【0095】以上詳述したように、異なるテンプレート
サイズのとき等の以前の評価値を利用して評価値演算を
行うしかないか否かを判断してから評価値演算を行うの
で、上述した第1及び第2の実施の形態と比較して対応
点抽出処理時間が短縮されると共に、誤抽出が発生する
恐れも少なく、対応点抽出精度が向上する。そして、精
度の高い被写体の距離分布を求めることができる。
As described in detail above, since it is determined whether or not the evaluation value calculation must be performed using the previous evaluation value when the template size is different or the like, the evaluation value calculation is performed. Compared with the first and second embodiments, the corresponding point extraction processing time is shortened, the possibility of erroneous extraction is reduced, and the corresponding point extraction accuracy is improved. Then, a highly accurate distance distribution of the subject can be obtained.

【0096】(第4の実施の形態)次に、本発明の第4
の実施の形態を図9〜図11に基づき説明する。
(Fourth Embodiment) Next, a fourth embodiment of the present invention will be described.
The embodiment will be described with reference to FIGS.

【0097】上述した第1〜第3の実施の形態では、テ
ンプレートの中心点が距離の大きく変化する領域内の点
である判断されると、テンプレートサイズの変更等を行
い、再び評価関数の演算行っていた。しかし、この方法
の場合テンプレートは、探索される画面全域を複数回移
動することになり、処理時間が長くなる。
In the above-described first to third embodiments, when it is determined that the center point of the template is a point in an area where the distance changes greatly, the template size is changed and the evaluation function is calculated again. I was going. However, in this method, the template moves a plurality of times over the entire screen to be searched, and the processing time becomes longer.

【0098】そこで、本実施の形態では図11に示すよ
うにテンプレートをテンプレートAとテンプレートBに
分割し、同時にそれぞれの領域での評価値を求め、ある
領域の評価値を用いて、その点でどの評価値を使用する
のか判断するようにしたものである。
Therefore, in the present embodiment, as shown in FIG. 11, the template is divided into template A and template B, and at the same time, the evaluation value in each area is obtained, and the evaluation value in a certain area is used. It is designed to determine which evaluation value to use.

【0099】図9は本実施の形態に係る対応点抽出装置
の構成を示すブロック図であり、同図において第1の実
施の形態の図1と同一部分には同一符号が付してある。
図9において図1と異なる点は、図1の構成からテンプ
レートサイズ変更部109を削除したことである。
FIG. 9 is a block diagram showing the configuration of a corresponding point extracting apparatus according to this embodiment. In FIG. 9, the same parts as those in FIG. 1 of the first embodiment are denoted by the same reference numerals.
9 differs from FIG. 1 in that the template size changing unit 109 is removed from the configuration in FIG.

【0100】図9において、画像入力手段101から画
像が入力され、その入力された画像が基準画像メモリ1
02及び探索される画像メモリ103にそれぞれ保持さ
れる。アドレス発生部104からは、基準画像メモリ1
02中の1点を示すアドレスが、また、データ保管部1
05からは、テンプレートサイズがテンプレート画像作
成部106に送られ、このテンプレート画像作成部10
6において基準画像メモリ102を用いてそのアドレス
が示す点を中心に、そのテンプレートサイズのテンプレ
ート画像が作成される。評価関数演算部107ではテン
プレート画像作成部106から入力されたテンプレート
画像と、探索される画像メモリ103から入力される探
索される画像との間で、上記(1)式〜(3)式の内の
1つの類似度の評価関数を用いて評価値が演算され、対
応点候補とその点の評価値が出力される。また、同時に
データ保管部105から小さいテンプレートサイズが入
力され、その範囲内での評価値も演算され、対応点候補
とその評価値も出力される。判断部108ではテンプレ
ートAでの評価値から、テンプレートの中心点が画像中
で距離が大きく変化する領域内の点か否かを判断し、そ
の領域内の点ならばテンプレートBで求めた対応点候補
を対応点として出力する。また、テンプレートの中心点
が画像中で距離が大きく変化する領域内の点でないなら
ば、テンプレートAで求めた対応点候補を対応点として
出力する。
In FIG. 9, an image is input from the image input means 101 and the input image is stored in the reference image memory 1.
02 and the image memory 103 to be searched for, respectively. From the address generation unit 104, the reference image memory 1
02 is an address indicating one point in the data storage unit 1
05, the template size is sent to the template image creation unit 106, and the template image creation unit 10
In 6, a template image of the template size is created around the point indicated by the address using the reference image memory 102. In the evaluation function calculation unit 107, between the template image input from the template image creation unit 106 and the searched image input from the searched image memory 103, the expressions (1) to (3) are used. The evaluation value is calculated using the evaluation function of one similarity, and the corresponding point candidate and the evaluation value of the point are output. At the same time, a small template size is input from the data storage unit 105, an evaluation value within that range is calculated, and a corresponding point candidate and its evaluation value are output. The determination unit 108 determines from the evaluation value of the template A whether the center point of the template is a point in an area where the distance greatly changes in the image, and if the point is in the area, the corresponding point obtained by the template B Output candidates as corresponding points. If the center point of the template is not a point in the region where the distance greatly changes in the image, the corresponding point candidate obtained for template A is output as the corresponding point.

【0101】図10は本実施の形態に係る対応点抽出装
置における評価関数演算部107の処理動作を示すフロ
ーチャートである。
FIG. 10 is a flowchart showing the processing operation of the evaluation function calculation unit 107 in the corresponding point extracting apparatus according to the present embodiment.

【0102】このフローチャートでは、評価値演算に上
記(2)式の相関値σ(x,y)を用い、また、テンプレー
トAの対応点候補の座標値を(X1,Y1)、その点の評
価値をσ1(X,Y)、テンプレートBの対応点候補の座標値
を(X2,Y2)、その点の評価値をσ2(X,Y)、また、テ
ンプレートAでの評価値が良いか悪いかを判断するのに
用いるしきい値をHthとする。
In this flowchart, the correlation value σ (x, y) of the above equation (2) is used for the evaluation value calculation, the coordinate value of the corresponding point candidate of the template A is (X1, Y1), and the evaluation of the point is performed. The value is σ1 (X, Y), the coordinate value of the corresponding point candidate of template B is (X2, Y2), the evaluation value of that point is σ2 (X, Y), and the evaluation value of template A is good or bad. The threshold value used to determine whether or not the threshold value is Hth.

【0103】図10のステップS1001でテンプレー
ト画像及び探索される画像をそれぞれ入力し、次のステ
ップS1002で評価値を初期化する(σ1X,Y=σ2X,Y
0)。次にステップS1003で探索される画像から1
点を選択し、次のステップS1004でテンプレートA
とテンプレートBの評価値を同時に演算する。
In step S1001 of FIG. 10, a template image and an image to be searched are input, and an evaluation value is initialized in the next step S1002 (σ1X, Y = σ2X, Y
0). Next, 1 is selected from the image searched in step S1003.
A point is selected, and in the next step S1004, the template A
And the evaluation value of the template B are calculated at the same time.

【0104】テンプレートAの評価値は下記(4)式
で、テンプレートBの評価値は下記(5)式でそれぞれ
求める。
The evaluation value of template A is obtained by the following equation (4), and the evaluation value of template B is obtained by the following equation (5).

【0105】[0105]

【数4】 (Equation 4)

【0106】[0106]

【数5】 このとき図11から分かるようにテンプレートBは、テ
ンプレートAより小さく、テンプレートAの領域に含ま
れるので、テンプレートAの評価値σ1(x,y)を求める演
算を行うときに同時にテンプレートBの評価値σ2(x,y)
も求めることができる。
(Equation 5) At this time, as can be seen from FIG. 11, the template B is smaller than the template A and is included in the area of the template A. Therefore, when the calculation for obtaining the evaluation value σ1 (x, y) of the template A is performed, the evaluation value of the template B is simultaneously obtained. σ2 (x, y)
Can also be requested.

【0107】次のステップS1005で前記ステップS
1004において演算したテンプレートAの評価値(こ
こではσ1(x,y))が今までの評価値(σ1X,Y)より高い
か否かを判断し、高いと判断された場合は、次のステッ
プS1006でテンプレートAの対応点候補として座標
を保持し、今までの評価値も入れ換えた後、また、前記
ステップS1005において演算した評価値が今までの
評価値より低いと判断された場合は、前記ステップS1
006をスキップしてステップS1007へ進む。
In the next step S1005, the step S1005 is executed.
It is determined whether the evaluation value of template A (here, σ1 (x, y)) calculated in 1004 is higher than the previous evaluation value (σ1X, Y), and if it is determined to be higher, the next step After holding the coordinates as the corresponding point candidate of the template A in S1006 and replacing the previous evaluation values, and when it is determined that the evaluation value calculated in step S1005 is lower than the previous evaluation value, Step S1
Skip 006 and proceed to step S1007.

【0108】このステップS1007では前記ステップ
S1004において演算したテンプレートAの評価値が
しきい値Hthより高く且つテンプレートBの評価値(σ
2(x,y))が今までの評価値より高いか否かを判断する。
そして、テンプレートAの評価値がしきい値Hthより高
く且つテンプレートBの評価値(σ2(x,y))が今までの
評価値より高い場合は次のステップS1008でテンプ
レートBの対応点候補として座標を保持し、今までの評
価値も入れ換えた後、次のステップS1009へ進む。
また、前記ステップS1007においてテンプレートA
の評価値がしきい値Hthより高くなく且つテンプレート
Bの評価値(σ2(x,y))が今までの評価値より低くない
と判断された場合は、前記ステップS1008をスキッ
プしてステップS1009へ進む。
In this step S1007, the evaluation value of template A calculated in step S1004 is higher than threshold value Hth and the evaluation value of template B (σ
2 (x, y)) is determined to be higher than the previous evaluation value.
If the evaluation value of the template A is higher than the threshold value Hth and the evaluation value (σ2 (x, y)) of the template B is higher than the previous evaluation value, the corresponding point candidate of the template B is determined in the next step S1008. After the coordinates are held and the evaluation values thus far are replaced, the process proceeds to the next step S1009.
In step S1007, the template A
Is not higher than the threshold value Hth and the evaluation value (.sigma.2 (x, y)) of the template B is not lower than the previous evaluation value, the step S1008 is skipped and the step S1009 is skipped. Proceed to.

【0109】ステップS1009では探索される画像中
で全ての点に関して処理を行ったか否かを判断し、全て
の点に関して処理を行ったと判断された場合は、次のス
テップS1010でそのとき保持している対応点候補の
座標値(X1,Y1)、(X2,Y2)と評価値(σ1
x,y)を出力した後、本処理動作を終了する。また、前
記ステップS1009において全ての点に関して処理を
行っていないと判断された場合は、次の点に関して評価
値を求めるために前記ステップS1003へ戻って再び
探索される画像から次の1点を選択して再び評価値の演
算を行う。
In step S1009, it is determined whether or not processing has been performed for all points in the image to be searched. If it is determined that processing has been performed for all points, the processing is held in step S1010. (X1, Y1), (X2, Y2) and evaluation value (σ1
After output of (x, y), this processing operation ends. If it is determined in step S1009 that all points have not been processed, the process returns to step S1003 to select the next one point from the image searched again to obtain an evaluation value for the next point. Then, the evaluation value is calculated again.

【0110】次に判断部108において、評価値関数演
算部107で演算されたテンプレートAの評価値(σ1
x,y)を用いてテンプレートの中心点が距離の大きく変
化する領域内の点であるか否かを判断し、その領域内の
点であればテンプレートBで得られた対応点候補の座標
値(X2,Y2)を対応点として出力し、その領域内の
点でなければテンプレートAで得られた対応点候補の座
標値(X1,Y1)を対応点として出力する。
Next, in the judging section 108, the evaluation value of the template A calculated by the evaluation value function calculating section 107 (σ1
x, y) to determine whether or not the center point of the template is a point in a region where the distance greatly changes, and if the point is in that region, the coordinate value of the corresponding point candidate obtained in template B (X2, Y2) is output as the corresponding point, and if it is not a point in the area, the coordinate value (X1, Y1) of the corresponding point candidate obtained by template A is output as the corresponding point.

【0111】以上詳述したように1つのテンプレートの
中に小領域を設けて、その領域内の評価値演算も同様に
行い、テンプレートの中心点が距離の大きく変化する領
域内の点であるときはテンプレート内の小領域の評価値
演算結果を用いることにより、従来例と比較して対応点
抽出処理時間の増加がほとんどなしで対応点抽出精度が
向上する。そして、精度の高い被写体の距離分布を求め
ることができる。
As described in detail above, a small area is provided in one template, and the evaluation value calculation in that area is performed in the same manner. When the center point of the template is a point in the area where the distance greatly changes. By using the evaluation value calculation result of the small area in the template, the corresponding point extraction accuracy is improved with almost no increase in the corresponding point extraction processing time as compared with the conventional example. Then, a highly accurate distance distribution of the subject can be obtained.

【0112】なお、本実施の形態では、テンプレート内
に1つの小さな領域を設けたが、この小さな領域の設定
個数は幾つでも良く、また、第2の実施の形態のように
エッジマスクをかけた評価値を同時に演算するようにし
ても同様の効果が得られる。
In the present embodiment, one small area is provided in the template. However, the number of the small areas may be any number, and an edge mask is applied as in the second embodiment. Similar effects can be obtained by calculating the evaluation values simultaneously.

【0113】(第5の実施の形態)次に、本発明の第5
の実施の形態を図12〜図15に基づき説明する。例え
ば図24(a),(b)に示すような手段により得られ
た画像には対応点が存在しないオクルージョン領域と呼
ばれる領域が存在し、その領域の検出が困難であるとい
う問題点があった。
(Fifth Embodiment) Next, a fifth embodiment of the present invention will be described.
The embodiment will be described with reference to FIGS. For example, in an image obtained by means shown in FIGS. 24A and 24B, there is a problem that an area called an occlusion area having no corresponding point exists, and it is difficult to detect the area. .

【0114】例えば図14(a)のI点の対応点は同図
(b)では被写体である車に隠されてしまい、この画像
中には存在しない。このような領域をオクルージョン領
域と呼ぶが、この領域内の点には対応点が存在しないの
で、この領域の点の結果は対応点抽出結果として使用し
てはいけない。この領域の検出手法として、基準画像中
の中心点候補が探索される画像中で得られたら、次にそ
の点を中心に探索される画像中でテンプレートを作成
し、それを用いて基準画像中でそのテンプレートで対応
点を探索し、得られた基準画像中の対応点候補と元のテ
ンプレートの中心点が一致していれば、探索される画像
中の対応点候補は基準画像中の点の対応点であり、一致
していなければ対応点ではないと判断する手法がある。
しかし、この考え方だけでは図14(a)中のJ点の対
応点候補が背景の窓によって誤って図14(b)中のK
点と抽出され、次にK点を中心としたテンプレートでの
対応点が再び誤って図14(a)中のJ点と抽出された
とき、つまり2回誤抽出したときや、図14(a)中の
L点の対応点が正しく図14(b)中のM点と抽出され
たのに、そのM点の対応点が図14(a)中のN点と背
景の木や地面のために誤抽出されたとき等、誤った判断
を行うことが多々あった。
For example, the point corresponding to the point I in FIG. 14A is hidden by the car as the subject in FIG. 14B, and does not exist in this image. Such an area is called an occlusion area. Since there is no corresponding point at a point in this area, the result of a point in this area must not be used as a corresponding point extraction result. As a method for detecting this region, if a center point candidate in the reference image is obtained in the image to be searched, then a template is created in the image searched around that point, and the template is used in the reference image. In the template, the corresponding point is searched for, and if the corresponding point candidate in the obtained reference image matches the center point of the original template, the corresponding point candidate in the searched image is the point of the point in the reference image. There is a method of judging that a point is a corresponding point, and if they do not match, it is not a corresponding point.
However, with this concept alone, the corresponding point candidate at point J in FIG.
When the corresponding point in the template centered on the point K is erroneously extracted again as the point J in FIG. 14A, that is, when the erroneous extraction is performed twice, 14), the corresponding point of L point is correctly extracted as the M point in FIG. 14B, but the corresponding point of the M point is N point in FIG. In many cases, erroneous judgments are made when erroneous extraction is performed.

【0115】このような問題点を解決するためには、距
離の大きく変化する領域内のD点では図15(a)に示
すように他の領域で用いたのと同じ大きさのテンプレー
ト151と比較して小さいテンプレート152を用いる
か、同図(b)に示すようにエッジで分割した領域15
3だけを演算に使用すれば良い。
In order to solve such a problem, as shown in FIG. 15A, a template 151 having the same size as that used in another region is used at a point D in a region where the distance greatly changes. Using a template 152 that is relatively small, or a region 15 divided by an edge as shown in FIG.
Only three need be used for the calculation.

【0116】本実施の形態はこのようなオクルージョン
領域及び距離が大きく変化する領域を判断するようにし
たものであり、上述した問題点で示した探索される画像
中で対応点候補が得られたら、その対応点候補を中心に
テンプレートを作成し、基準画像中で対応点候補を求
め、その点と基準画像中の点が一致しているか否かを判
断するという手法に、評価値による判断を加え、距離が
大きく変化する領域及びオクルージョン領域の判断を行
う。
In the present embodiment, such an occlusion area and an area in which the distance greatly changes are determined, and if a corresponding point candidate is obtained in the searched image shown in the above-mentioned problem. A template based on the corresponding point candidate is created, a corresponding point candidate is determined in the reference image, and a determination based on the evaluation value is performed by a method of determining whether the point matches the point in the reference image. In addition, a region where the distance changes greatly and an occlusion region are determined.

【0117】本実施の形態においては、評価置関数演算
部と判断部の処理内容が上述した第1〜第4の実施の形
態と異なるものである。
In this embodiment, the processing contents of the evaluation function calculator and the judging unit are different from those of the first to fourth embodiments.

【0118】図12は本実施の形態に係る対応点抽出装
置における評価値関数演算部の処理動作を示すフローチ
ャートである。このフローチャートでは、評価値演算に
上述した(2)式の相関値σ(x,y)を用い、また、探索
される画像中の対応点候補の座標値を(XL,YL)、そ
の点の評価値をσL(X,Y)、基準画像中の対応点候補の対
応点候補の座標値を(XR,YR)、その点の評価値をσ
R(X,Y)とする。
FIG. 12 is a flowchart showing the processing operation of the evaluation value function calculating section in the corresponding point extracting device according to the present embodiment. In this flowchart, the evaluation value calculation uses the correlation value σ (x, y) of the above equation (2), and the coordinate value of the corresponding point candidate in the searched image is (XL, YL). The evaluation value is σL (X, Y), the coordinate value of the corresponding point candidate of the corresponding point candidate in the reference image is (XR, YR), and the evaluation value of the point is σ
Let R (X, Y).

【0119】図12のステップS1201でテンプレー
ト画像及び探索される画像をそれぞれ入力し、次のステ
ップS1202で評価値を初期化する(σRX,Y=σLX,Y
=0)。次にステップS1203で探索される画像から
1点を選択し、次のステップS1204で評価値を演算
する。次のステップS1205で前記ステップS120
4において演算した評価値(σL(x,y))が今までの評価
値(σL(1X,Y))より高いか否かを判断し、高いと判断
された場合は、次のステップS1206で対応点候補と
して座標を保持し、今までの評価値σL(1X,Y)も入れ換
えた後、ステップS1207へ進む。また、前記ステッ
プS1205において演算した評価値が今までの評価値
より低いと判断された場合は、前記ステップS1206
をスキップしてステップS1207へ進む。
In step S1201 of FIG. 12, a template image and an image to be searched are input, and an evaluation value is initialized in the next step S1202 (σRX, Y = σLX, Y
= 0). Next, one point is selected from the images searched in step S1203, and an evaluation value is calculated in the next step S1204. In the next step S1205, step S120
It is determined whether the evaluation value (σL (x, y)) calculated in step 4 is higher than the evaluation value (σL (1X, Y)) up to now, and if it is determined to be higher, the next step S1206 is performed. After holding the coordinates as the corresponding point candidate and replacing the evaluation value σL (1X, Y) so far, the process proceeds to step S1207. If it is determined in step S1205 that the calculated evaluation value is lower than the previous evaluation value, the process proceeds to step S1206.
Skip to step S1207.

【0120】このステップS1207では探索される画
像中で全ての点に関して処理を行ったか否かを判断し、
全ての点に関して処理を行っていないと判断された場合
は、前記ステップS1203へ戻って探索される画像か
ら次の1点を選択して再び評価値演算を行う。また前記
ステップS1207において全ての点に関して処理を行
ったと判断された場合は、次のステップS1208で探
索される画像から対応点候補の座標を中心にしてテンプ
レートを作成する。次にステップS1209で基準画像
から1点を選択し、次のステップS1210で評価値を
演算する。次にステップS1211で前記ステップS1
210において演算された評価値(σR(x,y))が今まで
の評価値(σR(X,Y))よりも高いか否かを判断し、高け
れば次のステップS1212で対応点候補の対応点候補
として座標を保持し、今までの評価値(σR(X,Y))も入
れ換えた後、ステップS1213へ進む。また、前記ス
テップS1211において評価値(σR(x,y))が今まで
の評価値(σR(X,Y))よりも高くないと判断された場合
は、前記ステップS1212をスキップしてステップS
1213へ進む。。
In step S1207, it is determined whether or not processing has been performed for all points in the searched image.
If it is determined that the processing has not been performed for all points, the process returns to step S1203 to select the next one point from the searched image and perform the evaluation value calculation again. If it is determined in step S1207 that processing has been performed for all points, a template is created from the image searched for in the next step S1208, centering on the coordinates of the corresponding point candidate. Next, one point is selected from the reference image in step S1209, and an evaluation value is calculated in the next step S1210. Next, in step S1211, the above-described step S1 is executed.
It is determined whether or not the evaluation value (σR (x, y)) calculated in 210 is higher than the evaluation value (σR (X, Y)) up to now. After the coordinates are held as corresponding point candidates and the evaluation values (σR (X, Y)) so far are replaced, the process proceeds to step S1213. If it is determined in step S1211 that the evaluation value (σR (x, y)) is not higher than the previous evaluation value (σR (X, Y)), step S1212 is skipped and step S1212 is skipped.
Proceed to 1213. .

【0121】このステップS1213では探索される画
像中で全ての点に関して処理を行ったか否かを判断し、
全ての点に関して処理を行ったと判断された場合は、次
のステップS1214でそのとき保持している対応点候
補の座標値(XL,YL)、とその評価値(σL(X,Y))
と、対応点候補の座標値(XR,YR)とその評価値(σ
R(x,y))を出力した後、本処理動作を終了する。また、
前記ステップS1213において全ての点に関して処理
を行っていないと判断された場合は、次の点に関して評
価値を求めるために前記ステップS1209へ戻って再
び探索される画像から次の1点を選択して再び評価値の
演算を行う。
In this step S1213, it is determined whether or not processing has been performed for all points in the searched image.
If it is determined that the processing has been performed for all points, in the next step S1214, the coordinate values (XL, YL) of the corresponding point candidates held at that time and the evaluation values (σL (X, Y))
And the coordinate value (XR, YR) of the corresponding point candidate and its evaluation value (σ
R (x, y)), the processing operation ends. Also,
If it is determined in step S1213 that all points have not been processed, the process returns to step S1209 to obtain an evaluation value for the next point, and selects the next one point from the searched image again. The evaluation value is calculated again.

【0122】次に判断部108において、基準画像から
作成されたテンプレートの中心点と対応点候補の対応点
候補の座標値(XR,YR)とが一致しており且つ評価値
がそれぞれ評価値のしきい値より高ければ(この場合
は、しきい値をσthとするとσL(X,Y)>σHth且つσR
(X,Y)>σHthならば)、対応点候補は対応点であると判
断されて出力される。また、基準画像から作成されたテ
ンプレートの中心点と対応点候補の対応点候補の座標値
(XR,YR)が一致せずに且つ評価値が片方でも評価値
の2つ目のしきい値より低ければ(この場合は、しきい
値をσLthとするとσL(X,Y)<σHthまたはσR(X,Y)<σ
Hthならば)、テンプレートの中心点はオクルージョン
領域内の点と判断され、対応点は存在しないとされる。
それ以外のときは、テンプレートの中心点は距離の大き
く変化する領域内の点と判断され、テンプレートサイズ
が大きいときはテンプレートサイズを変更して再び評価
値演算を行い、テンプレートサイズが小さいときは対応
点不明の点として判断される。
Next, in the judging unit 108, the coordinate value (XR, YR) of the corresponding point candidate of the corresponding point candidate matches the center point of the template created from the reference image, and the evaluation values are respectively equal to the evaluation values. If it is higher than the threshold value (in this case, if the threshold value is σth, σL (X, Y)> σHth and σR
If (X, Y)> σHth), the corresponding point candidate is determined to be a corresponding point and output. Also, the coordinate value (XR, YR) of the center point of the template created from the reference image and the corresponding point candidate of the corresponding point candidate does not match, and even if one of the evaluation values is smaller than the second threshold value of the evaluation value If low (in this case, if the threshold is σLth, σL (X, Y) <σHth or σR (X, Y) <σ
If Hth), the center point of the template is determined to be a point in the occlusion area, and no corresponding point exists.
In other cases, the center point of the template is determined to be a point in the area where the distance changes greatly.If the template size is large, the template size is changed and the evaluation value calculation is performed again. It is determined as an unknown point.

【0123】以上の考え方をまとめたのが図13の表で
ある。同図(a)はテンプレートサイズが大きくて基準
画像から作成されたテンプレートの中心点と対応点候補
の対応点候補の座標値(XR,YR)が一致したときを、
同図(b)はテンプレートサイズが大きくて基準画像か
ら作成されたテンプレートの中心点と対応点候補の対応
点候補の座標値(XR,YR)が一致しないときを、同図
(c)はテンプレートサイズが小さくて基準画像から作
成されたテンプレートの中心点と対応点候補の対応点候
補の座標値(XR,YR)が一致したときを、同図(d)
はテンプレートサイズが小さくて基準画像から作成され
たテンプレートの中心点と対応点候補の対応点候補の座
標値(XR,YR)が一致しないときをそれぞれ示す。
FIG. 13 is a table summarizing the above concept. FIG. 9A shows a case where the template size is large and the coordinate value (XR, YR) of the corresponding point candidate of the corresponding point candidate matches the center point of the template created from the reference image.
FIG. 6B shows a case where the template size is large and the coordinate value (XR, YR) of the corresponding point candidate of the corresponding point candidate does not match the center point of the template created from the reference image, and FIG. FIG. 11D shows a case where the coordinate value (XR, YR) of the corresponding point candidate of the corresponding point candidate coincides with the center point of the template created from the reference image with a small size.
Indicates a case where the template size is small and the coordinate value (XR, YR) of the corresponding point candidate of the corresponding point candidate does not match the center point of the template created from the reference image.

【0124】また、図13において、「対」は対応点と
することを、「オ」はオクルージョン領域とすること
を、「小」はテンプレートサイズを小さくして再び判断
処理を行うことを、「不」は対応点が不明であることを
それぞれ示す。
In FIG. 13, “pair” indicates that the corresponding point is set, “o” indicates that the occlusion area is set, “small” indicates that the template size is reduced and the determination process is performed again, and “ "Not" indicates that the corresponding point is unknown.

【0125】以上詳述したように、距離の大きく変化す
る領域及びオクルージョン領域の判断に評価値Eだけで
はなく、対応点候補の対応点候補を使用することによ
り、オクルージョン領域内の点による対応点の誤対応が
なくなり、対応点抽出精度が向上する。また、その他の
領域内の点においても対応点候補の信頼性が向上する。
As described in detail above, not only the evaluation value E but also the corresponding point candidate of the corresponding point candidate is used in the determination of the area and the occlusion area where the distance greatly changes, so that the corresponding point by the point in the occlusion area is used. And the corresponding point extraction accuracy is improved. In addition, the reliability of the corresponding point candidate is improved at points in other areas.

【0126】なお、本実施の形態では、図13(c),
(d)に示すように小さいテンプレートサイズで求めた
ときに不明とする点が存在するが、このとき更にテンプ
レートサイズを小さくしたり、エッジマスクテンプレー
ト画像を用いる等、他の手段を用いても良い。
In the present embodiment, FIG.
As shown in (d), there is a point that is unknown when it is obtained with a small template size. At this time, other means such as further reducing the template size or using an edge mask template image may be used. .

【0127】また、上述した第1〜第5の実施の形態に
おいて示した距離が大きく変化する領域の他にも、移動
している被写体を撮像したときも、運動視差により視差
の分布が急峻に変化するような場合にも、これら各実施
の形態を適用することにより同様の効果を得ることがで
きる。更に、類似度を求める評価関数の一例に従来例で
示した(2)式の相関値を用いたが、(1)式〜(3)
式のどれを用いても同様の効果が得られる。但し、本発
明者らの実験によれば、(3)式のあるしきい値以下の
画素数を用いたときが最も対応点抽出精度が高かった。
In addition to the regions where the distance greatly changes as described in the first to fifth embodiments, even when a moving subject is imaged, the distribution of the parallax is sharp due to the motion parallax. Even in the case of a change, a similar effect can be obtained by applying these embodiments. Further, as an example of the evaluation function for obtaining the similarity, the correlation value of the equation (2) shown in the conventional example is used, but the equations (1) to (3) are used.
The same effect can be obtained by using any of the equations. However, according to the experiment of the present inventors, the corresponding point extraction accuracy was highest when the number of pixels equal to or less than a certain threshold value of the equation (3) was used.

【0128】(第6の実施の形態)まず、本発明の第6
の実施の形態を図16〜図20に基づき説明する。図1
6は、本発明の第6の実施の形態に係る対応点抽出装置
の構成を示すブロック図であり、同図において、上述し
た第1の実施の形態の図1と同一部分には同一符号が付
してある。図16において図1と異なる点は、図1の構
成から評価関数演算部107を削除し、画素数演算部1
11を付加したことである。
(Sixth Embodiment) First, the sixth embodiment of the present invention will be described.
The embodiment will be described with reference to FIGS. FIG.
FIG. 6 is a block diagram showing a configuration of a corresponding point extracting apparatus according to a sixth embodiment of the present invention. In FIG. 6, the same reference numerals as those in FIG. 1 of the first embodiment denote the same parts. It is attached. 16 is different from FIG. 1 in that the evaluation function operation unit 107 is deleted from the configuration of FIG.
11 is added.

【0129】図16において、例えば図24(a)に示
すような2台のカメラを有する画像入力手段から画像が
入力され、その入力された画像が基準画像メモリ102
及び探索される画像メモリ103にそれぞれ保持され
る。アドレス発生部104からは、基準画像メモリ10
2中の1点を示すアドレスがデータ保管部105に送ら
れ、その点の周囲の点のテンプレートサイズを参考にし
てテンプレートサイズを決定する。該決定されたテンプ
レートサイズは、データ保管部105からテンプレート
画像作成部106に送られ、このテンプレート画像作成
部106において基準画像メモリ102を用いてそのア
ドレスが示す点を中心に、そのテンプレートサイズのテ
ンプレート画像が作成される。画素数演算部111では
テンプレート画像作成部106から入力されたテンプレ
ート画像と、探索される画像メモリ103から入力され
る探索される画像との間で、従来技術で説明した(3)
式に基づいて、テンプレート画像全体でテンプレート内
の各画素と探索される画像上の1画素とのさ差分がある
しきい値ε以下の画素数を計算し、対応点候補とその点
の類似度が出力される。判断部108では計算が1回目
であれば、テンプレートが適したサイズであるか否かを
判断し、適していなければテンプレートサイズ変更部1
09に信号を送り、その信号に基づいて変更された新し
いテンプレートサイズデータがデータ保管部105に送
られ、該データ保管部105から新しいテンプレートサ
イズがテンプレート画像作成部106に送られ、そこで
作成される新しいテンプレートを用いて画素数演算部1
11で再び類似度を計算し、対応点を決定する。また、
計算が2回目ならば、その対応点抽出結果を出力する。
In FIG. 16, for example, an image is input from image input means having two cameras as shown in FIG. 24 (a), and the input image is stored in the reference image memory 102.
And stored in the image memory 103 to be searched. From the address generation unit 104, the reference image memory 10
The address indicating one of the two points is sent to the data storage unit 105, and the template size is determined with reference to the template sizes of points around the point. The determined template size is sent from the data storage unit 105 to the template image creating unit 106, and the template image creating unit 106 uses the reference image memory 102 to center the template at the point indicated by the address. An image is created. In the pixel number calculation unit 111, a description has been given of the conventional technique between the template image input from the template image creation unit 106 and the searched image input from the searched image memory 103 (3).
Based on the formula, the number of pixels of a difference between each pixel in the template and one pixel on the searched image in the entire template image is calculated below a certain threshold ε, and the corresponding point candidate and the similarity of the point are calculated. Is output. When the calculation is performed for the first time, the determination unit 108 determines whether the template has a suitable size.
09, a new template size data changed based on the signal is sent to the data storage unit 105, and a new template size is sent from the data storage unit 105 to the template image creation unit 106, where it is created. Pixel number calculation unit 1 using new template
At 11, the similarity is calculated again, and the corresponding point is determined. Also,
If the calculation is for the second time, the corresponding point extraction result is output.

【0130】以上の構成において、アドレス発生部10
4は基準画像メモリ102中の1点を示すアドレスを発
生させる動作を実行し、データ保管部105は得られた
アドレスが示す点の周囲の対応点抽出処理において使用
されたテンプレートサイズを基にその点でのテンプレー
トサイズを決定し、その決定されたテンプレートサイズ
をテンプレート画像作成部106へ送る動作を実行す
る。
In the above configuration, the address generator 10
4 executes an operation for generating an address indicating one point in the reference image memory 102, and the data storage unit 105 performs the operation based on the template size used in the corresponding point extraction processing around the point indicated by the obtained address. An operation of determining the template size at the point and transmitting the determined template size to the template image creating unit 106 is performed.

【0131】このデータ保管部105の処理動作につい
て、図17のフローチャートを用いて説明する。ここ
で、使用するテンプレートサイズをStとし、該Stは
初期値としてkに設定されているものとする(St=
k:kはある固定値)。また、テンプレートサイズ変更
部109から送られるテンプレートサイズはSnとし、
Snはテンプレートサイズ変更部109で定まっている
ものとする。
The processing operation of the data storage unit 105 will be described with reference to the flowchart of FIG. Here, it is assumed that the template size to be used is St, and the St is set to k as an initial value (St =
k: k is a fixed value). The template size sent from the template size changing unit 109 is Sn,
It is assumed that Sn is determined by the template size changing unit 109.

【0132】図17のステップS1701で1回目の処
理に用いるテンプレートサイズを求めるのか、2回目の
処理に用いるテンプレートサイズを求めるのかを判断す
る。そして、1回目の処理に用いるテンプレートサイズ
を求める場合は、次のステップS1702でアドレス発
生部104からのアドレスが示す点の周囲近傍8個のの
点のテンプレートサイズを調査し、最も小さいテンプレ
ートサイズをSsとして求める。次にステップS170
3でその周囲8個のテンプレートサイズの中から小さい
テンプレートサイズSsとその点のテンプレートサイズ
Stとを比較し、Stの方がSsより大きければ次のス
テップS1704で周囲近傍8個の点の小さいテンプレ
ートサイズをその点のテンプレートサイズとし(St=
Ss)、その後ステップS1705へ進む。
In step S1701 of FIG. 17, it is determined whether to determine the template size used for the first processing or the template size used for the second processing. When the template size to be used for the first processing is obtained, in the next step S1702, the template sizes of eight points around the point indicated by the address from the address generation unit 104 are checked, and the smallest template size is determined. Determined as Ss. Next, step S170
In step 3, the small template size Ss is compared with the template size St of the point among the template sizes of the eight surrounding templates, and if St is larger than Ss, the template of the small eight points in the surrounding neighborhood is determined in the next step S1704. Let the size be the template size for that point (St =
Ss) Then, the process proceeds to step S1705.

【0133】また、前記ステップS1701において2
回目の処理のテンプレートサイズを求める場合は、ステ
ップS1706でテンプレートサイズ変更部109から
のテンプレートサイズSnにその点のテンプレートサイ
ズStを変更し(St=Sn)、その後ステップS17
05へ進む。このステップS1705ではテンプレート
サイズStをテンプレート画像作成部106へ送る。
In step S1701, 2
If the template size for the second processing is to be obtained, the template size St at that point is changed to the template size Sn from the template size changing unit 109 in step S1706 (St = Sn), and then step S17
Go to 05. In this step S1705, the template size St is sent to the template image creation unit 106.

【0134】このように、他点のテンプレートサイズを
参考にしてテンプレートサイズを決定することにより、
最適なテンプレートサイズが得られ、対応点抽出処理速
度が向上する。
As described above, by determining the template size with reference to the template size of another point,
An optimum template size is obtained, and the corresponding point extraction processing speed is improved.

【0135】その後、テンプレート画像作成部106は
アドレス発生部104からアドレス、データ保管部10
5からテンプレートサイズ、基準画像メモリ102から
基準画像を受け取り、テンプレート画像を作成する動作
を実行し、画素数演算部111ではテンプレート画像と
探索される画像との類似度を上記(3)式に基づいて計
算し、対応点候補とその類似度を出力する動作を実行す
る。
Thereafter, the template image creation unit 106 sends the address and data storage unit 10 from the address generation unit 104.
5 and the reference image from the reference image memory 102, and executes the operation of creating the template image. The pixel number calculation unit 111 determines the similarity between the template image and the image to be searched based on the above equation (3). Then, the corresponding point candidate and the similarity are output.

【0136】図18は画素数演算部111の処理動作を
示すフローチャートである。このフローチャートでは、
対応点候補の座標値を(X,Y)とし、各点(x,y)
で上記(3)式で計算した類似度をC(x,y)、最大
類似度を保存する変数をCxy、2番目の類似度を保存
する変数をCxy2とする。
FIG. 18 is a flowchart showing the processing operation of the pixel number calculation unit 111. In this flowchart,
The coordinate value of the corresponding point candidate is (X, Y), and each point (x, y)
Let C (x, y) be the similarity calculated by the above equation (3), Cxy be the variable that stores the maximum similarity, and Cxy2 be the variable that stores the second similarity.

【0137】図18のステップS1801でテンプレー
ト画像及び探索される画像をそれぞれ入力し、次のステ
ップS1802で変数Cxy、Cxy2を初期化する
(Cxy=0、Cxy2=0)。次にステップS180
3で探索される画像から1点(x,y)を選択し、その
点とテンプレートの中心を合わせ、次のステップS18
04で類似度C(x,y)を演算する。次にステップS
1805で前記ステップS1804において演算した類
似度C(x,y)が変数Cxyより大きいか否かを判断
し、類似度C(x,y)が変数Cxyより大きいと判断
された場合は、次のステップS1806で対応点候補と
して座標値(X,Y)に(x,y)を大入し、変数Cx
y2にCxyを代入し、更に、変数Cxyに類似度C
(x,y)を代入した後、ステップS1807へ進む。
In step S1801 of FIG. 18, a template image and an image to be searched are input, and variables Cxy and Cxy2 are initialized in the next step S1802 (Cxy = 0, Cxy2 = 0). Next, step S180
In step S18, one point (x, y) is selected from the image searched in step 3, and the point is aligned with the center of the template.
At step 04, the similarity C (x, y) is calculated. Next, step S
In 1805, it is determined whether or not the similarity C (x, y) calculated in step S1804 is greater than the variable Cxy. If it is determined that the similarity C (x, y) is greater than the variable Cxy, the following is performed. In step S1806, (x, y) is greatly inserted into the coordinate value (X, Y) as a corresponding point candidate, and the variable Cx
cxy is substituted for y2, and the similarity C is substituted for the variable Cxy.
After substituting (x, y), the process proceeds to step S1807.

【0138】一方、前記ステップS1805において、
類似度C(x,y)が変数Cxyより大きくないと判断
された場合は、ステップS1809で類似度C(x,
y)が変数Cxy2より大きいか否かを判断し、類似度
C(x,y)が変数Cxy2より大きい場合は、ステッ
プS1810で変数Cxy2に類似度C(x,y)を代
入した後、ステップS1807へ進む。また、前記ステ
ップS1809において類似度C(x,y)が変数Cx
y2より大きくないと判断された場合は、前記ステップ
S1810をスキップしてステップS1807へ進む。
On the other hand, in step S1805,
If it is determined that the similarity C (x, y) is not larger than the variable Cxy, the similarity C (x, y) is determined in step S1809.
It is determined whether or not y) is greater than the variable Cxy2. If the similarity C (x, y) is greater than the variable Cxy2, the similarity C (x, y) is substituted for the variable Cxy2 in step S1810, and then the process proceeds to step S1810. The process proceeds to S1807. In step S1809, the similarity C (x, y) is set to the variable Cx
If it is determined that it is not larger than y2, the process skips step S1810 and proceeds to step S1807.

【0139】このステップS1807では探索される画
像中の全ての点に関して処理を行ったか否かを判断し、
全ての点に関して処理を行った場合は次のステップS1
808でそのとき保持している対応点候補の座標値
(X,Y)を最大類似度Cxyと2番目の類似度Cxy
2を出力した後、本処理動作を終了する。また、前記ス
テップS1807おいて全ての点に関して処理を行って
いないと判断された場合は前記ステップS1803へ戻
って次の点に関して類似度を求める。
In this step S1807, it is determined whether or not processing has been performed for all points in the searched image.
If processing has been performed for all points, the next step S1
In 808, the coordinate values (X, Y) of the corresponding point candidates held at that time are represented by the maximum similarity Cxy and the second similarity Cxy.
After outputting 2, the processing operation ends. If it is determined in step S1807 that all points have not been processed, the process returns to step S1803 to determine the similarity for the next point.

【0140】以上詳述したように画素数演算部111が
動作する。
As described in detail above, the pixel number calculation unit 111 operates.

【0141】判断部108では計算が1回目で且つテン
プレートサイズが大きい方ならば、得られた類似度から
テンプレートの中心点が距離の大きく変化する領域内の
点か否かを判断する動作を実行する。また、テンプレー
トサイズが小さい方ならば、その結果が誤抽出でないか
否かを判断する動作を実行する。
If the calculation is the first time and the template size is larger, the judgment unit 108 executes an operation of judging from the obtained similarity whether or not the center point of the template is a point in an area where the distance changes greatly. I do. If the template size is smaller, an operation for determining whether or not the result is erroneous extraction is performed.

【0142】判断部108におけるテンプレートの中心
点が距離の大きく変化する領域内の点か否かの判断の仕
方は、類似度Cxyとあるしきい値Cthとの大小を比較
して行う。なぜならば、図19(a)中のP点を中心に
テンプレート191を作成し、対応点を図19(b)中
で求めるとき、例えばラインL上の点での類似度C
(x,y)をプロットすると、図20(a)のようにな
る。P点は、距離の大きく変化する領域内の点ではない
ため、図20(a)のように類似度C(x,y)の高い
ピークが出て対応点を決定できる。
The determination unit 108 determines whether or not the center point of the template is a point in a region where the distance changes greatly by comparing the similarity Cxy with a certain threshold value Cth. This is because when the template 191 is created around the point P in FIG. 19A and the corresponding point is obtained in FIG. 19B, for example, the similarity C at the point on the line L
When (x, y) is plotted, the result is as shown in FIG. Since the point P is not a point in the region where the distance changes greatly, a peak having a high similarity C (x, y) appears as shown in FIG.

【0143】しかし、図19(a)中のQ点を中心にテ
ンプレート192を作成し、対応点を図19(b)中で
求めるとき、例えばラインM上の点での類似度C(x,
y)をプロットすると、図20(b)のようになる。こ
れは従来技術の問題点で示したように、テンプレート内
に距離の大きく異なる領域があるためで、図19(c)
のようにテンプレート中の領域Rにより類似度C(x,
y)が大きくなったのが左側の山で、領域Sにより類似
度C(x,y)が大きくなったのが右側の山である。こ
のように、距離の大きく変化する領域内に存在する点の
対応点候補の類似度は、それ以外の領域の点の類似度と
比較するとかなり小さくなる。このような事実により、
類似度とあるしきい値Cthとの大小比較でテンプレート
の中心点が距離の大きく変化する領域内の点か否かの判
断を行うことができる。
However, when the template 192 is created around the point Q in FIG. 19A and the corresponding point is obtained in FIG. 19B, for example, the similarity C (x,
When y) is plotted, it becomes as shown in FIG. This is because, as shown in the problem of the prior art, there is a region having a greatly different distance in the template.
, The similarity C (x,
The peak on the left is where y) is increased, and the peak on the right is where the similarity C (x, y) is increased due to the region S. As described above, the similarity of the corresponding point candidate of the point existing in the area where the distance greatly changes is considerably smaller than the similarity of the point in the other area. Due to this fact,
By comparing the magnitude of the similarity with a certain threshold value Cth, it is possible to determine whether or not the center point of the template is a point in a region where the distance greatly changes.

【0144】また、テンプレートサイズが小さいときの
結果が誤抽出か否かの判断は、最大類似度Cxyと2番
目の類似度Cxy2との差の絶対値を用いて行う。Cx
yとCxy2との差がかなり小さいときは、テンプレー
トが小さいことにより似たような点を誤抽出したと判断
する。これは従来例及び問題点で示したように、空等の
似たような領域が複数存在するときに、テンプレートが
小さいと同じような類似度が複数存在してしまう。それ
を判断するために同じような類似度が複数存在するか否
かについて調べている。そして、判断部108では、距
離の大きく変化する領域内の点でないとき及び誤抽出で
ないときは、その対応点抽出結果を出力する。また、計
算が2回目のときも、その対応点抽出結果を出力する。
Further, whether or not the result when the template size is small is erroneous extraction is determined by using the absolute value of the difference between the maximum similarity Cxy and the second similarity Cxy2. Cx
When the difference between y and Cxy2 is very small, it is determined that a similar point was erroneously extracted because the template is small. This is because, as shown in the conventional example and the problem, when there are a plurality of similar regions such as the sky, if the template is small, there are a plurality of similarities similar to each other. To determine this, it is checked whether there are a plurality of similar similarities. Then, when it is not a point in the area where the distance greatly changes, and when it is not erroneous extraction, the determination unit 108 outputs the corresponding point extraction result. Also, when the calculation is performed for the second time, the corresponding point extraction result is output.

【0145】テンプレートサイズ変更部109は、判断
部108でテンプレートの中心点が距離の大きく変化す
る領域内の点と判断されたとき及び誤抽出したと判断さ
れたときに、テンプレートサイズを変更して新しいテン
プレートサイズSnをデータ保管部105へ出力するよ
うに動作する。
The template size changing unit 109 changes the template size when the determining unit 108 determines that the center point of the template is a point in the area where the distance changes greatly, and when it is determined that the template is erroneously extracted. It operates to output the new template size Sn to the data storage unit 105.

【0146】以上詳述したように動作する各部を図16
ように構成すると、画像中の領域に応じたテンプレート
を選択することができ、精度の高い対応点抽出処理が可
能となり、精度の高い被写体の距離分布を求めることが
できる。また、テンプレートの選択処理時間の短縮が図
れる。
FIG. 16 is a block diagram showing the components that operate as described above in detail.
With this configuration, it is possible to select a template according to the region in the image, to perform highly accurate corresponding point extraction processing, and to obtain a highly accurate distance distribution of the subject. In addition, the template selection processing time can be reduced.

【0147】なお、本実施の形態においては、テンプレ
ートサイズは大小の2種類であったが、小さくしてもま
だ背景の方が大きいとき等は、更にテンプレートを小さ
くしたり、多種類のテンプレートサイズを使用しても良
い。
In the present embodiment, there are two types of template sizes, large and small. However, when the background is still large even if the template size is small, the template can be further reduced, or the template size can be increased. May be used.

【0148】また、本実施の形態では類似度を求めるの
に従来例で示した(3)式を用いたが、これに限られる
ものではなく、(1)式及び(2)式を用いても良く、
或いは、新たな類似度を使用しても良い。
Further, in the present embodiment, equation (3) shown in the conventional example is used to determine the similarity. However, the present invention is not limited to this, and equations (1) and (2) are used. Well,
Alternatively, a new similarity may be used.

【0149】また、本実施の形態では複数のテンプレー
トサイズを用いてテンプレートマッチング法を行うこと
及びそのテンプレートサイズを選択する判断法を示して
いる。
In the present embodiment, a template matching method using a plurality of template sizes and a judging method for selecting the template size are shown.

【0150】(第7の実施の形態)次に、本発明の第7
の実施の形態を図21及び図22に基づき説明する。
(Seventh Embodiment) Next, a seventh embodiment of the present invention will be described.
The embodiment will be described with reference to FIGS. 21 and 22.

【0151】図21は本発明の第7の実施の形態に係る
対応点抽出装置の構成を示すブロック図であり、同図に
おいて上述した第6の実施の形態における図16と同一
部分には同一符号が付してある。図21において図16
と異なる点は、図16の構成からデータ保管部105を
削除し、エッジ画像メモリ112及びテンプレートサイ
ズ決定部113を付加したことである。
FIG. 21 is a block diagram showing a configuration of a corresponding point extracting apparatus according to a seventh embodiment of the present invention. In FIG. 21, the same parts as those in FIG. The code is attached. In FIG. 21, FIG.
16 is different from the configuration in FIG. 16 in that the data storage unit 105 is deleted and an edge image memory 112 and a template size determination unit 113 are added.

【0152】図21において、第6の実施の形態と同様
に、画像入力手段101から画像が入力され、その入力
された画像が基準画像メモリ102及び探索される画像
メモリ103にそれぞれ保持される。アドレス発生部1
04からは、基準画像メモリ102中及びエッジ画像メ
モリ112中の1点を示すアドレスがエッジ画像メモリ
112に入力される。エッジ画像メモリ112では、基
準画像メモリ102から得られた画像をゾーベルフィル
タ等を用いてエッジ画像にして保管している。そして、
その点を中心としてある決定した大きさのエッジテンプ
レートが作成され、テンプレートサイズ決定部113へ
送られる。
In FIG. 21, similarly to the sixth embodiment, an image is input from the image input means 101, and the input image is stored in the reference image memory 102 and the searched image memory 103, respectively. Address generator 1
From 04, an address indicating one point in the reference image memory 102 and the edge image memory 112 is input to the edge image memory 112. The edge image memory 112 stores the image obtained from the reference image memory 102 as an edge image using a Sobel filter or the like. And
An edge template having a determined size around the point is created and sent to the template size determining unit 113.

【0153】このテンプレートサイズ決定部113で
は、得られたエッジテンプレート中に強いエッジがある
か否かを判断し、強いエッジがあればテンプレートサイ
ズを小さくし、強いエッジがなければテンプレートサイ
ズを大きくして、テンプレート画像作成部106へ送ら
れる。そして、テンプレート画像作成部106で基準画
像メモリ102を用いてそのアドレスが示す点を中心
に、そのテンプレートサイズのテンプレート画像が作成
される。
The template size determination section 113 determines whether or not there is a strong edge in the obtained edge template. If there is a strong edge, the template size is reduced. If there is no strong edge, the template size is increased. Is sent to the template image creation unit 106. Then, the template image creating unit 106 creates a template image of the template size around the point indicated by the address using the reference image memory 102.

【0154】画素数演算部111ではテンプレート画像
作成部106から入力されたテンプレート画像と、探索
される画像メモリ103から入力される探索される画像
との間で、従来技術で説明した(3)式に基づきテンプ
レート画像全体でテンプレート内の各画素と探索される
画像上の1画素との差分があるしきい値ε以下の画素数
を計算し、対応点候補とその点の類似度が出力される。
In the pixel number calculation unit 111, the expression (3) described in the prior art is applied between the template image input from the template image creation unit 106 and the searched image input from the searched image memory 103. , The number of pixels of a difference between each pixel in the template and one pixel on the searched image in the entire template image that is equal to or less than a threshold ε is calculated, and the corresponding point candidate and the similarity between the points are output. .

【0155】判断部108では計算が1回目であればテ
ンプレートが適したサイズであるか否かを判断し、適し
ていなければテンプレートサイズ変更部109に信号を
送り、その信号に基づいてテンプレートサイズ決定部1
13で新しいテンプレートサイズが決定され、その新し
いテンプレートサイズがテンプレート画像作成部106
へ送られ、そこで作成される新しいテンプレートを用い
て画素数演算部111で再び類似度を計算して対応点を
決定する。また、計算が2回目ならばその対応点抽出結
果を出力する。
If the calculation is performed for the first time, the determination unit 108 determines whether the template has an appropriate size. If not, a signal is sent to the template size change unit 109, and the template size is determined based on the signal. Part 1
In step 13, a new template size is determined, and the new template size is
The similarity is calculated again by the pixel number calculation unit 111 using the new template created there, and the corresponding point is determined. If the calculation is for the second time, the corresponding point extraction result is output.

【0156】以上の構成において、上述した第6の実施
の形態と異なるのは、エッジ画像メモリ112とテンプ
レートサイズ決定部113である。
The above configuration differs from the sixth embodiment in the edge image memory 112 and the template size determination unit 113.

【0157】以下、テンプレートサイズ決定部113に
ついて図22のフローチャートに基づき説明する。
Hereinafter, the template size determining section 113 will be described with reference to the flowchart of FIG.

【0158】図22のステップS2201でエッジテン
プレート画像が入力され、次のステップS2202で前
記入力されたエッジテンプレート画像中に強いエッジが
存在するか否かを判断する。その判断は、あるしきい値
より強いエッジがあるか否かである。もし、強いエッジ
が存在すれば次のステップS2203でテンプレートサ
イズを小さくした後、ステップS2204へ進む。ま
た、前記ステップS2202において強いエッジが存在
しなければステップS2205でテンプレートサイズを
大きくした後、ステップS2204へ進む。このステッ
プS2204では前記ステップS2203或いはステッ
プS2205において処理したテンプレートサイズを出
力した後、本処理動作を終了する。
In step S2201 of FIG. 22, an edge template image is input, and in the next step S2202, it is determined whether a strong edge exists in the input edge template image. The judgment is whether there is an edge stronger than a certain threshold. If a strong edge exists, the size of the template is reduced in the next step S2203, and the process proceeds to step S2204. If no strong edge exists in step S2202, the template size is increased in step S2205, and the process proceeds to step S2204. In step S2204, after outputting the template size processed in step S2203 or step S2205, the processing operation ends.

【0159】上述したように本実施の形態によれば、距
離の大きく変化する領域には、強いエッジが存在するこ
とが多いので、このようにゾーベルフィルタ等を用いて
求めたエッジ中に強いエッジが存在するときは、使用す
るテンプレートサイズを小さくすることで対応点抽出処
理効率の向上が図れる。
As described above, according to the present embodiment, a strong edge often exists in a region where the distance greatly changes, and thus a strong edge exists in the edge obtained using a Sobel filter or the like. When an edge exists, the corresponding point extraction processing efficiency can be improved by reducing the size of the template used.

【0160】また、テンプレートサイズの選択が誤った
ときでも、その後テンプレートサイズを変更することが
できるため、その選択の誤りによる精度の劣化は生じる
ことなく、逆に各領域に合わせて適したサイズのテンプ
レートを用いることができるので、対応点抽出処理の精
度向上が図れる。
Further, even when the template size is selected incorrectly, the template size can be changed thereafter, so that the accuracy does not deteriorate due to the selection error, and conversely, the template size suitable for each area can be changed. Since a template can be used, the accuracy of the corresponding point extraction processing can be improved.

【0161】(第8の実施の形態)次に、本発明の第8
の実施の形態を図23に基づき説明する。図23は本発
明の第8の実施の形態に係る対応点抽出装置の構成を示
すブロック図であり、同図において上述した第6の実施
の形態の図16と同一部分には同一符号が付してある。
図23において図16と異なる点は、アドレス発生部1
04をデータ保管部15に接続したことである。
(Eighth Embodiment) Next, an eighth embodiment of the present invention will be described.
The embodiment will be described with reference to FIG. FIG. 23 is a block diagram showing a configuration of a corresponding point extracting apparatus according to the eighth embodiment of the present invention. In FIG. 23, the same parts as those in FIG. I have.
23 differs from FIG. 16 in that the address generator 1
04 is connected to the data storage unit 15.

【0162】図23において、図24(a)に示すよう
な2台のカメラを有する画像入力手段101から画像が
入力され、その入力された画像が基準画像メモリ102
及び探索される画像メモリ103にそれぞれ保持され
る。アドレス発生部104からは、基準画像メモリ10
2中の1点を示すアドレスが、また、データ保管部10
5からは、テンプレートサイズがテンプレート画像作成
部106に送られ、このテンプレート画像作成部106
において基準画像メモリ102を用いてそのアドレスが
示す点を中心に、そのテンプレートサイズのテンプレー
ト画像が作成される。画素数演算部111ではテンプレ
ート画像作成部106から入力されたテンプレート画像
と、探索される画像メモリ103から入力される探索さ
れる画像との間で、従来技術で説明した(3)式に基づ
きテンプレート画像全体でテンプレート内の各画素と探
索される画像上の1画素との差分があるしきい値ε以下
の画素数を計算し、対応点候補とその類似度が出力され
る。
In FIG. 23, an image is input from image input means 101 having two cameras as shown in FIG. 24 (a), and the input image is stored in a reference image memory 102.
And stored in the image memory 103 to be searched. From the address generation unit 104, the reference image memory 10
2 is stored in the data storage unit 10.
5, the template size is sent to the template image creation unit 106.
In, a template image of the template size is created around the point indicated by the address using the reference image memory. The pixel number calculation unit 111 converts the template image input from the template image creation unit 106 with the searched image input from the searched image memory 103 based on the expression (3) described in the related art. The difference between each pixel in the template and one pixel on the searched image in the entire image is calculated as the number of pixels equal to or smaller than a threshold ε, and the corresponding point candidates and their similarities are output.

【0163】判断部108では計算が1回目であるなら
ば、テンプレートが適したサイズか否かを判断し、適し
ていなければテンプレートサイズ変更部109に信号が
送られ、その信号に基づいてテンプレートサイズ変更部
109でテンプレートサイズが変更され、その変更され
た新しいテンプレートサイズがテンプレート画像作成部
106に送られ、そこで作成された新しいテンプレート
を用いて画素数演算部111で再び類似度を計算して対
応点を決定する。また、計算が2回目ならば、その対応
点抽出結果を出力する。
If the calculation is performed for the first time, the determination unit 108 determines whether the template has a suitable size. If not, a signal is sent to the template size changing unit 109, and the template size is determined based on the signal. The template size is changed by the change unit 109, and the changed new template size is sent to the template image creation unit 106, and the similarity is calculated again by the pixel count calculation unit 111 using the new template created there, and the corresponding Determine points. If the calculation is for the second time, the corresponding point extraction result is output.

【0164】図23中で第6の実施の形態の図16と異
なる点は、データ保管部105の動作であるから、以
下、それについて説明する。
The difference between FIG. 23 and FIG. 16 of the sixth embodiment is the operation of the data storage unit 105, which will be described below.

【0165】データ保管部105にはテンプレートサイ
ズが1つ保管されており、判断部108でテンプレート
サイズが適していないと判断されたときにそのサイズを
変更する。そして、その変更されたテンプレートサイズ
は次でも有効になる。つまりテンプレートサイズは、そ
の点の1つ前の点が用いたサイズを使用することにな
る。
[0165] One template size is stored in the data storage unit 105, and when the determination unit 108 determines that the template size is not suitable, the size is changed. Then, the changed template size becomes effective in the next case. In other words, the template size uses the size used by the point immediately before that point.

【0166】このように、テンプレートサイズを小さく
すべき距離エッジの領域は連続していることに基づき、
テンプレートサイズを以前の点のときと同じにすること
により、ごく簡単なアルゴリズムでテンプレートサイズ
は適した大きさになり、対応点抽出処理効率の向上が図
れる。また、そのテンプレートサイズが誤っていたとき
でも、その後テンプレートサイズを変更することができ
るので、精度の劣化は生じることなく、逆に各領域に合
わせて適したサイズのテンプレートを用いることができ
るので、対応点抽出処理精度の向上が図れる。
As described above, based on the fact that the area of the distance edge where the template size should be reduced is continuous,
By making the template size the same as that of the previous point, the template size becomes a suitable size with a very simple algorithm, and the corresponding point extraction processing efficiency can be improved. In addition, even when the template size is incorrect, the template size can be changed thereafter, so that the accuracy is not deteriorated, and conversely, a template having a size suitable for each region can be used. The corresponding point extraction processing accuracy can be improved.

【0167】[0167]

【発明の効果】以上詳述したように本発明の請求項1〜
3の対応点抽出方法及び請求項11〜13の対応点抽出
装置によれば、使用する画像中の被写体および背景の区
別なく全域で精度の高い対応点抽出処理を行うことがで
きるという効果を奏する。
As described in detail above, claims 1 to 5 of the present invention are described below.
According to the corresponding point extracting method of the third aspect and the corresponding point extracting apparatus of claims 11 to 13, there is an effect that a highly accurate corresponding point extracting process can be performed over the entire area without discrimination between a subject and a background in an image to be used. .

【0168】また、本発明の請求項4の対応点抽出方法
及び請求項14の対応点抽出装置によれば、使用する画
像中、全域で誤対応が減ると共に、処理速度が向上する
という効果を奏する。
According to the corresponding point extracting method of the fourth aspect and the corresponding point extracting apparatus of the fourteenth aspect of the present invention, it is possible to reduce the number of erroneous correspondences in the whole area of an image to be used and to improve the processing speed. Play.

【0169】また、本発明の請求項5の対応点抽出方法
及び請求項15の対応点抽出装置によれば、使用する画
像中の距離が大きく変化する領域で処理精度が向上する
と共に、その領域が少なければ2種類以上のテンプレー
トで同時に評価値を求めることにより、処理速度が向上
するという効果を奏する。
According to the corresponding point extracting method of the present invention and the corresponding point extracting apparatus of the present invention, the processing accuracy is improved in a region where the distance in an image to be used greatly changes, and the corresponding region is extracted. If the number is small, the processing speed is improved by simultaneously obtaining the evaluation values for two or more types of templates.

【0170】また、本発明の請求項6の対応点抽出方法
及び請求項16の対応点抽出装置によれば、使用する画
像中の距離が大きく変化する領域で処理精度が向上する
と共に、その領域が多ければ順番に2種類以上のテンプ
レートで評価値を求めることにより、処理速度が向上す
るという効果を奏する。
According to the corresponding point extracting method of the present invention and the corresponding point extracting apparatus of the sixteenth aspect of the present invention, the processing accuracy is improved in a region where the distance in the image to be used greatly changes, and the corresponding region is extracted. If the number is large, the processing speed is improved by sequentially obtaining the evaluation values using two or more types of templates.

【0171】また、本発明の請求項7,8の対応点抽出
方法及び請求項17,18の対応点抽出装置によれば、
使用する画像中の距離が大きく変化する領域で処理精度
が向上するという効果を奏する。
According to the corresponding point extracting method and the corresponding point extracting apparatus of the seventh and eighth aspects of the present invention,
There is an effect that the processing accuracy is improved in a region where the distance in the image to be used greatly changes.

【0172】また、本発明の請求項9の対応点抽出方法
及び請求項19の対応点抽出装置によれば、使用する画
像中の距離が大きく変化する領域で処理精度が向上する
と共に、オクルージョン領域の判別精度が向上するとい
う効果を奏する。
Further, according to the corresponding point extracting method of the ninth aspect of the present invention and the corresponding point extracting apparatus of the nineteenth aspect, the processing accuracy is improved in an area where the distance in the image to be used greatly changes, and the occlusion area is improved. This has the effect of improving the accuracy of the determination.

【0173】また、本発明の請求項10の対応点抽出方
法及び請求項20の対応点抽出装置によれば、使用する
画像中の距離が大きく変化する領域で処理精度が向上す
るという効果を奏する。
Further, according to the corresponding point extracting method of the present invention and the corresponding point extracting apparatus of the twentieth aspect, there is an effect that the processing accuracy is improved in a region where the distance in an image to be used greatly changes. .

【0174】また、本発明の請求項21,22の対応点
抽出方法及び請求項28,29の対応点抽出装置によれ
ば、使用する画像の部分特徴に応じたテンプレートを使
用することができるので、画像中、全域に亘り高精度の
対応点抽出処理を行うことができるという効果を奏す
る。
Further, according to the corresponding point extracting method of the present invention and the corresponding point extracting apparatus of the present invention, it is possible to use a template corresponding to a partial feature of an image to be used. Thus, there is an effect that highly accurate corresponding point extraction processing can be performed over the entire area of an image.

【0175】また、本発明の請求項23〜25の対応点
抽出方法及び請求項30〜32の対応点抽出装置によれ
ば、画像中の被写体及び背景の区別なく全域で高精度の
対応点抽出処理を行うことができるという効果を奏す
る。
According to the corresponding point extracting method of claims 23 to 25 and the corresponding point extracting apparatus of claims 30 to 32 of the present invention, highly accurate corresponding point extraction is performed over the entire area without discrimination between a subject and a background in an image. There is an effect that processing can be performed.

【0176】また、本発明の請求項26,27,35〜
37の対応点抽出方法及び請求項33,34,38〜4
0の対応点抽出装置によれば、最初から適したサイズの
テンプレートを使用することができ、処理速度の向上が
図れると共に、その後テンプレートサイズを変更するこ
とができるので、高精度の対応点抽出処理を行うことが
できるという効果を奏する。
[0176] Further, claims 26, 27, and 35 of the present invention.
37. Corresponding point extracting method of claim 37, and claim 33, 34, 38-4.
According to the corresponding point extraction apparatus of 0, a template of a suitable size can be used from the beginning, and the processing speed can be improved, and the template size can be changed thereafter. Is achieved.

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

【図1】本発明の第1の実施の形態に係る対応点抽出処
理装置の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a corresponding point extraction processing device according to a first embodiment of the present invention.

【図2】同装置における評価関数演算部の処理動作を示
すフローチャートである。
FIG. 2 is a flowchart illustrating a processing operation of an evaluation function calculation unit in the apparatus.

【図3】同装置における距離一定の領域と、距離の大き
く変化する領域のテンプレートを説明する図である。
FIG. 3 is a diagram illustrating a template of an area having a constant distance and an area having a greatly changed distance in the apparatus.

【図4】同装置における距離一定の領域の評価値と、距
離の大きく変化する領域の評価値を示す図である。
FIG. 4 is a diagram showing an evaluation value of an area where the distance is constant and an evaluation value of an area where the distance greatly changes in the apparatus.

【図5】本発明の第2の実施の形態に係る対応点抽出処
理装置の構成を示すブロック図である。
FIG. 5 is a block diagram showing a configuration of a corresponding point extraction processing device according to a second embodiment of the present invention.

【図6】同装置におけるエッジマスクテンプレート作成
部の処理動作を示すフローチャートである。
FIG. 6 is a flowchart showing a processing operation of an edge mask template creating unit in the apparatus.

【図7】同装置におけるエッジマスクテンプレート作成
部を説明する図である。
FIG. 7 is a diagram illustrating an edge mask template creation unit in the same apparatus.

【図8】本発明の第3の実施の形態に係る対応点抽出処
理装置における評価関数演算部の処理動作を示すフロー
チャートである。
FIG. 8 is a flowchart showing a processing operation of an evaluation function calculation unit in a corresponding point extraction processing device according to a third embodiment of the present invention.

【図9】本発明の第4の実施の形態に係る対応点抽出処
理装置の構成を示すブロック図である。
FIG. 9 is a block diagram illustrating a configuration of a corresponding point extraction processing device according to a fourth embodiment of the present invention.

【図10】同装置における評価関数演算部の処理動作を
示すフローチャートである。
FIG. 10 is a flowchart showing a processing operation of an evaluation function calculation unit in the apparatus.

【図11】同装置におけるテンプレートを示す図であ
る。
FIG. 11 is a diagram showing a template in the same device.

【図12】本発明の第5の実施の形態に係る対応点抽出
処理装置における評価関数演算部の処理動作を示すフロ
ーチャートである。
FIG. 12 is a flowchart illustrating a processing operation of an evaluation function calculation unit in a corresponding point extraction processing device according to a fifth embodiment of the present invention.

【図13】同装置における判断部で使用する表を示す図
である。
FIG. 13 is a diagram showing a table used by a determination unit in the apparatus.

【図14】同装置における誤抽出を説明する図である。FIG. 14 is a diagram illustrating erroneous extraction in the same device.

【図15】同装置における距離の大きく変化する領域で
のテンプレートを説明する図である。
FIG. 15 is a diagram illustrating a template in a region where the distance greatly changes in the apparatus.

【図16】本発明の第6の実施の形態に係る対応点抽出
処理装置の構成を示すブロック図である。
FIG. 16 is a block diagram showing a configuration of a corresponding point extraction processing device according to a sixth embodiment of the present invention.

【図17】同装置におけるデータ保管部の処理動作を示
すフローチャートである。
FIG. 17 is a flowchart showing a processing operation of a data storage unit in the same device.

【図18】同装置における画素数演算部の処理動作を示
すフローチャートである。
FIG. 18 is a flowchart showing a processing operation of a pixel number calculation unit in the same device.

【図19】同装置における距離一定の領域と距離の大き
く変化する領域のテンプレートを説明する図である。
FIG. 19 is a diagram illustrating a template of an area having a constant distance and an area having a greatly changed distance in the apparatus.

【図20】同装置における距離一定の領域と距離の大き
く変化する領域の類似度を示す図である。
FIG. 20 is a diagram showing a similarity between a region having a constant distance and a region where the distance greatly changes in the apparatus.

【図21】本発明の第7の実施の形態に係る対応点抽出
処理装置の構成を示すブロック図である。
FIG. 21 is a block diagram illustrating a configuration of a corresponding point extraction processing device according to a seventh embodiment of the present invention.

【図22】同装置におけるテンプレートサイズ決定部の
処理動作を示すフローチャートである。
FIG. 22 is a flowchart showing a processing operation of a template size determination unit in the same device.

【図23】本発明の第8の実施の形態に係る対応点抽出
処理装置の構成を示すブロック図である。
FIG. 23 is a block diagram showing a configuration of a corresponding point extraction processing device according to an eighth embodiment of the present invention.

【図24】一般的な画像入力手段の一例を示す図であ
る。
FIG. 24 is a diagram illustrating an example of a general image input unit.

【図25】一般的なテンプレートマッチング法を示す図
である。
FIG. 25 is a diagram showing a general template matching method.

【図26】従来の対応点抽出処理装置における誤抽出を
説明する図である。
FIG. 26 is a diagram illustrating erroneous extraction in a conventional corresponding point extraction processing device.

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

101 画像入力手段 102 基準画像メモリ 103 探索される画像メモリ 104 アドレス発生部 105 データ保管部 106 テンプレート画像作成部 107 評価関数演算部 108 判断部 109 テンプレートサイズ変更部 110 エッジマスクテンプレート作成部 111 画素数演算部 112 エッジ画像メモリ 113 テンプレートサイズ決定部 31 テンプレート 32 テンプレート 151 テンプレート 152 テンプレート 153 エッジで分割した領域 191 テンプレート 192 テンプレート Reference Signs List 101 Image input means 102 Reference image memory 103 Image memory to be searched 104 Address generation unit 105 Data storage unit 106 Template image creation unit 107 Evaluation function operation unit 108 Judgment unit 109 Template size change unit 110 Edge mask template creation unit 111 Pixel number operation Unit 112 edge image memory 113 template size determination unit 31 template 32 template 151 template 152 template 153 area divided by edge 191 template 192 template

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 // G01B 11/00 G06F 15/62 415 H04N 1/40 Z ──────────────────────────────────────────────────続 き Continuation of the front page (51) Int.Cl. 6 Identification code Agency reference number FI Technical display location // G01B 11/00 G06F 15/62 415 H04N 1/40 Z

Claims (40)

【特許請求の範囲】[Claims] 【請求項1】 複数の画像間の対応をテンプレートマッ
チング法に基づいて求める対応点抽出方法において、前
記テンプレートマッチング法は、ある特定の条件を満た
す点において2種類以上のテンプレートを用いて対応点
を決定することを特徴とする対応点抽出方法。
1. A corresponding point extraction method for determining correspondence between a plurality of images based on a template matching method, wherein the template matching method uses two or more types of templates at points satisfying a specific condition. A corresponding point extraction method characterized by determining.
【請求項2】 前記2種類以上のテンプレートは、テン
プレートの面積を変化させたテンプレートであることを
特徴とする請求項1記載の対応点抽出方法。
2. The corresponding point extraction method according to claim 1, wherein the two or more types of templates are templates in which the area of the template is changed.
【請求項3】 前記2種類以上のテンプレートは、テン
プレート内のエッジによりテンプレートを変形させたテ
ンプレートを含むことを特徴とする請求項1記載の対応
点抽出方法。
3. The corresponding point extraction method according to claim 1, wherein the two or more types of templates include a template obtained by deforming a template by an edge in the template.
【請求項4】 前記2種類め以降のテンプレートによる
演算は、それ以前の種類のテンプレートによる演算で候
補となった点に対して行うことを特徴とする請求項1記
載の対応点抽出方法。
4. The corresponding point extracting method according to claim 1, wherein the calculation using the second and subsequent templates is performed on points that are candidates in the calculation using the previous template.
【請求項5】 1種類め以降のテンプレートによる演算
結果に基づき2種類めのテンプレートを用いるようにそ
れ以前のテンプレートによる演算結果を判断してから次
のテンプレートによる演算を行うことを特徴とする請求
項1記載の対応点抽出方法。
5. The method according to claim 1, further comprising: judging the operation result of the previous template based on the operation result of the first and subsequent templates so as to use the second template, and then performing the operation of the next template. Item 1. The corresponding point extraction method according to Item 1.
【請求項6】 同時に2種類以上のテンプレートによる
演算を行い、その中から1つの演算結果を選択すること
を特徴とする請求項1記載の対応点抽出方法。
6. The corresponding point extraction method according to claim 1, wherein two or more kinds of templates are simultaneously operated, and one operation result is selected from among them.
【請求項7】 前記ある特定の条件を満たす点とは、複
数画像間の視差の分布が急峻に変化する領域内の点であ
ることを特徴とする請求項1記載の対応点抽出方法。
7. The corresponding point extraction method according to claim 1, wherein the point that satisfies the certain condition is a point in a region where the distribution of parallax between a plurality of images changes sharply.
【請求項8】 前記複数画像間の視差の分布が急峻に変
化する領域内の点か否かの判断を、テンプレートマッチ
ングの評価値を用いて行うことを特徴とする請求項7記
載の対応点抽出方法。
8. The corresponding point according to claim 7, wherein the determination as to whether or not the point is in a region where the distribution of parallax between the plurality of images changes sharply is performed using an evaluation value of template matching. Extraction method.
【請求項9】 前記複数画像間の視差の分布が急峻に変
化する領域内の点か否かの判断を、テンプレートマッチ
ングの評価値と、基準となる点と該点の対応点を候補と
が一致するか否かの判断結果とを用いて行うことを特徴
とする請求項7記載の対応点抽出方法。
9. A determination as to whether or not a point in an area where the distribution of parallax between a plurality of images changes sharply is performed based on an evaluation value of template matching, a reference point, and a corresponding point of the point as candidates. 8. The corresponding point extracting method according to claim 7, wherein the method is performed using a result of the determination as to whether or not they match.
【請求項10】 前記複数画像間の視差の分布が急峻に
変化する領域内の点か否かの判断を、前記複数画像間の
視差の分布が急峻に変化する領域内の点では以前のテン
プレートに含まれるテンプレートを使用し且つ類似度の
評価関数にテンプレート内の各要素の画素値と探索され
る画像内の画素の画素値の差があるしきい値以下の画素
数を用いて行うことを特徴とする請求項7記載の対応点
抽出方法。
10. A determination as to whether or not a point in an area where the distribution of parallax between a plurality of images changes steeply is performed at a point in an area where the distribution of parallax between the plurality of images changes steeply. And using the number of pixels equal to or less than a certain threshold value between the pixel value of each element in the template and the pixel value of the pixel in the searched image in the similarity evaluation function. The method for extracting corresponding points according to claim 7, characterized in that:
【請求項11】 複数の画像間の対応をテンプレートマ
ッチング法に基づき明らかにする対応点抽出装置におい
て、前記テンプレートマッチング法は、ある特定の条件
を満たす点では2種類以上のテンプレートを用いて対応
点を決定することを特徴とする対応点抽出装置。
11. A corresponding point extracting apparatus for clarifying a correspondence between a plurality of images based on a template matching method, wherein the template matching method uses two or more types of templates at points satisfying a specific condition. A corresponding point extracting apparatus characterized in that:
【請求項12】 前記2種類以上のテンプレートは、テ
ンプレートの面積を変化させたテンプレートであること
を特徴とする請求項11記載の対応点抽出装置。
12. The apparatus according to claim 11, wherein the two or more types of templates are templates in which the area of the template is changed.
【請求項13】 前記2種類以上のテンプレートは、テ
ンプレート内のエッジによりテンプレートを変形させた
テンプレートを含むことを特徴とする請求項11記載の
対応点抽出装置。
13. The corresponding point extracting apparatus according to claim 11, wherein the two or more types of templates include a template obtained by deforming a template by an edge in the template.
【請求項14】 前記2種類め以降のテンプレートによ
る演算は、それ以前の種類のテンプレートによる演算で
候補となった点に対して行うことを特徴とする請求項1
1記載の対応点抽出装置。
14. The method according to claim 1, wherein the calculation using the second and subsequent templates is performed on a candidate point in the calculation using the previous template.
2. The corresponding point extracting device according to 1.
【請求項15】 1種類め以降のテンプレートによる演
算結果に基づき2種類めのテンプレートを用いるように
それ以前のテンプレートによる演算結果を判断してから
次のテンプレートによる演算を行うことを特徴とする請
求項11記載の対応点抽出装置。
15. The method according to claim 1, further comprising: judging the operation result of the previous template so as to use the second template based on the operation result of the first and subsequent templates, and then performing the operation of the next template. Item 13. The corresponding point extraction device according to Item 11.
【請求項16】 同時に2種類以上のテンプレートによ
る演算を行い、その中から1つの演算結果を選択するこ
とを特徴とする請求項11記載の対応点抽出装置。
16. The corresponding point extracting apparatus according to claim 11, wherein calculations using two or more types of templates are performed at the same time, and one calculation result is selected from the calculated results.
【請求項17】 前記ある特定の条件を満たす点とは、
複数画像間の視差の分布が急峻に変化する領域内の点で
あることを特徴とする請求項11記載の対応点抽出装
置。
17. The point satisfying the specific condition is as follows.
The corresponding point extracting apparatus according to claim 11, wherein the parallax distribution between the plurality of images is a point in an area where the distribution changes sharply.
【請求項18】 前記複数画像間の視差の分布が急峻に
変化する領域内の点か否かの判断を、テンプレートマッ
チングの評価値を用いて行うことを特徴とする請求項1
7記載の対応点抽出装置。
18. The method according to claim 1, wherein the determination as to whether or not the point is in a region where the distribution of parallax between the plurality of images changes sharply is performed using an evaluation value of template matching.
7. The corresponding point extraction device according to 7.
【請求項19】 前記複数画像間の視差の分布が急峻に
変化する領域内の点か否かの判断を、テンプレートマッ
チングの評価値と、基準となる点と該点の対応点を候補
とが一致するか否かの判断結果とを用いて行うことを特
徴とする請求項17記載の対応点抽出装置。
19. A determination as to whether or not a point in an area where the disparity distribution of a plurality of images changes sharply is performed based on an evaluation value of template matching and a reference point and a corresponding point of the point as candidates. 18. The corresponding point extraction device according to claim 17, wherein the determination is performed using a result of the determination as to whether or not they match.
【請求項20】 前記複数画像間の視差の分布が急峻に
変化する領域内の点か否かの判断を、前記複数画像間の
視差の分布が急峻に変化する領域内の点では以前のテン
プレートに含まれるテンプレートを使用し且つ類似度の
評価関数にテンプレート内の各要素の画素値と探索され
る画像内の画素の画素値の差があるしきい値以下の画素
数を用いて行うことを特徴とする請求項17記載の対応
点抽出装置。
20. A method for determining whether or not a point in an area where the distribution of parallax between a plurality of images sharply changes is determined by using a previous template for a point in an area where the distribution of parallax between the plurality of images sharply changes. And using the number of pixels equal to or less than a certain threshold value between the pixel value of each element in the template and the pixel value of the pixel in the searched image in the similarity evaluation function. 18. The corresponding point extracting device according to claim 17, wherein:
【請求項21】 入力された複数の画像の中の1枚の画
像から、最初に所定の判断基準に基づきテンプレートを
作成し、該作成されたテンプレートの各画素の画素値と
前記入力された他の画像内の画素の画素値を用いて類似
度を求め、該求めた類似度からある特定条件を判断し、
該判断結果に基づき他のテンプレートを作成することを
特徴とする対応点抽出方法。
21. A template is first created from one of a plurality of input images based on a predetermined criterion, and a pixel value of each pixel of the created template and the input other The similarity is obtained using the pixel values of the pixels in the image, and a specific condition is determined from the obtained similarity,
A corresponding point extraction method, wherein another template is created based on the determination result.
【請求項22】 テンプレートの面積を変化させたテン
プレートを作成を作成することを特徴とする請求項21
記載の対応点抽出方法。
22. The method according to claim 21, wherein the template is created by changing the area of the template.
The corresponding point extraction method described.
【請求項23】 ある特定条件の判断は、入力された類
似度とあるしきい値とを比較して行うことを特徴とする
請求項21記載の対応点抽出方法。
23. The corresponding point extracting method according to claim 21, wherein the judgment of a certain specific condition is performed by comparing the inputted similarity with a certain threshold value.
【請求項24】 ある特定条件の判断は、入力された複
数の類似度の差があるしきい値より小さいときを判断し
て行うことを特徴とする請求項21記載の対応点抽出方
法。
24. The corresponding point extracting method according to claim 21, wherein the determination of the specific condition is performed by determining when a difference between the plurality of input similarities is smaller than a certain threshold value.
【請求項25】 ある特定条件の判断は、複数画像間の
視差の分布が急峻に変化する領域内の画素を判断して行
うことを特徴とする請求項21記載の対応点抽出方法。
25. The corresponding point extraction method according to claim 21, wherein the determination of the specific condition is performed by determining a pixel in an area where the distribution of parallax between a plurality of images changes sharply.
【請求項26】 最初のテンプレートを作成するための
前記所定の判断基準とは、テンプレートの中心点の近傍
画素の点のテンプレートサイズであることを特徴とする
請求項21記載の対応点抽出方法。
26. The corresponding point extraction method according to claim 21, wherein the predetermined criterion for creating a first template is a template size of a point of a pixel near a center point of the template.
【請求項27】 最初のテンプレートを作成するための
前記所定の判断基準とは、テンプレート中の強いエッジ
の有無であることを特徴とする請求項21記載の対応点
抽出方法。
27. The corresponding point extracting method according to claim 21, wherein the predetermined criterion for creating the first template is the presence or absence of a strong edge in the template.
【請求項28】 入力された複数の画像の中の1枚の画
像から最初に前記所定の判断基準に基づきテンプレート
を作成する第1のテンプレート作成手段と、該テンプレ
ート作成手段により作成されたテンプレートの各画素の
画素値と前記入力された他の画像内の画素の画素値を用
いて類似度を求める類似度演算手段と、該類似度演算手
段により求めた類似度からある特定条件を判断する特定
条件判断手段と、該特定条件判断手段の判断結果に基づ
き他のテンプレートを作成する第2のテンプレート作成
手段とを具備したことを特徴とする対応点抽出装置。
28. A first template creating means for first creating a template from one of a plurality of input images based on the predetermined criterion, and a template created by the template creating means. A similarity calculating means for calculating a similarity by using a pixel value of each pixel and a pixel value of a pixel in the input other image; and a specification for determining a specific condition from the similarity calculated by the similarity calculating means. A corresponding point extracting apparatus, comprising: condition determining means; and second template creating means for creating another template based on a result of the determination by the specific condition determining means.
【請求項29】 前記第2のテンプレート作成手段は、
テンプレートの面積を変化させたテンプレートを作成す
ることを特徴とする請求項28記載の対応点抽出装置。
29. The second template creating means,
29. The corresponding point extracting apparatus according to claim 28, wherein the template is created by changing the area of the template.
【請求項30】 前記特定条件判断手段は、入力された
類似度とあるしきい値とを比較してある特定条件を判断
することを特徴とする請求項28記載の対応点抽出装
置。
30. The corresponding point extracting apparatus according to claim 28, wherein said specific condition judging means judges a specific condition by comparing the input similarity with a certain threshold value.
【請求項31】 前記特定条件判断手段は、入力された
複数の類似度の差があるしきい値より小さいときを判断
してある特定条件を判断することを特徴とする請求項2
8記載の対応点抽出装置。
31. The specific condition judging means judges a specific condition by judging when a difference between a plurality of inputted similarities is smaller than a certain threshold value.
8. The corresponding point extraction device according to 8.
【請求項32】 前記特定条件判断手段は、複数画像間
の視差の分布が急峻に変化する領域内の画素を判断して
ある特定条件を判断することを特徴とする請求項28記
載の対応点抽出装置。
32. The corresponding point according to claim 28, wherein said specific condition determining means determines a specific condition by determining pixels in an area where the distribution of parallax between a plurality of images changes sharply. Extraction device.
【請求項33】 最初のテンプレートを作成するための
前記所定の判断基準とは、テンプレートの中心点の近傍
画素の点のテンプレートサイズであることを特徴とする
請求項28記載の対応点抽出装置。
33. The corresponding point extracting apparatus according to claim 28, wherein the predetermined criterion for creating a first template is a template size of a point of a pixel near a center point of the template.
【請求項34】 最初のテンプレートを作成するための
前記所定の判断基準とは、テンプレート中の強いエッジ
の有無であることを特徴とする請求項28記載の対応点
抽出装置。
34. The corresponding point extracting apparatus according to claim 28, wherein the predetermined criterion for creating the first template is the presence or absence of a strong edge in the template.
【請求項35】 入力された複数の画像の内の1枚の画
像から直前に求めた点で使用したテンプレートサイズを
使用してテンプレートを作成し、該作成されたテンプレ
ートの各画素の画素値と前記入力された他の画像内の画
素の画素値を用いて類似度を求め、該求めた類似度から
入力された類似度があるしきい値より小さいときを判断
し、該判断結果に基づきテンプレートの面積を変化させ
たテンプレートを作成することを特徴とする対応点抽出
方法。
35. A template is created from one of a plurality of input images using a template size used at a point obtained immediately before, and a pixel value of each pixel of the created template and A similarity is calculated using the pixel values of the pixels in the other input image, and when the input similarity is smaller than a certain threshold is determined from the calculated similarity, a template is determined based on the determination result. A corresponding point extracting method, characterized in that a template having a changed area is created.
【請求項36】 入力された複数の画像の内の1枚の画
像から直前に求めた点で使用したテンプレートサイズを
使用してテンプレートを作成し、該作成されたテンプレ
ートの各画素の画素値と前記入力された他の画像内の画
素の画素値を用いて類似度を求め、該求めた類似度から
入力された複数の類似度の差があるしきい値より小さい
ときを判断し、該判断結果に基づきテンプレートの面積
を変化させたテンプレートを作成することを特徴とする
対応点抽出方法。
36. A template is created from one of a plurality of input images using a template size used at a point obtained immediately before, and a pixel value of each pixel of the created template and The similarity is obtained using the pixel values of the pixels in the other input image, and when the difference between the plurality of input similarities from the obtained similarity is smaller than a certain threshold value, it is determined. A corresponding point extraction method, characterized in that a template in which the area of the template is changed based on the result is created.
【請求項37】 入力された複数の画像の内の1枚の画
像から直前に求めた点で使用したテンプレートサイズを
使用してテンプレートを作成し、該作成されたテンプレ
ートの各画素の画素値と前記入力された他の画像内の画
素の画素値を用いて類似度を求め、該求めた類似度から
複数画像間の視差の分布が急峻に変化する領域内の画素
を判断し、該判断結果に基づきテンプレートの面積を変
化させたテンプレートを作成することを特徴とする対応
点抽出方法。
37. A template is created using a template size used at a point obtained immediately before from one image of a plurality of input images, and a pixel value of each pixel of the created template is calculated. A similarity is obtained by using the pixel values of the pixels in the input other image, and a pixel in an area where a distribution of parallax between a plurality of images changes sharply from the obtained similarity is determined. A corresponding point extraction method, characterized in that a template in which the area of the template is changed based on the template is created.
【請求項38】 入力された複数の画像の内の1枚の画
像から直前に求めた点で使用したテンプレートサイズを
使用してテンプレートを作成する第1のテンプレート作
成手段と、該第1のテンプレート作成手段により作成さ
れたテンプレートの各画素の画素値と前記入力された他
の画像内の画素の画素値を用いて類似度を求める類似度
演算手段と、該類似度演算手段により求めた類似度から
入力された類似度があるしきい値より小さいときを判断
する判断手段と、該判断手段の判断結果に基づきテンプ
レートの面積を変化させたテンプレートを作成する第2
のテンプレート作成手段とを具備したことを特徴とする
対応点抽出装置。
38. A first template creation means for creating a template from one of a plurality of input images using a template size used at a point obtained immediately before, and the first template Similarity calculating means for calculating a similarity using the pixel value of each pixel of the template created by the creating means and the pixel value of the pixel in the input other image; and a similarity calculated by the similarity calculating means. Determining means for determining when the degree of similarity input from is smaller than a certain threshold value, and generating a template in which the area of the template is changed based on the determination result of the determining means.
A corresponding point extraction device, comprising:
【請求項39】 入力された複数の画像の内の1枚の画
像から直前に求めた点で使用したテンプレートサイズを
使用してテンプレートを作成する第1のテンプレート作
成手段と、該第1のテンプレート作成手段により作成さ
れたテンプレートの各画素の画素値と前記入力された他
の画像内の画素の画素値を用いて類似度を求める類似度
演算手段と、該類似度演算手段により求めた類似度から
入力された複数の類似度の差があるしきい値より小さい
ときを判断する判断手段と、該判断手段の判断結果に基
づきテンプレートの面積を変化させたテンプレートを作
成する第2のテンプレート作成手段とを具備したことを
特徴とする対応点抽出装置。
39. A first template creating means for creating a template using a template size used at a point obtained immediately before from one image of a plurality of input images, and said first template Similarity calculating means for calculating a similarity using the pixel value of each pixel of the template created by the creating means and the pixel value of the pixel in the input other image; and a similarity calculated by the similarity calculating means. Determining means for determining when a difference between a plurality of similarities input from a plurality is smaller than a certain threshold value, and a second template generating means for generating a template in which the area of the template is changed based on the determination result of the determining means And a corresponding point extracting device comprising:
【請求項40】 入力された複数の画像の内の1枚の画
像から直前に求めた点で使用したテンプレートサイズを
使用してテンプレートを作成する第1のテンプレート作
成手段と、該第1のテンプレート作成手段により作成さ
れたテンプレートの各画素の画素値と前記入力された他
の画像内の画素の画素値を用いて類似度を求める類似度
演算手段と、該類似度演算手段により求めた類似度から
複数画像間の視差の分布が急峻に変化する領域内の画素
を判断する判断手段と、該判断手段の判断結果に基づき
テンプレートの面積を変化させたテンプレートを作成す
る第2のテンプレート作成手段とを具備したことを特徴
とする対応点抽出装置。
40. A first template creating means for creating a template using a template size used at a point obtained immediately before from one of a plurality of input images, and said first template Similarity calculating means for calculating a similarity using the pixel value of each pixel of the template created by the creating means and the pixel value of the pixel in the input other image; and a similarity calculated by the similarity calculating means. A determining means for determining a pixel in an area in which the distribution of parallax between a plurality of images changes sharply from a plurality of images; A corresponding point extracting apparatus, comprising:
JP8194103A 1996-02-21 1996-07-05 Method and device for extracting correspondent points Pending JPH1021403A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP8194103A JPH1021403A (en) 1996-07-05 1996-07-05 Method and device for extracting correspondent points
US08/803,127 US6493465B2 (en) 1996-02-21 1997-02-20 Matching point extracting method and apparatus therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8194103A JPH1021403A (en) 1996-07-05 1996-07-05 Method and device for extracting correspondent points

Publications (1)

Publication Number Publication Date
JPH1021403A true JPH1021403A (en) 1998-01-23

Family

ID=16318997

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8194103A Pending JPH1021403A (en) 1996-02-21 1996-07-05 Method and device for extracting correspondent points

Country Status (1)

Country Link
JP (1) JPH1021403A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001109879A (en) * 1999-08-05 2001-04-20 Sony Corp Device and method for image processing, and medium
JP2004333243A (en) * 2003-05-06 2004-11-25 Pasuko:Kk Method for matching image
JP2009293970A (en) * 2008-06-03 2009-12-17 Fujifilm Corp Distance measuring device and method, and program
JP2009293971A (en) * 2008-06-03 2009-12-17 Fujifilm Corp Distance measuring device and method, and program
JP2010165248A (en) * 2009-01-16 2010-07-29 Casio Computer Co Ltd Image processor, image collation method, and program

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001109879A (en) * 1999-08-05 2001-04-20 Sony Corp Device and method for image processing, and medium
JP2004333243A (en) * 2003-05-06 2004-11-25 Pasuko:Kk Method for matching image
JP2009293970A (en) * 2008-06-03 2009-12-17 Fujifilm Corp Distance measuring device and method, and program
JP2009293971A (en) * 2008-06-03 2009-12-17 Fujifilm Corp Distance measuring device and method, and program
JP2010165248A (en) * 2009-01-16 2010-07-29 Casio Computer Co Ltd Image processor, image collation method, and program
US8224069B2 (en) 2009-01-16 2012-07-17 Casio Computer Co., Ltd. Image processing apparatus, image matching method, and computer-readable recording medium

Similar Documents

Publication Publication Date Title
US9807365B2 (en) System and method for hybrid simultaneous localization and mapping of 2D and 3D data acquired by sensors from a 3D scene
KR100411875B1 (en) Method for Stereo Image Disparity Map Fusion And Method for Display 3-Dimension Image By Using it
JP2940317B2 (en) Image processing device
US5974170A (en) Method of detecting relief contours in a pair of stereoscopic images
JPH10301948A (en) Method for retrieving image and video
JPH1021403A (en) Method and device for extracting correspondent points
KR100446414B1 (en) Device for Hierarchical Disparity Estimation and Method Thereof and Apparatus for Stereo Mixed Reality Image Synthesis using it and Method Thereof
JP4133246B2 (en) Image deformation information generation apparatus, image deformation information generation method, and image deformation information generation program
KR100229810B1 (en) Method for searching image database
CN113567550A (en) Ground material detection method and device, electronic equipment, chip and storage medium
KR19990016894A (en) How to search video database
JP4550398B2 (en) Method for representing movement of objects appearing in a sequence of images, method for identifying selection of objects in images in a sequence of images, method for searching a sequence of images by processing signals corresponding to the images, and apparatus
JP2000311244A (en) Matching method for picture
JPH1139477A (en) Corresponding point search device
JPH04241684A (en) System for integrating and matching picture
JPH09231358A (en) Device and method for extracting corresponding point of picture
JPH0239275A (en) Obstacle detecting device
JP3585143B2 (en) Character string extraction method and device
JP3668560B2 (en) Line figure recognition method and recognition apparatus
JP2867650B2 (en) Symbol candidate area detection method
JPH0554189A (en) Picture information processor
KR101730711B1 (en) Method and apparatus for restoring drawing order of stroke
Rosin et al. Multi-Scale Salience Distance Transforms.
KR100227266B1 (en) Image recognition method
JP2000148977A (en) Vehicle detecting method, recording medium with software realizing the same recorded therein and device for realizing method