JPH0498580A - Method and device for pattern recognition - Google Patents

Method and device for pattern recognition

Info

Publication number
JPH0498580A
JPH0498580A JP2216559A JP21655990A JPH0498580A JP H0498580 A JPH0498580 A JP H0498580A JP 2216559 A JP2216559 A JP 2216559A JP 21655990 A JP21655990 A JP 21655990A JP H0498580 A JPH0498580 A JP H0498580A
Authority
JP
Japan
Prior art keywords
image data
inspected
pattern matching
pixel
horizontal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2216559A
Other languages
Japanese (ja)
Other versions
JP3007392B2 (en
Inventor
Motoharu Honda
本多 素春
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.)
Canon Machinery Inc
Original Assignee
Nichiden Machinery 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 Nichiden Machinery Ltd filed Critical Nichiden Machinery Ltd
Priority to JP2216559A priority Critical patent/JP3007392B2/en
Publication of JPH0498580A publication Critical patent/JPH0498580A/en
Application granted granted Critical
Publication of JP3007392B2 publication Critical patent/JP3007392B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To shorten processing time by performing the pattern matching of an image to be inspected obtained from an image pickup device with a reference image by pattern collation by using a template. CONSTITUTION:The image to be inspected from the image pickup device 11 is pattern-collated with the reference image of a reference image memory circuit 16. A vertical image data extraction circuit 14 outputs image data to be inspected of seven rows opened uniformly at certain set intervals in the vertical direction of the image to be inspected simultaneously. A horizontal image data extraction circuit 15 connects output from the vertical image data extraction circuit 14, and outputs the point data of 49 binary images simultaneously. An arithmetic and logic circuit 17 performs the pattern comparison of reference image data with horizontal image data, and outputs the coincidence pulse of picture element frequency. A correlation value estimation circuit 18 performs the pattern collation of 49 data, and estimates and stores a correlation value at each coordinate position individually.

Description

【発明の詳細な説明】 」目Lb久性肚止肚 この発明は撮像装置から得られる2値化した被検査画像
を非接触で自動的に検出処理するパターンマツチング方
法とその装置に関し、特に撮像された対象ワークの位置
検出を行なうために被検査画像をテンプレートを用いて
パターン照合する基準画像パターンマツチングによるパ
ターン認識装置に関する。
[Detailed Description of the Invention] This invention relates to a pattern matching method and device for automatically detecting and processing a binarized image to be inspected obtained from an imaging device in a non-contact manner. The present invention relates to a pattern recognition device using reference image pattern matching, which performs pattern matching of an image to be inspected using a template in order to detect the position of an imaged target workpiece.

従来盆1籠 被検査画像内の部分画像と予め設定され比較対象となる
標準パターンの対応する画素の一致を計数する事によっ
て近似度を計算し最もよく似た部分画像を捜す処理をテ
ンプレートマツチングあるいはパターンマツチング処理
という。第12図はこのパターンマツチング処理の概要
を説明するための原理図であり、本発明の前提となるも
のであグる。以下、これについて説明する。
Template matching is a process of calculating the degree of approximation and searching for the most similar partial image by counting the matching of corresponding pixels between a partial image in the tray 1 inspected image and a preset standard pattern to be compared. It is also called pattern matching processing. FIG. 12 is a principle diagram for explaining the outline of this pattern matching process, and is a premise of the present invention. This will be explained below.

M行×N列の被検査画像5内のm行×n列(m5M、n
≦N)の部分画像6と同一画素サイズのパターン照合の
ための基準画像7の対応する位置の画素を比較し一致し
た画素数を計数する。ある1座標での部分画像6と基準
画像7との比較計数個数はmXnであり入力データ数は
2X (mXn)個となる。例として、被検査画像5の
サイズをM=320画素、N=240画素、基準画像7
のサイズをm=n=64画素とした場合入力データ数は
8192、m=n=128画素とした場合入力データ数
は32854となり、これだけの処理量を1座標におけ
る類似度として演算しなければならない。被検査画像5
内で部分画像6はCM−m+1)X (N−n+1)個
だけ存在し、その各々についてmXn回の比較を行なわ
なければならないので総計量Xn (M−m+1)X 
(N−n+1)回の比較演算を必要とする。すなわち、
被検査画像5のサイズをM=320画素、N=240画
素、基準画像7のサイズをm=n=64画素とした場合
、186,322,944回の比較演算を要すという膨
大な計算量となる。
m rows x n columns (m5M, n
≦N) and the pixels at the corresponding positions of the reference image 7 for pattern matching of the same pixel size are compared and the number of matching pixels is counted. The number of comparisons between the partial image 6 and the reference image 7 at one coordinate is mXn, and the number of input data is 2X (mXn). As an example, the size of the image to be inspected 5 is M = 320 pixels, N = 240 pixels, and the size of the reference image 7 is
When the size of is m = n = 64 pixels, the number of input data is 8192, and when m = n = 128 pixels, the number of input data is 32854, and this amount of processing must be calculated as similarity at one coordinate. . Image to be inspected 5
There are CM-m+1)X (N-n+1) partial images 6 in the image, and mXn comparisons must be made for each of them, so the total metric is Xn (M-m+1)X
(N-n+1) comparison operations are required. That is,
If the size of the image to be inspected 5 is M = 320 pixels, N = 240 pixels, and the size of the reference image 7 is m = n = 64 pixels, a huge amount of calculation requires 186,322,944 comparison operations. becomes.

このような2次元の被検査画像のパターンを非接触で自
動的に高速検出処理するパターンマツチング処理に対し
ては、例えば特公昭60−17152号および特開昭6
2−210596号公報に有効なパターンマツチング処
理を行なう装置が記されている。特公昭80−1715
2号公報によるパターンマツチング方式は一般には複合
形部分パターンマツチング方式と呼ばれその原理は、被
検査画像の複数の特徴的な特定部分の2次元パターンを
それぞれ基準画像7して登録しておき、撮像された被検
査画像5の2次元パターンから部分画像6を逐次切り出
し、前記切り出された部分画像6と上記基準画像7を比
較し最もよく一致する座標位置を検出するとしたもので
ある。部分画像6の大きさは12X12画素とすること
で行なっている。そのパターンマツチング方式の特徴に
よりリアルタイムにて認識をするには1座標における類
似度としての演算処理を1画素クロック期間内に終了さ
せなければならないので12X12=144画素同時に
行なわなければならない。そのために12X12=14
4画素の基準画像データは同時出力が可能な構成でなけ
ればならないし、被検査画像データも同様に144画素
の同時出力が可能な構成でなければならない。また、類
似度を比較する比較回路も1画像走査期間内で処理を終
えるには1座標における類似度の演算処理は1画素クロ
ック期間内に終了させなければならないので1’2X1
2=144個の排他的論理和回路が必要となる。これら
の入出力データは1座標における類似度であるので同時
に演算処理するには、排他的論理和回路において288
個の入力配線と144個の出力配線が必要となっている
For example, Japanese Patent Publication No. 60-17152 and Japanese Unexamined Patent Application Publication No. 60-171 disclose a pattern matching process that automatically detects the pattern of a two-dimensional image to be inspected at high speed in a non-contact manner.
Japanese Patent No. 2-210596 describes an apparatus that performs effective pattern matching processing. Special Public Service 1980-1715
The pattern matching method according to Publication No. 2 is generally called a composite partial pattern matching method, and its principle is that two-dimensional patterns of a plurality of characteristic specific parts of the image to be inspected are registered as reference images 7 respectively. Then, partial images 6 are sequentially cut out from the two-dimensional pattern of the photographed image to be inspected 5, and the cut out partial images 6 and the reference image 7 are compared to detect the most matching coordinate position. This is done by setting the size of the partial image 6 to 12×12 pixels. Due to the characteristics of the pattern matching method, in order to perform real-time recognition, the calculation process for the similarity at one coordinate must be completed within one pixel clock period, so it must be performed for 12×12=144 pixels at the same time. Therefore 12X12=14
The reference image data of 4 pixels must have a configuration that can be output simultaneously, and the image data to be inspected must also have a configuration that can similarly output 144 pixels simultaneously. In addition, in order to complete the processing within one image scanning period, the comparison circuit that compares the similarity must be completed within one pixel clock period, so the calculation process for the similarity at one coordinate must be completed within one pixel clock period.
2=144 exclusive OR circuits are required. Since these input and output data are based on similarity at one coordinate, in order to process them simultaneously, 288
Input wiring and 144 output wiring are required.

また)文献r Coarseイine templat
e matching JrEEE Trans、、S
MC−7104−107頁(1977)及びrSequ
ential hierarc旧at 5cene m
atching J IEEETrans、 、C−2
7,4,359−3GG頁(19VS)によれば、最も
画像分解能の高い画像(原画像)上でパターン照合を行
わす、予め分解能の粗い画像を用意して順次、画像分解
能を上げて行くことで検出の効率を上げるという階層型
パターンマツチング方法が知られている。従来、画像分
解能の粗いパターン照合と画像分解能の高い画像上での
パターン照合を行う認識方法である階層型パターンマツ
チング方法あるいは粗精検出方法において、粗い分解能
における1画素は複数の画素の輝度データを合計した値
を基に粗い画素としての画素データとし処理する濃淡画
像処理について記されており、この階層型パターンマツ
チング方法による検出処理はソフトウェアにより行われ
ており、リアルタイムな位置検出を行なうには到ってい
ない。
Also) References Coarse template
e matching JrEEE Trans,,S
MC-7104-107 (1977) and rSequ
ential hierarchy old at 5scene m
Atching J IEEE Trans, ,C-2
According to page 7, 4, 359-3GG (19VS), pattern matching is performed on the image with the highest image resolution (original image), and images with coarse resolution are prepared in advance and the image resolution is gradually increased. A hierarchical pattern matching method is known in which the detection efficiency is increased by Conventionally, in the hierarchical pattern matching method or coarse detection method, which is a recognition method that performs pattern matching on coarse image resolution and pattern matching on images with high image resolution, one pixel at coarse resolution is the luminance data of multiple pixels. It describes grayscale image processing in which pixel data is processed as coarse pixels based on the sum of the values.The detection processing using this hierarchical pattern matching method is performed by software, and it is necessary to perform real-time position detection. has not arrived yet.

階層型パターンマツチング方法を用いた別の方法として
、特開昭62−55VS1号公報では、パターン照合を
粗い画素間隔で行うききには画像分解能はそのままにし
ておくが照合の基準パターンの全エリアでは行わず、部
分領域に対してのみパターン照合を行うことによって、
処理の高速化を図っている。階層型パターンマツチング
方法を用いた上記のいずれの方法とも粗い画素は原画像
において登録された基準画像データそのものではなく、
原画像を圧縮あるいは限定することで基準となる画像デ
ータ量を比較処理時に減らし処理の冨速化を計っている
As another method using a hierarchical pattern matching method, JP-A-62-55VS1 discloses that when pattern matching is performed at coarse pixel intervals, the image resolution is kept as is, but the entire area of the reference pattern for matching is By performing pattern matching only on partial areas,
Efforts are being made to speed up processing. In any of the above methods using the hierarchical pattern matching method, the coarse pixels are not the reference image data itself registered in the original image;
By compressing or limiting the original image, the amount of reference image data is reduced during comparison processing, thereby speeding up the processing.

任意の形状・大きさの基準パターンを用いてパターンマ
ツチングを行なうものとして従来の装置は、特開昭62
−21059E3号公報による方法がある。この方法に
よれば、基準パターン(8X12)を任意の位置に配置
して、任意の大きさ及び任意の形状のnXmサイズの基
準パターンを構ifる。nXm内の各々の基準パターン
について、パターンマツチングを実行させ、その結果を
n×mの基準パターンの対象画素座標までシフトする。
A conventional device for pattern matching using a reference pattern of arbitrary shape and size is disclosed in Japanese Patent Application Laid-open No. 62
There is a method according to No.-21059E3. According to this method, a reference pattern (8×12) is placed at an arbitrary position to form a reference pattern of n×m size with an arbitrary size and an arbitrary shape. Pattern matching is executed for each reference pattern in n×m, and the result is shifted to the target pixel coordinates of the n×m reference pattern.

この様にして得られる濃淡画像を毎回シフト後に加算し
て行くことにより目的を達成するというものである。
The purpose is achieved by adding the grayscale images obtained in this way after each shift.

が    よ゛ 小さな部分パターンを多数設けることによる複合形部分
パターンマツチング方式は基準画像7のサイズが小さい
ために3点ないし4点の部分パターンを一つの被検査画
像5範囲に対して登録している、そのために以下の問題
点があった。
However, since the size of the reference image 7 is small, the composite partial pattern matching method that uses a large number of small partial patterns registers three or four partial patterns for one inspection image 5 range. As a result, there were the following problems.

■)パターン登録においては基準画像7のサイズが小さ
いために登録を行なうに当たっては特徴的な部分パター
ンを組み合わせて登録すると言う作業か必要となり、作
業者の質を選び登録作業の容易性に問題があった。
■) In pattern registration, since the size of the reference image 7 is small, it is necessary to register characteristic partial patterns in combination, and there is a problem in the ease of registration work by selecting the quality of the operator. there were.

2)部分によるパターンマツチングは基準画像7のサイ
ズが小さいために1点のみの認識では認識率が低いため
に3点ないし4点の部分パターンを1被検査画像範囲に
対して登録している。このために、相関値の大小のみで
パターンの位置検出が可能な本来の方法に加え各部分パ
ターン間の相対位置関係(距離、角度)をチエツクしな
ければならないため、それだけ処理時間が増し、高速な
位置検出が出来ない。
2) In pattern matching based on parts, since the size of the reference image 7 is small, the recognition rate is low if only one point is recognized, so a partial pattern of three or four points is registered for one image range to be inspected. . For this reason, in addition to the original method of detecting the position of a pattern based only on the magnitude of the correlation value, it is also necessary to check the relative positional relationship (distance, angle) between each partial pattern, which increases processing time and increases speed. position cannot be detected.

3)部分パターンのサイズが小さいために被検査画像5
のパターン検出範囲に部分パターンのサイズよりも大き
な同一のパターンが複数存在する場合、パターン位置の
検出が不可能である。例えば、パターン検出範囲に3つ
の同一パターンが存在する場合、部分パターンとして登
録し最もよく一致する部分パターンの位置はパターン照
合を繰り返し行なうと3つの座標位置のいずれかが候補
点となるか一義的には決まらない。
3) Image 5 to be inspected because the size of the partial pattern is small
If there are multiple identical patterns larger than the partial pattern size in the pattern detection range, it is impossible to detect the pattern position. For example, if three identical patterns exist in the pattern detection range, the position of the most matching partial pattern is registered as a partial pattern, and by repeating pattern matching, one of the three coordinate positions becomes the candidate point. I can't decide.

4)部分パターンの大きさを大きくすれば、上記の問題
点は解決するが、ハードウェア規模が著しく増大してし
まうというパターンマツチング本来の問題が発生してし
まう。
4) If the size of the partial pattern is increased, the above problem can be solved, but the original problem of pattern matching occurs, which is that the hardware scale increases significantly.

5)部分パターンのサイズが12X12画素程度の大き
さであるためノイズの影響を受は易く、それたけ位置の
検出精度が良くない。
5) Since the size of the partial pattern is approximately 12×12 pixels, it is easily affected by noise, and the position detection accuracy is correspondingly poor.

ノイズとは本来ランダム的なものであるため、部分パタ
ーンのサイズが小さい場合であろうが大きい場合であろ
うが画素当りのノイズの発生確率は一般的に一様である
。この点からは部分パターンのサイズとは直接的に関係
無いのであるが、実際の対象ワークパターンの濃淡レベ
ルは2値化が行ない易いようなコントラストのはっきり
したパターンばかりではない。この場合に言うノイズと
は2値化スレツシユレベルと隔たった部分にはそのスレ
ッシュレベルを横切る映像信号が発生しにくいのでノイ
ズが乗りにくいが、2値化スレツシユレベルとほとんど
同じような映像信号レベルを他の場所と比べて比較的に
多く持つパターン部では2値化画像上ではノイズが発生
し易くなる。従って、対象ワークパターン上にはコント
ラストがはっきりした部分もあれば、そうでない部分も
あり、コントラストがはっきりしていて2値化したとき
にノイズが乗りにくいパターン部とパターン形状より特
徴的であるパターン部とは独立したものであるので、コ
ントラストのはっきりしないパターン部ではあるがパタ
ーン形状より特徴的であるパターン部を部分パターンと
して登録した場合にはノイズの影響を受は易くなり、そ
れだけ位置検出の精度が悪くなる。部分パターンの個数
を増すことでその影響を少なくする事が出来るがそれだ
け処理時間が増すことになる。
Since noise is inherently random, the probability of occurrence of noise per pixel is generally the same regardless of whether the size of the partial pattern is small or large. From this point of view, it is not directly related to the size of the partial pattern, but the actual gray level of the target work pattern is not always a pattern with a clear contrast that makes it easy to perform binarization. The noise referred to in this case is that it is difficult for video signals that cross the threshold level to occur in areas that are far from the binarization threshold level, so it is difficult for noise to appear in the area, but there is a video signal that is almost the same as the binarization threshold level. Noise is likely to occur on a binarized image in a pattern portion that has a relatively large number of levels compared to other locations. Therefore, on the target workpiece pattern, there are parts with clear contrast and parts with less contrast, and there are pattern parts with clear contrast that are less prone to noise when binarized, and patterns that are more distinctive than pattern shapes. Therefore, if a pattern part with unclear contrast but more characteristic than the pattern shape is registered as a partial pattern, it will be more susceptible to noise, and the position detection will be affected accordingly. Accuracy deteriorates. This effect can be reduced by increasing the number of partial patterns, but this increases processing time accordingly.

階層型パターンマツチング方法である特開昭62−55
VS1号は粗検出時においては基準画像7を間引いて限
定した原画像の一部分を用いた粗い基準パターンを作成
しある粗い画素間隔にてパターン照合を行なっているた
め、基準画像7によって認識の可否が左右されることと
なる。また、基準画像7の登録に当たっては作業者の質
を選び登録作業の容易性に問題があった。
JP-A-62-55 which is a hierarchical pattern matching method
During rough detection, VS1 thins out the reference image 7 to create a coarse reference pattern using a limited part of the original image and performs pattern matching at a certain coarse pixel interval. will be affected. In addition, when registering the reference image 7, there was a problem in the ease of registration work by selecting the quality of the operator.

特開昭62−210596号の方法のおl、Sで6ま基
準画像7のサイズとしては小領域の8×12画素のもの
を基本としており、大きなサイズの工1ノアのパターン
照合を求めることは可能であるが、そのためには多数の
部分7寸ターンを用0処理を行なわなければならず、そ
れだけ処理時間を要すこととなり、検出するパターンに
より登録する部分パターンの個数が変化するため、対象
ワークゐこより認識時間が異なり認識装置を搭載した装
置の時間管理を煩雑なものとしていた。また、それらの
多数の部分パターンを登録するには作業者の操作及び判
断を複雑なものとし、登録作業が容易なものではなかっ
た。
In the method of JP-A No. 62-210596, the size of the reference image 7 is basically a small area of 8 x 12 pixels, and it is necessary to obtain pattern matching of large size. is possible, but in order to do so, it is necessary to perform zero processing using a large number of partial 7-inch turns, which increases processing time, and the number of partial patterns to be registered changes depending on the pattern to be detected. The recognition time differs depending on the target work, making time management of the equipment equipped with the recognition device complicated. Furthermore, registering such a large number of partial patterns requires complicated operations and judgments by the operator, and the registration work is not easy.

従って、本発明は上記欠点に鑑み提案されたものであり
、新規且つ改良されたパターン認識装置の提供を目的と
するものである。
Therefore, the present invention has been proposed in view of the above-mentioned drawbacks, and it is an object of the present invention to provide a new and improved pattern recognition device.

。   −の 上記の問題点を解決するために、どのような技術的な手
段を採用したかを以下に記載する。
. - What technical means were adopted to solve the above problems will be described below.

2次元画像の中からある特定パターンを自動抽出するパ
ターン認識方法において、 撮像手段からの2次元映像信号をデジタル化し、被検査
画像の特徴的なパターンの任意サイズを切り出し基準画
像として予め2値化画像を原画像としてそのまま記憶し
任意の2次元座標位置に記憶した画像データを出力可能
な基準画像記憶手段と、 2次元被検査画像データの任意のdy水平走査ラインを
マイクロコンピュータから設定された水平走査ライン分
だけ保持可能な(VS−1)個の水平走査ライン保持手
段をk(1≦k≦dy)水平走査ライン間隔(=に画素
間隔)で均等に開いているVS行の個々の検査座標位置
に対応した被検査画像データが同時に出力されるように
した垂直画像データ抽出手段と、 前記垂直画像データ抽出手段からの被検査画像データの
■S個の同時出力を水平方向の任意のdX画素までをマ
イクロコンピュータから設定された画素分だけ保持可能
な画素シフト手段を(HS−1)個直列につなぐことで
、1水平方向の被検査画像データか同時にある設定され
た1画素(1≦j≦dx)間隔で均等に開いているHS
力所から同時に出力されるようにしたものを前記垂直抽
出手段からのVS個の水平走査ラインから同時に出力さ
れた被検査画像データを入力として、前記(HS−1)
個直列の画素シフト手段をVS段設ける事で2次元被検
査画像データの総計VS×HS地点の個々の検査座標位
置に対応した被検査画像データを同時に出力されるよう
にした水平画像データ抽出手段と、 前記基準画像記憶手段からの基準画像データと前記水平
画像データ抽出手段からの個々の検査座標位置に対応し
た被検査画像データを同時にVS×HS個の地点でパタ
ーン比較し、VS×HSの地点側々の検査座標位置に対
応したパターン照合出力をVS×HSS×HS合同時−
タとして個々の検査座標位置に対応した部分それぞれよ
り同時にシリアル出力することからなる論理演算手段と
、前記論理演算手段からの個々の検査座標位置に対応し
た各合致データ出力を個々に同時カウントすることによ
りVS×HS個のパターン照合を1画像走査で完了し個
々の検査座標位置に対応した部分で独立に相関値として
算出保持する相関値積算手段により構成され、 第1回目の粗検出は水平画像データ抽出手段・垂直画像
データ抽出手段をそれぞれの第1回目のパターン照合の
画素間隔でHS×VS個の被検査画像データが同時に出
力されるよう設定し、被検査画像の検出範囲の中心位置
にH5行×VS列の検査位置の中心部が対応するように
配置して第1回目の粗検出を行ない、第1回目のパター
ン照合を行ったHS×VS個の候補点の相関データの中
で最大相関値を保持する部分を検索し、所定の粗検出ス
レッシュ値よりも大きい値であれば前記最大相関値を保
持した部分に対応したパターン照合座標位置をもって、
次回のパターン照合の中心座標位置と決定し、前記第1
回目の粗検出にて求めた最高相関値の座標位置を中心に
HS行×VS列の検査位置の中心部が対応するように配
置し、第2回目の粗検出を水平方向は(第1の画素間隔
−第2の画素間隔X (HS−1)/2)≦0を、垂直
方向は(第1の画素間隔−第2の画素間隔×(VS−1
)/2}≦0を、満たし最小の整数値となる第2の画素
間隔にてHS行×VS列の中心部が対応するように配置
してパターン照合を行い第2回目のHS×VS個の候補
点の相関データの最高相関値の座標位置を求め、前記第
2回目の粗検出にて求めた最高相関値の座標位置を中心
にHS行×VS列の中心部を配置して第3回目以降のパ
ターン照合を水平・垂直方向の設定画素間隔が1画素間
隔となるまで水平方向は(第P回目のパターン照合の画
素間隔−第P+1回目のパターン照合の画素間隔X (
HS−1)/2)≦0を、垂直方向は(第P回目のパタ
ーン照合の画素間隔−第P+1回目のパターン照合の画
素間隔X(VS−1)/2)≦0を、満たし最小の整数
値となる第P+1回目のパターン照合の画素間隔にてH
5行×VS列の中心部を第P回目の最高相関値の座標位
置を配置して行い、1画素間隔にて行なったパターン照
合のHS×VS個の候補点の相関データの最大値か所定
の検出スレッシュ値よりも大きい値であれば前記最大相
関値を保持した部分に対応した座標位置を検出位置とす
ることを特徴とするパターン認識方法により達成される
In a pattern recognition method that automatically extracts a specific pattern from a two-dimensional image, the two-dimensional video signal from the imaging means is digitized, an arbitrary size of the characteristic pattern of the image to be inspected is cut out, and it is pre-binarized as a reference image. A reference image storage means capable of storing an image as it is as an original image and outputting image data stored at an arbitrary two-dimensional coordinate position; and a reference image storage means capable of outputting image data stored at an arbitrary two-dimensional coordinate position; Individual inspection of VS rows in which (VS-1) horizontal scanning line holding means capable of holding the number of scanning lines are evenly spaced at k (1≦k≦dy) horizontal scanning line intervals (=pixel intervals) vertical image data extraction means for simultaneously outputting image data to be inspected corresponding to coordinate positions; By connecting (HS-1) pixel shift means in series that can hold pixels up to the number of pixels set by the microcomputer, one horizontal direction of image data to be inspected or one set pixel at the same time (1≦ j≦dx) evenly spaced HS
The above-mentioned (HS-1) is inputted with the image data to be inspected simultaneously outputted from the VS horizontal scanning lines from the vertical extraction means.
Horizontal image data extraction means that is configured to simultaneously output the image data to be inspected corresponding to the individual inspection coordinate positions of the total VS x HS point of the two-dimensional image data to be inspected by providing pixel shifting means in series at the VS stage. and, comparing the patterns of the reference image data from the reference image storage means and the image data to be inspected corresponding to each inspection coordinate position from the horizontal image data extraction means at VS×HS points at the same time, and When VS x HSS x HS congruent, the pattern matching output corresponding to the inspection coordinate position on each side of the point is -
a logic operation means that simultaneously serially outputs data from each portion corresponding to each inspection coordinate position as a data, and simultaneously counts each coincident data output corresponding to each inspection coordinate position from the logic operation means. The first rough detection is performed using a horizontal image. The data extraction means and vertical image data extraction means are set so that HS×VS pieces of image data to be inspected are simultaneously output at the pixel interval of the first pattern matching, and the image data to be inspected is set at the center position of the detection range of the image to be inspected. Among the correlation data of the HS x VS candidate points, the first rough detection was performed by arranging the centers of the inspection positions in H5 rows x VS columns to correspond, and the first pattern matching was performed. Search for the part that holds the maximum correlation value, and if the value is larger than a predetermined rough detection threshold value, use the pattern matching coordinate position corresponding to the part that holds the maximum correlation value,
The center coordinate position of the next pattern matching is determined, and the first
The coordinate position of the highest correlation value obtained in the second rough detection is arranged so that the center of the inspection position in the HS row x VS column corresponds to the coordinate position of the highest correlation value obtained in the second rough detection. Pixel spacing - second pixel spacing
)/2}≦0, and the second pixel interval that satisfies the minimum integer value is arranged so that the center of the HS row × VS column corresponds, and pattern matching is performed to obtain the second HS × VS number. The coordinate position of the highest correlation value of the correlation data of the candidate point is determined, and the center of the HS row x VS column is arranged around the coordinate position of the highest correlation value determined in the second rough detection, and the third Until the set pixel interval in the horizontal and vertical directions becomes 1 pixel interval, the pattern matching after the pattern matching in the horizontal direction is (pixel interval of the Pth pattern matching - pixel interval of the Pth + 1st pattern matching X (
The minimum H at the pixel interval of the P+1st pattern matching, which is an integer value.
The coordinate position of the Pth highest correlation value is placed in the center of 5 rows x VS columns, and the maximum value of the correlation data of the HS x VS candidate points of pattern matching performed at 1 pixel intervals is determined by a predetermined value. This is achieved by a pattern recognition method characterized in that if the value is larger than the detection threshold value, the coordinate position corresponding to the portion where the maximum correlation value is held is set as the detection position.

他の解決手段は、2次元画像中の特定パターンを自動抽
出するパターン認識方法において、前記定数をdx=3
2.cN’=32.HS=7.VS=7とし、その検出
手段は第1回目の粗検出は水平画像データ抽出手段・垂
直画像データ抽出手段ともに8画素間隔で被検査画像デ
ータが出力されるよう設定し、被検査画像の検出範囲の
中心位置に7行7列の検査位置の中心部(4行4列目)
が対応するように配置して第1回目の粗検出を行ない、
第1回目の49個の候補点の座標位置の相関値の中から
最大相関値が所定の粗検出スレッシュ値よりも大きい値
であれば前記最大相関値を保持した部分に対応した座標
位置を求め、前記最大相関値を保持した部分に対応した
前記第1回目の粗検出にて求めた座標位置を中心に第2
回目の粗検出を3画素間隔にて行い第2回目の49個の
候補点の座標位置の相関値の中から最大相関値が所定の
粗検出スレッシュ値よりも大きい値であれば前記最大相
関値を保持した部分に対応した座標位置を求め、前記第
2回目の粗検出にて求めた最大相関値を持つ座標位置を
中心に第3回目の検出を1画素間隔にて行い第3回目の
49個の候補点の座標位置の相関値の中から最大相関値
が所定の検出スレノンユ値よりも大きい値であれば前記
最大相関値を保持した部分に対応した座標位置を持って
検出位置とすることを特徴とするパターン認識方法によ
り達成される。
Another solution is to set the constant to dx=3 in a pattern recognition method that automatically extracts a specific pattern in a two-dimensional image.
2. cN'=32. HS=7. VS=7, and in the first rough detection, both the horizontal image data extraction means and the vertical image data extraction means are set so that the image data to be inspected is output at 8 pixel intervals, and the detection range of the image to be inspected is The center of the inspection position of 7 rows and 7 columns (4th row and 4th column)
Perform the first rough detection by arranging the
If the maximum correlation value among the correlation values of the coordinate positions of the first 49 candidate points is larger than a predetermined coarse detection threshold value, calculate the coordinate position corresponding to the part where the maximum correlation value is held. , a second coordinate position is calculated based on the coordinate position obtained in the first rough detection corresponding to the part where the maximum correlation value is held.
The second coarse detection is performed at 3 pixel intervals, and if the maximum correlation value among the correlation values of the coordinate positions of the second 49 candidate points is larger than a predetermined coarse detection threshold value, the maximum correlation value is determined. Find the coordinate position corresponding to the part where . If the maximum correlation value among the correlation values of the coordinate positions of the candidate points is larger than a predetermined detection value, the coordinate position corresponding to the part holding the maximum correlation value is set as the detection position. This is achieved by a pattern recognition method characterized by:

更に他の解決手段は第1項記載の解決手段において、d
x=32.dy=32.HS=7.VS=7とし、その
検出手段は第1回目を16画素間隔で第1回目のパター
ン照合の画素間隔で7×7=49個の被検査画像データ
が同時に出力されるよう設定し、被検査画像の検出範囲
の中心位置に7行×7列の検査位置の中心部(4行4列
目)が対応するように配置して第1回目の粗検出を行な
い、もし粗検出スレッシュ値より高い相関値となるパタ
ーン照合位置か獲得できなかった場合は第2回目は同じ
く16画素間隔でパターン照合を行なうが基準画像パタ
ーンの画像データ発生位置を8画素ずらした位置で認識
を行なうことにより照合位置を算出することとし、第2
回目の粗検出スレッシュ値は第1回目の粗検出スレッシ
ュ値と同一値とし第2回目用の粗検出スレッシュ値より
大きくなった候補点が見つかった場合、マイクロコンピ
ュータより事前に設定された第2回目用の粗検出スレッ
シュ値より太き(なった第2回目の49個の候補点の相
関データの最高相関値の座標位置を求め、前記第2回目
の粗検出にて求めた最高相関値の座標位置を中心に第3
回目の粗検出を3画素間隔にて行いマイクロコンピュー
タより第2回目の粗検出の後に設定された第3回目用の
粗検出スレッシュ値より大きくなった第3回目の49個
の候補点の相関データの最高相関値の座標位置を求め、
前記第3回目の粗検出にて求めた最高値位置座標を中心
に第4回目以降のパターン照合を1画素間隔にて行い、
第4回目の49個の候補点の相関データの最大値が所定
の検出スレッシュ値−よりも大きい値であれば前記最大
相関値を保持した部分に対応した座標位置を検出位置と
することを特徴とするパターン認識方法により達成され
る。
Still another solution is the solution described in item 1, in which d
x=32. dy=32. HS=7. VS=7, and the detection means is set so that 7×7=49 pieces of image data to be inspected are output simultaneously at 16 pixel intervals for the first pattern matching and at pixel intervals for the first pattern matching. Perform the first rough detection so that the center of the 7 rows x 7 columns of inspection positions (4th row, 4th column) corresponds to the center of the detection range, and if the correlation is higher than the coarse detection threshold value. If a pattern matching position that is a value cannot be obtained, pattern matching is performed at 16 pixel intervals the second time, but the matching position is determined by performing recognition at a position shifted by 8 pixels from the image data generation position of the reference image pattern. The second
The coarse detection threshold value for the first time is the same as the coarse detection threshold value for the first time, and if a candidate point that is larger than the coarse detection threshold value for the second time is found, the second time is set in advance by the microcomputer. Find the coordinate position of the highest correlation value of the correlation data of the 49 candidate points in the second round, and calculate the coordinate position of the highest correlation value found in the second round of rough detection. 3rd centering around the position
Correlation data of 49 candidate points of the third time, which is larger than the coarse detection threshold value for the third time set after the second rough detection by the microcomputer after the second rough detection is performed at 3-pixel intervals. Find the coordinate position of the highest correlation value of
The fourth and subsequent pattern matching is performed at 1 pixel intervals, centering on the highest value position coordinates obtained in the third rough detection,
If the maximum value of the correlation data of the 49 candidate points in the fourth round is larger than a predetermined detection threshold value -, the coordinate position corresponding to the part where the maximum correlation value is held is set as the detection position. This is achieved using a pattern recognition method.

また、別の解決手段は第1項記載の解決手段において、
dx=32.dV=32.HS=7.VS=7とし、そ
の検出手段は第1回目を32画素間隔で第1回目のパタ
ーン照合の画素間隔で7×7=49個の被検査画像デー
タが同時に出力されるよう設定し、被検査画像の検出範
囲の中心位置に7行×7列の検査位置の中心部(4行4
列目)が対応するように配置して第1回目の粗検出を行
ない、第2回目のパターン照合においても粗検出スレッ
シュ値より高い相関値となるパターン照合位置が獲得で
きなかった場合は第2回目は同じ(32画素間隔で第1
回目の粗検出スレッシュ値でパターン照合を行なうが基
準画像の画像データ発生位置を16画素ずらした位置で
認識を行なうことにより照合位置を算出することとし、
もし粗検出スレッシュ値より高い相関値となるパターン
照合位置が獲得できなかった場合は第3回目は同じく3
2画素間隔でパターン照合を行なうが基準画像の画像デ
ータ発生位置を第2回目より更に8画素ずらした位置で
認識を行なうことにより照合位置を算出することとし、
第3回目の粗検出スレッシュ値は第1回目の粗検出スレ
ッシュ値と同一値とし第1回目用の粗検出スレッシュ値
より大きくなった第3回目の49個の候補点の座標位置
の相関値の中から最大の相関値を持つ座標位置を求め、
前記第3回目の粗検出にて求めた座標位置を中心に第4
回目の粗検出を3画素間隔にて行い第4回目の49個の
候補点の座標位置の相関値の中から最大の相関値を持つ
座標位置を求め、前記第4回目の粗検出にて求めた座標
位置を中心に第5回目の検出を1画素間隔にて行い第5
回目の49個の候補点の座標位置の相関値の中から最大
の相関値が所定の検出スレッシュ値よりも大きい値であ
れば前記最大相関値を保持した部分に対応した座標位置
を持って検出位置とすることを特徴とするパターン認識
方法により達成される。
In addition, another solution is the solution described in paragraph 1,
dx=32. dV=32. HS=7. VS=7, and the detection means is set so that 7×7=49 pieces of image data to be inspected are simultaneously output at a pixel interval of 32 pixels for the first pattern matching. The center of the inspection position of 7 rows x 7 columns (4 rows and 4
If a pattern matching position with a correlation value higher than the coarse detection threshold value could not be obtained in the second pattern matching, the second pattern matching position The second time is the same (first at 32 pixel intervals)
Pattern matching is performed using the second coarse detection threshold value, but the matching position is calculated by performing recognition at a position shifted by 16 pixels from the image data generation position of the reference image.
If a pattern matching position with a correlation value higher than the rough detection threshold value could not be obtained, the third time
Pattern matching is performed at 2-pixel intervals, but the matching position is calculated by performing recognition at a position where the image data generation position of the reference image is further shifted by 8 pixels from the second time.
The third rough detection threshold value is the same as the first rough detection threshold value, and the correlation value of the coordinate positions of the 49 candidate points in the third time, which is larger than the first coarse detection threshold value, is Find the coordinate position with the maximum correlation value from among them,
The fourth point is centered around the coordinate position obtained in the third rough detection.
The fourth rough detection is performed at 3-pixel intervals, and the coordinate position with the maximum correlation value is determined from among the correlation values of the coordinate positions of the 49 candidate points in the fourth time, and the coordinate position is determined in the fourth rough detection. The fifth detection is performed at 1 pixel intervals centering on the coordinate position
If the maximum correlation value among the correlation values of the coordinate positions of the 49 candidate points is larger than a predetermined detection threshold value, the coordinate position corresponding to the part holding the maximum correlation value is detected. This is achieved by a pattern recognition method characterized by position.

更に別の解決手段は第1項記載の解決手段において、1
画素間隔にて行ったHS×VS個のノくターン照合の相
関データと検査座標位置を用いた補間演算処理により水
平・垂直方向ともに1画素以下の照合座標位置を算出し
検出位置とすることを特徴とするパターン認識方法によ
り、また、1画素間隔にて行ったパターン照合の相関デ
ータを用いてそのパターン照合位置を水平方向は最高相
関値を持つ座標位置を含む左右両隣の座標の相関データ
の計3データを、垂直方向は最高相関値を持つ座標位置
を含む上下両隣の座標の相関データのそれぞれ計3デー
タを用いたスプライン補間演算より水平・垂直方向とも
に1画素以下の照合座標位置を算出し検出位置とするこ
とを特徴とする。<ターン認識方法によりそれぞれ達成
される。
Still another solution is the solution described in item 1,
By interpolation processing using the correlation data of HS × VS number of cross-turn matching performed at pixel intervals and the inspection coordinate position, the matching coordinate position of 1 pixel or less in both the horizontal and vertical directions is calculated and used as the detection position. Using the characteristic pattern recognition method, we also use the correlation data of pattern matching performed at 1-pixel intervals to determine the pattern matching position in the horizontal direction from the correlation data of the left and right neighboring coordinates including the coordinate position with the highest correlation value. A matching coordinate position of 1 pixel or less in both the horizontal and vertical directions is calculated by spline interpolation using a total of 3 data, including the coordinate position with the highest correlation value in the vertical direction, and the correlation data of the upper and lower neighboring coordinates. and the detected position. <Respectively achieved by turn recognition methods.

上述する認識方法は更に前記相関値積算手段の相関値デ
ータをマイクロコンピュータより事前ζこ設定されたパ
ターン検出スレ・ンシュ値との大小を同時に比較判定す
ることで候補点における。N11ターン照合状態を高速
に検出できるように、前記相関値積算手段のデータ出力
と、保持した検出スレ、ソシュ値と比較し、個々の検査
座標位置に対応した座標位置との間で大小を同時に比較
判定し、その結果を保持する個々の検査座標位置に対応
した保持手段をVS×HS個の個々の検査座標位置に対
応した分だけ設けることとし、マイクロコンピュータに
は1水平走査ラインHS力所の比較結果を一まとめにし
マイクロコンピュータの1回の読み込みで1水平走査ラ
インの各パターン照合位置の状態の概略を高速に把握で
きるように状態を保持した手段を垂直パターン照合のV
S本だけ設けることで、各1水平走査ラインの各パター
ン照合位置の状態の概略を高速に把握しその演算対応位
置の特定を容易に行えるようにした水平候補点検出手段
を付置aして構成され、第1回目の粗検出は水平画像デ
ータ抽出手段・垂直画像データ抽出手段をそれぞれの第
1回目のパターン照合の画素間隔でHS×VS個の被検
査画像データが同時に出力されるよう設定し、被検査画
像の検出範囲の中心位置にHS行×VS列の検査位置の
中心部が対応するように配置して第1回目の粗検出を行
なし)、前記水平候補点検出手段により第1回目の粗検
出の後マイクロコンピュータより事前に設定された第1
回目の粗検出スレ、ソシュ値を越える検出位置の候補点
が存在するかを調べ、存在していた場合に存在を示して
いる水平比較ラインの前記水平候補点検出手段の情報を
読み込み、前記情報に対応するパターン照合座標位置に
おける相関値を保持している手段より、第1回目の、z
aターン照合を行った複数の候補点の相関カウント値の
中で最大相関値を保持する部分に対応した。N6タ一ン
照合座標位置をもって、次回のパターン照合の中心座標
位置と決定し、前記第1回目の粗検出にて求めた最高相
関値の座標位置を中心にHS行×VS列の検査位置の中
心部が対応するように配置し、第2回目の粗検出を水平
方向はε第1の画素間隔−第2の画素間隔X (HS−
1)/2)≦0を、垂直方向は(第1の画素間隔−第2
の画素間隔X(VS−1)/2)≦0を、満たす第2の
画素間隔にてH5行×VS列の中心部が対応するように
配置して行い前記水平候補点検出手段からマイクロコン
ピュータより第1回目の粗検出の後に設定された第2回
目用の粗検出スレンンユ値より大きくなった第2回目の
複数の候補点の相関データの最高相関値の座標位置を求
め、前記第2回目の粗検出にて求めた最高値位置座標を
中心にHS行×VS列の中心部を配置して第3回目以降
のパターン照合を1画素間隔にて行うまで水平方向は(
第P回目のパターン照合の画素間隔−第P+1回目のパ
ターン照合の画素間隔X (HS−1)/2)≦0を、
垂直方向は(第P回目のパターン照合の画素間隔−第p
十を回目のパターン照合の画素間隔X(VS−1)/2
’}≦0を、満たす第P+1回目のパターン照合の画素
間隔にてHS行×VS列の中心部を配置して行い、前記
水平候補点検出手段からマイクロコンピュータよりパタ
ーン照合を1画素間隔にて行った第P+1回目用の検出
スレッンユ値より大きくなった第P千1回目の単一ある
いは複数の候補点の相関データの最大値を持つ座標位置
を検出位置とすることを特徴とするパターン認識方法に
より達成される。
The above-mentioned recognition method further determines a candidate point by simultaneously comparing the correlation value data of the correlation value accumulating means with a pattern detection threshold value set in advance by a microcomputer. In order to detect the N11 turn verification state at high speed, the data output of the correlation value accumulation means is compared with the held detection thread and Soshu value, and the magnitude is simultaneously determined between the coordinate position corresponding to each inspection coordinate position. Holding means corresponding to the individual inspection coordinate positions for comparing and determining and holding the results are provided for each of the VS x HS individual inspection coordinate positions, and the microcomputer has one horizontal scanning line HS force point. Vertical pattern matching V
By providing only S number of horizontal candidate point detection means, it is possible to grasp the outline of the state of each pattern matching position of each horizontal scanning line at high speed and easily specify the position corresponding to the calculation. In the first rough detection, the horizontal image data extraction means and the vertical image data extraction means are set so that HS×VS pieces of image data to be inspected are simultaneously output at the pixel interval of the first pattern matching. , the center of the inspection position of the HS row x VS column is arranged so that it corresponds to the center of the detection range of the image to be inspected, and the first rough detection is not performed), and the horizontal candidate point detection means detects the first After the first rough detection, the first
In the second coarse detection thread, it is checked whether there is a candidate point at a detection position exceeding the Sosch value, and if there is, the information of the horizontal candidate point detection means of the horizontal comparison line indicating the existence is read, and the information is read. From the means that holds the correlation value at the pattern matching coordinate position corresponding to z
This corresponds to the part that holds the maximum correlation value among the correlation count values of the plurality of candidate points subjected to a-turn matching. The N6 tanning matching coordinate position is determined as the center coordinate position for the next pattern matching, and the inspection position of the HS row x VS column is determined with the coordinate position of the highest correlation value obtained in the first rough detection as the center. The centers are arranged so that they correspond, and the second rough detection is performed in the horizontal direction by ε first pixel interval - second pixel interval X (HS-
1)/2)≦0, and the vertical direction is (first pixel interval - second pixel interval)
The pixel spacing X(VS-1)/2)≦0 is arranged so that the centers of H5 rows x VS columns correspond to each other at a second pixel spacing satisfying X(VS-1)/2)≦0. The coordinate position of the highest correlation value of the correlation data of the plurality of candidate points in the second time, which is larger than the rough detection value for the second time set after the first rough detection, is determined, and The horizontal direction is (
Pixel interval of Pth pattern matching - Pixel interval of P+1st pattern matching X (HS-1)/2)≦0,
The vertical direction is (pixel interval of Pth pattern matching - pth
Pixel interval of tenth pattern matching X(VS-1)/2
'}≦0 by arranging the center of the HS row x VS column at the pixel interval of the P+1st pattern matching that satisfies A pattern recognition method characterized in that the coordinate position having the maximum value of the correlation data of the single or plural candidate points of the P-thousandth time, which is larger than the detection threshold value for the P+1th time performed, is set as the detection position. This is achieved by

更に別の第2の解決手段は、2次元画像の中からある特
定パターンを自動抽出するパターン認識方法において、 撮像手段からの2次元映像信号をデジタル化し、被検査
画像の特徴的なパターンの任意サイズを切り出し基準画
像として予め記憶し任意の2次元座標位置に記憶した画
像データを出力可能な基準画像パターン記憶手段と、 2次元被検査画像データの任意の水平走査dyラインを
マイクロコンピュータから設定された分たけ保持可能な
(VS−1)個の水平走査ライン保持手段を(1≦k≦
dy)水平走査ライン間隔(k画素間隔)で均等に開い
ているVS行の個々の検査座標位置に対応した被検査画
像データが同時に出力されるようにした垂直画像データ
抽出手段と、 前記垂直画像データ抽出手段からの画像データのVS個
の同時出力を水平方向の任意の画素dxまてをマイクロ
コンピュータから設定された画素分たけ保持可能な画素
シフト手段をHS個直列につなくことで、1水平方向の
被検査画像データが同時にある烏定された画素(1≦j
≦dx)間隔(5画素間隔)で均等に開いているHSカ
所から同時に出力されるようにしたものを前記垂直抽出
手段からのVS個の水平走査ラインから同時に出力され
た被検査画像データを入力として、前記HS個直列の画
素シフト手段をVS段設ける事で2次元被検査画像デー
タの総計VS×HS地点の個々の検査座標位置に対応し
た被検査画像データを同時に出力されるようにした水平
画像データ抽出手段と、 前記基準画像記憶手段からの画像データと前記水平画像
データ抽出手段からの個々の検査座標位置に対応した被
検査画像データを同時にパターン比較するVS×HS個
の排他的論理和からなる個々の検査座標位置に対応した
パターン照合出力をVS×HS個同時に合同時ルスとし
て個々の検査座標位置に対応した排他的論理和手段より
出力することからなる論理演算手段と、 前記論理演算手段からの個々の検査座標位置に対応した
各合致パルス出力を個々に同時カウントすることにより
VS×HS個のパターン照合を1画像走査で完了し個々
の検査座標位置に対応した部分て独立に算出保持する相
関値積算手段と、前記相関値積算手段の相関値データを
マイクロコンピュータより事前に設定されたパターン検
出スレッシュ値との大小を同時に比較判定することで候
補点におけるパターン照合状態を高速に検出できるよう
に、前記相関値積算手段のデータ出力と、保持した検出
スレッシュ値と比較し、個々の検査座標位置に対応した
座標位置との間で大小を同時に比較判定し、その結果を
保持する個々の検査座標位置に対応した保持手段をVS
×HS個の個々の検査座標位置に対応した分だけ設ける
こととし、マイクロコンピュータには1垂直走査ライン
VSカ所の比較結果を一まとめにしマイクロコンピュー
タの1回の読み込みで1垂直走査ラインの各パターン照
合位置の状態の概略を高速に把握できるように状態を保
持した手段を水平方向においてパターン照合を行うHS
本だけ設けることで、各1垂直走査ラインの状態の概略
を高速に把握しその演算対応位置の特定を容易に行える
ようにした垂直候補点検出手段により構成され、第1回
目の粗検出は水平画像データ抽出手段・垂直画像データ
抽出手段ともに第1の画素間隔て被検査画像データが同
時に出力されるよう設定し、被検査画像の検出範囲の中
心位置にHS行×VS列の検査位置の中心部が対応する
ように配置して第1回目の粗検出を行ない、前記垂直候
補点検出手段により第1回目の粗検出の後マイクロコン
ピュータより事前に設定された第1回目の粗検出スレッ
シュ値を越える検出位置の候補点が存在するかを調べ、
存在していた場合に存在を示している垂直比較ラインの
前記垂直候補点検出手段の情報を読み込み、前記情報に
対応するパターン照合座標位置における相関値を保持し
ている手段より、第1回目のパターン照合を行った複数
の候補点の相関カウント値の中で最大相関値を保持する
部分に対応したパターン照合座標位置をもって、次回の
パター多照合の中心座標位置と決定し、前記第1回目の
粗検出にて求めた最高相関値の座標位置を中心にHS行
×VS列の検査位置の中心部が対応するように配置し、
第2回目の粗検出を水平方向は(第1の画素間隔−第2
の画素間隔×(HS−1)/2)≦0を、垂直方向は(
第1の画素間隔−第2の画素間隔x (VS−1)/2
}≦0を、満たす第2の画素間隔にてHS行×VS列の
中心部が対応するように配置して行い前記垂直候補点検
出手段からマイクロコンピュータより第1回目の粗検出
の後に設定された第2回目用の粗検出スレッンユ値より
大きくなった第2回目の複数の候補点の相関データの最
高相関値の座標位置を求め、前記第2回目の粗検出にて
求めた最高値位置座標を中心にHS行×VS列の中心部
を配置して第3回目以降のパターン照合を1画素間隔に
て行うまで水平方向は(第2回目のパターン照合の画素
間隔−第P+1回目のパターン照合の画素間隔×(HS
−1)/2}≦0を、垂直方向は(第2回目のパターン
照合の画素間隔−第P+1回目のパターン照合の画素間
隔X (VS−1)/2)≦0を、満たす第P+1回目
のパターン照合の画素間隔にてHS行×VS列の中心部
を配置して行い、前記垂直候補点検出手段からマイクロ
コンピュータよりパターン照合を1画素間隔にて行った
第P+1回目用の検出スレッシュ値より大きくなった第
P十1回目の単一あるいは複数の候補点の相関データの
最大値を持つ座標位置を検出位置とすることを特徴とす
るパターン認識方法により達成される。
Yet another second solution is a pattern recognition method that automatically extracts a specific pattern from a two-dimensional image, in which the two-dimensional video signal from the imaging means is digitized and any characteristic pattern of the image to be inspected is extracted. A reference image pattern storage means is capable of outputting image data whose size is cut out and stored in advance as a reference image and stored at an arbitrary two-dimensional coordinate position, and an arbitrary horizontal scanning dy line of the two-dimensional image data to be inspected is set by a microcomputer. (VS-1) horizontal scanning line holding means capable of holding (1≦k≦
dy) vertical image data extraction means configured to simultaneously output image data to be inspected corresponding to individual inspection coordinate positions of VS rows evenly spaced at horizontal scanning line intervals (k pixel intervals); By serially connecting HS pixel shift means capable of holding VS simultaneous outputs of image data from the data extraction means in horizontal arbitrary pixels dx for the number of pixels set by the microcomputer, The image data to be inspected in the horizontal direction is located at the selected pixels (1≦j
≦dx) Input image data to be inspected simultaneously output from VS horizontal scanning lines from the vertical extraction means, which are output simultaneously from HS locations evenly spaced at 5 pixel intervals. By providing the above-mentioned HS number of serial pixel shift means at the VS stage, the total VS of the two-dimensional image data to be inspected x the image data to be inspected corresponding to each inspection coordinate position of the HS point can be simultaneously output. an image data extraction means, and a VS×HS exclusive OR for simultaneously pattern-comparing the image data from the reference image storage means and the image data to be inspected corresponding to each inspection coordinate position from the horizontal image data extraction means. logical operation means for outputting pattern matching outputs corresponding to individual inspection coordinate positions consisting of VS x HS simultaneously as congruence pulses from an exclusive OR means corresponding to each inspection coordinate position; By individually and simultaneously counting each matched pulse output corresponding to each inspection coordinate position from the means, VS × HS pattern matching is completed in one image scan, and the portion corresponding to each inspection coordinate position is calculated independently. The pattern matching state at the candidate point is detected at high speed by simultaneously comparing and determining the magnitude of the held correlation value accumulating means and the correlation value data of the correlation value accumulating means with a pattern detection threshold value set in advance by a microcomputer. The data output of the correlation value accumulating means is compared with the held detection threshold value, and the magnitude is determined simultaneously between the coordinate positions corresponding to the individual inspection coordinate positions, and the results are held. VS the holding means corresponding to the inspection coordinate position of
xHS number of inspection coordinate positions are provided, and the microcomputer collects the comparison results of 1 vertical scanning line VS locations, and each pattern of 1 vertical scanning line is read by the microcomputer once. HS that performs pattern matching in the horizontal direction using means that maintains the state so that the outline of the state of the matching position can be grasped at high speed
It consists of a vertical candidate point detection means that can grasp the outline of the state of each vertical scanning line at high speed and easily specify the position corresponding to the calculation by providing only a book. Both the image data extraction means and the vertical image data extraction means are set so that the image data to be inspected is simultaneously output at the first pixel interval, and the center of the inspection position of row HS x column VS is set at the center of the detection range of the image to be inspected. After the first rough detection by the vertical candidate point detection means, the first rough detection threshold value set in advance by the microcomputer is set by the vertical candidate point detection means. Check whether there is a candidate point for the detection position that exceeds the
If it exists, the information of the vertical candidate point detection means of the vertical comparison line indicating the existence is read, and from the means holding the correlation value at the pattern matching coordinate position corresponding to the information, the first The pattern matching coordinate position corresponding to the part that holds the maximum correlation value among the correlation count values of the plurality of candidate points subjected to pattern matching is determined as the center coordinate position of the next multiple putter matching, and Centered on the coordinate position of the highest correlation value obtained by rough detection, the centers of the inspection positions in the HS row x VS column are arranged so that they correspond,
The second coarse detection in the horizontal direction is (first pixel interval - second pixel interval)
pixel spacing × (HS-1)/2)≦0, and in the vertical direction (
First pixel spacing - Second pixel spacing x (VS-1)/2
}≦0 by arranging the centers of the HS row x VS column at a second pixel interval that satisfies The coordinate position of the highest correlation value of the correlation data of the plurality of candidate points in the second time, which is larger than the rough detection value for the second time, is determined, and the coordinate position of the highest value found in the second rough detection is determined. The center of the HS row x VS column is placed as the center, and the horizontal direction is (pixel interval of the second pattern matching - Pth + first pattern matching) until the third and subsequent pattern matching is performed at 1 pixel intervals. Pixel interval x (HS
-1)/2}≦0, and in the vertical direction, (pixel spacing of the second pattern matching - pixel spacing of the P+1st pattern matching X (VS-1)/2)≦0. The P+1 detection threshold value is obtained by arranging the center of the HS row x VS column at a pixel interval for pattern matching, and performing pattern matching by the microcomputer from the vertical candidate point detection means at 1 pixel intervals. This is achieved by a pattern recognition method characterized in that the coordinate position having the maximum value of the correlation data of the P-11th single or plural candidate points, which has become larger, is set as the detection position.

更に別の解決手段は、2次元画像の中からある特定パタ
ーンを自動抽出するパターン認識方法において、 撮像手段からの2次元映像信号をデジタル化し、被検査
画像の特徴的なパターンの任意サイズを切り出し基準画
像として予め記憶し任意の2次元座標位置に記憶した画
像データを出力可能な基準画像記憶手段と、 2次元被検査画像データの任意のdy水平走査(k画素
間隔)で均等に開いているVS行の個々の検査座標位置
に対応した被検査画像データが同時に出力されるように
した垂直画像データ抽出手段と、 前記垂直画像データ抽出手段からの被検査画像データの
VS個の同時出力を水平方向の任意のdX画素までをマ
イクロコンピュータから設定された画素分たけ保持可能
な画素シフト手段をHS個直列につなぐことで、1水平
方向の被検査画像データが同時にある設定された1画素
(1≦J≦5dX)間隔で均等に開いているHS力所か
ら同時に出力されるようにしたものを前記垂直抽出手段
からのVS個の水平走査ラインから同時に出力された被
検査画像データを入力として、前記HS個直列の画素シ
フト手段をVS段設ける事で2次元被検査画像データの
総計VSXHS地点の個々の検査座標位置に対応した被
検査画像データを同時に出力されるようにした水平画像
データ抽出手段と、前記基準画像パターン記憶手段から
の画像データと前記水平画像データ抽出手段からの個々
の検査座標位置に対応した被検査画像パターンデータを
同時にパターン比較するVS×HS個の排他的論理和か
らなる個々の検査座標位置に対応したパターン照合出力
をVS×HSS×HS合同時ルスとして個々の検査座標
位置に対応した排他的論理和手段より出力することから
なる論理演算手段と、前記論理演算手段からの個々の検
査座標位置に対応した各合致パルス出力を個々に同時カ
ウントすることによりVS×HS個のパターン照合を1
画像走査で完了し個々の検査座標位置に対応した部分て
独立に相関値を算出保持する相関値積算手段と、 前記相関値積算手段の相関値データをマイクロコンピュ
ータより事前に設定されたパターン検出スレッシュ値と
の大小を同時に比較判定することで候補点におけるパタ
ーン照合状態を高速に検出てきるように、前記相関値積
算手段のデータ出力と、保持した検出スレッシュ値と比
較し、個々の検査座標位置に対応した座標位置との間で
大小を同時に比較判定し、その結果を保持する個々の検
査座標位置に対応した保持手段をVS×HS個の個々の
検査座標位置に対応した分だけ設けることとし、マイク
ロコンピュータには1水平走査ラインHSカ所の比較結
果を一まとめにしマイクロコンピュータの1回の読み込
みで1水平走査ラインの各パターン照合位置の状態の概
略を高速に把握できるように状態を保持した手段を垂直
パターン照合のVS本だけ設けることで、各1水平走査
ラインの各パターン照合位置の状態の概略を高速に把握
しその演算対応位置の特定を容易に行えるようにした水
平候補点検出手段と、 前記水平候補点検出手段のVS本の水平相関ラインの各
パターン照合位置の状態の概略を高速に把握できるよう
にするためにマイクロコンピュータによる1回のデータ
入力にて把握できるよう前記水平候補点検出手段のVS
本の個々の検査座標位置に対応した各状態保持手段の出
力を個々の検査座標位置に対応した各状態保持手段にお
いて前記粗検出スレッシュ値よりも大きかった状態保持
が1つでもあればその水平相関ラインの状態を保持する
こと〜でマイクロコンピュータに粗検出スレッシュ値を
越える前記水平相関ラインがあったことを知らせる候補
点検出手段により構成され、第1回目の粗検出は水平画
像データ抽出手段・垂直画像データ抽出手段をそれぞれ
の第1回目のパターン照合の画素間隔でHS×VS個の
被検査画像データが同時に出力されるよう設定し、被検
査画像の検出範囲の中心位置にHS行×VS列の検査位
置の中心部が対応するように配置して第1回目の粗検出
を行ない、前記候補点検出手段により第1回目の粗検出
の後マイクロコンピュータより事前に設定された第1回
目の粗検出スレッシュ値を越える検出位置の候補点が存
在するかを調べ、存在していた場合に存在を示している
水平比較ラインの前記水平候補点検出手段の情報を読み
込み、前記情報に対応するパターン照合座標位置におけ
る相関値を保持している手段より、第1回目のパターン
照合を行った複数の候補点の相関カウント値の中で最大
相関値を保持する部分に対応したパターン照合座標位置
をもって、次回のパターン照合の中心座標位置と決定し
、前記第1回目の粗検出にて求めた最高相関値の座標位
置を中心にHS行×VS列の検査位置の中心部が対応す
るように配置し、第2回目の粗検出を水平方向は(第1
の画素間隔−第2の画素間隔x (H5−1)/2)≦
0を、垂直方向は(第1の画素間隔−第2の画素間隔X
 (VS−1)/2)≦0を、満たす第2の画素間隔に
てHS行×VS列の中心部が対応するように配置して行
い前記候補点検出手段からマイクロコンピュータより第
1回目の粗検出の後に設定された第2回目用の粗検出ス
レッシュ値より大きくなった第2回目の複数の候補点の
相関データの最高相関値の座標位置を求め、前記第2回
目の粗検出にて求めた最高値位置座標を中心にHS行×
VS列の中心部を配置して第3回目以降のパターン照合
を1画素間隔にて行うまで水平方向は(第P回目のパタ
ーン照合の画素間隔−第P+1回目のパターン照合の画
素間隔×(HS〜1)/2}≦0を、垂直方向は(第1
回目のパターン照+1回目のパターン照合の画素間隔に
てHS行×VS列の中心部を配置して行い、前記水平候
補点検出手段からマイクロコンピュータよりパターン照
合を1画素間隔にて行った第P+1回目用の検出スレッ
シュ値より大きくなった第P+1回目の単一あるいは複
数の候補点の相関データの最大値を持つ座標位置を検出
位置とすることを特徴とするパターン認識方法により達
成される。
Yet another solution is a pattern recognition method that automatically extracts a specific pattern from a two-dimensional image, by digitizing the two-dimensional video signal from the imaging means and cutting out a characteristic pattern of any size from the image to be inspected. A reference image storage means capable of outputting image data stored in advance as a reference image and stored at an arbitrary two-dimensional coordinate position; Vertical image data extraction means for simultaneously outputting image data to be inspected corresponding to individual inspection coordinate positions in the VS row; By connecting HS pixel shift means in series that can hold up to any dX pixel in the direction by the number of pixels set by the microcomputer, the image data to be inspected in one horizontal direction can be simultaneously transferred to one set pixel (1 ≦J≦5d Horizontal image data extracting means which is configured to simultaneously output the image data to be inspected corresponding to the individual inspection coordinate positions of the total VSXHS point of the two-dimensional image data to be inspected by providing the HS number of serial pixel shift means in the VS stage. and VS×HS exclusive ORs for simultaneously pattern comparing the image data from the reference image pattern storage means and the image pattern data to be inspected corresponding to each inspection coordinate position from the horizontal image data extraction means. a logic operation means for outputting a pattern matching output corresponding to each inspection coordinate position as a VS x HSS x HS congruence rule from an exclusive OR means corresponding to each inspection coordinate position, and from the logic operation means By individually and simultaneously counting each match pulse output corresponding to each inspection coordinate position, VS×HS pattern matching can be performed in one
Correlation value accumulating means that independently calculates and holds correlation values for parts corresponding to individual inspection coordinate positions completed by image scanning; and Correlation value data of the correlation value accumulating means is transferred to a pattern detection threshold set in advance by a microcomputer. The data output of the correlation value accumulating means is compared with the held detection threshold value so that the pattern matching state at the candidate point can be detected at high speed by comparing and determining the magnitude with the value at the same time. The holding means corresponding to the individual inspection coordinate positions for holding the results by simultaneously comparing and determining the size with the coordinate positions corresponding to the VS x HS individual inspection coordinate positions are provided. The microcomputer collects the comparison results of HS locations on one horizontal scanning line and holds the status so that the status of each pattern matching position on one horizontal scanning line can be quickly grasped by reading the microcomputer once. Horizontal candidate point detection means that is capable of quickly grasping the outline of the state of each pattern matching position of each horizontal scanning line and easily specifying the position corresponding to the calculation by providing only VS units for vertical pattern matching. In order to be able to quickly grasp the outline of the state of each pattern matching position of the VS horizontal correlation lines of the horizontal candidate point detection means, the horizontal candidate point detection means can be grasped by one data input by a microcomputer. VS of point detection means
If there is even one state held larger than the rough detection threshold value in each state holding means corresponding to each inspection coordinate position of the book, the output of each state holding means corresponding to each inspection coordinate position of the book is It consists of a candidate point detection means that notifies the microcomputer that there is a horizontal correlation line that exceeds the coarse detection threshold value by holding the state of the line, and the first rough detection is performed by the horizontal image data extraction means and the vertical The image data extraction means is set so that HS x VS pieces of image data to be inspected are simultaneously output at the pixel interval of each first pattern matching, and HS rows x VS columns are placed at the center position of the detection range of the image to be inspected. After the first rough detection by the candidate point detection means, the center of the inspection position of It is checked whether there is a candidate point at the detection position exceeding the detection threshold value, and if there is, the information of the horizontal candidate point detection means of the horizontal comparison line indicating the existence is read, and the pattern matching corresponding to the information is performed. From the means that holds the correlation value at the coordinate position, the pattern matching coordinate position corresponding to the part that holds the maximum correlation value among the correlation count values of the plurality of candidate points for which the first pattern matching was performed is used for the next pattern matching. is determined as the center coordinate position of pattern matching, and arranged so that the center of the inspection position of the HS row × VS column corresponds to the coordinate position of the highest correlation value obtained in the first rough detection, The second rough detection is performed in the horizontal direction (the first
pixel interval - second pixel interval x (H5-1)/2)≦
0, and the vertical direction is (first pixel interval - second pixel interval
(VS-1)/2)≦0 by arranging the centers of rows HS and columns VS at a second pixel interval that satisfies The coordinate position of the highest correlation value of the correlation data of the plurality of second candidate points that has become larger than the second rough detection threshold value set after the rough detection is determined, and in the second rough detection HS line × centered on the obtained highest value position coordinates
Until the center of the VS column is arranged and the third and subsequent pattern matching is performed at 1 pixel intervals, the horizontal direction is (pixel interval of Pth pattern matching - pixel interval of Pth+1st pattern matching x (HS ~1)/2}≦0, and the vertical direction is (first
The center part of the HS row x VS column was arranged at the pixel interval of the second pattern matching + the first pattern matching, and pattern matching was performed by the microcomputer from the horizontal candidate point detection means at one pixel interval. This is achieved by a pattern recognition method characterized in that the coordinate position having the maximum value of the correlation data of the single or plural candidate points of the P+1st time, which is larger than the detection threshold value for the first time, is set as the detection position.

更に別の第4の解決手段は、 2次元画像の中からある
特定パターンを自動抽出するパターン認識方法において
、 撮像手段からの2次元映像信号をデジタル化し、被検査
画像の特徴的なパターンの任意サイズを切り出し基準画
像パターンとして予め記憶し任意の2次元座標位置に記
憶した画像データを出力可能な基準画像パターン記憶手
段と、 −2次元被検査画像データの任意の水平走査ラインdy
をマイクロコンピュータから設定された分たけ保持可能
な(VS−1)個の水平走査ライン保持手段を(1≦k
≦dy)水平走査ライン間隔(k画素間隔)で均等に開
いているVS行の個々の検査座標位置に対応した被検査
画像データか同時に出力されるようにした垂直画像デー
タ抽出手段と、 前記垂直画像データ抽出手段からの被検査画像データの
VS個の同時出力を水平方向の任意のdX画素までをマ
イクロコンピュータから設定された画素分たけ保持可能
な画素シフト手段をHS個直列につなぐことで、1水平
方向の被検査画像データか同時にある設定された画素(
1≦J≦dx)間隔(3画素間隔)で均等に開いている
HS力所から同時に出力されるようにしたものを前記垂
直抽出手段からのVS個の水平走査ラインから同時に出
力された被検査画像データを入力として、前記HS個直
列の画素シフト手段をVS段設ける事で2次元被検査画
像データの総計VS×HS地点の個々の検査座標位置に
対応した被検査画像データを同時に出力されるようにし
た水平画像データ抽出手段と、 前記基準画像パターン記憶手段からの画像データと前記
水平画像データ抽出手段からの個々の検査座標位置に対
応した被検査画像パターンデータを同時にパターン比較
するVS×HS個の排他的論理和からなる個々の検査座
標位置に対応したパターン照合出力をVS×HSS×H
S合同時ルスとして個々の検査座標位置に対応した排他
的論理和手段より出力することからなる論理演算手段と
、前記論理演算手段からの個々の検査座標位置に対応し
た各合致パルス出力を個々に同時カウントすることによ
りVS×HS個のパターン照合を1画像走査で完了し個
々の検査座標位置に対応した部分で独立に算出保持する
相関値積算手段と、 前記相関値積算手段の相関値データをマイクロコンピュ
ータより事前に設定されたパターン検出スレッシュ値と
の大小を同時に比較判定することて候補点におけるパタ
ーン照合状態を高速に検出できるように、前記相関値積
算手段のデータ出力と、保持した検出スレッンユ値と比
較し、個々の検査座標位置に対応した座標位置との間で
大小を同時に比較判定し、その結果を保持する個々の検
査座標位置に対応した保持手段をVSXHS個の個々の
検査座標位置に対応した分だけ設けることとし、マイク
ロコンピュータには1垂直走査ラインVSカ所の比較結
果を一まとめにしマイクロコンピュータの1回の読み込
みで1垂直走査ラインの各パターン照合位置の状態の概
略を高速に把握できるように状態を保持した手段を水平
方向においてパターン照合を行うHS本だけ設けること
で、各1垂直走査ラインの状態の概略を高速に把握しそ
の演算対応位置の特定を容易に行えるようにした垂直候
補点検出手段と、 前記垂直候補点検出手段のHS本の垂直相関ラインの各
パターン照合位置の状態の概略を高速に把握できるよう
にするためにマイクロコンピュータによる1回のデータ
入力にて把握できるよう前記垂直候補点検出手段のHS
本の個々の検査座標位置に対応した各状態保持手段の出
力を個々の検査座標位置に対応した各状態保持手段にお
いて前4′詰粗検出スレツシユ値よりも大きかった状態
保持か1つでもあればその垂直相関ラインの状態を保持
することでマイクロコンピュータに粗検出スレッシュ値
を越える前記垂直相関ラインがあったことを知らせる候
補点検出手段により構成され、第1回目の粗検出は水平
画像データ抽出手段・垂直画像データ抽出手段をそれぞ
れの第1回目のパターン照合の画素間隔でHS×VS個
の被検査画像データか同時に出力されるよう設定し、被
検査画像の検出範囲の中心位置にHS行×VS列の検査
位置の中心部が対応するように配置して第1回目の粗検
出を行ない、前記垂直候補点検出手段により第1回目の
粗検出の後マイクロコンピュータより事前に設定された
第1回目の粗検出スレッシュ値を越える検出位置の候補
点が存在するかを調べ、存在していた場合に存在を示し
ている垂直比較ラインの前記垂直候補点検出手段の情報
を読、4−置における相関値を保持している手段より、
第1回目のパターン照合を行った複数の候補点の相関カ
ウント値の中で最大相関値を保持する部分に対応したパ
ターン照合座標位置をもって、次回のパターン照合の中
心座標位置と決定し、前記第1回目の粗検出にて求めた
最高相関値の座標位置を中心にHS行×VS列の検査位
置の中心部が対応するように配置し、第2回目の粗検出
を水平方向は(第1の画素間隔−第2の画素間隔x(H
S−1)/2)≦0を、垂直方向は(第1の画素間隔−
第2の画素間隔X (VS−1)/2)≦0を、満たす
第2の画素間隔にてHS行×VS列の中心部が対応する
ように配置して行い前記候補点検出手段からマイクロコ
ンピュータより第1回目の粗検出の後に設定された第2
回目用の粗検出スレッシュ値より大きくなった第2回目
の複数の候補点の相関データの最高相関値の座標位置を
求め、前記第2回目の粗検出にて求めた最高値位置座標
を中心にHS行×VS列の中心部を配置して第3回目以
降のパターン照合を1画素間隔にて行うまで水平方向は
(第P回目のパターン照合の画素間隔−第P + I訓
目のパターン照合の画素間隔×(HS−1)、、’&2
}≦0を、垂直方向は(第P回目のパターン照合の画素
間隔−第p+を回目のパターン照合の画素間隔x (V
S−1)/2}≦0を、満たす第P+1回目のパターン
照合の画素間隔にてHS行×VS列の中心部を配置して
行い、前記垂直候補点検出手段からマイクロコンピュー
タよりパターン照合を1画素間隔にて行った第P+1回
目用の検出スレッシュ値より大きくなった第P+1回目
の単一あるいは複数の候補点の相関データの最大値を持
つ座標位置を検出位置とすることを特徴とするパターン
認識方法により達成される。
Still another fourth solution is a pattern recognition method that automatically extracts a specific pattern from a two-dimensional image, in which the two-dimensional video signal from the imaging means is digitized, and any characteristic pattern of the image to be inspected is extracted. a reference image pattern storage means capable of outputting image data whose size is cut out and stored in advance as a reference image pattern and stored at an arbitrary two-dimensional coordinate position; - an arbitrary horizontal scanning line dy of the two-dimensional image data to be inspected;
(1≦k
≦dy) Vertical image data extraction means configured to simultaneously output image data to be inspected corresponding to individual inspection coordinate positions of VS rows evenly spaced at horizontal scanning line intervals (k pixel intervals); By serially connecting HS pixel shift means capable of holding VS simultaneous outputs of image data to be inspected from the image data extraction means up to arbitrary dX pixels in the horizontal direction by the number of pixels set by the microcomputer, 1 horizontal direction image data to be inspected or a certain set pixel at the same time (
1≦J≦dx) intervals (3 pixel intervals), which are output simultaneously from the HS force points that are evenly spaced at intervals of 3 pixels, are simultaneously output from the VS horizontal scanning lines from the vertical extraction means. By using the image data as input and providing the HS number of serial pixel shift means in the VS stage, the image data to be inspected corresponding to the individual inspection coordinate positions of the total VS x HS points of the two-dimensional image data to be inspected can be simultaneously output. horizontal image data extraction means configured to perform a VS×HS pattern comparison, which simultaneously performs a pattern comparison between image data from the reference image pattern storage means and image pattern data to be inspected corresponding to each inspection coordinate position from the horizontal image data extraction means. VS×HSS×H
a logic operation means which outputs an S congruent pulse from an exclusive OR means corresponding to each inspection coordinate position; and a logic operation means which outputs each matching pulse corresponding to each inspection coordinate position from the logic operation means individually. Correlation value accumulating means that completes VS×HS pattern matching in one image scan by simultaneously counting and independently calculating and retaining at a portion corresponding to each inspection coordinate position; and correlation value data of the correlation value accumulating means. The data output of the correlation value accumulating means and the held detection threshold value are used to detect the pattern matching state at a candidate point at high speed by simultaneously comparing and determining the magnitude with a pattern detection threshold value set in advance by a microcomputer. The value is compared with the coordinate position corresponding to each inspection coordinate position, and the holding means corresponding to each inspection coordinate position that holds the result is compared and determined at the same time with the coordinate position corresponding to each inspection coordinate position. The microcomputer is equipped with the comparison results of one vertical scanning line vs. several locations, and the microcomputer can quickly obtain an outline of the state of each pattern matching position of one vertical scanning line with one reading of the microcomputer. By providing a means for holding the state so that it can be grasped only in the HS book that performs pattern matching in the horizontal direction, it is possible to quickly grasp the outline of the state of each vertical scanning line and easily specify the position corresponding to the calculation. In order to be able to quickly grasp the outline of the state of the vertical candidate point detecting means and each pattern matching position of the HS vertical correlation lines of the vertical candidate point detecting means, one data input by a microcomputer is required. HS of the vertical candidate point detection means so that it can be grasped.
If the output of each state holding means corresponding to each inspection coordinate position of the book is held in a state larger than the previous 4' packing coarse detection threshold value, at least one state is maintained. The candidate point detection means holds the state of the vertical correlation line and notifies the microcomputer that there is the vertical correlation line exceeding the coarse detection threshold value, and the first rough detection is performed by the horizontal image data extraction means. - Set the vertical image data extraction means to simultaneously output HS x VS pieces of inspected image data at the pixel interval of each first pattern matching, and set the HS row x VS pieces of inspected image data at the center position of the detection range of the inspected image. A first rough detection is performed by arranging the centers of the inspection positions in the VS column to correspond to each other, and after the first rough detection by the vertical candidate point detection means, the first rough detection point is set in advance by the microcomputer. It is checked whether there is a candidate point at the detection position that exceeds the coarse detection threshold value for the second time, and if there is, the information of the vertical candidate point detection means of the vertical comparison line indicating the existence is read, and From the means that maintains the correlation value,
The pattern matching coordinate position corresponding to the part that holds the maximum correlation value among the correlation count values of the plurality of candidate points subjected to the first pattern matching is determined as the center coordinate position of the next pattern matching, and the The coordinate position of the highest correlation value obtained in the first rough detection is arranged so that the center of the inspection position in the HS row x VS column corresponds to the coordinate position of the highest correlation value obtained in the first rough detection, and the second rough detection is pixel spacing − second pixel spacing x(H
S-1)/2)≦0, and the vertical direction is (first pixel interval -
The second pixel interval X (VS-1)/2)≦0 is arranged so that the centers of rows HS and columns VS correspond to each other at second pixel intervals that satisfy the condition X (VS-1)/2)≦0. The second rough detection set by the computer after the first rough detection
Find the coordinate position of the highest correlation value of the correlation data of the plurality of candidate points in the second time, which is larger than the rough detection threshold value for the second time, and center around the coordinate of the highest value position found in the second rough detection. Until the center of the HS row x VS column is arranged and the 3rd and subsequent pattern matching is performed at 1 pixel intervals, the horizontal direction is (pixel interval of the Pth pattern matching - pattern matching of the Pth + Ith pattern matching) pixel spacing x (HS-1),,'&2
}≦0, and the vertical direction is (pixel interval of Pth pattern matching - pixel interval of p+th pattern matching x (V
S-1)/2}≦0 by arranging the center of the HS row x VS column at the pixel interval of the P+1st pattern matching satisfying The detection position is characterized in that the coordinate position having the maximum value of the correlation data of the P+1 single or multiple candidate points, which is larger than the P+1 detection threshold value performed at 1 pixel intervals, is set as the detection position. This is achieved through pattern recognition methods.

更に、上述のの第1の解決手段を持つパターン認識方法
において、第1回目の粗検出は水平画像データ抽出手段
・垂直画像データ抽出手段ともに第1の画素間隔で被検
査画像データが出力されるよう設定し、被検査画像の検
出範囲の中心位置にHS行×VS列の検査位置の中心部
が対応するよう二一夕より事前に設定された第1回目用
の粗検出スレッシュ値より大きくなった候補点が見つか
った場合、前記水平候補点検出手段からマイクロコンピ
ュータより事前に設定された第1回目用の粗検出スレッ
シュ値より大きくなった第1回目の単一あるいは複数の
パターン照合候補点の宵無を示すXY座標位置データよ
り重心位置を求め、前記第1回目の粗検出にて求めた重
心位置を中心に第2回目の粗検出を(第1の画素間隔−
第2の画素間隔X (HS−1)/2)≦0を満たす第
2の画素間隔にて行い前記候補点検出手段からマイクロ
コンピュータより第1回目の粗検出の後に設定された第
2回目用の粗検出スレッシュ値より大きくなった第2回
目の単一あるいは複数の候補点の位置データの重心位置
を求め、前記第2回目の粗検出にて求めた重心位置を中
心に第3回目以降のパターン照合を1画素間隔にて行う
まで(第P回目のパターン照合の画素間隔−第p+を回
目のパタ−ン照合の画素間隔x (HS−1)/2}≦
0を満たす第P+1回目のパターン照合の画素間隔にて
行い、前記候補点検出手段からマイクロコンピュータよ
り第2回目の粗検出の後に設定された第P+1回目用の
検出スレッシュ値より大きくなった第P+1回目の単一
あるいは複数の候補点の位置データの最大値を持って検
出位置とすることを特徴とするパターン認識方法により
達成される。
Furthermore, in the pattern recognition method having the first solution described above, in the first rough detection, both the horizontal image data extraction means and the vertical image data extraction means output the image data to be inspected at the first pixel interval. The coarse detection threshold value for the first detection is set in advance so that the center of the inspection position in the HS row x VS column corresponds to the center position of the detection range of the image to be inspected. If a candidate point is found, the horizontal candidate point detecting means detects the first single or plural pattern matching candidate points whose value is larger than the first coarse detection threshold set in advance by the microcomputer. The center of gravity position is determined from the XY coordinate position data indicating Yoinashi, and the second rough detection is performed (first pixel interval -
A second pixel interval that satisfies the second pixel interval Find the centroid position of the second single or multiple candidate point position data that is larger than the rough detection threshold value, and calculate the centroid position of the third and subsequent candidate points around the centroid position obtained in the second coarse detection. Until pattern matching is performed at one pixel interval (pixel interval of Pth pattern matching - pixel interval of p+th pattern matching x (HS-1)/2}≦
The P+1th pattern matching is performed at the pixel interval of the P+1st pattern matching that satisfies 0, and is larger than the P+1st detection threshold value set after the second rough detection by the microcomputer from the candidate point detection means. This is achieved by a pattern recognition method characterized in that the maximum value of the position data of a single candidate point or a plurality of candidate points is determined as the detected position.

また、上記第2の解決手段を持つパターン認識方法にお
いて、第1回目の粗検出は水平画像データ抽出手段・垂
直画像データ抽出手段ともに第1の画素間隔で被検査画
像データが出力されるよう設定し、被検査画像の検出範
囲の中心位置にHS行×VS列の検査位置の中心部が対
応するように配置して第1回目の粗検出を行ない、前記
垂直候補点高速検出手段からの出力がマイクロコンピュ
ータより事前に設定された第1回目用の粗検出スレッシ
ュ値より大きくなった候補点が見つかった場合、前記垂
直候補点検出手段からマイクロコンピュータより事前に
設定された第1回目用の粗検出スレッシュ値より大きく
なった第1回目の単一あるいは複数のパターン照合候補
点の有無を示すXY座標位置データより重心位置を求め
、前記第1回目の粗検出にて求めた重心位置を中心に第
2回目の粗検出を(第1の画素間隔−第2の画素間隔X
 (HS−1)/2)≦0を満たす第2の画素間隔にて
行い前記候補点検出手段からマイクロコンピュータより
第1回目の粗検出の後に設定された第2回目用の粗検出
スレッシュ値より大きくなった第2回目の単一あるいは
複数の候補点の位置データの重心位置を求め、前記第2
回目の粗検出にて求めた重心位置を中心に第3回目以降
のパターン照合を1画素間隔にて行うまで(第P回目の
パターン照合の画素間隔−第p+を回目のパターン照合
の画素間隔x (MS−1)/2)≦0を満たす第P+
1回目のパターン照合の画素間隔にて行い、前記候補点
検出手段からマイクロコンピュータより第2回目の粗検
出の後に設定された第P千1回目用の検出スレッシュ値
より大きくなった第P+1回目の単一あるいは複数の候
補点の位置データの最大値を持って検出位置とすること
を特徴とするパターン認識方法により達成される。
Further, in the pattern recognition method having the second solving means, in the first rough detection, both the horizontal image data extraction means and the vertical image data extraction means are set so that the image data to be inspected is output at the first pixel interval. Then, a first rough detection is performed by arranging the center of the inspection position of the HS row x VS column so that it corresponds to the center of the detection range of the image to be inspected, and the output from the vertical candidate point high-speed detection means is If a candidate point is found that is larger than the first rough detection threshold value preset by the microcomputer, the vertical candidate point detection means detects the first coarse detection threshold value preset by the microcomputer. The center of gravity position is determined from the XY coordinate position data indicating the presence or absence of a single or multiple pattern matching candidate point in the first round that is larger than the detection threshold value, and the position of the center of gravity determined in the first rough detection is used as the center. The second rough detection (first pixel interval - second pixel interval
(HS-1)/2) ≦ 0 at the second pixel interval satisfying The centroid position of the second single or plural candidate point position data that has become larger is determined, and the second
Until the third and subsequent pattern matching is performed at 1 pixel intervals around the center of gravity position obtained in the first rough detection (pixel interval of the Pth pattern matching - p+) is the pixel interval of the second pattern matching x P+ that satisfies (MS-1)/2)≦0
The P+1st detection threshold is set at the pixel interval of the first pattern matching, and is larger than the detection threshold value for the P101st detection set by the microcomputer from the candidate point detection means after the second rough detection. This is achieved by a pattern recognition method characterized in that the maximum value of the position data of a single or a plurality of candidate points is determined as the detection position.

ここで第1の解決手段において、dx=32.dy=3
2.HS=7.VS=7とし、ソノ検出手段は第1回目
の粗検出は水平画像データ抽出手段・垂直画像データ抽
出手段ともに8画素間隔で被検査画像データが出力され
るよう設定し、被検査画像の検出範囲の中心位置に7行
7列の検査位置の中心部が対応するように配置して第1
回目の粗検出を行ない、前記水平候補点高速検出手段か
らの出力がマイクロコンピュータより事前に設定された
第1回目用の粗検出スレッシュ値より大きくなった候補
点が見つかった場合、前記水平候補点高速検出手段から
マイクロコンピュータより事前に設定された第1回目用
の粗検出スレッシュ値より大きくなった第1回目の単一
あるいは複数の候補点の位置データの相関値をもとに重
心位置を求め、前記第1回目の粗検出にて求めた重心位
置を中心に第2回目の粗検出を3画素間隔にて行い前記
候補点高速検出手段からマイクロコンピュータより第1
回目の粗検出の後に設定された第2回目用の粗検出スレ
ッシュ値より大きくなった第2回目の単一あるいは複数
の候補点の位置データの重心位置を求め、前記第2回目
の粗検出にて求めた重心位置を中心に第3回目の検出を
1画素間隔にて行い前記候補点高速検出手段からマイク
ロコンピュータより第2回目の粗検出の後に設定された
第3回目用の粗検出スレッシュ値より大きくなった第3
回目の単一あるいは複数の候補点の位置データの最大値
を持って検出位置とすることを特徴とするパターン認識
方法により達成される。
Here, in the first solution, dx=32. dy=3
2. HS=7. VS=7, and in the first rough detection of the sono detection means, both the horizontal image data extraction means and the vertical image data extraction means are set so that the image data to be inspected is output at 8 pixel intervals, and the detection range of the image to be inspected is The center of the inspection position in 7 rows and 7 columns corresponds to the center of the first inspection position.
If a candidate point is found whose output from the horizontal candidate point high-speed detection means is larger than the first rough detection threshold value set in advance by the microcomputer after performing the first rough detection, the horizontal candidate point The center of gravity position is determined from the high-speed detection means based on the correlation value of the position data of the first single or multiple candidate points, which is larger than the coarse detection threshold value for the first time set in advance by the microcomputer. , a second rough detection is performed at three pixel intervals centering on the center of gravity position obtained in the first rough detection, and the candidate point high-speed detection means detects the first
The centroid position of the position data of the single or multiple candidate points that has become larger than the second rough detection threshold value set after the second rough detection is calculated, and A third round of detection is performed at one pixel intervals centering on the center of gravity position determined by The third one is bigger
This is achieved by a pattern recognition method characterized in that the maximum value of the position data of a single candidate point or a plurality of candidate points is determined as the detected position.

加えて被検査画像範囲内に、所定のパターン照合の相関
値に達する座標位置が無いときには、対象の位置検出を
不可とすることを特徴とするパターン認識方法により達
成される。
In addition, when there is no coordinate position that reaches a predetermined pattern matching correlation value within the image range to be inspected, this is achieved by a pattern recognition method characterized in that detection of the target position is disabled.

更に別の解決手段は、撮像装置からの2次元映像信号を
デジタル化する2値化回路と、被検査画像の特徴的なパ
ターンをメモリの記憶容量範囲内の任意サイズとして切
り出し基準画像として予め記憶し任意の2次元座標位置
に記憶した画像デー夕を出力可能な基準画像記憶回路と
、 前記2値化回路からの2値化された被検査画像データを
1水平走査ラインからdx水平走査ラインまでをマイク
ロコンピュータからの指示で任意に設定された分だけ保
持可能な水平走査ライン・シフトレジスタ(VS−1)
個で構成され前記(VS−1)個の水平走査ライン・シ
フトレジスタと前記2値化回路とからで2値化画像の垂
直方向に設定されたに水平走査ライン(1≦k≦dx)
間隔(=に画素間隔)で均等に開いているVS行の個々
の検査座標位置に対応した被検査画像データが同時に出
力されるようにした垂直画像データ抽出回路と、 前記垂直画像データ抽出回路からの2値化された被検査
画像データのVS個の同時出力を水平方向の1画素から
6画素までをマイクロコンピュータからの指示で任意に
設定された画素分だけ保持可能な可変長画素・シフトレ
ジスタをH5個直列につなぐことで1水平方向の2値化
された被検査画像データが同時にある設定された3画素
(1≦j≦dy)間隔で均等に開いているHS力所から
同時に出力されるようにしたものを前記垂直抽出回路か
らのVS個の水平走査ラインから同時に出力された2値
化被検査画像データを入力として前記HS個直列の可変
長画素・シフトレジスタをVS段設ける事で前記2値化
画像の総計VS×HS地点の個々の検査座標位置に対応
した2値化被検査画像データを同時に出力されるように
した水平画像データ抽出回路と、 前記基準画像記憶回路からの基準画像データと前記水平
画像データ抽出回路からの個々の検査座標位置に対応し
た被検査画像データを同時にパターン比較するVS×H
S個の排他的論理和回路からなる個々の検査座標位置に
対応したパターン照合出力をVS×HSS×HS合同時
ルスとして個々の検査座標位置に対応した排他的論理和
部より出力することからなる論理演算回路と、前記論理
演算回路からの個々の検査座標位置に対応した各合致パ
ルス出力を個々に同時カウントすることによりVS×H
S個のパターン照合を1画像走査期間で完了し個々の検
査座標位置に対応した部分で独立に算出保持する相関値
積算回路を具備し、 第1回目の粗検出は水平画像データ抽出部・垂直画像デ
ータ抽出部ともに第1の画素間隔で被検査画像データが
同時に出力されるよう設定し、被検査画像の検出範囲の
中心位置にHS行×VS列の検査位置の中心部が対応す
るように配置して第1回目の粗検出を行ない、第1回目
のVS×HS個の候補点の相関データの最高相関値の座
標位置を求め、前記第1回目の粗検出にて求めた最高相
関値の座標位置を中心に第2回目の粗検出を水平方向は
(第1の画素間隔−第2の画素間隔×(HS−1)/2
)≦0を、垂直方向は(第1の画素間隔−第2の画素間
隔X (VS−1)/2)≦0を、満たし最小の整数値
となる第2の画素間隔にて行い第2回目のVSXH5個
の候補点の相関データの最高相関値の座標位置を求め、
前記第2回目の粗検出にて求めた最高相関値を持つ位置
座標を中心に第3回目以降のパターン照合を水平・垂直
方向の設定画素間隔が1画素間隔となるまで水平方向は
(第P回目のパターン照合の画素間隔−第P+1回目の
パターン照合の画素間隔×(HS−1)/2)≦0を、
垂直方向は(第P回目のパターン照合の画素間隔−第P
+1回目のパターン照合の画素間隔x (VS−1)/
2}≦0を、満たし最小の整数値となる第P+1回目の
パターン照合の画素間隔にて行い、1画素間隔にて行な
ったパターン照合のHS×VS個の候補点の相関データ
の最大値が所定の検出スレッシュ値よりも大きい値であ
れば前記最大相関値を保持した部分に対応した座標位置
を検出位置とすることを特徴とするパターン認識装置に
より達成される。
Yet another solution involves a binarization circuit that digitizes a two-dimensional video signal from an imaging device, and a feature that cuts out a characteristic pattern of an image to be inspected to an arbitrary size within the storage capacity of a memory and stores it in advance as a reference image. a reference image storage circuit capable of outputting image data stored at any two-dimensional coordinate position; and a reference image storage circuit capable of outputting image data stored at an arbitrary two-dimensional coordinate position; and a reference image storage circuit capable of outputting image data stored at an arbitrary two-dimensional coordinate position; Horizontal scanning line shift register (VS-1) that can hold a number arbitrarily set according to instructions from a microcomputer.
The horizontal scanning lines (1≦k≦dx) are set in the vertical direction of the binarized image by the (VS-1) horizontal scanning line shift registers and the binarization circuit.
a vertical image data extraction circuit configured to simultaneously output image data to be inspected corresponding to individual inspection coordinate positions of VS rows evenly spaced at intervals (=pixel intervals); and from the vertical image data extraction circuit. Variable-length pixel/shift register that can hold VS simultaneous output of binary image data to be inspected from 1 pixel to 6 pixels in the horizontal direction, arbitrarily set according to instructions from the microcomputer. By connecting H5 pieces in series, one horizontal direction binarized image data to be inspected is simultaneously output from the HS force points that are evenly spaced at a set 3-pixel interval (1≦j≦dy). By providing the VS stage of the HS series variable length pixel/shift register which inputs the binarized image data to be inspected which are simultaneously output from the VS horizontal scanning lines from the vertical extraction circuit. a horizontal image data extraction circuit configured to simultaneously output binarized inspected image data corresponding to individual inspection coordinate positions of the total VS×HS point of the binarized image; and a reference from the reference image storage circuit. VS×H for simultaneously comparing patterns of image data and image data to be inspected corresponding to individual inspection coordinate positions from the horizontal image data extraction circuit;
Consisting of S exclusive OR circuits, the pattern matching output corresponding to each inspection coordinate position is output as a VS x HSS x HS congruence signal from an exclusive OR section corresponding to each inspection coordinate position. VS
It is equipped with a correlation value integration circuit that completes S pattern matching in one image scanning period and independently calculates and stores the parts corresponding to each inspection coordinate position. Both image data extraction units are set so that the image data to be inspected is output simultaneously at the first pixel interval, so that the center of the inspection position in the HS row x VS column corresponds to the center position of the detection range of the image to be inspected. The coordinate position of the highest correlation value of the correlation data of the first VS×HS candidate points is determined by performing the first rough detection, and the highest correlation value determined by the first coarse detection is calculated. The horizontal direction of the second rough detection centered on the coordinate position is (1st pixel interval - 2nd pixel interval x (HS-1)/2
)≦0, and in the vertical direction, the second pixel spacing is the smallest integer value that satisfies (first pixel spacing - second pixel spacing X (VS-1)/2)≦0. Find the coordinate position of the highest correlation value of the correlation data of the 5 candidate points of the VSXH,
The third and subsequent pattern matching is performed centering on the position coordinate having the highest correlation value obtained in the second rough detection, until the set pixel interval in the horizontal and vertical directions becomes 1 pixel interval. Pixel interval of the 1st pattern matching - Pth + pixel interval of the 1st pattern matching x (HS - 1) / 2) ≦ 0,
The vertical direction is (pixel interval of Pth pattern matching - Pth
+ pixel interval of first pattern matching x (VS-1)/
2}≦0, and the maximum value of the correlation data of the HS×VS candidate points of the pattern matching performed at 1 pixel interval is performed at the pixel interval of the P+1st pattern matching that satisfies the minimum integer value. This is achieved by a pattern recognition apparatus characterized in that if the value is larger than a predetermined detection threshold value, the coordinate position corresponding to the portion where the maximum correlation value is held is set as the detection position.

一方、2次元画像の中からある特定パターンを自動抽出
するパターン認識装置において、撮像装置からの2次元
映像信号をデジタル化する2値化回路と、 被検査画像の特徴的なパターンをメモリの記憶容量範囲
内の任意サイズとして切り出し基準画像として予め記憶
し任意の2次元座標位置に記憶した画像データを出力可
能な基準画像記憶回路と、前記2値化回路からの2値化
された被検査画像データを1水平走査ラインからdx水
平走査ラインまでをマイクロコンピュータからの指示で
任意に設定された分たけ保持可能な水平走査ライン・シ
フトレジスタ(VS−1)個で構成され前記(VS−1
)個の水平走査ライン・シフトレジスタと前記2値化回
路とからで2値化画像の垂直方向に設定されたに水平走
査ライン(1≦k≦dx)間隔(=に画素間隔)で均等
に開いているVS行の個々の検査座標位置に対応した被
検査画像データが同時に出力されるようにした垂直画像
データ抽出回路と、 前記垂直画像データ抽出回路からの2値化された被検査
画像データのVS個の同時出力を水平方向の1画素から
4画素までをマイクロコンピュータからの指示で任意に
設定された画素分だけ保持可能な可変長画素・シフトレ
ジスタをHS個直列につなぐことで1水平方向の2値化
された被検査画像データが同時にある設定された画素(
1≦j≦dV)間隔(1画素間隔)で均等に開いている
HS力所から同時に出力されるようにしたものを前記垂
直抽出回路からのVS個の水平走査ラインから同時に出
力された2値化被検査画像データを入力として前記HS
個直列の可変長画素OシフトレジスタをVS段設ける事
で前記2値化画像の総計VSxHS地点の個々の検査座
標位置に対応した2値化被検査画像データを同時に出力
されるようにした水平画像データ抽出回路と、 前記基準画像パターン記憶回路からの画像データと前記
水平画像データ抽出回路からの個々の検査座標位置に対
応した被検査画像パターンデータを同時にパターン比較
するVS×HS個の排他的論理和回路からなる個々の検
査座標位置に対応したパターン照合出力をVS×HSS
×HS合同時ルスとして個々の検査座標位置に対応した
排他的論理和部より出力することからなる論理演算回路
と、 前記論理演算回路からの個々の検査座標位置に対応した
各合致パルス出力を個々に同時カウントすることにより
VS×HS個のパターン照合を1フィールドで完了し個
々の検査座標位置に対応した部分て独立に算出保持する
相関値積算回路と、前記相関値積算回路の相関値データ
をマイクロコンピュータより事前に設定されたパターン
検出スレッシュ値との大小を同時に比較判定することで
候補点におけるパターン照合状態を高速に検出できるよ
うに前記相関値積算回路の出力を個々の検査座標位置に
対応したコンパレータを設け検出スレッシュ値を保持し
個々の検査座標位置に対応したラッチとの間で大小を同
時に比較判定しその結果を保持する個々の検査座標位置
に対応したラッチをVS×HS個の個々の検査座標位置
に対応した分たけ設けることとしマイクロコンピュータ
には1水平走査ラインHSカ所の比較結果を一まとめに
しマイクロコンピュータの1回の読み込みで1水平走査
ラインの各パターン照合位置の状態の概略を高速に把握
できるようにしたラッチ部を垂直パターン照合のVS本
だけ設けることで各1水平走査ラインの各パターン照合
位置の状態の概略を高速に把握しその演算対応位置の特
定を容易に行えるようにした水平候補点検出回路と、前
記水平候補点検出回路のVS本の水平走査ラインの各パ
ターン照合位置の状態の概略を高速に把握できるように
するためにマイクロコンピュータによる1回のデータ入
力にて把握できるよう前記水平候補点検出回路のVS本
の個々の検査座標位置に対応した各ラッチ部の出力を個
々の検査座標位置に対応した各ラッチ部においてスレ・
ソシュ値よりも大きかったランチが1つでもあればその
水平走査ラインの状態を保持することでマイクロコンピ
ュータに相関スレッシュ値を越える水平相関ラインがあ
ったことを知らせる候補点検出回路を具備し、 第1回目の粗検出は水平画像データ抽出部・垂直画像デ
ータ抽出部ともに第1の画素間隔で被検査画像データが
同時に出力されるよう設定し、被検査画像の検出範囲の
中心位置にHS行×VS列の検査位置の中心部が対応す
るように配置して第1回目の粗検出を行ない、前記候補
点検出回路からの出力かマイクロコンピュータより事前
に設定された第1回目用の粗検出スレッシュ値より大き
くなった候補点か見つかった場合、前記水平候補点検出
回路からマイクロコンピュータより事前に設定された第
1回目用の粗検出スレッシュ値より大きくなった第1回
目の複数の候補点の相関データの最高相関値の座標位置
を求め、前記第1回目の粗検出にて求めた最高相関値の
座標位置を中心に第2回目の粗検出を水平方向は(第1
の画素間隔−第2の画素間隔X (HS−1)/2)≦
0を、垂直方向は(第1の画素間隔−第2の画素間隔×
(VS−1)/2}≦0を、満たす第2の画素間隔にて
行い前記候補点検出回路からマイクロコンピュータより
第1回目の粗検出の後に設定された第2回目用の粗検出
スレッシュ値より大きくなった第2回目の複数の候補点
の相関データの最高相関値の座標位置を求め、前記第2
回目の粗検出にて求めた最高値位置座標を中心に第3回
目以降のパターン照合を1画素間隔にて行うまで水平方
向は(第P回目のパターン照合の画素間隔−第P十1回
目のパターン照合の画素間隔x(HS−1)/2}≦0
を、垂直方向は(第P回目のパターン照合の画素間隔−
第P+1回目のパターン照合の画素間隔X (VS−1
)/2)≦0を、満たす第P+1回目のパターン照合の
画素間隔にて行い、前記水平候補点検出回路からマイク
ロコンピュータよりパターン照合を1画素間隔にて行っ
たされた第P+1回目用の検出スレッシュ値より大きく
なった第P+1回目の単一あるいは複数の候補点の相関
データの最大値を持つ座標位置を検出位置とすることを
特徴とするパターン認識装置により達成される。
On the other hand, a pattern recognition device that automatically extracts a specific pattern from a two-dimensional image includes a binarization circuit that digitizes the two-dimensional video signal from the imaging device, and a memory that stores the characteristic patterns of the image to be inspected. a reference image storage circuit capable of outputting image data cut out in an arbitrary size within a capacity range as a reference image and stored in an arbitrary two-dimensional coordinate position; and a binarized image to be inspected from the binarization circuit. It is composed of horizontal scanning line shift registers (VS-1) that can hold data from one horizontal scanning line to dx horizontal scanning lines arbitrarily set according to instructions from a microcomputer.
) horizontal scanning line shift registers and the binarization circuit, the binarized image is evenly spaced at horizontal scanning line (1≦k≦dx) intervals (=pixel interval) in the vertical direction of the binarized image. A vertical image data extraction circuit configured to simultaneously output image data to be inspected corresponding to each inspection coordinate position of an open VS row, and binarized image data to be inspected from the vertical image data extraction circuit. By serially connecting HS variable-length pixel/shift registers that can hold VS simultaneous outputs from 1 to 4 pixels in the horizontal direction for pixels arbitrarily set according to instructions from a microcomputer, one horizontal At the same time, the binarized inspected image data of the direction is set at a certain pixel (
The binary values simultaneously output from the VS horizontal scanning lines from the vertical extraction circuit are output simultaneously from the HS power points equally spaced at intervals of 1≦j≦dV (1 pixel interval). The HS is inputted with image data to be inspected.
A horizontal image in which binarized image data to be inspected corresponding to each inspection coordinate position of the total VS x HS point of the binarized image is output simultaneously by providing variable length pixel O shift registers arranged in series at the VS stage. a data extraction circuit, and VS×HS exclusive logics for simultaneously pattern-comparing the image data from the reference image pattern storage circuit and the image pattern data to be inspected corresponding to each inspection coordinate position from the horizontal image data extraction circuit. The pattern matching output corresponding to each inspection coordinate position consisting of a sum circuit is VS×HSS
×HS congruence pulse output from an exclusive OR section corresponding to each inspection coordinate position; A correlation value accumulating circuit that completes VS×HS pattern matching in one field by counting at the same time, and independently calculates and holds the portion corresponding to each inspection coordinate position; The output of the correlation value integration circuit corresponds to each inspection coordinate position so that the pattern matching state at the candidate point can be detected at high speed by simultaneously comparing and determining the magnitude with the pattern detection threshold value set in advance by the microcomputer. A comparator is installed to hold the detection threshold value, and the latch corresponding to each inspection coordinate position is compared and judged simultaneously with the latch corresponding to each inspection coordinate position, and the result is held. The microcomputer collects the comparison results of each horizontal scanning line HS, and one reading of the microcomputer provides an outline of the state of each pattern matching position of one horizontal scanning line. By providing a latch section for only the VS for vertical pattern matching, it is possible to quickly grasp the outline of the state of each pattern matching position in each horizontal scanning line and easily identify the position corresponding to the calculation. In order to be able to quickly grasp the outline of the state of the horizontal candidate point detection circuit and each pattern matching position of the VS horizontal scanning lines of the horizontal candidate point detection circuit, one-time data input by a microcomputer is required. The output of each latch section corresponding to each inspection coordinate position of the VS book of the horizontal candidate point detection circuit is threaded in each latch section corresponding to each inspection coordinate position so that it can be grasped.
The candidate point detection circuit is equipped with a candidate point detection circuit that holds the state of the horizontal scanning line if there is even one launch that is larger than the Sosch value, thereby notifying the microcomputer that there is a horizontal correlation line that exceeds the correlation threshold value. For the first rough detection, both the horizontal image data extraction section and the vertical image data extraction section are set so that the image data to be inspected is output at the same time at the first pixel interval, and the HS row The first rough detection is performed by arranging the centers of the inspection positions in the VS column to correspond, and the output from the candidate point detection circuit or the first rough detection threshold set in advance by the microcomputer is detected. If a candidate point larger than the value is found, the horizontal candidate point detection circuit calculates the correlation between the plurality of first candidate points that are larger than the first coarse detection threshold value set in advance by the microcomputer. The coordinate position of the highest correlation value of the data is determined, and the second rough detection is performed in the horizontal direction centering on the coordinate position of the highest correlation value determined in the first rough detection.
pixel spacing - second pixel spacing X (HS-1)/2)≦
0, and the vertical direction is (first pixel interval - second pixel interval ×
(VS-1)/2}≦0 is performed at the second pixel interval that satisfies Find the coordinate position of the highest correlation value of the correlation data of the plurality of candidate points that has become larger, and
The horizontal direction is (pixel interval of Pth pattern matching - pixel interval of Pth Pixel interval for pattern matching x (HS-1)/2}≦0
, the vertical direction is (pixel interval of Pth pattern matching -
Pixel interval X of P+1st pattern matching (VS-1
)/2) ≦ 0 is performed at the pixel interval of the P+1st pattern matching, and pattern matching is performed by the microcomputer from the horizontal candidate point detection circuit at 1 pixel intervals. This is achieved by a pattern recognition device characterized in that the coordinate position having the maximum value of the correlation data of the P+1 single or plural candidate points that is larger than the threshold value is set as the detection position.

作旦 本発明によれば、被検査画像における画像のパターン形
状が単調で同じ様なパターンが繰り返し続くような場合
でも撮像装置からの2次元被検査画像データは連続した
シリアルデータとして出力されていることを利用してい
るため、2次元画像の基準画像エリアを大きく取らなけ
れば位置検出による位置の特定が困難であるため多量の
画素を同時に処理しなければある座標位置における相関
値か算出されない場合も、1座標位置に注目すればその
位置における相関値は基準となるシリアルデータ(=基
準画像データ)とともに比較されるシリアルデータ(=
被検査画像データ)を1走査期間内に同時に出力させ、
それぞれの対応する位置の被検査画像データを映像信号
の走査期間と同期させて1画素ずつ相関演算処理するこ
とで、2次元エリアデータであっても時間的にシリアル
データとして処理を行い、2次元データの相関演算を1
次元相関演算による処理のごとくそれぞれの座標位置に
おける相関値の算出の簡素化を計っているのである。す
なわち、各座標位置における相関値を1画素クロック期
間内に完了させるのではなく、1走査期間内にシリアル
データとして演算しその結果をシリアルデータとして積
算する部分を水平垂直方向に多数設けることで多数の座
標位置における相関処理を同時に行なうというものであ
る。そのため、基準画像のサイズの大小は処理手段の物
理的な規模には影響しないので原画像を圧縮あるいは限
定することで基準となる画像データ量を比較処理時に減
らし処理する必要がなく基準画像のサイズを大きく出来
るために、単純で特徴的なパターン形状の登録が困難な
場合でも原画像の画像データをそのまま処理することに
より登録にともなうノウハウの蓄積なくパターンの位置
検出か可能となる。
According to the present invention, even when the image pattern shape in the image to be inspected is monotonous and the same pattern continues repeatedly, the two-dimensional image data to be inspected from the imaging device is output as continuous serial data. Since it is difficult to specify the position by position detection unless the reference image area of the two-dimensional image is made large, the correlation value at a certain coordinate position cannot be calculated unless a large number of pixels are processed simultaneously. However, if we focus on one coordinate position, the correlation value at that position is the serial data (= reference image data) that is compared with the reference serial data (= reference image data).
image data to be inspected) are simultaneously output within one scanning period,
By synchronizing the inspection image data at each corresponding position with the scanning period of the video signal and performing correlation calculation processing pixel by pixel, even two-dimensional area data can be processed as temporally serial data, and two-dimensional Data correlation calculation 1
This is intended to simplify the calculation of correlation values at each coordinate position, similar to processing using dimensional correlation calculations. In other words, instead of completing the correlation value at each coordinate position within one pixel clock period, a large number of parts are provided horizontally and vertically where the correlation values are calculated as serial data within one scanning period and the results are integrated as serial data. Correlation processing is performed at the coordinate positions of . Therefore, the size of the reference image does not affect the physical scale of the processing means, so by compressing or limiting the original image, the amount of reference image data can be reduced during comparison processing, eliminating the need for processing and reducing the size of the reference image. Since it is possible to increase the size of the pattern, even if it is difficult to register a simple and characteristic pattern shape, by processing the image data of the original image as it is, it is possible to detect the position of the pattern without having to accumulate know-how associated with registration.

尖胤桝 以下、本発明に係るパターン認識装置の実施例について
図面を参照しながら説明する。第1図はパターン認識装
置のブロック回路を示すブロック図である。図示するよ
うに、パターン認識装置は撮像装置11からの映像信号
をデジタル化する2値化回路12と、2値化回路12か
らの2値化被検査画像のを予め記憶させた特徴的なパタ
ーンの基準画像とパターン照合するための基準画像記憶
回路16と、2値化被検査画像データを水平方向の1行
から16行までをマイクロコンピュータ13からの指示
で任意に設定された分だけ保持可能な可変長水平走査ラ
イン・シフトレジスタを有し2値化回路12とからで2
値化画像の垂直方向にある設定された間隔で均等に開い
ている7行の被検査画像データが同時に出力されるよう
にした垂直画像データ抽出回路14と、2値化被検査画
像データを水平方向の1画素から166画素でをマイク
ロコンピュータ13からの指示で任意に設定された分だ
け保持可能な可変長画素・シフトレジスタを7個直列に
つなぐことで1水平方向の2値化画像が同時にある設定
された間隔で均等に開いている7カ所から出力されるよ
うにして垂直画像データ抽出回路14からの7行出力の
2値化被検査画像データをつなぎ2値化画像の49 (
7X7)の地点のデータを同時出力するようにした水平
画像データ抽出回路15と、基準画像記憶回路1Bから
の画像データと水平画像データ抽出回路15からの被検
査画像データをパターン比較する49個の排他的論理和
手段のパターン照合出力と画素周波数のクロックパルス
を論理積しパターン照合の結果パターンが合致していれ
ば合致していることを各画素それぞれに対応したパルス
を発生することで検知し画素周波数の合致パルスを出力
することからなる論理演算回路17と、 論理演算回路17からの各合致パルス出力を個々にカウ
ントすることにより49個それぞれのパターン照合を行
なって各座標位置での相関値を個々に積算保持する相関
値積算回路18とにより構成される。
Embodiments of the pattern recognition device according to the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a block circuit of a pattern recognition device. As shown in the figure, the pattern recognition device includes a binarization circuit 12 that digitizes a video signal from an imaging device 11, and a characteristic pattern in which a binarized image to be inspected from the binarization circuit 12 is stored in advance. A reference image storage circuit 16 for pattern matching with the reference image of , and can hold binarized image data to be inspected from 1st line to 16th line in the horizontal direction as arbitrarily set according to instructions from the microcomputer 13. It has a variable length horizontal scanning line shift register and is connected to a binarization circuit 12.
A vertical image data extraction circuit 14 outputs 7 lines of inspected image data evenly spaced at set intervals in the vertical direction of the digitized image at the same time, and a vertical image data extraction circuit 14 that outputs the digitized inspected image data horizontally. By connecting seven variable-length pixel/shift registers in series that can hold 1 to 166 pixels in the direction arbitrarily set according to instructions from the microcomputer 13, one horizontal binarized image can be created simultaneously. Binarized image data to be inspected in 7 lines output from the vertical image data extraction circuit 14 are connected so that they are output from 7 equally spaced locations at certain set intervals.
A horizontal image data extraction circuit 15 configured to simultaneously output data at points 7×7), and 49 horizontal image data extraction circuits for pattern comparing the image data from the reference image storage circuit 1B and the image data to be inspected from the horizontal image data extraction circuit 15. The pattern matching output of the exclusive OR means is ANDed with the clock pulse of the pixel frequency, and if the patterns match as a result of pattern matching, matching is detected by generating a pulse corresponding to each pixel. A logic operation circuit 17 that outputs matching pulses of the pixel frequency; and 49 pattern matching is performed by individually counting each matching pulse output from the logic operation circuit 17, and a correlation value at each coordinate position is calculated. and a correlation value integration circuit 18 that integrates and holds the values individually.

次に、各構成回路部についてその動作を詳しく説明する
。実際の設計例では撮像装置11の視野を横320画素
、縦240画素の格子状に量子化するものとし、基準画
像の大きさを128X128画素以内の任意の長方形範
囲が可能なものとする。基準画像記憶回路16の構成は
動作開始および完了のタイミングを発生させるカウンタ
を水平・垂直方向それぞれの計4つのカウンタを設け、
基準画像の読み出しあるいは書き込み用タイミング信号
を作り、読み出しタイミング信号により基準画像の読み
出しあるいは書き込みを有効とする期間に画素に対応し
たクロンクをカウントするカウンタを動作させ記憶回路
内の画像データを入出力させるものである。これにより
、基準画像パターン記憶回路16の動作開始および完了
のタイミング信号の発生をそれぞれ行なうカウンタへの
設定値を変えることによって基準画像のパターンサイズ
を任意に変更させることが可能となる。
Next, the operation of each component circuit section will be explained in detail. In an actual design example, the field of view of the imaging device 11 is quantized into a grid of 320 pixels horizontally and 240 pixels vertically, and the size of the reference image can be any rectangular range within 128×128 pixels. The configuration of the reference image storage circuit 16 includes a total of four counters each in the horizontal and vertical directions for generating timings for starting and completing operations.
A timing signal for reading or writing a reference image is generated, and a counter that counts clocks corresponding to a pixel is operated during a period in which reading or writing of the reference image is enabled by the read timing signal, and image data in the storage circuit is input/output. It is something. This makes it possible to arbitrarily change the pattern size of the reference image by changing the set values for the counters that generate the timing signals for starting and completing the operation of the reference image pattern storage circuit 16, respectively.

本実施例においては、基準画像の大きさを128X12
8画素以内の長方形範囲としたが、メモリの記憶容量が
許す範囲内であれば、より大きな基準画像をもってパタ
ーン照合を行うことも可能であるのはもちろんであり、
任意に設計できる。
In this example, the size of the reference image is 128×12
Although we used a rectangular range of 8 pixels or less, it is of course possible to perform pattern matching using a larger reference image as long as the storage capacity of the memory allows.
Can be designed arbitrarily.

しかも、記憶容量の大きなメモリさえ用いれば、回路規
模は増すことなく一つの基準画像当りの登録可能サイズ
を変更することも可能であるし、メモリを多数用いるよ
うな設計を行ったとしても回路規模の増加は大幅に増す
ものではない。
Furthermore, as long as a memory with a large storage capacity is used, it is possible to change the size that can be registered per reference image without increasing the circuit scale, and even if a design using a large number of memories is performed, the circuit scale will be reduced. The increase will not be significant.

基準画像記憶回路16のメモリを258kJl’bit
等の1画素1アドレスとなるRAMを使用した場合、パ
ターン照合を行なう長方形範囲の大きさは1画素単位で
パターンの水平書垂直方向サイズを設定することが出来
る。更に、1パターン当りの記憶容量を16kbitと
しているので、基準画像のパターン設定は128X12
3画素以内のパターン範囲としててはなく、■パターン
当りの記憶容量の16kbit容量以内としての使用か
可能である。例えば、200×80画素や、100X1
50画素のパターン範囲など、水平・垂直方向のいずれ
かが128画素の長さを越えるような長方形の基準画像
記憶容量が許す範囲内で必要に応じて可能である。
The memory of the reference image storage circuit 16 is 258kJl'bit.
When using a RAM in which each pixel corresponds to one address, the size of the rectangular range in which pattern matching is performed can be set in the horizontal and vertical directions of the pattern in units of one pixel. Furthermore, since the storage capacity per pattern is 16kbit, the pattern setting for the reference image is 128X12.
It is possible to use it not only as a pattern range of 3 pixels or less, but also as a storage capacity of 16 kbit per pattern. For example, 200x80 pixels or 100x1
A pattern range of 50 pixels or the like is possible as required within the range allowed by the standard image storage capacity of a rectangle whose length exceeds 128 pixels in either the horizontal or vertical direction.

基準画像記憶回路16のメモリを1画素1アドレスでは
ないX4b i tやX8bitのRAMにより構成し
た場合、例えば、32kX8b i tのRAMとする
と8画素の並列入出力となり、水平方向のパターン設定
は8画素単位となる。水平・垂直方向のいずれかが12
8画素の長さを越えるような長方形の基準画像の設定も
必要に応じて可能であるのは256kX1bit等の1
画素1アドレスとなるRAMを用いて設計して場合と同
様である。
If the memory of the reference image storage circuit 16 is configured with an X4bit or X8bit RAM that does not have one pixel and one address, for example, if it is a 32kX8bit RAM, it will be 8 pixels in parallel input/output, and the horizontal pattern setting will be 8. The unit is pixel. Either horizontal or vertical direction is 12
It is possible to set a rectangular reference image with a length exceeding 8 pixels if necessary, such as 256k x 1bit.
This is the same as when designing using a RAM that corresponds to one pixel address.

また、基準画像記憶回路16の動作開始および完了のタ
イミング信号の発生をそれぞれ行なうカウンタへの設定
値を変えることによって基準画像のパターン発生を任意
の座標位置に移動させることか可能となる。これは、パ
ターンを記憶した座標位置を水平方向の100画素目か
ら200画素目までとすると、開始カウンター100.
完了カウンター200を設定し画像データをメモリに書
き込めばよい。そして、開始カウンタ値と完了カウンタ
値の差をそのままにして設定する値を変更し読み出して
やればよい。すなわち、開始カウンタ=50、完了カウ
ンタ=150を設定すれば水平方向の左側に500画素
れた位置に画像データが出力され、開始カウンタ=16
0、完了カウンタ=260を設定すれば水平方向の右側
に600画素れた位置に基準画像データが出力され任意
の座標位置に記憶した基準画像データが出力される。
Further, by changing the set values for the counters that generate the timing signals for starting and completing the operation of the reference image storage circuit 16, it is possible to move the pattern generation of the reference image to an arbitrary coordinate position. This means that if the coordinate position where the pattern is stored is from the 100th pixel to the 200th pixel in the horizontal direction, the start counter is 100.
All that is required is to set the completion counter 200 and write the image data to the memory. Then, the value to be set may be changed and read while leaving the difference between the start counter value and the completion counter value unchanged. In other words, if you set the start counter = 50 and the completion counter = 150, the image data will be output at a position 500 pixels to the left in the horizontal direction, and the start counter = 16.
If 0 and completion counter=260 are set, the reference image data will be output at a position 600 pixels to the right in the horizontal direction, and the reference image data stored at an arbitrary coordinate position will be output.

これにより、被検査画像データの入力はリアルタイムな
入力とすることができ、このリアルタイム入力に基準画
像データの出力タイミングの方を合わせてパターン照合
を行うものである。以上のように、基準画像のパターン
発生を任意の座標位置に移動させる機能は、被検査画像
の任意の検査画像範囲においてパターン照合を行うとい
う目的を達成するために使用されるものである。
Thereby, the image data to be inspected can be input in real time, and pattern matching is performed by matching the output timing of the reference image data to this real time input. As described above, the function of moving the pattern generation of the reference image to an arbitrary coordinate position is used to achieve the purpose of performing pattern matching in an arbitrary inspection image range of the image to be inspected.

次に、本発明に係る別の実施例について図面を参照しな
から説明する。第2図は本発明の第2の実施例としての
パターン認識装置のブロック回路を示すブロック図であ
る。このブロック図は第1図のように、撮像装置11か
らの映像信号をデジタル化する2値化回路12と、2値
化回路12からの2値化画像の特徴的なパターンを基準
画像として予め記憶し被検査画像とパターン照合するた
めの基準画像記憶回路16と、2値化回路12からの2
値化被検査画像データを水平方向の1行から16行まで
をマイクロコンピュータ13からの指示で任意に設定さ
れた分だけ保持可能な可変長水平走査ライン・シフトレ
ジスタ6個で構成され6個の可変長水平走査ライン・シ
フトレジスタ20と2値化回路12とからで2値化画像
の垂直方向にある設定された間隔で均等に開いている7
行の被検査画像データか同時に出力されるようをこした
垂直画像データ抽出回路14と、2値化回路12からの
2値化被検査画像データを水平方向の1画素から166
画素でをマイクロインピユータ13からの指示で任意に
設定された分だけ保持可能な可変長画素シフトレジスタ
を7個直列につなぐことで1水平方向の2値化画像が同
時にある設定された間隔て均等に開いている7カ所から
出力されるようにしたものを垂直画像データ抽出回路1
4からのI打出力の2値化被検査画像データをつなぐた
めに7段設ける事で前記2値化画像の総計7X7 (=
49)地点の2値化被検査画像データを同時に出力され
るようにした水平画像データ抽出回路15と、基準画像
記憶回路16からの画像データと水平画像データ抽出蚊
路15からの被検査画像パターンデータをパターン比較
する49個の排他的論理和手段からのパターン照合出力
と画素と同一周波数のクロックパルスを論理積しパター
ン照合の結果パターンが合致していれば合致しているこ
とを各画素それぞれに対応したパルスを発生することで
知らせることとし画素と同一周波数の合致パルスを出力
することからなる論理演算回路17と、論理演算回路1
7からの各合致パルス出力を個々にカウントする事によ
り49個それぞれのパターン照合を行なった各座標位置
での相関値を個々に積算保持する相関値積算回路18と
、更に相関値積算回路18の相関値データをマイクロコ
ンピュータ13より事前に設定された検出スレッシュ値
との大小を比較判定することで候補点を高速に検出でき
るように相関値積算回路18の出力を個々に対応したコ
ンパレータを設け検出スレッンユ値を保持するラッチと
の間で大小を比較判定しその結果を保持するラッチを4
9個の個々に対応した分たけ設けることとしマイクロコ
ンピュータ13には1水平走査ラインの比較結果を一ま
とめにしマイクロコンピュータ13の1回の読み込みで
把握できるようにしたラッチ部を垂直パターン照合の7
本だけ設けることでその演算対応位置の特定を行いや好
くする水平候補点検出回路19より構成される。
Next, another embodiment of the present invention will be described with reference to the drawings. FIG. 2 is a block diagram showing a block circuit of a pattern recognition device according to a second embodiment of the present invention. As shown in FIG. 1, this block diagram includes a binarization circuit 12 that digitizes the video signal from the imaging device 11, and a characteristic pattern of the binarized image from the binarization circuit 12 that is preliminarily set as a reference image. A reference image storage circuit 16 for storing and pattern matching with the image to be inspected, and two from the binarization circuit 12.
It consists of six variable-length horizontal scanning line shift registers that can hold the digitized image data to be inspected from the 1st line to the 16th line in the horizontal direction as arbitrarily set according to instructions from the microcomputer 13. The variable-length horizontal scanning line shift register 20 and the binarization circuit 12 form a line 7 that is evenly spaced at a set interval in the vertical direction of the binarized image.
The vertical image data extraction circuit 14 outputs the image data to be inspected for each row at the same time, and the binarized image data to be inspected from the binarization circuit 12 is extracted from 1 pixel in the horizontal direction to 166 pixels.
By connecting seven variable-length pixel shift registers in series that can hold the number of pixels arbitrarily set according to instructions from the microinputer 13, one horizontal binarized image can be created at a set interval at the same time. Vertical image data extraction circuit 1 outputs data from seven equally spaced locations.
By providing 7 stages to connect the binarized inspected image data of the I stroke output from 4, the total of the binarized images is 7×7 (=
49) Horizontal image data extraction circuit 15 that simultaneously outputs binarized image data to be inspected at a point, image data from the reference image storage circuit 16, and horizontal image data extraction image pattern to be inspected from the mosquito track 15. The pattern matching output from the 49 exclusive OR means that compares data patterns is ANDed with the clock pulse of the same frequency as the pixel, and if the patterns match as a result of pattern matching, it is determined that each pixel matches. a logic operation circuit 17 which outputs a matching pulse having the same frequency as that of the pixel, and a logic operation circuit 1
a correlation value accumulating circuit 18 which individually counts each matched pulse output from 7 to accumulate and hold correlation values at each coordinate position where each of the 49 patterns has been matched; In order to detect candidate points at high speed by comparing the correlation value data with a detection threshold value set in advance by the microcomputer 13, a comparator corresponding to each output of the correlation value integration circuit 18 is provided for detection. 4 latches that compare and judge the size with the latch that holds the Surenyu value and hold the result.
The microcomputer 13 has a latch section that collects the comparison results of one horizontal scanning line so that they can be grasped in one read by the microcomputer 13.
It is constituted by a horizontal candidate point detection circuit 19 which easily specifies the calculation corresponding position by providing only a book.

このように構成された各回路部についてその動作を詳し
く説明する。実際の設計例では撮像装置11の視野を横
320画素、縦240画素の格子状に量子化するものと
し、基準画像の大きさを128X128画素以内の任意
の長方形範囲が可能なものとする。基準画像記憶回路1
6の構成は動作開始および完了のタイミングを発生させ
るカウンタを水平・垂直方向それぞれの計4つのカウン
タを設け、基準画像の読み出しあるいは書き込み用タイ
ミング信号を作り、前記読み出しタイミング信号により
基準画像の読み出しあるいは書き込みを佇効とする期間
に画素に対応したクロックをカウントするカウンタを動
作させることで、基準画像記憶回路内の画像データを入
出力させるものである。これにより、基準画像記憶回路
16の動作開始および完了のタイミング信号の発生をそ
れぞれ行なうカウンタへの設定値を変えることによって
基準画像のパターンサイズを任意に変更させることが可
能となる。
The operation of each circuit section configured as described above will be explained in detail. In an actual design example, the field of view of the imaging device 11 is quantized into a grid of 320 pixels horizontally and 240 pixels vertically, and the size of the reference image can be any rectangular range within 128×128 pixels. Reference image storage circuit 1
The configuration of 6 is provided with a total of four counters in the horizontal and vertical directions to generate timings for starting and completing operations, generates a timing signal for reading or writing the reference image, and uses the readout timing signal to read or write the reference image. Image data in the reference image storage circuit is input/output by operating a counter that counts clocks corresponding to pixels during a writing period. This makes it possible to arbitrarily change the pattern size of the reference image by changing the set values for the counters that generate the timing signals for starting and completing the operation of the reference image storage circuit 16, respectively.

この実施例においても基準画像の大きさは128X12
8画素以内の長方形範囲としたが、任意に設計できる。
In this example as well, the size of the reference image is 128x12.
Although a rectangular range of 8 pixels or less is used, it can be designed arbitrarily.

二こて、垂直画像データ抽出回路14は被検査画像を撮
像装置11より映像信号きして出力されたものを2値化
回路12により2値化された複数走査ラインの被検査画
像データを同時に出力するための部分である。この垂直
画像データ抽出回路14の説明を第3図に示すブロック
回路図で行う。
Second, the vertical image data extraction circuit 14 simultaneously converts the image to be inspected into a video signal from the imaging device 11 and outputs the image to be inspected, which is binarized by the binarization circuit 12. This is the part for output. The vertical image data extraction circuit 14 will be explained using the block circuit diagram shown in FIG.

1走査期間にパターン照合を行なう座標を水平方向7ポ
イント、垂直7ポイントとすると1水平走査ライン単位
で設定可能とした16水平走査ラインまでの被検査画像
データ保持が可能な可変長水平走査ライン・シフトレジ
スタ20は6本が必要となる。6本の可変長水平走査ラ
イン・シフトレジスタ20は第3図に示すように直列に
接続され、各可変長水平走査ライン拳シフトレジスタ2
0からはそれぞれ被検査画像データが出力される。1水
平走査ラインから16水平走査ラインまでの任意長の画
像データをマイクロコンピュータ 13からの指示で任
意に設定された水平走査ライン分だけ保持可能な1本の
シフトレジスタとして構成するにはその記憶容量は1水
平走査ラインにおいて320画素の場合、320x16
=5120画素(=5kb i t)必要となるので、
一般には8kbit容量以上のRAMを用いればよい。
If the coordinates for pattern matching in one scanning period are 7 points in the horizontal direction and 7 points in the vertical direction, the variable length horizontal scanning line can hold image data to be inspected up to 16 horizontal scanning lines, which can be set in units of 1 horizontal scanning line. Six shift registers 20 are required. The six variable length horizontal scanning line shift registers 20 are connected in series as shown in FIG.
From 0 onwards, image data to be inspected is output. In order to configure image data of any length from 1 horizontal scanning line to 16 horizontal scanning lines as one shift register that can hold the number of horizontal scanning lines arbitrarily set according to instructions from the microcomputer 13, its storage capacity is required. is 320x16 if there are 320 pixels in one horizontal scanning line.
=5120 pixels (=5kbit) are required, so
Generally, a RAM with a capacity of 8 kbit or more may be used.

任意長の水平走査ラインの被検査画像データ保持を行な
うにはRAMアドレスの下位9bitは画素の基本クロ
ックを単にカウントするカウンタを直接RAMに接続し
、残りの上位アドレスは垂直走査ラインをカウントする
カウンタに、任意の設定回数(1≦k≦16)にてカウ
ント値をクリアし最初からカウントをやり直す巡回カウ
ンタとすればよい。この様にして2次元被検査画像デー
タの7つの地点VIDT、V2DT、V3DT、V4D
T、V5DT、VE3DT、V7DTより被検査画像デ
ータが同時に出力されるようになる。
To hold image data to be inspected for horizontal scanning lines of arbitrary length, the lower 9 bits of the RAM address should be connected directly to the RAM as a counter that simply counts the basic clock of the pixel, and the remaining upper addresses should be used as a counter that counts the vertical scanning lines. Alternatively, a cyclic counter may be used that clears the count value at an arbitrary set number of times (1≦k≦16) and starts counting again from the beginning. In this way, the seven points VIDT, V2DT, V3DT, and V4D of the two-dimensional inspected image data are
Image data to be inspected is simultaneously output from T, V5DT, VE3DT, and V7DT.

次に、7地点VIDT、V2DT、V3DT。Next, 7 points VIDT, V2DT, V3DT.

V4DT、V5DT、V8DT、V7DTからの被検査
画像データは水平画像データ抽出回路15へ入力される
。第4図は水平画像データ抽出回路15の構成を示した
ブロック図である。水平走査ラインの16画素までの任
意長の被検査画素データをマイクロコンピュータ13か
らの指示で任意に設定された画素データ分(1≦j≦1
6)だけ保持可能な可変長画素・シフトレジスタ21を
1水平方向の被検査画像データの入力に対して直列に6
本接続する。可変長画素・シフトレジスタ21は6本で
あるためその出力は6本であるが、入力の画像データV
IDT−V7DTも出力として使うことが出来るのでこ
の画像データも合わせて、1水平ラインからの出力は7
出力VIDT、VIHl、VIH2,VIHS,VIH
4,VIH5゜VIH6となる。被検査画像データの垂
直方向の7地点VIDT、V2DT、V3DT、V4D
T。
The image data to be inspected from V4DT, V5DT, V8DT, and V7DT is input to the horizontal image data extraction circuit 15. FIG. 4 is a block diagram showing the configuration of the horizontal image data extraction circuit 15. Pixel data to be inspected of an arbitrary length up to 16 pixels on a horizontal scanning line is divided into pixel data arbitrarily set according to instructions from the microcomputer 13 (1≦j≦1).
6) of variable length pixel/shift registers 21 that can hold 6) in series with respect to the input of image data to be inspected in the horizontal direction.
Make this connection. Since there are six variable length pixel/shift registers 21, the output is six, but the input image data V
IDT-V7DT can also be used as an output, so including this image data, the output from one horizontal line is 7
Output VIDT, VIHl, VIH2, VIHS, VIH
4, VIH5° VIH6. 7 vertical points of image data to be inspected VIDT, V2DT, V3DT, V4D
T.

V5DT、V8DT、V7DT17)入力ソレソれに対
してこの6本の可変長画素・シフトレジスタ21が7本
それぞれ独立に必要となるため、合計42個の可変長画
素自シフトレジスタ21を用いる。
V5DT, V8DT, V7DT17) Since seven of these six variable length pixel shift registers 21 are independently required for each input voltage, a total of 42 variable length pixel shift registers 21 are used.

可変長画素・シフトレジスタ21としてはNPC社の8
M5828を用いる。このICにより8本までの垂直画
像データ抽出回路14からの被検査画像データの入力か
可能となるため、7個を直列接続した8M5828から
の出力を外部に出すことで、水平方向に1画素ずつずれ
、垂直方向にに画素ずつずれた49点の被検査画像デー
タが同時に出力されることとなる。
NPC's 8 is used as the variable length pixel/shift register 21.
M5828 is used. This IC allows the input of image data to be inspected from up to eight vertical image data extraction circuits 14, so by outputting the output from seven 8M5828s connected in series to the outside, one pixel at a time in the horizontal direction can be input. 49 points of image data to be inspected, which are shifted by pixels in the vertical direction, are output at the same time.

論理演算回路17は基準画像記憶回路16内の基準画像
データと水平画像データ抽出回路15からの各座標位置
における49個の被検査画像データVIDT、VIHI
、VIH2,VIHS−−VIH6,V2DT、V2H
1−@−−V7H6の1データづつの2人力を同時に排
他的論理和演算を行ないその結果を合致パルスとしてパ
ルス出力する部分である。第5図に示す構成ブロック図
のような論理演算回路 17 は排他的論理和演算を同
時に独立して49種類のシリアル入力される個々0画像
データVIDT、VIHI、VIH2、VIHS・・V
IH6,V2DT、V2H1・・・・V7H6と基準画
像データの比較演算を行ない、更にその比較の結果をそ
れぞれの2人力画像データか一致していればそれをパル
ス出力として外部に出力する合致パルスpH,Pl2.
Pl 3 ・ ・ Pl7.  P21.  P22 
 ・ ・ P27  拳 ・P37・・P77をシリア
ル入力される画像データごとに演算しシリアル出力する
49個の論理演算ユニット22より構成される。
The logic operation circuit 17 extracts the reference image data in the reference image storage circuit 16 and the 49 inspected image data VIDT, VIHI at each coordinate position from the horizontal image data extraction circuit 15.
, VIH2, VIHS--VIH6, V2DT, V2H
1-@-- This is the part that performs an exclusive OR operation on the two data of V7H6 at the same time and outputs the result as a matching pulse. The logic operation circuit 17 as shown in the block diagram shown in FIG. 5 performs an exclusive OR operation simultaneously and independently on 49 types of serially input individual 0 image data VIDT, VIHI, VIH2, VIHS...V
IH6, V2DT, V2H1...V7H6 and reference image data are compared and calculated, and if the result of the comparison is the respective two manual image data, if they match, it is outputted as a pulse output to the outside. Matching pulse pH , Pl2.
Pl 3 ・ ・ Pl 7. P21. P22
・ ・ P27 Fist ・P37... Consists of 49 logic operation units 22 that calculate P77 for each serially inputted image data and serially output it.

個々の論理演算ユニット22の構成を第6図のブロック
図を用いて説明する。論理演算ユニット22は被検査画
像データと基準画像データの2人力の排他的論理和演算
を行なう排他的論理和ユニット23と排他的論理和ユニ
ット23からの一致不一致出力を画像データの1画素工
画素に対応した画素クロックを論理積し入力画像データ
が一致していた場合に合致パルスとしてシリアル信号出
力することで外部に知らせる論理積ユニット24より構
成されている。
The configuration of each logical operation unit 22 will be explained using the block diagram of FIG. 6. The logic operation unit 22 performs a two-man exclusive OR operation on the image data to be inspected and the reference image data, and the match/mismatch output from the exclusive OR unit 23 is converted into one pixel of the image data. The logical product unit 24 is configured to logically AND the pixel clocks corresponding to the input image data and output a serial signal as a matching pulse to inform the outside if the input image data match.

本発明の実施例においては論理演算ユニット22の動作
を2人力画像データが一致していればそれをパルス出力
として外部に出力する合致パルスを出力するような構成
としたが、不一致であるときにパルス出力として外部に
出力する不一致パルスを出力するような構成としパルス
数が少ない位置を検索することによるパターン照合を行
なうことも可能であるのはもちろんである。
In the embodiment of the present invention, the operation of the logical operation unit 22 is configured such that if the two human-powered image data match, it outputs a matching pulse that is outputted to the outside as a pulse output, but when they do not match, Of course, it is also possible to perform pattern matching by searching for a position where the number of pulses is small with a configuration in which mismatched pulses are outputted to the outside as pulse outputs.

相関値積算回路18は、第7図に示すブロック図により
構成され、論理演算回路17からの各座標位置における
パターン照合の結果である49カ所の個々の検査座標位
置に対応した49本の独立した/リアル信号出力である
合致パルスP11゜Pl2.Pl3・・Pl7.P21
.P22・・P27・・P37・・P77を相関値とし
て積算する部分で49個の独立したカウンタ25を具備
する。基準画像のサイズは128X128画素以内とし
ているので、この場合、相関値の最大値は16384と
なるため14bit以上のバイナリカウンタを49本用
いればよい。
The correlation value integration circuit 18 is configured by the block diagram shown in FIG. /matching pulse P11°Pl2. which is a real signal output. Pl3...Pl7. P21
.. Forty-nine independent counters 25 are provided in a section that integrates P22...P27...P37...P77 as a correlation value. Since the size of the reference image is within 128x128 pixels, in this case, the maximum correlation value is 16384, so 49 binary counters of 14 bits or more may be used.

また、第2の実施例における水平候補点検出回路19は
相関値積算回路18の個々の相関値がマイクロコンピュ
ータにて事前に設定された検出スレッシュ値との大小を
同時に比較判定することで1水平走査ラインの7座標位
置における相関値の状態を1回のマイクロコンピュータ
13による状態の読み込みで完了させるために設けられ
たものである。水平候補点検出回路19の構成を示した
のか第9図のブロック図である。以下、第9図を用いて
水平候補点検出回路19について説明する。
In addition, the horizontal candidate point detection circuit 19 in the second embodiment simultaneously compares and determines the magnitude of each correlation value of the correlation value integration circuit 18 with a detection threshold value set in advance by a microcomputer. This is provided so that the state of the correlation values at the seven coordinate positions of the scanning line can be read by the microcomputer 13 once. 9 is a block diagram showing the configuration of the horizontal candidate point detection circuit 19. FIG. The horizontal candidate point detection circuit 19 will be described below with reference to FIG.

水平候補点検出回路19は相関値積算回路18の個々の
相関値を保持しその相関値をデータ出力する各カウンタ
25..25の値がある相関値よりも大きいのかどうか
基準となる比較値をマイクロコンピュータ13からのデ
ータ書き込みにより比較値を保持する検出スレッシュ保
持ラッチ26と、相関値積算回路18の49個の相関値
の出力D11、D12.D13・・D17.D21.D
22・・D27・・D37・・D77が検出スレッシュ
保持ランチ26に保持されている検出スレッシュ値との
大小をそれぞれ独立して比較し、その結果を保持しマイ
クロコンピュータ13にてその状態を把握することが可
能な49個の検出回路27より構成される。49個の検
出回路27は7本の水平比較ラインごとにまとめると、
1本の比較ライン内には7地点のパターン照合の結果の
状態を保持していることとなる。この7地点の結果の1
つ1つは検出スレッシュ値との大小を比べた結果である
ので、それぞれの結果を1bitの情報と見なし1水平
比較ラインで7bitの情報量とすることが出来る。こ
の7bit情報を1つのI10アドレスとして割り付け
ることにより1回のマイクロコンピュータ13のIlo
の読み込みで7地点におけるパターン照合の状態を把握
することか可能となる。個々の検出回路27の構成を第
10図のブロック図を用いて説明する。検出回路27は
検出スレッシュ値と相関値の2人力のデータ比較を行な
うデジタルコンパレータ28と、デジタルコンパレータ
28から出力される大小比較の結果を保持する結果保持
ラッチ29より構成される。
The horizontal candidate point detection circuit 19 includes counters 25 . .. A detection threshold holding latch 26 holds the comparison value by writing data from the microcomputer 13 to determine whether the value of 25 is larger than a certain correlation value. Outputs D11, D12. D13...D17. D21. D
22...D27...D37...D77 independently compare the magnitude with the detection threshold value held in the detection threshold holding lunch 26, and hold the results, and the microcomputer 13 grasps the status. It is composed of 49 detection circuits 27 capable of When the 49 detection circuits 27 are grouped into 7 horizontal comparison lines,
This means that one comparison line holds the results of pattern matching at seven points. 1 of the results of these 7 points
Since each result is the result of comparing the magnitude with the detection threshold value, each result can be regarded as 1 bit of information, and one horizontal comparison line can provide 7 bits of information. By assigning this 7-bit information as one I10 address, one Ilo address of the microcomputer 13
It is possible to understand the pattern matching status at seven points by reading the data. The configuration of each detection circuit 27 will be explained using the block diagram of FIG. The detection circuit 27 is comprised of a digital comparator 28 that performs two-way data comparison between a detection threshold value and a correlation value, and a result holding latch 29 that holds the result of the magnitude comparison output from the digital comparator 28.

水平候補点検出回路19を内蔵していない場合には7座
標位置の相関値の状態の把握に7回の相関値データの読
み込みと、7回9マイクロコンピユータ13による粗検
出スレツンユ値との大小比較を行わなければならないか
、水平候補点検出回路19を内蔵することにより1回の
I10データの読み込みて、上記の処理内容を行なった
ことに相当するためその分処理時間を短縮することが出
来る。7つの水平走査ラインのそれぞれにこの水平候補
点検出の手段を設けるため、7回の水平候補点検出回路
19の状態の読み込みで49回の相関値データの読み込
みと、49回のマイクロコンピュータ13による粗検出
スレッシュ値との大小比較を代行することとなり、検出
スレッシュ値との大小比較を行うことによるパターン照
合位置の特定はそれだけ高速に処理を行うことが可能と
なる。
If the horizontal candidate point detection circuit 19 is not built in, it is necessary to read the correlation value data seven times to understand the state of the correlation value at the seven coordinate positions, and compare the magnitude with the coarsely detected thread value by the microcomputer 13. However, by incorporating the horizontal candidate point detection circuit 19, it is equivalent to reading the I10 data once and performing the above processing contents, so that the processing time can be shortened accordingly. In order to provide this horizontal candidate point detection means for each of the seven horizontal scanning lines, the state of the horizontal candidate point detection circuit 19 is read seven times, the correlation value data is read 49 times, and the microcomputer 13 reads the correlation value data 49 times. The comparison with the coarse detection threshold value is performed on behalf of the user, and the pattern matching position can be identified at a faster processing speed by comparing the magnitude with the detection threshold value.

マイクロコンピュータ13による状態の読み込みは1回
の読み込みで1水平走査ラインの7座標位置における相
関値の状態を行うことが可能であると、先に述へたが、
16bitのマイクロコンピュータ13を用いた場合は
1回のデータ読み込みで2水平走査ラインの7座標位置
における相関値の状態の把握か、32bitのマイクロ
コンピュータ13を用いた場合は1回のデータ読み込み
で4水平走査ラインの7座標位置における相関値の状態
の把握が可能である。この様に制御に使用するマイクロ
コンピュータ13及びその接続構成の設計方法により、
1回のデータ読み込みで行える相関値の状態の把握数が
複数の水平走査ラインとなるのはもちろんである。また
、1水平走査ラインのパターン照合ポイントの個数を増
やしたとした場合、16bitのマイクロコンピュータ
13を用いた場合は1回のデータ読み込みで16座標位
置までの相関値の状態の把握が、32bitのマイクロ
コンピュータ13を用いた場合は1回のデータ読み込み
で32座標位置までの相関値の状態の把握が可能である
。そして、16bitや32bitのマイクロコンピュ
ータ13を用いた場合は、パターン照合のポイント総数
より水平・垂直方向のパターン照合の個数を上記の点も
考慮した設計を目的とする認識対象の認識精度φ検査範
囲等の諸条件に合わせて行うことも可能である。
As mentioned earlier, when reading the state by the microcomputer 13, it is possible to read the state of correlation values at seven coordinate positions of one horizontal scanning line in one read.
When using a 16-bit microcomputer 13, it is possible to grasp the state of the correlation value at 7 coordinate positions of 2 horizontal scanning lines in one data read, or when using a 32-bit microcomputer 13, it is possible to grasp the state of correlation values at 7 coordinate positions in one data read. It is possible to grasp the state of the correlation values at the seven coordinate positions of the horizontal scanning line. In this way, by designing the microcomputer 13 used for control and its connection configuration,
Of course, the number of correlation value states that can be determined in one data read is a plurality of horizontal scanning lines. In addition, if the number of pattern matching points in one horizontal scanning line is increased, if a 16-bit microcomputer 13 is used, it is possible to grasp the state of correlation values up to 16 coordinate positions with one data read, whereas a 32-bit microcomputer 13 can grasp the state of correlation values up to 16 coordinate positions. When the computer 13 is used, it is possible to grasp the state of correlation values at up to 32 coordinate positions by reading data once. When a 16-bit or 32-bit microcomputer 13 is used, the recognition accuracy φ test range of the recognition target is determined by the number of horizontal and vertical pattern matching points than the total number of pattern matching points. It is also possible to do this in accordance with various conditions such as.

これら本実施例による装置においては、水平・垂直のパ
ターン照合の総数を7X7=49ポイントとしたか、5
x5.9x9+  11x7,5x15等の任意の設計
値とすることが可能であるのはもちろんであり、1回の
画像走査期間内でより高速に被検査画像5内のパターン
照合処理を完了させるにはより多数のパターン照合ポイ
ントを設ケれば良いのは明かである。パターン照合ポイ
ントを増すことは、照合の画素間隔を狭くすることが可
能となりより少ないパターン照合回数でパターンの照合
を完了する確率が増すために有利となる。
In the apparatus according to these embodiments, the total number of horizontal and vertical pattern matching is 7×7=49 points, or 5 points.
Of course, it is possible to set it to any design value such as Obviously, it would be better to provide a larger number of pattern matching points. Increasing the number of pattern matching points is advantageous because it becomes possible to narrow the pixel interval for matching and increases the probability of completing pattern matching with a smaller number of pattern matchings.

本発明の認識装置は粗精検出方法の一つであり、以下ど
のようにして粗い検出より精密な検出に移行して行くの
か粗い検出を行なうときの画素間隔の決定の方法につい
て説明する。第1回目の粗検出は水平画像データ抽出回
路15・垂直画像データ抽出回路14ともに8画素間隔
で被検査画像データVIDT、VIHI、VIH2,V
IHS・・VIH6,V2DT、V2H1・拳・・V7
HSが出力されるよう設定し、被検査画像の検出範囲の
中心位置に7行7列の各検査位置の中心位置(4行4列
目の位置)が対応するように配置して第1回目の粗検出
を行ない、第1回目の49個の候補点の位置データの相
関値をもとに相関カウント値の中で最大相関値を保持す
る部分に対応する座標位置をもって第2回目の検出を行
う座標位置とする。第2回目以降のパターン照合を行う
ための照合画素間隔は、水平・垂直方向ともに先に行う
粗検出の画素間隔を次回の検査画像範囲が含むように次
回の検出画素間隔を選択すると、パターン照合の検査範
囲を徐々に狭くしていく仮定で、相関値の最大となる座
標位置を検査画像範囲に含んでいたにもかかわらずに見
逃してしまうことはない。
The recognition device of the present invention is one of the rough and fine detection methods, and the method for determining the pixel spacing when performing rough detection will be described below to explain how to move from rough detection to fine detection. In the first rough detection, both the horizontal image data extraction circuit 15 and the vertical image data extraction circuit 14 perform inspection image data VIDT, VIHI, VIH2, V at 8 pixel intervals.
IHS・VIH6, V2DT, V2H1・Fist・V7
HS is set to be output, and the center position of each inspection position in 7 rows and 7 columns (the position in the 4th row and 4th column) corresponds to the center position of the detection range of the image to be inspected. Then, based on the correlation values of the position data of the 49 candidate points from the first time, a second detection is performed using the coordinate position corresponding to the part that holds the maximum correlation value among the correlation count values. The coordinate position to be performed. The matching pixel spacing for the second and subsequent pattern matching is determined by selecting the next detection pixel spacing so that the next inspection image range includes the pixel spacing of the rough detection performed first in both the horizontal and vertical directions. Assuming that the inspection range is gradually narrowed, the coordinate position with the maximum correlation value will not be missed even though it is included in the inspection image range.

従って、一般には水平方向におけるp回目のパターン照
合の画素間隔をdkp、p+1回目のパターン照合の画
素間隔をdk (1)+1) 、1水平走査ラインにお
けるパターン照合のポイント数を奇数の値HSとすると
、p+1回目のパターン照合の画素間隔dk (p+1
)は、 dKp−dk(p+I)X(H5−1)/2≦O・・・
・・・(1)を満たすような値の中で、最も小さな値を
選ぶことが粗検出の処理回数をより少ない回数にて、検
査画像範囲を収束するため効率的な選択の方法である。
Therefore, in general, the pixel interval for p-th pattern matching in the horizontal direction is dkp, the pixel interval for p+1-th pattern matching is dk (1) + 1), and the number of points for pattern matching in one horizontal scanning line is an odd value HS. Then, the pixel interval dk (p+1
) is dKp-dk(p+I)X(H5-1)/2≦O...
... Selecting the smallest value among the values that satisfy (1) is an efficient selection method in order to converge the inspection image range with fewer rough detection processing times.

垂直方向のパターン照合の画素間隔の効率的な選択の仕
方も同様である。
The same applies to the efficient selection of pixel spacing for vertical pattern matching.

よって、本実施例の場合は、dkl=8.HS=7であ
るので、第2回目のパターン照合を行うための照合画素
間隔dk2は式(1)より、8−dk2X(7−1)/
2≦0・・・・・・(2)これをdk2について変形し
、 dk2 ≧8X2/(7−1)=16/2:2.7・−
・・−(3)よって、上記の式(3)を満たす最小の整
数値より、dk2=3を得る。第3回目のパターン照合
を行うための照合画素間隔dk3は、dk2=3゜HS
=7であるので、式(1)に代入することより同様にd
k3=1を得る。垂直方向の第2回目のパターン照合画
素間隔dj2は、djl=8゜VS=7で水平方向の場
合と同様なのでdj2=3を、第3回目のパターン照合
を行うための照合画素間隔dj3は、dj2=3.VS
=7であるので、式(1)より同様にdj3=1を得る
以下、検出の動作について説明する。
Therefore, in the case of this embodiment, dkl=8. Since HS=7, the matching pixel interval dk2 for performing the second pattern matching is 8-dk2X(7-1)/from equation (1).
2≦0・・・(2) Transform this for dk2, dk2 ≧8X2/(7-1)=16/2:2.7・-
...-(3) Therefore, dk2=3 is obtained from the minimum integer value that satisfies the above equation (3). The matching pixel interval dk3 for performing the third pattern matching is dk2=3°HS
= 7, so by substituting into equation (1), d
Obtain k3=1. The second pattern matching pixel interval dj2 in the vertical direction is djl=8°VS=7, which is the same as in the horizontal direction, so dj2=3, and the matching pixel interval dj3 for the third pattern matching is: dj2=3. VS
=7, so dj3=1 is similarly obtained from equation (1).The detection operation will be described below.

第1回目の粗検出のために水平画像データ抽出回路15
及び垂直画像データ抽出回路14ヘマイクロコンピユー
タ13より水平・垂直方向ともに8画素間隔にて被検査
画像データが出力されるようにデータ設定する。また、
被検査画像の検査範囲の中心位置に7行7列のパターン
照合の各検査位置の中心位置(4行4列目)が配置され
るように基準画像データの出力位置をマイクロコンピュ
ータ13により制御する。パターン照合の各検査位置の
中心位置(4行4列目)が配置されるように基準画像デ
ータの出力位置を制御するとは、具体的には第3図に示
す4行4列目の可変長画素・シフトレジスタ21から出
力される被検査画像データにおいて、第7図に示した部
分画像6を検査したい中心位置に配置したとして、その
配置したm行n列の部分画像6の第1行第1列目の画像
データが出力される走査タイミングに合わせて基準画像
7の第1行第1列目の画像データを出力するということ
である。従って、配置した部分画像6の上下左右には同
じm行n列の部分画像6がそれぞれ8画素間隔て配置さ
れていることになる。
Horizontal image data extraction circuit 15 for the first rough detection
And the data is set so that the microcomputer 13 outputs the image data to be inspected to the vertical image data extraction circuit 14 at intervals of 8 pixels in both the horizontal and vertical directions. Also,
The output position of the reference image data is controlled by the microcomputer 13 so that the center position (4th row, 4th column) of each inspection position for pattern matching in 7 rows and 7 columns is placed at the center position of the inspection range of the image to be inspected. . Controlling the output position of the reference image data so that the center position (4th row, 4th column) of each inspection position for pattern matching is arranged specifically means the variable length of the 4th row, 4th column shown in Figure 3. In the image data to be inspected output from the pixel/shift register 21, assuming that the partial image 6 shown in FIG. 7 is placed at the center position to be inspected, the first row and the This means that the image data of the first row and first column of the reference image 7 is output in accordance with the scanning timing at which the image data of the first column is output. Therefore, the same m rows and n columns of partial images 6 are placed at intervals of 8 pixels above, below, and to the left and right of the placed partial images 6, respectively.

次に、49個の相関値積算回路18のカウント値をすべ
てクリアしパターン照合を開始する。第1回目のパター
ン照合の後、相関値積算回路18内の各カウンタ25の
相関データを読み込みその中で最大値となる相関データ
を検索すると共にその最大相関値を保持していたパター
ン照合座標位置を算出し、8画素間隔での粗検出スレッ
シュ値よりも大きい値であれば前記最大相関値を保持し
ていたパターン照合座標位置を第2回目の検出を行なう
座標位置とする。次に、第2回目のパターン照合の準備
として、水平画像データ抽出回路15及び垂直画像デー
タ抽出回路14ヘマイクロコンピユータ13より水平・
垂直方向ともに3画素間隔にて被検査画像データが出力
されるようにデータ設定し、第1回目のパターン照合処
理にて算出された座標位置を中心にパターン照合が行わ
れるように、基準画像データの出力位置を各検査位置の
中心位置(4行4列目)が配置されるように制御し、検
出スレンシュ値を設定し、49個の相関値積算回路18
のカウント値をすべてクリアし第2回目のパターン照合
を開始する。
Next, all the count values of the 49 correlation value integration circuits 18 are cleared and pattern matching is started. After the first pattern matching, the correlation data of each counter 25 in the correlation value integration circuit 18 is read and the correlation data having the maximum value is searched for, and the pattern matching coordinate position that held the maximum correlation value is searched. is calculated, and if the value is larger than the coarse detection threshold value at 8-pixel intervals, the pattern matching coordinate position that held the maximum correlation value is set as the coordinate position where the second detection is performed. Next, in preparation for the second pattern matching, the microcomputer 13 sends the horizontal image data to the horizontal image data extraction circuit 15 and vertical image data extraction circuit 14.
The data is set so that the image data to be inspected is output at 3-pixel intervals in both the vertical direction, and the reference image data is set so that the pattern matching is performed centering on the coordinate position calculated in the first pattern matching process. The output position of each test position is controlled so that the center position (4th row, 4th column) is located, the detection threshold value is set, and the 49 correlation value integration circuits 18
All count values are cleared and the second pattern matching is started.

第2回目のパターン照合の後、相関データを読み込みそ
の中で最大値となるデータを検索すると共にその最大相
関値を保持していたパターン照合座標位置を算出する。
After the second pattern matching, the correlation data is read and the data having the maximum value is searched for, and the pattern matching coordinate position that held the maximum correlation value is calculated.

次に、第3回目のパターン照合の準備として、水平画像
データ抽出回路15及び垂直画像データ抽出回路14ヘ
マイクロコンピユータ13より水平・垂直方向ともに1
画素間隔にて被検査画像データが出力されるようにデー
タ設定し、第2回目のパターン照合処理にて算出された
座標位置を中心にパターン照合が行われるように、基準
画像データの出力位置を各検査位置の中心位置(4行4
列目)が配置されるように制御し、検出スレッシュ値を
設定し、49個の相関値積算回路18のカウント値をす
べてクリアし第3回目のパターン照合を開始する。
Next, in preparation for the third pattern matching, the microcomputer 13 sends data to the horizontal image data extraction circuit 15 and the vertical image data extraction circuit 14 in both the horizontal and vertical directions.
The data is set so that the image data to be inspected is output at pixel intervals, and the output position of the reference image data is set so that pattern matching is performed centering on the coordinate position calculated in the second pattern matching process. Center position of each inspection position (4 rows 4
column), the detection threshold value is set, all the count values of the 49 correlation value integration circuits 18 are cleared, and the third pattern matching is started.

第3回目のパターン照合の後、相関値積算回路18内の
データをマイクロコンピュータ13により読み込み、デ
ータの中で最大値となるデータを検索すると共にその最
大相関値が所定の検出スレンツユ値よりも大きい値であ
れば前記最大相関値を保持した部分に対応したパターン
照合座標位置を算出し、その座標位置を検出位置とする
After the third pattern matching, the data in the correlation value integration circuit 18 is read by the microcomputer 13, and the data having the maximum value is searched for, and the maximum correlation value is larger than the predetermined detection value. If it is a value, the pattern matching coordinate position corresponding to the portion holding the maximum correlation value is calculated, and the coordinate position is set as the detection position.

また、第2の実施例において49個の相関値積算回路1
8のカウント値をすべてクリアして水平候補点検出回路
19の検出スレッシュ保持ラッチ26に8画素間隔での
粗検出用スレッシュ値をセゾトし49個全ての結果保持
ランチ29をクリアして、パターン照合を開始する。
In addition, in the second embodiment, 49 correlation value integration circuits 1
Clear all 8 count values, set the coarse detection threshold value at 8 pixel intervals in the detection threshold holding latch 26 of the horizontal candidate point detection circuit 19, clear all 49 result holding latch 29, and perform pattern matching. Start.

第1回目のパターン照合の後、水平候補点検出回路19
の7本の結果保持ラッチ29の内容を読み込み8画素間
隔での粗検出用スレッシュ値よりも大きな相関値を保持
している相関値積算回路18内のカウンタ25を特定し
複数存在すればそれらのカウンタ25の相関データを読
み込みその中で最大値となる相関データを検索すると共
にその最大相関値を保持していたパターン照合座標位置
に対応する座標位置を算出し、第2回目の検出を行なう
座標位置とする。次に、第2回目のパターン照合の準備
として、水平画像データ抽出回路15及び垂直画像デー
タ抽出回路14ヘマイクロコンピユータ13より前記画
素間隔の決定方法に従い水平−垂直方向ともに3画素間
隔にて被検査画像データが出力されるようにデータ設定
し、第1回目のパターン照合処理にて算出された座標位
置を中心に7行7列のパターン照合が行われるように、
基準画像データの出力位置を各検査位置の中心位置(4
行4列目)が配置されるように制御し、49個の相関値
積算回路18のカウント値をすべてクリアして水平候補
点検出回路19の検出スレッシュ保持ラッチ26に3画
素間隔での粗検出用スレッンユ値をセットし49個全て
の結果保持ラッチ29をクリアして、第2回目のパター
ン照合を開始する。
After the first pattern matching, the horizontal candidate point detection circuit 19
The contents of the seven result holding latches 29 are read, and the counters 25 in the correlation value integration circuit 18 that hold a correlation value larger than the coarse detection threshold value at 8-pixel intervals are identified, and if there are multiple counters 25, they are The correlation data of the counter 25 is read and the correlation data with the maximum value is searched for, and the coordinate position corresponding to the pattern matching coordinate position that held the maximum correlation value is calculated, and the coordinates for the second detection are calculated. position. Next, in preparation for the second pattern matching, the horizontal image data extraction circuit 15 and the vertical image data extraction circuit 14 are sent to the horizontal image data extraction circuit 15 and the vertical image data extraction circuit 14 by the microcomputer 13 to be inspected at 3 pixel intervals in both the horizontal and vertical directions according to the pixel interval determination method described above. Set the data so that the image data is output, and perform pattern matching in 7 rows and 7 columns centered around the coordinate position calculated in the first pattern matching process.
The output position of the reference image data is set to the center position of each inspection position (4
(row, 4th column), all the count values of the 49 correlation value integration circuits 18 are cleared, and the detection threshold holding latch 26 of the horizontal candidate point detection circuit 19 performs rough detection at 3-pixel intervals. The second pattern matching is started by setting the threshold value and clearing all 49 result holding latches 29.

第2回目のパターン照合の後、水平候補点検出回路19
の7本の結果保持ラッチ29の内容を読み込み3画素間
隔での粗検出用スレッシュ値よりも大きな相関値を保持
している相関値積算回路18内のカウンタ25を特定し
複数存在すればそれらのカウンタ25の相関データを読
み込みその中で最大値となるデータを検索すると共にそ
の最大相関値を保持していたパターン照合座標位置に対
応する座標位置を算出し、第3回目の検出を行なう座標
位置とする。次に、第3回目のパターン照合の準備とし
て、水平画像データ抽出回路15及び垂直画像データ抽
出回路14ヘマイクロコンピユータ13より水平0垂直
方向ともに1画素間隔にて被検査画像データが出力され
るようにデータ設定し、第2回目のパターン照合処理に
て算出された座標位置を中心に7行7列のパターン照合
が行われるように、基準画像データの出力位置を各検査
位置の中心位置(4行4列目)が配置されるように制御
し、水平候補点検出回路19の検出スレッシュ保持ラッ
チ26に3画素間隔での検出スレッシュ値を設定し、4
9個の相関値積算回路18のカウント値をすべてクリア
し第3回目のパターン照合を開始する。
After the second pattern matching, the horizontal candidate point detection circuit 19
The contents of the seven result holding latches 29 are read, and the counters 25 in the correlation value integration circuit 18 that hold a correlation value larger than the coarse detection threshold value at 3-pixel intervals are identified. The correlation data of the counter 25 is read, the data with the maximum value is searched for, and the coordinate position corresponding to the pattern matching coordinate position that held the maximum correlation value is calculated, and the coordinate position is used for the third detection. shall be. Next, in preparation for the third pattern matching, image data to be inspected is output from the microcomputer 13 to the horizontal image data extraction circuit 15 and the vertical image data extraction circuit 14 at one pixel intervals in both the horizontal and vertical directions. The output position of the reference image data is set at the center position (4 4th column)), and set the detection threshold value at 3 pixel intervals in the detection threshold holding latch 26 of the horizontal candidate point detection circuit 19.
All the count values of the nine correlation value integration circuits 18 are cleared and the third pattern matching is started.

第3回目のパターン照合の後、水平候補点検出回路19
の7本の結果保持ラッチ2θの内容を読み込み3画素間
隔での粗検出用スレッシュ値よりも大きな相関値を保持
している相関値積算回路18内のカウンタ25を特定し
複数存在すればそれらのカウンタ25の相関データを読
み込みその中で最大値となるデータを検索すると共にそ
の最大相関値を保持していたパターン照合座標位置に対
応する座標位置を算出し、その座標位置を検出位置とす
る。
After the third pattern matching, the horizontal candidate point detection circuit 19
The contents of the seven result holding latches 2θ are read, and the counter 25 in the correlation value integration circuit 18 that holds a correlation value larger than the coarse detection threshold value at 3-pixel intervals is identified. The correlation data of the counter 25 is read and the data having the maximum value is searched for, and the coordinate position corresponding to the pattern matching coordinate position that held the maximum correlation value is calculated, and the coordinate position is set as the detection position.

次に本発明の第3の実施例については第8図を用いて説
明する。
Next, a third embodiment of the present invention will be described using FIG. 8.

第1の実施例では水平候補点検出回路19のデータをマ
イクロコンピュータ13にて読み込むことによりパター
ン照合位置における状態を把握し相関値の最大値を検索
した。第8図には本実施例における認識装置のブロック
図が示されている。
In the first embodiment, data from the horizontal candidate point detection circuit 19 is read by the microcomputer 13 to grasp the state at the pattern matching position and search for the maximum correlation value. FIG. 8 shows a block diagram of the recognition device in this embodiment.

第2の実施例においては第1の実施例の第1図の装置と
比べて、候補点検出回路10が更に加えられたことが異
なっているのみで、他の構成部については同一である。
The second embodiment differs from the first embodiment shown in FIG. 1 only in that a candidate point detection circuit 10 is further added, and other components are the same.

よって、本実施例の装置を構成する2値化回路12.垂
直画像データ抽出回路14、水平画像データ抽出回路1
5.基準画像パターン記憶回路16.論理演算回路17
.相関値積算回路18についての説明は第1の実施例に
おいての説明と重複するので省略する。
Therefore, the binarization circuit 12 configuring the device of this embodiment. Vertical image data extraction circuit 14, horizontal image data extraction circuit 1
5. Reference image pattern storage circuit 16. Logic operation circuit 17
.. A description of the correlation value integration circuit 18 is omitted since it overlaps with the description in the first embodiment.

候補点検出回路10は水平候補点検出回路19の複数位
置に於ける相関値データの状態を1回のデータ入力にて
把握できるよう水平候補点検出回路19の7本の各水平
比較ラインごとにまとめた結果保持ラッチ29の出力に
おいて検出スレッシュ保持ラッチ26に設定した値より
も大きかった値を持つ結果保持ラッチ29が7本の各水
平比較ラインの中で1つでもあればその状態を各水平比
較ラインにおける情報として保持することでマイクロコ
ンピュータ13に検出スレッシュ値を越えるパターン照
合座標位置が49地点の中にあったことをより少ないマ
イクロコンピュータ13によるデータ読み込み動作にて
パターン照合を行なった座標位置全体の状態をより集約
された情報として把握するために設けたものである。候
補点検出回路10の構成を示したのが第11図のブロッ
ク図である。7本の各水平比較ラインからの結果保持ラ
ッチ29の出力Qll、Q12.Q13・・Q17.Q
21.Q22・・Q27・・Q37・・Q77は各水平
比較ライン内の7bitを1まとまりとして論理和する
ことで各水平比較ライン内に検出スレッシュ値を越える
相関値を保持したものがあるのか無いのか、その存在の
有無を1水平比較ラインにおける情報を1bitの情報
として7水平比較ラインの状態を7つのライン検出回路
30に保持させる。すなわち、第11図に示すように(
Qll、Q12.Q13.、Q17)、  (Q21.
Q22.Q23.、Q27)、(Q31゜Q32.Q3
3.、Q37)、、、(Q71.Q72、Q73.、Q
77)の各7bit入力をそれぞれに論理和し、更にそ
の結果を7つのライン検出回路30で1水平比較ライン
の情報を1bitの情報として保持させる。本実施例に
おいては7水平比較ライン設けているので各水平比較ラ
インの情報を7bitとすることができ、1回のマイク
ロコンピュータ13によるIloのデータ読み込みにて
全パターン照合位置においての検出スレッシュ値を越え
る座標位置の有無を把握することか可能となる。
The candidate point detection circuit 10 detects data for each of the seven horizontal comparison lines of the horizontal candidate point detection circuit 19 so that the state of correlation value data at multiple positions of the horizontal candidate point detection circuit 19 can be grasped by one data input. If at least one result holding latch 29 has a value larger than the value set in the detection threshold holding latch 26 in the output of the summarized result holding latch 29 among the seven horizontal comparison lines, that state is recorded for each horizontal comparison line. By retaining the information on the comparison line, the microcomputer 13 is informed that the pattern matching coordinate position that exceeds the detection threshold value is among the 49 points. It was created to understand the overall status as more consolidated information. The block diagram in FIG. 11 shows the configuration of the candidate point detection circuit 10. The outputs of the result holding latch 29 from each of the seven horizontal comparison lines Qll, Q12 . Q13...Q17. Q
21. Q22...Q27...Q37...Q77 determines whether or not there is a correlation value that exceeds the detection threshold value in each horizontal comparison line by ORing the 7 bits in each horizontal comparison line as one group. The state of the seven horizontal comparison lines is held in the seven line detection circuits 30 by using 1-bit information as information on one horizontal comparison line regarding the existence or nonexistence of the line. That is, as shown in Figure 11 (
Qll, Q12. Q13. , Q17), (Q21.
Q22. Q23. , Q27), (Q31゜Q32.Q3
3. ,Q37),,,(Q71.Q72,Q73.,Q
The 7-bit inputs of 77) are logically summed, and the results are stored in the seven line detection circuits 30 to hold information on one horizontal comparison line as 1-bit information. In this embodiment, since 7 horizontal comparison lines are provided, the information on each horizontal comparison line can be 7 bits, and the detection threshold value at all pattern matching positions can be calculated by reading the data of Ilo by the microcomputer 13 once. It becomes possible to know whether there is a coordinate position that can be exceeded.

候補点検出回路10は水平候補点検出回路19からの4
9ポイントの座標位置における相関値の状態の把握を更
に集約して、パターン照合を行っている検査範囲の49
個全体の相関値の状態を1回のマイクロコンピュータ1
3によるデータ読み込みで把握し、マイクロコンピュー
タ13によるソフトウェアで行っても差し支えない比較
判定処理を高速に処理するために設けたものである。に
述べたが、16bitのマイクロコンピュータ13を用
いた場合は1回のデータ読み込みで2水平走査ラインの
7座標位置における相関値の状態の把握が、32bit
のマイクロコンピュータ13を用いた場合は1回のデー
タ読み込みで4水平走査ラインの7座標位置における相
関値の状態の把握が可能である。この様に制御に使用す
るマイクロコンピュータ13及びその接続構成の設計に
より、1回のデータ読み込みで行える相関値の状態の把
握数が複数の水平走査ラインとなるのはもちろんである
The candidate point detection circuit 10 is a horizontal candidate point detection circuit 19.
By further consolidating the understanding of the state of the correlation values at the coordinate positions of 9 points, 49 points in the inspection range are being subjected to pattern matching.
The state of the correlation value of all the pieces is checked once by the microcomputer 1.
This is provided to speed up the comparison and judgment process, which can be grasped by data reading by the microcomputer 13 and performed by software by the microcomputer 13. As described in , when a 16-bit microcomputer 13 is used, it is possible to grasp the state of the correlation value at 7 coordinate positions of 2 horizontal scanning lines by reading the data once, using 32 bits.
When the microcomputer 13 is used, it is possible to grasp the state of correlation values at seven coordinate positions of four horizontal scanning lines by reading data once. Due to the design of the microcomputer 13 used for control and its connection configuration, it goes without saying that the number of correlation value states that can be grasped in one data read is a plurality of horizontal scanning lines.

本実施例による装置においては水平・垂直のパターン照
合の総数を7X7=49ポイントとしたが、9X9,1
1X7.5X15等の任意の設計値とすることが可能で
あるのはもちろんであり、1回の画像走査期間内でより
高速に被検査画像内のパターン照合処理を完了させるに
はより多数のパターン照合ポイントを設ければ良いのは
明かである。パターン照合ポイントを増すことは、より
少ないパターン照合回数でパターンの照合を完了する確
率が増すためにを利となる。
In the device according to this embodiment, the total number of horizontal and vertical pattern matching was 7X7=49 points, but 9X9,1
Of course, it is possible to use any design value such as 1X7.5X15, and to complete the pattern matching process in the image to be inspected faster within one image scanning period, it is possible to use a larger number of patterns. It is obvious that it would be better to provide a comparison point. Increasing the number of pattern matching points is advantageous because it increases the probability of completing pattern matching with fewer pattern matchings.

本発明において、どのようにして粗い検出より精密な検
出に移行して行くのか、粗い検出を行なうときの画素間
隔の決定方法は第1の実施例と同様であるので本件につ
いての説明は省略する。
In the present invention, how to move from coarse detection to precise detection, and the method of determining the pixel interval when performing rough detection is the same as in the first embodiment, so a description of this matter will be omitted. .

以下、検出の動作について説明する。第1回目の粗検出
のために水平画像データ抽出回路15及び垂直画像デー
タ抽出回路14ヘマイクロコンピユータ13より水平・
垂直方向ともに8画素間隔にて被検査画像データが出力
されるようにデータ設定する。また、被検査画像5の検
査範囲の中心位置に7行7列のパターン照合の各検査位
置の中心位置(4行4列目)が配置されるように基準画
像データの出力位置をマイクロコンピュータ13により
制御する。パターン照合の各検査位置の中心位置(4行
4列目)が配置されるように基準画像データの出力位置
を制御するとは、具体的には第4図に示す4行4列目の
可変長画素シフトレジスタ21から出力される被検査画
像データにおいて、第2図の部分画像6を検査したい中
心位置に配置したとして、その配置した128行×12
8列の部分画像6の第1行第1列目の画像データが出力
される走査タイミングに合わせて基準画像データ7の第
1行第1列目の画像データを出力するということである
。従って、配置した部分画像6の上下左右には同じ12
8行×128列の部分画像6がそれぞれ8画素間隔で配
置されていることになる。次に、49個の相関値積算回
路18のカウント値をすへてクリアして水平候補点検出
回路19の検出スレッシュ保持ラッチ26に8画素間隔
での粗検出用スレッシュ値をセットし49個全ての結果
保持ラッチ29をクリアし候補点検出回路10の7bi
t全てのライン検出回路30をクリアして、パターン照
合を開始する。
The detection operation will be explained below. For the first rough detection, the horizontal image data extraction circuit 15 and the vertical image data extraction circuit 14 are
The data is set so that the image data to be inspected is output at 8-pixel intervals in both the vertical direction. In addition, the output position of the reference image data is set by the microcomputer 13 so that the center position of each inspection position (4th row, 4th column) for pattern matching in 7 rows and 7 columns is located at the center position of the inspection range of the image to be inspected 5. Controlled by Controlling the output position of the reference image data so that the center position (4th row, 4th column) of each inspection position for pattern matching is arranged means, specifically, the variable length of the 4th row, 4th column shown in FIG. In the image data to be inspected output from the pixel shift register 21, assuming that the partial image 6 in FIG.
This means that the image data in the first row and first column of the reference image data 7 is output in synchronization with the scanning timing at which the image data in the first row and first column of the eight-column partial image 6 is output. Therefore, the same 12
The partial images 6 of 8 rows and 128 columns are arranged at 8 pixel intervals. Next, the count values of the 49 correlation value integration circuits 18 are completely cleared, and the coarse detection threshold values at 8-pixel intervals are set in the detection threshold holding latch 26 of the horizontal candidate point detection circuit 19. 7bi of the candidate point detection circuit 10.
t Clear all line detection circuits 30 and start pattern matching.

第1回目のパターン照合の後、候補点検出回路10内の
ライン検出回路30の内容をマイクロコンピュータ13
が読み込み事前に設定された第1回目の粗検出スレッシ
ュ値を越える検出位置の候補点が存在するかを調べ、存
在していた場合に存在を示している水平比較ラインの水
平候補点検出回路19内の対応する結果保持ラッチ29
の情報を読み込み、その情報に対応するパターン照合座
標位置における相関値を保持しているカウンタ25より
、第1回目のパターン照合を行なった複数の候補点の相
関値の中で粗検出スレッシュ値よりも大きな相関値を保
持している相関値カウンタ25の中で最大相関値を保持
する部分に対応したパターン照合座標位置をもって、次
回のパターン照合の中心位置とする。次に、第2回目の
パターン照合の準備として水平画像データ抽出回路15
及び垂直画像データ抽出回路14ヘマイクロコンピユー
タ13より水平・垂直方向ともに3画素間隔にて被検査
画像データが出力されるようにデータ設定し、第1回目
のパターン照合処理にて算出された座標位置を中心にパ
ターン照合が行なわれるように、基準画像データの出力
位置を各検査位置の中心位置(4行4列目)が配置され
るように制御し、検出スレッシュ値を設定し49個の相
関値積算回路18のカウント値をすべてクリアして水平
候補点検出回路19の検出スレッシュ保持ラッチ26に
3画素間隔での粗検出用スレッシュ値をセットし49個
全ての結果保持ラッチ29をクリアし候補点検出回路1
007bit全てのライン検出回路30をクリアして、
第2回目のパターン照合を開始する。
After the first pattern matching, the contents of the line detection circuit 30 in the candidate point detection circuit 10 are transferred to the microcomputer 13.
The horizontal candidate point detection circuit 19 for the horizontal comparison line checks to see if there is a candidate point at a detection position that exceeds the first rough detection threshold value set in advance. the corresponding result holding latch 29 in
The counter 25 that reads the information of The pattern matching coordinate position corresponding to the portion holding the maximum correlation value among the correlation value counters 25 holding the largest correlation value is set as the center position of the next pattern matching. Next, in preparation for the second pattern matching, the horizontal image data extraction circuit 15
And the data is set so that the microcomputer 13 outputs the image data to be inspected to the vertical image data extraction circuit 14 at intervals of 3 pixels in both the horizontal and vertical directions, and the coordinate position calculated in the first pattern matching process is set. In order to perform pattern matching around Clear all the count values of the value integration circuit 18, set the coarse detection threshold value at 3 pixel intervals in the detection threshold holding latch 26 of the horizontal candidate point detection circuit 19, clear all 49 result holding latches 29, and select the candidate point. Point detection circuit 1
Clear all 007 bit line detection circuits 30,
Start the second pattern matching.

第2回目のパターン照合の後、候補点検出回路10の内
容をマイクロコンピュータ13が読み込み事前に設定さ
れた第1回目の粗検出スレッシュ値を越える検出位置の
候補点が存在するかを調べ、存在していた場合に存在を
示している水平比較ラインの水平候補点検出回路19内
の対応する結果保持ラッチ29の情報を読み込み、その
情報に対応するパターン照合座標位置における相関値を
保持しているカウンタ25より、第2回目のパターン照
合を行なった複数の候補点の相関値の中で粗検出スレッ
シュ値よりも大きな相関値を保持している相関値カウン
タ25の中で最大相関値を保持する部分に対応したパタ
ーン照合座標位置をもって、次回のパターン照合の中心
位置とする。次に、第3回目のパターン照合の準備とし
て水平画像データ抽出回路15及び垂直画像データ抽出
回路14ヘマイクロコンピユータ13より水平・垂直方
向ともに3画素間隔にて被検査画像データが出力される
ようにデータ設定し、第1回目のパターン照合処理にて
算出された座標位置を中心にパターン照合が行なわれる
ように、基準画像データの出力位置を各検査位置の中心
位置(4行4列目)が配置されるように制御し、検出ス
レッシュ値を設定し49個の相関値積算回路18のカウ
ント値をすへてクリアして水平候補点検出回路19の検
出スレッシュ保持ラッチ26に1画素間隔での粗検出用
スレソンユ値をセントし49個全ての結果保持ラッチ2
9をクリアし候補点検出回路10の7bit全てのライ
ン検出回路30をクリアして、第3回目のパターン照合
を開始する。
After the second pattern matching, the microcomputer 13 reads the contents of the candidate point detection circuit 10 and checks whether there is a candidate point at a detection position that exceeds the first coarse detection threshold set in advance. The information in the corresponding result holding latch 29 in the horizontal candidate point detection circuit 19 of the horizontal comparison line indicating the existence of the horizontal comparison line is read, and the correlation value at the pattern matching coordinate position corresponding to that information is held. The counter 25 holds the maximum correlation value among the correlation values of the plurality of candidate points for which the second pattern matching was performed, which holds a correlation value larger than the coarse detection threshold value. The pattern matching coordinate position corresponding to the part is set as the center position for the next pattern matching. Next, in preparation for the third pattern matching, image data to be inspected is output from the microcomputer 13 to the horizontal image data extraction circuit 15 and the vertical image data extraction circuit 14 at intervals of 3 pixels in both the horizontal and vertical directions. Set the output position of the reference image data so that the center position (4th row, 4th column) of each inspection position is set so that pattern matching is performed centering on the coordinate position calculated in the first pattern matching process. The detection threshold value is set, the count value of the 49 correlation value integration circuits 18 is completely cleared, and the detection threshold holding latch 26 of the horizontal candidate point detection circuit 19 is set at one pixel interval. Cent the thread value for rough detection and hold all 49 results latch 2
9 is cleared, all 7 bits of the line detection circuit 30 of the candidate point detection circuit 10 are cleared, and the third pattern matching is started.

第3回目のパターン照合の後、候補点検出回路10の内
容をマイクロコンピュータ13が読み込み事前に設定さ
れた第1回目の粗検出スレッシュ値を越える検出位置の
候補点が存在するかを調べ、存在していた場合に存在を
示している水平比較ラインの水平候補点検出回路19内
の対応する結果保持ラッチ29の情報を読み込み、その
情報に対応するパターン照合座標位置における相関値を
保持しているカウンタ25より、第3回目のパターン照
合を行なった複数の候補点の相関値の中で粗検出スレソ
ンユ値よりも大きな相関値を保持している相関値カウン
タ25の中で最大相関値を保持していたパターン照合座
標位置に対応する座標位置を算出し、その座標位置を検
出位置とする。
After the third pattern matching, the microcomputer 13 reads the contents of the candidate point detection circuit 10 and checks whether there is a candidate point at a detection position that exceeds the first rough detection threshold value set in advance. The information in the corresponding result holding latch 29 in the horizontal candidate point detection circuit 19 of the horizontal comparison line indicating the existence of the horizontal comparison line is read, and the correlation value at the pattern matching coordinate position corresponding to that information is held. The counter 25 holds the maximum correlation value among the correlation values of the plurality of candidate points for which the third pattern matching was performed, which holds a correlation value larger than the rough detection thread value. The coordinate position corresponding to the pattern matching coordinate position that was detected is calculated, and the coordinate position is set as the detection position.

金脈立塾果 以上、説明したように本発明のパターン認識方法あるい
はその装置によれば、基準画像パターンのサイズを任意
に設定が可能となり従来不可能に近かった認識対象の位
置検出が可能となった。更に、任意サイズの基準画像パ
ターンを設定することが可能となったために、登録にお
ける作業を容易とするとともに、大きな被検査画像エリ
アにおいてパターンマツチングを行なっても処理時間を
増すことなく高速に位置検出が可能となった。
As explained above, according to the pattern recognition method or device of the present invention, the size of the reference image pattern can be arbitrarily set, and the position detection of the recognition target, which was nearly impossible in the past, becomes possible. Ta. Furthermore, since it is now possible to set a reference image pattern of any size, it simplifies the registration process, and even when pattern matching is performed in a large image area to be inspected, the processing time is not increased and the positioning can be performed quickly. Detection has become possible.

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

第1図は本発明に係るパターン認識装置の第1の実施例
の構成を示したブロック図、第2図は同じく第2の実施
例の構成を示したブロック図、第3図は本発明の実施例
における垂直画像データ抽出回路の構成を説明したブロ
ック図、第4図は同じく水平画像データ抽出回路の構成
を説明したブロック図、第5図は同じく論理演算回路の
構成を説明したブロック図、第6図は同じく論理演算回
路の各論理演算ユニットの構成を説明したブロック図、
第7図は同じく相関値積算回路の構成を説明したブロッ
ク図、第8図は本発明の第3の実施例の構成を示したブ
ロック図、第9図は第8図の実施例における水平候補点
検出回路の構成を説明したブロック図、第10図は同じ
く水平候補点検出回路の各検出回路の構成を説明したブ
ロック図、第11図は同じく候補点検出回路の構成を説
明したブロック図、及び、第12図は本発明の前提とな
るパターンマツチング処理の概略図である。 10・・・・・・候補点検出回路、 11・・・・・・撮像装置、 12・・・・・・2値化回路、 13・・・・・・マイクロコンピュータ、14・・・・
・・垂直画像データ抽出回路、15・・・・・・水平画
像データ抽出回路、16・・・・・・基準画像パターン
記憶回路、17・・・・・・論理演算回路、 18・・・・・・相関値積算回路、 19・・・・・・水平候補点検出回路。 第3 図 躯       へ lEh    計 )ト   1      。 $ 鉛 m  褐 第 図 第12 図 被検査画像 第 図
FIG. 1 is a block diagram showing the configuration of a first embodiment of a pattern recognition device according to the present invention, FIG. 2 is a block diagram similarly showing the configuration of the second embodiment, and FIG. FIG. 4 is a block diagram illustrating the configuration of the vertical image data extraction circuit in the embodiment; FIG. 4 is a block diagram illustrating the configuration of the horizontal image data extraction circuit; FIG. 5 is a block diagram illustrating the configuration of the logic operation circuit; FIG. 6 is a block diagram illustrating the configuration of each logic operation unit of the logic operation circuit,
FIG. 7 is a block diagram illustrating the configuration of the correlation value integration circuit, FIG. 8 is a block diagram illustrating the configuration of a third embodiment of the present invention, and FIG. 9 is a horizontal candidate in the embodiment of FIG. 8. FIG. 10 is a block diagram illustrating the configuration of the point detection circuit; FIG. 10 is a block diagram illustrating the configuration of each detection circuit of the horizontal candidate point detection circuit; FIG. 11 is a block diagram illustrating the configuration of the candidate point detection circuit; FIG. 12 is a schematic diagram of the pattern matching process that is the premise of the present invention. 10... Candidate point detection circuit, 11... Imaging device, 12... Binarization circuit, 13... Microcomputer, 14...
...Vertical image data extraction circuit, 15...Horizontal image data extraction circuit, 16...Reference image pattern storage circuit, 17...Logic operation circuit, 18... ...Correlation value integration circuit, 19...Horizontal candidate point detection circuit. Figure 3: Total) 1. $ Lead m Brown diagram Figure 12 Image to be inspected Figure

Claims (4)

【特許請求の範囲】[Claims] (1)被検査画像を撮像する撮像手段の映像信号をデジ
タル化し、 特徴的パターンを任意サイズで切り出し基準画像として
予め2値化画像とし任意の2次元座標位置に記憶した画
像データを出力できるようにした基準画像記憶手段と、 2次元被検査画像データの任意数dyの水平走査ライン
をマイクロコンピュータから設定された水平走査ライン
分だけ保持可能な個数(VS−1)の水平走査ライン保
持手段を水平走作ライン間隔k(1≦k≦dy)で均等
に開いている複数行vsの検査座標位置に対応した被検
査画像データが同時に出力されるようにした垂直画像デ
ータ抽出手段と、 前記垂直画像データ抽出手段からの被検査画像データの
同時出力を水平方向の任意の画素dxまでをマイクロコ
ンピュータから設定された画素分だけ保持可能な画素シ
フト手段を(HS−1)個直列につなぐことで、1水平
方向の被検査画像データが同時にある設定された画素j
(1≦j≦dx)間隔で均等に開いているHSヵ所から
同時に出力されるようにしたものを前記垂直抽出手段か
らのVS個の水平走査ラインから同時に出力された被検
査画像データを入力として、前記(HS−1)個直列の
画素シフト手段をVS段設ける事で2次元被検査画像デ
ータの総計VS×HS地点の個々の検査座標位置に対応
した被検査画像データを同時に出力されるようにした水
平画像データ抽出手段と、 前記基準画像記憶手段からの基準画像 データと前記水平画像データ抽出手段からの個々の検査
座標位置に対応した被検査画像データを同時にVS×H
S個の地点でパターン比較し、VS×HSの地点個々の
検査座標位置に対応したパターン照合出力をVS×HS
個同時に合致データとして個々の検査座標位置に対応し
た部分それぞれより同時にシリアル出力することからな
る論理演算手段と、 前記論理演算手段からの個々の検査座標位置に対応した
各合致データ出力を個々に同時カウントすることにより
VS×HS個のパターン照合を1画像走査で完了し個々
の検査座標位置に対応した部分で独立に相関値として算
出保持する相関値積算手段により構成され、 第1回目の粗検出は水平画像データ抽出手段・垂直画像
データ抽出手段をそれぞれの第1回目のパターン照合の
画素間隔でHS×VS個の被検査画像データが同時に出
力されるよう設定し、被検査画像の検出範囲の中心位置
にHS行×VS列の検査位置の中心部が対応するように
配置して第1回目の粗検出を行ない、第1回目のパター
ン照合を行ったHS×VS個の候補点の相関データの中
で最大相関値を保持する部分を検索し、所定の粗検出ス
レッシュ値よりも大きい値であれば前記最大相関値を保
持した部分に対応したパターン照合座標位置をもって、
次回のパターン照合の中心座標位置と決定し、前記第1
回目の粗検出にて求めた最高相関値の座標位置を中心に
HS行×VS列の検査位置の中心部が対応するように配
置し、第2回目の粗検出を水平方向は{第1の画素間隔
−第2の画素間隔×(HS−1/2)}≦0を、垂直方
向は(第1の画素間隔−第2の画素間隔×(VS−1)
/2}≦0を、満たし最小の整数値となる第2の画素間
隔にてHS行×VS列の中心部が対応するように配置し
てパターン照合を行い第2回目のHS×VS個の候補点
の相関データの最高相関値の座標位置を求め、前記第2
回目の粗検出にて求めた最高相関値の座標位置を中心に
HS行×VS列の中心部を配置して第3回目以降のパタ
ーン照合を水平・垂直方向の設定画素間隔が1画素間隔
となるまで水平方向は{第P回目のパターン照合の画素
間隔−第P+1回目のパターン照合の画素間隔×(HS
−1)/2}≦0を、垂直方向は(第P回目のパターン
照合の画素間隔−第P+1回目のパターン照合の画素間
隔×(VS−1)/2}≦0を、満たし最小の整数値と
なる第P+1回目のパターン照合の画素間隔にてHS行
×VS列の中心部を第P回目の最高相関値の座標位置を
配置して行い、1画素間隔にて行なったパターン照合の
HS×VS個の候補点の相関データの最大値が所定の検
出スレッシュ値よりも大きい値であれば前記最大相関値
を保持した部分に対応した座標位置を検出位置とするこ
とを特徴とするパターン認識方法。
(1) The video signal of the imaging means that captures the image to be inspected is digitized, the characteristic pattern is cut out in any size, and the image data can be output as a binary image as a reference image and stored at any two-dimensional coordinate position. a standard image storage means having a 2D image data to be inspected; and a number (VS-1) of horizontal scanning line holding means capable of holding an arbitrary number dy of horizontal scanning lines of the two-dimensional image data to be inspected for the number of horizontal scanning lines set by the microcomputer. Vertical image data extraction means configured to simultaneously output image data to be inspected corresponding to inspection coordinate positions of multiple lines evenly spaced at horizontal scanning line intervals k (1≦k≦dy); By connecting (HS-1) pixel shift means in series that can hold the simultaneous output of the image data to be inspected from the image data extraction means up to an arbitrary pixel dx in the horizontal direction by the number of pixels set by the microcomputer. , 1 set pixel j with horizontal image data to be inspected at the same time
(1≦j≦dx) The image data to be inspected is outputted simultaneously from HS locations equally spaced at intervals of (1≦j≦dx), and the image data to be inspected simultaneously outputted from VS horizontal scanning lines from the vertical extraction means is input. By providing the (HS-1) serial pixel shift means at the VS stage, the image data to be inspected corresponding to the individual inspection coordinate positions of the total VS x HS point of the two-dimensional image data to be inspected can be simultaneously output. horizontal image data extracting means, which simultaneously stores reference image data from the reference image storage means and image data to be inspected corresponding to each inspection coordinate position from the horizontal image data extraction means, VS×H.
Compare patterns at S points, and output pattern matching corresponding to the inspection coordinate position of each point of VS×HS as VS×HS
logical operation means that simultaneously serially outputs matching data from each part corresponding to each inspection coordinate position; and a logic operation means that simultaneously serially outputs each matching data corresponding to each inspection coordinate position from the logical operation means. The first coarse detection consists of a correlation value accumulation means that completes VS×HS pattern matching in one image scan by counting, and calculates and holds correlation values independently for the portion corresponding to each inspection coordinate position. The horizontal image data extraction means and the vertical image data extraction means are set so that HS×VS pieces of image data to be inspected are output simultaneously at the pixel interval of the first pattern matching, and the detection range of the image to be inspected is Correlation data of HS × VS candidate points that were arranged so that the center of the inspection position of HS row × VS column corresponds to the center position, performed the first rough detection, and performed the first pattern matching. Search for the part that holds the maximum correlation value in
The center coordinate position of the next pattern matching is determined, and the first
The coordinate position of the highest correlation value found in the second rough detection is arranged so that the center of the inspection position in the HS row x VS column corresponds to the coordinate position of the highest correlation value found in the second rough detection. Pixel spacing - second pixel spacing x (HS-1/2)}≦0, and in the vertical direction (first pixel spacing - second pixel spacing x (VS-1)
/2}≦0, and the second pixel interval that satisfies the minimum integer value is arranged so that the center of the HS row × VS column corresponds, and pattern matching is performed. Find the coordinate position of the highest correlation value of the correlation data of the candidate point, and
The center of the HS row x VS column is placed around the coordinate position of the highest correlation value found in the first rough detection, and the pixel spacing in the horizontal and vertical directions is set to 1 pixel interval for pattern matching from the third time onwards. The horizontal direction is {pixel interval of Pth pattern matching - pixel interval of Pth + 1st pattern matching
-1)/2}≦0, and in the vertical direction, (pixel spacing of Pth pattern matching - pixel spacing of Pth+1st pattern matching x (VS-1)/2}≦0, and the minimum integer The coordinate position of the Pth highest correlation value is placed in the center of the HS row x VS column at the pixel interval of the Pth + 1st pattern matching, which is a numerical value, and the HS of the pattern matching performed at 1 pixel intervals. Pattern recognition characterized in that if the maximum value of the correlation data of ×VS candidate points is larger than a predetermined detection threshold value, the coordinate position corresponding to the part holding the maximum correlation value is set as the detection position. Method.
(2)撮像手段からの2次元映像信号をデジタル化し、
被検査画像の特徴的なパターンの任意サイズを切り出し
基準画像として予め記憶し任意の2次元座標位置に記憶
した画像データを出力可能な基準画像記憶手段と、 2次元被検査画像データの任意dyの水平走査ラインを
マイクロコンピュータから設定された分だけ保持可能な
(VS−1)個数の水平走査ライン保持手段を水平走査
ライン間隔k(1≦k≦dy)で均等に開いているVS
行の個々の検査座標位置に対応した被検査画像データが
同時に出力されるようにした垂直画像データ抽出手段と
、前記垂直画像データ抽出手段からの被検査画像データ
のVS個の同時出力を水平方向の任意の画素dxまでを
マイクロコンピュータから設定された画素分だけ保持可
能な画素シフト手段をHS個直列につなぐことで、1水
平方向の被検査画像データが同時にある設定された画素
j(1≦j≦dx)間隔で均等に開いているHSカ所か
ら同時に出力されるようにしたものを前記垂直抽出手段
からのVS個の水平走査ラインから同時に出力された被
検査画像データを入力として、前記HS個直列の画素シ
フト手段をVS段設ける事で2次元被検査画像データの
総計VS×HS地点の個々の検査座標位置に対応した被
検査画像データを同時に出力されるようにした水平画像
データ抽出手段と、前記基準画像パターン記憶手段から
の画像データと前記水平画像データ抽出手段からの個々
の検査座標位置に対応した被検査画像パターンデータを
同時にパターン比較するVS×HS個の排他的論理和か
らなる個々の検査座標位置に対応したパターン照合出力
をVS×HS個同時に合致パルスとして個々の検査座標
位置に対応した排他的論理和手段より出力することから
なる論理演算手段と、 前記論理演算手段からの個々の検査座標位置に対応した
各合致パルス出力を個々に同時カウントすることにより
VS×HS個のパターン照合を1画像走査で完了し個々
の検査座標位置に対応した部分で独立に算出保持する相
関値積算手段と、前記相関値積算手段の相関値データを
マイクロコンピュータより事前に設定されたパターン検
出スレッシュ値との大小を同時に比較判定することで候
補点におけるパターン照合状態を高速に検出できるよう
に、前記相関値積算手段のデータ出力と、保持した検出
スレッシュ値と比較し、個々の検査座標位置に対応した
座標位置との間で大小を同時に比較判定し、その結果を
保持する個々の検査座標位置に対応した保持手段をVS
×HS個の個々の検査座標位置に対応した分だけ設ける
こととし、マイクロコンピュータには1水平走査ライン
HSカ所の比較結果を一まとめにしマイクロコンピュー
タの1回の読み込みで1水平走査ラインの各パターン照
合位置の状態の概略を高速に把握できるように状態を保
持した手段を垂直パターン照合のVS本だけ設けること
で、各1水平走査ラインの各パターン照合位置の状態の
概略を高速に把握しその演算対応位置の特定を容易に行
えるようにした水平候補点検出手段により構成され、第
1回目の粗検出は水平画像データ抽出手段・垂直画像デ
ータ抽出手段をそれぞれの第1回目のパターン照合の画
素間隔でHS×VS個の被検査画像データが同時に出力
されるよう設定し、被検査画像の検出範囲の中心位置に
HS行×VS列の検査位置の中心部が対応するように配
置して第1回目の粗検出を行ない、前記水平候補点検出
手段により第1回目の粗検出の後マイクロコンピュータ
より事前に設定された第1回目の粗検出スレッシュ値を
越える検出位置の候補点が存在するかを調べ、存在して
いた場合に存在を示している水平比較ラインの前記水平
候補点検出手段の情報を読み込み、前記情報に対応する
パターン照合座標位置における相関値を保持している手
段より、第1回目のパターン照合を行った複数の候補点
の相関カウント値の中で最大相関値を保持する部分に対
応したパターン照合座標位置をもって、次回のパターン
照合の中心座標位置と決定し、前記第1回目の粗検出に
て求めた最高相関値の座標位置を中心にHS行×VS列
の検査位置の中心部が対応するように配置し、第2回目
の粗検出を水平方向は(第1の画素間隔−第2の画素間
隔×(HS−1)/2)≦0を、垂直方向は{第1の画
素間隔−第2の画素間隔×(VS−1)/2}≦0を、
満たす第2の画素間隔にてHS行×VS列の中心部が対
応するように配置して行い前記水平候補点検出手段から
マイクロコンピュータより第1回目の粗検出の後に設定
された第2回目用の粗検出スレッシュ値より大きくなっ
た第2回目の複数の候補点の相関データの最高相関値の
座標位置を求め、前記第2回目の粗検出にて求めた最高
値位置座標を中心にHS行×VS列の中心部を配置して
第3回目以降のパターン照合を1画素間隔にて行うまで
水平方向は{第P回目のパターン照合の画素間隔−第P
+1回目のパターン照合の画素間隔×(HS−1)/2
}≦0を、垂直方向は{第P回目のパターン照合の画素
間隔−第P+1回目のパターン照合の画素間隔×(VS
−1)/2}≦0を、満たす第P+1回目のパターン照
合の画素間隔にてHS行×VS列の中心部を配置して行
い、前記水平候補点検出手段からマイクロコンピュータ
よりパターン照合を1画素間隔にて行った第P+1回目
用の検出スレッシュ値より大きくなった第P+1回目の
単一あるいは複数の候補点の相関データの最大値を持つ
座標位置を検出位置とすることを特徴とするパターン認
識方法。
(2) Digitize the two-dimensional video signal from the imaging means,
A reference image storage means capable of cutting out an arbitrary size of a characteristic pattern of an image to be inspected and storing it in advance as a reference image and outputting the image data stored at an arbitrary two-dimensional coordinate position; A VS in which (VS-1) horizontal scanning line holding means capable of holding horizontal scanning lines set by a microcomputer are equally spaced at horizontal scanning line intervals k (1≦k≦dy).
vertical image data extraction means for simultaneously outputting image data to be inspected corresponding to individual inspection coordinate positions of a row; and VS simultaneous output of image data to be inspected from the vertical image data extraction means in a horizontal direction. By serially connecting HS pixel shift means capable of holding up to an arbitrary pixel dx by the number of pixels set by the microcomputer, one horizontal direction image data to be inspected can be simultaneously transferred to a set pixel j (1≦ j≦dx), the image data to be inspected that is simultaneously output from VS horizontal scanning lines from the vertical extraction means is outputted simultaneously from HS locations equally spaced at intervals of Horizontal image data extraction means that is configured to simultaneously output the image data to be inspected corresponding to the individual inspection coordinate positions of the total VS x HS point of the two-dimensional image data to be inspected by providing pixel shifting means in series at the VS stage. and VS×HS exclusive ORs for simultaneously pattern comparing the image data from the reference image pattern storage means and the image pattern data to be inspected corresponding to each inspection coordinate position from the horizontal image data extraction means. a logic operation means for simultaneously outputting pattern matching outputs corresponding to each inspection coordinate position as VS×HS matching pulses from an exclusive OR means corresponding to each inspection coordinate position; By simultaneously counting each matching pulse output corresponding to each inspection coordinate position, VS x HS pattern matching is completed in one image scan, and the correlation is calculated and maintained independently in the part corresponding to each inspection coordinate position. The pattern matching state at the candidate point can be detected at high speed by simultaneously comparing and determining the magnitude of the correlation value data of the value accumulating means and the correlation value accumulating means with a pattern detection threshold value set in advance by a microcomputer. , the data output of the correlation value accumulating means is compared with the held detection threshold value, and the magnitude is simultaneously determined between the coordinate positions corresponding to the individual inspection coordinate positions, and the results are held for each inspection coordinate. VS the holding means corresponding to the position
xHS number of inspection coordinate positions are provided, and the microcomputer collects the comparison results of HS locations on one horizontal scanning line, and each pattern of one horizontal scanning line is read by the microcomputer once. In order to quickly grasp the outline of the state of the matching position, by providing a means for holding the state only for the vertical pattern matching VS, it is possible to quickly grasp the outline of the state of each pattern matching position of each horizontal scanning line. It is composed of horizontal candidate point detection means that can easily specify the corresponding position for calculation, and the first rough detection uses the horizontal image data extraction means and vertical image data extraction means to detect the pixels of the first pattern matching. It is set so that HS x VS pieces of image data to be inspected are output simultaneously at intervals, and arranged so that the center of the inspection position in rows HS x columns VS corresponds to the center position of the detection range of the image to be inspected. Perform the first rough detection, and after the first rough detection by the horizontal candidate point detection means, determine whether there is a candidate point at a detection position that exceeds the first rough detection threshold value set in advance by the microcomputer. is checked, and if it exists, reads the information of the horizontal candidate point detection means of the horizontal comparison line indicating the existence, and from the means holding the correlation value at the pattern matching coordinate position corresponding to the information, the The pattern matching coordinate position corresponding to the part that holds the maximum correlation value among the correlation count values of the plurality of candidate points subjected to the first pattern matching is determined as the center coordinate position of the next pattern matching, and the first The coordinate position of the highest correlation value obtained in the second rough detection is arranged so that the center of the inspection position in the HS row x VS column corresponds to the coordinate position of the highest correlation value obtained in the second rough detection. Pixel spacing - second pixel spacing x (HS-1)/2)≦0, and in the vertical direction {first pixel spacing - second pixel spacing x (VS-1)/2}≦0;
The horizontal candidate point detection means is arranged so that the centers of the HS row and VS column correspond to each other at the second pixel interval that satisfies the second pixel interval, and the second pixel is set after the first rough detection by the microcomputer. Find the coordinate position of the highest correlation value of the correlation data of the plurality of candidate points in the second round, which is larger than the coarse detection threshold value, and perform the HS row centering on the coordinate of the highest value position found in the second round of rough detection. × Until the center of the VS column is arranged and the third and subsequent pattern matching is performed at 1 pixel intervals, the horizontal direction is {pixel interval of Pth pattern matching - Pth
+ Pixel interval of first pattern matching × (HS-1)/2
}≦0, and the vertical direction is {pixel interval of Pth pattern matching - pixel interval of Pth+1st pattern matching × (VS
-1)/2}≦0 by arranging the center of the HS row x VS column at the pixel interval of the P+1st pattern matching that satisfies A pattern characterized in that the detection position is the coordinate position having the maximum value of the correlation data of the P+1 single or multiple candidate points, which is larger than the P+1 detection threshold value performed at pixel intervals. Recognition method.
(3)被検査画像を撮像する撮像装置の2次元映像信号
をデジタル化する2値化回路と、 特徴的パターンをメモリ記憶容量範囲内の任意サイズで
切り出し基準画像として予め任意の2次元座標位置に記
憶した画像データを出力する基準画像記憶回路と、 前記2値化回路からの2値化被検査画像データを任意の
水平走査ラインをマイクロコンピュータからの指示で任
意に設定された分だけ保持可能な水平走査ライン・シフ
トレジスタで構成され前記2値化回路とで2値化画像の
垂直方向に設定された任意の水平走査ライン間隔で均等
に開いている検査座標位置に対応した被検査画像データ
を同時に出力する垂直画像データ抽出回路と、 前記垂直画像データ抽出回路からの2値化被検査画像デ
ータの出力を水平方向の任意画素をマイクロコンピュー
タからの指示で任意に設定された画素分だけ保持可能な
可変長画素・シフトレジスタを複数個直列につなぐこと
で1水平方向の2値化被検査画像データが同時にある設
定された画素間隔で均等に開いている複数カ所から同時
に出力されるように前記垂直抽出回路からの水平走査ラ
インから同時に出力された2値化被検査画像データを入
力として前記直列の可変長画素・シフトレジスタを設け
前記2値化画像の各地点の検査座標位置に対応した2値
化被検査画像データを同時に出力されるようにした水平
画像データ抽出回路と、 前記基準画像記憶回路からの基準画像データと前記水平
画像データ抽出回路からの個々の検査座標位置に対応し
た被検査画像パターンデータを同時にパターン比較する
排他的論理和回路からなる個々の検査座標位置に対応し
たパターン照合出力を同時に合致パルスとして各検査座
標位置に対応した排他的論理和部より出力することから
なる論理演算回路と、及び前記論理演算回路からの個々
の検査座標位置に対応した各合致パルス出力を個々に同
時カウントすることにより複数個のパターン照合を1フ
ィールドで完了し個々の検査座標位置に対応した部分で
独立に算出保持する相関値積算回路を具備し、2次元画
像中の特定パターンを自動抽出して座標位置を検出位置
とすることを特徴とするパターン認識装置。
(3) A binarization circuit that digitizes the two-dimensional video signal of the imaging device that captures the image to be inspected, and a characteristic pattern that is cut out at an arbitrary size within the memory storage capacity range and set in advance at an arbitrary two-dimensional coordinate position as a reference image. a reference image storage circuit that outputs the image data stored in the image data; and a reference image storage circuit that outputs the image data stored in the binarization circuit, and can hold the binarized image data to be inspected from the binarization circuit for any horizontal scanning line set arbitrarily by instructions from the microcomputer. The image data to be inspected corresponds to inspection coordinate positions evenly spaced at arbitrary horizontal scanning line intervals set in the vertical direction of the binarized image with the binarization circuit. and a vertical image data extraction circuit that simultaneously outputs the output of the binary image data to be inspected from the vertical image data extraction circuit, and retains the output of the binarized image data to be inspected from the vertical image data extraction circuit for arbitrary pixels in the horizontal direction set arbitrarily according to instructions from the microcomputer. By connecting multiple possible variable-length pixels and shift registers in series, one horizontal direction of binarized image data to be inspected can be simultaneously output from multiple locations evenly spaced at a set pixel interval. The serial variable length pixel/shift register is provided with the binarized image data to be inspected simultaneously outputted from the horizontal scanning line from the vertical extraction circuit as an input, and corresponds to the inspection coordinate position of each point of the binarized image. A horizontal image data extraction circuit configured to output binarized image data to be inspected at the same time; and a horizontal image data extraction circuit configured to simultaneously output binary image data to be inspected; Consisting of an exclusive OR circuit that simultaneously compares patterns of inspection image pattern data, the pattern matching output corresponding to each inspection coordinate position is simultaneously output as a matching pulse from an exclusive OR circuit corresponding to each inspection coordinate position. Multiple pattern matching can be completed in one field by individually and simultaneously counting each match pulse output corresponding to each inspection coordinate position from the logic operation circuit and the logic operation circuit, and corresponding to each inspection coordinate position. What is claimed is: 1. A pattern recognition device comprising: a correlation value integration circuit that independently calculates and holds a correlation value in a two-dimensional image; and automatically extracts a specific pattern in a two-dimensional image and uses the coordinate position as a detection position.
(4)撮像装置からの2次元映像信号をデジタル化する
2値化回路と、 被検査画像の特徴的なパターンをメモリの記憶容量範囲
内の任意サイズとして切り出し基準画像として予め記憶
し任意の2次元座標位置に記憶した画像データを出力可
能な基準画像記憶回路と、前記2値化回路からの2値化
された被検査画像データを任意の水平走査ラインまでを
マイクロコンピュータからの指示で任意に設定された分
だけ保持可能な水平走査ライン・シフトレジスタ(VS
−1)個で構成され前記(VS−1)個の水平走査ライ
ン・シフトレジスタと前記2値化回路とからで2値化画
像の垂直方向に設定された水平走査ライン(1≦k≦d
x)間隔(但しkは画素間隔)で均等に開いているVS
行の個々の検査座標位置に対応した被検査画像データが
同時に出力されるようにした垂直画像データ抽出回路と
、前記垂直画像データ抽出回路からの2値化された被検
査画像データのVS個の同時出力を水平方向の任意の画
素までをマイクロコンピュータからの指示で任意に設定
された画素分だけ保持可能な可変長画素シフトレジスタ
をHS個直列につなぐことで1水平方向の2値化された
被検査画像データが同時にある設定された画素(1≦j
≦dy)間隔(但しjは画素間隔)で均等に開いている
HSカ所から同時に出力されるようにしたものを前記垂
直抽出回路からのVS個の水平走査ラインから同時に出
力された2値化被検査画像データを入力として前記HS
個直列の可変長画素シフトレジスタをVS段設ける事で
前記2値化画像の総計VS×HS地点の個々の検査座標
位置に対応した2値化被検査画像データを同時に出力さ
れるようにした水平画像データ抽出回路と、 前記基準画像記憶回路からの画像データと前記水平画像
データ抽出回路からの個々の検査座標位置に対応した被
検査画像データを同時にパターン比較するVS×HS個
の排他的論理和回路からなる個々の検査座標位置に対応
したパターン照合出力をVS×HS個同時に合致パルス
として個々の検査座標位置に対応した排他的論理和部よ
り出力することからなる論理演算回路と、 前記論理演算回路からの個々の検査座標位置に対応した
各合致パルス出力を個々に同時カウントすることにより
VS×HS個のパターン照合を1フィールドで完了し個
々の検査座標位置に対応した部分で独立に算出保持する
相関値積算回路と、前記相関値積算回路の相関値データ
をマイクロコンピュータより事前に設定されたパターン
検出スレッシュ値との大小を同時に比較判定することで
候補点におけるパターン照合状態を高速に検出できるよ
うに前記相関値積算回路の出力を個々の検査座標位置に
対応したコンパレータを設け検出スレッシュ値を保持し
個々の検査座標位置に対応したラッチとの間で大小を同
時に比較判定しその結果を保持する個々の検査座標位置
に対応したラッチをVS×HS個の個々の検査座標位置
に対応した分だけ設けることとしマイクロコンピュータ
には1水平走査ラインHSカ所の比較結果を一まとめに
しマイクロコンピュータの1回の読み込みで1水平走査
ラインの各パターン照合位置の状態の概略を高速に把握
できるようにしたラッチ部を垂直パターン照合のVS本
だけ設けることで各1水平走査ラインの各パターン照合
位置の状態の概略を高速に把握しその演算対応位置の特
定を容易に行えるようにした水平候補点検出回路と、前
記水平候補点検出回路のVS本の水平走査ラインの各パ
ターン照合位置の状態の概略を高速に把握できるように
するためにマイクロコンピュータによる1回のデータ入
力にて把握できるよう前記水平候補点検出回路のVS本
の個々の検査座標位置に対応した各ラッチ部の出力を個
々の検査座標位置に対応した各ラッチ部においてスレッ
シュ値よりも大きかったラッチが1つでもあればその水
平走査ラインの状態を保持することでマイクロコンピュ
ータに相関スレッシュ値を越える水平相関ラインがあっ
たことを知らせる候補点検出回路を具備し、単一あるい
は複数の候補点の相関データの最大値を持つ座標位置を
検出位置とすることを特徴とするパターン認識装置。
(4) A binarization circuit that digitizes the two-dimensional video signal from the imaging device; A reference image storage circuit capable of outputting image data stored in dimensional coordinate positions, and binarized image data to be inspected from the binarization circuit up to an arbitrary horizontal scanning line can be arbitrarily processed according to instructions from a microcomputer. Horizontal scanning line shift register (VS
-1) horizontal scanning lines (1≦k≦d
x) VS that are evenly spaced at intervals (k is the pixel interval)
A vertical image data extraction circuit configured to simultaneously output image data to be inspected corresponding to each inspection coordinate position of a row, and a VS number of binary image data to be inspected from the vertical image data extraction circuit. By connecting HS variable-length pixel shift registers in series that can hold simultaneous output up to any pixel in the horizontal direction for the number of pixels arbitrarily set according to instructions from the microcomputer, one horizontal direction can be binarized. The set pixels (1≦j
≦dy) intervals (where j is the pixel interval), the binarized signals output simultaneously from the VS horizontal scanning lines from the vertical extraction circuit are The above-mentioned HS receives the inspection image data as input.
By providing variable length pixel shift registers in series at the VS stage, the binarized image data to be inspected corresponding to the individual inspection coordinate positions of the total VS x HS point of the binarized image can be simultaneously output. an image data extraction circuit, and a VS×HS exclusive OR for simultaneously pattern-comparing the image data from the reference image storage circuit and the image data to be inspected corresponding to each inspection coordinate position from the horizontal image data extraction circuit. a logic operation circuit configured to simultaneously output VS×HS pattern matching outputs corresponding to each inspection coordinate position of the circuit from an exclusive OR section corresponding to each inspection coordinate position; and the logic operation circuit. By simultaneously counting each match pulse output corresponding to each inspection coordinate position from the circuit, VS × HS pattern matching is completed in one field, and calculations and retention are performed independently for the parts corresponding to each inspection coordinate position. The pattern matching state at the candidate point can be detected at high speed by simultaneously comparing and determining the magnitude of the correlation value data of the correlation value accumulating circuit and the pattern detection threshold value set in advance by the microcomputer. In this way, a comparator corresponding to each inspection coordinate position is provided for the output of the correlation value integration circuit to hold the detection threshold value, and the magnitude is simultaneously compared and judged with a latch corresponding to each inspection coordinate position, and the result is held. The number of latches corresponding to the individual inspection coordinate positions to be inspected is provided as many as the latches corresponding to the individual inspection coordinate positions of VS x HS. The state of each pattern matching position of each horizontal scanning line can be grasped quickly by reading the data once.By providing latch parts for only VS of vertical pattern matching, the state of each pattern matching position of each horizontal scanning line can be grasped quickly. A horizontal candidate point detection circuit that can quickly grasp the outline of the calculation and easily specify the position corresponding to the calculation, and an outline of the state of each pattern matching position of the VS horizontal scanning lines of the horizontal candidate point detection circuit. In order to enable high-speed grasping, the output of each latch section corresponding to the individual inspection coordinate position of the VS book of the horizontal candidate point detection circuit is recorded as an individual inspection coordinate so that it can be grasped with one data input by a microcomputer. If there is even one latch that is larger than the threshold value in each latch section corresponding to the position, the state of that horizontal scanning line is maintained and the candidate is notified to the microcomputer that there is a horizontal correlation line that exceeds the correlation threshold value. 1. A pattern recognition device comprising a point detection circuit, wherein a coordinate position having the maximum value of correlation data of a single candidate point or a plurality of candidate points is set as a detection position.
JP2216559A 1990-08-16 1990-08-16 Pattern recognition method and apparatus Expired - Lifetime JP3007392B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2216559A JP3007392B2 (en) 1990-08-16 1990-08-16 Pattern recognition method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2216559A JP3007392B2 (en) 1990-08-16 1990-08-16 Pattern recognition method and apparatus

Publications (2)

Publication Number Publication Date
JPH0498580A true JPH0498580A (en) 1992-03-31
JP3007392B2 JP3007392B2 (en) 2000-02-07

Family

ID=16690333

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2216559A Expired - Lifetime JP3007392B2 (en) 1990-08-16 1990-08-16 Pattern recognition method and apparatus

Country Status (1)

Country Link
JP (1) JP3007392B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH064672A (en) * 1992-05-08 1994-01-14 Sanyo Electric Co Ltd Pattern matching circuit
EP0584701A2 (en) * 1992-08-21 1994-03-02 Yozan Inc. Pattern matching circuit
JP2013218476A (en) * 2012-04-06 2013-10-24 Denso Corp Image recognition device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4521858B2 (en) 2004-02-12 2010-08-11 株式会社キーエンス Image processing device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH064672A (en) * 1992-05-08 1994-01-14 Sanyo Electric Co Ltd Pattern matching circuit
EP0584701A2 (en) * 1992-08-21 1994-03-02 Yozan Inc. Pattern matching circuit
EP0584701A3 (en) * 1992-08-21 1994-12-14 Yozan Inc Pattern matching circuit.
JP2013218476A (en) * 2012-04-06 2013-10-24 Denso Corp Image recognition device

Also Published As

Publication number Publication date
JP3007392B2 (en) 2000-02-07

Similar Documents

Publication Publication Date Title
CN105608671B (en) A kind of image split-joint method based on SURF algorithm
US6134340A (en) Fingerprint feature correlator
JP3549569B2 (en) Target pattern detection method in video
JPS5839357B2 (en) Pattern position detection method
JPH1166325A (en) Method and device for determining boundary of object and recording medium recording boundary determination program for object
JPH0644292B2 (en) Two-dimensional visual recognition device
JPH05165968A (en) Device for recognizing position and attitude of body
JPH0498580A (en) Method and device for pattern recognition
US6795592B2 (en) Architecture for processing fingerprint images
Schwarz et al. Segment-based hand pose estimation
JPS6341107B2 (en)
JPH05288520A (en) Pattern matching method
JP4299908B2 (en) Object boundary determination method and apparatus
KR100295245B1 (en) A parallel thinning method using weighted value
JPH07192134A (en) Image processing method
JP2709301B2 (en) Striation light extraction circuit
EP0428624A1 (en) Intelligent scan image processor
JP2893412B2 (en) IC package inspection system
JPS63282889A (en) Image processing method
JPH0397079A (en) Device for detecting center of gravity
KR0158416B1 (en) Object locating method using contraction of visual data
JPH01156875A (en) Contour extracting system for binarized image
Lam et al. Efficient circular object detection with hypothesis filtering strategy and Hough transform
Wang et al. A real-time architecture of multiple features extraction for vehicle verification
JPH0312788A (en) Traveling object detecting device