JPS63229579A - Image coincidence detector - Google Patents

Image coincidence detector

Info

Publication number
JPS63229579A
JPS63229579A JP6449887A JP6449887A JPS63229579A JP S63229579 A JPS63229579 A JP S63229579A JP 6449887 A JP6449887 A JP 6449887A JP 6449887 A JP6449887 A JP 6449887A JP S63229579 A JPS63229579 A JP S63229579A
Authority
JP
Japan
Prior art keywords
data
image
circuit
output
image data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP6449887A
Other languages
Japanese (ja)
Inventor
Akio Aoyama
青山 昭夫
Takahiro Mamiya
高弘 間宮
Katsunori Ishigure
克範 石榑
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.)
CKD Corp
Original Assignee
CKD Corp
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 CKD Corp filed Critical CKD Corp
Priority to JP6449887A priority Critical patent/JPS63229579A/en
Publication of JPS63229579A publication Critical patent/JPS63229579A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PURPOSE:To enable fast image detection by simple constitution by detecting and storing the degree of the correlation of the binarization image data of a two-dimensional image with reference data and the position coordinates of its position. CONSTITUTION:The binarization image data of the two-dimensional image is outputted by an image data output circuit C1. The output image data is compared with the reference data outputted by a reference data output circuit C3 and a coincident bit detecting circuit C4 detects the number of coincident bits between both data. A coincident bit measuring circuit C5 measures the number of detected coincident bits and at least the maximum value among the number of coincident bits on respective scanning lines is stored in a coincidence position storage circuit C6 together with the coordinates of its position outputted by the coordinate output circuit C2. Therefore, at least the maximum value of the correlation of the binarization image data with the reference data and the position coordinates of its position are detected and stored.

Description

【発明の詳細な説明】 発匪辺旦釣 [産業上の利用分野] 本発明は画像−数構出装置に関し、詳しくは2次元画像
中の画像の一致を検出する画像−数構出装置に関する。
Detailed Description of the Invention [Field of Industrial Application] The present invention relates to an image-number construction device, and more particularly to an image-number construction device for detecting matching of images in two-dimensional images. .

[従来の技術] 従来から、画像処理のために2次元画像中の特定のパタ
ーンを検出する検出装置が種々提案されている。こうし
た装置では、テレビカメラ等の撮像手段によって撮像さ
れた2次元画像を二値化した上で画像メモ等に記憶し、
このデータを読み出して特定のパターンの基準画像と一
致する箇所を捜している。即ち、検出装置を算術論理演
算回路として構成し、画像メモリに記・憶されたこのデ
ータと基準画像のデータとを、ソフトウェアによって繰
り返し比較して、パターンの一致するところを探索する
のである。
[Prior Art] Various detection devices have been proposed for detecting specific patterns in two-dimensional images for image processing. In such devices, a two-dimensional image captured by an imaging means such as a television camera is binarized and stored in an image memo or the like.
This data is read out and a location matching a reference image of a specific pattern is searched. That is, the detection device is configured as an arithmetic and logic operation circuit, and software repeatedly compares this data stored in the image memory with the data of the reference image to search for matching patterns.

[発明が解決しようとする問題点] しかしながら、こうした従来の画像検出装置では、画像
の情報量が多いため、画像メモリからそのデータを順次
読み出しては基準データと比較するだけの単純な処理を
、何度も繰り返さなければならないという問題があった
。例えは2次元画像が512X495ドツトの大きさを
有するものである場合、約25万の画素が存在するため
、仮に各水平走査線うちで100ドツト程度の基準デー
タに最も近い部位をサーチしようとすると、データの読
み出し・比較・最大一致データの更新等の一連の処理を
およそ20万回繰り返さねばならない。従って、こうし
たパターンマ・ンチングの処理を総てソフトウェアによ
り実現しようとすると、逐次処理であることから極めて
長い時間を要してしまうという問題を招致する。
[Problems to be Solved by the Invention] However, in these conventional image detection devices, since the amount of image information is large, it is difficult to perform a simple process of sequentially reading out the data from the image memory and comparing it with reference data. The problem was that it had to be repeated many times. For example, if a two-dimensional image has a size of 512 x 495 dots, there are about 250,000 pixels, so if you try to search for the part closest to the reference data of about 100 dots in each horizontal scanning line, , data reading, comparison, and updating of maximum matching data must be repeated approximately 200,000 times. Therefore, if it were attempted to implement all of the pattern machining processing using software, the problem would arise that it would take an extremely long time since it is sequential processing.

この結果、リアルタイムでの画像処理ができないばかり
か、画像処理全体の工数が大きくなり、実使用に耐えな
いことも考えられた。
As a result, not only is it impossible to perform image processing in real time, but also the number of man-hours required for the entire image processing increases, making it impractical for practical use.

本発明は上記問題点を解決し、高速な画像検出を簡易な
構成で実現することを目的としてなされた。
The present invention has been made with the aim of solving the above problems and realizing high-speed image detection with a simple configuration.

産月しl」戊 かかる目的を達成する本発明の構成について以下説明す
る。
The structure of the present invention that achieves the above object will be described below.

[問題点を解決するための手段] 2次元画像の二値化された画像データを基準データと比
較し、該画像データのうち、該基準データと最もよく一
致する部位の位置座標を検出する本発明の画像−数構出
装置は、第1図に例示するように、 前記2次元画像の所定方向への一ラインの走査において
、該一走査ライン中の連続する所定ビットの画像データ
を順次パラレルデータとして出力する画像データ出力回
路C1と、 該読み出される画像データの部位を特定する位置座標を
出力する座標出力回路C2と、予め定められた所定ビッ
ト数の基準データをパラレルデータとして出力する基準
データ出力回路C3と、 前記出力された画像データと前記出力された基準データ
とを比較して一致するビットを検出する一致ビット検出
回路C4と、 該一致したビット数を計測する一致ビット数計測回路C
5と、 各ライン中での前記計測された一致ビット数のうち、少
なくとも最大値を、該最大値を与える画像データの部位
の位置座標と共に各々記憶する一致位置記憶回路C6と
を備えた。
[Means for solving the problem] A book that compares binarized image data of a two-dimensional image with reference data and detects the positional coordinates of a part of the image data that most closely matches the reference data. As illustrated in FIG. 1, the image number construction device of the invention, in scanning one line of the two-dimensional image in a predetermined direction, sequentially parallelizes image data of continuous predetermined bits in the one scanning line. An image data output circuit C1 that outputs as data, a coordinate output circuit C2 that outputs position coordinates specifying the part of the image data to be read, and reference data that outputs reference data of a predetermined number of bits as parallel data. an output circuit C3; a matching bit detection circuit C4 that compares the output image data and the output reference data and detects matching bits; and a matching bit number measuring circuit C that measures the number of matching bits.
5, and a coincidence position storage circuit C6 that stores at least the maximum value of the measured number of coincidence bits in each line together with the position coordinates of the part of the image data that gives the maximum value.

ここで、画像データ出力回路C1とは、一走査ライン中
の連続する所定ビットの二値化された画像データを順次
パラレルデータとして出力する回路であり、例えばシリ
アル人力をパラレルデータに変換する変換器や、ゲート
アレイあるいはROM等によって構成することができる
。2次元画像の所定方向への一ラインの走査とは、通常
の水平走査線に沿ったものであってもよいし、2次元画
像のデータが一旦画像メモリ等に記憶されている場合に
は、読み出し用のアドレスデータを工夫して垂直方向の
みならず斜め方向等としてもよい。
Here, the image data output circuit C1 is a circuit that sequentially outputs binarized image data of continuous predetermined bits in one scanning line as parallel data, and is, for example, a converter that converts serial manual input into parallel data. , a gate array, a ROM, or the like. Scanning one line of a two-dimensional image in a predetermined direction may be along a normal horizontal scanning line, or if the data of the two-dimensional image is once stored in an image memory or the like, The address data for reading may be devised to read not only in the vertical direction but also in the diagonal direction.

座標出力回路C2とは、画像データ出力回路C1によっ
て読み出される画像データの部位を特定する位置座標を
出力するものであり、2次元画像の走査に対応してその
走査位置を出力するものであればどのように構成しても
よい。例えば、画像データ出力手段C1から読み出され
る画像データの先頭アドレス等を出力するカウンタ、R
OM。
The coordinate output circuit C2 outputs position coordinates that specify the part of the image data read out by the image data output circuit C1, and if it outputs the scanning position in response to scanning of a two-dimensional image, It can be configured in any way. For example, a counter that outputs the start address of the image data read out from the image data output means C1, R
OM.

ゲートアレイあるいはプログラマブルロジックアレイ等
により構成することができる。
It can be configured by a gate array, a programmable logic array, or the like.

基準データ出力手段C3とは、予め定められた所定ビッ
ト数の基準データをパラレルデータとして出力する回路
であり、例えば所定ビット数のディップスイッチ、RO
M、ゲートアレイあるいはラッチ等により構成すること
ができる。
The reference data output means C3 is a circuit that outputs reference data of a predetermined number of bits as parallel data, for example, a DIP switch of a predetermined number of bits, RO
M, a gate array, a latch, or the like.

一致ビット検出回路C4とは、画像データ出力回路C1
の出力する画像データと基準データ出力回路C3の出力
する基準データとを比較して一致するビットを検出する
回路であって、画像データと基準データとを各人力とし
両者の排他的論理和をとる複数のゲートやプログラマブ
ルロジックアレイ等により構成することができる。
The matching bit detection circuit C4 is the image data output circuit C1.
This circuit compares the image data outputted by the reference data output circuit C3 with the reference data outputted by the reference data output circuit C3 and detects matching bits, and the circuit calculates the exclusive OR of the image data and the reference data manually. It can be configured with a plurality of gates, a programmable logic array, etc.

一致ビット数計測回路C5とは、一致ビット検出回路C
4の検出結果を入力してそのビット数を検出する回路で
あり、フルアダー等の加算回路として構成される。一致
ビット検出回路C4の出力を時系列化した信号にするこ
とができれば、カウンタ等により実現することもできる
The matching bit number measuring circuit C5 is the matching bit detecting circuit C.
This circuit inputs the detection result of 4 and detects the number of bits, and is configured as an addition circuit such as a full adder. If the output of the coincidence bit detection circuit C4 can be made into a time-series signal, it can also be realized by a counter or the like.

−数位置記憶回路C6は、一致ビット数計測回路C5に
よって計測された一致ビット数のうち、各ラインの中で
の少なくとも最大値と、この最大値を与える画像データ
の部位の位置座標(座標出力回路C2により与えられる
)とを各々記憶する回路であって、ライン中の少なくと
も最大値を取−り出す手段と、その値及び座標を記憶な
いし記録する手段とを一体にもしくは別体に備えるもの
である。最大値を取り出す手段としては、例えは前回ま
での最大値を保持するラッチと、このラッチの出力と今
回の一致ビット数とを比較するマグニチュードコンパレ
ータと、コンパレータの判定結果に基づいてラッチもこ
新たなデータを書き込む回路とからなる構成を考えるこ
とができる。尚、最大1直には一定の下限値を設けても
よい。また、最大値及び座標を記憶ないし記録する手段
は、例えは揮発性もしくは不揮発性のRAM、磁気的な
記録手段、光メモリあるいは用紙やディスプレイに出力
して記録する手段等を考えることができる。
- The number position storage circuit C6 stores at least the maximum value in each line among the number of matching bits measured by the number of matching bits measuring circuit C5, and the positional coordinates (coordinate output) of the part of the image data that gives this maximum value. (given by circuit C2), and is provided integrally or separately with means for extracting at least the maximum value in the line and means for storing or recording the value and coordinates. It is. The means for extracting the maximum value is, for example, a latch that holds the previous maximum value, a magnitude comparator that compares the output of this latch with the current number of matching bits, and a new latch based on the judgment result of the comparator. A configuration consisting of a circuit for writing data can be considered. Note that a certain lower limit value may be set for a maximum of one shift. Further, the means for storing or recording the maximum value and coordinates may be, for example, a volatile or nonvolatile RAM, a magnetic recording means, an optical memory, or a means for outputting and recording on paper or a display.

[作用] 上記構成を有する本発明の画像一致検出装置は、画像デ
ータ出力回路C1によって出力される2次元画像の二値
化された画像データを、基準データ出力回路C3の出力
する基準データとを比較し、両データの一致ビットの数
を一致ビット検出回路C4によって検出する。この検出
された一致ビットの数は、更に一致ビット計測回路C5
によって計測され、各走査ライン中の一致ビット数の少
なくとも最大値は、座標出力回路C2が出力するその位
置の座標と共に、−数位置記憶手段C6に記憶される。
[Operation] The image coincidence detection device of the present invention having the above-mentioned configuration distinguishes the binarized image data of the two-dimensional image output by the image data output circuit C1 from the reference data output from the reference data output circuit C3. The data are compared, and the number of matching bits of both data is detected by the matching bit detection circuit C4. The number of detected matching bits is further calculated by matching bit measuring circuit C5.
At least the maximum number of matching bits in each scanning line is stored in the minus number position storage means C6 together with the coordinates of that position output by the coordinate output circuit C2.

従って、本発明の画像一致検出装置は、2次元画像の二
値化された画像データのうち、基準データとの相関の程
度(少なくとも上記最大値)とこの部位の位置座標とを
検出し記憶する。
Therefore, the image coincidence detection device of the present invention detects and stores the degree of correlation with the reference data (at least the above-mentioned maximum value) and the position coordinates of this part from among the binarized image data of the two-dimensional image. .

[実施例] 以上説明した本発明の構成・作用を一層明らかにするた
めに、以下本発明の画像一致検出装置の好適な実施例に
ついて説明する。第2図は、この画像一致検出装置の概
略構成図である。
[Embodiments] In order to further clarify the configuration and operation of the present invention described above, preferred embodiments of the image matching detection device of the present invention will be described below. FIG. 2 is a schematic configuration diagram of this image matching detection device.

図示するように、この画像検出装置は、撮像手段として
のテレビカメラ1からの信号を人力し、撮像された画像
内において基準パターンと良い相関を有する部位を探索
し、その水平座標(これをX座標とも呼ぶ)と相関の度
合とを端末機2に表示・出力するよう構成されている。
As shown in the figure, this image detection device manually receives a signal from a television camera 1 as an imaging means, searches for a region in the captured image that has a good correlation with a reference pattern, (also referred to as coordinates) and the degree of correlation are displayed and output on the terminal 2.

その内部には、同期分離回路3、画像データ抽出回路5
、二値化回路6、垂直座標カウンタ7、水平座標カウン
タ8、相関器10、ラッチ12、比較器15、相関デー
タ用メモリ1Bおよび論理演算回路20が備えられてい
る。
Inside it, a synchronization separation circuit 3, an image data extraction circuit 5
, a binarization circuit 6, a vertical coordinate counter 7, a horizontal coordinate counter 8, a correlator 10, a latch 12, a comparator 15, a correlation data memory 1B, and a logic operation circuit 20.

テレビカメラ1は、CCD等の固体撮像素子を用いたも
のであり、−フレーム当り水平方向に512ドツトの、
垂直方向に495ラインの分解能を有する。このテレビ
カメラ1からの画像信号はまず同期分離回路3と画像デ
ータ抽出回路5に人力される。
The television camera 1 uses a solid-state image sensor such as a CCD, and has 512 horizontal dots per frame.
It has a resolution of 495 lines in the vertical direction. The image signal from the television camera 1 is first input manually to a synchronization separation circuit 3 and an image data extraction circuit 5.

画像データ抽出回路5は、人力された画像信号から画像
データを取り出す回路であり、テレビ受像器に必須の回
路として周知のものなので内部の構成についての説明は
省略する。画像データ抽出回路5は、−水平走査線を5
12ドツトのデータに分離して抽出し、各ドツト毎にそ
の濃度に応じたアナログ信号を二値化回路6に出力する
。二値化回路6は、濃度情報を含むこのアナログ信号を
所定の闇値と比較し二値化された信号に変換するもので
ある。本実施例では、二値化のための闇値は予め設定さ
れた値としたが、サンプリングエリア毎に最適の闇値を
用いて二値化するよう構成してもよい。この二値化回路
6の出力は、画像データとして相関器10内の後述する
画像データS/P変換器22のシリアル入力端子Sin
に接続されている。また、画像データ抽出回路5は、5
12ドツトの各データについて一つのパルス信号を水平
座標カウンタ8のカウント入力端子Cinと、画像デー
タS/P変換器22のクロック端子CLKとに出力する
The image data extraction circuit 5 is a circuit that extracts image data from a manually inputted image signal, and is well known as an essential circuit for television receivers, so a description of its internal configuration will be omitted. The image data extraction circuit 5 extracts 5 -horizontal scanning lines.
The data is separated and extracted into 12 dots, and an analog signal corresponding to the density of each dot is output to the binarization circuit 6. The binarization circuit 6 compares this analog signal containing density information with a predetermined darkness value and converts it into a binarized signal. In this embodiment, the darkness value for binarization is a preset value, but the binarization may be performed using the optimum darkness value for each sampling area. The output of this binarization circuit 6 is sent as image data to a serial input terminal Sin of an image data S/P converter 22, which will be described later, in the correlator 10.
It is connected to the. Further, the image data extraction circuit 5 includes 5
One pulse signal for each data of 12 dots is output to the count input terminal Cin of the horizontal coordinate counter 8 and the clock terminal CLK of the image data S/P converter 22.

同期分離回路3は画像信号に含まれる垂直同期信号(画
像スタート信号)と水平同期信号とを画像データから分
離するものであり、この回路の構成も周知のものなので
説明は省略する。この同期分離回路3からは、画像スタ
ート信号が垂直座標カウンタ7のリセット端子RESE
Tに出力され、一方、水平同門信号が垂直座標カランタ
フのカウント入力端子Cinと水平座標カウンタ8のリ
セット端子RESETとラッチ12のリセット端子RE
SETとに出力される。
The synchronization separation circuit 3 separates a vertical synchronization signal (image start signal) and a horizontal synchronization signal included in the image signal from the image data, and since the configuration of this circuit is well known, a description thereof will be omitted. An image start signal is sent from the synchronization separation circuit 3 to the reset terminal RESE of the vertical coordinate counter 7.
On the other hand, the horizontal comrade signal is output to the count input terminal Cin of the vertical coordinate carantuff, the reset terminal RESET of the horizontal coordinate counter 8, and the reset terminal RE of the latch 12.
It is output to SET.

従って、垂直座標カウンタ7は同門分離回路3の出力す
る画像スタート信号によりリセットされてカウントを開
始し、同期分離回路3の出力する水平同期信号によって
一フレームに495だけカウントアツプされる。これに
対して、水平座標カウンタ8は同期分離回路3の出力す
る水平同門信号によりリセットされてカウントを開始し
、画像データ抽出回路5の出力するパルス信号により一
水平走査において512だけカウントアツプされる。
Therefore, the vertical coordinate counter 7 is reset by the image start signal output from the same gate separation circuit 3 and starts counting, and is incremented by 495 per frame by the horizontal synchronization signal output from the synchronization separation circuit 3. On the other hand, the horizontal coordinate counter 8 is reset by the horizontal synchronization signal output from the synchronization separation circuit 3 and starts counting, and is incremented by 512 in one horizontal scan by the pulse signal output from the image data extraction circuit 5. .

この垂直座標カランタフの出力は相関データ用メモリ1
日にアドレスADとして人力される。一方、水平座標カ
ウンタ8のカウント出力は相関データ用メモリ1日のデ
ータ人力の下位の9ビットに座標データDXとして人力
されている。この相関データ用メモリ1日は、書換え可
能なデュアルポートのメモリとして構成されており、デ
ータ人力の上位の8ビツトには相関データORであろう
・ンチ12の出力が、−力出力データDoutといまひ
とつのアドレスAdとは論理演算回路20のコモンバス
が、それぞれ接続されている。従って、相関データ用メ
モリ1日には、垂直座標カランタフの出力、即ち2次元
画像のラインの指定に対応したアドレスに、水平座標カ
ウンタ日の出力である座標データDXとラッチ12の出
力である相関データDRが書き込まれる。尚、水平座標
カウンタ8には、カウント値が128以上となったとき
、アクティブハイとなる出力が設けられており、この出
力はラッチ12のラッチイネイブル端子LEに人力され
ている。
The output of this vertical coordinate carantuff is memory 1 for correlation data.
It is manually operated as an address AD on the day of the day. On the other hand, the count output of the horizontal coordinate counter 8 is stored as coordinate data DX in the lower 9 bits of one day's data in the memory for correlation data. This memory for correlation data is configured as a rewritable dual-port memory, and the upper 8 bits of the data input are the output of the correlation data OR and the input output data Dout. The common bus of the logical operation circuit 20 is connected to the other address Ad. Therefore, in the correlation data memory 1st, the output of the vertical coordinate carantuff, that is, the address corresponding to the designation of the line of the two-dimensional image, the coordinate data DX, which is the output of the horizontal coordinate counter, and the correlation data, which is the output of the latch 12. Data DR is written. The horizontal coordinate counter 8 is provided with an output that becomes active high when the count value exceeds 128, and this output is manually input to the latch enable terminal LE of the latch 12.

次に相関器10の内部構成とその働きとについて説明す
る。相関器10は、第2図に示すように、画像データS
/P変換器22.基準データS/P変換器24.マスク
データS/P変換器26,128個の排他的論理和ゲー
ト(−数構出用ゲート)ENOR1ないしENOR12
B、128個のアンドゲートAND1ないしAND12
8.16個のカウント器PLAIないしPLA16およ
び加算器27から構成されている。
Next, the internal configuration and function of the correlator 10 will be explained. The correlator 10, as shown in FIG.
/P converter 22. Reference data S/P converter 24. Mask data S/P converter 26, 128 exclusive OR gates (gates for - number configuration) ENOR1 to ENOR12
B, 128 AND gates AND1 to AND12
8. Consists of 16 counters PLAI to PLA16 and an adder 27.

画像データS/P変換器22は、二値化回路6から出力
されるシリアル信号である画像データを順次128ビツ
トのパラレルデータに変換して出力するものであり、1
2B相のシフトレジスタとして構成されている。この画
像データS/P変換器22のクロック端子CLKには画
像データ抽出回路5の出力であるパルス信号が人力され
ているので、各ラインの走査開始時に水平同期信号によ
りリセットされた後、画像データS/P変換器22のパ
ラレル出力には、テレビカメラ1による2次元画像の水
平走査に同期して、512ドツト分の画像データのうち
128ドツトが−ドットずつシフトされながら現れる。
The image data S/P converter 22 sequentially converts the image data, which is a serial signal output from the binarization circuit 6, into 128-bit parallel data and outputs it.
It is configured as a 2B phase shift register. Since the clock terminal CLK of the image data S/P converter 22 is manually supplied with a pulse signal which is the output of the image data extraction circuit 5, the image data is In synchronization with the horizontal scanning of the two-dimensional image by the television camera 1, 128 dots out of the 512 dots of image data appear on the parallel output of the S/P converter 22, shifted by -dots.

基準データS/P変換器24は、論理演算回路20から
シリアル信号として出力される基準データを128ビツ
トのパラレルデータに変換するものであり、画像データ
S/P変換器22とほぼ同様に構成されている。この基
準データS/P変換器24は、論理演算回路20により
、基準データの書き込みがなされ、書き込みが終了する
と、そのパラレル出力には128ビツトの基準データが
出力されそのまま保持される。
The reference data S/P converter 24 converts the reference data outputted as a serial signal from the logic operation circuit 20 into 128-bit parallel data, and is configured almost similarly to the image data S/P converter 22. ing. Reference data is written into the reference data S/P converter 24 by the logical operation circuit 20, and when the writing is completed, 128-bit reference data is outputted to its parallel output and held as is.

上述した両変換器22.24の各128ビツトのパラレ
ル出力は、−数構出用ゲー)ENORlないしENOR
l2.8によって、互いの排他的論理和か取られ、その
反転された値が出力される。
The 128-bit parallel outputs of both converters 22 and 24 described above are ENORl to ENOR
12.8 performs mutual exclusive OR and outputs the inverted value.

即ち、画像データS/P変換器22の第nビット(n=
1.2−.12B)が、基準データS/P変換器24の
第nビットと一致したとき、−数構出用ゲー)ENOR
nの出力は値1(ハイレベル)となるのである。
That is, the nth bit of the image data S/P converter 22 (n=
1.2-. 12B) matches the n-th bit of the reference data S/P converter 24, -Number composition game)ENOR
The output of n becomes the value 1 (high level).

これらの−数構出用ゲー)ENORIないし128の出
力は、アンドゲートANDIないし128の一方の入力
端子に接続されている。このアントゲ−)ANDIない
し128の他方の入力端子には、基準データS/P変換
器24と同様に構成されたマスクデータS/P変換器2
6の各パラレル出力が接続されている。マスクデータS
/P変換器26には、論理演算回路20からマスクデー
タが転送され、このデータが値0のビットに関しては、
アントゲ−)ANDIないし12日の出力はマスクされ
、強制的に値0(ロウレベル)にされる。アントゲ−)
ANDIないし12日の出力は8木ずつカウント器PL
AIないし16に人力されている。
The outputs of these negative number generation games ENORI to 128 are connected to one input terminal of AND gates ANDI to 128. A mask data S/P converter 2 configured in the same manner as the reference data S/P converter 24 is connected to the other input terminal of the ANDI to 128.
6 parallel outputs are connected. Mask data S
Mask data is transferred from the logic operation circuit 20 to the /P converter 26, and for bits whose value is 0,
The output from ANDI to 12th is masked and forced to the value 0 (low level). anime)
ANDI or 12th output is 8 tree count machine PL
It is powered by AI or 16 people.

カウント器PLAIないし16は、プログラマブルロジ
ックアレイにより構成されており、8個の人力のうちハ
イレベル(fil)のビットがいくつあるかを計数し、
4ビツトのデータとして出力する。16個のカウント器
PLAIないし16からの16組合計64本の信号線は
、加算器27に人力されている。
Counters PLAI to 16 are configured by a programmable logic array, and count how many bits are at a high level (fil) among the eight inputs,
Output as 4-bit data. A total of 64 signal lines in 16 sets from the 16 counters PLAI to 16 are manually input to the adder 27.

加算器27は、4ビツトずつ16絹のデータを加算して
8ビツトの出力とするものであり、プログラマブルロジ
ックアレイにより構成されている。
The adder 27 adds 16 data of 4 bits each to produce an 8-bit output, and is constituted by a programmable logic array.

また、加算器27の内部のロジックは、加算後のデータ
が値64以下の場合、データを出力しないよう構成され
ている。従って、加算器27は一致ビットが64個以上
の場合にデータを出力し、総てのビットが一致している
場合には値128を出力する。
Further, the internal logic of the adder 27 is configured not to output data if the data after addition is less than or equal to the value 64. Therefore, the adder 27 outputs data when there are 64 or more matching bits, and outputs the value 128 when all bits match.

加算器27の出力は、既に説明したラッチ12のデータ
人力りと共に、比較器15の一方のデータ人力Aに接続
されている。ラッチ12の出力Qは、相関データ用メモ
リ1日の上位8ビツトに相関データDRとして人力され
ると共に、この比較器15の他方のデータ入力Bに接続
されている。
The output of the adder 27 is connected to one data input A of the comparator 15 together with the data output of the latch 12 described above. The output Q of the latch 12 is input as correlation data DR to the upper 8 bits of the correlation data memory for one day, and is also connected to the other data input B of the comparator 15.

この結果、比較器15では、加算器27の出力とラッチ
12の出力とが密に比較されており、加算器27の出力
の方が大きくなった時、比較出力A〉Bがアクティブハ
イとなる。比較出力A>Bは、ラッチ12のイネイブル
端子ENに接続されているので、加算器27の出力が既
にラッチ12にセットされていた(直より大きいとき、
ラッチ12に加算器27の出力するデータが新たに書き
込まれ、この値が相関データDRとして相関データメモ
リ1日に記憶される。
As a result, in the comparator 15, the output of the adder 27 and the output of the latch 12 are closely compared, and when the output of the adder 27 becomes larger, the comparison output A>B becomes active high. . Since the comparison output A>B is connected to the enable terminal EN of the latch 12, the output of the adder 27 has already been set in the latch 12 (when it is larger than
Data output from the adder 27 is newly written into the latch 12, and this value is stored as correlation data DR in the correlation data memory 1st.

尚、ラッチ12のいまひとつのラッチイネイブル端子L
Eには、水平座標カウンタ8から、−ライン中のドツト
数のカウント値が128以上になったことを示す信号が
接続されているので、水平同期信号が検出されてから1
28ドツトカウントされるまでは、加算器27の出力デ
ータがう・ソチされることはない。
In addition, another latch enable terminal L of the latch 12
Since a signal indicating that the count value of the number of dots in the - line has become 128 or more is connected to E from the horizontal coordinate counter 8, 1 after the horizontal synchronization signal is detected.
The output data of the adder 27 is not falsified until 28 dots are counted.

次に、相関データ用メモリ1日をそのデュアルポートを
介して、一方基準データS/P変換器24およびマスク
データS/P変換器26をシリアル信号により、各々ア
クセスする論理演算回路20の構成とその働きについて
説明する。論理演算回路20は、周知のCPU31.R
OM32.RAM33.シリアルI10ボート(以下S
IOと呼ぶ)34および人出力ボート35をコモンバス
36により相互に接続して構成されている。CPU31
は、入出力ボート35を介して接続された端末機2のキ
ーボードから、探索の対象とな、る基準データ等を読み
込むと共に、各水平走査線内で基準データに最もよく一
致した部位のX座標とその一致の度合とを端末機2のデ
ィスプレイに表示する。また、CPU31は、5IO3
4を介して上記両変換器24.26に必要なデータを転
送する。
Next, we will discuss the configuration of the logical operation circuit 20 which accesses the correlation data memory 1 day through its dual ports, and accesses the reference data S/P converter 24 and mask data S/P converter 26 by serial signals. I will explain its function. The logic operation circuit 20 includes a well-known CPU 31. R
OM32. RAM33. Serial I10 boat (hereinafter referred to as S
(referred to as IO) 34 and a human output boat 35 are interconnected by a common bus 36. CPU31
reads the reference data, etc. to be searched from the keyboard of the terminal device 2 connected via the input/output boat 35, and also calculates the X coordinate of the part that most closely matches the reference data within each horizontal scanning line. and the degree of matching are displayed on the display of the terminal device 2. In addition, the CPU 31 has 5IO3
4 to both converters 24, 26.

次に、本実施例の画像−数構出装置が行なう処理につい
て説明する。第3図は、論理演算回路20が行なう処理
を表すフローチャートである。図示するように、本実施
例の画像一致検出装置は、起動後、まず、相関データ表
示ルーチンのステップ100を実行し、端末s2を介し
て基準データを人力する処理を行ない、更にマスクデー
タを同様に端末機2から人力する(ステップ110)。
Next, the processing performed by the image-number construction apparatus of this embodiment will be explained. FIG. 3 is a flowchart showing the processing performed by the logical operation circuit 20. As shown in the figure, after startup, the image matching detection device of this embodiment first executes step 100 of the correlation data display routine, performs a process of manually inputting reference data via the terminal s2, and further displays mask data in the same manner. manually from the terminal 2 (step 110).

基準データは、例えば、第4図に示すように、最終的な
マツチングパターンの代表値として選択され、−ライン
中のパターンのドツト構成として与えられる。その長さ
は、本実施例では最長128ビツトとしたが、必要なら
ば相関器10内部のビット長を大きくして対応すれば良
い。CPU31は、入力された基準データを画像の存在
する部分は値1、存在しない部分は値0のデータとして
、RAM33の所定のエリアに記憶する。その後、CP
U31は、人力された基準データ、マスクデータを5I
O34を介してをそれぞれの変換器24.26に転送す
る処理を行なう(ステップ120)。
The reference data, for example, as shown in FIG. 4, is selected as a representative value of the final matching pattern and is given as a dot configuration of the pattern in the - line. In this embodiment, the maximum length is 128 bits, but if necessary, the bit length inside the correlator 10 may be increased. The CPU 31 stores the input reference data in a predetermined area of the RAM 33 as data with a value of 1 for the part where the image exists and a value of 0 for the part where the image does not exist. After that, C.P.
U31 uses human-generated standard data and mask data as 5I.
034 to the respective converters 24, 26 (step 120).

この結果、基準データS/P変換器24.マスクデータ
S/P変換器26には、基準データ、マスクデータが設
定され、テレビカメラ1が撮像した2次元画像の走査に
従って、画像データと基準データとの一致ビットの検出
・計数が開始される。
As a result, the reference data S/P converter 24. Reference data and mask data are set in the mask data S/P converter 26, and as the two-dimensional image captured by the television camera 1 is scanned, detection and counting of matching bits between the image data and the reference data is started. .

一致ビット数の計測は、次のように行なわれる。The number of matching bits is measured as follows.

尚、第5図は、この検出の様子を示す説明図である。Incidentally, FIG. 5 is an explanatory diagram showing the state of this detection.

(1) 水平走査線の走査が開始されると、垂直座標カ
ウンタ7が1だけカウントアツプされ、水平座標カウン
タ8とラッチ12とがリセットされる。
(1) When scanning of the horizontal scanning line is started, the vertical coordinate counter 7 is incremented by 1, and the horizontal coordinate counter 8 and latch 12 are reset.

(2) 画像データ抽出回路5によって抽出され二値化
回路6によって二値化された画像データは、1ラインず
つ相関機10の画像データS/P変換器22に人力され
る。上述した相関器10は、マスクデータによりマスク
された範囲内で、画像データと基準データとの一致する
ビットの数を検出し、この一致データ(第5図参照)を
相関器10の加算器27から出力する。
(2) The image data extracted by the image data extraction circuit 5 and binarized by the binarization circuit 6 is inputted line by line to the image data S/P converter 22 of the correlator 10. The above-mentioned correlator 10 detects the number of matching bits between the image data and the reference data within the range masked by the mask data, and applies this matching data (see FIG. 5) to the adder 27 of the correlator 10. Output from.

(3) 加算器27の出力する一致データのうちの最大
値がラッチ12にセットされて相関データDRとされ、
そのときの水平座標カウンタ8のカウント値(座標デー
タDX)と共に、相関データ用メモリ1日に記憶される
。記憶されるアドレスは、垂直座標カウンタ7のカウン
ト値、即ち2次元画像の垂直方向のラインの番号に対応
したアドレスである。
(3) The maximum value of the matching data outputted by the adder 27 is set in the latch 12 as correlation data DR,
Together with the count value of the horizontal coordinate counter 8 at that time (coordinate data DX), it is stored in the correlation data memory for one day. The stored address is the count value of the vertical coordinate counter 7, ie, the address corresponding to the number of the vertical line of the two-dimensional image.

(4) 上述した処理が、2次元画像の最後まで繰り返
しく495回)行なわれる。この間、論理演算回路20
は処理には同等関与せず、−数構出の終了まで待機する
(第3図ステップ130)。
(4) The above-described processing is repeated 495 times until the end of the two-dimensional image. During this time, the logic operation circuit 20
is not equally involved in the processing, and waits until the completion of the -number output (step 130 in FIG. 3).

その後、論理演算回路20は、相関データメモリ1日か
ら相関データDRとこれに対応した座標データDXとを
読み出しくステップ140)、これらを端末機2のディ
スプレイ上に表示する(ステップ140)。
Thereafter, the logical operation circuit 20 reads out the correlation data DR and the corresponding coordinate data DX from the correlation data memory 1 (step 140), and displays them on the display of the terminal 2 (step 140).

以上の処理により、2次元画像の1ライン中において基
準データと最も良い相関を示す部分(但し本実施例では
64ビット以上の相関を示す部分)の座標データDXと
、その相関の度合を示す相関データDRとが、端末機2
上に表示される。従って、2次元画像の一フレームの走
査に要する極めて短い時間で、基準パターンに対応して
定められた基準データと良い相関を示す部分を、2次元
画像中から検出することができる。この結果、良い相関
を示した部分を中心にその後の画像処理を行なうことが
でき、パターンの認識を極めて容易かつ短時間に行なう
ことができる。
Through the above processing, the coordinate data DX of the part showing the best correlation with the reference data in one line of the two-dimensional image (however, in this example, the part showing the correlation of 64 bits or more) and the correlation indicating the degree of correlation are obtained. Data DR is terminal 2
displayed above. Therefore, in an extremely short time required to scan one frame of a two-dimensional image, a portion showing a good correlation with the reference data determined corresponding to the reference pattern can be detected from the two-dimensional image. As a result, subsequent image processing can be performed mainly on parts that show good correlation, and pattern recognition can be performed extremely easily and in a short time.

また、本実施例の画像一致検出装置は、ハードウェアの
局所的な最適化が図られているので、高速性を実現しな
がら、構成も極めて簡略なものとなっている。
Furthermore, since the image matching detection device of this embodiment has locally optimized hardware, the configuration is extremely simple while achieving high speed.

尚、本実施例では、画像の一致検出後の処理については
特に説明しないが、工作機械の位置決めや部品の認識・
選択等に応用すれば、従来極めて困難であったリアルタ
イムでのパターンの検索が可能になることから、作業の
高速化を図ることができる等、この画像一致検出装置の
波及的効果は極めて大きい。
In this example, the processing after image matching detection is not particularly explained, but it is used for positioning machine tools, recognizing parts, etc.
If applied to selection, etc., it will become possible to search for patterns in real time, which was extremely difficult in the past, thereby speeding up work, and the ripple effects of this image matching detection device will be extremely large.

以上本発明の一実施例について説明したが、本発明はこ
うした実施例に同等限定されるものではなく、例えば一
旦画像メモリに書き込まれた画像データに対して処理を
行なう構成や基準データを少しずつ回転させながら一致
ビットの計数を行ない傾いたパターンの検出を行なう構
成(画像データを回転させる方法)など、本発明の要旨
を逸脱しない範囲において、種々なる態様で実施し得る
ことは勿論である。
Although one embodiment of the present invention has been described above, the present invention is not equally limited to such an embodiment. It goes without saying that the present invention can be implemented in various ways without departing from the spirit of the present invention, such as a configuration in which a tilted pattern is detected by counting matching bits while rotating the image data (method of rotating image data).

え匪辺効釆 以上詳述したように、本発明の画像一致検出装置によれ
ば、簡略な装置・構成によりながら、2次元画像の各ラ
イン中において基準データとよく一致する部位の位置座
標とその一致ビット数とを、極めて高速に検出し記憶す
ることができるという優れた効果を奏する。この結果、
画像の特徴を好適に表す基準データを用いれば、画像に
対する処理を、極めて迅速に行なうことができ、画像認
識の作業性を格段に改善することができる。また、装置
・構成がいたずらに複雑化することがないので、製造工
数・コストの低減を図ることができ、更には、信頼性・
メンテナンス性の向上を図ることができる。
As described in detail above, according to the image matching detection device of the present invention, although the device and configuration are simple, it is possible to determine the positional coordinates of a region that closely matches the reference data in each line of a two-dimensional image. This provides an excellent effect in that the number of matching bits can be detected and stored at extremely high speed. As a result,
By using reference data that suitably represents the characteristics of an image, the image can be processed extremely quickly, and the workability of image recognition can be significantly improved. In addition, since the equipment and configuration do not become unnecessarily complicated, manufacturing man-hours and costs can be reduced, and reliability and
It is possible to improve maintainability.

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

第1図は本発明の基本的構成を例示するブロック図、第
2図は本発明一実施例としての画像一致検出装置の概略
構成図、第3図は実施例の装置における論理演算回路2
0が行なう処理を示すフローチャート、第4図はパター
ンマツチングのための基準データの選択の一例を示す説
明図、第5図は相関データが得られるまでの処理の様子
を例示する説明図、である。 1 ・・・ テレビカメラ 2 ・・・ 端末機 3 ・・・ 同期分離回路 5 ・・・ 画像データ抽出回路 6 ・・・ 二値化回路 7 ・・・ 垂直座標カウンタ 8 ・・・ 水平座標カウンタ 10 ・・・ 相関器 12 ・・・ ラッチ 15 ・・・ 比較器 1日 ・・・ 相関データ用メモリ 20 ・・・ 論理演算回路 22 ・・・ 画像データS/P変換器24 ・・・ 
基準データS/P変換器26 ・・・ マスクデータS
/P変換器27 ・・・ 加算器 ANDIないしAND 128 ・・−アンドゲート ENOR1ないし128 ・・・ 排他的論理和ゲート(−数構 出用ゲート)
FIG. 1 is a block diagram illustrating the basic configuration of the present invention, FIG. 2 is a schematic configuration diagram of an image matching detection device as an embodiment of the present invention, and FIG. 3 is a logic operation circuit 2 in the device of the embodiment.
FIG. 4 is an explanatory diagram showing an example of selection of reference data for pattern matching, and FIG. 5 is an explanatory diagram illustrating the process until correlation data is obtained. be. 1 ... Television camera 2 ... Terminal 3 ... Synchronization separation circuit 5 ... Image data extraction circuit 6 ... Binarization circuit 7 ... Vertical coordinate counter 8 ... Horizontal coordinate counter 10 ... Correlator 12 ... Latch 15 ... Comparator 1 day ... Correlation data memory 20 ... Logical operation circuit 22 ... Image data S/P converter 24 ...
Reference data S/P converter 26...Mask data S
/P converter 27 ... Adder ANDI to AND 128 ... -AND gate ENOR1 to 128 ... Exclusive OR gate (gate for - number construction)

Claims (1)

【特許請求の範囲】 2次元画像の二値化された画像データを基準データと比
較し、該画像データのうち、該基準データと最もよく一
致する部位の位置座標を検出する画像一致検出装置てあ
って、 前記2次元画像の所定方向への一ラインの走査において
、該一走査ライン中の連続する所定ビットの画像データ
を順次パラレルデータとして出力する画像データ出力回
路と、 該読み出される画像データの部位を特定する位置座標を
出力する座標出力回路と、 予め定められた所定ビット数の基準データをパラレルデ
ータとして出力する基準データ出力回路と、 前記出力された画像データと前記出力された基準データ
とを比較して一致するビットを検出する一致ビット検出
回路と、 該一致したビット数を計測する一致ビット数計測回路と
、 各ライン中での前記計測された一致ビット数のうち、少
なくとも最大値を、該最大値を与える画像データの部位
の位置座標と共に各々記憶する一致位置記憶回路と を備えた画像一致検出装置。
[Claims] An image matching detection device that compares binarized image data of a two-dimensional image with reference data and detects the positional coordinates of a part of the image data that most closely matches the reference data. an image data output circuit that sequentially outputs image data of consecutive predetermined bits in the one scanning line as parallel data when scanning one line in a predetermined direction of the two-dimensional image; a coordinate output circuit that outputs position coordinates for specifying a body part; a reference data output circuit that outputs reference data of a predetermined number of bits as parallel data; and the output image data and the output reference data. a matching bit detection circuit that compares and detects matching bits; a matching bit number measuring circuit that measures the number of matching bits; and a matching bit number measuring circuit that measures the number of matching bits in each line. , and a matching position storage circuit that stores the positional coordinates of the portion of the image data giving the maximum value.
JP6449887A 1987-03-19 1987-03-19 Image coincidence detector Pending JPS63229579A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6449887A JPS63229579A (en) 1987-03-19 1987-03-19 Image coincidence detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6449887A JPS63229579A (en) 1987-03-19 1987-03-19 Image coincidence detector

Publications (1)

Publication Number Publication Date
JPS63229579A true JPS63229579A (en) 1988-09-26

Family

ID=13259926

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6449887A Pending JPS63229579A (en) 1987-03-19 1987-03-19 Image coincidence detector

Country Status (1)

Country Link
JP (1) JPS63229579A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56129988A (en) * 1980-03-13 1981-10-12 Sanyo Electric Co Ltd Picture processing method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56129988A (en) * 1980-03-13 1981-10-12 Sanyo Electric Co Ltd Picture processing method

Similar Documents

Publication Publication Date Title
US4703512A (en) Pattern outline tracking method and apparatus
JPS6357831B2 (en)
TWI267797B (en) Method for recognizing objects in an image without recording the image in its entirety
US5521987A (en) Image processing method and apparatus employing gray scale images having fewer bits per pixel and gray scale image restoration using small areas of an image window
JPS62254282A (en) Method and apparatus for separating overlapped pattern
JPS63229579A (en) Image coincidence detector
JPH0130180B2 (en)
JP4221534B2 (en) Feature extraction method for binary image
JPH0664614B2 (en) Hierarchical structured template matching method
JP2702441B2 (en) Wafer identification character recognition system
JP2801602B2 (en) Word recognition device
JPH08194825A (en) Outline information extracting device
JPH04112276A (en) Binary picture contour line chain encoding device
JPH06223191A (en) Feature extracting method and discriminating method for image
JP3835097B2 (en) Specific pattern detection apparatus and method
JP2838556B2 (en) Image processing device
JPH07182447A (en) Character string reading method and device therefor
JP2620094B2 (en) How to measure figure patterns
JP3021708B2 (en) Line image analyzer
JPH0146912B2 (en)
JPH02257006A (en) Shape discriminating device
JPS63254578A (en) Pattern recognition device
JPH053627B2 (en)
JPS60101677A (en) Multicolored line graphic reading device
KR20000056676A (en) A parallel thinning method using weighted value