JP2003256837A - Pattern matching processing method - Google Patents
Pattern matching processing methodInfo
- Publication number
- JP2003256837A JP2003256837A JP2002060466A JP2002060466A JP2003256837A JP 2003256837 A JP2003256837 A JP 2003256837A JP 2002060466 A JP2002060466 A JP 2002060466A JP 2002060466 A JP2002060466 A JP 2002060466A JP 2003256837 A JP2003256837 A JP 2003256837A
- Authority
- JP
- Japan
- Prior art keywords
- image
- pattern
- start position
- stop position
- dimensional image
- 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
- 238000003672 processing method Methods 0.000 title claims description 12
- 238000000034 method Methods 0.000 description 37
- 238000010586 diagram Methods 0.000 description 14
- 238000001514 detection method Methods 0.000 description 9
- 238000003708 edge detection Methods 0.000 description 6
- 230000002265 prevention Effects 0.000 description 4
- 230000000630 rising effect Effects 0.000 description 3
- 238000013459 approach Methods 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 239000003086 colorant Substances 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Landscapes
- Image Analysis (AREA)
Abstract
Description
【0001】[0001]
【発明の属する技術分野】本発明は、パターンマッチン
グ処理方法に関し、特に、二次元画像内の画像パターン
と基準画像パターンとの異同を、フレームメモリを用い
ることなく、高速で判定することができるパターンマッ
チング処理方法に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a pattern matching processing method, and more particularly, to a pattern capable of determining the difference between an image pattern in a two-dimensional image and a reference image pattern at high speed without using a frame memory. The present invention relates to a matching processing method.
【0002】[0002]
【従来の技術】二次元画像内に特定のパターンの画像が
存在するかを判定するパターンマッチングは、種々の分
野で利用されている。例えば、工場の生産ラインにおい
ては部品の外形パターンと基準画像パターンとのパター
ンマッチング処理を行い、その結果を用いて部品の良否
を判定する検査装置や部品の装着、組立を自動化する自
動化装置、ロボットなどが実現されており、また、特定
のパターンを有する物体をパターンマッチング処理によ
り識別して該物体を自動追尾する自動追尾装置やパター
ンマッチング処理により危険物の存在や侵入を検知して
報知する危険報知装置なども知られている。2. Description of the Related Art Pattern matching for determining whether or not an image having a specific pattern exists in a two-dimensional image is used in various fields. For example, in a production line of a factory, pattern matching processing is performed between an external pattern of a component and a reference image pattern, and an inspection device for determining the quality of the component using the result, an automation device for automating mounting and assembly of the component, a robot Has been realized, and an object with a specific pattern is identified by pattern matching processing to automatically track the object and an automatic tracking device that detects the presence or intrusion of dangerous substances by pattern matching processing. Notification devices and the like are also known.
【0003】図9は、従来のパターンマッチング処理方
法が適用された装置のブロック図であり、ある領域を撮
像部1で撮像して得られる二次元画像の画像信号は、画
像処理部2で画像強調、二値化などの処理が施された
後、1画面分がフレームメモリ3に書き込まれる。基準
メモリ4には比較・判定の対象とすべき基準画像の基準
画像信号が記憶されている。FIG. 9 is a block diagram of an apparatus to which a conventional pattern matching processing method is applied. An image signal of a two-dimensional image obtained by picking up an image of a certain area by the image pickup unit 1 is imaged by the image processing unit 2. After processing such as emphasis and binarization, one screen is written in the frame memory 3. The reference memory 4 stores a reference image signal of a reference image to be compared / determined.
【0004】比較・判定部5は、フレームメモリ3に書
き込まれた二値化画像信号と基準メモリ4に記憶されて
いる基準画像信号とを比較し、この比較結果に基づいて
二次元画像内に基準画像が存在するか否かを判定する。
なお、基準メモリ4の基準画像信号は、撮像部1により
基準画像を撮像して得ることもできる。The comparison / determination unit 5 compares the binarized image signal written in the frame memory 3 with the reference image signal stored in the reference memory 4, and based on the comparison result, the two-dimensional image is displayed. It is determined whether or not the reference image exists.
The reference image signal of the reference memory 4 can be obtained by capturing the reference image by the image capturing unit 1.
【0005】図10は、フレームメモリ3およびその周
辺回路の詳細なブロック図である。例えば1画素につき
8ビットの濃淡画像信号は、比較器6を含む画像処理部
2で閾値THと比較され、1画素につき1ビットの二値化
画像信号となる。二値化画像信号の1画面分の有効画素
分、例えば512×512画素がフレームメモリ3に書
き込まれる。この書き込みの制御は、画像転送クロック
PCLK、水平同期信号HSYNおよび垂直同期信号VSYNを入力
とする書き込みタイミング制御回路7により行われ、上
記例では、水平ブランキング期間および垂直ブランキン
グ期間を除いた512ライン分の各1ラインにつき51
2画素分の期間でフレームメモリ3への書き込み信号WT
および書き込みアドレス信号WADRが有効になる。FIG. 10 is a detailed block diagram of the frame memory 3 and its peripheral circuits. For example, the 8-bit grayscale image signal per pixel is compared with the threshold value TH in the image processing unit 2 including the comparator 6, and becomes a 1-bit binary image signal per pixel. The effective pixels for one screen of the binarized image signal, for example 512 × 512 pixels, are written in the frame memory 3. This writing is controlled by the image transfer clock
The write timing control circuit 7 receives PCLK, the horizontal synchronizing signal HSYN, and the vertical synchronizing signal VSYN as input. In the above example, 512 lines for each 512 lines excluding the horizontal blanking period and the vertical blanking period are used.
Write signal WT to the frame memory 3 in a period of 2 pixels
And the write address signal WADR becomes valid.
【0006】比較・判定部5としてのMPU8は、垂直
ブランキング信号VBに基づきフレームメモリ3および基
準メモリ3から二値化画像信号を同時に読み出し、比較
・判定処理を実行する。The MPU 8 as the comparison / determination unit 5 simultaneously reads the binarized image signals from the frame memory 3 and the reference memory 3 based on the vertical blanking signal VB, and executes the comparison / determination processing.
【0007】図11は、比較・判定処理の説明図であ
り、ここでは一例として、フレームメモリ3には同図
(a)に示す縦512画素、横512画素の二次元画像
の画像信号が書き込まれ、基準メモリ4には同図(b)
に示す縦128画素、横128画素の基準画像の画像信
号が記憶されているとする。また、同図(c)は、二次
元画像と基準画像との比較の状態を示している。なお、
この例では、飛び越し走査は行われていないものとす
る。FIG. 11 is an explanatory diagram of the comparison / judgment processing. Here, as an example, the image signal of the two-dimensional image of 512 pixels in the vertical direction and 512 pixels in the horizontal direction shown in FIG. The reference memory 4 is shown in FIG.
It is assumed that the image signal of the reference image of 128 pixels vertically and 128 pixels horizontally is stored. Further, FIG. 7C shows a state of comparison between the two-dimensional image and the reference image. In addition,
In this example, it is assumed that interlaced scanning is not performed.
【0008】比較・判定部5での比較は、基準画像をフ
レームメモリ3に書き込まれた二次元画像上で、例えば
水平方向に上部左端から右端に向かって1画素づつ順次
相対的に移動させ、さらに下方に向かって移動させつつ
両画像の重なり具合を調べることにより行われる。すな
わち、MPU8は、垂直ブランク信号VBが入力されると
読出しアドレス信号RADRを出力し、フレームメモリ3に
書き込まれた二値化画像信号および基準メモリ4の二値
化画像信号を同時に読み込んで位置的に対応する1画素
毎に比較し、128×128画素におけるマッチング率
を計算して判定結果を出力する。この動作を比較開始位
置(左上端部)を1画素づつシフトしながら実行し、一
定値以上のマッチング率が得られたとき、そのときのシ
フト位置に基準画像と同じ画像が二次元画像内に存在す
るとする。In the comparison / determination unit 5, the reference image is sequentially moved relative to the two-dimensional image written in the frame memory 3 one pixel at a time in the horizontal direction from the upper left end to the right end. This is performed by checking the degree of overlap between both images while moving further downward. That is, the MPU 8 outputs the read address signal RADR when the vertical blank signal VB is input, and simultaneously reads the binarized image signal written in the frame memory 3 and the binarized image signal of the reference memory 4 to positionally read the signal. Is compared for each pixel, the matching rate in 128 × 128 pixels is calculated, and the determination result is output. This operation is performed while shifting the comparison start position (upper left end) pixel by pixel, and when a matching rate of a certain value or more is obtained, the same image as the reference image is displayed in the two-dimensional image at the shift position at that time. Suppose it exists.
【0009】[0009]
【発明が解決しようとする課題】従来のパターンマッチ
ング処理では、二次元画像の画像信号を一旦フレームメ
モリに格納するため、大容量のメモリが必要であり、ま
た、基準画像と二次元画像とを1画素づつ相対的に移動
させながら両者の重なり具合を調べるため、二次元画像
を得た後のパターンマッチング処理に多大な時間がかか
り、パターンマッチング処理に供される二次元画像の時
間間隔が大きくならざるを得ない。In the conventional pattern matching processing, since the image signal of the two-dimensional image is temporarily stored in the frame memory, a large capacity memory is required, and the reference image and the two-dimensional image are stored. Since the degree of overlap between the two is checked by relatively moving them one pixel at a time, it takes a lot of time for the pattern matching process after the two-dimensional image is obtained, and the time interval of the two-dimensional image used for the pattern matching process is large. I have no choice.
【0010】また、カラー(色)の成分をも含めたパタ
ーンマッチング処理を行おうとすれば、通常、少なくと
も3カラー分の処理が必要になるため、パターンマッチ
ング処理にさらに時間がかかる。Further, if the pattern matching process including the color components is performed, it is usually necessary to perform the process for at least three colors, so that the pattern matching process takes further time.
【0011】例えば、図11の例で、同図(c)に示す
ように、基準画像を垂直方向に64ライン分だけシフト
したとき、すなわち512×62画素シフトしたときに
一定値以上のマッチング率が得られるとし、命令1ステ
ップ当たりのMPUの処理時間を0.1μS(例えば、
日立:H8/300Hシリーズの場合)とすると、1画素位置
毎での処理時間は、(0.1×1画素位置での命令ステ
ップ数)μSとなり、二値化画像信号をフレームメモリ
3に書き込んだ後から両画像の一致が得られるまでの時
間Tは、T=0.1×512×64×(1画素位置での
命令ステップ数)≒3.3×(1画素位置での命令ステ
ップ数)mSとなる。また、二次元画像の最下端までシ
フトしたときに両画像の一致が得られるとすると、T=
0.1×512×(512−128)×(1画素位置で
の命令ステップ数)≒20×(1画素位置での命令ステ
ップ数)mSとなり、カラー画像の場合には一致が得ら
れるまでに約60×(1画素位置での命令ステップ数)
mSもの時間がかかる。For example, in the example of FIG. 11, as shown in FIG. 11C, when the reference image is vertically shifted by 64 lines, that is, when 512 × 62 pixels are shifted, a matching rate of a certain value or more. Is obtained, the processing time of the MPU per instruction step is 0.1 μS (for example,
Hitachi: In case of H8 / 300H series), the processing time at each pixel position is (0.1 x number of command steps at 1 pixel position) μS, and the binary image signal is written to the frame memory 3. After that, the time T from when the two images match is T = 0.1 × 512 × 64 × (the number of instruction steps at one pixel position) ≈3.3 × (the number of instruction steps at one pixel position) ) MS. If the two images are matched when they are shifted to the bottom of the two-dimensional image, T =
0.1 × 512 × (512-128) × (the number of command steps at one pixel position) ≈20 × (the number of command steps at one pixel position) mS, and until a match is obtained in the case of a color image Approximately 60 x (number of instruction steps at 1 pixel position)
It takes as long as ms.
【0012】上記例で示したように、従来のパターンマ
ッチング処理では多大の時間を要し、垂直ブランキング
期間中はもとより1垂直走査期間(約33mS)でもパ
ターンマッチング処理が終了しないこともある。パター
ンマッチング処理による画像認識の防犯用機器や防災用
機器やロボットなどへの応用を考えると、処理に供され
る二次元画像は出来るだけ小さい時間間隔で得られたリ
アルタイムに近いものであることが望ましい。As shown in the above example, the conventional pattern matching process requires a lot of time, and the pattern matching process may not be completed during the vertical blanking period or even during one vertical scanning period (about 33 mS). Considering the application of image recognition by pattern matching processing to crime prevention equipment, disaster prevention equipment, robots, etc., the two-dimensional image provided for processing is close to real time obtained at the smallest time interval. desirable.
【0013】本発明の目的は、二次元画像内の画像パタ
ーンと基準画像との異同を、フレームメモリを用いるこ
となく、高速で判定することができ、小さい時間間隔で
得られかつリアルタイムに近い二次元画像に基づいて両
パターンの異同を判定することができるパターンマッチ
ング処理方法を提供することにある。An object of the present invention is to determine the difference between an image pattern in a two-dimensional image and a reference image at a high speed without using a frame memory, obtain a small time interval, and obtain a near real time image. An object of the present invention is to provide a pattern matching processing method capable of determining the difference between both patterns based on a three-dimensional image.
【0014】[0014]
【課題を解決するための手段】上記課題を解決するため
に、本発明は、二次元画像をラスタ走査して得られる画
像信号を二値化し、二次元画像内の画像パターンの二値
化画像信号における各ラスタ走査ライン上におけるスタ
ート位置およびストップ位置を検出し、該検出されたス
タート位置およびストップ位置を標準化して標準化スタ
ート位置およびストップ位置を求め、画像パターンにつ
いての標準化スタート位置およびストップ位置と予め記
憶された基準画像パターンについての標準化スタート位
置およびストップ位置とを比較し、該比較結果により画
像パターンと基準画像パターンとの異同を判定する点に
第1の特徴がある。In order to solve the above problems, the present invention binarizes an image signal obtained by raster-scanning a two-dimensional image to obtain a binarized image of an image pattern in the two-dimensional image. The start position and stop position on each raster scanning line in the signal are detected, the detected start position and stop position are standardized to obtain the standardized start position and stop position, and the standardized start position and stop position for the image pattern are obtained. The first feature is that the standardized start position and the stop position of the reference image pattern stored in advance are compared, and the difference between the image pattern and the reference image pattern is determined based on the comparison result.
【0015】また、本発明は、前記標準化が、パターン
がラスタ走査される最上位のライン上のスタート位置を
ゼロとするものである点に第2の特徴がある。また、本
発明は、 前記ストップ位置が、前記スタート位置から
の距離で表される点に第3の特徴がある。また、本発明
は、前記距離が、ピクセル数で表される点に第4の特徴
がある。さらに、本発明は、二次元画像がカラー画像で
あり、該カラー画像の各カラー成分についてパターンマ
ッチング処理を行う点に第5の特徴がある。A second feature of the present invention is that the standardization is such that the start position on the uppermost line where the pattern is raster-scanned is zero. Further, the present invention has a third feature in that the stop position is represented by a distance from the start position. Further, the present invention has a fourth feature in that the distance is represented by the number of pixels. Further, the present invention has a fifth feature in that the two-dimensional image is a color image and the pattern matching process is performed for each color component of the color image.
【0016】第1の特徴によれば、二次元画像内の画像
パターンと基準画像パターンとの異同を、フレームメモ
リを用いることなく、高速で判定することができ、パタ
ーンマッチング装置と二次元画像の対象領域が相対的に
移動しているような場合にも、小さい時間間隔で得られ
かつリアルタイムに近い二次元画像に基づいて両パター
ンの異同を比較・判定することができる。また、第2な
いし第4の特徴によれば、二次元画像内の画像パターン
と基準画像パターンとの比較をカウンタなどを用いて容
易に行うことができる。さらに、第5の特徴によれば、
カラー成分を含めて判定を行うため精度を上げることが
できる。According to the first feature, the difference between the image pattern in the two-dimensional image and the reference image pattern can be determined at high speed without using a frame memory, and the pattern matching device and the two-dimensional image can be detected. Even when the target area is moving relatively, it is possible to compare / determine the difference between the two patterns based on the two-dimensional image obtained at a small time interval and close to real time. Further, according to the second to fourth characteristics, it is possible to easily compare the image pattern in the two-dimensional image with the reference image pattern by using a counter or the like. Furthermore, according to the fifth feature,
Since the determination is performed by including the color components, the accuracy can be improved.
【0017】[0017]
【発明の実施の形態】以下、本発明の実施の形態を図面
を参照して詳細に説明する。図1は、本発明が適用され
たパターンマッチング処理装置の一実施形態を示すブロ
ック図である。図9と同符号は同等または同一物を示
す。BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of a pattern matching processing device to which the present invention is applied. The same reference numerals as those in FIG. 9 indicate the same or the same things.
【0018】同図において、ある領域を撮像部1で撮像
し、これにより得られる二次元画像の濃淡画像信号を画
像処理部2に入力する。画像処理部2は、画像信号に画
像強調、二値化などの処理を施すものであり、その出力
である二値化画像信号は、スタート・ストップ位置検出
部9に入力される。スタート・ストップ位置検出部9
は、入力される二値化画像信号に基づいて二次元画像内
の各画像パターンのラスタ走査各ライン上でのスタート
位置およびストップ位置を検出する。In FIG. 1, a certain area is imaged by the image pickup section 1, and a grayscale image signal of a two-dimensional image obtained by this is input to the image processing section 2. The image processing unit 2 subjects the image signal to processing such as image enhancement and binarization, and the output binarized image signal is input to the start / stop position detection unit 9. Start / stop position detector 9
Detects a start position and a stop position on each raster scan line of each image pattern in the two-dimensional image based on the input binarized image signal.
【0019】検出されたスタート位置およびストップ位
置は、比較・判定部10に入力される。比較・判定部1
0は、入力されたスタート位置およびストップ位置を標
準化して標準化スタート位置およびストップ位置を求め
るとともに、各画像パターンについての標準化スタート
位置およびストップ位置と予め記憶された基準画像パタ
ーンについての標準化スタート位置およびストップ位置
とを比較し、二次元画像内の各画像パターンと基準画像
パターンとの異同を判定する。The detected start position and stop position are input to the comparison / determination unit 10. Comparison / determination unit 1
0 standardizes the input start position and stop position to obtain the standardized start position and stop position, and the standardized start position and stop position for each image pattern and the standardized start position for the previously stored reference image pattern. The stop position is compared to determine whether each image pattern in the two-dimensional image is different from the reference image pattern.
【0020】図2は、画像処理部2およびスタート・ス
トップ位置検出部9の一具体例を示し、撮像部1からの
二次元画像の、例えば1画素につき8ビットの濃淡画像
信号VDは、画像処理部2の比較器6で任意に設定された
閾値THと比較されて1画素につき1ビットの二値化画像
信号となる。ここでは二値化画像信号は、画像パターン
内で白レベルであるものと仮定する。なお、画像パター
ン内で黒レベルになる画像信号の場合には白黒反転処理
を行うなど、それに応じた構成にすればよい。FIG. 2 shows a specific example of the image processing unit 2 and the start / stop position detecting unit 9. For example, a grayscale image signal VD of 8 bits per pixel of a two-dimensional image from the image pickup unit 1 is an image. The comparator 6 of the processing unit 2 compares it with a threshold TH which is arbitrarily set, and becomes a binary image signal of 1 bit per pixel. Here, it is assumed that the binarized image signal has a white level in the image pattern. Incidentally, in the case of an image signal having a black level in the image pattern, a black-and-white inversion process may be performed, and the configuration may be adapted accordingly.
【0021】この二値化画像信号は、白エッジ検出回路
12および記憶領域切替回路13に並列に入力される。
また、水平同期信号HSYNは、記憶領域切替回路13、ピ
クセルカウンタ14および書き込みアドレス・カウンタ
17に並列に入力される。The binarized image signal is input in parallel to the white edge detection circuit 12 and the storage area switching circuit 13.
The horizontal synchronizing signal HSYN is input in parallel to the storage area switching circuit 13, the pixel counter 14 and the write address counter 17.
【0022】Vブランキング期間検出回路15は、水平
同期信号HSYNおよび垂直同期信号VSYNを入力とし、垂直
ブランキング期間を検出してその検出信号を比較・判定
部10に出力する。垂直同期信号VSYNは、記憶領域切替
回路13にも与えられる。The V blanking period detection circuit 15 receives the horizontal synchronizing signal HSYN and the vertical synchronizing signal VSYN as input, detects the vertical blanking period, and outputs the detection signal to the comparison / determination unit 10. The vertical synchronization signal VSYN is also given to the storage area switching circuit 13.
【0023】白エッジ検出回路12は、二値化画像信号
の白レベルの立ち上がりエッジと立ち下がりエッジとを
検出し、それらの検出時点でのピクセルカウンタ14の
カウント値をメモリ16の記憶領域16−1、16−
2、16−3、・・のいずれかに書き込ませる。メモリ
16の各記憶領域16−1、16−2、16−3、・・
間の先頭アドレスには記憶領域の区切りを示す記憶順番
号01、02、03、・・が記入されている。各記憶領
域16−1、16−2、16−3、・・内での書き込み
位置は、水平同期信号HSYNおよび白エッジ検出回路12
の出力を入力とする書き込みアドレス・カウンタ17に
より指定される。The white edge detection circuit 12 detects the rising edge and the falling edge of the white level of the binarized image signal, and the count value of the pixel counter 14 at the time of detection is stored in the storage area 16- of the memory 16. 1, 16-
It is made to be written in any one of 2, 16-3, .... Each storage area 16-1, 16-2, 16-3 of the memory 16 ...
The storage order numbers 01, 02, 03, ... Denoting the delimiters of the storage areas are written in the leading addresses between. The writing position in each of the storage areas 16-1, 16-2, 16-3, ... Is the horizontal synchronization signal HSYN and the white edge detection circuit 12
Is specified by the write address counter 17 that receives the output of
【0024】ピクセルカウンタ14は撮像部1からの1
ライン画像転送終了信号、すなわち水平同期信号HSYNに
よりクリアされ、画像転送クロック(ピクセルクロッ
ク)PCLKをカウントしており、そのカウント値は、ラス
タ走査各ライン上での位置を表している。The pixel counter 14 has a value of 1 from the image pickup unit 1.
It is cleared by the line image transfer end signal, that is, the horizontal synchronizing signal HSYN, and counts the image transfer clock (pixel clock) PCLK, and the count value represents the position on each line of the raster scanning.
【0025】記憶領域切替回路13は、1画面内に複数
の画像パターンがある場合にそれらのラスタ走査各ライ
ン上でのスタート位置およびストップ位置を画像パター
ン別に対応する各記憶領域16−1、16−2、16−
3、・・に記憶させるためのものであり、例えば、図形
の連続性に着目し、水平方向および垂直方向への正射
影、すなわちヒストグラムをカウンタなどにより得て各
パターンの存在領域を分離するなどの公知の技術を利用
し、それに応じて記憶させる記憶領域を切り替えるもの
である。なお、各画像パターンの存在領域は白エッジ検
出回路12での白エッジの検出前に認識されなければな
らないが、連続するフレームにおいてそれぞれ画像パタ
ーンの存在領域の認識、白エッジの検出を行えばよい。When there are a plurality of image patterns in one screen, the storage area switching circuit 13 stores the storage areas 16-1 and 16 corresponding to the start position and the stop position on each raster scanning line for each image pattern. -2, 16-
For example, by paying attention to the continuity of figures, the orthogonal projection in the horizontal direction and the vertical direction, that is, a histogram is obtained by a counter or the like to separate the existence regions of each pattern. The publicly-known technique of is used, and the storage area to be stored is switched accordingly. Note that the existence area of each image pattern must be recognized before the white edge detection circuit 12 detects the white edge, but the existence area of the image pattern and the white edge may be recognized in successive frames. .
【0026】また、水平方向に1個のみの画像パターン
が存在するものを撮像対象とする場合には、垂直方向で
のパターンの切れ目を検出するなどして、また、画像パ
ターンが水平方向に、左側のパターンからはみ出すこと
なく複数存在するような場合には、水平同期信号HSYNに
よりクリアされ、画像パターンの立ち上がりをカウント
するカウンタと該カウンタのカウント値をデコードする
デコーダにより記憶領域切替回路13を構成し、デコー
ダの出力を記憶領域切り替えるための信号として用いる
などして、単一のフレームにおいて記憶領域を切り替え
つつ白エッジの検出を行うことも可能である。Further, in the case where an image pickup object has only one image pattern in the horizontal direction, a break in the pattern in the vertical direction is detected, and the image pattern in the horizontal direction is When there are a plurality of patterns without protruding from the pattern on the left side, the storage area switching circuit 13 is configured by a counter that is cleared by the horizontal synchronization signal HSYN and that counts the rising edge of the image pattern and a decoder that decodes the count value of the counter. However, it is possible to detect the white edge while switching the storage areas in a single frame by using the output of the decoder as a signal for switching the storage areas.
【0027】次に、図3の画像パターン“A”、
“B”、“C”を含む二次元画像が与えられたものと想
定して図2の動作を説明する。なお、図3には水平方向
および垂直方向への正射影(ヒストグラム)も示してい
る。この二次元画像をラスタ走査することにより得られ
た画像信号は、比較器6で閾値THと比較されて二値化画
像信号となる。二値化画像信号の立ち上がりエッジと立
ち下がりエッジとが白エッジ検出回路12で検出され
る。この検出時点でピクセルカウンタ14は、ラスタ走
査ライン上におけるエッジ部分のピクセル位置を示すカ
ウント値になっている。Next, the image pattern "A" in FIG.
The operation of FIG. 2 will be described on the assumption that a two-dimensional image including “B” and “C” is given. Note that FIG. 3 also shows the orthogonal projection (histogram) in the horizontal direction and the vertical direction. The image signal obtained by raster-scanning the two-dimensional image is compared with the threshold value TH by the comparator 6 and becomes a binarized image signal. The white edge detection circuit 12 detects the rising edge and the falling edge of the binarized image signal. At the time of this detection, the pixel counter 14 has a count value indicating the pixel position of the edge portion on the raster scanning line.
【0028】したがって、画像パターン“A”の白エッ
ジの検出出力でピクセルカウンタ14のカウント値をメ
モリ16の記憶領域16−1に書き込めば、記憶領域1
6−1には画像パターン“A”のラスタ走査各ライン上
におけるスタート位置およびストップ位置が書き込まれ
る。画像パターン“B”、“C”に対しては記憶領域切
替回路13により記憶領域が記憶領域16−2、16−
3にそれぞれ切り替えられてそれらのラスタ走査各ライ
ン上におけるスタート位置およびストップ位置が同様に
個別に書き込まれる。Therefore, if the count value of the pixel counter 14 is written in the storage area 16-1 of the memory 16 by the detection output of the white edge of the image pattern "A", the storage area 1
A start position and a stop position on each raster scanning line of the image pattern "A" are written in 6-1. For the image patterns “B” and “C”, the storage area switching circuit 13 stores the storage areas 16-2 and 16-.
3 and the start position and stop position on each line of the raster scan are similarly written individually.
【0029】図4は、記憶領域16−1、16−2、1
6−3に記憶された画像パターン“A”、“B”、
“C”のスタート位置(スタートPIX)およびストップ
位置(ストップPIX)の具体的数値例を示す。ラインNO.
は、各画像パターンにおける最初のラインを1として連
続番号を付したものである。なお、各記憶領域の大きさ
は2値化画像信号の白レベルが入力される間の分必要だ
が、各記憶領域の容量削減を目的に、ライン間引き書き
込み(例えば5ライン毎)、あるいは先頭ラインから一
定ライン数書き込み等の方法も可能である。FIG. 4 shows storage areas 16-1, 16-2, 1
6-3, image patterns “A”, “B”,
Specific numerical examples of the start position (start PIX) and stop position (stop PIX) of "C" are shown. Line NO.
Is a serial number with the first line in each image pattern as 1. It should be noted that the size of each storage area is required for the time during which the white level of the binarized image signal is input, but for the purpose of reducing the capacity of each storage area, line thinning writing (for example, every 5 lines) or the first line is performed. Therefore, a method such as writing a fixed number of lines is also possible.
【0030】次に、比較・判定部10における処理につ
いて説明する。比較・判定部10は、例えば、ソフトウ
エアにより処理を実行するMPUにより構成され、垂直
ブランキング期間検出信号が与えられると、入力された
スタート位置およびストップ位置を標準化して標準化ス
タート位置(スタートADR)およびストップ位置(スト
ップADR)を求めるとともに、二次元画像内の各画像パ
ターンについての標準化スタート位置およびストップ位
置と基準メモリに予め記憶された基準画像パターンにつ
いての標準化スタート位置およびストップ位置とを比較
し、二次元画像内の各画像パターンと基準画像パターン
との異同を判定する。Next, the processing in the comparison / determination unit 10 will be described. The comparison / determination unit 10 is composed of, for example, an MPU that executes a process by software, and when a vertical blanking period detection signal is given, the input start position and stop position are standardized and standardized start position (start ADR ) And stop position (stop ADR), and compares the standardized start position and stop position for each image pattern in the two-dimensional image with the standardized start position and stop position for the reference image pattern stored in the reference memory in advance. Then, the difference between each image pattern in the two-dimensional image and the reference image pattern is determined.
【0031】まず、スタート位置およびストップ位置の
標準化処理について説明する。この標準化処理は、各画
像パターンと基準画像パターンとの比較を容易にするた
めの処理であり、例えば、画像パターンの最上位ライン
のスタート位置を0としたときの他の各ラインのスター
ト位置の相対値を求め、各ラインのストップ位置につい
ては対応するラインのスタート位置からのピクセル数な
どの距離として求め、それら相対値および距離を結果メ
モリ18に書き込む処理である。First, the standardization processing of the start position and the stop position will be described. This standardization process is a process for facilitating comparison between each image pattern and the reference image pattern. For example, when the start position of the uppermost line of the image pattern is set to 0 This is a process in which the relative value is obtained, the stop position of each line is obtained as a distance such as the number of pixels from the start position of the corresponding line, and the relative value and the distance are written in the result memory 18.
【0032】図5は、標準化スタート位置およびストッ
プ位置を求める処理手順の一例を示すフローチャートで
あり、この手順は、以下のステップS1〜S11からな
る。FIG. 5 is a flowchart showing an example of a processing procedure for obtaining the standardized start position and stop position, and this procedure comprises the following steps S1 to S11.
【0033】(S1)メモリ16の記憶領域01のデー
タを読み出す。
(S2)読み込んだデータが最初のラインかどうかを判
断する。
(S3)最初のラインならば、(ストップ位置−スター
ト位置)を演算して当該ラインの標準化ストップ位置
(ストップADR)を求める。
(S4)結果メモリ18の第1の記憶領域01の最初の
ラインアドレスに標準化スタート位置(スタートADR)
0およびステップS3で求めた標準化ストップ位置(ス
トップADR)を書き込む。
(S5)ステップS2での判断結果が最初のラインでな
いならば、スタート位置(=最初のラインのスタート位
置−当該ラインのスタート位置)を演算して当該ライン
の標準化スタート位置(スタートADR)を求める。
(S6)続いて、ストップ位置(当該ラインのストップ
位置−当該ラインのスタート位置)を演算して当該ライ
ンの標準化ストップ位置(ストップADR)を求める。
(S7)結果メモリ18の第1の記憶領域01の次のラ
インアドレスにステップS5およびS6で求めた標準化
スタート位置および標準化ストップ位置を書き込む。
(S8)第1の記憶領域の全てのラインが終了したかど
うかを判断する。
(S9)ステップS8でメモリ16の第1の記憶領域の
全てのラインが終了していないと判断されたならば、読
み出しアドレスを更新し、次のラインについてステップ
1以下の処理を繰り返す。
(S10)ステップS8でメモリ16の第1の記憶領域
の全てのラインが終了したと判断されたならば、メモリ
16の全記憶領域のデータについての標準化が終了した
かどうかを判断し、終了したと判断されたならば標準化
処理を終了する。
(S11)ステップS10で標準化が終了していないと
判断されたならば、メモリ16の次の記憶領域のデータ
についてステップS2以下の標準化処理を繰り返す。(S1) The data in the storage area 01 of the memory 16 is read. (S2) It is determined whether the read data is the first line. (S3) If it is the first line, (stop position-start position) is calculated to obtain the standardized stop position (stop ADR) of the line. (S4) Standardized start position (start ADR) at the first line address of the first storage area 01 of the result memory 18
0 and the standardized stop position (stop ADR) obtained in step S3 are written. (S5) If the determination result in step S2 is not the first line, the start position (= start position of the first line−start position of the line) is calculated to obtain the standardized start position (start ADR) of the line. . (S6) Subsequently, a stop position (stop position of the line-start position of the line) is calculated to obtain a standardized stop position (stop ADR) of the line. (S7) The standardized start position and standardized stop position obtained in steps S5 and S6 are written to the next line address in the first storage area 01 of the result memory 18. (S8) It is determined whether or not all the lines in the first storage area have been completed. (S9) If it is determined in step S8 that all the lines in the first storage area of the memory 16 have not been completed, the read address is updated, and the processes from step 1 onward are repeated for the next line. (S10) If it is determined in step S8 that all the lines in the first storage area of the memory 16 are finished, it is determined whether or not the standardization of the data in all the storage areas of the memory 16 is finished, and the processing is finished. If it is determined that the standardization process is completed. (S11) If it is determined in step S10 that the standardization has not been completed, the standardization process in step S2 and subsequent steps is repeated for the data in the next storage area of the memory 16.
【0034】この標準化処理後に結果メモリ18に書き
込まれた画像パターン“A”、“B”、“C”に対する
スタート位置(スタートADR)およびストップ位置(ス
トップADR)を示すと図6(a)、(b)、(c)のよ
うになる。なお、以上の例では、各ラインのストップ位
置を当該ラインのスタート位置からのピクセル数で表し
ているが、これは、画像パターンの最初のラインのスタ
ート位置を0としたときの相対値で表すようにしてもよ
い。FIG. 6A shows the start position (start ADR) and stop position (stop ADR) for the image patterns "A", "B", and "C" written in the result memory 18 after the standardization process. It becomes like (b) and (c). In the above example, the stop position of each line is represented by the number of pixels from the start position of the line, but this is represented by a relative value when the start position of the first line of the image pattern is 0. You may do it.
【0035】次に、各画像パターンについての標準化ス
タート位置およびストップ位置と予め記憶された基準画
像パターンのスタート位置およびストップ位置とを比較
し、二次元画像内の各画像パターンと基準画像パターン
との異同を判定する処理について図7を参照して説明す
る。同図には画像パターン“A”、“B”、“C”の標
準化前のスタート位置およびストップ位置も合わせて示
している。Next, the standardized start position and stop position for each image pattern are compared with the start position and stop position of the reference image pattern stored in advance, and each image pattern in the two-dimensional image and the reference image pattern are compared. The process of determining the difference will be described with reference to FIG. 7. The figure also shows the start and stop positions of the image patterns "A", "B", and "C" before standardization.
【0036】基準メモリ19は、二次元画像内の各画像
パターンと同様に、例えば図6(d)に示すような、基
準画像パターンの標準化スタート位置およびストップ位
置を記憶しており、これは、パターンマッチング処理に
先立って基準画像を撮像することによって得ることもで
きる。ここでは基準画像パターンが画像パターン“A”
と同じものであると仮定して具体的数値を記載してい
る。The reference memory 19 stores the standardized start position and stop position of the reference image pattern as shown in FIG. 6D, for example, as with each image pattern in the two-dimensional image. It can also be obtained by capturing a reference image prior to the pattern matching process. Here, the reference image pattern is the image pattern “A”.
Specific values are given assuming that they are the same as.
【0037】結果メモリ18には、上記標準化処理で得
られた各画像パターンの標準化スタート位置およびスト
ップ位置が記憶されており、各画像パターンに対する各
記憶領域間の先頭アドレスには、メモリ16と同様に、
記憶領域の区切りを示す記憶順番号01、02、03、
・・が記入されている。The result memory 18 stores the standardized start position and stop position of each image pattern obtained by the above standardization process, and the head address between the respective storage areas for each image pattern is the same as that of the memory 16. To
Storage order numbers 01, 02, 03, which indicate the division of the storage area,
・ ・ Is entered.
【0038】図7は、比較・判定部10の一例を示す機
能構成図であり、これはソフトウエアにより処理を実行
するMPUにより構成される。図8は、比較・判定の処
理手順の一例を示すフローチャートであり、この手順
は、以下のステップS101〜S110からなる。FIG. 7 is a functional block diagram showing an example of the comparison / determination unit 10, which is composed of an MPU that executes processing by software. FIG. 8 is a flowchart showing an example of a comparison / determination processing procedure, and this procedure includes the following steps S101 to S110.
【0039】(S101)まず、結果メモリ18の領域
01の第1ラインのスタート位置およびストップ位置と
基準メモリ19の第1ラインのスタート位置およびスト
ップ位置の読み出しを開始する。
(S102)読み出したスタート位置同士、ストップ位
置同士を比較部20で比較する。
(S103)比較結果が一致しているならば、一致カウ
ンタ21のカウント値を+1する。
(S104)比較ライン数をカウントする計数カウンタ
22のカウンタ値を+1する。
(S105)結果メモリ18の次のラインアドレスのデ
ータが記憶順番号01、02、・・かどうかを判断す
る。これは、記憶領域01のデータが全て読み出された
か否かの判断である。
(S106)ステップS105の判断結果が記憶順番号
でない場合には、結果メモリ18および基準メモリ19
のラインアドレスを更新し、ステップ102以下の処理
を繰り返す。
(S107)ステップS105の判断結果が記憶順番号
である場合には、記憶領域01のデータの比較は終了し
たので、一致カウンタ21のカウント値と計数カウンタ
22のカウント値を一致率計算部23に読み取らせ、両
者の比(一致カウンタのカウント値/計数カウンタのカ
ウント値)を演算する。
(S108)ステップS107で演算した比が、例えば
90%以上かどうかを判断する。なお、90%は、一例
にすぎず、この値を外部から任意に可変設定可能にすれ
ば、ノイズなどの影響や要求される精度に応じた判定が
可能になる。
(S109)ステップS108で90%以上と判断され
たとき、結果メモリ18の画像パターンと基準メモリ1
9の基準画像パターンとの一致を報知し、処理を終了す
る。
(S110)ステップS108で90%以上と判断され
ないときには、結果メモリ18の次の記憶領域のデータ
についてステップS101以下の処理を繰り返す。(S101) First, reading of the start and stop positions of the first line of the area 01 of the result memory 18 and the start and stop positions of the first line of the reference memory 19 is started. (S102) The comparing unit 20 compares the read start positions and the read stop positions. (S103) If the comparison results match, the count value of the match counter 21 is incremented by one. (S104) The counter value of the counting counter 22 that counts the number of comparison lines is incremented by one. (S105) It is determined whether or not the data of the next line address in the result memory 18 is the storage sequence number 01, 02, ... This is a judgment as to whether or not all the data in the storage area 01 has been read. (S106) If the determination result of step S105 is not the storage order number, the result memory 18 and the reference memory 19
Line address is updated, and the processes in and after step 102 are repeated. (S107) If the determination result in step S105 is the storage order number, the comparison of the data in the storage area 01 is completed, and the count value of the match counter 21 and the count value of the count counter 22 are sent to the match rate calculation unit 23. The data is read and the ratio between them (count value of coincidence counter / count value of counter) is calculated. (S108) It is determined whether the ratio calculated in step S107 is 90% or more, for example. It should be noted that 90% is only an example, and if this value can be variably set externally, it is possible to make a determination according to the influence of noise or the like and the required accuracy. (S109) When it is determined in step S108 that 90% or more, the image pattern of the result memory 18 and the reference memory 1
The notification of the coincidence with the reference image pattern of No. 9 is notified, and the process ends. (S110) If it is not determined to be 90% or more in step S108, the processes in step S101 and subsequent steps are repeated for the data in the next storage area of the result memory 18.
【0040】比較・判定処理の判定結果は、例えば、比
較・判定処理後に撮像部1から与えられる1フレーム画
像転送終了信号、すなわち垂直同期信号VSYNにより報知
させることができる。The judgment result of the comparison / judgment processing can be notified by, for example, a one-frame image transfer end signal given from the image pickup unit 1 after the comparison / judgment processing, that is, a vertical synchronization signal VSYN.
【0041】次に、本発明における処理時間について説
明する。ここでは命令1ステップ当たりのMPUの処理
時間を従来技術と同様に0.1μSとし、例えば、図3
や図11のように、二次元画像内に3個の画像パターン
が存在し、1画像パターン当たり10ライン分のデータ
を記憶すると仮定する。なお、1画像パターン当たり記
憶するデータのライン数は、適宜間引くことができ、比
較対象とする基準画像パターンのデータも同様に間引い
ておけば比較上で問題とはならない。Next, the processing time in the present invention will be described. Here, the processing time of the MPU per one step of the instruction is set to 0.1 μS as in the prior art, and as shown in FIG.
As shown in FIG. 11 and FIG. 11, it is assumed that there are three image patterns in the two-dimensional image and data of 10 lines is stored for each image pattern. The number of lines of data to be stored per image pattern can be appropriately thinned out, and if the data of the reference image pattern to be compared is also thinned out, there is no problem in comparison.
【0042】一般的に、処理時間Tは、T=(命令1ス
テップ当たりのMPUの処理時間×1処理のステップ数
×全体の処理数)で表される。標準化スタート位置およ
びストップ位置を求めて結果メモリ18に書き込む処理
は、1ラインにつき最大で7ステップ(S2−S5−S
6−S7−S8−S10−S11)であり、3個の画像
パターンそれぞれにつき10ラインの処理が必要である
から、標準化に要する処理時間T1は、T1=0.1
(μS)×7×10×3=0.021(mS)となる。Generally, the processing time T is represented by T = (processing time of MPU per instruction step × number of steps of one processing × total number of processing). The process of obtaining the standardized start position and stop position and writing them in the result memory 18 is a maximum of 7 steps per line (S2-S5-S).
6-S7-S8-S10-S11) and processing of 10 lines is required for each of the three image patterns, the processing time T1 required for standardization is T1 = 0.1.
(ΜS) × 7 × 10 × 3 = 0.021 (mS).
【0043】また、比較・判定処理における比較処理の
ステップは、1ラインにつき6ステップ(S101〜S
106)であり、判定処理のステップは、3ステップ
(S107−S108−S109あるいはS107−S
108−110)であるから、比較・判定に要する処理
時間T2は、T2=0.1(μS)×6×10×3+
0.1(μS)×3×3=0.0189(mS)とな
る。The steps of the comparison process in the comparison / judgment process are 6 steps per line (S101 to S101).
106), and the steps of the determination process are three steps (S107-S108-S109 or S107-S).
108-110), the processing time T2 required for comparison / determination is T2 = 0.1 (μS) × 6 × 10 × 3 +
It becomes 0.1 (μS) × 3 × 3 = 0.189 (mS).
【0044】全体の処理時間Tは、T=T1+T2=
0.0399(mS)であり、これは、1水平線期間
(0.064(mS))の時間より小さい。したがっ
て、本発明では、1水平線期間以上の期間を有する垂直
ブランキング期間での処理が可能になり、続いて入力さ
れる二次元画像に基づきパターンマッチング処理を実行
させることができる。The total processing time T is T = T1 + T2 =
0.0399 (mS), which is less than one horizontal line period (0.064 (mS)). Therefore, according to the present invention, the processing can be performed in the vertical blanking period having a period of one horizontal line or more, and the pattern matching process can be executed based on the subsequently input two-dimensional image.
【0045】次に、本発明の車両における警報報知への
応用について簡単に説明する。本発明が適用された装置
を、信号機が含まれる領域の二次元画像の画像信号を出
力するように撮像部1を指向させて車両に搭載する。な
お、撮像部1はカラー画像信号を出力するものとする。
また、装置は車両に固定的に搭載されるものではなく携
帯可能にすることもできる。基準画像パターンを、例え
ば赤信号のパターンとし、ラスタ走査各ラインにおけ
る、そのスタート位置およびストップ位置を基準メモリ
19に格納しておく。Next, the application of the present invention to alarm notification in a vehicle will be briefly described. The device to which the present invention is applied is mounted on a vehicle with the imaging unit 1 oriented so as to output an image signal of a two-dimensional image of a region including a traffic signal. The image pickup unit 1 outputs a color image signal.
Also, the device may be portable rather than fixedly mounted in the vehicle. The reference image pattern is, for example, a red signal pattern, and the start position and the stop position of each raster scanning line are stored in the reference memory 19.
【0046】撮像部1が出力するカラー画像信号の各カ
ラー成分についてのラスタ走査各ラインにおけるスター
ト位置およびストップ位置を検出、標準化し、基準画像
パターン、すなわち赤信号のパターンについての標準化
スタート位置およびストップ位置と比較し、両者の一致
判定を行う。信号機の信号の大きさ、パターンおよびそ
の色は予め分かっているため、車両が走行して信号機か
ら所定距離になり、形状、視覚的大きさおよび色におい
て信号のパターンが基準パターンと一致すると、両パタ
ーンのラスタ走査各ラインにおけるスタート位置および
ストップ位置の一致判定がなされ、その旨が報知され
る。すなわち、車両が赤信号に所定距離に近づくとその
旨を報知させることができる。The start position and the stop position in each raster scanning line for each color component of the color image signal output from the image pickup unit 1 are detected and standardized, and the standardized start position and stop for the reference image pattern, that is, the red signal pattern are detected. The position is compared to determine whether they match. Since the signal magnitude, pattern, and its color of the traffic light are known in advance, if the vehicle runs at a predetermined distance from the traffic light and the shape, visual magnitude, and color of the signal pattern match the reference pattern, both Matching of the start position and the stop position on each line of the raster scan of the pattern is determined, and the fact is notified. That is, when the vehicle approaches the red light, the fact can be notified when the vehicle approaches the predetermined distance.
【0047】報知される信号機からの距離は、基準画像
パターンの大きさを変えることにより変えることができ
る。なお、黄信号のパターンを判定するようにすること
もでき、画像信号に基づいて色も判別することにより青
信号、黄信号、赤信号で報知内容を異ならせるようにす
ることもできる。また、撮像に際し周囲光などの影響が
ある場合にはダイナミック・バイアス・コントロールな
どの周知の光量補償手段を採用すればよい。The distance from the traffic light to be notified can be changed by changing the size of the reference image pattern. Note that the pattern of the yellow signal may be determined, and the notification content may be different for the blue signal, the yellow signal, and the red signal by determining the color based on the image signal. Further, when the image pickup is affected by ambient light or the like, well-known light amount compensation means such as dynamic bias control may be adopted.
【0048】本発明は、上記で説明したような車両のみ
ならず、基準パターンを適宜選択することにより、プラ
ントでの作業者、老人や子供、あるいは身障者などが自
分自身の危険を早期に察知し、安全を確保するための防
犯・防災機器やロボット等への応用が可能である。In the present invention, not only the vehicle as described above, but also a worker in a plant, an old man or a child, or a physically handicapped person can detect his or her own danger early by appropriately selecting a reference pattern. It can be applied to crime prevention / disaster prevention equipment and robots to ensure safety.
【0049】なお、本発明が適用される装置は、車両用
やプラント用、あるいは個人用個々に専用に構成される
ものでなくてもよく、携帯可能に構成し、処理プログラ
ムや基準パターン、報知内容を書き替え可能にしたり、
ROMの入れ替えなどで変えることができるようにすれ
ば、必要な箇所で適宜使用可能な汎用性のある装置とし
て構成することもできる。The device to which the present invention is applied may not be exclusively configured for a vehicle, a plant, or an individual, but may be configured to be portable so as to have a processing program, a reference pattern, and a notification. You can rewrite the contents,
If it can be changed by replacing the ROM, etc., it can be configured as a general-purpose device that can be appropriately used in a necessary place.
【0050】[0050]
【発明の効果】以上の説明から明らかなように、本発明
によれば、二次元画像内の画像パターンと基準画像パタ
ーンとの異同の比較・判定をフレームメモリを用いるこ
となく行うことができるため、携帯可能な小型のハード
ウエアで装置を構成することができ、また、高速で比較
・判定することができるため、パターンマッチング装置
と二次元画像の対象領域が相対的に移動しているような
場合にも、小さい時間間隔で得られかつリアルタイムに
近い二次元画像に基づいて両パターンの異同を比較・判
定することができる。As is apparent from the above description, according to the present invention, it is possible to compare and determine the difference between the image pattern in the two-dimensional image and the reference image pattern without using a frame memory. Since the device can be configured with portable small hardware and the comparison and determination can be performed at high speed, the pattern matching device and the target area of the two-dimensional image are relatively moved. Also in this case, it is possible to compare and determine the difference between both patterns based on a two-dimensional image obtained at small time intervals and close to real time.
【図1】 本発明が適用されたパターンマッチング処理
装置の一実施形態を示すブロック図である。FIG. 1 is a block diagram showing an embodiment of a pattern matching processing device to which the present invention is applied.
【図2】 図1の画像処理部およびスタート位置・スト
ップ位置検出部の一具体例を示すブロック図である。FIG. 2 is a block diagram showing a specific example of an image processing unit and a start position / stop position detection unit in FIG.
【図3】 二次元画像の一例の説明図である。FIG. 3 is an explanatory diagram of an example of a two-dimensional image.
【図4】 図3の二次元画像における画像パターンのス
タート位置およびストップ位置の具体的数値の一例の説
明図である。4 is an explanatory diagram of an example of specific numerical values of a start position and a stop position of an image pattern in the two-dimensional image of FIG.
【図5】 標準化スタート位置およびストップ位置を求
める処理手順の一例を示すフローチャートである。FIG. 5 is a flowchart showing an example of a processing procedure for obtaining a standardized start position and a stop position.
【図6】 二次元画像内の画像パターンおよび標準画像
パターンについての標準化スタート位置およびストップ
位置の一例の説明図である。FIG. 6 is an explanatory diagram of an example of standardized start positions and stop positions for an image pattern and a standard image pattern in a two-dimensional image.
【図7】 図1の比較・判定部の一例を示す機能構成図
である。FIG. 7 is a functional configuration diagram showing an example of a comparison / determination unit in FIG. 1.
【図8】 比較・判定の処理手順の一例を示すフローチ
ャートである。FIG. 8 is a flowchart illustrating an example of a comparison / determination processing procedure.
【図9】 従来のパターンマッチング処理方法が適用さ
れた装置のブロック図である。FIG. 9 is a block diagram of an apparatus to which a conventional pattern matching processing method is applied.
【図10】 図9のフレームメモリおよびその周辺回路
の詳細なブロック図である。FIG. 10 is a detailed block diagram of the frame memory of FIG. 9 and its peripheral circuits.
【図11】 図9における比較・判定処理の説明図であ
る。FIG. 11 is an explanatory diagram of a comparison / determination process in FIG.
1・・・撮像部、2・・・画像処理部、3・・・フレームメモ
リ、4・・・基準メモリ、5、10・・・比較・判定部、6、
20・・・比較器、7・・・書き込みタイミング制御回路、8
・・・MPU、9・・・スタート・ストップ位置検出部、12
・・・白エッジ検出回路、13・・・記憶領域切替回路、14
・・・ピクセルカウンタ、15・・・Vブランキング期間検出
回路、16・・・メモリ、17・・・書き込みアドレスカウン
タ、18・・・結果メモリ、19・・・基準メモリ、21・・・
一致カウンタ、22・・・計数カウンタ、23・・・一致率計
算部1 ... Imaging unit, 2 ... Image processing unit, 3 ... Frame memory, 4 ... Reference memory, 5, 10 ... Comparison / determination unit, 6,
20 ... Comparator, 7 ... Write timing control circuit, 8
... MPU, 9 ... Start / stop position detector, 12
... White edge detection circuit, 13 ... Storage area switching circuit, 14
... Pixel counter, 15 ... V blanking period detection circuit, 16 ... Memory, 17 ... Write address counter, 18 ... Result memory, 19 ... Reference memory, 21 ...
Matching counter, 22 ... Counting counter, 23 ... Matching rate calculation unit
Claims (5)
パターンとの異同を判定するパターンマッチング処理方
法において、 二次元画像をラスタ走査して得られる画像信号を二値化
し、二次元画像内の画像パターンの二値化画像信号にお
けるラスタ走査各ライン上におけるスタート位置および
ストップ位置を検出し、 該検出されたスタート位置およびストップ位置を標準化
して標準化スタート位置およびストップ位置を求め、 画像パターンについての標準化スタート位置およびスト
ップ位置と予め記憶された基準画像パターンについての
標準化スタート位置およびストップ位置とを比較し、 該比較結果により画像パターンと基準画像パターンとの
異同を判定することを特徴とするパターンマッチング処
理方法。1. A pattern matching processing method for determining the difference between an image pattern in a two-dimensional image and a reference image pattern, wherein an image signal obtained by raster-scanning a two-dimensional image is binarized, A start position and a stop position on each raster scanning line in the binarized image signal of the image pattern are detected, and the detected start position and stop position are standardized to obtain a standardized start position and a stop position. Pattern matching characterized in that the standardized start position and stop position are compared with the standardized start position and stop position for a reference image pattern stored in advance, and the difference between the image pattern and the reference image pattern is determined by the comparison result. Processing method.
れる最上位のライン上のスタート位置をゼロとするもの
であることを特徴とする請求項1または2に記載のパタ
ーンマッチング処理方法。2. The pattern matching processing method according to claim 1, wherein the standardization is to set the start position on the uppermost line where the pattern is raster-scanned to zero.
からの距離で表されることを特徴とする請求項1ないし
3のいずれかに記載のパターンマッチング処理方法。3. The pattern matching processing method according to claim 1, wherein the stop position is represented by a distance from the start position.
を特徴とする請求項4に記載のパターンマッチング処理
方法。4. The pattern matching processing method according to claim 4, wherein the distance is represented by the number of pixels.
ー画像の各カラー成分についてパターンマッチング処理
を行うことを特徴とする請求項1ないし5のいずれかに
記載のパターンマッチング処理方法。5. The pattern matching processing method according to claim 1, wherein the two-dimensional image is a color image, and pattern matching processing is performed for each color component of the color image.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002060466A JP2003256837A (en) | 2002-03-06 | 2002-03-06 | Pattern matching processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002060466A JP2003256837A (en) | 2002-03-06 | 2002-03-06 | Pattern matching processing method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2003256837A true JP2003256837A (en) | 2003-09-12 |
Family
ID=28669813
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2002060466A Pending JP2003256837A (en) | 2002-03-06 | 2002-03-06 | Pattern matching processing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2003256837A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106388865A (en) * | 2016-11-26 | 2017-02-15 | 汕头市超声仪器研究所有限公司 | Method for guiding to acquire ultrasonic tangent-plane image by manpower |
-
2002
- 2002-03-06 JP JP2002060466A patent/JP2003256837A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106388865A (en) * | 2016-11-26 | 2017-02-15 | 汕头市超声仪器研究所有限公司 | Method for guiding to acquire ultrasonic tangent-plane image by manpower |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7986812B2 (en) | On-vehicle camera with two or more angles of view | |
| US8792681B2 (en) | Imaging system and imaging method | |
| EP0400607A2 (en) | Infrared monitoring system | |
| JP5264457B2 (en) | Object detection device | |
| EP0359838A1 (en) | Pattern recognition device | |
| JP2001043383A (en) | Image monitoring system | |
| JP2003256837A (en) | Pattern matching processing method | |
| JP2005070985A (en) | Image processing apparatus and method, and program | |
| JPH0514891A (en) | Image monitoring device | |
| JP3779229B2 (en) | Identification method, identification device, and traffic control system | |
| JP2007139564A (en) | Obstacle detection system, obstacle detection method, and computer program | |
| KR102248673B1 (en) | Method for identificating traffic lights, device and program using the same | |
| JPH09161056A (en) | Circular container inner surface inspection method | |
| JP2002330354A (en) | Defective pixel detection and correction device, defective pixel detection and correction method, defective pixel detection and correction program, and video signal processing device | |
| JP2000193437A (en) | Method and system for inspecting pattern defect of keyboard of various electronic devices, and computer- readable recording medium where pattern defect inspection program is recorded | |
| JPH04196993A (en) | Image monitor device | |
| JPS6211984A (en) | Picture binary coding system | |
| JP2003322521A (en) | Image recognition device | |
| JP2000067163A (en) | Specific route bus detection method and device | |
| JPS6365347A (en) | Singular point detecting method by image processing | |
| JPH0916751A (en) | Obstacle detection method | |
| JP2006134339A (en) | Identification method, identification device, and traffic control system | |
| JPH07154807A (en) | Convergence adjusting device | |
| JPH0129643Y2 (en) | ||
| JPH0844852A (en) | Image processor |