JPH0664614B2 - Hierarchical structured template matching method - Google Patents

Hierarchical structured template matching method

Info

Publication number
JPH0664614B2
JPH0664614B2 JP62044780A JP4478087A JPH0664614B2 JP H0664614 B2 JPH0664614 B2 JP H0664614B2 JP 62044780 A JP62044780 A JP 62044780A JP 4478087 A JP4478087 A JP 4478087A JP H0664614 B2 JPH0664614 B2 JP H0664614B2
Authority
JP
Japan
Prior art keywords
matching
template
stage
image
region
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP62044780A
Other languages
Japanese (ja)
Other versions
JPS63211474A (en
Inventor
潔 平川
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.)
Yaskawa Electric Corp
Original Assignee
Yaskawa Electric Corp
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 Yaskawa Electric Corp filed Critical Yaskawa Electric Corp
Priority to JP62044780A priority Critical patent/JPH0664614B2/en
Publication of JPS63211474A publication Critical patent/JPS63211474A/en
Publication of JPH0664614B2 publication Critical patent/JPH0664614B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、画像処理装置に係り、とくに階層化構造的テ
ンプレート・マッチング方法に関する。
The present invention relates to an image processing device, and more particularly to a hierarchical structured template matching method.

〔従来の技術〕 従来、テンプレート〔Template,いわゆる型板でマスク
(mask)という〕のマッチング(matching)方法として
は、テンプレートを入力画像(以下、単に『画像』と略
す)内の候補点領域全体にわたって1画素ずつずらしな
がら、それぞれの位置において1画素単位の解像度でテ
ンプレートと画像間の一致度を算出し、一致度が最大と
なる候補点の位置を求める方法がとられていた。
[Prior Art] Conventionally, as a matching method for a template [Template, so-called mask with a template], a template is used as an entire candidate point region in an input image (hereinafter, simply referred to as “image”). A method has been employed in which the degree of coincidence between the template and the image is calculated at a resolution of one pixel at each position while shifting the position by one pixel, and the position of the candidate point having the maximum degree of coincidence is obtained.

ここに、候補点とはテンプレートをマッチングするため
にテンプレートをずらせるつまり移動させる位置の基準
となる点をいう。
Here, the candidate point is a point serving as a reference of a position where the template is shifted, that is, moved to match the template.

また、先行例として特開昭60−200375号・テンプレート
マッチング方式がみられる。
As a prior art example, there is a template matching method disclosed in JP-A-60-200375.

この先行例は、 「入力ディジタル画像パターン内の被認識領位置認識に
際して上記入力ディジタル画像パターンに対しテンプレ
ートをスキャンさせ、これら両者間のマッチングをとっ
て上記位置認識を行なうテンプレートマッチング方式に
おいて、上記テンプレートの各マッチング単位領域のう
ちの境界に近いマッチング単位領域に小さなウェイトを
付与する一方、上記境界から遠いマッチング単位領域に
大きなウェイトを付与してテンプレートを構成し、その
テンプレートを用いて上記両者間のマッチングをとるテ
ンプレートマッチング方式」 である。
In this prior art example, "In the template matching method in which a template is scanned for the input digital image pattern when recognizing a position to be recognized in the input digital image pattern, and the two are matched, the position is recognized. A small weight is given to the matching unit area near the boundary among the matching unit areas of, and a large weight is given to the matching unit area far from the boundary to form a template. It is a template matching method for matching.

さらに、参考例として特開昭61−34675号公報・画像認
識方法および装置がある。
Further, as a reference example, there is an image recognition method and apparatus disclosed in JP-A-61-34675.

その参考例は、 「撮像装置により対象物を撮像し、その画像を画像認識
装置に送って画像処理し、画像認識装置からの位置情報
に基づいて作業するツールに位置情報を送る画像処理方
法において、前記撮像装置の視野内の画像のうちの、任
意に選択された1つの画像に干渉チェック領域を配列し
たパターンを作り、このパターン内に他の対象物の画像
が干渉しているか、否かを判別し、干渉ありのときは、
干渉なしの対象物の画像が検出されるまで、繰に返し検
索する画像認識方法」 である。
The reference example is "in the image processing method, in which an image of an object is picked up by an image pickup device, the image is sent to an image recognition device for image processing, and position information is sent to a working tool based on position information from the image recognition device. A pattern in which an interference check region is arranged in one image arbitrarily selected from the images in the field of view of the image pickup device, and whether or not an image of another object interferes in this pattern If there is interference,
It is an image recognition method that searches repeatedly until an image of the object without interference is detected. "

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

ところが、従来のマッチング法は、テンプレートと画像
間の一致度が最大となる候補点の位置を求めるため、テ
ンプレートあるいは候補点領域が大きい場合、莫大な回
数の画素間演算が必要であった。
However, in the conventional matching method, since the position of the candidate point that maximizes the degree of matching between the template and the image is obtained, when the template or the candidate point area is large, a huge number of pixel-to-pixel calculations are required.

たとえば、マッチングの対象が第6図に表わすようにI
×J画素の範囲のテンプレート10に格納されており、マ
ッチングの対象30の位置ずれが、X,Y方向にそれぞれDX,
DY画素分存在する場合を考える。
For example, the target of matching is I as shown in FIG.
It is stored in the template 10 in the range of × J pixels, and the positional deviation of the matching target 30 is DX, X in the X and Y directions, respectively.
Consider the case where there are DY pixels.

テンプレートの画像上での位置を第7図に示すテンプレ
ート左上の位置で表わすことにすると、この場合の候補
点領域71は、DX×DY画素の範囲である。
If the position of the template on the image is represented by the upper left position of the template shown in FIG. 7, the candidate point area 71 in this case is a range of DX × DY pixels.

テンプレート10を、DX×DY画素の範囲の候補点領域71全
体にわたって1画素ずらしては、テンプレート10と対象
30を含む画像20間の一致度を求めるという手続を踏まな
ければならない。
If the template 10 is shifted by one pixel over the entire candidate point area 71 in the range of DX × DY pixels, the template 10 and the target
You must take the procedure of finding the degree of agreement between the images 20 including 30.

一致度の目安として、 を使い、 ‘T(I,J)−F(I,J)’ を1画素演算と数えると、 (I×J)×(DX×DY)回 の画素演算を要することになる。As a measure of coincidence, Using, and counting'T (I, J) -F (I, J) 'as one pixel calculation, (I × J) × (DX × DY) times of pixel calculation is required.

なお、T(I,J)、F(I,J)は(I,J)おけるテンプレ
ート画素および画像画素の濃度値である。
Note that T (I, J) and F (I, J) are the density values of the template pixel and image pixel in (I, J).

しかして、先行例は、入力ディジタル画像パターン内の
被認識パターンとその背景パターンとの境界に存在する
不安定要素の影響を排除して検出精度を高め得るテンプ
レートマッチング方式であり、その技術分野は同一であ
るが着眼点・アイデァは全く異なる手段である。
Thus, the prior art example is a template matching method that can improve the detection accuracy by eliminating the influence of unstable elements existing at the boundary between the recognized pattern in the input digital image pattern and the background pattern, and its technical field is Although they are the same, the point of view and idea are completely different means.

また、参考例は、位置情報に基づいて作業するマニプレ
ータ等のツールと、このツールの対象物以外の他の対象
物との干渉を防止し得る画像認識方法に過ぎない。
Further, the reference example is merely an image recognition method capable of preventing interference between a tool such as a manipulator that operates based on position information and an object other than the object of this tool.

ここにおいて本発明は、従来例の難点を克服し、テンプ
レートあるいは候補点領域が大きい場合に、少ない回数
の画素演算でテンプレート・マッチングを実行する階層
化構造的テンプレート・マッチング方法を提供すること
を、その目的とする。
Here, the present invention overcomes the drawbacks of the conventional example and provides a hierarchical structural template matching method that executes template matching with a small number of pixel operations when the template or candidate point area is large. To that end.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、上記問題点を解決するための手段として、対
象入力画像としてテンプレート画像とのマッチングを複
数段階に分けて行ない、しかも、各段階毎に、テンプレ
ート画像の大きさ、サンプリングレート、及び候補点領
域を次第に小さくしていく階層化構造的階テンプレート
・マッチング方法において、全段階数をNとし、第1段
階から第(N−1)段階までの各段階を第M段階と表し
た場合に、第1段階では、予め与えられた候補点領域内
におけるサンプリングレート2 -1により定まる各位置
毎に対象入力画像とテンプレート画像とのマッチングを
行なうと共に、そのときの一致度が最大である位置を第
2段階でのマッチングの基準位置として指定し、第2段
階から第(N−1)段階までの各段階では、前段階で指
定された基準位置を中心として±2N−M+1画素の正
方形領域内を候補点領域とし、この領域内でサンプリン
グレート2N−Mにより定まる各位置毎にマッチングを
行うと共に、そのときの一致度が最大である位置を次段
階でのマッチングの基準位置として指定し、第N段階で
は、第(N−1)段階で指定された基準位置を中心とし
て±2画素の正方形領域内の全ての位置でマッチングを
行ない、そのときの一致度が最大となる位置を真の一致
点と判別する、ことを特徴とするものである。
As a means for solving the above problems, the present invention performs matching with a template image as a target input image in a plurality of stages, and further, for each stage, the size of the template image, the sampling rate, and the candidate. In the hierarchical structural floor template matching method in which the point region is gradually reduced, when the total number of stages is N and each stage from the first stage to the (N−1) th stage is represented as the Mth stage, In the first step, the target input image and the template image are matched at each position determined by the sampling rate 2 N −1 in the given candidate point region, and the position at which the degree of coincidence is the maximum is matched. Is designated as the reference position for the matching in the second stage, and in each stage from the second stage to the (N-1) th stage, the reference position designated in the previous stage is designated. Is set as a candidate point area within a square area of ± 2 N−M + 1 pixels, and matching is performed at each position determined by the sampling rate 2 N−M in this area, and the degree of coincidence at that time is the maximum. Is designated as a reference position for matching in the next stage, and in the Nth stage, matching is performed at all positions within a square region of ± 2 pixels centered on the reference position designated in the (N-1) th stage, The feature is that the position where the degree of coincidence at that time is maximum is determined as a true coincident point.

(作用) 上記構成において、対象入力画像とテンプレート画像と
のマッチングは次のように行なわれる。
(Operation) In the above configuration, matching between the target input image and the template image is performed as follows.

第1段階では、予め決められている候補点領域内で2
-1画素毎のサンプリングレートでマッチングが行なわ
れ、最大の一致度が得られた位置のみが第2段階での基
準位置として指定される。
In the first stage, 2 N within the predetermined candidate point area
-1 matching the sampling rate for each pixel is performed, only the position where the maximum degree of coincidence is obtained is designated as a reference position in the second stage.

第2段階から第(N−1)段階までの各段階では、前段
階で指定された基準位置を中心にした周辺位置であっ
て、各段階所定のサンプリングレートにより定まる位置
のみにおいてマッチングが行なわれ、そのときの一致度
が最大となる位置が次段階でのマッチングの基準位置に
指定される。
In each of the stages from the second stage to the (N-1) th stage, matching is performed only at the peripheral positions around the reference position designated in the previous stage, which is determined by the predetermined sampling rate in each stage. The position where the degree of coincidence at that time is maximum is designated as the reference position for matching in the next stage.

このようにして、次第に真の一致点が存在する範囲が絞
り込まれていき、第N段階すなわち最終段階では、前段
階で指定された基準位置を中心として±2画素の正方形
領域内の全ての位置、つまり25個所の位置でマッチング
が行なわれ、最大一致度が得られる位置が真の一致点と
判別される。
In this way, the range in which the true coincidence points are present is gradually narrowed down, and in the Nth stage, that is, the final stage, all positions within a square region of ± 2 pixels centered on the reference position specified in the previous stage. That is, matching is performed at 25 positions, and the position where the maximum degree of matching is obtained is determined to be the true matching point.

(実施例) 以下、本発明の実施例を第1図乃至第5図に基き説明す
る。
(Example) Hereinafter, an example of the present invention will be described with reference to FIGS. 1 to 5.

第3図は本発明を概括的に表わす説明図で、テンプレー
ト10におけるマッチングの対象30の画像等に対応して、
テンプレート領域31,テンプレート領域32,テンプレート
領域33,テンプレート領域34,……を設定しており、もっ
とも第3図は4個のテンプレート領域を設けている。
FIG. 3 is an explanatory view schematically showing the present invention, which corresponds to an image of the matching target 30 in the template 10,
A template area 31, a template area 32, a template area 33, a template area 34, ... Are set, but in FIG. 3, four template areas are provided.

すなわち、 本発明は、テンプレート・マッチングをN(自然数)段
階に分割して行ない、原画像をテンプレート・メモリに
格納し、N個のテンプレート領域を、 I×J, (1/2)×(J×2), (I/4)×(J/4), (I/8)×(J/8), … … (I/2N−1)×(J/2N−1) 画素の範囲に設定し(第3図)、テンプレート領域同志
の相対位置関係に制限は無くし、第M段階で使用するテ
ンプレート領域の番号をMとした場合に、テンプレート
領域からX,Y方向にそれぞれ2 画素ごとにサンプ
リングした画素をテンプレートとして用いることによ
り、全てのテンプレートは (I/2 -1)×(J/2 -1) 画素で構成されるようにする階層化構造的テンプレート
・マッチング方法である。
That is, according to the present invention, template matching is divided into N (natural number) stages, the original image is stored in the template memory, and N template regions are I × J, (1/2) × (J X2), (I / 4) x (J / 4), (I / 8) x (J / 8), ... (I / 2 N-1 ) x (J / 2 N-1 ) pixel range (FIG. 3), there is no restriction on the relative positional relationship between template regions, and the template region number used in the Mth stage is M, 2 N in each of the X and Y directions from the template region. Hierarchical structured template matching in which all the templates are composed of (I / 2 N -1 ) × (J / 2 N -1 ) pixels by using pixels sampled every M pixels as a template. Is the way.

以下では、例として第3図に表わした4段階のテンプレ
ート・マッチングを行う場合の一致度の目安として、前
述と同じものを採用して説明する。
In the following, as an example, description will be made by adopting the same one as described above as a measure of the degree of matching when performing the four-step template matching shown in FIG.

まず、第1段階では、I×J画素のテンプレート領域
31を使用し、候補点領域をDX×DY画素全体とする。そし
て、テンプレート領域と画像のサンプリング・レート
を、X,Y方向ともに8画素に1画素として、テンプレー
ト・マッチングを行なう。サンプリングの様子を第4図
(a)に示す。
First, in the first stage, a template region of I × J pixels
31 is used and the candidate point area is the entire DX × DY pixel. Then, template matching is performed by setting the sampling rate of the template region and the image to one pixel in eight pixels in both the X and Y directions. The state of sampling is shown in FIG.

つまり、テンプレート領域31、画像20をおのおの(I/
8)×(J×8)画素、〔(I+DX)/8〕×〔(J+
DY)/8〕画素に圧縮してテンプレート・マッチングを
行なう。
That is, each of the template area 31 and the image 20 (I /
8) × (J × 8) pixels, [(I + DX) / 8] × [(J +
DY) / 8] Compress to pixels and perform template matching.

この結果、テンプレート領域31を8画素の精度で位置決
めできる。
As a result, the template region 31 can be positioned with an accuracy of 8 pixels.

第1段階で、必要な画素演算は、 テンプレート領域31が(I/8)×(J×8)画素、 候補点(図示していない)の数が(DX/8)×(DY/
8) であるので、 〔(I/8)×(J/8)〕×〔(DX/8)×(DY/
8)〕回 である。なお、481,482,483,…はサンプリング(標本
化)点である。
In the first stage, the necessary pixel calculation is (I / 8) × (J × 8) pixels in the template region 31, and the number of candidate points (not shown) is (DX / 8) × (DY /
8) Therefore, [(I / 8) × (J / 8)] × [(DX / 8) × (DY /
8)] times. Note that 481, 482, 483, ... Are sampling points.

第2段階では、(I/2)×(J/2)画素のテンプ
レート領域32を使用し、候補点領域を、第1段階で得ら
れた位置にテンプレート領域31,32の相対位置関係を加
えた位置を中心にして±8画素の範囲に設定する。これ
を第5図(a)に表わし、第5図(b)は第2段階での
候補点領域52の拡大図である。なお、51は第1段階での
一致度最大点、521,522,523,…52nは候補点であり、そ
のうち52cはさきの領域31,32の相対位置関係を加えた位
置の中心の候補点を示す。
In the second stage, the template region 32 of (I / 2) × (J / 2) pixels is used, and the candidate point region is added to the position obtained in the first stage by adding the relative positional relationship between the template regions 31 and 32. It is set within a range of ± 8 pixels around the position. This is shown in FIG. 5 (a), and FIG. 5 (b) is an enlarged view of the candidate point region 52 at the second stage. Note that 51 is the maximum matching score in the first stage, and 521, 522, 523, ... 52n are candidate points, of which 52c is a candidate point at the center of the position where the relative positional relationship of the previous regions 31, 32 is added.

そして、サンプリング・レートを4画素に1画素として
テンプレート・マッチングを行なう。
Then, template matching is performed with a sampling rate of 1 pixel for every 4 pixels.

この結果、テンプレート領域32を4画素の精度で位置決
めできる。サンプリングの様子を第4図(b)に示し、
441,442,443,…はサンプリング点である。
As a result, the template region 32 can be positioned with an accuracy of 4 pixels. The state of sampling is shown in Fig. 4 (b),
441, 442, 443, ... are sampling points.

このようにして、第2段階で、必要な画素演算は、 テンプレート領域32が(I/8)×(J/8)画素、 候補点の数が5×5 のため、 (I/8)×(J×8)×(5×5)回 である。In this way, in the second step, the necessary pixel calculation is (I / 8) × (I / 8) × (J / 8) pixels in the template area 32 (J × 8) × (5 × 5) times.

第3段階では、(I/4)×(J/4)画素のテンプ
レート領域33を使用し、候補点領域を、第2段階で得ら
れた位置にテンプレート領域32,33の相対位置関係を加
えた位置を中心にして±4画素の範囲に設定する。
In the third stage, the template region 33 of (I / 4) × (J / 4) pixels is used, and the candidate point region is added to the position obtained in the second stage by adding the relative positional relationship between the template regions 32 and 33. It is set within a range of ± 4 pixels with the centered position as the center.

そして、サンプリング・レートを2画素に1画素として
テンプレート・マッチングを行なう。これを第4図
(c)に示す。421,422,423,…はサンプリング点であ
る。
Then, template matching is performed with the sampling rate set to one pixel for every two pixels. This is shown in FIG. 4 (c). 421, 422, 423, ... Are sampling points.

この結果、テンプレート領域33を2画素の精度で位置決
めできる。
As a result, the template region 33 can be positioned with an accuracy of 2 pixels.

第3段階で、必要な画素演算回数は、第2段階と同じで
ある。
The number of pixel calculations required in the third stage is the same as in the second stage.

第4段階では、(I/8)×(J/8)画素のテンプ
レート領域34を使用し、候補点領域を、第3段階で得ら
れた位置にテンプレート領域33,34の相対位置関係を加
えた位置を中心にして±2画素の範囲に設定する。
In the fourth stage, the template region 34 of (I / 8) × (J / 8) pixels is used, and the candidate point region is added to the position obtained in the third stage by adding the relative positional relationship between the template regions 33 and 34. It is set within a range of ± 2 pixels with the centered position as the center.

そして、サンプリング・レートを1画素ずつとしてテン
プレート・マッチングを行なう。それを第4図(d)に
示し、411……はサンプリング点である。
Then, template matching is performed with a sampling rate of one pixel at a time. This is shown in FIG. 4 (d), and 411 ... Sampling points.

この結果、テンプレート領域34を1画素の精度で位置決
めできる。
As a result, the template region 34 can be positioned with an accuracy of one pixel.

第4段階で、必要な画素演算回数は、第2段階と同一で
ある。
The required number of pixel calculations in the fourth stage is the same as in the second stage.

本発明の一実施例における回路構成を表わすブロック図
を第1図に示す。
FIG. 1 is a block diagram showing a circuit configuration in one embodiment of the present invention.

1はTV(テレビ)カメラで、2はTVカメラからのビデオ
信号をデジタル信号に変換するA/Dコンバータであ
る。A/Dコンバータ2の出力は、3の画像メモリに送
られ格納される。なお、4のテンプレート・メモリには
予めテンプレート画像を格納しておく。
Reference numeral 1 is a TV (television) camera, and 2 is an A / D converter for converting a video signal from the TV camera into a digital signal. The output of the A / D converter 2 is sent to and stored in the image memory 3. A template image is stored in advance in the template memory 4 of FIG.

画像入力後、9のCPU(中央処理装置)部がバス8を介
して5のアドレス発生部に対して、テンプレート領域,
候補点領域,サンプリング・レートを指定し起動を掛け
ると、アドレス発生部5は画像メモリ3とテンプレート
・メモリ4に対し連続的に読み出しアドレスを発生し、
6のマッチング部には、画像メモリ3とテンプレート・
メモリ4の内容がそれぞれ1画素ずつ同期させて送り込
まれる。
After inputting the image, the CPU (central processing unit) unit 9 sends a template area to the address generation unit 5 via the bus 8.
When the candidate point area and the sampling rate are designated and activated, the address generator 5 continuously generates read addresses for the image memory 3 and the template memory 4,
The matching unit 6 includes an image memory 3 and a template.
The contents of the memory 4 are sent in synchronization with each one pixel.

マッチング部6で算出された一致度は、7の一致最大点
検出部に送られ、テンプレート10の一致度が最大となる
候補点の位置が検出される。
The matching degree calculated by the matching unit 6 is sent to the maximum matching point detecting unit 7 and the position of the candidate point having the maximum matching degree of the template 10 is detected.

この結果は、CPU部9に読み取られる。The result is read by the CPU unit 9.

このシーケンスが、最終(N)段階までN回繰り返され
る。
This sequence is repeated N times until the final (N) stage.

第2図は、そのシーケンスを表わすフロー・チャートを
示す。
FIG. 2 shows a flow chart showing the sequence.

つまり、ステップ21でカメラ1より画像領域を入力し、
ステップ22でA/Dコンバータ2によるA/D変換がな
され、ステップ23で画像メモリ3を格納し、ステップ24
でCPU9からアドレス発生部5に指定して第1段階のテン
プレート領域,候補点領域,サンプリングレートが選択
される。
That is, in step 21, the image area is input from the camera 1,
In step 22, A / D conversion is performed by the A / D converter 2, the image memory 3 is stored in step 23, and step 24
Then, the CPU 9 designates the address generator 5 to select the first-stage template region, candidate point region, and sampling rate.

そして、画像メモリ3とテンプレート4のそれぞれの出
力のマッチングをステップ25で行ない、一致度最大点の
検出がステップ26でなされ、最終段階か否かをステップ
27で判断し、否(NO)であればステップ28の次段階のテ
ンプレート領域,候補点領域,サンプリング・レートが
CPU9の指定で選択され、ステップ25のマッチングへ戻
り、これがN回繰り返され、ステップ29の終了ですなわ
ちテンプレートがマッチングしたことになる。
Then, the outputs of the image memory 3 and the template 4 are matched in step 25, and the maximum matching score is detected in step 26.
If the determination is NO in step 27, the template area, candidate point area, and sampling rate in the next step of step 28 are
It is selected by the designation of the CPU 9, and the process returns to the matching in step 25, which is repeated N times, and at the end of step 29, the template is matched.

〔発明の効果〕〔The invention's effect〕

従来のパターン・マッチング方法では、テンプレート領
域31を使用すれば、 (I/J)×(DX/DY)回、 しかるに、本発明の階層化構造的テンプレート・マッチ
ング方法によれば、N段階でテンプレート・マッチング
を行なうと 〔(I/2N−1)×(J/2N−1)〕 ×〔(DX/2N−1)×(DY/2N−1) +(N−1)×(5×5)〕回 の画素演算ですむ。
In the conventional pattern matching method, if the template region 31 is used, (I / J) × (DX / DY) times, however, according to the hierarchical structural template matching method of the present invention, the template is processed in N stages. -When matching is performed, [(I / 2 N-1 ) x (J / 2 N-1 )] x [(DX / 2 N-1 ) x (DY / 2 N-1 ) + (N-1) x (5 × 5)] pixel calculation is enough.

これをより具体的に示すために、たとえば I,J=256でDX,DY=64 の場合、 従来方法では、 テンプレート領域31を使用すると、 (256×256)×(64×64)≒268×10回 の画素演算が必要であり、 ところが、本発明によれば 〔(256/8)×(256/8)〕 ×〔(64/8)×(64/8) +3×(5×5)〕≒142×10回 の画素演算ですむ。To show this more concretely, for example, when I, J = 256 and DX, DY = 64, the template area 31 is used in the conventional method as follows: (256 × 256) × (64 × 64) ≈ 268 × 10 6 times are required for pixel operations, however, according to the present invention [(256/8) × (256/8)] × [(64/8) × (64/8) + 3 × (5 × 5 )] ≈ 142 × 10 3 pixel calculations are required.

かくして本発明になる階層化構造的テンプレート・マッ
チング方法の使用により、I,J,DX,DYが十分大きい場合
には、画素演算回数を約1/24(N−1)に減少で
き、マッチングの効率化を著しく促進し、ひいては単に
小さなテンプレートで画像全体とのマッチングを行なう
場合と比較して信頼性の向上にもつながる。
Thus, by using the hierarchical structural template matching method according to the present invention, the number of pixel operations can be reduced to about 1/24 (N-1) when I, J, DX, DY are sufficiently large, and the matching can be performed. This significantly promotes the efficiency of, and leads to the improvement of reliability as compared with the case where matching is performed with the entire image using only a small template.

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

第1図は本発明の一実施例における回路構成を表わすブ
ロック図、第2図はその動作シーケンスを示すフロー・
チャート、第3図は本発明の概要図、第4図は本発明の
各段階でのサンプリング・レートの変遷図、第5図は本
発明の1段階での一致度最大点と第2段階での候補点領
域を表わす図、第6図,第7図は従来例の説明図であ
る。 1……TVカメラ 2……A/Dコンバータ 3……画像メモリ 4……テンプレート・メモリ 5……アドレス発生部 6……マッチング部 7……一致度最大候補点検出部 8……バス 9……CPU部 10……テンプレート 481,482,483,…441,442,443,…,421,422,423,…411……
サンプリング点 51……第1段階での一致度最大候補点 52……第2段階での候補点領域 521,522,523,…52c,…52n……候補点。
FIG. 1 is a block diagram showing a circuit configuration in an embodiment of the present invention, and FIG. 2 is a flow chart showing its operation sequence.
A chart, FIG. 3 is a schematic diagram of the present invention, FIG. 4 is a transition diagram of the sampling rate at each stage of the present invention, and FIG. 5 is a maximum degree of coincidence in one stage of the present invention and the second stage. FIGS. 6 and 7 are explanatory views of a conventional example. 1 ... TV camera 2 ... A / D converter 3 ... Image memory 4 ... Template memory 5 ... Address generation unit 6 ... Matching unit 7 ... Maximum matching point candidate detection unit 8 ... Bus 9 ... … CPU 10… Template 481,482,483,… 441,442,443,…, 421,422,423,… 411 ……
Sampling points 51 …… The maximum matching score in the first stage 52 …… Candidate point area in the second stage 521,522,523,… 52c,… 52n …… Candidate points.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】対象入力画像とテンプレート画像とのマッ
チングを複数段階に分けて行ない、しかも、各段階毎
に、テンプレート画像の大きさ、サンプリングレート、
及び候補点領域を次第に小さくしていく階層化構造的テ
ンプレート・マッチング方法において、 全段階数をNとし、第1段階から第(N−1)段階まで
の各段階を第M段階と表した場合に、 第1段階では、対象入力画像中の任意の候補点領域内に
おけるサンプリングレート2N−1により定まる各位置
毎に対象入力画像とテンプレート画像とのマッチングを
行なうと共に、そのときの一致度が最大である位置を第
2段階でのマッチングの基準位置として指定し、 第2段階から第(N−1)段階までの各段階では、前段
階で指定された基準位置を中心として±2N−M+1
素の正方形領域内を候補点領域とし、この領域内でサン
プリングレート2N−Mにより定まる各位置毎にマッチ
ングを行うと共に、そのときの一致度が最大である位置
を次段階でのマッチングの基準位置として指定し、 第N段階では、第(N−1)段階で指定された基準位置
を中心として±2画素の正方形領域内の全ての位置でマ
ッチングを行ない、そのときの一致度が最大となる位置
を真の一致点と判別する、 ことを特徴とする階層化構造的テンプレート・マッチン
グ方法。
1. The matching between a target input image and a template image is performed in a plurality of stages, and the size of the template image, the sampling rate,
In the hierarchical structural template matching method in which the candidate point area is gradually reduced, the total number of steps is N, and each step from the first step to the (N-1) th step is referred to as the Mth step. In the first step, the target input image and the template image are matched at each position determined by the sampling rate 2 N−1 in an arbitrary candidate point region in the target input image, and the matching degree at that time is determined. The maximum position is designated as the reference position for matching in the second stage, and in each stage from the second stage to the (N−1) th stage, ± 2 N− with the reference position designated in the previous stage as the center. the M + 1 pixel square region and the candidate point area, performs matching for each position determined by the sampling rate 2 N-M in this region, position coincidence degree at that time is the maximum Is designated as a reference position for matching in the next stage, and in the Nth stage, matching is performed at all positions within a square area of ± 2 pixels centered on the reference position designated in the (N-1) th stage, A hierarchical structured template matching method characterized in that the position at which the degree of matching at that time is maximum is determined as a true matching point.
JP62044780A 1987-02-27 1987-02-27 Hierarchical structured template matching method Expired - Fee Related JPH0664614B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62044780A JPH0664614B2 (en) 1987-02-27 1987-02-27 Hierarchical structured template matching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62044780A JPH0664614B2 (en) 1987-02-27 1987-02-27 Hierarchical structured template matching method

Publications (2)

Publication Number Publication Date
JPS63211474A JPS63211474A (en) 1988-09-02
JPH0664614B2 true JPH0664614B2 (en) 1994-08-22

Family

ID=12700922

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62044780A Expired - Fee Related JPH0664614B2 (en) 1987-02-27 1987-02-27 Hierarchical structured template matching method

Country Status (1)

Country Link
JP (1) JPH0664614B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02159682A (en) * 1988-12-13 1990-06-19 Yaskawa Electric Mfg Co Ltd Template matching method
JP4312143B2 (en) 2004-10-29 2009-08-12 富士通株式会社 Rule discovery program, rule discovery method and rule discovery device
KR20070118155A (en) * 2005-06-30 2007-12-13 올림푸스 가부시키가이샤 Search system and search method
JPWO2007004520A1 (en) * 2005-06-30 2009-01-29 オリンパス株式会社 Search system and search method
US8019164B2 (en) 2007-01-29 2011-09-13 Hitachi High-Technologies Corporation Apparatus, method and program product for matching with a template
JP4982213B2 (en) 2007-03-12 2012-07-25 株式会社日立ハイテクノロジーズ Defect inspection apparatus and defect inspection method
JP4966893B2 (en) 2008-03-13 2012-07-04 株式会社日立ハイテクノロジーズ Matching degree calculation device and method, program
JP5308766B2 (en) * 2008-10-06 2013-10-09 株式会社日立ハイテクノロジーズ PATTERN SEARCH CONDITION DETERMINING METHOD AND PATTERN SEARCH CONDITION SETTING DEVICE

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59226981A (en) * 1983-06-08 1984-12-20 Fujitsu Ltd Method and device for pattern matching
JPS61175783A (en) * 1985-01-29 1986-08-07 Mitsubishi Electric Corp Image processing device

Also Published As

Publication number Publication date
JPS63211474A (en) 1988-09-02

Similar Documents

Publication Publication Date Title
US4091394A (en) Pattern position detecting system
JPS59157505A (en) Pattern inspecting device
JPH08185521A (en) Mobile object counter
JPH0664614B2 (en) Hierarchical structured template matching method
JPH06325162A (en) Image processor
JPH0962838A (en) High-speed pattern matching method
JP3627249B2 (en) Image processing device
JPH0634233B2 (en) Hierarchical structural template matching method
JPH09245166A (en) Pattern matching device
JPH063541B2 (en) Pattern inspection equipment
JP2002198406A (en) Appearance inspection method
JP2959017B2 (en) Circular image discrimination method
JPH0935058A (en) Image recognizing method
JPS62202292A (en) Pattern matching method
JPH0410074A (en) Picture pattern inclination detecting method
JP2613905B2 (en) Image coordinate transformation method
JP2002230564A (en) Outline extraction apparatus, method and outline extraction program
JP2646577B2 (en) Image information creation device
JPH05113315A (en) Center position detection method for circular image data
JP2966448B2 (en) Image processing device
JPH064670A (en) Pattern matching device for gradation picture
JPS6285884A (en) Image discriminator
JPH0214752B2 (en)
JPH06337939A (en) Method and device for identifying picture
JPH0290374A (en) Positioning device and image processing LSI circuit

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees