JPH01229384A - Pattern matching device - Google Patents

Pattern matching device

Info

Publication number
JPH01229384A
JPH01229384A JP63055867A JP5586788A JPH01229384A JP H01229384 A JPH01229384 A JP H01229384A JP 63055867 A JP63055867 A JP 63055867A JP 5586788 A JP5586788 A JP 5586788A JP H01229384 A JPH01229384 A JP H01229384A
Authority
JP
Japan
Prior art keywords
pattern matching
data
rotation
discordance
pattern
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
JP63055867A
Other languages
Japanese (ja)
Inventor
Fumihiro Minamizawa
南沢 文宏
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.)
Brother Industries Ltd
Original Assignee
Brother Industries 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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP63055867A priority Critical patent/JPH01229384A/en
Publication of JPH01229384A publication Critical patent/JPH01229384A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To speed up pattern matching when the pattern matching of picture data capable of containing dislocation due to rotation is performed by evaluating the dislocation of a position without performing such processing as to rotate the picture data. CONSTITUTION:When a keyboard 1 is installed at a correct position below a video camera 3, image pickup is started, and a video signal is stored in a video RAM 13 while being developed. Subsequently, the picture data of a specified key is read out. Afterwards, corresponding sample data stored previously in a ROM 11 is read out. Both data are compared, and the number of discordance is counted. Afterwards, correcting processing using correction data is performed. Subsequently, the total number of the discordance is calculated, and whether the number is below a predetermined reference value or nor is decided. Namely, the dislocation of the picture data from the sample pattern is evaluated according to the total number of times of discordance after correction corresponding to a distance from a center of rotation in place of the evaluation by the number of times of simple discordance.

Description

【発明の詳細な説明】 え班辺月力 [産業上の利用分野] 本発明は入力された画像データと予め用意されたサンプ
ルパターンのデータとの位置のずれを評価してパターン
マツチングを行なう装置に関する。
[Detailed Description of the Invention] [Industrial Application Field] The present invention performs pattern matching by evaluating the positional deviation between input image data and sample pattern data prepared in advance. Regarding equipment.

[従来の技術] 従来、この種のパターンマツチング装置では、画像処理
の対象となる対象物が基準位置に対してずれている場合
のパターンマツチングを好適に行なうために、位置ずれ
の補正を行なっている。特に、回転による位置ずれの場
合には、僅かの回転でもパターンのマツチングは大きく
低下するから、撮像等によって入力された画像データを
少しずつ回転・修正したり座標変換を行なってマツチン
グを評価する装置が一般的である。
[Prior Art] Conventionally, in this type of pattern matching device, in order to suitably perform pattern matching when an object to be image processed is shifted from a reference position, positional shift correction is performed. I am doing it. In particular, in the case of misalignment due to rotation, even a slight rotation can significantly degrade pattern matching, so a device that evaluates matching by rotating and correcting image data input by imaging, etc. little by little, or performing coordinate transformation. is common.

[発明が解決しようとする問題点コ しかしながら、こうしたパターンマツチング装置では、
入力された画像データもしくはサンプルパターンを回転
・修正したり座標変換をするといった処理の負荷が大き
く、高速にパターンマツチングの処理を実現する上で障
害となっていた。この結果、パターンマツチングを利用
した製品検査等に長時間を要するという問題があった。
[Problems to be Solved by the Invention]However, in such a pattern matching device,
The processing load of rotating and correcting input image data or sample patterns and converting coordinates is large, which has been an obstacle to realizing high-speed pattern matching processing. As a result, there is a problem in that product inspection using pattern matching takes a long time.

特に、対象物の回転中心が分かっておりしかも回転の範
囲が制限されているような場合、換言すればその範囲内
でマツチングされなければ不良と判断し得るような場合
には、回転ずれを補正するために画像データの回転等の
大がかりな処理を行なうことは、過度の負担となってし
まうという問題があった。
In particular, when the rotation center of the object is known and the rotation range is limited, in other words, if it is not matched within that range, it can be judged as defective, then the rotational deviation can be corrected. There is a problem in that performing large-scale processing such as rotation of image data in order to do so creates an excessive burden.

本発明は、パターンマツチングの評価を工夫し、上記課
題を解決することを目的とする。
The present invention aims to improve the evaluation of pattern matching and solve the above problems.

発咀少贋滅 かかる目的を達成する本発明の構成について以下説明す
る。
The structure of the present invention that achieves the above object will be explained below.

[問題点を解決するための手段] 本発明のパターンマツチング装置は、 入力された画像データと予め用意されたサンプルパター
ンのデータとの位置のずれを評価し、パターンマツチン
グする装置において、 前記サンプルパターンにおいて予め定めた回転中心から
隔たる程、前記ずれを小さく評価する補正手段を備えた
ことを特徴とする。
[Means for Solving the Problems] A pattern matching device of the present invention performs pattern matching by evaluating a positional shift between input image data and data of a sample pattern prepared in advance. The present invention is characterized in that it includes a correction means that evaluates the deviation to be smaller as the distance from the predetermined center of rotation in the sample pattern increases.

[作用コ 上記構成を有する本発明のパターンマツチング装置は、
例えばカメラ等の撮像手段によって撮像されて入力され
た画像データと予め用意されたサンプルパターンのデー
タとの位置のずれを評価し、パターンマツチングを行な
う。この評価に際し、本発明のパターンマツチング装置
は、補正手段により、サンプルパターンにおいて予め定
めた回転中心から隔たる程、前記ずれを小さく評価する
[Function] The pattern matching device of the present invention having the above configuration is as follows:
For example, a positional shift between image data captured and input by an imaging means such as a camera and data of a sample pattern prepared in advance is evaluated, and pattern matching is performed. In this evaluation, the pattern matching device of the present invention uses the correction means to evaluate the deviation to be smaller as the distance from the predetermined rotation center in the sample pattern increases.

従って、本発明のパターンマツチング装置は、僅かの回
転によって生じる画像周辺部の大きなずれの評価を相対
的に小さくして、パターンマツチングを行ない、画像デ
ータの回転等の処理を必要としない。
Therefore, the pattern matching device of the present invention performs pattern matching while relatively minimizing the evaluation of large deviations in the image periphery caused by slight rotation, and does not require processing such as rotation of image data.

[実施例] 以上説明した本発明の構成・作用を一層明らかにするた
めに、以下本発明のパターンマツチング装置の好適な実
施例について説明する。実施例のパターンマツチング装
置は、キーボードの検査装置の一部として使用されるも
のである。
[Example] In order to further clarify the structure and operation of the present invention described above, preferred embodiments of the pattern matching device of the present invention will be described below. The pattern matching device of the embodiment is used as a part of a keyboard inspection device.

キーボードの検査装置は、第1図に示すように、キーボ
ード1を撮像するCCDを用いたビデオカメラ3と、ビ
デオカメラ3からの映像信号を処理してキーボード1の
良・不良を判断する電子制御装置5とから構成されてい
る。電子制御装置5は、周知のCPUl0.ROMII
、RAM12.  ビデオRAM13等を備えたいわゆ
る算術論理演算回路として構成されており、バス14を
介して、映像信号入力ボート15、デイスプレィ16を
制御するCRTC17、警報装置1日やプリンタ19を
駆動する出力ボート20等と相互に接続されている。
As shown in FIG. 1, the keyboard inspection device includes a video camera 3 using a CCD that takes an image of the keyboard 1, and an electronic control system that processes the video signal from the video camera 3 to determine whether the keyboard 1 is good or bad. It is composed of a device 5. The electronic control device 5 includes a well-known CPU10. ROMII
, RAM12. It is configured as a so-called arithmetic and logic operation circuit equipped with a video RAM 13, etc., and is connected via a bus 14 to a video signal input board 15, a CRTC 17 that controls a display 16, an output board 20 that drives an alarm device 1, a printer 19, etc. and are interconnected.

ROMIIの内部には、制御を実行するためのプログラ
ムのほかに、パターンマツチングに使用する後述するサ
ンプルパターンのデータおよび評価用の補正パラメータ
等が予め記・憶されている。
Inside the ROM II, in addition to a program for executing control, data of sample patterns to be used for pattern matching, which will be described later, and correction parameters for evaluation are stored in advance.

もとより、サンプルデータ等は、磁気記憶媒体やICカ
ード等のメディアにより供給するよう構成しても差し支
えない。
Of course, the sample data etc. may be configured to be supplied by media such as a magnetic storage medium or an IC card.

映像信号入力ボート15には、ビデオカメラ3が接続さ
れており、ビデオカメラ3の出力する映像信号をリアル
タイムでディジタル信号に変換し、更に二値化してビデ
オRAM13に蓄積する。従って、CPU10は、ビデ
オRAM13の所定の領域をアクセスすることにより、
キーボード1の所定の領域に対応した画像データを読み
出すことができる。
A video camera 3 is connected to the video signal input port 15, and the video signal output from the video camera 3 is converted into a digital signal in real time, further converted into a digital signal, and stored in the video RAM 13. Therefore, by accessing a predetermined area of the video RAM 13, the CPU 10
Image data corresponding to a predetermined area of the keyboard 1 can be read out.

次に、電子側′m装置5が実行するパターンマツチング
の処理について説明する。第2図は、CPUl0が実行
する制御ルーチンを示すフローチャートである。この制
御ルーチンは、キーボード1がコンベア30等の搬送装
置によりビデオカメラ3の下の正しい位置に設置される
と起動され、まず、ビデオカメラ3によるキーボード1
の撮像を開始さ、せる。この結果、ビデオカメラ3が出
力する映像信号は映像信号入力ボートを介して入力され
、ビデオRAM13内に展開して格納される(ステップ
S 10’O)。続いて、撮像データが格納されたビデ
オRAM13の所定の領域から、特定のキー、例えば「
A」キーの画像データを読み出す処理を行なう(ステッ
プ5ilo)。ビデオカメラ3に対するキーボード1の
位置は予め定められているから、特定の領域のデータを
読み出すことにより、第3図に示すように、特定キーの
キートップに刻印された文字を含む画像データを、10
×10程度の大きさのドツトマトリックスとして読み出
すことができる。
Next, the pattern matching process executed by the electronic device 5 will be described. FIG. 2 is a flowchart showing a control routine executed by CPU10. This control routine is started when the keyboard 1 is placed in the correct position under the video camera 3 by a conveyor 30 or the like.
Start imaging. As a result, the video signal output from the video camera 3 is input via the video signal input port, expanded and stored in the video RAM 13 (step S10'O). Next, a specific key, for example "
The process of reading out the image data of the "A" key is performed (step 5ilo). Since the position of the keyboard 1 with respect to the video camera 3 is predetermined, by reading data in a specific area, image data including characters engraved on the key top of a specific key can be obtained as shown in FIG. 10
It can be read out as a dot matrix with a size of approximately 10x10.

その後、ROMII内に予め記憶されたサンプルデータ
を読み出す処理を実行する(ステップ5120)。キー
rAJに対応するサンプルパターンの一例を第4図に示
す。
Thereafter, a process of reading sample data stored in advance in the ROMII is executed (step 5120). An example of a sample pattern corresponding to key rAJ is shown in FIG.

こうして両データを読み出した後、実際に撮像された画
像データとサンプルパターンとを比較し、両者の不一致
数eqをカウントする処理を実行するが(ステップ51
30)、その際、不一致数は、領域AIないしA5@に
カウントする。領域AIないしA5とは、第5図に示す
ように、キーの回転中心RC(第3図参照)の回りに、
同心状に設定された領域であり、内側(AI側)からド
ツト数で各々[4,12,20,28,36]の大きざ
を有する。例えは、第3図、第4図に示した画1ff−
’?こリンプルIj7−ンこの〒−貿敦昏ム第5図に示
すようとこ、領@AIから順に、 [0,1゜4、 8
. 3]となる。
After reading out both data in this way, a process is executed to compare the actually captured image data and the sample pattern and count the number of discrepancies eq between the two (step 51).
30), the number of mismatches is then counted in the areas AI to A5@. As shown in FIG. 5, areas AI to A5 are areas around the rotation center RC of the key (see FIG. 3).
These are areas set concentrically, and each has a size of [4, 12, 20, 28, 36] in number of dots from the inside (AI side). For example, the image 1ff- shown in FIGS. 3 and 4 is
'? As shown in Figure 5 of this post, in order from territory @AI, [0, 1° 4, 8
.. 3].

こうして領域毎の不一致数eqのカウントを行なった後
、不一致数eqを、補正用データ(第5図に示す補正パ
ラメータ)を用いて補正する処理を行なう。即ち、各領
域毎の不一致数eqを補正パラメータで除算し、補正済
みの不一致データを得るのである。この補正処理は、画
像データの回転によるサンプルパターンからのずれは、
回転中心RCから遠ざかるに従って大きく現れることに
鑑み、これを修正するためのいわば重みづけを行なうこ
とに相当する。
After counting the number of mismatches eq for each region in this way, a process is performed to correct the number of mismatches eq using correction data (correction parameters shown in FIG. 5). That is, the number of mismatches eq for each region is divided by the correction parameter to obtain corrected mismatch data. This correction process corrects deviations from the sample pattern due to image data rotation.
In view of the fact that the distance from the center of rotation RC becomes larger, this is equivalent to weighting to correct this.

上述した補正処理に続いて、各領域AIないしA5=i
の不一致データを加えて、全不一致数Neqを算出しく
ステップ5150)、全不一致数Neqが予め定めた基
準(iNrf以下であるか否かの判断を行なう(ステッ
プ9160)、Htlち、単純な不一致数によるずれの
評価に代えて、回転中心からの距離に応じた補正を行な
った後の全不−負WtNciw%偽ホリ、画像アーク9
fンブノしパターンからのずれを評価するのである。
Following the above-described correction process, each area AI to A5=i
The total number of discrepancies Neq is calculated by adding the discrepancy data of (Step 5150), and it is determined whether the total number of discrepancies Neq is less than or equal to a predetermined standard (iNrf) (Step 9160). Total negative WtNciw% false hori, image arc 9 after correction according to distance from rotation center instead of evaluating deviation by number
The deviation from the f-shaped pattern is evaluated.

全不一致数Neqが基準(iNrf−t−越えていれば
、ビデオカメラ3によって撮像されたキーボード1の特
定のキーには誤ったキートップが装着されているとして
、そのキートップの画像をCRTC17を介してデイス
プレィ16に表示したり、出力ボート20を介して警報
装置18を駆動し警報を出力するといった処理を実行す
る(ステップ5170)。警報の出力後、あるいは、全
不一致数Neqが基準(直Nrf以下であれは(ステッ
プ51bO)、、VCいて惚てのキー乞こついて横置が
鰐了したか否かを判断する(ステ・ンブ5190)。
If the total number of discrepancies Neq exceeds the standard (iNrf-t-), it is assumed that an incorrect key top is attached to the specific key of the keyboard 1 imaged by the video camera 3, and the image of that key top is sent to the CRTC 17. The process executes processing such as displaying the alarm on the display 16 via the output boat 20 and outputting the alarm by driving the alarm device 18 via the output boat 20 (step 5170).After the alarm is output, or when the total number of discrepancies Neq is If it is less than Nrf (step 51bO), the VC asks for the key of love and judges whether or not the horizontal placement has been completed (step 5190).

全キーについて検査が終了していなけれは、ステップ1
10に戻って他のキーについて上述した処理を繰り返し
くステップ5110ないし180)、全キーについての
検査が終了した場合には、出力ボート20を介してプリ
ンタ19を駆動し、検査済み証を発行する処理を実行す
る(ステップ5190)。もとより、全キーの検査中に
誤ったキートップが装着されたもの等があれば、その旨
出力する。その後、 「END」に抜けて本制御ルーチ
ンを終了する。
If all keys have not been checked, proceed to step 1.
Steps 5110 to 180) of returning to step 10 and repeating the above-mentioned process for other keys. When the inspection of all keys is completed, the printer 19 is driven via the output boat 20 to issue an inspection certificate. The process is executed (step 5190). Of course, during the inspection of all keys, if an incorrect key top is attached, etc., that fact will be output. Thereafter, the process exits to "END" to end this control routine.

以上説明した本実施例によれは、キーボード1のキート
ップの製造上許容された回転により生じるずれに対して
、撮像した画像データに回転等の処理を施す必要がなく
、極めて高速にパターンマ・ンチングを行なうことがで
きる。従って、CPU10に対する画像処理のオーバヘ
ッドも抑制することができる。これらの結果、キーボー
ド1の検査を高速に実行することができ、検査工程に要
す?5時間72著しく短縮することがでさるa尚、上述
した実先例では、回転中心RCに対して同心状に5個の
領域AIないしA5を設定したが、同心状に限る必要は
なく、例えば、第6図に示すように、サンプルパターン
の形状等に合わせていくつかの領域パターンを用意する
ことも、認識率を向上させる上で有効である。また、領
域の数を増減しても差し支えない。
According to the present embodiment described above, there is no need to perform processing such as rotation on the captured image data to deal with deviations caused by the manufacturing-permitted rotation of the key tops of the keyboard 1, and pattern mapping can be performed at extremely high speed. You can perform pinching. Therefore, the overhead of image processing on the CPU 10 can also be suppressed. As a result, the keyboard 1 can be inspected at high speed, reducing the time required for the inspection process. In the above-mentioned actual precedent, five areas AI to A5 are set concentrically with respect to the center of rotation RC, but it is not necessary to limit the time to concentrically. For example, As shown in FIG. 6, it is also effective to prepare several area patterns according to the shape of the sample pattern, etc. in order to improve the recognition rate. Furthermore, the number of areas may be increased or decreased.

以上本発明の実施例について説明したが、本発明はこう
した実施例に同等限定されるものではなく、本発明の要
旨を逸脱しない範囲において、種々なる態様で実施し得
ることは勿論である。゛え哩q対深 以上詳述したように、本発明のパターンマツチング装置
によれば、回転によるずれを含み得る画像データのパタ
ーンマツチングを行なう際、その位置ずれの評価を、画
像データ等を回転するといった処理を行なうことなく実
行することができるという極めて優れた効果を奏する。
Although the embodiments of the present invention have been described above, the present invention is not equally limited to these embodiments, and it goes without saying that the present invention can be implemented in various forms without departing from the gist of the present invention. As described in detail above, according to the pattern matching device of the present invention, when performing pattern matching of image data that may include deviation due to rotation, evaluation of the positional deviation is performed based on the image data, etc. This has an extremely excellent effect in that it can be executed without performing processing such as rotating the image.

従って、パターンマツチングを高速に行なうことができ
、しかも処理の負荷を軽減することができる。この結果
、本発明のパターンマツチング装置を用いれば、パター
ンマツチングを用いた検査等を、精度を落とすことなく
、極めて短時間に実施することができる。
Therefore, pattern matching can be performed at high speed, and the processing load can be reduced. As a result, if the pattern matching device of the present invention is used, inspections using pattern matching can be carried out in an extremely short time without reducing accuracy.

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

、第1図は本発明一実施例としてのパターンマツチング
装置を矩み込んだキーボード検査装置の概略構成図、第
2図は電子制御装置5が実行するパターンマツチング制
御ルーチンを示すフローチャート、第3図は撮像された
キーボード1の特定のキートップの画像データの一例を
示す説明図、第4図はサンプルデータの一例を示す説明
図、第5図は画像データとサンプルパターンとのマツチ
ング評価の手法を説明する説明図、第6図は他の領域パ
ターンの一例を示す説明図、である。 1 ・・・ キーボード 3 ・・・ ビデオカメラ 5 ・・・ 電子制御装置 11 ・・・ ROM 13 ・・・ ビデオRAM 代理人 弁理士 定立 勉(ほか1名)第3図 第4図 区 5図
, FIG. 1 is a schematic configuration diagram of a keyboard inspection device incorporating a pattern matching device as an embodiment of the present invention, FIG. 2 is a flowchart showing a pattern matching control routine executed by the electronic control device 5, and FIG. FIG. 3 is an explanatory diagram showing an example of the image data of a specific key top of the captured keyboard 1, FIG. 4 is an explanatory diagram showing an example of sample data, and FIG. 5 is an explanatory diagram showing an example of the image data and the sample pattern. FIG. 6 is an explanatory diagram illustrating the method, and FIG. 6 is an explanatory diagram showing an example of another area pattern. 1...Keyboard 3...Video camera 5...Electronic control unit 11...ROM 13...Video RAM Agent Patent attorney Tsutomu Sadatsu (and 1 other person) Figure 3 Figure 4 Section 5

Claims (1)

【特許請求の範囲】  1 入力された画像データと予め用意されたサンプル
パターンのデータとの位置のずれを評価し、パターンマ
ッチングする装置において、  前記サンプルパターンにおいて予め定めた回転中心か
ら隔たる程、前記ずれを小さく評価する補正手段を備え
たことを特徴とするパターンマッチング装置。
[Claims] 1. In an apparatus that evaluates a positional deviation between input image data and data of a sample pattern prepared in advance and performs pattern matching, the further the sample pattern is separated from a predetermined center of rotation, A pattern matching device characterized by comprising a correction means for evaluating the deviation to be small.
JP63055867A 1988-03-09 1988-03-09 Pattern matching device Pending JPH01229384A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63055867A JPH01229384A (en) 1988-03-09 1988-03-09 Pattern matching device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63055867A JPH01229384A (en) 1988-03-09 1988-03-09 Pattern matching device

Publications (1)

Publication Number Publication Date
JPH01229384A true JPH01229384A (en) 1989-09-13

Family

ID=13011027

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63055867A Pending JPH01229384A (en) 1988-03-09 1988-03-09 Pattern matching device

Country Status (1)

Country Link
JP (1) JPH01229384A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5430738A (en) * 1977-08-12 1979-03-07 Fujitsu Ltd Pattern recognition device
JPS5492134A (en) * 1977-12-29 1979-07-21 Fujitsu Ltd Resembling letters and differential point detection circuit
JPS61147384A (en) * 1984-12-20 1986-07-05 Fujitsu Ltd Recognizing device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5430738A (en) * 1977-08-12 1979-03-07 Fujitsu Ltd Pattern recognition device
JPS5492134A (en) * 1977-12-29 1979-07-21 Fujitsu Ltd Resembling letters and differential point detection circuit
JPS61147384A (en) * 1984-12-20 1986-07-05 Fujitsu Ltd Recognizing device

Similar Documents

Publication Publication Date Title
WO1997036260A1 (en) Method, apparatus and system for verification of patterns
JP2591984B2 (en) Pattern recognition device
JPH05256796A (en) Inspecting system
US4962541A (en) Pattern test apparatus
JPH04346187A (en) Quality decision method for subject to be detected
JPH01229384A (en) Pattern matching device
JPH0135379B2 (en)
US6804387B1 (en) Pattern matching apparatus
KR960001753B1 (en) Directionally characteristic recognition system by binary image
JPH0460525B2 (en)
JPH01318169A (en) Corner correcting device
JPS62154076A (en) Picture processing method
JPS61255484A (en) Detection of crack by picture processing
JPS63229570A (en) Pattern inspecting device
JP2002216139A (en) Method for detecting horizon by image processing
JP2701660B2 (en) Mounted component inspection data creation device
JP3120177B2 (en) Character inspection device
JPS63115035A (en) Pattern data inspecting device
JPH10269357A (en) Method for inspecting printed matter
JPH11238135A (en) Method and device for image recognition
JPH0520436A (en) Inspection device
JPS63223505A (en) Method and device for positioning
KR960001752B1 (en) Image recognition system by binary image processing
JPH06258029A (en) Method and system for recognizing pattern position
JPH0773331A (en) Image processor