JPH0566636B2 - - Google Patents

Info

Publication number
JPH0566636B2
JPH0566636B2 JP61044401A JP4440186A JPH0566636B2 JP H0566636 B2 JPH0566636 B2 JP H0566636B2 JP 61044401 A JP61044401 A JP 61044401A JP 4440186 A JP4440186 A JP 4440186A JP H0566636 B2 JPH0566636 B2 JP H0566636B2
Authority
JP
Japan
Prior art keywords
pattern
recognition
matching
image pattern
stored
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP61044401A
Other languages
Japanese (ja)
Other versions
JPS62202292A (en
Inventor
Masamichi Morimoto
Kazumasa Okumura
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 JP4440186A priority Critical patent/JPS62202292A/en
Publication of JPS62202292A publication Critical patent/JPS62202292A/en
Publication of JPH0566636B2 publication Critical patent/JPH0566636B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Description

【発明の詳細な説明】 産業上の利用分野 この発明は、たとえば、IC部品を回路基板に
搭載するときに必要となる撮像装置から得られる
画像パターン中に存在する特定パターンの位置を
高速に検出する、2次元位置検出のためのパター
ンマツチング方法に関するものである。
[Detailed Description of the Invention] Industrial Application Field The present invention is directed to, for example, detecting at high speed the position of a specific pattern present in an image pattern obtained from an imaging device, which is necessary when mounting IC components on a circuit board. The present invention relates to a pattern matching method for two-dimensional position detection.

従来の技術 従来のパターンマツチングによる位置検出方法
を大別すると、 1 撮像手段から得た画像パターンを一たん記憶
手段に格納した後、マイクロコンピユータなど
の中央処理手段を用い、中央処理手段に対する
命令群であるプログラムによつて画像パターン
と標準パターンの照合処理を行う方法。と、 2 撮像手段から得た画像パターンをパターンマ
ツチング処理専用の回路を通すことによつて、
画像パターンと標準パターンの照合処理を行う
方法。
BACKGROUND TECHNOLOGY Conventional position detection methods using pattern matching can be roughly divided into the following: 1. After an image pattern obtained from an imaging device is temporarily stored in a storage device, a central processing device such as a microcomputer is used to issue an instruction to the central processing device. A method of matching image patterns and standard patterns using a group of programs. 2. By passing the image pattern obtained from the imaging means through a circuit dedicated to pattern matching processing,
A method for matching image patterns and standard patterns.

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

従来IC部品の位置検出といつた生産技術の分
野では、処理の高速性という点で第2の方法を用
いることが多く、またコストの面においても画像
パターンを記憶する半導体メモリが高価であつた
ため、第2の方法が有利であつた。しかし、近年
半導体エモリの集積度が著しく高まり単位記憶容
量あたりの価格は年々低下してきたため、シフト
レジスタなどの論理素子を多数必要とする第2の
方法よりも、半導体メモリを多数必要とする第1
の方法を採用した方が安価にパターンマツチング
装置を実現できるようになつた。また第2の方法
では撮像手段から得た画像信号をリアルタイムで
処理しているために、走査方式としてインターレ
ース方式を採用している標準的なテレビカメラで
撮像した場合には、テレビカメラの出力できる走
査信号の半数の信号しか利用できないため、デジ
タル化された画像パターンの解像度を容易に上げ
ることはできないが、第1の方法ではテレビカメ
ラが出力する走査信号をデジタル情報に変換し一
たん記憶手段に格納することによつ有効に利用で
きるため、画像パターンの解像度を容易に上げる
ことができる。しかし、第1の方法は撮像手段か
ら得た画像パターンをフレームメモリなどの記憶
手段に格納してからプログラムによつてパターン
マツチングを行つているため、第2の方法に比べ
ると処理速度はかなり遅く、粗いパターンマツチ
ングと詳しいパターンマツチングを組み合せて処
理の高速化を図る試みがなされているが、第2の
方法による場合と比べると、充分高速化されたと
は言い難い。
Conventionally, in the field of production technology such as position detection of IC components, the second method was often used in terms of high-speed processing, and also in terms of cost, because semiconductor memory for storing image patterns was expensive. , the second method was advantageous. However, in recent years, the degree of integration of semiconductor memory has increased significantly, and the price per unit memory capacity has decreased year by year.
By adopting this method, it has become possible to realize a pattern matching device at a lower cost. In addition, in the second method, the image signal obtained from the imaging means is processed in real time, so if the image is captured with a standard television camera that uses the interlaced scanning method, the output of the television camera can be Since only half of the scanning signal can be used, it is not possible to easily increase the resolution of the digitized image pattern. However, in the first method, the scanning signal output from the television camera is converted into digital information and then stored in a storage means. The resolution of the image pattern can be easily increased because it can be effectively used by storing it in the image pattern. However, in the first method, the image pattern obtained from the imaging means is stored in a storage means such as a frame memory, and then pattern matching is performed by a program, so the processing speed is considerably faster than in the second method. Attempts have been made to speed up the processing by combining slow, coarse pattern matching and detailed pattern matching, but it cannot be said that the speed has been sufficiently increased compared to the second method.

発明が解決しようとする問題点 以上のように上記の第1の方法では高速処理が
難しく、また上記の第2の方法では解像度やコス
ト面において問題を有するため、高速かつ高解像
度のパターンマツチング装置を安価に実現するこ
とはできないという問題点を有していた。
Problems to be Solved by the Invention As described above, the first method described above has difficulty in high-speed processing, and the second method described above has problems in terms of resolution and cost. There was a problem in that the device could not be realized at low cost.

本発明は上記問題点に鑑み、高速で高解像度を
有するパターンマツチング装置を安価に実現する
ためのパターンマツチング方法を提供するもので
ある。
In view of the above problems, the present invention provides a pattern matching method for realizing a high-speed, high-resolution pattern matching device at low cost.

問題点を解決するための手段 上記問題点を解決するために、本発明のパター
ンマツチング方法は、認識対象物を撮像手段によ
り撮像することによつて得られる画像信号をデジ
タル化した画像パターンとして記憶手段中に保持
しておき、上記画像パターンの特徴的な部分領域
を標準パターンとしてあらかじめ上記記憶手段と
は別の記憶手段に保持しておいて、上記画像パタ
ーンと上記標準パターンの照合処理を行ない、一
致度が極大となる上記特徴的な部分領域に対応す
る認識点を検出するパターンマツチング処理にお
いて、上記2つのパターンの位置合わせの基準と
なる照合基準点を上記画像パターン上で次々と発
生させる順序を、上記画像パターン中に複数個存
在する上記特徴的な部分領域の並び方に対応して
決定するものである。
Means for Solving the Problems In order to solve the above problems, the pattern matching method of the present invention uses an image pattern obtained by digitizing an image signal obtained by imaging a recognition target object with an imaging means. A characteristic partial area of the image pattern is stored in a storage means as a standard pattern in advance in a storage means separate from the storage means, and a matching process between the image pattern and the standard pattern is performed. In the pattern matching process that detects the recognition point corresponding to the characteristic partial area where the matching degree is maximum, matching reference points that serve as the reference for alignment of the two patterns are successively set on the image pattern. The order of generation is determined in accordance with the arrangement of a plurality of characteristic partial areas in the image pattern.

またさらに第2の発明は、第1の発明に加え画
像パターン中に複数個存在する特徴的な部分領域
が規則的に並んでいる場合に、隣り合つた上記特
徴的な部分領域間の位置関係を通常の認識処理に
先だつて保持しておき、通常の認識処理において
特徴的な部分領域を代表する位置である認識点を
初めて検出した時に、あらかじめ保持しておいた
上記隣り合つた特徴的な部分領域間の位置関係を
用いて、上記初めて検出した認識点の隣りに存在
する第2の認識点の存在範囲を小さな領域に限定
することによつて、第2の認識点を高速に検出
し、また第n(nは2以上の正の整数)の認識点
が存在する場合には、第n−1の認識点が存在す
る位置から上記隣り合つた特徴的な部分領域間の
位置関係を用いて上記nの認識点が存在する範囲
を小さな領域に限定し、上記第nの認識点を検出
するパターンマツチング方法である。
Furthermore, in addition to the first invention, a second invention provides a positional relationship between adjacent characteristic partial areas when a plurality of characteristic partial areas in an image pattern are regularly arranged. is retained prior to normal recognition processing, and when a recognition point, which is a position representing a characteristic partial area, is detected for the first time in normal recognition processing, the adjacent characteristic The second recognition point can be detected at high speed by limiting the existence range of the second recognition point adjacent to the recognition point detected for the first time to a small area using the positional relationship between the partial areas. , if there is an n-th recognition point (n is a positive integer of 2 or more), calculate the positional relationship between the adjacent characteristic partial areas from the position where the n-1st recognition point exists. In this pattern matching method, the range in which the n recognition points exist is limited to a small area using the n-th recognition point, and the n-th recognition point is detected.

また、第3の発明は第1の発明に加え画像パタ
ーン中に複数個存在する特徴的な部分領域が規則
的に並んでいない場合に、複数個の特徴的な部分
領域間の位置関係を通常の認識処理に先だつて保
持しておき、通常の認識処理において特徴的な部
分領域を代表する位置である認識点を初めて検出
した時に、あらかじめ保持しておいた上記複数個
の特徴的な部分領域間の位置関係を用いて、まだ
検出されていない特徴的な部分領域に対応する認
識点の存在範囲を小さな領域に限定することによ
つて、上記画像パターン中に複数個存在する認識
点を検出することを特徴とするパターンマツチン
グ方法を構成として有するものである。
In addition to the first invention, the third invention also provides a method for normally determining the positional relationship between a plurality of characteristic partial areas in an image pattern when the plurality of characteristic partial areas are not arranged regularly. When a recognition point, which is a position representing a characteristic partial area, is detected for the first time in normal recognition processing, the plurality of characteristic partial areas previously held are stored prior to recognition processing. Detect multiple recognition points in the image pattern by limiting the range of recognition points corresponding to characteristic partial areas that have not yet been detected to a small area using the positional relationship between them. The present invention has a pattern matching method characterized in that:

作 用 上記技術的手段による作用を図面を参照しなが
ら説明する。
Effect The effect of the above technical means will be explained with reference to the drawings.

第2図は画像パターン中において照合基準点を
走査する方向および順序を示したもので、照合基
準点をx方向に走査しながらy方向に移動する方
式(以下y−x走査方式と呼ぶ)21,22,2
3,24と、照合基準点をy方向に走査しながら
x方向に移動する方式(以下x−y走査方式と呼
ぶ)25,26,27,28があり、それぞれx
方向、y方向の符号によつて4種に分類されてい
る。
Figure 2 shows the direction and order in which the reference points are scanned in the image pattern. A method in which the reference points are scanned in the x direction and moved in the y direction (hereinafter referred to as the y-x scanning method)21 ,22,2
3, 24, and methods 25, 26, 27, and 28 in which the reference point is scanned in the y direction and moved in the x direction (hereinafter referred to as the x-y scanning method).
It is classified into four types depending on the direction and the y-direction code.

第3図は認識対象物であるIC部品のリードの
画像パターン31、画像パターンの特徴的な部分
領域を切り出した標準パターン32、標準パター
ン側の照合基準点33、3点の認識点34,3
5,36を示している。この画像パターン31に
対して市販の撮像管カメラと同じ方式(第2図の
21)で照合基準点を走査し、標準パターン32
と照合処理を行うと、認識点34、認識点36、
認識点35の順で3点の認識点が検出されてしま
い、認識点検出後、各認識点の座標によつて検出
された認識点データの記憶順序を変更し、認識点
データとリードとの対応をとる必要が生じる。と
ころが、照合基準点の走査方式としてx−y走査
方式(たとえば第2図の25)を採用すれば、認
識点34、認識点35、認識点36のリードが並
んでいる順で認識点が検出され、認識点データの
記憶順序を変更しなくても認識点データとリード
との対応がとれるばかりでなく、必要な点数の認
識点が得られた時点で処理を中止(たとえば第3
図において左から2本目のリードに対する認識点
座標が必要なときには、認識点35が得られた時
点で処理を中止)することによつてパターンマツ
チング処理を短時間で終了させることもできる。
このように画像パターン中に複数個の存在する特
徴的な部分領域がx方向に並んでいる場合にはx
−y走査方式を、y方向に並んでいる場合にはy
−x走査方式を採用して照合基準点を発生させて
照合処理を行うことによつて、IC部品のリード
に対応づけられた認識点を直接得ることができ、
上述した理由によりパターンマツチング処理の高
速化が図れる。また画像パターン中における特徴
的な部分領域の位置に応じて照合基準上の走査方
向であるx、y方向の符号を定めるようにすれ
ば、走査開始位置からできる限り近い位置におい
て認識点を検出することができ、このこともパタ
ーンマツチング処理の高速化に役立てることがで
きる。
Figure 3 shows an image pattern 31 of a lead of an IC component that is an object to be recognized, a standard pattern 32 obtained by cutting out a characteristic partial area of the image pattern, a reference point 33 for comparison on the standard pattern side, and three recognition points 34, 3.
5,36 is shown. This image pattern 31 is scanned for reference points using the same method as a commercially available image pickup tube camera (21 in Fig. 2), and the standard pattern 31 is scanned.
When the matching process is performed, recognition points 34, recognition points 36,
Three recognition points were detected in the order of recognition point 35, and after the recognition point was detected, the storage order of the detected recognition point data was changed according to the coordinates of each recognition point, and the recognition point data and lead were It becomes necessary to take action. However, if the x-y scanning method (for example, 25 in Fig. 2) is adopted as the scanning method for the comparison reference points, the recognition points will be detected in the order in which the leads of recognition point 34, recognition point 35, and recognition point 36 are lined up. This not only allows correspondence between recognition point data and leads without changing the storage order of recognition point data, but also stops processing when the required number of recognition points is obtained (for example, the third
When the recognition point coordinates for the second lead from the left in the figure are required, the pattern matching process can be completed in a short time by stopping the process when the recognition point 35 is obtained.
In this way, when multiple characteristic partial areas exist in an image pattern and are lined up in the x direction, x
-y scanning method, if they are lined up in the y direction, y
-By adopting the x-scanning method to generate a reference point for comparison and performing the comparison process, it is possible to directly obtain the recognition point associated with the lead of the IC component.
For the above-mentioned reasons, the pattern matching process can be speeded up. Furthermore, if the codes of the x and y directions, which are the scanning directions on the matching standard, are determined according to the position of a characteristic partial area in the image pattern, the recognition point can be detected at a position as close as possible to the scanning start position. This can also be used to speed up pattern matching processing.

第2図に示されている8種数類の走査方式のう
ちのどの走査方式を採用するかは、教示処理時に
得られる認識点の座標によつて自動的に決定され
る。教示処理時に得られた認識点が1個の場合に
は、画像パターンの4つの隅の中で認識点に最も
近い位置がパターンマツチング処理の開始点とし
て選ばれ、x−y、y−xのどちらかの走査方式
が選ばれるかは認識点のx、y座標値によつて、
早く検出される方式が採用される。教示処理時に
得られた認識点が調整個の場合には、複数個の認
識点のx、y座標値を分析することによつて規則
的に並んだ認識点を抽出し、その時の認識点の並
び方によつてx−y、y−xのどちらかの走査方
式が自動的に決定される。
Which scanning method to adopt among the eight types of scanning methods shown in FIG. 2 is automatically determined based on the coordinates of the recognition point obtained during the teaching process. If only one recognition point is obtained during the teaching process, the position closest to the recognition point among the four corners of the image pattern is selected as the starting point of the pattern matching process, and x-y, y-x Which scanning method is selected depends on the x and y coordinate values of the recognition point.
A method that can be detected quickly is adopted. If the recognition points obtained during the teaching process are adjusted, the recognition points arranged regularly are extracted by analyzing the x and y coordinate values of multiple recognition points, and the recognition points at that time are Depending on the arrangement, either the x-y or y-x scanning method is automatically determined.

第4図は画像パターン中の特徴的な部分領域が
規則的に並んでいる場合に最初の認識点41検出
後、第2番目以降の認識点42,43の検出にお
いては、それぞれ一つ前に検出された認識点4
1,42から教示諸理時に記憶されている移動量
だけ移動し、それぞれ移動した点44,45にお
いて移動した点44,45が中心となるように小
領域46,47を設定し、第2番目以降の認識点
42,43を検出するためのパターンマツチング
処理を行う領域がこの小領域46,47に限定さ
れて、処理の高速化が図られることを示してい
る。
FIG. 4 shows that when characteristic partial areas in an image pattern are regularly arranged, after the first recognition point 41 is detected, when detecting the second and subsequent recognition points 42 and 43, Detected recognition point 4
1 and 42 by the amount of movement stored at the time of teaching, and set small areas 46 and 47 so that the moved points 44 and 45 are the centers of the moved points 44 and 45, respectively, and This shows that the area in which the pattern matching process for detecting the subsequent recognition points 42 and 43 is performed is limited to these small areas 46 and 47, thereby speeding up the process.

第5図は画像パターン中の特徴的な部分領域が
規則的に並んでいない場合にも最初の認識点51
検出後、第2番目以降の認識点の検出において
は、最初の認識点51から教示的にあらかじめ記
憶されている移動量52,53だけ移動した点5
4,55が中心となるように小領域56,57を
設定し、第2番目以降の認識点を検出するための
パターンマツチング処理を行う領域がこの小領域
46,47に限定されて、処理の高速化が図られ
ることを示している。ただしこの図では、画像パ
ターン上での照合基準点の走査は、第2図26の
方式により行われることを仮定している。
FIG. 5 shows the initial recognition point 51 even when the characteristic partial areas in the image pattern are not arranged regularly.
After detection, in detecting the second and subsequent recognition points, point 5 is moved from the first recognition point 51 by the amount of movement 52, 53 that is pre-stored in teaching.
Small areas 56 and 57 are set so that points 4 and 55 are at the center, and the areas where pattern matching processing for detecting the second and subsequent recognition points is performed are limited to these small areas 46 and 47. This shows that the speed can be increased. However, in this figure, it is assumed that the scanning of the matching reference point on the image pattern is performed by the method shown in FIG. 26.

以上の作用により、中央処理手段および中央処
理手段に対する命令群であるプログラムによつ
て、画像パターンと標準パターンとのパターンマ
ツチング処理を行つても、安価で高速処理が可能
なパターンマツチング装置を実現することができ
る。
As a result of the above operations, a pattern matching device capable of performing pattern matching processing between an image pattern and a standard pattern at low cost and at high speed can be achieved using the central processing means and a program which is a group of instructions for the central processing means. It can be realized.

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

第1図は本発明の実施例におけるパターンマツ
チング方法のブロツク図を示すものである。第1
図において、中央処理手段1(中央処理手段に対
する命令群も含む)からの命令によつて撮像手段
2より得られた画像信号が2値化手段3によつて
2値化され、画像パターンとなつて画像パターン
記憶手段4に記憶される。通常のパターンマツチ
ング処理に先立つて行われる教示処理では、中央
処理手段からの命令に基づいて教示処理手段5が
画像パターン記憶手段4から画像パターン中の特
徴的な部分領域である標準パターンを切り出し、
標準パターン記憶手段6に記憶する。教示時のパ
ターンマツチング処理は中央処理手段1からの命
令により照合基準点走査手段7が画像パターン上
に設定する照合基準点を第2図21に示される順
序で定めて画像パターン記憶手段6より画像パタ
ーンデータを読み出し、階層化パターンマツチン
グ手段8において標準パターン記憶手段6から読
み出された標準パターンデータとの照合が行われ
る。照合の結果、充分高い一致度が得られた照合
基準点は認識点として、その座標データ(以下認
識点データと呼ぶ)が認識点記憶手段9に送られ
保持される。中央処理手段1は、画像パターン全
域に対してパターンマツチング手段が終了するま
で、照合基準点走査手段7と階層化パターンマツ
チング手段8に対してそれぞれ命令を発する。画
像パターン全域に対するパターンマツチング処理
が終了すると、認識点記憶手段9に保持されてい
る複数個の認識点データは認識点分析手段10に
送られ、認識点の点数および並び方が分析され画
像パターン上に発生させる照合基準点の走査方式
が自動的に決定されて、その結果は照合基準点走
査手段7に送られる。また、認識点分析手段10
によつて認識点が規則的に並んでいると判断され
た時には、認識点データより隣り合つた認識点の
x方向、y方向の移動量の平均値がそれぞれ計算
されて、移動量記憶手段11に保持される。
FIG. 1 shows a block diagram of a pattern matching method in an embodiment of the present invention. 1st
In the figure, an image signal obtained from an imaging means 2 according to a command from a central processing means 1 (including a group of commands for the central processing means) is binarized by a binarization means 3 to form an image pattern. The image pattern is stored in the image pattern storage means 4. In the teaching process performed prior to the normal pattern matching process, the teaching processing means 5 cuts out a standard pattern, which is a characteristic partial area in the image pattern, from the image pattern storage means 4 based on a command from the central processing means. ,
The standard pattern is stored in the standard pattern storage means 6. In the pattern matching process at the time of teaching, the matching reference point scanning means 7 determines the matching reference points to be set on the image pattern in the order shown in FIG. The image pattern data is read out and compared with the standard pattern data read out from the standard pattern storage means 6 in the hierarchical pattern matching means 8. As a result of the matching, the matching reference points for which a sufficiently high degree of matching has been obtained are treated as recognition points, and their coordinate data (hereinafter referred to as recognition point data) is sent to the recognition point storage means 9 and stored therein. The central processing means 1 issues commands to the verification reference point scanning means 7 and the hierarchical pattern matching means 8, respectively, until the pattern matching means is completed for the entire image pattern. When the pattern matching process for the entire area of the image pattern is completed, the plurality of recognition point data held in the recognition point storage means 9 is sent to the recognition point analysis means 10, where the number and arrangement of recognition points are analyzed. The scanning method for the verification reference point to be generated is automatically determined, and the result is sent to the verification reference point scanning means 7. In addition, the recognition point analysis means 10
When it is determined that the recognition points are regularly arranged, the average values of the amounts of movement in the x and y directions of adjacent recognition points are calculated from the recognition point data and stored in the movement amount storage means 11. is maintained.

通常のパターンマツチ処理では、まず中央処理
手段1からの命令によつて撮像手段2から得られ
た画像信号が2値手段3によつて2値化され、画
像パターンとなつて画像パターン記憶手段4に改
めて記憶される。この画像パターンは教示処理時
に標準パターン記憶手段6に保持されている標準
パターンと階層化パターンマツチング手段8によ
つて照合される。階層化パターンマツチング手段
8では、画像パターン上に数画素おきに粗く第1
の照合基準点を設定し、第1の照合基準点におい
て照合を行い、充分高い一致度が得られた場合に
は第1の照合基準点の近傍に第2の照合基準点を
1画素おきに複数個設けて、複数個の第2の照合
基準点において再び照合を行い、得られた複数個
の一致度のうちで最大になつた値があらかじめ定
めらてれている基準値以上であれば認識点として
検出するという処理を行つている。この階層化パ
ターンマツチング手段8によれば、照合基準点を
1画素おきに設定する通常のパターンマツチング
手段に比べて、画素パターンデータと標準パター
ンデータの照合回数を大幅に減らすことが可能に
なる。
In normal pattern matching processing, an image signal obtained from the imaging means 2 is first binarized by the binary means 3 according to a command from the central processing means 1, and is converted into an image pattern by the image pattern storage means 4. will be remembered again. This image pattern is compared with the standard pattern held in the standard pattern storage means 6 by the hierarchical pattern matching means 8 during the teaching process. The hierarchical pattern matching means 8 roughly matches the first pattern every several pixels on the image pattern.
Set a matching reference point, perform matching at the first matching reference point, and if a sufficiently high degree of matching is obtained, set a second matching reference point every other pixel near the first matching reference point. If a plurality of matching points are provided and the matching is performed again at the plurality of second matching reference points, and the maximum value among the obtained plurality of matching degrees is greater than or equal to a predetermined reference value. Processing is performed to detect it as a recognition point. According to this hierarchical pattern matching means 8, it is possible to significantly reduce the number of times pixel pattern data and standard pattern data are matched, compared to a normal pattern matching means that sets matching reference points for every other pixel. Become.

またこの時、画像パターン上に数画素間隔で
次々と設定される第1の照合基準点の設定順序
は、教示処理時に認識点分析手段10によつて自
動的に決定され照合基準点走査手段7に保持され
ており、第2図に示される8種類の走査方式の中
のどれか一つが選ばれることになる。
Further, at this time, the setting order of the first matching reference points, which are set one after another at intervals of several pixels on the image pattern, is automatically determined by the recognition point analysis means 10 during the teaching process, One of the eight scanning methods shown in FIG. 2 is selected.

以上のようにしてパターンマツチング処理を行
つて、最初の認識点が検出されると、中央処理手
段は階層化パターンマツチング手段8に命令を発
して、検出した認識点データを認識点記憶手段9
に格納するとともに、認識点データを小領域発生
手段12へ送る。小領域発生手段12では移動量
記憶手段10よりx方向およびy方向の移動デー
タをもらい、認識点データである認識点のx座
標、y座標にそれぞれの移動量を加えて第2番目
の認識点が存在する小領域の中心位置座標を計算
する。そしてこの小領域の大きさはx方向、y方
向の移動量より計算される移動距離、認識対象物
の寸法精度、認識対象物を撮像した時の撮像手段
に対する認識対象物の回転角度などに応じてあら
かじめ定められた計算式に基づいて計算される。
第2番目の認識点の検出は、処理対象領域をこの
ようにして求められた小領域に限定し、中央処理
手段1からの命令により照合基準点走査手段7が
この小領域内に照合基準点を発生させ、階層化パ
ターンマツチング手段8により各照合基準点にお
いて画像パターンと標準パターンとの照合処理を
行うことによつて高速に行われる。そして求めら
れた第2番目の認識点データは最初の認識点デー
タ同様、認識点記憶手段9と小領域発生手段12
に送られて、第2番目の認識点検出時と同様の手
順によつて第3番目の認識点検出が行われる。通
常のパターンマツチング処理では、新たに設定し
た小領域が画像パターンの窓枠から完全に外へ出
るか、設定した小領域内において認識点が検出さ
れなかつたか、あるいはパターンマツチング処理
時にあらかじめ定められた点数の認識点が得られ
た場合に終了することになる。パターンマツチン
グ処理終了後、認識点記憶手段9に保持されてい
る複数個の認識点データはパターンマツチング処
理の出力として上位コントローラ13に送られ
る。
When the pattern matching process is performed as described above and the first recognition point is detected, the central processing means issues a command to the hierarchical pattern matching means 8 to store the detected recognition point data in the recognition point storage means. 9
At the same time, the recognition point data is sent to the small area generating means 12. The small area generation means 12 receives movement data in the x direction and y direction from the movement amount storage means 10, and adds the respective movement amounts to the x and y coordinates of the recognition point, which is the recognition point data, to obtain a second recognition point. Calculate the center position coordinates of the small area where exists. The size of this small area depends on the movement distance calculated from the amount of movement in the x and y directions, the dimensional accuracy of the recognition target, and the rotation angle of the recognition target with respect to the imaging means when the image of the recognition target is captured. It is calculated based on a predetermined calculation formula.
In detecting the second recognition point, the processing target area is limited to the small area obtained in this way, and the matching reference point scanning means 7 detects the matching reference point within this small area based on an instruction from the central processing means 1. The hierarchical pattern matching means 8 performs a matching process between the image pattern and the standard pattern at each matching reference point, thereby performing the matching process at high speed. The obtained second recognition point data is stored in the recognition point storage means 9 and the small area generation means 12 as well as the first recognition point data.
The third recognition point is detected using the same procedure as the second recognition point detection. In normal pattern matching processing, the newly set small area completely falls outside the window frame of the image pattern, or no recognition point was detected within the set small area, or the newly set small area The process ends when the number of recognition points obtained is obtained. After the pattern matching process is completed, the plurality of recognition point data held in the recognition point storage means 9 is sent to the host controller 13 as an output of the pattern matching process.

次に、実際の画像パターンに対し本発明のパタ
ーンマツチング方法によつて認識点が高速に検出
される様を、図面を参照しながら説明する。
Next, how recognition points are detected at high speed by the pattern matching method of the present invention for an actual image pattern will be explained with reference to the drawings.

第6図は2種類の標準パターン61,62、
IC部品のリードを撮像して得た画像パターン6
3、標準パターン63に対して検出される認識点
64,65,66、および標準パターン62に対
して検出される認識点67,68,69を示して
いる。標準パターン61でパターンマツチング処
理を行う時には、教示処理時に画像パターン上の
特徴的な部分領域がx方向に並んでいることを認
識点分析手段により判明し、x−y走査方式が自
動的に採用されるが、このときの走査方向は、第
2図における26か28の走査方向に限られる。
第2図における25や27の走査方向が採用され
ないのは、撮像されたIC部品のリードが画像パ
ターン上に何本存在しているかわからないためで
ある。第2図における26か28の走査方向を採
用すれば、認識点は66,65,64の順で検出
され、これらの認識点はIC部品のリードの右か
ら数えて1本目、2本目、3本目に相当するた
め、認識点データが記憶されている順で右から数
えたIC部品のリードに対応している。第2図に
おける26か28の走査方式によれば、照合開始
点から最初に検出される認識点76まではやや処
理時間を要するが、第2番目の認識点65、第3
番目の認識点64の検出は、教示処理時に保持さ
れている認識点間の移動距離に基づいて小領域が
設定されて、パターンマツチング処理がこの小領
域内に限定されるため高速に行われる。また標準
パターン62でパターンマツチング処理を行う時
には、第2図における23か24のy−x走査方
式が教示処理において自動的に採用されて、認識
点を69,68,67の順で検出する。画像パタ
ーン中に存在する全ての認識点データではなくて
特定の認識点データのみが必要な時には、その認
識点データが得られた時点で処理を終了させるこ
とによつてパターンマツチング処理を高速化する
ことができる。たとえば第6図において、標準パ
ターン62でパターンマツチング処理を行う時
は、第2図の23から24の走査方式を採用する
ことになるが、仮に下から2本目のリードに対す
る認識点データが必要な時には、認識点68が検
出された時点で処理を終了させ、認識点67の検
出は行わないことにすると、処理時間が短縮され
る。
Figure 6 shows two types of standard patterns 61, 62,
Image pattern 6 obtained by imaging the leads of IC components
3. Recognition points 64, 65, and 66 detected for the standard pattern 63 and recognition points 67, 68, and 69 detected for the standard pattern 62 are shown. When performing pattern matching processing using the standard pattern 61, the recognition point analysis means finds that characteristic partial areas on the image pattern are lined up in the x direction during teaching processing, and the x-y scanning method is automatically activated. However, the scanning direction at this time is limited to scanning directions 26 or 28 in FIG.
The reason why the scanning directions 25 and 27 in FIG. 2 are not adopted is because it is not known how many leads of the imaged IC component are present on the image pattern. If the scanning direction of 26 or 28 in Fig. 2 is adopted, the recognition points are detected in the order of 66, 65, and 64, and these recognition points are the first, second, and third leads counting from the right of the IC component lead. Since this corresponds to the main part, it corresponds to the leads of IC parts counted from the right in the order in which recognition point data are stored. According to the 26 or 28 scanning method in FIG.
Detection of the th recognition point 64 is performed at high speed because a small area is set based on the moving distance between the recognition points held during the teaching process, and the pattern matching process is limited to this small area. . Furthermore, when performing pattern matching processing using the standard pattern 62, the y-x scanning method of 23 or 24 in Fig. 2 is automatically adopted in the teaching processing, and recognition points are detected in the order of 69, 68, and 67. . When only specific recognition point data is required instead of all recognition point data existing in an image pattern, pattern matching processing can be speeded up by terminating the process when that recognition point data is obtained. can do. For example, in Figure 6, when performing pattern matching processing with standard pattern 62, the scanning method from 23 to 24 in Figure 2 will be adopted, but if recognition point data for the second lead from the bottom is required. In such a case, the processing time can be shortened by terminating the process when the recognition point 68 is detected and not detecting the recognition point 67.

以上のように、画像パターン中に複数個存在す
る特徴的な部分領域の位置および並び方に応じて
画像パターン中で照合基準点を次々発生させる方
向および順序を自動的に定めることによつて、特
徴的な部分領域が規則的に並んでいる場合には、
あらかじめ保持しておいたこの特徴的な部分領域
に対応する認識点の隣り合つた2点間の移動量を
基にして、第2番目以降の認識点を求めるための
処理領域を小領域に限定することによつて、また
特徴的な部分領域が規則的に並んでいない場合に
おいても、あらかじめ保持しておいた複数個の特
徴的な部分領域に対応する認識間の移動量に基づ
いて、以降の認識点が存在する領域を小領域に限
定することによつて、処理の高速化を図つてお
り、しかも、中央処理手段と中央処理手段に対す
る命令群であるプログラムによつてパターンマツ
チング処理を行つているため安価に実現すること
ができる。
As described above, by automatically determining the direction and order in which matching reference points are generated one after another in an image pattern according to the position and arrangement of a plurality of characteristic partial areas in the image pattern, the characteristic When the subregions are arranged regularly,
Based on the amount of movement between two adjacent recognition points corresponding to this characteristic partial area that has been stored in advance, the processing area for determining the second and subsequent recognition points is limited to a small area. Even if the characteristic partial areas are not arranged regularly, the following steps can be performed based on the amount of movement between recognitions corresponding to multiple characteristic partial areas stored in advance. By limiting the region in which the recognition points exist to a small region, the processing speed is increased.Moreover, the pattern matching processing is performed by the central processing means and a program that is a group of instructions for the central processing means. It can be realized at low cost because it is done in advance.

発明の効果 以上のように本発明は、画像パターン上に複数
個存在する特徴的な部分領域の位置および並び方
に応じて、画像パターン中で照合基準点を次々と
発生させる方向および順序を定めることによつ
て、画像パターン中に存在する特徴的な部分領域
と対応がとれる状態で認識点が検出され、パター
ンマツチング処理終了後に検出された認識点デー
タを記憶する順序を変更する必要がなく、処理が
行なえるものである。さらに第2、第3の発明で
は数字処理時に得られた認識点座標から、特徴的
な部分領域に対応する認識点の隣り合う点間の移
動量の平均値を求めて保持しておき、通常の認識
処理時には最初の認識点検出後、第2番目以降の
認識点の検出に関しては、上記移動量に基づいて
次の認識点が存在する領域を小領域に限定し、こ
の小領域内のみパターンマツチング処理を行えば
よいことになる。このことにより、中央処理手段
と中央処理手段に対する命令群であるプログラム
によつてパターンマツチング処理を行う場合にお
いても高速処理が可能となり、高解像度を有しか
つ高速処理が可能なパターンマツチング装置を安
価に実現することができる。
Effects of the Invention As described above, the present invention determines the direction and order in which matching reference points are generated one after another in an image pattern, depending on the position and arrangement of a plurality of characteristic partial areas on the image pattern. As a result, recognition points are detected in a state that corresponds to characteristic partial areas existing in the image pattern, and there is no need to change the order in which the detected recognition point data is stored after the pattern matching process is completed. It can be processed. Furthermore, in the second and third inventions, from the recognition point coordinates obtained during numerical processing, the average value of the amount of movement between adjacent points of recognition points corresponding to characteristic partial areas is calculated and held. During the recognition process, after the first recognition point is detected, for the detection of the second and subsequent recognition points, the area where the next recognition point exists is limited to a small area based on the above movement amount, and the pattern is detected only within this small area. All that is required is a matching process. This makes it possible to perform high-speed processing even when performing pattern matching processing using the central processing means and a program that is a group of instructions for the central processing means, thereby creating a pattern matching device that has high resolution and is capable of high-speed processing. can be realized at low cost.

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

第1図は本発明の一実施例であるパターンマツ
チング方法の構成を示すブロツク図、第2図は画
像パターン上において照合基準点を走査する8種
類の方式を示す図、第3図は照合基準点の走査方
式によつては特徴的な部分領域の並んでいる順に
認識点が検出されないことを示す図、第4図は特
徴的な部分領域が規則的に並んでいる場合に第2
番目以降の認識点検検出のための処理領域を小領
域に限定することによつて処理を高速化すること
を示す図、第5図は特徴的な部分領域が規則的に
並んでいない場合にも処理を高速化できることを
示す図、第6図は認識対象物であるIC部品のリ
ードが実際に認識点として検出される様を示す図
である。 1……中央処理手段、2……撮像手段、4……
画像パターン記憶手段、5……教示処理手段、6
……標準パターン記憶手段、7……照合基準点走
査手段、8……階層化パターンマツチング手段、
10……認識点分析手段、12……小領域発生手
段、21,22,23,24……y−x走査方
式、25,26,27,28……x−y走査方
式、31……画像パターン、32……標準パター
ン、34,35,36……認識点、41,42,
43……認識点、46,47……認識処理対象小
領域、52,53……最初の認識点からの移動
量、56,57……認識処理対象小領域、61,
62……標準パターン、64,65,66……6
1に対する認識点、67,68,69……62に
対する認識点。
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 eight types of methods for scanning a matching reference point on an image pattern, and Fig. 3 is a diagram showing the configuration of a pattern matching method that is an embodiment of the present invention. Figure 4 shows that recognition points are not detected in the order in which characteristic partial areas are lined up depending on the reference point scanning method.
Figure 5 shows how to speed up the processing by limiting the processing area for subsequent recognition check detection to a small area. FIG. 6 is a diagram showing how the lead of an IC component, which is an object to be recognized, is actually detected as a recognition point. 1...Central processing means, 2...Imaging means, 4...
Image pattern storage means, 5...Teaching processing means, 6
... Standard pattern storage means, 7 ... Verification reference point scanning means, 8 ... Hierarchical pattern matching means,
10... Recognition point analysis means, 12... Small area generation means, 21, 22, 23, 24... y-x scanning method, 25, 26, 27, 28... x-y scanning method, 31... Image Pattern, 32... Standard pattern, 34, 35, 36... Recognition point, 41, 42,
43...Recognition point, 46,47...Small area to be processed for recognition, 52,53...Movement amount from the first recognition point, 56,57...Small area to be processed for recognition, 61,
62...Standard pattern, 64, 65, 66...6
Recognition points for 1, recognition points for 67, 68, 69...62.

Claims (1)

【特許請求の範囲】 1 リードを有する電子部品を撮像手段により撮
像することによつて得られる画像信号をデジタル
化した画像パターンとして記憶手段中に保持して
おき、上記画像パターンの特徴的な部分領域を標
準パターンとしてあらかじめ上記記憶手段とは別
の記憶手段に保持しておいて、上記画像パターン
と上記標準パターンの照合処理を行ない、一致度
が極大となる上記特徴的な部分領域に対応する認
識点を検出するパターンマツチング処理におい
て、上記2つのパターンの位置合わせの基準とな
る照合基準点をリードの存在しない外側よりリー
ドの存在する内側に向つてリードの延出方向と平
行に走査するパターンマツチング方法。 2 リードを有する電子部品を撮像手段により撮
像することによつて得られる画像信号をデジタル
化した画像パターンとして記憶手段中に保持して
おき、上記画像パターンの特徴的な部分領域を標
準パターンとしてあらかじめ上記記憶手段とは別
の記憶手段に保持しておいて、上記画像パターン
と上記標準パターンの照合処理を行ない、一致度
が極大となる上記特徴的な部分領域に対応する認
識点を検出するパターンマツチング処理におい
て、上記2つのパターンの位置合わせの基準とな
る照合基準点を上記画像パターン上で次々と発生
させる順序を、上記画像パターン中に複数個存在
する上記特徴的な部分領域の並び方に対応して決
定するパターンマツチング方法であつて、画像パ
ターン中に複数個存在する特徴的な部分領域が規
則的に並んでいる場合に、隣り合つた上記特徴的
な部分領域間の位置関係を通常の認識処理に先だ
つて保持しておき、通常の認識処理において特徴
的な部分領域を代表する位置である認識点を初め
て検出した時に、あらかじめ保持しておいた上記
隣り合つた特徴的な部分領域間の位置関係を用い
て、上記初めて検出した認識点の隣りに存在する
第2の認識点の存在範囲を小さな領域に限定する
ことによつて、第2の認識点を高速に検出し、ま
た第n(nは2以上の正の整数)の認識点が存在
する場合には、第n−1の認識点が存在する位置
から上記隣り合つた特徴的な部分領域間の位置関
係を用いて上記第nの認識点が存在する範囲を小
さな領域に限定し、上記第nの認識点を検出する
パターンマツチング方法。 3 リードを有する電子部品を撮像手段により撮
像することによつて得られる画像信号をデジタル
化した画像パターンとして記憶手段中に保持して
おき、上記画像パターンの特徴的な部分領域を標
準パターンとしてあらかじめ上記記憶手段とは別
の記憶手段に保持しておいて、上記画像パターン
と上記標準パターンの照合処理を行ない、一致度
が極大となる上記特徴的な部分領域に対応する認
識点を検出するパターンマツチング処理におい
て、上記2つのパターンの位置合わせの基準とな
る照合基準点を上記画像パターン上で次々と発生
させる順序を、上記画像パターン中に複数個存在
する上記特徴的な部分領域の並び方に対応して決
定するパターンマツチング方法であつて、画像パ
ターン中に複数個存在する特徴的な部分領域が規
則的に並んでいない場合には、上記複数個の特徴
的な部分領域間の位置関係を通常の認識処理に先
だつて保持しておき、通常の認識処理において特
徴的な部分領域を代表する位置である認識点を初
めて検出した時に、あらかじめ保持しておいた上
記複数個の特徴的な部分領域間の位置関係を用い
て、まだ検出されていない特徴的な部分領域に対
応する認識点の存在範囲を小さな領域に限定する
ことによつて、上記画像パターン中に複数個存在
する認識点を検出することを特徴とするパターン
マツチグ方法。
[Scope of Claims] 1. An image signal obtained by capturing an image of an electronic component having a lead using an image capturing device is stored in a storage device as a digitized image pattern, and a characteristic portion of the image pattern is stored in a storage device. The region is stored in advance as a standard pattern in a storage means different from the storage means, and the image pattern and the standard pattern are matched to correspond to the characteristic partial region where the degree of matching is maximum. In the pattern matching process for detecting recognition points, a matching reference point, which serves as a reference for alignment of the two patterns, is scanned from the outside where no lead exists toward the inside where the lead exists, parallel to the direction in which the lead extends. Pattern matching method. 2. An image signal obtained by imaging an electronic component having leads with an imaging means is stored in a storage means as a digitized image pattern, and a characteristic partial area of the image pattern is preliminarily set as a standard pattern. A pattern that is stored in a storage means separate from the storage means and that performs a matching process between the image pattern and the standard pattern to detect a recognition point corresponding to the characteristic partial area where the degree of matching is maximum. In the matching process, the order in which matching reference points, which serve as a reference for alignment of the two patterns, are generated one after another on the image pattern is determined based on the arrangement of the plurality of characteristic partial areas in the image pattern. This is a pattern matching method that determines the positional relationship between adjacent characteristic partial areas when a plurality of characteristic partial areas exist in an image pattern and are arranged regularly. The adjoining characteristic portions are stored in advance of normal recognition processing, and when a recognition point is detected for the first time, which is a position representing a characteristic partial area in normal recognition processing, the adjacent characteristic portions are stored in advance. Detecting the second recognition point at high speed by limiting the existence range of the second recognition point adjacent to the recognition point detected for the first time to a small area using the positional relationship between the areas, In addition, if there is an n-th recognition point (n is a positive integer of 2 or more), the positional relationship between the adjacent characteristic partial areas is used from the position where the n-1st recognition point exists. A pattern matching method for detecting the n-th recognition point by limiting the range in which the n-th recognition point exists to a small area. 3. An image signal obtained by imaging an electronic component having leads with an imaging means is stored in a storage means as a digitized image pattern, and a characteristic partial area of the image pattern is stored in advance as a standard pattern. A pattern that is stored in a storage means separate from the storage means and that performs a matching process between the image pattern and the standard pattern to detect a recognition point corresponding to the characteristic partial area where the degree of matching is maximum. In the matching process, the order in which matching reference points, which serve as a reference for alignment of the two patterns, are generated one after another on the image pattern is determined based on the arrangement of the plurality of characteristic partial areas in the image pattern. This is a pattern matching method that determines the correspondence, and when a plurality of characteristic partial areas in an image pattern are not arranged regularly, the positional relationship between the plurality of characteristic partial areas is determined. is stored prior to normal recognition processing, and when a recognition point, which is a position representing a characteristic partial area, is detected for the first time in normal recognition processing, the above-mentioned characteristic points are stored in advance. By using the positional relationship between partial areas to limit the existence range of recognition points corresponding to characteristic partial areas that have not yet been detected to a small area, multiple recognition points that exist in the image pattern can be detected. A pattern matching method characterized by detecting.
JP4440186A 1986-02-28 1986-02-28 Pattern matching method Granted JPS62202292A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4440186A JPS62202292A (en) 1986-02-28 1986-02-28 Pattern matching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4440186A JPS62202292A (en) 1986-02-28 1986-02-28 Pattern matching method

Publications (2)

Publication Number Publication Date
JPS62202292A JPS62202292A (en) 1987-09-05
JPH0566636B2 true JPH0566636B2 (en) 1993-09-22

Family

ID=12690486

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4440186A Granted JPS62202292A (en) 1986-02-28 1986-02-28 Pattern matching method

Country Status (1)

Country Link
JP (1) JPS62202292A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010165052A (en) 2009-01-13 2010-07-29 Canon Inc Image processor and image processing method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5769477A (en) * 1980-10-17 1982-04-28 Stanley Electric Co Ltd Information processing method
JPS5923467A (en) * 1982-07-29 1984-02-06 Shin Kobe Electric Mach Co Ltd Manufacture of sealed type nickel cadmium storage battery anode plate

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5769477A (en) * 1980-10-17 1982-04-28 Stanley Electric Co Ltd Information processing method
JPS5923467A (en) * 1982-07-29 1984-02-06 Shin Kobe Electric Mach Co Ltd Manufacture of sealed type nickel cadmium storage battery anode plate

Also Published As

Publication number Publication date
JPS62202292A (en) 1987-09-05

Similar Documents

Publication Publication Date Title
US4272756A (en) Method of pattern recognition and apparatus thereof
JPH0215102B2 (en)
JPH0644292B2 (en) Two-dimensional visual recognition device
JPH0810132B2 (en) Target pattern rotation angle detection method
JPH07220026A (en) Method and device for picture processing
JP3244850B2 (en) License plate reader
JPH0566636B2 (en)
JPH05288520A (en) Pattern matching method
JP3447751B2 (en) Pattern recognition method
JP3041056B2 (en) Semiconductor pellet detection method
JP2959017B2 (en) Circular image discrimination method
JPH0410074A (en) Picture pattern inclination detecting method
JPH0115910B2 (en)
JPS622382A (en) Feature extracting devie for pattern
JP3675366B2 (en) Image extraction processing device
JPS61286704A (en) Method for detecting boundary line of image
JP2001250107A (en) Method and device for recognizing processed area of plate material and computer-readable recording medium with recorded program for performing processed area recognition of plate material
JPH0731733B2 (en) Rectangle detector
JP2864510B2 (en) Shape discriminator
JP2620094B2 (en) How to measure figure patterns
JPH0514945B2 (en)
JPH0729081A (en) Device for recognizing traveling object
JPH0442710B2 (en)
JPH07104137B2 (en) Method of detecting the rotation angle of the target pattern
JPS63101972A (en) Detecting method for pattern