JPS6120179A - Two-dimensional visual recognition device - Google Patents
Two-dimensional visual recognition deviceInfo
- Publication number
- JPS6120179A JPS6120179A JP14018184A JP14018184A JPS6120179A JP S6120179 A JPS6120179 A JP S6120179A JP 14018184 A JP14018184 A JP 14018184A JP 14018184 A JP14018184 A JP 14018184A JP S6120179 A JPS6120179 A JP S6120179A
- Authority
- JP
- Japan
- Prior art keywords
- pattern
- horizontal
- patterns
- input
- input pattern
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Image Analysis (AREA)
Abstract
Description
【発明の詳細な説明】
〈発明の技術分野〉
本発明は、静止もしくは移動中の被認識物体を画像化し
て入力パターンを求め、この入力パターンを標準パター
ンと照合して、被認識物体を認識する二次元視覚認識装
置に関連し、殊に本発明は、パターン照合に際し、標準
パターンに対する入力パターンの位置ずれ量を高速検知
する新規位置ずれ検出方式を提供する。[Detailed Description of the Invention] <Technical Field of the Invention> The present invention obtains an input pattern by imaging a stationary or moving object to be recognized, and compares this input pattern with a standard pattern to recognize the object. In particular, the present invention provides a novel positional deviation detection method for detecting at high speed the amount of positional deviation of an input pattern with respect to a standard pattern during pattern matching.
〈発明の背景〉
一般に二次元視覚認識装置は、入力パターンと標準パタ
ーンとを画像」二で重ね合わせ、両パターンの重合一致
度合を検出して、被認識物体を認識するものである。従
ってパターン照合に際しては、両パターンを正確に、位
置合わせする必要があり、従来はXYステージ等を用い
て被認識物体を所定停止位置に位置決めした後、これを
テレビカメラで撮像して入力パターンを求め、この入力
パターンにつき標準パターンと照合処理を行なっている
。ところがこの種方式の場合、被認識物体の位置決め機
構が必要であるから、装置全体の構造が複雑化すると共
に、位置決め操作の時間分だけパターン照合に時間がか
かる等、多くの不利があった。<Background of the Invention> Generally, a two-dimensional visual recognition device recognizes an object by superimposing an input pattern and a standard pattern in an image, detecting the degree of superimposition and coincidence of both patterns. Therefore, when performing pattern matching, it is necessary to accurately align both patterns. Conventionally, an XY stage or the like is used to position the object to be recognized at a predetermined stopping position, and then the object is imaged with a television camera to determine the input pattern. This input pattern is then compared with a standard pattern. However, this type of system requires a mechanism for positioning the object to be recognized, which complicates the overall structure of the apparatus and has many disadvantages, such as the time it takes for pattern matching to correspond to the time required for the positioning operation.
そこで発明者は、入力パターンおよび標準パターンにつ
き対応する角部分等の位置を画像」二で検出し、その位
置ずれ量を算出することにより−パターン相互間をデー
タ」二で位置合わせする方式を開発した。ところがこの
方式の場合、もし入力パターン等にノイズが含まれてい
ると、ノイズ部分がパターンの一部と誤認されることが
あり、かかる場合には、誤ったパターンの位置合わせが
行なわれ、物体認識が不能となる虞れがある。Therefore, the inventor developed a method to align patterns between patterns using data by detecting the positions of corresponding corners of the input pattern and standard pattern using images and calculating the amount of positional deviation. did. However, with this method, if the input pattern contains noise, the noise part may be mistakenly recognized as part of the pattern. There is a risk that recognition may become impossible.
〈発明の目的〉
本発明は、パターンにノイズが含まれていても、標準パ
ターンに対する入力パターンの位置ずれ量を正確性つ高
速に検知して、パターン間の位置修正をデータ上で実施
可能とすることによって、入力パターンが位置ずれして
も、迅速叶つ容易に物体認識を行ない得る二次元視覚認
識装置を提供することを目的とする。<Objective of the Invention> The present invention enables accurate and high-speed detection of the amount of positional deviation of an input pattern with respect to a standard pattern even if the pattern contains noise, and correction of the position between patterns can be performed on the data. It is an object of the present invention to provide a two-dimensional visual recognition device that can quickly and easily perform object recognition even if an input pattern is misaligned.
〈発明の構成および効果〉
上記目的を達成するため、本発明では、標準パターンお
よび入力パターンをメモリへ取り込むと共に、各パター
ンを構成する黒画素数を走査行毎に計数して、その行の
黒画素数とメモリアドレスとを積算し、最後にその積算
値の総和を総点画素数で割って夫々パターンの荷重平均
値を求め、しかる後に両パターンの荷重平均値の差を標
準パターンに対する入力パターンの位置ずれ量として算
出することとした。<Structure and Effects of the Invention> In order to achieve the above object, the present invention captures a standard pattern and an input pattern into a memory, counts the number of black pixels constituting each pattern for each scanning line, and calculates the number of black pixels in that line. The number of pixels and the memory address are integrated, and finally the sum of the integrated values is divided by the total number of pixels to find the weighted average value of each pattern.Then, the difference between the weighted average values of both patterns is calculated as the input pattern for the standard pattern. It was decided to calculate it as the amount of positional deviation.
本発明によれば、被認識物体を所定停止位置に位置決め
する等の必要がなく特別な位置決め機構が不要となり、
装置全体を簡易化できると共に、位置決め操作に要する
時間を節約し得、物体認識処理の効率を向上できる。ま
た各、s6ターン位置を、画像解析等の複雑なソフト処
理によらず、カウンタ等の簡易な/S−ド構成を利用し
て求め得るから、処理効率の向」二に一層貢献する。更
に黒画素数とメモリアドレスとの積から求める荷重平均
値をもって各パターン位置を規定すると共に、両パター
ンの荷重平均値の差からパターン間の位置すれ量を検出
するから、板金パターンにノイズを含まれていても、ノ
イズ部分かパターンの一部であると誤認される等の不都
合が生じず、正確なパターンの位置ずれ検出並びに修正
を実施し得、物体認識精度が向」ニする等、発明目的を
達成した顕著な効果を奏する。According to the present invention, there is no need to position the object to be recognized at a predetermined stop position, and no special positioning mechanism is required.
The entire device can be simplified, the time required for positioning operations can be saved, and the efficiency of object recognition processing can be improved. Furthermore, each s6 turn position can be determined using a simple /S-code configuration such as a counter without resorting to complicated software processing such as image analysis, which further contributes to improving processing efficiency. Furthermore, each pattern position is defined by the weighted average value obtained from the product of the number of black pixels and the memory address, and the amount of positional misalignment between patterns is detected from the difference between the weighted average values of both patterns, so the sheet metal pattern does not contain noise. Even if the object is a part of the pattern, there will be no inconvenience such as it being misidentified as a noise part or a part of the pattern, and the positional deviation of the pattern can be accurately detected and corrected, improving object recognition accuracy. Achieves a remarkable effect of achieving the purpose.
〈実施例の説明〉
第1図は本発明にかかる二次元視覚認識装置の回路構成
例を示す。図中テレビカメラ1は一静止または移動中の
物体2を例えば上方より撮像し、飛越走査にかかる画像
出力(第3図(1)に示す)を同期分離回路3へ送出す
る。同期分離回路3は、前記画像出力より水平同期信号
I−I D、垂直同期信号Vl)、奇数フィールド信号
OD(第3図(2)に示す)、クロック信号GK(第3
図(4)に示す)等を分離し、ビデオ信号VDiを2値
化回路4へ出力する。2値化回路4は、第3図(3)に
示す如く、ビデオ信号VDiに対し一定のスレシュホー
ルドレベルTHを設定し、ビデオ信号VDi の奇数フ
ィールドにつき白黒2値化して2値化パターンを形成出
力する。2値化回路4には、モード切換スイッチS W
1を介して基準メモリ5およびバッファメモリ6が接
続されており、モード切換スイッチSW1を学習モード
側aにセットして標準モデルを撮像するとき、基準メモ
リ5に例えば第2図(1)に示す標準パターンPが格納
され、またモード切換スイッチSW1を認識モード側す
にセットして被認識物体を撮像するとき、バッファメモ
リ6に例えば第2図(2)に示す入力パターンPiが格
納される。本実施例の場合、各パターンは縦横256ビ
ツトの画素範囲に格納され、第2図fi+ +21に示
す例では、入力パターンPiは標準パターンPに対し右
上方向へ位置ずれしている。<Description of Embodiments> FIG. 1 shows an example of a circuit configuration of a two-dimensional visual recognition device according to the present invention. In the figure, a television camera 1 images a stationary or moving object 2, for example from above, and sends an image output (shown in FIG. 3(1)) related to interlaced scanning to a synchronization separation circuit 3. The synchronization separation circuit 3 extracts a horizontal synchronization signal I-ID, a vertical synchronization signal Vl), an odd field signal OD (shown in FIG. 3(2)), and a clock signal GK (a third
(shown in FIG. 4), etc., and outputs the video signal VDi to the binarization circuit 4. As shown in FIG. 3 (3), the binarization circuit 4 sets a certain threshold level TH for the video signal VDi, and binarizes the odd fields of the video signal VDi into black and white to form a binarization pattern. Output. The binarization circuit 4 includes a mode changeover switch SW.
1, a reference memory 5 and a buffer memory 6 are connected to each other, and when the mode selector switch SW1 is set to the learning mode side a and a standard model is imaged, the reference memory 5 is connected to the reference memory 5, for example, as shown in FIG. 2 (1). A standard pattern P is stored, and when the mode selector switch SW1 is set to the recognition mode side and an object to be recognized is imaged, the input pattern Pi shown in FIG. 2(2), for example, is stored in the buffer memory 6. In the case of this embodiment, each pattern is stored in a pixel range of 256 bits in the vertical and horizontal directions, and in the example shown in FIG.
尚第1図中、水平カウンタ7.9および垂直カウンタ8
.10は、標準パターンPや入力パターンPiの読み書
きに際し、夫々メモリ内の画素位置をアドレス指定する
。またゲート回路11.12および13.14は、奇数
フイールド信号ODやクロック信号CKで開閉制御され
、書込み制御信号Wや読出し制御信号kを各メモリ5.
6へ供給する。更にゲート回路15は奇数フィールド信
号ODで開閉制御され、クロック信号CKを走査方向切
換回路16.17を介して水平カウンタ7.9および垂
直カウンタ8.10へ夫々供給する。尚走査方向切換回
路16.17は−メモリ5.6の走査方向を水平、垂直
のいずれか方向に切り換えるための回路である。In Fig. 1, horizontal counter 7.9 and vertical counter 8
.. Reference numeral 10 specifies addresses of pixel positions in the memory when reading and writing the standard pattern P and the input pattern Pi. Gate circuits 11.12 and 13.14 are controlled to open and close by odd field signal OD and clock signal CK, and send write control signal W and read control signal k to each memory 5.
Supply to 6. Further, gate circuit 15 is controlled to open and close by odd field signal OD, and supplies clock signal CK to horizontal counter 7.9 and vertical counter 8.10 through scanning direction switching circuit 16.17, respectively. The scanning direction switching circuits 16 and 17 are circuits for switching the scanning direction of the memory 5.6 to either horizontal or vertical direction.
前記2値化回路4にはモード切換スイッチSW1を介し
て2値パターンの出力回路18.19が夫々メモリ5.
6と並列に接続されている。The binary pattern output circuits 18 and 19 are connected to the memories 5 and 19 in the binarization circuit 4 via the mode changeover switch SW1, respectively.
6 is connected in parallel.
これら各出力回路18.19は奇数フィールド信号OD
で開閉制御されるゲート回路20.21を含んでおり、
夫々ゲート出力は各メモリ5.6の読出し出力と共にオ
ア回路22.23へ入力される。各オア回路22.23
の出力側には、前記スイッチSWIと連動するモード切
換スイッチS ’AI 2を介して黒画素検知回路24
が接続され、更にこの黒画素検知回路24には画素カウ
ンタ25が接続しである。黒画素検知回路24は各パタ
ーンを構成する黒画素(第2図中、斜線部分)を検知し
、画素カウンタ25は黒画素検知回路24の出力(黒画
素数)を計数する。Each of these output circuits 18 and 19 has an odd field signal OD.
It includes gate circuits 20 and 21 whose opening and closing are controlled by
The respective gate outputs are input to OR circuits 22, 23 together with the read outputs of each memory 5, 6. Each OR circuit 22.23
A black pixel detection circuit 24 is connected to the output side of the black pixel detection circuit 24 via a mode changeover switch S'AI 2 that is interlocked with the switch SWI.
Further, a pixel counter 25 is connected to this black pixel detection circuit 24. The black pixel detection circuit 24 detects the black pixels (shaded areas in FIG. 2) constituting each pattern, and the pixel counter 25 counts the output (number of black pixels) of the black pixel detection circuit 24.
この画素カウンタ25の計数データは、水平ブランキン
グ期間毎にI 10 (Input 10utput
)ボート26を介しテCP U (Central P
rocessing Unit)27に取り込まれ、C
PU27は取り込んだ計数データに基づき後記する荷重
平均値を算出した後、標準パターンに対する入力パター
ンの位置ずれ量ΔX、ΔYを求める。尚図中、PROM
(Programmable Read 0nly M
emory ) 28ハ位置ずれ検出等の一連のプログ
ラムを格納し、またR A M (Random Ac
cess Memory ) 29は各種データの格納
する他−処理実行のためのワークエリアを有する。また
ゲート回路30.31はCPU27に対し割込み信号l
NTl、2を発生させる回路であり、オア回路32は画
素カウンタ25をリセットする回路である。更に表示部
33は、パターン照合に際し各パターンの不一致黒画素
数を表示し、設定スイッチ34はパターン照合における
各種しきい値等を設定する。The count data of this pixel counter 25 is calculated as I10 (Input 10output) every horizontal blanking period.
) via the boat 26 (Central P
processing unit) 27, and C
The PU 27 calculates a weighted average value, which will be described later, based on the captured count data, and then calculates the positional deviation amounts ΔX and ΔY of the input pattern with respect to the standard pattern. In the figure, PROM
(Programmable Read Only M
RAM (Random Ac memory) stores a series of programs such as positional deviation detection, etc.
The cess memory 29 has a work area for storing various data and for executing processing. Furthermore, the gate circuits 30 and 31 send an interrupt signal l to the CPU 27.
This is a circuit that generates NTl,2, and the OR circuit 32 is a circuit that resets the pixel counter 25. Furthermore, the display section 33 displays the number of mismatched black pixels of each pattern during pattern matching, and the setting switch 34 sets various threshold values and the like for pattern matching.
第4図(1)は基準メモリ5に格納された標準パターン
Pを、また第4図(2)はバッファメモリ6に格納され
た入力パターンPiを夫々示す。図中、c、 、 G2
は標準パターンPおよび入力パターンPiの荷重平均位
置(重心位置)−X+、Y+。4(1) shows the standard pattern P stored in the reference memory 5, and FIG. 4(2) shows the input pattern Pi stored in the buffer memory 6. In the figure, c, , G2
are the weighted average positions (center of gravity positions) of the standard pattern P and the input pattern Pi -X+, Y+.
X2.Y2は重心位置G1.G2の位置データを夫々示
しており、入力パターンPiの重心位置G2は標準パタ
ーンPの重心位置G1 に対し、水平方向にΔX、垂直
方向にΔYだけ位置ずれしている。X2. Y2 is the center of gravity position G1. The center of gravity G2 of the input pattern Pi is shifted from the center of gravity G1 of the standard pattern P by ΔX in the horizontal direction and by ΔY in the vertical direction.
然してモード切換スイッチswl、sw2を学習モード
側λに設定した後、テレビカメラ1により標準モデルを
撮像すると、ビデオ信号VDi の最初の奇数フィー
ルドにつき2値化処理が実行され、標準パターンPが基
準メモリ5に書込み形成される。そしてこれと同じ時間
タイミングで2値化回路4の出力がゲート回路20、オ
ア回路22を経て黒画素検知回路24へ送られ、画素カ
ウンタ25が黒画素検知回路2・4の出力(黒画素数)
を計数してゆくと共に、各水平ブランキング期間毎にC
PU27に対し割込み信号TNT1が発生し、画素カウ
ンタ25の計数内容がその都度読み込まれる。However, when the standard model is imaged by the television camera 1 after setting the mode changeover switches swl and sw2 to the learning mode side λ, the binarization process is executed for the first odd field of the video signal VDi, and the standard pattern P is stored in the reference memory. 5 is written and formed. Then, at the same time timing, the output of the binarization circuit 4 is sent to the black pixel detection circuit 24 via the gate circuit 20 and the OR circuit 22, and the pixel counter 25 detects the output of the black pixel detection circuits 2 and 4 (the number of black pixels). )
At the same time, C is counted for each horizontal blanking period.
An interrupt signal TNT1 is generated to the PU 27, and the count contents of the pixel counter 25 are read each time.
第5図(1)はかかる割込み制御動作を示すもので、同
図中、niは画素カウンタ25の計数値を、Yi は
基準メモリ5の垂直カウンタ8の計数値(基準メモリ5
の垂直アドレス)を夫々示す。FIG. 5(1) shows such an interrupt control operation. In the figure, ni is the count value of the pixel counter 25, and Yi is the count value of the vertical counter 8 of the reference memory 5 (the reference memory 5
vertical address) respectively.
今Yi行目(但しYi(256)の水平走査ラインにつ
き黒画素計数動作を完了した時点を想定すると、まずC
I’U27はステップ41で垂直カウンタ8の計数値Y
iを読み取り、つぎのステップ42で画素カウンタ25
の計数値nHを読み取る。つぎにステップ43において
、計数値niの累積値N1を演算し、更にステップ44
において、垂直カウンタ8の計数値Yi と画素カウン
タ25の計数値niとの積Yini を算出して−そ
の累積値NT、を求める。つぎにステップ45において
、垂直カウンタ8の計数値Yiが最終水平走査行(本実
施例では256行)に達したか否かがチェックされ、そ
の判定が“No”のとき、スタート時点の割込み待の状
態に戻り、つぎの水平走査行につき同様の黒画素計数動
作が実行される。Assuming that the black pixel counting operation has been completed for the current Yi-th horizontal scanning line (Yi (256)), first
I'U27 is the count value Y of the vertical counter 8 in step 41.
i is read, and in the next step 42 the pixel counter 25
Read the count value nH. Next, in step 43, the cumulative value N1 of the count value ni is calculated, and further in step 44
In this step, the product Yini of the count value Yi of the vertical counter 8 and the count value ni of the pixel counter 25 is calculated to obtain its cumulative value NT. Next, in step 45, it is checked whether the count value Yi of the vertical counter 8 has reached the final horizontal scanning line (256 lines in this embodiment), and if the determination is "No", the interrupt wait time at the start point is The state returns to , and a similar black pixel counting operation is performed for the next horizontal scanning row.
上記ステップ41〜ステツプ44の各処理が繰り返し実
行されて、垂直カウンタ8の計数値Yiがr256Jに
達したとき、ステップ45の判定が” YES”となり
、つぎのステップ46において、前記累積値NT、を累
積値N1で割って共に−この算出データをRAM29の
所定領域Y1へ格納した後、つぎのステップ47で累積
値NT、をクリアする。Each of the processes from step 41 to step 44 is repeatedly executed, and when the count value Yi of the vertical counter 8 reaches r256J, the determination in step 45 becomes "YES", and in the next step 46, the cumulative value NT, After dividing the calculated data by the cumulative value N1 and storing the calculated data in a predetermined area Y1 of the RAM 29, the cumulative value NT is cleared in the next step 47.
つきに偶数フィールドでは、CPU27は水平、垂直の
各カウンタ7.8を歩進させつつ基準メモリ5を垂直方
向に走査して、標準パターンPを読み出すと共に、読み
出された画素データが黒画素検知回路24へ送られ、画
素カウンタ25にて黒画素数が計数される。そして水平
ブランキング期間毎にCPU27に対し割込み信号TN
T2が発生し、画素カウンタ25の計数内容がその都度
読み込まれる。In each even field, the CPU 27 scans the reference memory 5 in the vertical direction while incrementing the horizontal and vertical counters 7.8 to read out the standard pattern P, and the read pixel data indicates that a black pixel is detected. The pixel counter 25 counts the number of black pixels. Then, an interrupt signal TN is sent to the CPU 27 every horizontal blanking period.
Each time T2 occurs, the count contents of the pixel counter 25 are read.
第5図(2)はかかる割込み制御動作を示すもので、同
図中、ni′ は画素カウンタ25の計数値を、Xi
は基準メモリ5の水平カウンタ7の計禁値(基準メモ
リ5の水平アドレス)を夫々示す。FIG. 5(2) shows such an interrupt control operation, in which ni' is the count value of the pixel counter 25, and Xi
indicate the prohibited value (horizontal address of the reference memory 5) of the horizontal counter 7 of the reference memory 5, respectively.
今Xi行目(但しXi〈256)の垂直走査ラインにつ
き黒画素計数動作を完了した時点を想定すると、まずC
PU27はステップ51で水平カウンタ7の計数値Xi
を読み取り、つぎのステップ52で画素カウンタ25の
計数値ni′を読み取る。つぎにステップ53において
一水平カウンタ7の計数値Xi と画素カウンタ25の
計数値n 、Iとの積X4ni’を算出して、その累積
値NT、 を求める。つぎにステップ54において、
水平カウンタ7の計数値Xiが最終水平走査行(本実施
例では256行)に達したか否かがチェックされ、その
判定が”No”のとき、スタート時点の割込み待の状態
に戻り、つぎの垂直走査行につき同様の黒画素計数動作
が実行される。Assuming that the black pixel counting operation has been completed for the Xi-th vertical scanning line (Xi<256), first
In step 51, the PU 27 calculates the count value Xi of the horizontal counter 7.
In the next step 52, the count value ni' of the pixel counter 25 is read. Next, in step 53, the product X4ni' of the count value Xi of the horizontal counter 7 and the count values n and I of the pixel counter 25 is calculated to obtain its cumulative value NT. Next, in step 54,
It is checked whether the counted value Xi of the horizontal counter 7 has reached the final horizontal scanning line (256 lines in this embodiment), and if the judgment is "No", the process returns to the state of waiting for an interrupt at the start point, and then A similar black pixel counting operation is performed for each vertical scan row.
上記ステップ51〜ステツプ53の各処理が繰り返し実
行されて、水平カウンタ7の計数値Xiがr256Jに
達したとき、ステップ54の判定が“YES”となり、
つぎのステップ55において、前記積Xin;’の累積
値NT、 を前記第5図(1)で求めた累積値N1で割
って標準パターN 1
算出データをRAM29の所定領域X1 へ格納した後
、つぎのステップ56.57で累積値NT、、N1をク
リアする。When each of the processes in steps 51 to 53 described above is repeatedly executed and the count value Xi of the horizontal counter 7 reaches r256J, the determination in step 54 becomes "YES",
In the next step 55, after dividing the cumulative value NT of the product Xin;' by the cumulative value N1 obtained in FIG. In the next steps 56 and 57, the cumulative values NT, . . . N1 are cleared.
つぎに被認識物体の認識処理を実行する場合、モード切
換スイッチSWI、SW2を認識モード側すに設定した
後−同様の撮像操作を実行する。この場合入力パターン
Piはバッファメモリ6に格納されることになり、前記
同様に奇数フィールドの時間タイミングで入力パターン
Piの書込みが実行される。またこれと同じ時間タイミ
ングで黒画素の計数動作が実行されると共に御名水平プ
ランキング期間毎にCPU27に対し割込み信号lNT
1が発生せられる。Next, when performing recognition processing for the object to be recognized, after setting the mode changeover switches SWI and SW2 to the recognition mode side, a similar imaging operation is performed. In this case, the input pattern Pi will be stored in the buffer memory 6, and writing of the input pattern Pi will be executed at the odd field time timing as described above. Also, at the same time timing, the black pixel counting operation is executed, and an interrupt signal lNT is sent to the CPU 27 during each horizontal planking period.
1 is generated.
第6図(1)はかかる割込み制御動作を示しており、前
記第5図(1)のフローチャートと同様、ステップ63
で画素カウンタ25の計数値nlの累積値N2を求め、
ステップ64で画素カウンタ25の計数値ni と垂直
カウンタ10の計数値Yiとの積Yiniの累積値NT
2とを求め、最終的にこの両者から入力パターンPiの
荷電子域Y2へ格納する(ステップ66)。FIG. 6(1) shows such an interrupt control operation, and like the flowchart of FIG. 5(1) above, step 63
Find the cumulative value N2 of the count value nl of the pixel counter 25,
In step 64, the cumulative value NT of the product Yini of the count value ni of the pixel counter 25 and the count value Yi of the vertical counter 10 is
2 and finally stored in the valence region Y2 of the input pattern Pi (step 66).
つぎに偶数フィールドでは、cpu27は水平、垂直の
各カウンタ9.10を歩進させつつバッファメモリ6を
垂直方向に走査して、入力パターンPiを読み出すと共
に、読み出された画素データが黒画素検知回路24へ送
られ、画素カウンタ25にて黒画素数が計数される。そ
して水平ブランキング期間毎にCPU27に対し割込み
信号INT2が発生し、画素カウンタ25の計数内容が
その都度読み込まれる。Next, in the even field, the CPU 27 scans the buffer memory 6 in the vertical direction while incrementing the horizontal and vertical counters 9 and 10, reads out the input pattern Pi, and detects that the read pixel data is a black pixel. The pixel counter 25 counts the number of black pixels. Then, an interrupt signal INT2 is generated to the CPU 27 every horizontal blanking period, and the count contents of the pixel counter 25 are read each time.
第5図(2)はかかる割込み制御動作を示す。同図のス
テップ71〜75は、前記第5図(2)のフローチャー
トと同様であり、ステップ73で画素カウンタ25の計
数値n 、lと水平カウンタ9の計数値Xiとの積>J
ni’の累積値NT2を求め、ステップ75て累積値N
T2と前記累積値N2とかN2
て、これをRAM29の所定領域X2へ格納する(ステ
ップ75)。FIG. 5(2) shows such an interrupt control operation. Steps 71 to 75 in the same figure are similar to the flowchart in FIG.
The cumulative value NT2 of ni' is calculated, and in step 75, the cumulative value N
T2 and the cumulative value N2 are stored in a predetermined area X2 of the RAM 29 (step 75).
かくてステップ76において、領域X2のデータ内容と
領域X1 のデータ内容との差から水平方向の位置ずれ
量ΔXが算出され、つぎのステップ77において、領域
Y2のデータ内容と領域Y1のデータ内容との差から垂
直方向の位置ずれ量ΔYが算出される。そしてつぎのス
テップ78.79で前記位置ずれ量ΔXを水平カウンタ
9に、位置ずれ量ΔYを垂直カウンタ10に夫々プリセ
ットして、位置ずれ修正した後、ステップ80.81で
累積値NT、、 、 N2をクリアする。Thus, in step 76, the horizontal positional deviation amount ΔX is calculated from the difference between the data content of area X2 and the data content of area X1, and in the next step 77, the data content of area Y2 and the data content of area Y1 are calculated. The vertical positional deviation amount ΔY is calculated from the difference. Then, in the next step 78.79, the positional deviation amount ΔX is preset in the horizontal counter 9, and the positional deviation amount ΔY is preset in the vertical counter 10 to correct the positional deviation, and then in step 80.81, the cumulative value NT, , , Clear N2.
上記位置ずれ修正完了後、水平および垂直カウンタ7.
8にて基準メモリ5を、またプリセットした水平および
垂直カウンタ9、】0にてバッファメモリ6を、夫々ア
ドレス指定して、標準パターンPおよび入力パターンP
iの構成画素データを順次読み出すとき、両パターンP
。After completing the above positional deviation correction, the horizontal and vertical counters 7.
Addressing the reference memory 5 at 8 and the buffer memory 6 at preset horizontal and vertical counters 9 and ]0, the standard pattern P and the input pattern P are respectively addressed.
When sequentially reading constituent pixel data of i, both patterns P
.
Pi は位置ずれが修正された重なり状態でデータ比較
されることになり、不一致画素数を計数することにより
、パターンの一致、不一致を判定する。Pi data will be compared in an overlapping state with positional deviation corrected, and by counting the number of mismatched pixels, it will be determined whether the patterns match or do not match.
第7図+11 +2+ +3+は」−記処理方法の他の
実施例を示し、第7図(1)のステップ91〜97で標
準パN 1
のステップ101〜106で入力パターンPiT2
の荷重平均値□を求め、これらの差からパターン間の垂
直方向の位置ずれ量ΔYを算出し、これを垂直カウンタ
10にプリセットする(ステップ107.108)。FIG. 7 +11 +2+ +3+ shows another embodiment of the processing method described above, in which the weighted average value of the input pattern PiT2 at steps 101-106 of the standard pattern N1 at steps 91-97 of FIG. 7(1) □ From these differences, the vertical positional deviation amount ΔY between the patterns is calculated, and this is preset in the vertical counter 10 (steps 107 and 108).
かくて各水平走査行毎に標準パターンPおよび入力パタ
ーンPiの黒画素数”I+”l’の差を求めて、しきい
値TH,と大小比較しく第7図(3)のステップ121
〜123)、更に前記差(ni”i)の累積値NTを求
めて、しきい値TH2と大小比較しくステップ124〜
126)、その結果、ステップ126の「NT>TH2
」の判定がNO”のとき、ステップ127で一致信号が
出力される。Thus, for each horizontal scanning line, the difference between the number of black pixels "I+"l' between the standard pattern P and the input pattern Pi is determined and compared with the threshold value TH, in step 121 of FIG. 7(3).
~123), and further calculate the cumulative value NT of the difference (ni"i) and compare it with the threshold value TH2 in step 124~
126), as a result, “NT>TH2” in step 126
If the determination is NO, a match signal is output in step 127.
第1図は本発明にかかる二次元視覚認識装置の回路ブロ
ック図、第2図tl+ +21は基準メモリ中の標準パ
ターンおよびバッファメモリ中のへカバターンを示す説
明図、第3図は第1図に示す回路構成例の信号波形を示
すタイミングチャート、第4図+11 [21は標準パ
ターンに対する入力パターンの位置ずれ検出処理を示す
説明図、第5図fil +21は学習モードにおける割
込み処理動作を示すフローチャート、第6図ill +
21は認識モードにおける割込み処理動作を示すフロー
チャート、第7図+11 +2) +31は他の実施例
を示すフローチャートである。
4・・・2値化回路、5・基準メモリ、6・バッファメ
モリ、25 画素カウンタ、27.、、CPU特許出願
人 立石電機株式会社
テq図(+) テア)図 (カヤスター
ト 半1込−
スタート9)
′yl を全’lx !/
Y4 ↑J、zソ?2
ノθ2?ti tl取り
pAtwt hr:
s’i t#s p v/θ−
1N/ す+’)tt’
=N2filt9り
/θ1rx
Nr4ttt、
+NThvnnL/ρδ
Y6°・2.t6 “0
9夕 囚
/Tx
Yi・2.f6 Ha
y、←−1) 96
7ρ7〃γI
Yr←−ΔY−Y2−Yt
NT、 クリy
aYフ1すt、、ト究 ′7 タ面 (ヲ2FIG. 1 is a circuit block diagram of a two-dimensional visual recognition device according to the present invention, FIG. 2 is an explanatory diagram showing a standard pattern in the reference memory and a hekabata turn in the buffer memory, and FIG. 3 is similar to FIG. 1. FIG. 4 +11 is an explanatory diagram showing the process of detecting the positional deviation of the input pattern with respect to the standard pattern; FIG. 5 is a flowchart showing the interrupt processing operation in the learning mode; Figure 6 ill +
21 is a flowchart showing the interrupt processing operation in the recognition mode, and FIG. 7 +11 +2) +31 is a flowchart showing another embodiment. 4... Binarization circuit, 5. Reference memory, 6. Buffer memory, 25. Pixel counter, 27. ,, CPU patent applicant Tateishi Electric Co., Ltd. Teq (+) Tear) (Kaya start half 1 included -
Start 9)
'yl all'lx! /
Y4 ↑J, z so? 2
ノθ2? ti tl take pAtwt hr:
s'it#s p v/θ- 1N/ s+')tt'
=N2filt9ri
/θ1rx
Nr4ttt,
+NThvnnL/ρδ Y6°・2. t6 “0 9 evening prisoner
/Tx Yi・2. f6 Ha
y, ←-1) 96
7ρ7〃γI Yr←−ΔY−Y2−Yt NT, cri y
aYfu 1st,, to study '7 Ta side (wo 2
Claims (1)
た後、入力パターンを標準パターンと照合して被認識物
体を認識する装置において、前記標準パターンおよび入
力パターンを個別に取り込むためのメモリと、各パター
ンにつき走査行毎の黒画素数を計数する手段と、黒画素
を含む走査行のメモリアドレスとその行の黒画素数とを
積算する手段と、積算値の総和を総黒画素数で割って夫
々パターンの荷重平均値を求める手段と、両パターンの
荷重平均値の差を標準パターンに対する入力パターンの
位置ずれ量として算出する手段とを具備して成る二次元
視覚認識装置。After obtaining an input pattern by converting the image of the object to be recognized into black and white, the apparatus recognizes the object by comparing the input pattern with a standard pattern, which includes a memory for individually capturing the standard pattern and the input pattern. , a means for counting the number of black pixels for each scanning line for each pattern, a means for integrating the memory address of the scanning line containing the black pixel and the number of black pixels in that line, and a means for calculating the sum of the integrated values as the total number of black pixels. A two-dimensional visual recognition device comprising means for calculating a weighted average value of each pattern by dividing the two patterns, and means for calculating a difference between the weighted average values of both patterns as a positional deviation amount of an input pattern with respect to a standard pattern.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP14018184A JPS6120179A (en) | 1984-07-05 | 1984-07-05 | Two-dimensional visual recognition device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP14018184A JPS6120179A (en) | 1984-07-05 | 1984-07-05 | Two-dimensional visual recognition device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPS6120179A true JPS6120179A (en) | 1986-01-28 |
Family
ID=15262778
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP14018184A Pending JPS6120179A (en) | 1984-07-05 | 1984-07-05 | Two-dimensional visual recognition device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS6120179A (en) |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS58191084A (en) * | 1982-05-04 | 1983-11-08 | Oki Electric Ind Co Ltd | Graphic recognizer |
-
1984
- 1984-07-05 JP JP14018184A patent/JPS6120179A/en active Pending
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS58191084A (en) * | 1982-05-04 | 1983-11-08 | Oki Electric Ind Co Ltd | Graphic recognizer |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH0644292B2 (en) | Two-dimensional visual recognition device | |
| JPS6120179A (en) | Two-dimensional visual recognition device | |
| US4984075A (en) | Contour detecting apparatus | |
| JPH10126766A (en) | Surveillance camera device | |
| JPS619773A (en) | Two dimensional visual recognizer | |
| JPS60262288A (en) | 2-dimensional visual recognizer | |
| JPS60262289A (en) | 2-dimensional visual recognizer | |
| JPS61880A (en) | 2-dimensional visual recognizer | |
| JP2841961B2 (en) | Visual recognition device | |
| JPS61879A (en) | 2-dimensional visual recognizer | |
| JPS6121579A (en) | Two-dimensional visual recognizer | |
| JPS60262287A (en) | 2-dimensional visual recognizer | |
| JPS60263274A (en) | Two-dimensional vision recognizing device | |
| JPS60263273A (en) | Two-demensional vision recognizing device | |
| JPS616776A (en) | Recognizing device of two-dimensional sight | |
| JP2638073B2 (en) | Tilt angle detector | |
| JPH0581949B2 (en) | ||
| JPS619771A (en) | Two dimensional visual recognizer | |
| JPH07325906A (en) | Mobile object detection / tracking device | |
| JPS615385A (en) | Two-dimensional visual recognizer | |
| JPS6145438B2 (en) | ||
| JPH0325357A (en) | Image defect detecting method | |
| JPS6136882A (en) | Pattern discriminator | |
| JPS61292507A (en) | Rotary deviation detector | |
| JP3607788B2 (en) | Image processing device |