JPH0581433A - Method and device for pattern matching - Google Patents

Method and device for pattern matching

Info

Publication number
JPH0581433A
JPH0581433A JP3268630A JP26863091A JPH0581433A JP H0581433 A JPH0581433 A JP H0581433A JP 3268630 A JP3268630 A JP 3268630A JP 26863091 A JP26863091 A JP 26863091A JP H0581433 A JPH0581433 A JP H0581433A
Authority
JP
Japan
Prior art keywords
processing
image
pattern matching
processors
processor
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
JP3268630A
Other languages
Japanese (ja)
Other versions
JP3146232B2 (en
Inventor
Masashi Yamaguchi
昌志 山口
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.)
Yamaha Motor Co Ltd
Original Assignee
Yamaha Motor Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yamaha Motor Co Ltd filed Critical Yamaha Motor Co Ltd
Priority to JP26863091A priority Critical patent/JP3146232B2/en
Publication of JPH0581433A publication Critical patent/JPH0581433A/en
Application granted granted Critical
Publication of JP3146232B2 publication Critical patent/JP3146232B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)
  • Complex Calculations (AREA)

Abstract

PURPOSE:To provide the method and device for pattern matching which shorten the processing time to realize the quickness. CONSTITUTION:The parallel processing method where a processing picture is divided into plural processing areas and picture processings of individual processing areas are performed by processors independent of one another and the SSDA method where the processing is aborted at the time when the degree of mismatching of the object picture to a template picture in the picture processing in each processing area exceeds a prescribed threshold are adopted together, and the processing picture is so divided that processing areas of respective processors in the former parallel processing method are uniform with respect to position. Consequently, the processing time in the SSDA method is not ununiform among processors, and the processing time is shortened to increase the processing speed. An image memory 11, and address generating part 12, plural processors #1 to #4. a data memory 13, a minimum value detecting part 14, and a control part 15 are included to constitute a pattern matching device.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、読取り対象画像がテン
プレート画像と一致するマッチング領域を求めるパター
ン・マッチング法及び装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a pattern matching method and apparatus for finding a matching area where an image to be read matches a template image.

【0002】[0002]

【従来の技術】画像処理における高速化の手法の1つと
して、並列処理法が知られている。この並列処理法は、
図12に示すような処理画像を複数(図示例では、4
つ)の処理領域に分割し、各処理領域毎に別々のプロセ
ッサで処理することによって高速化を図る方法であっ
て、プロセッサ数(処理領域数)をnとすると、処理時
間は1/n倍に短縮される。
2. Description of the Related Art A parallel processing method is known as one of methods for speeding up image processing. This parallel processing method is
A plurality of processed images as shown in FIG.
This is a method of increasing the processing speed by dividing each processing area into two processing areas and processing each processing area by a separate processor. When the number of processors (the number of processing areas) is n, the processing time is 1 / n times. Is shortened to.

【0003】一方、パターン・マッチング法において
は、処理の高速化を図る手法としてSSDA法と呼ばれ
る方法が知られている。この方法は、図13に示すよう
に、対象画像のテンプレート画像に対するミス・マッチ
度の計算過程でミス・マッチ度が予め設定された閾値を
超えた場合には、その場所は最早マッチングポイントで
はないものと判断し、そこで処理を打切ることによって
高速化を図る方法である。
On the other hand, in the pattern matching method, a method called SSDA method is known as a method for increasing the processing speed. In this method, as shown in FIG. 13, when the mismatch degree exceeds a preset threshold value in the process of calculating the mismatch degree of the target image with respect to the template image, the place is no longer the matching point. This is a method of increasing the speed by deciding that it is the case and stopping the processing there.

【0004】[0004]

【発明が解決しようとする課題】ところで、パターン・
マッチング法において高速化を実現するために前記並列
処理法とSSDA法を組み合わせて用いることが考えら
れる。
[Problems to be Solved by the Invention] By the way,
It is conceivable to use the parallel processing method and the SSDA method in combination in order to realize high speed in the matching method.

【0005】しかしながら、図13から明らかなよう
に、処理領域によって処理時間が異なるため、例えば図
12に示すように処理画像を4分割した場合には、並列
処理による各プロセッサ#1,#2,#3,#4の処理
時間が図14に示すように異なり、全体の処理時間は最
も遅いプロセッサ#2の処理時間となってしまう。この
ため、他のプロセッサ#1,#3,#4はロスタイムを
持つこととなり、並列処理法のメリットを十分活かすこ
とができない。
However, as is clear from FIG. 13, since the processing time varies depending on the processing area, when the processed image is divided into four as shown in FIG. The processing times of # 3 and # 4 are different as shown in FIG. 14, and the overall processing time is the processing time of the slowest processor # 2. Therefore, the other processors # 1, # 3, and # 4 have a loss time, and the merits of the parallel processing method cannot be fully utilized.

【0006】本発明は上記問題に鑑みてなされたもの
で、その目的とする処は、処理時間を短縮して高速化を
実現することができるパターン・マッチング法及び装置
を提供することにある。
The present invention has been made in view of the above problems, and an object of the present invention is to provide a pattern matching method and apparatus capable of shortening the processing time and realizing high speed.

【0007】[0007]

【課題を解決するための手段】上記目的を達成すべく本
発明は、読取り対象画像がテンプレート画像と一致する
マッチング領域を求めるパターン・マッチング法におい
て、処理画像を複数の処理領域に分割し、各処理領域毎
に別々のプロセッサで画像処理する並列処理法と、各処
理領域での画像処理において対象画像のテンプレート画
像に対するミス・マッチ度が所定の閾値を超えると処理
を打切るSSDA法を併用するとともに、前記並列処理
法における各プロセッサの処理領域に位置的な片寄りが
ないように処理画像を分割するようにしたことを特徴と
する。そして、本方法において、読取り対象画像とテン
プレート画像にアダマール変換を施し、両画像のアダマ
ール係数を用いて両画像のミス・マッチ度を求める方法
を採用し、前記並列処理法において各処理領域の1ブロ
ック目のみの処理によってそのブロックのミス・マッチ
度を求め、このミス・マッチ度が所定の閾値以下となる
候補点を求め、求められた候補点を各プロセッサに対し
て振り分けることも特徴とする。
In order to achieve the above object, the present invention is a pattern matching method for obtaining a matching area in which an image to be read matches a template image, in which the processing image is divided into a plurality of processing areas. A parallel processing method in which image processing is performed by a separate processor for each processing area and an SSDA method in which image processing in each processing area terminates processing when the degree of mismatch of the target image with the template image exceeds a predetermined threshold value are used together. In addition, the processing image is divided so that there is no positional deviation in the processing area of each processor in the parallel processing method. Then, in this method, the image to be read and the template image are subjected to Hadamard transform, and the degree of mismatch between both images is obtained using the Hadamard coefficient of both images. The feature is that the mismatch degree of the block is obtained by processing only the block, the candidate points whose mismatch degree is below a predetermined threshold value are obtained, and the obtained candidate points are distributed to each processor. ..

【0008】又、本発明は、読取られた対象画像を保管
するイメージメモリと、処理画像上にアドレスを発生さ
せるアドレス発生部と、複数に分割された処理領域の各
々を独立に画像処理する複数のプロセッサと、各プロセ
ッサによる画像処理によって得られたミス・マッチ度と
アドレスのデータを保管するデータメモリと、ミス・マ
ッチ度の最小値を検出する最小値検出部と、これらイメ
ージメモリ、アドレス発生部、プロセッサ、データメモ
リ及び最小値検出部の動作を制御する制御部を含んでパ
ターン・マッチング装置を構成したことを特徴とする。
Further, according to the present invention, an image memory for storing the read target image, an address generating unit for generating an address on the processed image, and a plurality of image processing units for independently processing each of the divided processing regions. Processor, a data memory that stores the data of the mismatch degree and address obtained by the image processing by each processor, a minimum value detection unit that detects the minimum value of the mismatch degree, these image memory, address generation It is characterized in that the pattern matching device is configured to include a control unit that controls the operations of the unit, the processor, the data memory, and the minimum value detection unit.

【0009】[0009]

【作用】本発明によれば、パターン・マッチング法に並
列処理法とSSDA法が併用され、各プロセッサでの処
理においては、各プロセッサが処理すべき領域が処理画
像全体に対して位置的に片寄らないよう振り分けられる
ため、各プロセッサでのSSDA法による処理時間にバ
ラツキが生じず、ロスタイムがなくなって効率的な並列
処理がなされ、この結果、処理時間が短縮されて高速化
が実現される。
According to the present invention, the parallel processing method and the SSDA method are used in combination with the pattern matching method, and in the processing by each processor, the area to be processed by each processor is positionally offset with respect to the entire processed image. Since there is no variation in the processing time according to the SSDA method among the processors, there is no loss time and efficient parallel processing is performed. As a result, the processing time is shortened and high speed is realized.

【0010】[0010]

【実施例】以下に本発明の第1実施例を添付図面に基づ
いて説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A first embodiment of the present invention will be described below with reference to the accompanying drawings.

【0011】図1は第1実施例に係るパターン・マッチ
ング装置の構成を示すブロック図である。該パターン・
マッチング装置は、読取られた対象画像を保管するイメ
ージメモリ11と、処理画像上にアドレスを発生させる
アドレス発生部12と、複数に分割された処理領域の各
々を独立に画像処理する複数のプロセッサ#1,#2,
#3,#4と、各プロセッサ#1〜#4による画像処理
によって得られたミス・マッチ度とアドレスのデータを
保管するデータメモリ13と、ミス・マッチ度の最小値
を検出する最小値検出部14と、これらイメージメモリ
11、アドレス発生部12、プロセッサ#1〜#4、デ
ータメモリ13及び最小値検出部14の動作を制御する
制御部15を含んで構成されている。
FIG. 1 is a block diagram showing the arrangement of a pattern matching apparatus according to the first embodiment. The pattern
The matching apparatus includes an image memory 11 for storing a read target image, an address generator 12 for generating an address on a processed image, and a plurality of processors # for independently performing image processing on each of a plurality of divided processing areas. 1, # 2
# 3, # 4, the data memory 13 for storing the data of the mismatch degree and the address obtained by the image processing by each of the processors # 1 to # 4, and the minimum value detection for detecting the minimum value of the mismatch degree. It is configured to include a unit 14 and a control unit 15 that controls the operations of the image memory 11, the address generation unit 12, the processors # 1 to # 4, the data memory 13, and the minimum value detection unit 14.

【0012】以下に上記パターン・マッチング装置を用
いて実施される本発明に係るパターン・マッチング法を
図2乃至図4に基づいて説明する。尚、図2は前記制御
部15による処理手順を示すフローチャート、図3は各
プロセッサ#1〜#4での処理手順を示すフローチャー
ト、図4(a),(b),(c),(d)は処理画像の
分割の態様を示す図である。
The pattern matching method according to the present invention, which is carried out by using the pattern matching device, will be described below with reference to FIGS. 2 to 4. 2 is a flowchart showing a processing procedure by the control unit 15, FIG. 3 is a flowchart showing a processing procedure in each of the processors # 1 to # 4, and FIGS. 4 (a), 4 (b), 4 (c) and 4 (d). [Fig. 4] is a diagram illustrating a mode of dividing a processed image.

【0013】本実施例に係るパターン・マッチング法に
おいては、処理画像が図4(a)に示すように乱数1,
2,3,4によって分割され、図中、乱数1,2,3,
4で示される領域は各々プロセッサ#1,#2,#3,
#4によって処理される。
In the pattern matching method according to this embodiment, the processed image is a random number 1 as shown in FIG.
2, 3, 4, and the random numbers 1, 2, 3,
The areas indicated by 4 are processors # 1, # 2, # 3, respectively.
It is processed by # 4.

【0014】即ち、先ず処理画像について乱数1〜4に
よるアドレスが発生したか否かがチェックされ(図2の
ステップ1)、アドレスが処理画像全体について発生し
ていなければ、プロセッサ#1〜#4のうちで処理をし
ていないものがあるか否かがチェックされ(図2のステ
ップ2)、処理をしていないプロセッサがあれば、乱数
1〜4によるアドレスを発生させ(図2のステップ
3)、発生したアドレスにダブリがないことを確認した
後(図2のステップ4)、処理していないプロセッサに
ついて対応する領域について処理を開始させる(図2の
ステップ5)。
That is, it is first checked whether or not an address by random numbers 1 to 4 has occurred in the processed image (step 1 in FIG. 2), and if the address does not occur in the entire processed image, the processors # 1 to # 4. It is checked whether any of them are not processed (step 2 in FIG. 2), and if there is a processor that is not processed, an address based on random numbers 1 to 4 is generated (step 3 in FIG. 2). ) Then, after confirming that the generated address has no duplication (step 4 in FIG. 2), the processing is started for the corresponding area in the unprocessed processor (step 5 in FIG. 2).

【0015】そして、処理画像全体についてアドレスが
発生し、且つ全てのプロセッサ#1〜#4が処理を開始
すると、全てのプロセッサ#1〜#4での処理が終了し
たか否かがチェックされる(図2のステップ6)。ここ
で、各プロセッサ#1〜#4での画像処理を図3に従っ
て説明する。
When an address is generated for the entire processed image and all the processors # 1 to # 4 start the processing, it is checked whether the processing in all the processors # 1 to # 4 is completed. (Step 6 in FIG. 2). Here, the image processing in each of the processors # 1 to # 4 will be described with reference to FIG.

【0016】即ち、従前に求められていたミス・マッチ
度がクリアされ(図3のステップ1)、テンプレート画
像全体について処理が終了したか否かがチェックされ
(図3のステップ2)、終了していなければ、処理する
画素を更新してミス・マッチ度の差分値の絶対値が求め
られ(図3のステップ3)、その差分値がミス・マッチ
度に加算されて新してミス・マッチ度が算出される(図
3のステップ4)。そして、SSDA法によって、この
算出されたミス・マッチ度が予め設定された閾値より大
きいか否かがチェックされ(図3のステップ5)、ミス
・マッチ度が閾値を超えれば、その時点でその場所は最
早マッチングポイントではないものと判断し、処理は直
ちに打切られる(図3のステップ7)。これに対し、ミ
ス・マッチ度が閾値より小さい間はテンプレート画像全
体について処理が終了するまで以上の一連の処理(図3
のステップ2〜5の処理)が繰り返される。
That is, the previously determined mismatch degree is cleared (step 1 in FIG. 3), it is checked whether or not the processing has been completed for the entire template image (step 2 in FIG. 3), and the processing is completed. If not, the pixel to be processed is updated to obtain the absolute value of the difference value of the mismatch degree (step 3 in FIG. 3), and the difference value is added to the mismatch degree and a new mismatch is obtained. The degree is calculated (step 4 in FIG. 3). Then, by the SSDA method, it is checked whether or not the calculated mismatch degree is larger than a preset threshold value (step 5 in FIG. 3), and if the mismatch degree exceeds the threshold value, it is determined at that time. It is determined that the place is no longer the matching point, and the process is immediately terminated (step 7 in FIG. 3). On the other hand, while the mismatch degree is smaller than the threshold value, the above series of processing is performed until the processing is completed for the entire template image (see FIG. 3).
Steps 2 to 5) are repeated.

【0017】そして、テンプレート画像全体について処
理が終了すると、求められたミス・マッチ度とアドレス
が図1に示すデータメモリ13に書き込まれ(図3のス
テップ6)、各プロセッサ#1〜#4での処理が終了す
る(図3のステップ7)。
When the processing is completed for the entire template image, the obtained mismatch degree and address are written in the data memory 13 shown in FIG. 1 (step 6 in FIG. 3), and each processor # 1 to # 4. Processing ends (step 7 in FIG. 3).

【0018】以上の各プロセッサ#1〜#4での処理に
おいては、各プロセッサ#1〜#4が処理すべき領域は
図4(a)に示すように乱数1〜4によって割り当てら
れ、これらは処理画像全体に対して位置的な片寄りを生
じないため、各プロセッサ#1〜#4でのSSDA法に
よる処理時間にバラツキが生じず、ロスタイムがなくな
って効率的な並列処理がなされる。
In the above processing by each of the processors # 1 to # 4, the areas to be processed by each of the processors # 1 to # 4 are assigned by random numbers 1 to 4 as shown in FIG. Since there is no positional deviation with respect to the entire processed image, there is no variation in the processing time according to the SSDA method in each of the processors # 1 to # 4, the loss time is eliminated, and efficient parallel processing is performed.

【0019】而して、全てのプロセッサ#1〜#4での
上記処理が終了すると、図1に示す最小値検出部14に
よってミス・マッチ度の最小値が検出され、その最小値
を示す位置がマッチングポイントとされて(図2のステ
ップ7)一連のパターン・マッチングの処理が終了する
(図2のステップ8)。
When the above processes in all the processors # 1 to # 4 are completed, the minimum value of the mismatch degree is detected by the minimum value detecting unit 14 shown in FIG. 1, and the position showing the minimum value is detected. Is set as a matching point (step 7 in FIG. 2), and a series of pattern matching processing ends (step 8 in FIG. 2).

【0020】尚、各プロセッサ#1〜#4の処理領域が
処理画像全体に対して位置的な片寄りを生じないような
分割法としては、図4(b)に示すように縦に細かく分
割する方法、図4(c)に示すように横に細かく分割す
る方法、図4(d)に示すように斜めに細かく分割する
方法等がある(図中、数字1,2,3,4はそれぞれプ
ロセッサ#1,#2,#3,#4での処理領域を示
す)。
As a dividing method in which the processing areas of the processors # 1 to # 4 do not have a positional deviation with respect to the entire processed image, a fine division is made vertically as shown in FIG. 4 (b). 4C, a method of laterally finely dividing it as shown in FIG. 4C, and a method of diagonally finely dividing as shown in FIG. 4D. The processing areas in the processors # 1, # 2, # 3, and # 4 are shown).

【0021】次に、本発明の第2実施例を添付図面に基
づいて説明する。
Next, a second embodiment of the present invention will be described with reference to the accompanying drawings.

【0022】図5は第2実施例に係るパターン・マッチ
ング装置の構成を示すブロック図であり、該装置は図1
に示した前記第1実施例に係る装置に候補リスト記憶部
16を付加したものであって、他の構成は第1実施例に
係る装置のそれと同様である。
FIG. 5 is a block diagram showing the structure of a pattern matching apparatus according to the second embodiment. The apparatus shown in FIG.
The candidate list storage unit 16 is added to the device according to the first embodiment shown in FIG. 3, and the other configuration is the same as that of the device according to the first embodiment.

【0023】以下に上記パターン・マッチング装置を用
いて実施されるパターン・マッチング法を図6乃至図1
1に基づいて説明する。尚、図6は1次マッチングの処
理手順を示すフローチャート、図7は処理画像上のクラ
スタの分布を示す図、図8は図7のA部(クラスタ1)
における候補点の振り分けを示す図、図9は簡便な候補
点の振り分け方法を示す図、図10及び図11は2次マ
ッチングの処理手順を示すフローチャートである。
A pattern matching method executed by using the above pattern matching apparatus will be described below with reference to FIGS.
It will be described based on 1. 6 is a flowchart showing the processing procedure of the primary matching, FIG. 7 is a diagram showing the distribution of clusters on the processed image, and FIG. 8 is a portion A (cluster 1) of FIG.
FIG. 9 is a diagram showing the distribution of candidate points in FIG. 9, FIG. 9 is a diagram showing a simple distribution method of candidate points, and FIGS. 10 and 11 are flowcharts showing the processing procedure of secondary matching.

【0024】而して、本実施例に係るパターン・マッチ
ング法は、読取り対象画像とテンプレート画像にアダマ
ール変換を施し、両画像のアダマール係数を用いて両画
像のミス・マッチ度を求める方法(詳細は特開平2−8
3786号公報参照)を採用している。
In the pattern matching method according to this embodiment, the image to be read and the template image are subjected to Hadamard transformation, and the Hadamard coefficient of both images is used to obtain the degree of mismatch between the images (details). Is Japanese Patent Laid-Open No. 2-8
(See Japanese Patent No. 3786).

【0025】ところで、アダマール変換を用いた場合、
位置(m,n)におけるアダマール係数はこの位置
(m,n)に連続する位置(m−1,n)での値を用い
ると計算量が6/15に削減される。つまり、或るアド
レスブロックのアダマール係数は、アドレスが連続する
ブロックのアダマール係数を利用して高速に求めること
ができる。
By the way, when the Hadamard transform is used,
For the Hadamard coefficient at the position (m, n), the calculation amount is reduced to 6/15 by using the value at the position (m-1, n) continuous to the position (m, n). That is, the Hadamard coefficient of a certain address block can be obtained at high speed by using the Hadamard coefficient of a block having consecutive addresses.

【0026】ところが、SSDA法を適用すると、2プ
ロック目以降はアドレスが不連続となる可能性があり、
前述のメリットを活かすことができない。そこで、本実
施例では、処理を次の1次マッチングと2次マッチング
の2ステップに分けて効率的な並列処理を行なうように
している。 (1)1次マッチング 本手法では、前記第1実施例と同様に処理画像が複数
(4つ)の処理領域に分割され、各処理領域毎に異なる
プロセッサ#1〜#4でアダマール変換を用いた並列処
理がなされる。但し、ここではテンプレート画像全体に
対する処理は行なわれず、1ブロック目のみの処理が行
なわれる(図6のステップ1〜3)。
However, if the SSDA method is applied, the addresses may become discontinuous after the second block.
It is not possible to take advantage of the above merits. Therefore, in this embodiment, the processing is divided into the following two steps of the primary matching and the secondary matching to perform efficient parallel processing. (1) Primary Matching In this method, the processed image is divided into a plurality of (four) processing areas as in the first embodiment, and Hadamard transform is applied by different processors # 1 to # 4 for each processing area. The parallel processing was done. However, here, the process for the entire template image is not performed, and the process for only the first block is performed (steps 1 to 3 in FIG. 6).

【0027】そして、1ブロック目の処理によって算出
されたミス・マッチ度が予め設定された閾値と比較され
(図6のステップ4)、ミス・マッチ度が閾値より小さ
ければ、そのミス・マッチ度とアドレスが候補点として
候補リスト記憶部16に書き込まれ(図6のステップ
5)、処理領域全体について以上の処理がなされると、
1次マッチングの処理が終了する(図6のステップ
6)。
The mismatch degree calculated by the process of the first block is compared with a preset threshold value (step 4 in FIG. 6). If the mismatch degree is smaller than the threshold value, the mismatch degree is determined. And the address are written in the candidate list storage unit 16 as candidate points (step 5 in FIG. 6), and the above processing is performed on the entire processing area,
The primary matching process ends (step 6 in FIG. 6).

【0028】以上のように、1次マッチングにおいては
最初の1ブロック目のみの処理がなされるだけであり、
SSDA法による処理の打切りがなく、しかも処理アド
レスが連続しているため、各プロセッサ#1〜#4での
処理時間が等しくなり、且つ短縮される。 (2)2次マッチング 前記1次マッチングによって図7に示す候補点群(以
下、クラスタ1,2,3と称す)が求められるが、これ
らのクラスタ1,2,3は処理画像全体に一様に分布す
るのではなく、幾つか散在するように分布する。そし
て、各クラスタ1〜3は1つのパターン(図7に示す破
線にて囲まれる領域)に対応した候補点となるため、S
SDA法による打切りブロック数は各クラスタ1〜3内
では略同程度となる。従って、各プロセッサ#1〜#4
に対する候補点の振り分けを図8に示すように規則的に
行なえば、各プロセッサ#1〜#4での処理時間が略等
しくなり、効率的な並列処理を行なうことができる。
尚、図8において、,,,はそれぞれプロセッ
サ#1〜#4によって処理されるべき候補点を示す。
As described above, only the first block is processed in the primary matching,
Since the processing by the SSDA method is not terminated and the processing addresses are continuous, the processing time in each of the processors # 1 to # 4 becomes equal and shortened. (2) Secondary Matching The candidate point group (hereinafter, referred to as clusters 1, 2, 3) shown in FIG. 7 is obtained by the primary matching, and these clusters 1, 2, 3 are uniform over the entire processed image. Instead of being distributed in several areas, it is distributed in a scattered manner. Since each cluster 1 to 3 is a candidate point corresponding to one pattern (the area surrounded by the broken line shown in FIG. 7), S
The number of cut-off blocks by the SDA method is approximately the same in each of the clusters 1 to 3. Therefore, each processor # 1 to # 4
If the candidate points are regularly distributed as shown in FIG. 8, the processing times in the processors # 1 to # 4 become substantially equal, and efficient parallel processing can be performed.
Note that, in FIG. 8, each of the candidate points to be processed by the processors # 1 to # 4 is indicated.

【0029】ところで、図8に示すように、処理領域の
或る部分のみにおいて候補点をクラスタリングするには
特別な処理が必要である。そこで、図9に示すように、
処理領域の左上から,,,の順に規則的に振り
分けるようにしても良く、この場合1つのクラスタに注
目すると、このクラスタ内には各プロセッサ#1〜#4
に振り分けられるべき候補点の数(,,,の
数)が略均等に分布するため、効率的な並列処理が可能
となる。
By the way, as shown in FIG. 8, special processing is required to cluster candidate points only in a certain part of the processing area. Therefore, as shown in FIG.
The processing areas may be regularly distributed from the upper left of the processing area. In this case, if one cluster is focused, the processors # 1 to # 4 are included in this cluster.
Since the number of candidate points (the number of ,,,) to be distributed to is distributed substantially evenly, efficient parallel processing is possible.

【0030】ここで、2次マッチングの処理手順を図1
0及び図11に従って説明する。
Here, the processing procedure of the secondary matching is shown in FIG.
0 and FIG.

【0031】即ち、候補リスト全てについての処理が終
了したか否かがチェックされ(図10のステップ1)、
終了していなければ、処理をしていないプロセッサがあ
るか否かチェックされ(図10のステップ2)、処理を
していないプロセッサがあれば、図5に示す候補リスト
記憶部16から候補リストが読み込まれて処理アドレス
が決定され(図10のステップ3)、その処理をしてい
ないプロセッサに2次マッチング処理を開始させる(図
10のステップ4)。この処理は候補リストの全てにつ
いて繰り返され、候補リストの全てについて処理が終了
すると、全てのプロセッサ#1〜#4での処理が終了し
たか否かがチェックされる(図10のステップ5)。
That is, it is checked whether the processing has been completed for all the candidate lists (step 1 in FIG. 10),
If not finished, it is checked whether there is a processor that is not processing (step 2 in FIG. 10). If there is a processor that is not processing, the candidate list is stored in the candidate list storage unit 16 shown in FIG. The processing address is read and the processing address is determined (step 3 in FIG. 10), and the processor that has not performed the processing is caused to start the secondary matching processing (step 4 in FIG. 10). This process is repeated for all the candidate lists, and when the processes for all candidate lists are completed, it is checked whether or not the processes in all the processors # 1 to # 4 have been completed (step 5 in FIG. 10).

【0032】ここで、各プロセッサ#1〜#4での2次
マッチングの処理手順を図11に基づいて説明する。
Here, the processing procedure of the secondary matching in each of the processors # 1 to # 4 will be described with reference to FIG.

【0033】即ち、各プロセッサ#1〜#4では前記1
次マッチングによって求められた1ブロック目のミス・
マッチ度が初期のミス・マッチ度とされ(図11のステ
ップ1)、処理するブロックを更新しながらそのブロッ
クのミス・マッチ度が求められ(図11のステップ
3)、初期のミス・マッチ度にそのブロックのミス・マ
ッチ度が加算されて新しいミス・マッチ度が算出される
(図11のステップ4)。そして、SSDA法によっ
て、この算出されたミス・マッチ度が予め設定された閾
値より大きいか否かがチェックされ(図11のステップ
5)、ミス・マッチ度が閾値を超えれば、その時点でそ
の場所は最早マッチングポイントではないものと判断
し、処理は直ちに打切られる(図11のステップ7)。
これに対し、ミス・マッチ度が閾値より小さい間は全て
のブロックについて処理が終了するまで以上の一連の処
理(図11のステップ2〜5の処理)が繰り返される。
That is, in each of the processors # 1 to # 4, the above 1
The first block mistake found by the next matching
The match degree is set to the initial mismatch degree (step 1 in FIG. 11), and the mismatch degree of the block is calculated while updating the block to be processed (step 3 in FIG. 11). The mismatch degree of that block is added to the block to calculate a new mismatch degree (step 4 in FIG. 11). Then, it is checked by the SSDA method whether or not the calculated mismatch degree is larger than a preset threshold value (step 5 in FIG. 11), and if the mismatch degree exceeds the threshold value, the It is determined that the place is no longer the matching point, and the process is immediately terminated (step 7 in FIG. 11).
On the other hand, while the mismatch degree is smaller than the threshold value, the above series of processes (the processes of steps 2 to 5 in FIG. 11) are repeated until the processes are completed for all the blocks.

【0034】そして、全てのブロックについて処理が終
了すると、求められたミス・マッチ度とアドレスが図5
に示すデータメモリ13に書き込まれ(図11のステッ
プ6)、各プロセッサ#1〜#4での処理が終了する
(図11のステップ7)。
When the processing is completed for all blocks, the calculated mismatch degree and address are shown in FIG.
Is written in the data memory 13 (step 6 in FIG. 11), and the processing in each of the processors # 1 to # 4 ends (step 7 in FIG. 11).

【0035】而して、全てのプロセッサ#1〜#4での
上記処理が終了すると、図5に示す最小値検出部14に
よってミス・マッチ度の最小値が検出され、その最小値
を示す位置がマッチングポイントとされて(図10のス
テップ6)2次マッチングの処理が終了する(図10の
ステップ7)。
When all the processors # 1 to # 4 have completed the above processing, the minimum value detecting unit 14 shown in FIG. 5 detects the minimum value of the mismatch degree, and the position showing the minimum value. Is set as the matching point (step 6 in FIG. 10), and the secondary matching process ends (step 7 in FIG. 10).

【0036】[0036]

【発明の効果】以上の説明で明らかな如く、本発明によ
れば、読取り対象画像がテンプレート画像と一致するマ
ッチング領域を求めるパターン・マッチング法におい
て、処理画像を複数の処理領域に分割し、各処理領域毎
に別々のプロセッサで画像処理する並列処理法と、各処
理領域での画像処理において対象画像のテンプレート画
像に対するミス・マッチ度が所定の閾値を超えると処理
を打切るSSDA法を併用するとともに、前記並列処理
法における各プロセッサの処理領域に位置的な片寄りが
ないように処理画像を分割するようにしたため、パター
ン・マッチング処理における処理時間を短縮して処理の
高速化を実現することができるという効果が得られる。
As is apparent from the above description, according to the present invention, in the pattern matching method for obtaining the matching area where the image to be read matches the template image, the processing image is divided into a plurality of processing areas, and A parallel processing method in which image processing is performed by a separate processor for each processing area and an SSDA method in which image processing in each processing area terminates processing when the degree of mismatch of the target image with the template image exceeds a predetermined threshold value are used together. At the same time, the processing image is divided so that there is no positional deviation in the processing area of each processor in the parallel processing method, so that the processing time in the pattern matching processing is shortened and the processing speed is increased. The effect of being able to do is obtained.

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

【図1】本発明の第1実施例に係るパターン・マッチン
グ装置の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a pattern matching device according to a first exemplary embodiment of the present invention.

【図2】本発明の第1実施例に係るパターン・マッチン
グ装置の制御部による処理手順を示すフローチャートで
ある。
FIG. 2 is a flowchart showing a processing procedure by a control unit of the pattern matching apparatus according to the first embodiment of the present invention.

【図3】本発明の第1実施例に係るパターン・マッチン
グ装置の各プロセッサでの処理手順を示すフローチャー
トである。
FIG. 3 is a flowchart showing a processing procedure in each processor of the pattern matching apparatus according to the first exemplary embodiment of the present invention.

【図4】(a),(b),(c),(d)は処理画像の
分割の態様を示す図である。
4 (a), (b), (c) and (d) are diagrams showing a mode of division of a processed image.

【図5】本発明の第2実施例に係るパターンマッチング
装置の構成を示すブロック図である。
FIG. 5 is a block diagram showing a configuration of a pattern matching device according to a second exemplary embodiment of the present invention.

【図6】1次マッチングの処理手順を示すフローチャー
トである。
FIG. 6 is a flowchart showing a processing procedure of primary matching.

【図7】処理画像上のクラストの分布を示す図である。FIG. 7 is a diagram showing a distribution of crusts on a processed image.

【図8】図7のA部(クラスタ1)における候補点の振
り分けを示す図である。
FIG. 8 is a diagram showing distribution of candidate points in a part A (cluster 1) in FIG.

【図9】簡便な候補点の振り分け方法を示す図である。FIG. 9 is a diagram showing a simple method of allocating candidate points.

【図10】2次マッチングの処理手順を示すフローチャ
ートである。
FIG. 10 is a flowchart showing a processing procedure of secondary matching.

【図11】2次マッチングの処理手順を示すフローチャ
ートである。
FIG. 11 is a flowchart showing a processing procedure of secondary matching.

【図12】並列処理法における処理画像の分割を示す図
である。
FIG. 12 is a diagram showing division of a processed image in the parallel processing method.

【図13】SSDA法における処理回数とミス・マッチ
度との関係を示す図である。
FIG. 13 is a diagram showing the relationship between the number of processing times and the mismatch degree in the SSDA method.

【図14】各プロセッサの処理時間を示す図である。FIG. 14 is a diagram showing a processing time of each processor.

【符号の説明】[Explanation of symbols]

11 イメージメモリ 12 アドレス発生部 13 データメモリ 14 最小値検出部 15 制御部 16 候補リスト記憶部 11 Image Memory 12 Address Generation Unit 13 Data Memory 14 Minimum Value Detection Unit 15 Control Unit 16 Candidate List Storage Unit

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 読取り対象画像がテンプレート画像と一
致するマッチング領域を求めるパターン・マッチング法
において、処理画像を複数の処理領域に分割し、各処理
領域毎に別々のプロセッサで画像処理する並列処理法
と、各処理領域での画像処理において対象画像のテンプ
レート画像に対するミス・マッチ度が所定の閾値を超え
ると処理を打切るSSDA法を併用するとともに、前記
並列処理法における各プロセッサの処理領域に位置的な
片寄りがないように処理画像を分割するようにしたこと
を特徴とするパターン・マッチング法。
1. A pattern matching method for obtaining a matching area in which an image to be read matches a template image, the processing image is divided into a plurality of processing areas, and a parallel processing method in which image processing is performed by a separate processor for each processing area. And the SSDA method that terminates the processing when the degree of mismatch of the target image with respect to the template image in the image processing in each processing area exceeds a predetermined threshold value, and the position is set in the processing area of each processor in the parallel processing method. A pattern matching method characterized in that the processed image is divided so that there is no general deviation.
【請求項2】 読取り対象画像とテンプレート画像にア
ダマール変換を施し、両画像のアダマール係数を用いて
両画像のミス・マッチ度を求める方法を採用し、前記並
列処理法において各処理領域の1ブロック目のみの処理
によってそのブロックのミス・マッチ度を求め、このミ
ス・マッチ度が所定の閾値以下となる候補点を求め、求
められた候補点を各プロセッサに対して振り分けること
を特徴とする請求項1記載のパターン・マッチング法。
2. A method of performing a Hadamard transform on an image to be read and a template image and using a Hadamard coefficient of both images to obtain a mismatch degree between both images, wherein one block in each processing area in the parallel processing method is adopted. Claims characterized in that the mismatch degree of the block is obtained by processing only the eyes, candidate points whose mismatch degree is below a predetermined threshold value are obtained, and the obtained candidate points are distributed to each processor. The pattern matching method according to item 1.
【請求項3】 読取られた対象画像を保管するイメージ
メモリと、処理画像上にアドレスを発生させるアドレス
発生部と、複数に分割された処理領域の各々を独立に画
像処理する複数のプロセッサと、各プロセッサによる画
像処理によって得られたミス・マッチ度とアドレスのデ
ータを保管するデータメモリと、ミス・マッチ度の最小
値を検出する最小値検出部と、これらイメージメモリ、
アドレス発生部、プロセッサ、データメモリ及び最小値
検出部の動作を制御する制御部を含んで構成されること
を特徴とするパターン・マッチング装置。
3. An image memory for storing a read target image, an address generator for generating an address on a processed image, and a plurality of processors for independently image-processing each of a plurality of divided processing areas. A data memory that stores the data of the mismatch degree and the address obtained by the image processing by each processor, a minimum value detection unit that detects the minimum value of the mismatch degree, and these image memories,
A pattern matching device comprising a control unit for controlling operations of an address generation unit, a processor, a data memory, and a minimum value detection unit.
JP26863091A 1991-09-20 1991-09-20 Pattern matching method Expired - Fee Related JP3146232B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26863091A JP3146232B2 (en) 1991-09-20 1991-09-20 Pattern matching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26863091A JP3146232B2 (en) 1991-09-20 1991-09-20 Pattern matching method

Publications (2)

Publication Number Publication Date
JPH0581433A true JPH0581433A (en) 1993-04-02
JP3146232B2 JP3146232B2 (en) 2001-03-12

Family

ID=17461220

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26863091A Expired - Fee Related JP3146232B2 (en) 1991-09-20 1991-09-20 Pattern matching method

Country Status (1)

Country Link
JP (1) JP3146232B2 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11219436A (en) * 1998-01-30 1999-08-10 Toshiba Corp Moving vector detection circuit and method therefor
JP2006293632A (en) * 2005-04-08 2006-10-26 Toshiba Corp Semiconductor integrated circuit device, image processing system, and image processing method
US7154950B2 (en) 2000-06-07 2006-12-26 Intel Corporation Adaptive early exit techniques in image correlation
EP2028620A1 (en) 2007-08-24 2009-02-25 Nikon Corporation Subject tracking method, subject tracking device, and computer program product
US8131068B2 (en) 2008-06-06 2012-03-06 Nikon Corporation Image matching device and camera
US8144934B2 (en) 2007-05-02 2012-03-27 Nikon Corporation Photographic subject tracking method, computer program product and photographic subject tracking device
US8260058B2 (en) 2007-03-13 2012-09-04 Nikon Corporation Template matching device, camera with template matching device, and program for allowing computer to carry out template matching
US8436900B2 (en) 2007-12-04 2013-05-07 Nikon Corporation Pattern matching camera
US8804844B2 (en) 2000-06-07 2014-08-12 Analog Devices, Inc. Adaptive early exit techniques in image correlation

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6233993B1 (en) 1999-05-10 2001-05-22 Sango Co., Ltd. Method and apparatus for forming a processed portion of a workpiece
CN104899879B (en) * 2015-05-21 2017-11-03 国家电网公司 A kind of method of the online outward appearance detection of electric energy meter

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11219436A (en) * 1998-01-30 1999-08-10 Toshiba Corp Moving vector detection circuit and method therefor
US7154950B2 (en) 2000-06-07 2006-12-26 Intel Corporation Adaptive early exit techniques in image correlation
US8804844B2 (en) 2000-06-07 2014-08-12 Analog Devices, Inc. Adaptive early exit techniques in image correlation
JP2006293632A (en) * 2005-04-08 2006-10-26 Toshiba Corp Semiconductor integrated circuit device, image processing system, and image processing method
US8260058B2 (en) 2007-03-13 2012-09-04 Nikon Corporation Template matching device, camera with template matching device, and program for allowing computer to carry out template matching
US8144934B2 (en) 2007-05-02 2012-03-27 Nikon Corporation Photographic subject tracking method, computer program product and photographic subject tracking device
EP2028620A1 (en) 2007-08-24 2009-02-25 Nikon Corporation Subject tracking method, subject tracking device, and computer program product
US8126207B2 (en) 2007-08-24 2012-02-28 Nikon Corporation Subject tracking method, subject tracking device, and computer program product
US8436900B2 (en) 2007-12-04 2013-05-07 Nikon Corporation Pattern matching camera
US8131068B2 (en) 2008-06-06 2012-03-06 Nikon Corporation Image matching device and camera

Also Published As

Publication number Publication date
JP3146232B2 (en) 2001-03-12

Similar Documents

Publication Publication Date Title
JPH0581433A (en) Method and device for pattern matching
CN110223218B (en) Face image processing method and device, electronic equipment and storage medium
US4665441A (en) Method and system for line-thinning in electronic image processing
JP3193240B2 (en) Image processing device
JPS62107386A (en) Image matching method
JP2947811B2 (en) Color image processing method
JP2001022881A (en) Device and method for detecting rough position of two- dimensional code
JP3571506B2 (en) Image processing apparatus and recording medium recording image processing program
CN117152221B (en) Image non-rigid registration method, system, equipment and storage medium
JPS58163078A (en) Line thinning processing system
JPH0794376A (en) Correction of data for exposure pattern
JPS634379A (en) Pattern matching device
JP2988403B2 (en) Image segmentation device
JPH01195764A (en) Method for estimating dither area and dither pattern
JPS63280379A (en) Processor for pore like flaw picture
JPH0425980A (en) Noise removing method
JPS59791A (en) Method and apparatus for pattern recognition
JP3149069B2 (en) How to automatically set the region of interest
JPH06333033A (en) Image processor
JP2838556B2 (en) Image processing device
JPS6390827A (en) Method and equipment of charged particle beam lithography
JP2002055831A (en) Interruption processing control system
JPH02288668A (en) Picture element density conversion processor
JPH0421076A (en) Image processing device
JPH05130432A (en) Picture compressor

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees