JP2002008028A - Pattern matching method and device therefor - Google Patents

Pattern matching method and device therefor

Info

Publication number
JP2002008028A
JP2002008028A JP2000191946A JP2000191946A JP2002008028A JP 2002008028 A JP2002008028 A JP 2002008028A JP 2000191946 A JP2000191946 A JP 2000191946A JP 2000191946 A JP2000191946 A JP 2000191946A JP 2002008028 A JP2002008028 A JP 2002008028A
Authority
JP
Japan
Prior art keywords
pattern
pattern matching
matching
data
search
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
JP2000191946A
Other languages
Japanese (ja)
Inventor
Takashi Anezaki
隆 姉崎
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 JP2000191946A priority Critical patent/JP2002008028A/en
Publication of JP2002008028A publication Critical patent/JP2002008028A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a pattern matching method and device therefor for performing a precise and high-speed processing at a low cost by an operation with a small number of points arranged on a template about only the partial feature shape conformed to a pattern to be recognized. SOLUTION: A rough search processing part 103 automatically generates initial optimum rough search template data having both data for feature shape pattern and prohibited feature shape pattern by an initial rough search template set for a specified pattern necessary for image recognition of information such as position of a subject from a taken image memory part 102. The data are then subjected to addition and reduction of necessary operation points by a rough search template optimization part 107 to form an optimum rough search template data. The rough search processing part performs a matching by use of the data to attain the purpose. Further, a comprehensive search processing part 123 further comprises a precise search processing part, and the image recognition can be performed with a data satisfying both rough and precise matchings.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、民生および産業用
の画像処理方法および装置、特に電子部品実装機や半導
体組立などの高速・高精度な位置決めが要求される視覚
認識装置などにおいて、対象物の位置などの必要な情報
を画像認識するために高速、高精度にパターンマッチン
グを行う方法および装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a consumer and industrial image processing method and apparatus, and more particularly, to a visual recognition apparatus or the like which requires high-speed and high-precision positioning such as an electronic component mounting machine or a semiconductor assembly. The present invention relates to a method and an apparatus for performing high-speed and high-precision pattern matching in order to recognize necessary information such as the position of an image.

【0002】[0002]

【従来の技術】パターンマッチングにおける従来技術の
1つに、テンプレートマッチング法がある。これは、該
当部分画像(テンプレート)のポインティングのみでテ
ンプレートデータを教示できる。しかし、精度確保が要
件の場合にテンプレートサイズが大きくなり、大規模な
画像演算ハードウエアが不可欠となる。
2. Description of the Related Art One of the conventional techniques in pattern matching is a template matching method. In this method, template data can be taught only by pointing the corresponding partial image (template). However, when accuracy is a requirement, the template size becomes large, and large-scale image calculation hardware is indispensable.

【0003】下記の式1はある演算点(座標)でのテン
プレートマッチング演算式を示す。
The following equation 1 shows a template matching operation equation at a certain operation point (coordinate).

【0004】[0004]

【数1】 式1におけるTは図5の左側に示したテンプレートで、
i・jはテンプレートT上の位置を示す。従って、T
(i,j)はテンプレートT上にi・jの位置の濃淡値
を示す。
(Equation 1) T in Equation 1 is a template shown on the left side of FIG.
i · j indicates a position on the template T. Therefore, T
(I, j) indicates the gray value at the position of i · j on the template T.

【0005】またGは図5の右側に示した対象画像で、
同様にx・yはある演算点の位置、i・jはある演算点
からテンプレートT上のオフセット位置を示す。従っ
て、G(x+j,y+j)は画像(x+i)・(y+
j)の位置の濃淡値を示す。
[0005] G is a target image shown on the right side of FIG.
Similarly, x and y indicate the position of a certain operation point, and i and j indicate the offset position on the template T from the certain operation point. Therefore, G (x + j, y + j) is the image (x + i) · (y +
The shading value at the position j) is shown.

【0006】また、Θは加算、乗算、エクスクルーシブ
・オア、正規化相関などのマッチング演算を総称して示
す。テンプレートマッチングは、通常、画像上の全点に
対し行う。このため、Θ演算をO(M・N・X・Y)の
回数で行う。ここで、M・Nはテンプレートサイズ、X
・Yは画像サイズである。精度確保のため大テンプレー
トとするとM・Nが大きくなる。50×50のテンプレ
ートで500×500の画像に対して演算量を概算すれ
ば、ハードウェアに要求される処理能力は約5000M
IPS(Million instructions Per Second)である。
現在、最速のマイクロプロセッサは約500MIPS
(概算値)程度であるため、専用ハードウェアが必須と
なる。
[0006] In addition, Θ generally indicates matching operations such as addition, multiplication, exclusive OR, and normalized correlation. The template matching is usually performed for all points on the image. Therefore, the Θ operation is performed by the number of O (MNXY) times. Here, M / N is the template size, X
Y is the image size. If a large template is used to ensure accuracy, M · N increases. If the amount of calculation is roughly calculated for a 500 × 500 image using a 50 × 50 template, the processing capacity required for the hardware is approximately 5000 M
IPS (Million instructions Per Second).
Currently, the fastest microprocessor is about 500 MIPS
(Approximate value), dedicated hardware is indispensable.

【0007】図6に、上記のような通常のテンプレート
マッチングの演算コストを改善した従来例を示してい
る。テンプレートTに設定される演算位置を間引いてO
(M・N)を減らす。また、画像G上の演算点を間引い
てO(X・Y)を減らす。間引き次第では、専用ハード
ウェアを使用せず、最速のマイクロプロセッサでのマッ
チング演算ができるようになる。
FIG. 6 shows a conventional example in which the operation cost of the ordinary template matching as described above is improved. O is calculated by thinning out the calculation positions set in the template T.
(MN) is reduced. Also, O (X · Y) is reduced by thinning out calculation points on the image G. Depending on the decimation, the matching operation with the fastest microprocessor can be performed without using dedicated hardware.

【0008】[0008]

【発明が解決しようとする課題】しかし、上記のような
間引き手法では、間引き演算点間の中央に実対象点があ
ったために正解を見落とす。あるいは、テンプレートT
の規則的な間引きにより、ユニークな特徴点を間引いて
しまい、誤認識回数が増加する。などの危険が発生しや
すい。
However, in the above-described thinning method, the correct answer is overlooked because the actual target point is located at the center between the thinning operation points. Alternatively, template T
Due to the regular thinning, unique feature points are thinned, and the number of erroneous recognition increases. Such dangers are likely to occur.

【0009】本発明の目的は、テンプレート上に認識対
象パターンに合った部分的な特徴形状についてだけ配置
された少ないポイントでの演算で、低コストに、高速か
つ高精度にパターンマッチング処理できるパターンマッ
チング方法およびその装置を提供することを目的とす
る。
SUMMARY OF THE INVENTION It is an object of the present invention to provide a low-cost, high-speed, and high-precision pattern matching process using a small number of points arranged only on a partial feature shape that matches a pattern to be recognized on a template. It is an object to provide a method and an apparatus thereof.

【0010】[0010]

【課題を解決するための手段】本発明のパターンマッチ
ング方法は、対象物を撮像した画像データにつき、対象
物の情報を画像認識するのに必要な特定の部分パターン
にて、8方向の空間一次微分を行い微分値の大きい点を
各一次微分プレーン上で1とした8bitのサーチテンプ
レートにより粗サーチパターンマッチングを行い、検出
された粗マッチングパターンにつき正解、不正解の評価
を行い、評価した正解パターンと不正解パターンとか
ら、正解パターンに含まれ不正解パターンに含まれない
特徴形状データと、不正解パターンに含まれ正解パター
ンに含まれない禁止特徴形状データとを抽出して、それ
らに正解、不正解パターンを検出するための検出情報の
過不足を補正する最適化処理をした特徴形状パターンお
よび禁止特徴形状パターンの位置データを持った最適粗
サーチテンプレートを設定し、この最適粗サーチテンプ
レート上の特徴形状パターンおよび禁止特徴形状パター
ンの各設定位置でのみ前記画像データとのマッチングを
演算をし、禁止特徴形状パターンとマッチングした画像
データのそれ以上の処理操作を排除しながら、特徴形状
パターンとマッチングした画像データを検出して対象物
の必要情報が画像認識されるようにすることを1つの特
徴としている。
According to the pattern matching method of the present invention, an image data obtained by capturing an object is subjected to spatial primary in eight directions by using a specific partial pattern necessary for image recognition of information on the object. Differentiation is performed, and a rough search pattern matching is performed using an 8-bit search template with a point having a large differential value set to 1 on each primary differentiation plane, and the detected rough matching pattern is evaluated for a correct answer and an incorrect answer. From the incorrect answer pattern, the feature shape data included in the correct answer pattern but not included in the incorrect answer pattern and the prohibited feature shape data included in the incorrect answer pattern and not included in the correct answer pattern are extracted, and the correct answer, Feature shape pattern and prohibited feature shape pattern that have been optimized to correct for excess or deficiency of detection information for detecting incorrect pattern The optimal rough search template having the position data of the selected feature is set, and the matching with the image data is calculated only at each set position of the feature shape pattern and the prohibited feature shape pattern on the optimal rough search template, and the prohibited feature shape is calculated. One of the features is to detect image data matched with a characteristic shape pattern so that necessary information of a target object is image-recognized while eliminating further processing operations of image data matched with a pattern.

【0011】これによれば、対象物を撮像した画像デー
タにつき、対象物の位置などの情報を画像認識するのに
必要な特定のパターンにつき設定したサーチテンプレー
トにより、予め設定した所定の演算箇所およびパターン
一致閾値に基づく粗サーチパターンマッチングを行うこ
とにより、粗マッチングパターンが、前記演算箇所およ
びパターン一致閾値を粗くした分だけ早期に得られる。
得られた粗マッチングパターンにはパターン一致閾値を
粗くされることにより正解パターンと不正解パターンが
含まれる。しかし、パターンの正解、不正解は人が容易
に評価できる。評価された正解、不正解パターンから、
正解パターンに含まれ不正解パターンに含まれない特徴
形状データと、不正解パターンに含まれ正解パターンに
含まれない禁止特徴形状データとを抽出することにより
演算データ数を間引くことができ、それらに正解、不正
解パターを検出するための検出情報の過不足を補正する
最適化処理を施すことにより、演算データ数が少ないが
正解パターンおよび不正解パターンを検出するには充分
な特徴形状パターンおよび禁止特徴形状パターンの位置
データを持った最適粗サーチテンプレートを設定するこ
とができる。従って、この最適粗サーチテンプレート上
の特徴形状パターンおよび禁止特徴形状パターンによる
少ない各設定位置でのみ前記画像データとのマッチング
演算をすることにより、禁止特徴パターンとマッチング
した画像データのそれ以上の操作を省きながら、特徴パ
ターンとのマッチング画像データを検出して対象物の必
要な情報を画像認識できるようにすることが、低コスト
で、しかも高速かつ高精度に達成される。
[0011] According to this, for the image data obtained by imaging the object, a predetermined calculation location and a predetermined calculation position are set in advance by a search template set for a specific pattern necessary for image recognition of information such as the position of the object. By performing the coarse search pattern matching based on the pattern matching threshold, a rough matching pattern can be obtained earlier by an amount corresponding to the roughening of the calculation location and the pattern matching threshold.
The obtained rough matching pattern includes a correct answer pattern and an incorrect answer pattern by roughening the pattern matching threshold. However, correct or incorrect patterns can be easily evaluated by humans. From the evaluated correct and incorrect answer patterns,
By extracting the feature shape data included in the correct answer pattern but not included in the incorrect answer pattern and the prohibited feature shape data included in the incorrect answer pattern and not included in the correct answer pattern, the number of operation data can be thinned out. By performing optimization processing to correct the excess or deficiency of detection information for detecting correct and incorrect patterns, the number of operation data is small, but enough feature shape patterns and prohibitions to detect correct and incorrect patterns It is possible to set an optimal coarse search template having the position data of the characteristic shape pattern. Therefore, by performing a matching operation with the image data only at a small number of setting positions based on the feature shape pattern and the prohibited feature shape pattern on the optimal rough search template, it is possible to further operate the image data matched with the prohibited feature pattern. In spite of the omission, the detection of the matching image data with the feature pattern and the recognition of the necessary information of the target image can be achieved at low cost, at high speed and with high accuracy.

【0012】最適化処理は、最適粗サーチテンプレート
での特徴形状パターンマッチングにおいて正解、不正解
パターンの検出上欠かせないか、邪魔な位置データを追
加、除去するのが好適であり、最適粗サーチテンプレー
トは、複数の対象物につき粗サーチパターンマッチング
を繰り返し行って収集した正解パターンと不正解パター
ンとから生成するのが好適である。
In the optimizing process, it is preferable to add or remove position data which is indispensable to detection of correct and incorrect patterns in feature shape pattern matching with the optimal coarse search template, or which is obstructive. The template is preferably generated from correct and incorrect answer patterns collected by repeatedly performing rough search pattern matching on a plurality of objects.

【0013】最適粗サーチテンプレートでの特徴形状パ
ターンマッチングでは誤検出しやすい微細特徴部分や非
認識部分と酷似する部分については、この部分に合った
精サーチテンプレートにより、粗サーチパターンマッチ
ングの場合よりは密な演算箇所にて精サーチパターンマ
ッチングを行い、特徴形状パターンマッチングおよび精
サーチパターンマッチング双方を満足した画像データを
検出して対象物の必要情報が画像認識されるようにする
と、最適粗サーチテンプレートでの特徴形状パターンマ
ッチングによる上記特徴を活かしながら、この特徴形状
パターンマッチングでは誤検出するような部分だけを精
サーチパターンマッチングを行って検出の必要精度を確
保することができる。
For a fine feature portion or a portion that is very similar to a non-recognized portion that is likely to be erroneously detected by the feature shape pattern matching with the optimum rough search template, a fine search template matching this portion is used as compared with the case of the coarse search pattern matching. If a fine search pattern matching is performed at a dense calculation location and image data satisfying both the feature shape pattern matching and the fine search pattern matching is detected so that necessary information of the object is recognized, an optimal coarse search template is obtained. While making use of the above features by the feature shape pattern matching described above, it is possible to secure the necessary accuracy of the detection by performing a fine search pattern matching only on a portion that is erroneously detected in the feature shape pattern matching.

【0014】本発明のパターンマッチング装置は、入力
される撮像された対象物の画像データを記憶する画像記
憶手段と、対象物の必要情報を画像認識するのに必要な
特定のパターンに合ったサーチテンプレートを教示する
粗サーチテンプレート教示手段と、教示された粗サーチ
テンプレートにより予め設定された所定の演算箇所およ
びパターン一致閾値に基づき画像記憶手段からの画像デ
ータにつき粗サーチパターンマッチングを行い、検出し
た粗マッチングパターンを記憶するとともに表示する粗
サーチ処理手段と、検出された粗マッチングパターンの
人による正解、不正解の評価に基づく正解パターンと不
正解パターンとから、正解パターンに含まれ不正解パタ
ーンに含まれない特徴形状データと、不正解パターンに
含まれ正解パターンに含まれない禁止特徴形状データと
を抽出して表示し、かつそれらによる正解パターンおよ
び不正解パターンの検出のための情報の過不足の教示の
基に特徴データおよび禁止特徴データを補正する最適化
処理して得た特徴形状パターンおよび禁止特徴形状パタ
ーンの位置データを持った最適粗サーチテンプレートを
生成する粗サーチテンプレート最適化処理部とを備え、
粗サーチ処理手段はこの最適粗サーチテンプレート上の
特徴形状パターンおよび禁止特徴形状パターンの各設定
位置でのみ前記画像データとのパターンマッチングの演
算をし、演算の結果禁止特徴パターンとマッチングした
画像データについてのそれ以上の処理操作を省きなが
ら、特徴パターンとマッチングする画像データを検出し
て対象物の必要情報が画像認識されるようにしたことを
1つの特徴としている。
The pattern matching apparatus according to the present invention comprises an image storage means for storing input image data of an imaged object, and a search matching a specific pattern necessary for image recognition of necessary information of the object. A coarse search pattern teaching unit that teaches a template, and a coarse search pattern matching performed on image data from the image storage unit based on a predetermined calculation location and a pattern matching threshold set in advance by the taught coarse search template. A rough search processing means for storing and displaying the matching pattern, and a correct pattern based on the evaluation of the correct and incorrect answers of the detected rough matching pattern by a person and an incorrect pattern, which are included in the correct pattern and included in the incorrect pattern. Feature pattern data and correct answer patterns included in incorrect answer patterns Optimization that extracts and displays prohibited feature shape data that is not included in the data and corrects the feature data and prohibited feature data based on the teaching of excess or deficiency of information for detecting correct and incorrect answer patterns based on the data. A coarse search template optimization processing unit that generates an optimal coarse search template having position data of the processed characteristic shape pattern and the prohibited characteristic shape pattern,
The coarse search processing means performs pattern matching calculation with the image data only at each set position of the feature shape pattern and the prohibited feature shape pattern on the optimal rough search template, and as a result of the calculation, the image data matched with the prohibited feature pattern. One feature is that image data matching a feature pattern is detected so that necessary information of a target object is image-recognized while omitting any further processing operations.

【0015】これにより、教示されるサーチテンプレー
トによる粗サーチパターンマッチング処理、およびこの
粗サーチパターンマッチングで検出される粗マッチング
パターンについての正解、不正解の評価の教示による正
解パターンおよび不正解パターンとから、上記特定形状
データおよび禁止特定形状データを得るとともに、これ
ら情報の過不足の教示に基づいた最適化処理にて位置デ
ータを追加、削除した上記最適粗サーチテンプレートを
生成し、この最適粗サーチテンプレートによる特徴形状
パターンマッチングすることを自動的に行い、上記のパ
ターンマッチング方法を容易にかつ的確に達成すること
ができる。
Thus, the rough search pattern matching process using the taught search template and the correct and incorrect answer patterns based on the correct and incorrect answer evaluations of the rough matching pattern detected by the rough search pattern matching are performed. , The above-mentioned specific shape data and the prohibited specific shape data are obtained, and the above-mentioned optimum coarse search template is generated by adding and deleting the position data by an optimization process based on the teaching of the excess and deficiency of the information. Automatically performing the feature shape pattern matching according to the above, and the above-described pattern matching method can be easily and accurately achieved.

【0016】最適粗サーチテンプレートによる特徴形状
パターンマッチングでは誤検出しやすい微細特徴部分や
認識対象部分と酷似する部分に合った精サーチテンプレ
ートを教示する精サーチ教示手段と、教示された精サー
チテンプレートにより粗サーチパターンマッチングの場
合よりは密な演算箇所にて精サーチパターンマッチング
を行う精サーチ処理手段とを備え、特徴形状パターンマ
ッチングおよび精サーチパターンマッチングの双方を満
足したパターンを検出して対象物の必要情報が画像認識
されるようにすると、特徴形状パターンマッチングの特
徴を活かしながら、特徴形状パターンマッチングでは誤
検出しやすい部分では精サーチパターンマッチングによ
り必要精度を確保したパターンマッチングが自動的に容
易かつ的確に達成される。
A fine search teaching means for teaching a fine search template suitable for a fine feature portion which is likely to be erroneously detected in the feature shape pattern matching by the optimum coarse search template or a portion very similar to the recognition target portion, and a fine search template taught. A fine search processing means for performing a fine search pattern matching at a denser calculation position than in the case of the coarse search pattern matching, and detecting a pattern satisfying both the characteristic shape pattern matching and the fine search pattern matching to detect an object; If the necessary information is image-recognized, pattern matching with the necessary accuracy is automatically and easily performed by fine search pattern matching in parts where misdetection is likely to occur in feature shape pattern matching while utilizing the features of feature shape pattern matching. Accurately achieved It is.

【0017】本発明のそれ以上の目的および特徴は以下
の詳細な説明と図面の記載によって明らかになる。本発
明の各特徴は、可能な限りにおいて、それ単独で、ある
いは種々な組み合わせで複合して用いることができる。
Further objects and features of the present invention will become apparent from the following detailed description and drawings. Each feature of the present invention can be used alone or in various combinations in combination as far as possible.

【0018】[0018]

【発明の実施の形態】以下、本発明のパターンマッチン
グ方法、およびその装置に係る実施の形態について、実
施例とともに図1〜図4を参照しながら説明し、本発明
の理解に供する。
BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, embodiments of a pattern matching method and apparatus according to the present invention will be described with reference to FIGS. 1 to 4 together with examples to provide an understanding of the present invention.

【0019】図1は本発明のパターンマッチング方法の
1つの実施例を示す。図1の(a)に示す画像データ1
aは、図3に示す撮像系としてのカメラ100により撮
像されたデータで、人が設定したサーチテンプレート2
によりパターンマッチングを行って、対象物1の位置な
どの情報を画像認識するための必要な特定の部分パター
ンにて8方向の空間一次微分を行い微分値の大きい点を
各一次微分プレーン上で“1”とした8bitのサーチ
テンプレートにより粗サーチパターンマッチングを行
う。
FIG. 1 shows one embodiment of the pattern matching method of the present invention. Image data 1 shown in FIG.
a is data captured by the camera 100 as an imaging system shown in FIG.
, And performs spatial primary differentiation in eight directions with a specific partial pattern required for image recognition of information such as the position of the target object 1, and finds a point having a large differential value on each primary differential plane. Rough search pattern matching is performed using an 8-bit search template set to 1 ″.

【0020】この結果、粗サーチテンプレート2と一致
するものとして検出される粗マッチングパターンは、パ
ターン一致閾値が緩和されているため、前記特定のパタ
ーンとそれの類似のパターンを含み、類似のパターンは
複数検出されることが多い。
As a result, the rough matching pattern detected as a match with the rough search template 2 includes the specific pattern and a pattern similar to the specific pattern because the pattern matching threshold is relaxed. More than one is often detected.

【0021】そこで、粗サーチパターンマッチングで検
出されたマッチングパターンにつき人が図1の(a)に
示すように、正解/不正解の評価を行い正解パターンT
と不正解パターンH1,H2,・・・に分類する。
Therefore, as shown in FIG. 1A, a person evaluates the correct / incorrect answer for the matching pattern detected by the rough search pattern matching, and
And incorrect answer patterns H1, H2,.

【0022】もし、正解パターンTがなければ、正解パ
ターンTが得られるまで粗サーチパターンマッチングの
演算箇所を順次変えながら、粗サーチパターンマッチン
グを繰り返し行えばよい。このようにしても画像データ
1aの全画素について精サーチパターンマッチングを行
う場合よりも正解パターンTを早期に得る確率は高く、
作業コストは大幅に低減する。
If there is no correct answer pattern T, the rough search pattern matching may be repeated until the correct answer pattern T is obtained, while sequentially changing the calculation locations of the rough search pattern matching. Even in this case, the probability of obtaining the correct pattern T earlier than in the case of performing the fine search pattern matching for all the pixels of the image data 1a is higher,
Work costs are greatly reduced.

【0023】一方、個々の対象物1が持つ特定のパター
ンは全て正確に一致しているとは限らず、バラツキのあ
ることが多い。これに対処するため本実施の形態では、
複数の対象物1、敷衍していえば、必要なパターンマッ
チング精度、画像認識精度が得られるだけの数の対象物
1について、粗サーチパターンマッチングを行い、得た
各回の正解パターンT・・・と不正解パターンH1,H
2,・・・を収集する。
On the other hand, the specific patterns of the individual objects 1 do not always match exactly, and often have variations. In order to deal with this, in the present embodiment,
For a plurality of objects 1, to be more specific, coarse search pattern matching is performed on as many objects 1 as necessary to obtain the necessary pattern matching accuracy and image recognition accuracy, and the obtained correct patterns T each time are obtained. Incorrect answer pattern H1, H
Collect 2, ...

【0024】得られた図1の(a)に示すような正解パ
ターンT・・・と不正解パターンH1,H2,・・・と
から、正解パターンT・・・に含まれ不正解パターンH
1,H2,・・・に含まれない特徴形状データと、不正
解パターンH1,H2,・・・に含まれ正解パターンT
・・・に含まれない禁止特徴形状データとを抽出する。
From the obtained correct patterns T and incorrect patterns H1, H2,... As shown in FIG.
, H2,... And the correct answer pattern T included in the incorrect answer patterns H1, H2,.
... and the prohibited feature shape data not included in.

【0025】具体的には、全正解パターンと全不正解パ
ターンのOR画像を算出し、このOR画像と各正解パタ
ーンとの画像間差分によって対象物1の特定のパターン
にのみ含まれる特徴形状データを抽出し、前記OR画像
と各候補パターンとの画像間差分によって対象物1の特
定のパターンに類似するパターンにのみ含まれる禁止特
徴形状データを抽出する。これによって、個々の対象物
1でバラツキのある特定のパターンに対応した特徴形状
データと禁止特徴形状データとが得られる。
More specifically, an OR image of all the correct patterns and all the incorrect patterns is calculated, and the characteristic shape data included only in the specific pattern of the object 1 is calculated based on the difference between the OR image and each correct pattern. Is extracted, and forbidden feature shape data included only in a pattern similar to a specific pattern of the object 1 is extracted based on an image difference between the OR image and each candidate pattern. As a result, characteristic shape data and prohibited characteristic shape data corresponding to a specific pattern having a variation in each object 1 are obtained.

【0026】説明の簡単のため、検出位置の数を極く少
なくして(例えば30分の1程度)図1の(a)に示す
正解パターンTと不正解パターンH1との関係だけで具
体例を述べると、双方のOR画像は図1の(b)に示す
P1として得られる。図1の(b)のOR画像P1との
図1の(a)の正解パターンTとの差分の有無によって
図1の(c)に示す特定のパターンにのみ含まれる特徴
形状データP2が得られる。また、図1の(b)のOR
画像と図1の(a)の不正解パターンH1との差分の有
無によって図1の(d)に示す特定のパターンにのみ含
まれる禁止特徴形状データP3が得られる。
For the sake of simplicity, the number of detection positions is extremely small (for example, about 1/30), and a specific example is shown only by the relationship between the correct answer pattern T and the incorrect answer pattern H1 shown in FIG. In other words, both OR images are obtained as P1 shown in FIG. Depending on whether or not there is a difference between the OR image P1 in FIG. 1B and the correct pattern T in FIG. 1A, characteristic shape data P2 included only in the specific pattern shown in FIG. 1C is obtained. . Also, the OR of FIG.
Prohibition feature shape data P3 included only in the specific pattern shown in FIG. 1D is obtained based on the presence or absence of a difference between the image and the incorrect pattern H1 in FIG.

【0027】従って、特徴形状データP2は画像データ
1aとのパターンマッチングによって、対象物1の特定
のパターンに対応する正解パターンTを検出するのに役
立ち、禁止特徴形状データP3は画像データ1aとのパ
ターンマッチングによって、対象物1の特定のパターン
Tと類似していることにより誤検出されやすい不正解パ
ターンH1をノイズとして検出するのに役立つ。
Therefore, the feature shape data P2 is useful for detecting a correct pattern T corresponding to a specific pattern of the object 1 by pattern matching with the image data 1a, and the prohibited feature shape data P3 is used for matching with the image data 1a. The pattern matching is useful for detecting, as noise, an incorrect answer pattern H1 which is similar to the specific pattern T of the target object 1 and is likely to be erroneously detected.

【0028】そこで、本実施の形態ではこれら特徴形状
データと禁止特徴形状データとを含み、他の部分を間引
き画素とした図1の(e)に黒丸と実線三角で演算点を
示す初期最適粗サーチテンプレートT1を設定する。
Therefore, in the present embodiment, the initial optimum coarse shape including the characteristic shape data and the prohibited characteristic shape data, and showing the operation points by black circles and solid triangles in FIG. A search template T1 is set.

【0029】このような手法で設定した初期最適粗サー
チテンプレートT1によって画像データ1aとのパター
ンマッチングを行うことにより、禁止特徴形状データP
3がマッチングした不正解パターンH1,H2,・・・
についてのそれ以上の操作を省きながら、特徴形状パタ
ーンP2がマッチングした特定のパターン、つまり正解
パターンTを検出して対象物1の必要な位置情報などを
画像認識できるようにすることが、低コストで高速かつ
高精度に達成される。
By performing pattern matching with the image data 1a using the initial optimum coarse search template T1 set by such a method, the prohibited feature shape data P
3 are incorrect answer patterns H1, H2,...
It is low cost to detect a specific pattern matched with the characteristic shape pattern P2, that is, the correct answer pattern T and perform image recognition of necessary position information of the target object 1 while omitting further operations for High speed and high accuracy.

【0030】しかし、前記設定した初期最適粗サーチテ
ンプレートT1の特徴形状データP2や禁止特徴形状デ
ータP3は、それぞれの検出の役目を果たすのに不可欠
の位置データが欠けたり、邪魔な位置データが含んだり
することがときとしてある。
However, the characteristic shape data P2 and the forbidden characteristic shape data P3 of the set initial optimal coarse search template T1 lack position data indispensable for fulfilling the role of the respective detections or include position data that is disturbing. There are times when they do.

【0031】これに対処するのに本実施の形態では、前
記初期最適粗サーチテンプレートT1の各演算点である
特徴形状、禁止特徴形状の各データP2,P3につき前
記情報の過不足を評価し、この評価結果に対応して初期
最適粗サーチテンプレートT1につき不足する破線の丸
や三角で示す演算点P2aやP3aを追加し、問題とな
る演算点を削除する。これにより得た最適粗サーチテン
プレートT2により画像データ1aとの前記パターンマ
ッチングを行い、初期最適粗サーチテンプレートT1の
位置データに過不足がある万一の場合に対応できるよう
にしている。
In order to cope with this, in the present embodiment, the excess or deficiency of the information is evaluated for each of the data P2 and P3 of the feature shape and the prohibited feature shape which are the respective calculation points of the initial optimum coarse search template T1. Corresponding to this evaluation result, calculation points P2a and P3a indicated by broken-line circles and triangles that are insufficient for the initial optimum coarse search template T1 are added, and the calculation points that cause problems are deleted. The above-described pattern matching with the image data 1a is performed by using the obtained optimum rough search template T2, so that it is possible to cope with a case where the position data of the initial optimum rough search template T1 is excessive or insufficient.

【0032】最適粗サーチテンプレートT2に設定され
る特徴形状パターンP2,P2aおよび禁止特徴形状パ
ターンP3,P3aに対する追加演算点P2aやP3a
は、特徴形状データP2および禁止特徴形状データP3
を抽出したときに空き演算点となる部分を双方に振り分
けて離散させ巧みに設定することができる。
Additional calculation points P2a and P3a for the characteristic shape patterns P2 and P2a and the prohibited characteristic shape patterns P3 and P3a set in the optimal rough search template T2.
Are the feature shape data P2 and the prohibited feature shape data P3
Is extracted, and a portion that becomes an empty calculation point can be distributed to both sides and discretely set.

【0033】このような最適粗サーチテンプレートT2
がパターンマッチングの精度上最適に設定されるには、
正解パターンT・・・はもとより不正解パターンH1,
H2,・・・も検出数が少ないほど好適であり、正解パ
ターンT・・および不正解パターンH1,H2,・・・
を検出する粗サーチパターンマッチングに際しての一致
度閾値を順次小さく変化させていき、検出数が最も少な
くなるように収束させたときの結果を用いるのが好適で
ある。
Such an optimal coarse search template T2
Is optimally set for the accuracy of pattern matching.
Correct answer pattern T, as well as incorrect answer pattern H1,
Are also preferable as the number of detections is small, and the correct answer pattern T and the incorrect answer patterns H1, H2,.
It is preferable to gradually change the matching degree threshold value in the coarse search pattern matching for detecting, and use the result obtained when convergence is performed so as to minimize the number of detections.

【0034】ここに、最適粗サーチテンプレートT2を
得るための操作は、収集した正解パターンT・・部分の
画像と最適粗サーチテンプレートT2との一致度平均
と、不正解パターンH1,H2,・・・部分の画像と最
適粗サーチテンプレートT2との一致度平均との差が最
大になる間引き操作である。最適粗サーチテンプレート
T2による実際のパターンマッチング処理に際し、同種
の対象物1でも製造ロットが異なるなどのためにこの条
件が崩れ、検出にNGが生じるような場合がある。その
ようなときは最適粗サーチテンプレートT2を図2の処
理フローに示すように設定し直せば対処できる。なお、
図2での対象物1はビデオテープレコーダなどにおける
歯車の噛み合わせ部分である。
Here, the operation for obtaining the optimal coarse search template T2 is performed by averaging the coincidence between the collected image of the correct answer pattern T ··· and the optimal coarse search template T2 and the incorrect answer patterns H1, H2, ···. A thinning operation in which the difference between the image of the part and the average degree of coincidence between the optimal coarse search template T2 is maximized. In the actual pattern matching process using the optimal rough search template T2, this condition may be broken due to a difference in the production lot of the same kind of target object 1, and NG may occur in the detection. In such a case, it can be dealt with by setting the optimum rough search template T2 again as shown in the processing flow of FIG. In addition,
The object 1 in FIG. 2 is a gear meshing portion in a video tape recorder or the like.

【0035】ところで、対象物1の特定のパターンに
は、上記特徴形状パターンマッチングでは誤検出しやす
い微細特徴部分や認識対象部分と酷似する部分がある。
このような場合、それらの部分のパターンに合った精サ
ーチテンプレートを設定し、この精サーチテンプレート
によって特徴形状パターンマッチングの場合よりは密な
演算箇所によって精サーチパターンマッチングを行い、
特徴形状パターンマッチングおよび精サーチパターンマ
ッチング双方を満足する特徴のパターン、つまり正解パ
ターンTを検出し、対象物1の位置などの必要な情報を
画像認識できるようにする。これにより、特徴形状パタ
ーンマッチングによる特徴を活かしながら、特徴形状パ
ターンマッチングでは誤検出するような部分だけを精サ
ーチパターンマッチングを行って必要な精度を確保する
ことができる。精サーチテンプレートによる精サーチパ
ターンマッチングでの演算箇所は特徴形状パターンマッ
チングの場合よりも多く設定すればよいが、必要な精度
によっては全画素について演算するようにすれば検出精
度を最大にすることができる。このようにしても、精サ
ーチパターンマッチングは特定のパターンのうちの一部
につき行うだけであるので、演算点が特に膨大になって
パターンマッチング操作が長時間に及ぶようなことはな
い。
By the way, the specific pattern of the object 1 includes a minute feature portion which is easily erroneously detected by the feature shape pattern matching and a portion which is very similar to the recognition target portion.
In such a case, a fine search template that matches the pattern of those parts is set, and the fine search template is used to perform fine search pattern matching with a denser calculation point than in the case of feature shape pattern matching,
A feature pattern that satisfies both the feature shape pattern matching and the fine search pattern matching, that is, a correct answer pattern T, is detected, and necessary information such as the position of the object 1 can be image-recognized. Thus, while utilizing the features obtained by the feature shape pattern matching, it is possible to perform the precise search pattern matching only on the portions that are erroneously detected in the feature shape pattern matching, thereby ensuring the required accuracy. The number of calculation locations in the fine search pattern matching using the fine search template may be set more than in the case of the feature shape pattern matching. However, depending on the required accuracy, the calculation accuracy can be maximized by calculating for all pixels. it can. Even in this case, since fine search pattern matching is performed only for a part of a specific pattern, the number of calculation points is not particularly large and the pattern matching operation does not take a long time.

【0036】本実施の形態のパターンマッチング装置
は、上記のようなパターンマッチング方法を実現するた
め図3に示すような構成を有している。ここでの対象物
1は、回路基板に装着して電子回路基板を製造するため
に供給され、あるいは搬送され、あるいは装着される電
子部品、ビデオテープレコーダなどにおける歯車の噛み
合わせ部分、ばね掛け部分などである。
The pattern matching apparatus according to the present embodiment has a configuration as shown in FIG. 3 for realizing the above-described pattern matching method. The target object 1 is supplied to, or conveyed or mounted on, a circuit board to manufacture an electronic circuit board, an electronic component to be mounted, a gear meshing portion in a video tape recorder, or the like, a spring hooking portion. And so on.

【0037】カメラ100は撮像素子と撮像回路および
撮像光学系よりなり、対象物1の位置や種類などの必要
な情報を画像認識したい工程部分に設置される。カメラ
100が対象物1を撮像した濃淡画像の画像データ1a
は、例えばパターンマッチング対象となる単位で濃淡画
像入力部101にてデジタル変換してデジタル画像デー
タ110とし、これを濃淡画像記憶部102に入力する
とともに、ビデオコントローラ121を介してモニタ1
22に表示されるようにする。
The camera 100 includes an image pickup device, an image pickup circuit, and an image pickup optical system, and is installed in a process portion where necessary information such as the position and type of the object 1 is to be image-recognized. Image data 1a of a grayscale image of the object 1 captured by the camera 100
For example, the grayscale image input unit 101 converts the digital image data into digital image data 110 in a unit to be subjected to pattern matching, and inputs the digital image data 110 to the grayscale image storage unit 102.
22.

【0038】濃淡画像記憶部102では、入力された画
像データを記憶しておき粗サーチ処理部103および精
サーチ処理部104からの要求に応じて出力する。粗サ
ーチ処理部103は、サーチテンプレートに関する外部
入力131の基に粗サーチ教示部105を通じ教示され
た粗サーチテンプレートデータ113により、濃淡画像
記憶部102からの画像データ111について8方向の
空間一次微分を行い微分値の大きい点を各一次微分プレ
ーン上で1とした8bit画像とする。同様に、8方向
の空間一次微分を行い微分値の大きい点を各一次微分プ
レーン上で1とした8bitのサーチテンプレートによ
り粗サーチパターンマッチングをまず行う。粗サーチ処
理部103はまた粗サーチテンプレートデータ113に
より検出したマッチングパターンをビデオコントローラ
121を介してモニタに表示し、人による前記正解パタ
ーンT・・などと不正解パターンH1、H2…などとの
評価に供する。
The grayscale image storage unit 102 stores the input image data and outputs it in response to requests from the coarse search processing unit 103 and the fine search processing unit 104. The coarse search processing unit 103 calculates the spatial first derivative of the image data 111 from the grayscale image storage unit 102 in eight directions based on the coarse search template data 113 taught through the coarse search teaching unit 105 based on the external input 131 relating to the search template. A point having a large differential value is set to 1 on each primary differential plane to obtain an 8-bit image. Similarly, spatial primary differentiation in eight directions is performed, and coarse search pattern matching is first performed using an 8-bit search template in which a point having a large differential value is set to 1 on each primary differentiation plane. The rough search processing unit 103 also displays a matching pattern detected by the rough search template data 113 on a monitor via the video controller 121, and evaluates the correct answer pattern T,... And the incorrect answer patterns H1, H2,. To serve.

【0039】この人がした前記評価結果131は粗サー
チ教示部105に教示され、粗サーチ教示部105は教
示された正解パターンT・・・のデータと不正解パター
ンH1,H2,・・・のデータとから、正解パターンT
・・・に含まれ、不正解パターンH1,H2,・・・に
含まれない、正解パターンを間引きした特徴形状データ
P2と、不正解パターンH1,H2,・・・に含まれ、
正解パターンT・・・に含まれない不正解パターンを間
引きした禁止特徴形状データP3とを併せ持った初期最
適粗サーチテンプレートT1を上記操作で自動生成す
る。
The evaluation result 131 made by the person is taught to the rough search teaching unit 105, and the rough search teaching unit 105 outputs the data of the taught correct patterns T... And the incorrect answer patterns H1, H2,. From the data, the correct answer pattern T
Are included in the incorrect answer patterns H1, H2,..., And are included in the incorrect answer patterns H1, H2,.
The initial optimal coarse search template T1 having the forbidden feature shape data P3 obtained by thinning out incorrect patterns not included in the correct pattern T... Is automatically generated by the above operation.

【0040】自動生成した初期最適粗サーチテンプレー
トデータT1は粗サーチテンプレート最適化処理部10
7に入力されるとともに、ビデオコントローラ121を
通じてモニタ122で表示される。
The automatically generated initial optimum coarse search template data T1 is used for the coarse search template optimization processing unit 10.
7 and displayed on a monitor 122 through a video controller 121.

【0041】このモニタ122への表示によって初期最
適粗サーチテンプレートデータT1に設定した特徴検出
のための演算点の過不足の評価に供する。粗サーチテン
プレート最適化処理部107は自動生成された初期最適
粗サーチテンプレートデータT1に対し、前記演算点の
過不足の評価結果132の入力に基づき不可欠な演算点
の追加、邪魔な演算点の削除を行って、最適粗サーチテ
ンプレートデータT2を自動生成し、これを粗サーチ教
示部105を通じ粗サーチ処理部103に入力する。
The display on the monitor 122 is used to evaluate whether the number of calculation points for feature detection set in the initial optimum coarse search template data T1 is excessive or insufficient. The coarse search template optimization processing unit 107 adds indispensable calculation points to the automatically generated initial optimum coarse search template data T1 based on the input of the evaluation result 132 of the excess or deficiency of the calculation points, and deletes disturbing calculation points. Is performed to automatically generate the optimal coarse search template data T2, which is input to the coarse search processing unit 103 through the coarse search teaching unit 105.

【0042】ここで、粗サーチ処理部103は、それ以
降、与えられた最適粗サーチテンプレートT2によって
画像データ1aとの粗パターンマッチングによる少ない
演算点での低コストで高速かつ高精度なパターンマッチ
ングを自動的に達成することができる。
Here, the coarse search processing unit 103 thereafter performs low-cost, high-speed, and high-precision pattern matching at a small number of calculation points by coarse pattern matching with the image data 1a using the given optimum coarse search template T2. Can be achieved automatically.

【0043】一方、精サーチ処理部104は精サーチテ
ンプレートに関する外部入力133の基に精サーチ教示
部106から教示される精サーチテンプレートデータ1
14により濃淡画像記憶部102からの画像データ1a
における精サーチパターンマッチング対象領域の全画素
あるいは粗サーチパターンマッチングの場合よりは密か
に設定した演算点に関しての精パターンマッチングを行
う。
On the other hand, the fine search processing unit 104 receives the fine search template data 1 taught from the fine search teaching unit 106 based on the external input 133 relating to the fine search template.
14, the image data 1a from the grayscale image storage unit 102
Then, fine pattern matching is performed on all pixels in the fine search pattern matching target area or on calculation points that are set more secretly than in the case of coarse search pattern matching.

【0044】しかして、粗サーチ処理部103および精
サーチ処理部104で構成される包括サーチ処理部12
3は、粗サーチパターンマッチングと精サーチパターン
マッチングとの双方を満足した画像データを検出して対
象物1の必要情報が画像認識できるようにする。なお、
図2は上記の最適粗サーチテンプレートの生成を伴う処
理フローを模擬的に示すフローチャートである。
Thus, the comprehensive search processing unit 12 composed of the coarse search processing unit 103 and the fine search processing unit 104
3 detects image data that satisfies both the coarse search pattern matching and the fine search pattern matching so that necessary information of the object 1 can be image-recognized. In addition,
FIG. 2 is a flowchart schematically illustrating a processing flow involving generation of the above-described optimal coarse search template.

【0045】粗サーチテンプレートの最適化処理した自
動生成は、例えばシミュレーテッドアニーリング法(S
A:Simulated Annealing 模擬徐冷法)を用いる。こ
れの具体例は図4に示してある。
The automatic generation of the optimized rough search template is performed, for example, by the simulated annealing method (S
A: Simulated Annealing (simulated slow cooling method) is used. An example of this is shown in FIG.

【0046】図4の不正解パターンH1,H2,…,H
nである候補パターンと正解パターンTである評価パタ
ーンとの間の演算は両パターン間の一致度を計算する。
これは最適化問題を解く汎用近似解法の1つである。S
A法の具体的な所定手順例を示すと以下の通りである。 (1)評価パターン演算点列、温度、徐冷段階の初期化 (2)エネルギー(候補パターンと評価パターンの一致
度)の計算 (3)摂動を加える(演算点の位置を変更する) (4)エネルギーの計算 (5)状態の樹脂(摂動パターンを評価パターンに置き
換える) (6)指定の回数を(3)から繰り返す (7)徐冷(温度の更新) (8)ある条件(温度、エネルギー)を満たすまで
(3)から繰り返す 評価パターンおよび候補パターンより各々演算点を抽出
し、SA法を用いて最適な演算点よりなる粗サーチテン
プレートに収束させる。SA法において収束を得るため
の条件を下記の表1に粗サーチテンプレート自動生成仕
様として示した。
The incorrect answer patterns H1, H2,..., H in FIG.
The calculation between the candidate pattern n and the evaluation pattern T as the correct answer pattern calculates the degree of coincidence between the two patterns.
This is one of the general-purpose approximate solutions to the optimization problem. S
A specific example of the predetermined procedure of the method A is as follows. (1) Initialization of evaluation pattern calculation point sequence, temperature, slow cooling stage (2) Calculation of energy (degree of coincidence between candidate pattern and evaluation pattern) (3) Add perturbation (change position of calculation point) (4) ) Calculation of energy (5) Resin in state (replace perturbation pattern with evaluation pattern) (6) Repeat specified number of times from (3) (7) Slow cooling (update of temperature) (8) Certain conditions (temperature, energy ) Is repeated until (3) is satisfied. Each operation point is extracted from the evaluation pattern and the candidate pattern, and is converged to a rough search template including the optimum operation points by using the SA method. Conditions for obtaining convergence in the SA method are shown in Table 1 below as specifications for automatically generating a rough search template.

【0047】[0047]

【表1】 なお、収束が得られる条件は複数存在する。また、摂動
−徐冷の停止条件は、摂動させても一致度の改善がそれ
以上得られない場合とする。表1の場合で、一致度閾値
の設定は初期閾値Ts=30.0から最終閾値Tf=
0.1まで高めている。このための収束条件の設定はそ
れぞれの立場でした実験や経験を活かして行われるが、
1/2ずつ閾値を小さくしていき、それ以上改善できな
い限界まで前記(3)から以下の処理を繰り返せば充分
である。閾値の更新回数は300回位いが上限と考えら
れるが、これに限られることはない。演算点の抽出はマ
トリクス状に並び画素群における基準画素から縦横の4
方向に演算画素を設定していってもよいし、これに斜め
方向を加えた8方向に演算画素を設定していってもよ
い。
[Table 1] There are a plurality of conditions under which convergence can be obtained. Further, the perturbation-slow cooling stop condition is a condition in which even if the perturbation is performed, the degree of coincidence cannot be further improved. In the case of Table 1, the coincidence threshold is set from the initial threshold Ts = 30.0 to the final threshold Tf =
Increased to 0.1. The setting of the convergence conditions for this is done using experiments and experiences from each position,
It is sufficient to reduce the threshold value by 1/2 and repeat the following processes from (3) until the limit cannot be further improved. The upper limit of the threshold update frequency is considered to be about 300 times, but is not limited thereto. The calculation points are extracted in a matrix from the reference pixel in the pixel group to the vertical and horizontal directions.
The calculation pixels may be set in the directions, or the calculation pixels may be set in eight directions obtained by adding the diagonal directions to the calculation pixels.

【0048】上記最終閾値0.1の場合で最終演算点例
は50×50の画素のテンプレートに対して32点と少
なくなり、大きく間引きして高精度なパターンマッチン
グ結果が得られる。
In the case where the final threshold value is 0.1, the number of final calculation points is reduced to 32 points for a template of 50 × 50 pixels, and a large number of thinnings are performed to obtain a highly accurate pattern matching result.

【0049】[0049]

【発明の効果】本発明によれば、正解パターンと、これ
に類似し誤検出されやすい不正解パターンに関する特定
部分の特徴形状データ、禁止特徴形状データに、それら
の検出情報の過不足を補正する最適化処理を施しただけ
で、演算データ数が少ないが正解パターンおよび不正解
パターンを検出するには充分な特徴形状パターンおよび
禁止特徴形状パターンの位置データを1つの最適粗サー
チテンプレートに設定して、この最適粗サーチテンプレ
ート上の特徴形状パターンおよび禁止特徴形状パターン
による少ない各設定位置でのみ前記画像データとのマッ
チング演算をすることにより、禁止特徴形状パターンと
マッチングした画像データのそれ以上の操作を省きなが
ら、特徴形状パターンとマッチングする特定のパターン
を検出して対象物の必要な情報を画像認識できるように
することが、低コストで高速かつ高精度に達成される。
According to the present invention, the excess or deficiency of the detected information is corrected in the characteristic shape data and the prohibited characteristic shape data of the specific part relating to the correct answer pattern and the incorrect answer pattern similar thereto and easily detected by mistake. The position data of the feature shape pattern and the forbidden feature shape pattern which are small in the number of operation data but sufficient for detecting the correct answer pattern and the incorrect answer pattern only by performing the optimization processing are set in one optimal rough search template. By performing a matching operation with the image data only at a small number of setting positions based on the feature shape pattern and the prohibited feature shape pattern on the optimal rough search template, further operation of the image data matched with the prohibited feature shape pattern can be performed. While omitting, detect a specific pattern that matches the feature shape pattern and Making the necessary information to allow the image recognition is achieved with high speed and high accuracy at low cost.

【0050】最適粗サーチテンプレートでの特徴形状パ
ターンマッチングでは誤検出しやすい微細特徴部分や非
認識部分と酷似する部分については、この部分に合った
精サーチテンプレートにより、粗サーチパターンマッチ
ングの場合より密な演算箇所にて精サーチパターンマッ
チングを行い、特徴形状パターンマッチングおよび精サ
ーチパターンマッチング双方を満足した画像データを検
出して対象物の必要情報が画像認識できるようにして、
最適粗サーチテンプレートでの特徴形状パターンマッチ
ングによる上記特徴を活かしながら、この特徴形状パタ
ーンマッチングでは誤検出するような部分だけを精サー
チパターンマッチングを行って検出の必要精度を確保す
ることができる。
For a fine feature portion that is likely to be erroneously detected in the feature shape pattern matching with the optimal rough search template and a portion that is very similar to the non-recognized portion, a fine search template matching this portion is used to achieve a higher density than in the coarse search pattern matching. Perform precise search pattern matching at the appropriate calculation locations, detect image data that satisfies both the feature shape pattern matching and the fine search pattern matching, and enable image recognition of the necessary information of the target object.
While making use of the above-mentioned features obtained by the feature shape pattern matching in the optimal rough search template, it is possible to secure the necessary accuracy of the detection by performing the fine search pattern matching only on the portion that is erroneously detected in the feature shape pattern matching.

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

【図1】本発明の実施の形態におけるパターンマッチン
グ方法の1つの実施例を示す説明図
FIG. 1 is an explanatory diagram showing one example of a pattern matching method according to an embodiment of the present invention.

【図2】図1のパターンマッチング方法における最適粗
サーチテンプレートの生成を伴う処理フローを模擬的に
示すフローチャート図
FIG. 2 is a flowchart schematically showing a processing flow involving generation of an optimal coarse search template in the pattern matching method of FIG. 1;

【図3】図1のパターンマッチング方法を実現する本発
明の実施の形態におけるパターンマッチング装置の1つ
の実施例を示すブロック結線図
FIG. 3 is a block diagram showing one example of a pattern matching apparatus according to an embodiment of the present invention that realizes the pattern matching method of FIG. 1;

【図4】図2の処理フローで採用しているSA法の処理
フローを示すフローチャート図
FIG. 4 is a flowchart showing a processing flow of the SA method employed in the processing flow of FIG. 2;

【図5】従来のパターンマッチング方法でのテンプレー
トマッチング手法を模擬的に示す説明図
FIG. 5 is an explanatory diagram schematically showing a template matching method in a conventional pattern matching method.

【図6】従来のパターンマッチング方法での間引きテン
プレートマッチング手法を模擬的に示す説明図
FIG. 6 is an explanatory diagram schematically showing a thinning template matching method in a conventional pattern matching method.

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

1 対象物 1a 画像データ 2 サーチテンプレート 100 撮像系 101 濃淡画像入力部 102 濃淡画像記憶部 103 粗サーチ処理部 104 精サーチ処理部 105 粗サーチ教示部 106 精サーチ教示部 107 粗サーチテンプレート最適化処理部 122 モニタ 123 包括サーチ処理部 T 正解パターン H1,H2 不正解パターン P1 OR画像 P2 特徴形状データ P3 禁止特徴形状データ T1 初期最適粗サーチテンプレート T2 最適粗サーチテンプレート P2a,P3a 追加演算点 DESCRIPTION OF SYMBOLS 1 Object 1a Image data 2 Search template 100 Imaging system 101 Gray-scale image input unit 102 Gray-scale image storage unit 103 Coarse search processing unit 104 Fine search processing unit 105 Coarse search teaching unit 106 Fine search teaching unit 107 Coarse search template optimization processing unit 122 Monitor 123 Comprehensive search processing unit T Correct pattern H1, H2 Incorrect pattern P1 OR image P2 Feature shape data P3 Prohibited feature shape data T1 Initial optimal coarse search template T2 Optimal coarse search template P2a, P3a Additional calculation points

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】対象物を撮像した画像データを、前記対象
物の情報を画像認識するのに必要な特定の部分パターン
にて8方向の空間一次微分を行い、 微分値の大きい点を各一次微分プレーン上で“1”とし
た8bitのサーチテンプレートにより粗サーチパター
ンマッチングを行い、 検出された粗マッチングパターンにつき正解/不正解の
評価を行い、 評価した正解パターンと不正解パターンとから正解パタ
ーンに含まれ不正解パターンに含まれない特徴形状デー
タと、不正解パターンに含まれ正解パターンに含まれな
い禁止特徴形状データとを抽出し、 それらに正解/不正解パターンを検出するための検出情
報の過不足を補正する最適化処理をした特徴形状パター
ンおよび禁止特徴形状パターンの位置データを持った最
適粗サーチテンプレートを設定し、 この最適粗サーチテンプレート上の特徴形状パターンお
よび禁止特徴形状パターンの各設定位置でのみ前記画像
データとのマッチング演算し、 禁止特徴形状パターンとマッチングした画像データのそ
れ以上の処理操作を排除しながら特徴形状パターンとマ
ッチングした画像データを検出して前記対象物の必要情
報が画像認識するパターンマッチング方法。
An image data obtained by imaging an object is subjected to spatial primary differentiation in eight directions by using a specific partial pattern necessary for recognizing the information of the object, and a point having a large differential value is determined for each primary. On the differential plane, rough search pattern matching is performed using an 8-bit search template set to “1”, correct / incorrect evaluation is performed on the detected rough matching pattern, and the evaluated correct and incorrect patterns are converted into correct patterns. The feature shape data included and not included in the incorrect answer pattern and the prohibited feature shape data included in the incorrect answer pattern and not included in the correct answer pattern are extracted, and the detection information for detecting the correct / incorrect answer pattern is extracted from them. Optimized rough search template with position data of feature shape pattern and prohibition feature shape pattern that have been optimized to correct excess or deficiency A matching operation with the image data is performed only at each set position of the feature shape pattern and the prohibited feature shape pattern on the optimal rough search template, and further processing of the image data matched with the prohibited feature shape pattern is performed. A pattern matching method for detecting image data matched with a characteristic shape pattern while eliminating operations, and recognizing an image of necessary information of the target object.
【請求項2】最適化処理は、特徴形状データおよび禁止
特徴形状データにつき、特徴形状パターンマッチングに
おいて正解/不正解パターンの検出上不可欠の位置デー
タを追加して不必要な位置データを除去する請求項1に
記載のパターンマッチング方法。
2. The optimization process according to claim 1, wherein the feature shape data and the prohibited feature shape data are added with position data indispensable for detecting a correct answer / incorrect answer pattern in feature shape pattern matching to remove unnecessary position data. Item 1. The pattern matching method according to Item 1.
【請求項3】最適粗サーチテンプレートは、複数の対象
物につき粗サーチパターンマッチングを繰り返し行って
収集した正解パターンと不正解パターンとから生成する
請求項1に記載のパターンマッチング方法。
3. The pattern matching method according to claim 1, wherein the optimum rough search template is generated from correct and incorrect answer patterns collected by repeatedly performing rough search pattern matching on a plurality of objects.
【請求項4】最適粗サーチテンプレートによる特徴形状
パターンマッチングでは誤検出しやすい微細な特徴部分
や認識対象部分と酷似する部分については、その部分に
合った精サーチテンプレートにより特徴形状パターンマ
ッチングの場合よりは密な演算箇所で精サーチパターン
マッチングを行い、特徴形状パターンマッチングおよび
精サーチパターンマッチング双方を満足した画像データ
を検出して対象物の必要情報を画像認識する請求項1〜
請求項3のいずれかに記載のパターンマッチング方法。
4. A fine feature portion which is likely to be erroneously detected by a feature shape pattern matching using an optimal rough search template or a portion which is very similar to a recognition target portion is compared with a feature shape pattern matching by a fine search template matching the portion. Performs fine search pattern matching at dense calculation locations, detects image data that satisfies both the feature shape pattern matching and the fine search pattern matching, and recognizes necessary information of the target object.
The pattern matching method according to claim 3.
【請求項5】入力される撮像された対象物の画像データ
を記憶する画像記憶手段と、 対象物の必要情報を画像認識するのに必要な特定の部分
パターンにて8方向の空間一次微分を行い微分値の大き
い点を各一次微分プレーン上で1とした8bitのサー
チテンプレートにより粗サーチパターンマッチングを行
いパターンに合ったサーチテンプレートを教示する粗サ
ーチテンプレート教示手段と、 教示された粗サーチテンプレートにより予め設定された
所定の演算箇所およびパターン一致閾値に基づき画像記
憶手段からの画像データにつき粗サーチパターンマッチ
ングを行い検出した粗マッチングパターンを記憶すると
ともに表示する粗サーチ処理手段と、 検出された粗マッチンクパターンの人による正解/不正
解の評価に基づく正解パターンと不正解パターンとから
正解パターンに含まれ不正解パターンに含まれない特徴
形状データと不正解パターンに含まれ正解パターンに含
まれない禁止特徴形状データとを抽出して表示し、かつ
それらによる正解パターンおよび不正解パターンの検出
のための情報の過不足の教示の基に特徴データおよび禁
止特徴データを補正する最適化処理して得た特徴形状パ
ターンおよび禁止特徴形状パターンの位置データを持っ
た最適粗サーチテンプレートを生成する粗サーチテンプ
レート最適化処理部とを備え、前記粗サーチ処理手段
は、この最適粗サーチテンプレート上の特徴形状パター
ンおよび禁止特徴形状パターンの各設定位置でのみ前記
画像データとのパターンマッチングの演算を実行し、演
算の結果禁止特徴パターンとマッチングした画像データ
についてのそれ以上の処理操作を省きながら、特徴パタ
ーンとマッチングする画像データを検出して対象物の必
要情報を画像認識するパターンマッチング装置。
5. An image storage means for storing input image data of an imaged object, and a spatial partial derivative in eight directions in a specific partial pattern required for image recognition of necessary information of the object. A coarse search template teaching means for performing a coarse search pattern matching using an 8-bit search template with a point having a large differential value set to 1 on each primary differential plane and teaching a search template matching the pattern, and a coarse search template taught. Coarse search processing means for performing a coarse search pattern matching on the image data from the image storage means based on a predetermined calculation location and a pattern matching threshold set in advance and storing and displaying a detected rough matching pattern; Correct putter based on evaluation of correct / incorrect answer And extracting and displaying the feature shape data included in the correct answer pattern but not included in the incorrect answer pattern and the prohibited feature shape data included in the incorrect answer pattern and not included in the correct answer pattern, and the correct answer based on them. Optimization with correction processing of feature data and prohibition feature data based on teaching of excess and deficiency of information for detection of patterns and incorrect answer patterns Optimization with feature shape pattern and prohibition feature shape pattern position data A coarse search template optimizing processing unit for generating a coarse search template, wherein the coarse search processing means is configured to compare the image data only at each set position of the characteristic shape pattern and the prohibited characteristic shape pattern on the optimal coarse search template. Performs a pattern matching operation and results in an image that matches the prohibited feature pattern While omitting the further processing operations on over data, image recognizing pattern matching apparatus necessary information of the object by detecting the image data to feature pattern matching.
【請求項6】最適粗サーチテンプレートによる特徴形状
パターンマッチングでは誤検出しやすい微細特徴部分や
認識対象部分と酷似する部分に合った精サーチテンプレ
ートを教示する精サーチ教示手段と、 教示された精サーチテンプレートにより粗サーチパター
ンマッチングの場合よりは密な演算箇所にて画像データ
との精サーチパターンマッチングを行う精サーチ処理手
段とを備え、特徴形状パターンマッチングおよび精サー
チパターンマッチングの双方を満足するパターンを検出
して対象物の必要情報を画像認識する請求項5に記載の
パターンマッチング装置。
6. A fine search teaching means for teaching a fine search template suitable for a fine feature portion or a portion very similar to a recognition target portion, which is likely to be erroneously detected in the feature shape pattern matching using an optimum coarse search template, A fine search processing means for performing a fine search pattern matching with image data at a denser calculation location than in the case of the coarse search pattern matching by using a template, and a pattern satisfying both the feature shape pattern matching and the fine search pattern matching is provided. The pattern matching apparatus according to claim 5, wherein the pattern matching apparatus detects and recognizes necessary information of the target image.
JP2000191946A 2000-06-27 2000-06-27 Pattern matching method and device therefor Pending JP2002008028A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000191946A JP2002008028A (en) 2000-06-27 2000-06-27 Pattern matching method and device therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000191946A JP2002008028A (en) 2000-06-27 2000-06-27 Pattern matching method and device therefor

Publications (1)

Publication Number Publication Date
JP2002008028A true JP2002008028A (en) 2002-01-11

Family

ID=18691149

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000191946A Pending JP2002008028A (en) 2000-06-27 2000-06-27 Pattern matching method and device therefor

Country Status (1)

Country Link
JP (1) JP2002008028A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006120156A (en) * 2004-10-21 2006-05-11 Oce Technol Bv Device and method for automatically analyzing filled-out questionnaire
US7235411B2 (en) 2003-07-07 2007-06-26 Samsung Electronics Co., Ltd. Method for aligning a wafer and apparatus for performing the same
JP2012048593A (en) * 2010-08-30 2012-03-08 Juki Corp Image processing system
WO2013008583A1 (en) * 2011-07-14 2013-01-17 株式会社エヌ・ティ・ティ・ドコモ Object information provision device, object information provision system, terminal, and object informaiton provision method
KR101967308B1 (en) * 2017-11-20 2019-04-09 주식회사 한화 Apparatus and method for extracting charge data using image

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7235411B2 (en) 2003-07-07 2007-06-26 Samsung Electronics Co., Ltd. Method for aligning a wafer and apparatus for performing the same
JP2006120156A (en) * 2004-10-21 2006-05-11 Oce Technol Bv Device and method for automatically analyzing filled-out questionnaire
US8280300B2 (en) 2004-10-21 2012-10-02 Oce-Technologies B.V. Apparatus and method for automatically analysing a filled in questionnaire
JP2012048593A (en) * 2010-08-30 2012-03-08 Juki Corp Image processing system
WO2013008583A1 (en) * 2011-07-14 2013-01-17 株式会社エヌ・ティ・ティ・ドコモ Object information provision device, object information provision system, terminal, and object informaiton provision method
JP2013025327A (en) * 2011-07-14 2013-02-04 Ntt Docomo Inc Object information providing device, object information providing system, terminal, and object information providing method
KR101967308B1 (en) * 2017-11-20 2019-04-09 주식회사 한화 Apparatus and method for extracting charge data using image

Similar Documents

Publication Publication Date Title
JP4380838B2 (en) Video image automatic road sign recognition method, road sign automatic recognition device, and road sign automatic recognition program
US10659762B2 (en) Stereo camera
CN111512317A (en) Multi-target real-time tracking method and device and electronic equipment
CN105009170A (en) Object identification device, method, and storage medium
JP2003244521A (en) Information processing method and apparatus, and recording medium
CN112287867B (en) Multi-camera human body action recognition method and device
CN110111330B (en) Mobile phone screen detection method
JP6197340B2 (en) Image processing apparatus, image processing method, and program
JP6177541B2 (en) Character recognition device, character recognition method and program
US10074551B2 (en) Position detection apparatus, position detection method, information processing program, and storage medium
JP4517003B2 (en) Automatic road sign recognition system
JP6922348B2 (en) Information processing equipment, methods, and programs
JP3008875B2 (en) Subject extraction device
JP2007253699A (en) Optical axis deviation sensing device
JP2008152555A (en) Image recognition method and image recognition device
JP2002008028A (en) Pattern matching method and device therefor
JP2011120076A (en) Image detection apparatus and image detection method
CN109741370B (en) Target tracking method and device
CN108764110B (en) Recursive false detection verification method, system and equipment based on HOG characteristic pedestrian detector
JP2018036901A (en) Image processor, image processing method and image processing program
JPH0944676A (en) Face detector
JP2000207556A (en) Method and device for pattern matching
JPH08190690A (en) Method for determining number plate
JP2007140729A (en) Method and device detecting position and attitude of article
JP2000261787A (en) Method and system for detecting intruding object