JPS6246387A - Method of pattern matching - Google Patents

Method of pattern matching

Info

Publication number
JPS6246387A
JPS6246387A JP18521385A JP18521385A JPS6246387A JP S6246387 A JPS6246387 A JP S6246387A JP 18521385 A JP18521385 A JP 18521385A JP 18521385 A JP18521385 A JP 18521385A JP S6246387 A JPS6246387 A JP S6246387A
Authority
JP
Japan
Prior art keywords
pattern
matching
image pattern
area
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP18521385A
Other languages
Japanese (ja)
Other versions
JPH0514945B2 (en
Inventor
Masamichi Morimoto
正通 森本
Kazumasa Okumura
一正 奥村
Yasuo Oda
康雄 小田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP18521385A priority Critical patent/JPS6246387A/en
Publication of JPS6246387A publication Critical patent/JPS6246387A/en
Publication of JPH0514945B2 publication Critical patent/JPH0514945B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PURPOSE:To reduce collation processing at an enormous number of collation reference points and to speed up pattern matching process by calculating area of an image pattern included in the window frame of a standard pattern. CONSTITUTION:The case where a black cruciform pattern 72 represented by '0' exists in a white background area 71 represented by '1' and the case where a white cruciform pattern 74 exists in a black background area 73 are shown in the figure. In either case, the area of the image pattern included in the window frame of a standard pattern at each collation reference point is calculated before collation process. When the value of the area is smaller than a smaller reference value out of two predetermined reference values or larger than a larger reference value, the collation process is not made. In this way, the area in which collation reference points that require collation process can be narrowed from the whole screen to a small area 75 near the outline of the cruciform pattern, and thus, the pattern matching process can be speeded up.

Description

【発明の詳細な説明】 □ 産業上の利用分野 この発明は、たとえa、IC部品を回路基板に搭載する
ときに必要となる、撮像装置から得られ      1
6□/< p −7やえ4ニオ、工、−< p −7゜
ヶヨ   1□ を高速に検出する、2次元位置検出方法に使用す   
   1□ るパターンマツチング方法に関するものである。   
   □従来の技術 ”IF、O−’ i −y ? −/ f y fK 
L −−tB −。
[Detailed Description of the Invention] □ Industrial Application Field This invention can be obtained from, for example, an imaging device that is necessary when mounting IC components on a circuit board.
6 □ / < p -7 4 ni, k, - < p -7゜ 1 □ Used in two-dimensional position detection method
The present invention relates to a pattern matching method.
□Conventional technology “IF, O-' i-y?-/f y fK
L--tB-.

を大別すると、                  
    11 撮像装置から得た画像パターン1フレー
ム分を半導体メモリなどの画像パターン記憶装置に格納
した後、標準パターンとの照合処理を行う方法。
Broadly divided,
11 A method in which one frame of an image pattern obtained from an imaging device is stored in an image pattern storage device such as a semiconductor memory, and then compared with a standard pattern.

と、 2 撮像装置が走査している位置の座標を発生する装置
と、標準パターンとのマツチングに必要な最小限度の容
量を持った、半導体メモリなどの画像パターン記憶装置
によって、標準パターンとの照合処理を画像パターンを
取り込みながら行う方法。
2. Matching with the standard pattern using a device that generates the coordinates of the position being scanned by the imaging device and an image pattern storage device such as a semiconductor memory that has the minimum capacity necessary for matching with the standard pattern. A method that performs processing while importing image patterns.

の2つに分類できる。It can be classified into two types.

そこでこれら2つのパターンマツチング方法について、
処理速度・処理の拡張性・コストの3項目について検討
してみる。
Therefore, regarding these two pattern matching methods,
Let's consider three items: processing speed, processing scalability, and cost.

まず処理速度であるが、第1の方法は画像パターン1フ
レーム分を記憶装置に取り込んだ後で照合処理を行うた
め、一般的に処理時間を要しリアルタイム処理には向い
ていない。画像パターン1フレーム分を記憶装置に取り
込むのに要する時間をTi、記憶装置に取シ込まれた1
フレ一ム分の画像パターンと標準パターンとの照合処理
に要する時間音Tpとすると、第1の方法によるパター
ンマツチングに要する時間T工、ば、TiとTpの和に
よって(1)式の T  =7・+T    ・・・・・・・・・・・・・
・・・・・・・・・・・〔1)ml     1   
 p ように表わされる。第2の方法は、画像パターン全敗り
込みながら、画像パターンを取り込−むのに要する時間
で、照合処理を行うため、処理時間は短くリアルタイム
処理に向いている。第2の方法によるパターンマツチン
グに要する時間”m2は、Tiに等しく(巧式のように
表わされる。
First, regarding the processing speed, the first method performs the matching process after capturing one frame of the image pattern into the storage device, which generally requires processing time and is not suitable for real-time processing. The time required to import one frame of the image pattern into the storage device is Ti, and the amount of time taken into the storage device is 1.
Let Tp be the time required to match the image pattern for one frame with the standard pattern, then the time T required for pattern matching by the first method is calculated by the sum of Ti and Tp. =7・+T・・・・・・・・・・・・・・・
・・・・・・・・・・・・[1) ml 1
It is expressed as p. The second method performs the matching process in the time required to capture the image pattern while all the image patterns are lost, so the processing time is short and suitable for real-time processing. The time "m2" required for pattern matching by the second method is equal to Ti (expressed as follows).

Tm2=Ti     ・・・・・・・・・・・・・・
・・・・・・・・・・(2)次に処理の拡張性について
述べる。第1の方法は撮像装置より得た画像パターンを
記憶装置に保       ′持しているため、標準パ
ターンとの照合処理の前処理であるフィルタリング等の
処理において、オペレータの重みづけを自由に設定した
り、照合処理の終了後、その結果によって画像パターン
の特定領域をもう一度取り出して確認処理を施すといっ
たことが選択的にできる。また照合処理を行う際にも、
照合の基準となる画像パターンと標準パターンの位置合
せ点(以下照合基準点と呼ぶ)を、撮像装置の走査する
方向と直角の方向に走査させることも可能である。第2
の方法においてもフィルタリング等の前処理や照合処理
後の確認処理は可能ではあるが、前処理に関しては固定
でフィルタリング時のオペレータの重みなどを容易に変
更することはできないし、また照合処理後の確認処理も
照合結果を得た同一画面に対して行うことはできない。
Tm2=Ti・・・・・・・・・・・・・・・
(2) Next, we will discuss the extensibility of processing. In the first method, the image pattern obtained from the imaging device is stored in the storage device, so the operator can freely set the weighting in processing such as filtering, which is preprocessing for matching with the standard pattern. Alternatively, after the matching process is completed, it is possible to selectively extract a specific area of the image pattern again and perform the confirmation process based on the result. Also, when performing verification processing,
It is also possible to scan the alignment point between the image pattern and the standard pattern (hereinafter referred to as a matching reference point), which serves as a reference for matching, in a direction perpendicular to the scanning direction of the imaging device. Second
Although it is possible to perform pre-processing such as filtering and confirmation processing after matching processing in the above method, the pre-processing is fixed and operator weights during filtering cannot be easily changed, and the Confirmation processing cannot be performed on the same screen where the verification results are obtained.

最後にこれら2つの方法によってパターンマツチング装
置を実現した時の価格について述べる。
Finally, we will discuss the cost of realizing a pattern matching device using these two methods.

第1の方法は画像パターンを1フレ一ム分記憶するため
に、第2の方法に比べて半導体ICメモリ等の記憶素子
を多く必要とし、第2の方法ではリアルタイムで送られ
てくる画像パターンを標準パターンと照合処理するため
、第1の方法に比べて論理ICを多く必要とする。従来
、半導体ICメモリが高価であり、第1の方法を安価に
実現することは難しかったが、近年半導体ICメモリの
集積度が急速に高まり、単位記憶容量あたシの価格は低
下して、第2の方法を実現するための論理ICの価格よ
シも安価になってきている。したがって       
二現在では、第1の方法を採用した方が、安価にパター
〜−・チング装置を実現できる。          
  1上記の2つのパターンマツチング方法のうち、 
      1第1の方法はリモートセンシングの分野
で、第2の方法はIC部品の組立ての分野で広く用いら
れ       ン。
The first method requires more storage elements such as semiconductor IC memory than the second method in order to store the image pattern for one frame. This method requires more logic ICs than the first method because it compares the data with a standard pattern. In the past, semiconductor IC memories were expensive and it was difficult to realize the first method at a low cost, but in recent years the degree of integration of semiconductor IC memories has increased rapidly, and the price per unit storage capacity has decreased. The price of logic ICs for realizing the second method is also becoming cheaper. therefore
Currently, it is possible to realize a putting device at a lower cost by adopting the first method.
1 Among the above two pattern matching methods,
1 The first method is widely used in the field of remote sensing, and the second method is widely used in the field of IC component assembly.

てきている。また第1の方法では高速化を図るために、
画像パターン上に数画素おきに照合基準点Kl<Glr
>I、−=?tfJ’lf、f’kffl、−=、 &
に−ttLI;    j。
It's coming. In addition, in the first method, in order to increase the speed,
Matching reference points Kl<Glr are set every few pixels on the image pattern.
>I, -=? tfJ'lf, f'kffl, -=, &
ni-ttLI; j.

の照合結果より得られる一致度が高い照合基準点から、
探索手法を用いた詳しい照合によって認識      
 1点を捜すと”う階1的/: i  7 ? −) 
f 7 f方法7“      1採用されることが多
い0                  11゜ 発明が解決しようとする問題点           
   1本発明は、上記の第1の方法によって、2次元
の位置検出tVアルタイムで行うためのパターンマツチ
ング方法に関するものである。高速処理に不向きな第1
の方法をあえて採用したのは、上述したようにパターン
マツチング処理の自由度が高ぐ柔軟な処理ができること
と、第2の方法より安価に実現できることによる。また
、本発明は、上述した粗い照合と詳しい照合による階層
的パターンマツチング方法という高速処理手法を取り入
れることを前提としている。
From the matching reference points with a high degree of matching obtained from the matching results,
Recognition through detailed matching using search methods
If you search for one point, you'll get ``1 point/: i 7?-)
f 7 f method 7 “ 1 Often adopted 0 11゜Problem that the invention seeks to solve
1. The present invention relates to a pattern matching method for performing two-dimensional position detection tV real time using the first method described above. The first method is unsuitable for high-speed processing.
The reason why this method was intentionally adopted is because, as mentioned above, the pattern matching process has a high degree of freedom and can be performed flexibly, and it can be realized at a lower cost than the second method. Further, the present invention is based on the premise of incorporating a high-speed processing method called the hierarchical pattern matching method using the above-mentioned coarse matching and detailed matching.

しかしながら上記のような構成では、たとえば、IC部
品を回路基準に搭載するときに要求される処理時間内で
、IC部品の位置検出を行うことは難しい。その理由は
、画像パターン上に数画素おきに照合基準点を粗く設け
たとしても、こ扛らの照合基準点における照合処理だけ
で画像数9込み時間Tiの数倍の処理時間を要するから
である。
However, with the above configuration, it is difficult to detect the position of the IC component within the processing time required when mounting the IC component on a circuit reference, for example. The reason for this is that even if matching reference points are set roughly every few pixels on the image pattern, matching processing at these matching reference points alone requires several times the processing time Ti including the number of images. be.

本発明は上記問題点に鑑み、画像パターン上に粗く設け
られた照合基準点における画像パターンと標準パターン
との照合に先立って、標準パターンの窓枠内に含まれる
画像パターンの各画素に、おける輝度の総和を算出し、
この算出された値によって画1象パターンと標準パター
ンの照合処理を行うかどうか判定することによって、処
理の高速化を図るパターンマツチング方法を提供するも
のである。
In view of the above-mentioned problems, the present invention has been devised so that, prior to matching an image pattern with a standard pattern at matching reference points roughly provided on the image pattern, each pixel of the image pattern included within the window frame of the standard pattern is Calculate the sum of brightness,
The present invention provides a pattern matching method that speeds up processing by determining whether or not to perform matching processing between an image pattern and a standard pattern based on the calculated value.

問題点を解決するための手段 本発明は上記問題点全解決するために、撮像手段より得
られる映像信号をデジタル化して、各画素に対応する輝
度という数値情報で得られ−た画像パターンを記憶手段
に保持しておき、あらかじめ上記画像パターンと同じ方
法で記憶手段に保持されている標準パターンと画素ごと
に照合を行って、一致度が極大となる位置を求めるパタ
ーンマツチング処理において、上記画像パターンと上記
標準パターンの画素ごとの照合を行う前に、上記標準パ
ターンの窓枠内に含まれる上記画像パターンの各画素に
対する輝度の総和を算出し、上記輝度の総和が、あらか
じめ与えられている2つの基準値のうち、小さい方の基
準値よりも小さいか、あるいは、大きい方の基準値よシ
も大きい場合には、上記画像パターンと上記標準パター
ンの画素ごとの照合を行わず、上記輝度の総和が、上記
率さい方の基準値以上かつ、上記大きい方の基準値以下
である場合にのみ、上記画像パターンと上記標準パター
ンの画素ごとの照合を行うようにしたものである。
Means for Solving the Problems In order to solve all of the above problems, the present invention digitizes the video signal obtained from the imaging means and stores the image pattern obtained as numerical information of the brightness corresponding to each pixel. In a pattern matching process, the image pattern is stored in a storage device and compared pixel by pixel with a standard pattern stored in the storage device using the same method as the image pattern, and the position where the degree of matching is maximized is determined. Before performing pixel-by-pixel matching between the pattern and the standard pattern, calculate the sum of brightness for each pixel of the image pattern included within the window frame of the standard pattern, and calculate the sum of brightness for each pixel of the image pattern included in the window frame of the standard pattern, and calculate the sum of brightness for each pixel of the image pattern included in the window frame of the standard pattern. If the smaller one of the two reference values is smaller, or if the larger one is also larger, the above image pattern and the standard pattern are not compared pixel by pixel, and the above luminance is The image pattern and the standard pattern are compared pixel by pixel only when the total sum is greater than or equal to the lower reference value and less than or equal to the larger reference value.

作   用 まず簡略化のために画1象パターンと標準パターンの輝
度値は0″か1″の2値とし、また標準パターンは画像
パターン中の特徴的な部分を取り出したものであるから
、標準パターン中では”0”と1″がある一定以上の割
合で混在しているものと考える。以上の仮定は、本発明
のパターンマツチング方法による照合処理の高速化手法
を述べる上で、何ら一般性を失うものではない。
Function First, for the sake of simplicity, the brightness values of the image pattern and the standard pattern are assumed to be binary values of 0'' or 1'', and since the standard pattern is a characteristic part extracted from the image pattern, the standard pattern is It is assumed that "0" and "1" are mixed in a pattern at a certain rate or more. It doesn't mean you lose your sexuality.

また、本発明の特徴である、標準パターンの窓枠内に含
まれる画像パターンの画素ごとの輝度の総和の算出は、
上記の仮定のように画像パターンが2値の場合には、画
像パターン中に含まれる“1″の数を数えていることに
ほかならず、すなわちこれは標準パターンの窓枠内に含
まれる画像パターンの“1”の領域の面積を算出するこ
とに等しい。
In addition, the calculation of the sum of brightness for each pixel of the image pattern included within the window frame of the standard pattern, which is a feature of the present invention, is carried out by
If the image pattern is binary as in the above assumption, it is nothing but counting the number of "1"s included in the image pattern. In other words, this is the image pattern included within the window frame of the standard pattern. This is equivalent to calculating the area of the “1” region of .

そこで、以後標準パターンの窓枠内に含まれる画像パタ
ーンの画素ごとの輝度の総和の算出は、面積計算と呼″
と′す6・                。
Therefore, from now on, the calculation of the sum of brightness for each pixel of the image pattern included within the window frame of the standard pattern will be referred to as area calculation.
6.

以上の仮定に基づいて、この技術的手段による作用を図
面を参照しながら説明する。
Based on the above assumptions, the operation of this technical means will be explained with reference to the drawings.

第2図は、MxMの大きさを持った標準パターン22と
、NxNの大きさを持った画像パターン      1
23、画像パターン22上にn画素おきに設けられた照
合基準点24を示している。画像パターン23上に存在
する照合基準点24の総数は、標準パターン2°2の大
きさを考慮して次の(3)式で与えられる。記号Ca]
は、aを越えない最大の整数を表わしている。
Figure 2 shows a standard pattern 22 with a size of MxM and an image pattern 1 with a size of NxN.
23 shows matching reference points 24 provided every n pixels on the image pattern 22. The total number of matching reference points 24 existing on the image pattern 23 is given by the following equation (3) in consideration of the size of the standard pattern 2°2. Symbol Ca]
represents the largest integer not exceeding a.

N−Ad+1 ((ニー〕+1)2 ・・・・・・・・・・・・・・・
・・・(3)この照合基準点24の総数は、たとえば、
N=512゜M=16.n=4とすれば、約15,60
0もの膨大な値となる。第2図に示すようにこれらの照
会基準点の中には、標準パターンの窓枠が完全に画像パ
ターンの”1″の領域中に含まれるような位置にある照
合基準点25や、画像パターンの”0″領域中に含まれ
−るような位置にある照合基準点26が多数存在してい
る。照合基準点25における画像ハターン23と標準パ
ターン22の照合処理は、標準パターン22に含まれる
”1″の領域の面積計算処理であり、照合基準点26に
おける照合処理は、標準パターン22に含まれる”0″
の領域の面積計算処理である。照合処理は通常、0画像
パターンを記憶手段から読み出す、■読み出した画像パ
ターンと標準パターンの画素ごとの論理演算を行って一
致度を算出する、の2つの過程によって実行されるが、
標準パターンの大きさによってこれら■、■の処理は何
回かに分割して行われるので、この場合さらに、■その
結果得られた一致度を累積加算する、が加えられた3つ
の過程によって実行される。ところが上記の場合のよう
な、照合基準点24.25における照合処理では、■の
論理演算が全く意味をなさない無駄な処理になっている
。照合処理が意味を持つような照合基準点においては、
標準パターンの窓枠内に含まれる10″と”1″が混在
する割合は、最初に仮定した標準パターン自身の”0″
と“1″の混在する割合にある程度近くなっているはず
だからであるそこで本発明では画像パターン上に粗く設
けられた照合基準点において、上記の■の処理を省いた
■、■の処理による面積計算をまず行い、その結果得ら
れた面積が、あらかじめ与えられている2つの基準値の
うち、小さい方の基準値よりも小さいか、あるいは大き
い方の基準値よりも大きい場合には、照合処理は行わず
に次の照合基準点に移動し、上記面積が、あらかじめ与
えられている2つの基準値のうち、小さい方の基準値以
上、かつ大きい方の基準値以下である場合に限ってその
照合基準点において照合処理を行うことにした。また、
面積計算はそもそも本発明の最終目標である2次元パタ
ーンの位置検出に密接に関係しているものでないので、
厳密に行ってもその効果は充分反映されない。そこで本
発明では、第3図に示したように標準パターン31の部
分領域32だけの面積計算全行うことにした。しかし、
標準パターン32の面積計算時における窓枠の間引きの
程度や、また、画像パターン上に設ける照合基準点の間
隔によっては、画像パターンの面積に関する情報が正し
く得られないことがある。そこで、これらの値を設定す
る際には、安全率を充分に考えて設定しなければならな
い。また、面積計算時に判定に用いる2つの基準値が表
わすo″と“1″の混在の割合は、最初に仮定した標準
パターン中での”0″と“1″が混在する割合よりも充
分低く設定しておいて、照合基準点を数画素ごとに設け
たことと、標準パターンの窓枠内を間引いたことによっ
て生じる面積時の誤差に対応できるようにしておく。
N-Ad+1 ((knee)+1)2 ・・・・・・・・・・・・・・・
(3) The total number of reference points 24 is, for example,
N=512°M=16. If n=4, about 15,60
It becomes a huge value of 0. As shown in FIG. 2, these reference points include a matching reference point 25 located at a position such that the window frame of the standard pattern is completely included in the area "1" of the image pattern, and a reference point 25 of the image pattern. There are a large number of matching reference points 26 located at positions that are included in the "0" region of . The matching process between the image pattern 23 and the standard pattern 22 at the matching reference point 25 is a process of calculating the area of the "1" area included in the standard pattern 22, and the matching process at the matching reference point 26 is a process for calculating the area of "1" included in the standard pattern 22. "0"
This is the area calculation process for the area. The matching process is usually performed by two processes: reading out the 0 image pattern from the storage means, and calculating the degree of matching by performing logical operations on each pixel of the read image pattern and the standard pattern.
Depending on the size of the standard pattern, these steps ① and ② are divided into several steps, so in this case, ③ cumulatively adding the matching degrees obtained as a result is added. be done. However, in the matching process at the matching reference points 24 and 25, as in the above case, the logical operation (2) is completely meaningless and wasteful processing. At matching reference points where matching processing has meaning,
The proportion of 10" and "1" mixed within the window frame of the standard pattern is the initially assumed "0" of the standard pattern itself.
Therefore, in the present invention, at the matching reference points roughly set on the image pattern, the area obtained by the processing of Calculation is performed first, and if the area obtained as a result is smaller than the smaller of the two pre-given reference values or larger than the larger of the two, the matching process is performed. The area is moved to the next reference point without performing this, and only when the area is greater than or equal to the smaller of the two pre-given reference values and less than or equal to the larger of the two pre-given reference values, the area is We decided to perform the matching process at the matching reference point. Also,
Area calculation is not closely related to the position detection of two-dimensional patterns, which is the ultimate goal of the present invention, so
Even if it is done strictly, the effect will not be fully reflected. Therefore, in the present invention, as shown in FIG. 3, we decided to perform all area calculations only for the partial region 32 of the standard pattern 31. but,
Depending on the degree of thinning of the window frame when calculating the area of the standard pattern 32 and the spacing between matching reference points provided on the image pattern, information regarding the area of the image pattern may not be obtained correctly. Therefore, when setting these values, the safety factor must be taken into consideration. In addition, the proportion of mixed "o" and "1" expressed by the two reference values used for judgment when calculating the area is sufficiently lower than the proportion of mixed "0" and "1" in the initially assumed standard pattern. This is set in advance so as to be able to deal with errors in area caused by providing matching reference points every few pixels and by thinning out the area within the window frame of the standard pattern.

以上のようにして、画像パターン上に数画素おきに設け
られた膨大な数の照合基準点における照合処理に必要な
時間を大幅に削減することができる。
As described above, the time required for matching processing at a huge number of matching reference points provided every few pixels on an image pattern can be significantly reduced.

実施例 以下本発明の一実施例のパターンマツチング方法につい
て、図面を参照しながら説明する。
EXAMPLE Hereinafter, a pattern matching method according to an example of the present invention will be described with reference to the drawings.

第1図は本発明の一実施例であるパターンマツチング方
法のブロック図を示すものである。第1図において、テ
レビカメラ等の撮像手段1より得た映像信号2は、2値
化手段3によって2値化され画像パターン4となって画
像パターン記憶手段5に格納される。画像パターン記憶
手段5は、画像パターン制御手段6によって制御されて
おシ、画1象パターンの入出力は、中央処理手段7から
の命令8によって行われる。画像パターン制御手段6に
は、画像パターン記憶手段中の特定の画像パターンを読
み出すための、画像パターンのX座標、y座標記憶手段
などによって構成されている。一方、標準ハターン9は
、パターンマツチング処理に先立って、教示時に画像パ
ターン記憶手段5中よシ切り出され、標準パターン記憶
手段10中に保持される。標準パターン記憶手段10は
、標準パターン制御手段11によって制御されておシ、
標準パターンの入出力は、中央処理手段7からの命令1
2によって行われる。中央処理手段7は、マタ、画像パ
ターンと標準パターンの照合処理を行う際に、論理演算
を行うデータがそれぞれ画像パターン記憶手段5と標準
パターン記憶1手段1゜から読み出され、論理演算手段
13に入力されるように、画像パターン制御手段6に対
して命令8を、標準パターン制御手段1oに対して命令
12を送信する役割や、第1図の各ブロックを制御する
役割を持つ。論理演算手段13に入力された2つのパタ
ーンデータは、そこで排他的論理和の否定がとられ、2
つのパターンデータで対応する画素が一致する場合にピ
ットが11″となる。第4図に示すように標準パターン
41がAxB画素から成る時には、この論理演算はAビ
ットずつ行われ、論理演算の結果得られたAビットのデ
ータ14がピットカウント手段15に入力され、そこで
Aピット中で一致した画素数である1jの数がカウント
され、その結果得られたデータAビット中の一′&度1
6が累積加算手段17(で入力される。
FIG. 1 shows a block diagram of a pattern matching method according to an embodiment of the present invention. In FIG. 1, a video signal 2 obtained from an imaging means 1 such as a television camera is binarized by a binarization means 3 to become an image pattern 4 and stored in an image pattern storage means 5. The image pattern storage means 5 is controlled by an image pattern control means 6, and the input/output of the image pattern is performed by commands 8 from the central processing means 7. The image pattern control means 6 includes image pattern X-coordinate and y-coordinate storage means for reading out a specific image pattern from the image pattern storage means. On the other hand, the standard pattern 9 is cut out in the image pattern storage means 5 at the time of teaching prior to the pattern matching process, and is held in the standard pattern storage means 10. The standard pattern storage means 10 is controlled by the standard pattern control means 11.
The input/output of the standard pattern is performed by command 1 from the central processing means 7.
2. When the central processing means 7 performs the matching process between the image pattern and the standard pattern, the data for performing the logical operation is read out from the image pattern storage means 5 and the standard pattern storage means 1, respectively, and the data is read out from the logical operation means 13. It has the role of transmitting the command 8 to the image pattern control means 6 and the command 12 to the standard pattern control means 1o so as to be input to the image pattern control means 6, and the role of controlling each block in FIG. The two pattern data inputted to the logic operation means 13 are subjected to exclusive OR negation, and the two pattern data are
When the corresponding pixels in two pattern data match, the pit becomes 11". When the standard pattern 41 consists of A x B pixels as shown in FIG. The obtained A-bit data 14 is input to the pit counting means 15, where the number 1j, which is the number of matching pixels in the A-pit, is counted, and the resultant data 1'& degree 1 in the A-bit is counted.
6 is input by the cumulative addition means 17.

AxB画素から成る標準パターン41に対しては、以上
の処理をB回縁シ返すことによって標準パターン全域に
対する処理が完了する。画像パターン       L
:と標準パターンの処合結果である一致度18は中  
     1゜)□ 央処理手段7で判定され一致度が高い場合にはそ   
    II) の時の照合基準点の座標値が照合結果記憶手段19  
    し[′ に格納される。画像パターンの面積計算は、画像1゜パ
ターンが画像パターン記憶手段5より読み出さ    
   1□わ、イ、□よ、3□fK□1,1カ、   
  llニド手段15に、Aビットの情報2oとして入
力さnることによってなされる。          
       6以上のように構成されたパターンマツ
チング方       1′i′ ′″′°“″′″tT@111″sQ>!#IE°12
.。
For the standard pattern 41 consisting of A×B pixels, the above processing is repeated for B cycles to complete the processing for the entire standard pattern. Image pattern L
The matching degree of 18, which is the processing result of : and the standard pattern, is medium.
1゜)□ If the degree of matching is high as determined by the central processing means 7, the
II) The coordinate values of the verification reference point at the time are stored in the verification result storage means 19.
and stored in [′. To calculate the area of the image pattern, the image 1° pattern is read out from the image pattern storage means 5.
1□I, I, □Yo, 3□fK□1,1ka,
This is done by inputting the A-bit information 2o to the input means 15.
Pattern matching method configured as above 1′i′ ′″′°“″′″tT@111″sQ>!#IE°12
.. .

用いてその動作を説明する。第6図は、大きさがAxB
□素アあ71.ヶ準tap−ys4g−t。え。基  
     し1゜ 単点52および画像パターン53(ただしパターンは図
示されていない)上に設けられた照合基準1゜ 点64を表わしている。照合処理の開始点を画像パター
ン53の左上端の照合基準点56とすると、標準パター
ン61の照合基準点5°2を画像パターン63の照合基
準点65に合わせて、まず標準バ゛フ゛ターン61の窓
枠内に含まれる画像パターン63の面積を計算する。こ
の時に面積計算を行うの底筒6図に示したAxB画素の
大きさを持つ標準パターンの窓枠61内の一部の領域6
2のみであシ、この図では画像パターンがAビットずつ
4回に分けて、第1図のピットカウント手段15に入力
され累積加算手段17によって面積が計算される。
The operation will be explained using In Figure 6, the size is AxB
□Bare A71. Kajun tap-ys4g-t. picture. base
It represents a 1° single point 52 and a matching reference 1° point 64 provided on an image pattern 53 (however, the pattern is not shown). Assuming that the starting point of the matching process is the matching reference point 56 at the upper left corner of the image pattern 53, first align the matching reference point 5°2 of the standard pattern 61 with the matching reference point 65 of the image pattern 63, and then The area of the image pattern 63 contained within the window frame is calculated. At this time, area calculation is performed on a part of the window frame 61 of the standard pattern with the size of A×B pixels shown in the bottom cylinder 6.
In this figure, the image pattern is divided into four times of A bit each and input to the pit counting means 15 in FIG. 1, and the area is calculated by the cumulative addition means 17.

そしてこの面積があらかじめ与えられた2つの基準値と
中央処理手段7において比較され、小さい方の基準値よ
りも小さいか、あるいは大きい方の基準値よりも大きい
場合には、第5図に示される次の照合基準点56に進ん
で再び面積計算を行うことになる。また算出した面積が
2つの基準値の小さい方の基準値以上かつ大きい方の基
準値以下の場合には、その照合基準点55において画像
パターン53と標準パターン61の照合を行って、その
結果得られた一致度を第1図の中央処理手段7にて判定
し、高い一致度が得られた場合には照合結果記憶手段1
9にその照合基準点の座標値を格納しておき、第6図の
照合基準点65における1理を終了して次の照合基準点
66での面積計算処理に移る。画像パターン63上での
照合基準点の移動の方法は、画面上を垂直方向に走査す
る場合には、基準点65から基準点66へとまず下方向
に移動し、最下基準点57までくれば隣の最上基準点6
8に移り、終点である基準点69まで上記の面積計算、
照合処理が行われる。
This area is then compared with two predetermined reference values in the central processing means 7, and if it is smaller than the smaller reference value or larger than the larger reference value, the area is compared with two predetermined reference values. The process proceeds to the next comparison reference point 56 and area calculation is performed again. If the calculated area is greater than or equal to the smaller of the two reference values and less than or equal to the larger of the two reference values, the image pattern 53 and the standard pattern 61 are compared at the matching reference point 55, and the result is obtained. The matching degree obtained is judged by the central processing means 7 in FIG. 1, and if a high matching degree is obtained, the matching result storage means 1
The coordinate values of the matching reference point 9 are stored in the matching reference point 65, and the first calculation at the matching reference point 65 in FIG. The method of moving the matching reference point on the image pattern 63 is that when scanning the screen vertically, it is first moved downward from the reference point 65 to the reference point 66, and then moved to the lowest reference point 57. Next highest reference point 6
Moving on to step 8, perform the above area calculation until the end point, reference point 69.
Verification processing is performed.

′″″″″″′1”;g ”)7’rLRV4−′41
°’nO”Jjhr(’1′’     i:、。
′″″″″″′1”;g ”)7'rLRV4-'41
°'nO”Jjhr('1'' i:,.

ターン53中に存在する照合基準点54のうち、認識点
の付近に存在していると思われる照合基準、aomii
”゛・M * (MoN***Ltl[19cl=+ 
    、、に格納されていることになる。そこで次に
、照合結果記憶手段19中に格納されている各座標にお
いて探索手法を用いた詳しい照合を行うことによって、
その照合基準点付近に存在する一致度が極大になる位置
を検出することができる。そして、検出された位置デー
タ21はこの位置検出装置を利用しているツインコント
ローラ等の送信される。
Among the matching reference points 54 existing in the turn 53, the matching reference that is thought to exist near the recognition point, aomii
”゛・M * (MoN****Ltl[19cl=+
, , will be stored in . Therefore, next, by performing detailed matching using a search method at each coordinate stored in the matching result storage means 19,
It is possible to detect a position near the matching reference point where the degree of matching is maximum. The detected position data 21 is then transmitted to a twin controller or the like that uses this position detection device.

以上のように本実施例によれば、標準パターンの窓、枠
に含まれる画1aパターンの面積を計算することによっ
て、膨大な数存在する照合基準点における照合処理を減
少させ、パターンマツチング処理を高速化することがで
きる。
As described above, according to this embodiment, by calculating the area of the image 1a pattern included in the window and frame of the standard pattern, the matching process at a huge number of matching reference points is reduced, and the pattern matching process is can be accelerated.

発明の効果 第7図は本発明の詳細な説明する図である。”1″によ
って表わされる白い背景領域71の中に、”0″によっ
て表わされる黒い十字パターン72が存在する場合と、
黒い背景領域73の中に、白い十字パターン74が存在
する場合が示されている。このいずれの場合においても
、照合処理に先だって各照合基準点における標準パター
ンの窓枠内に含まれる画像パターンの面積を計算し、こ
の面積の直があらかじめ定めた2つの基準値のうち、小
さい方の基準値よりも小さいか、あるいは大きい方の基
準値よりも大きい場合には、照合処理を行わないように
することによって、照合処理を行う必要がある照合基準
点が存在する領域を、画面全体から十字パターンの輪郭
部付近の小さな領域75に狭めることができ、パターン
マツチング処理を高速化することができる。
Effects of the Invention FIG. 7 is a diagram for explaining the present invention in detail. A case where a black cross pattern 72 represented by “0” exists in a white background area 71 represented by “1”;
A case is shown in which a white cross pattern 74 exists within a black background area 73. In either case, before the matching process, the area of the image pattern included within the window frame of the standard pattern at each matching reference point is calculated, and the value of this area is the smaller of two predetermined reference values. If the reference value is smaller than the reference value or larger than the larger reference value, the matching process will not be performed, thereby reducing the area where the matching reference point that needs matching processing exists to the entire screen. This can be narrowed down to a small area 75 near the outline of the cross pattern, and the pattern matching process can be sped up.

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

第1図は本発明の一実施例であるパターンマツチング方
法の構成を示すブロック図、第2図は標準パターンと画
像パターンの大きさおよび画像パターン上に存在する照
合基準点を示す図、第3図は標準パターンの窓枠内にお
ける面積計算の対象となる領域と示す図、第4図は標準
パターンの大きさを示す図、第5図は画像パターン上の
照合基準点に対する標準パターンの移動方法を示−す図
、第6図は標準パターンの窓枠内における面積計算の対
象となる領域を示す図、第7図は本発明の効果を示す図
である。 5・・・・・・画像パターン記憶手段、6・・・・・・
画像パターン制御手段、7・・・・・・中央処理手段、
10・・・・・・標準パターン記憶手段、11・・・・
・・標準パターン制御手段、13・・・・・・論理演算
手段、15・旧・・ビットカウント手段、17・・・・
・・累積加算手段、19・・・・・・照合結果記憶手段
、22・・・・・・標準パターン、23・・・・・・画
像パターン、24・・・・・・照合基準点、31・・・
・・・画1象パターン窓枠、32・・・・・・面積計算
対象領域、″S%1・・・・・・標準iJ−ン、51・
・・・・・標準パターン、53・・・・・・画像パター
ン、54・・・・・・照合基準点、61・・・・・・標
準パターン窓枠、62・・・・・・面積計算対象領域0 代理人の氏名 弁理士 中 尾 敏 男 ほか1名第1
図 第2図 第3図 第4図 味                   法的  寸
         h トNc’−
FIG. 1 is a block diagram showing the configuration of a pattern matching method that is an embodiment of the present invention, FIG. 2 is a diagram showing the sizes of a standard pattern and an image pattern, and matching reference points existing on the image pattern. Figure 3 shows the area within the window frame of the standard pattern that is subject to area calculation, Figure 4 shows the size of the standard pattern, and Figure 5 shows the movement of the standard pattern relative to the matching reference point on the image pattern. FIG. 6 is a diagram showing the method, FIG. 6 is a diagram showing the area to be calculated within the window frame of the standard pattern, and FIG. 7 is a diagram showing the effect of the present invention. 5... Image pattern storage means, 6...
Image pattern control means, 7...Central processing means,
10...Standard pattern storage means, 11...
...Standard pattern control means, 13...Logic operation means, 15.Old...Bit counting means, 17...
... Cumulative addition means, 19 ... Verification result storage means, 22 ... Standard pattern, 23 ... Image pattern, 24 ... Verification reference point, 31 ...
...Picture 1 elephant pattern window frame, 32... Area calculation target area, ``S%1...Standard iJ-n, 51.
...Standard pattern, 53 ... Image pattern, 54 ... Verification reference point, 61 ... Standard pattern window frame, 62 ... Area calculation Target area 0 Name of agent Patent attorney Toshio Nakao and 1 other person 1st
Figure 2 Figure 3 Figure 4 Legal dimensions h To Nc'-

Claims (2)

【特許請求の範囲】[Claims] (1)撮像手段より得られる映像信号をデジタル化して
、各画素に対応する輝度という数値情報で得られた画像
パターンを記憶手段に保持しておき、あらかじめ上記画
像パターンと同じ方法で記憶手段に保持されている標準
パターンと画素ごとに照合を行って、一致度が極大とな
る位置を求めるパターンマッチング処理において、上記
画像パターンと上記標準パターンの画素ごとの照合を行
う前に、上記標準パターンの窓枠内に含まれる上記画像
パターンの各画素に対する輝度の総和を算出し、上記輝
度の総和が、あらかじめ与えられている2つの基準値の
うち、小さい方の基準値よりも小さいか、あるいは、大
きい方の基準値よりも大きい場合には、上記画像パター
ンと上記標準パターンの画素ごとの照合を行わず、上記
輝度の総和が、上記小さい方の基準値以上かつ、上記大
きい方の基準値以下である場合にのみ、上記画像パター
ンと上記標準パターンの画素ごとの照合を行うことを特
徴とするパターンマッチング方法。
(1) The video signal obtained from the imaging means is digitized, and an image pattern obtained by numerical information of the brightness corresponding to each pixel is stored in the storage means, and the image pattern is stored in advance in the same way as the image pattern. In pattern matching processing, which compares each pixel with the stored standard pattern to find the position where the degree of matching is maximum, before performing pixel-by-pixel matching between the image pattern and the standard pattern, Calculate the sum of brightness for each pixel of the image pattern included within the window frame, and determine whether the sum of the brightness is smaller than the smaller of two predetermined reference values, or If it is larger than the larger reference value, the image pattern and the standard pattern are not compared pixel by pixel, and the sum of the luminances is greater than or equal to the smaller reference value and less than the larger reference value. A pattern matching method characterized by performing pixel-by-pixel matching between the image pattern and the standard pattern only if .
(2)標準パターンの窓枠内に含まれる上記画像パター
ンの各画素に対する輝度の総和の算出に際しては、上記
画像パターンと上記標準パターンの画素ごとの照合を行
って一致度を累積加算する手段をそのまま用いることを
特徴とする特許請求の範囲第1項記載のパターンマッチ
ング方法。
(2) When calculating the sum of brightness for each pixel of the image pattern included within the window frame of the standard pattern, use means for comparing each pixel of the image pattern and the standard pattern and cumulatively adding the degree of matching. The pattern matching method according to claim 1, which is used as is.
JP18521385A 1985-08-23 1985-08-23 Method of pattern matching Granted JPS6246387A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18521385A JPS6246387A (en) 1985-08-23 1985-08-23 Method of pattern matching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18521385A JPS6246387A (en) 1985-08-23 1985-08-23 Method of pattern matching

Publications (2)

Publication Number Publication Date
JPS6246387A true JPS6246387A (en) 1987-02-28
JPH0514945B2 JPH0514945B2 (en) 1993-02-26

Family

ID=16166850

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18521385A Granted JPS6246387A (en) 1985-08-23 1985-08-23 Method of pattern matching

Country Status (1)

Country Link
JP (1) JPS6246387A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05274440A (en) * 1992-03-25 1993-10-22 Matsumura Electron:Kk Deciding method by area and shape comparison of fingerprint recognizing and deciding device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05274440A (en) * 1992-03-25 1993-10-22 Matsumura Electron:Kk Deciding method by area and shape comparison of fingerprint recognizing and deciding device

Also Published As

Publication number Publication date
JPH0514945B2 (en) 1993-02-26

Similar Documents

Publication Publication Date Title
JP2813348B2 (en) Cell image extraction storage processing device and method
JPS6042990B2 (en) Pattern recognition method
JPS6246387A (en) Method of pattern matching
US5375194A (en) Method and apparatus for reducing distortion in a graphic pattern by a thinning process
JPH02125375A (en) Position detecting device
JPS5855549B2 (en) I&#39;m not sure what to do.
JPH0442710B2 (en)
JPH0442711B2 (en)
JPH0935058A (en) Image recognizing method
JP3371307B2 (en) Image processing apparatus and image processing method
JPS62202292A (en) Pattern matching method
KR960001751B1 (en) Image recognition system by binary image processing
JP2511953B2 (en) Image processing method and apparatus
JPS58154072A (en) Visual recognizing method
JPH03160576A (en) Method and device for recognizing picture
JPH0385681A (en) Picture processor
JPH07160826A (en) Character detector and character detecting method
JPH0854221A (en) Image recognition method
Yokoi et al. Advanced pellet recognition system for die bonder
JPH01180075A (en) Position measuring method for feature point corner for pattern recognition
JPS60140487A (en) Character feature extraction system
JPS59142677A (en) Picture processing device
JPS60140488A (en) Character feature extraction system
JPH01233578A (en) Generalized hough transformation circuit
JPS6244892A (en) Image processor