[go: up one dir, main page]

JP3126491B2 - Pattern recognition method - Google Patents

Pattern recognition method

Info

Publication number
JP3126491B2
JP3126491B2 JP04156865A JP15686592A JP3126491B2 JP 3126491 B2 JP3126491 B2 JP 3126491B2 JP 04156865 A JP04156865 A JP 04156865A JP 15686592 A JP15686592 A JP 15686592A JP 3126491 B2 JP3126491 B2 JP 3126491B2
Authority
JP
Japan
Prior art keywords
pattern
value
section
target
target pattern
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP04156865A
Other languages
Japanese (ja)
Other versions
JPH064710A (en
Inventor
利澄 徳永
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.)
Mazda Motor Corp
Original Assignee
Mazda Motor 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 Mazda Motor Corp filed Critical Mazda Motor Corp
Priority to JP04156865A priority Critical patent/JP3126491B2/en
Publication of JPH064710A publication Critical patent/JPH064710A/en
Application granted granted Critical
Publication of JP3126491B2 publication Critical patent/JP3126491B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)
  • Character Discrimination (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、ビデオカメラを用いて
撮像して得られた対象パターンを認識するパターン認識
方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a pattern recognition method for recognizing a target pattern obtained by capturing an image using a video camera.

【0002】[0002]

【従来の技術】従来、ビデオカメラを用いて撮像して得
られた対象パターンと、予め定めた基準パターンとを比
較し、これらのパターンが一致するかどうかによって上
記対象パターンの欠陥を検出する方法が提案されている
(特開昭60−154104号公報)。
2. Description of the Related Art Conventionally, a method of comparing a target pattern obtained by imaging using a video camera with a predetermined reference pattern and detecting a defect of the target pattern based on whether or not these patterns match. Has been proposed (JP-A-60-154104).

【0003】そして、この方法を利用して車体のカウル
パネル等の所定部位に刻印された車体番号等の打刻文字
を認識する方法がある。すなわち、この打刻文字の認識
方法では、上記打刻文字をビデオカメラを用いて撮像
し、得られた画像(対象パターン)を、例えば縦横に5
分割して25区画(領域)に区分けし、これらの各区画
内の濃淡レベルに応じて各区画の識別値を3段階に分類
する。また、この対象パターンに対応させて25区画に
分割し、これらの各区画に判定値を予め設定した基準パ
ターンが予め記憶されており、上記分類された対象パタ
ーンの各区画の識別値と、上記基準パターンの対応する
区画の判別値とを比較し、これらが一致するかどうかを
判別して、打刻文字が正確に刻印されているかどうかを
認識するようにしている。
There is a method of recognizing an embossed character such as a car body number imprinted on a predetermined portion such as a cowl panel of a car body using this method. That is, in this embossed character recognition method, the embossed character is imaged by using a video camera, and the obtained image (target pattern) is, for example, vertically and horizontally.
It is divided into 25 sections (areas), and the identification value of each section is classified into three levels according to the gray level in each section. In addition, the target pattern is divided into 25 sections, and a reference pattern in which a judgment value is preset in each section is stored in advance, and the identification value of each section of the classified target pattern is The discrimination values of the corresponding sections of the reference pattern are compared with each other to determine whether or not they match, thereby recognizing whether or not the embossed characters are correctly imprinted.

【0004】ところが、照明器、ビデオカメラ及び上記
打刻文字の相互の位置関係、照明光の明るさ、外乱光の
影響、上記打刻文字の欠け等の諸条件により、上記打刻
文字の陰影の付き方が必ずしも一定しないため、上記対
象パターンにあっては撮影毎に濃淡を示す識別値が変動
する区画が生じる。この結果、正確に刻印されているに
も拘らず、対象パターンの識別値と基準パターンの判別
値とが一致しない場合がある。
However, the shading of the embossed character is affected by various conditions such as the mutual positional relationship between the illuminator, the video camera and the embossed character, the brightness of the illumination light, the influence of disturbance light, and the lack of the embossed character. Is not always constant, so that in the above-mentioned target pattern, there is a section in which the identification value indicating the shading varies for each photographing. As a result, in some cases, the identification value of the target pattern does not match the discrimination value of the reference pattern, despite the fact that the marking is made correctly.

【0005】この対策として、上記基準パターンに代え
て上記変動が生じる区画を比較対象から除外した(マス
クした)マスクパターンを予め設定し、このマスクパタ
ーンの判別値と上記対象パターンの識別値とを比較し、
これらが一致するかどうかを判別することにより、パタ
ーン認識の向上をさせることが考えられる。
As a countermeasure against this, instead of the above-mentioned reference pattern, a mask pattern which excludes (masks) the section in which the above-mentioned variation occurs from the comparison target is set in advance, and the discrimination value of the mask pattern and the identification value of the above-mentioned target pattern are set. Compare,
It is conceivable to improve pattern recognition by determining whether or not they match.

【0006】[0006]

【発明が解決しようとする課題】ところが、上述した外
乱光の影響等の諸条件による上記対象パターンの変動が
大きい場合、上記マスクパターンと上記対象パターンと
の比較によっても、マスクパターンの判別値と上記対象
パターンの識別値とが必ずしも一致するとは限らない。
However, when the target pattern greatly fluctuates due to various conditions such as the influence of disturbance light, the discrimination value of the mask pattern can be obtained by comparing the mask pattern with the target pattern. The identification value of the target pattern does not always match.

【0007】本発明は、上記問題を解決するもので、対
象パターンを正確に認識することができるパターン認識
方法を提供することを目的とする。
An object of the present invention is to solve the above problem and to provide a pattern recognition method capable of accurately recognizing a target pattern.

【0008】[0008]

【課題を解決するための手段】上記目的を達成するため
に、本発明は、検出手段により対象パターンを検出し、
この対象パターンを分割し、得られた各領域について上
記対象パターンの濃淡レベルに応じた識別値をそれぞれ
設定し、この対象パターンの各領域の識別値と、上記対
象パターンに対応させて分割して各領域について判別値
を予め設定した比較パターンの各領域の判別値とを比較
し、上記比較パターンの各領域の判別値と上記対象パタ
ーンの対応する領域の判別値との一致度で上記対象パタ
ーンに対応するパターンを判別するパターン認識方法に
おいて、上記比較パターンとしては、パターン内の予め
設定した領域を上記識別値と上記判定値との比較対象か
ら除外したマスクパターンと、パターン内の全ての領域
で上記識別値と上記判定値とを比較する複数種類の基準
パターンとを設定し、上記マスクパターンの判定値が上
記対象パターンの識別値に一致しなかった場合に、上記
基準パターンの判定値と上記対象パターンの識別値とを
比較し、上記基準パターンの判定値と上記対象パターン
の識別値とが一致する領域が最も多い基準パターンを選
択し、この選択された基準パターンに基づいてパターン
の判別を行なうものである。
In order to achieve the above object, the present invention detects a target pattern by detecting means,
The target pattern is divided, and an identification value corresponding to the gray level of the target pattern is set for each of the obtained regions, and the identification value of each region of the target pattern is divided according to the target pattern. The discrimination value of each area is compared with the discrimination value of each area of the comparison pattern in which the discrimination value is set in advance. In the pattern recognition method for determining a pattern corresponding to the above, as the comparison pattern, a mask pattern in which a preset area in the pattern is excluded from a comparison target between the identification value and the determination value, and all areas in the pattern Sets a plurality of types of reference patterns for comparing the identification value and the determination value, and determines the mask pattern determination value of the target pattern. If the values do not match the different values, the determination value of the reference pattern is compared with the identification value of the target pattern, and the reference value in which the determination value of the reference pattern matches the identification value of the target pattern is the largest. A pattern is selected, and the pattern is determined based on the selected reference pattern.

【0009】[0009]

【作用】上記パターン認識方法によれば、マスクパター
ンの各領域の判定値が対象パターンの対応する領域の識
別値に一致した場合には、このマスクパターンが対象パ
ターンに対応するパターンであると判断され、一方、マ
スクパターンの判定値が対象パターンの識別値に一致し
なかった場合には、複数の基準パターンの各領域の判定
値と対象パターンの対応する領域の識別値とがそれぞれ
比較され、基準パターンの判定値と対象パターンの識別
値が一致する領域が最も多い基準パターンが選択され、
この選択された基準パターンに基づいてパターンの判別
が行なわれることにより、パターン認識の精度が向上
し、対象パターンを正確に認識することができるととも
に、パターン認識が迅速に行なえる。
According to the above pattern recognition method, when the judgment value of each area of the mask pattern matches the identification value of the corresponding area of the target pattern, it is determined that the mask pattern is a pattern corresponding to the target pattern. On the other hand, when the determination value of the mask pattern does not match the identification value of the target pattern, the determination value of each region of the plurality of reference patterns is compared with the identification value of the corresponding region of the target pattern, The reference pattern having the largest number of regions where the judgment value of the reference pattern matches the identification value of the target pattern is selected,
By performing pattern discrimination based on the selected reference pattern, the accuracy of pattern recognition is improved, the target pattern can be accurately recognized, and the pattern recognition can be performed quickly.

【0010】[0010]

【実施例】図1は、自動車製造ラインにおいて、各車体
に車体番号を刻印する刻印ステーションの構成の一実施
例を示すブロック図である。この刻印ステーションは、
刻印ステーションに搬入されてきた車体に英数字等から
なる車体番号を刻印する刻印ブロック2と、上記刻印さ
れた車体番号を認識する刻印認識ブロック3とから構成
されている。また、刻印ステーションには、ラインコン
トローラ10が接続され、このラインコントローラ10
によって車体組立ライン全体の制御が行なわれるように
なっている。
FIG. 1 is a block diagram showing an embodiment of a configuration of a marking station for marking a vehicle number on each vehicle body in an automobile manufacturing line. This engraving station
It is composed of an engraving block 2 for engraving a vehicle number consisting of alphanumeric characters and the like on a vehicle carried into the engraving station, and an engraving recognition block 3 for recognizing the engraved vehicle number. A line controller 10 is connected to the engraving station.
This controls the entire vehicle assembly line.

【0011】また、上記刻印ブロック2には、刻印機4
と刻印コントローラ5とが配設され、上記刻印認識ブロ
ック3には、照明器6とビデオカメラ7と画像処理部8
とディスプレイ9とが配設されている。
The marking block 2 includes a marking machine 4.
And a marking controller 5. The marking recognition block 3 includes an illuminator 6, a video camera 7, and an image processing unit 8.
And a display 9 are provided.

【0012】上記刻印コントローラ5は、マイクロコン
ピュータ等からなり、工場内のホストコンピュータ1か
ら、車種に応じて設定した車体番号等のデータが入力さ
れることにより、このデータに基づいて刻印機4を制御
するものである。刻印機4は、上記刻印コントローラ5
からの制御信号に応じてカウルパネル等の所定部位に上
記車体番号を刻印するものである。
The engraving controller 5 comprises a microcomputer or the like. When data such as a vehicle number set according to the type of vehicle is input from the host computer 1 in the factory, the engraving machine 4 is operated based on the data. To control. The engraving machine 4 includes the engraving controller 5
The vehicle number is engraved on a predetermined portion such as a cowl panel in response to a control signal from the vehicle.

【0013】上記照明器6は、刻印認識ブロック3に搬
入された車体の打刻箇所に照明光を照射することによ
り、刻印文字に陰影を付けさせるものである。ビデオカ
メラ7(検出手段)は上記照明器6によって照射された
刻印文字を検出すべく撮像するものである。画像処理部
8は、マイクロコンピュータ等からなり、上記ビデオカ
メラ7によって撮像された上記打刻文字からなる対象パ
ターンに基づいて上記刻印された車体番号の認識を行な
うものである。ディスプレイ9は上記認識結果等を表示
するものである。
The illuminator 6 illuminates the stamped portion of the car body carried into the stamp recognition block 3 with illumination light, thereby shading the stamped character. The video camera 7 (detection means) captures images to detect the engraved characters emitted by the illuminator 6. The image processing unit 8 includes a microcomputer or the like, and recognizes the carved body number imprinted on the basis of a target pattern including the embossed characters captured by the video camera 7. The display 9 displays the recognition result and the like.

【0014】次に、上記刻印ステーションにおける制御
動作について図2のフローチャートを用いて説明する。
まず、製造ラインが始動され、ラインコントローラ10
による制御が開始されると、刻印ブロック2に車体が搬
送される。次いで、ホストコンピュータ1からのデータ
に基づいて英数字等からなる車体番号が車体の所定部位
に刻印機4によって刻印される(ステップS1)。
Next, the control operation in the marking station will be described with reference to the flowchart of FIG.
First, the production line is started, and the line controller 10 is started.
Is started, the vehicle body is conveyed to the marking block 2. Next, based on data from the host computer 1, a vehicle body number composed of alphanumeric characters and the like is stamped on a predetermined portion of the vehicle body by the stamping machine 4 (step S1).

【0015】この後、上記車体番号(打刻文字)がビデ
オカメラ7で撮像され、上記撮像された画像が対象パタ
ーン毎に画像処理部8のウィンドウ内に取り込まれる
(ステップS2)。続いて、画像処理部8により上記ウ
ィンドウ内の各画素が濃淡に応じて2値化され、更にノ
イズが除去される(ステップS3,S4)。
Thereafter, the vehicle body number (imprinted character) is captured by the video camera 7, and the captured image is taken into the window of the image processing unit 8 for each target pattern (step S2). Subsequently, the image processing unit 8 binarizes each pixel in the window in accordance with shading, and further removes noise (steps S3 and S4).

【0016】次いで、画像処理部8により上記打刻文字
に対応する対象パターンTが、図3に示すように、例え
ば縦横に5分割されて25区画に区分され、これらの各
区画Kが後述する方法により、当該区画内の2値化デー
タに応じて“0”,“1”,“2”の識別値のいずれか
に分類され、各区画Kに対応付けられて記憶される(ス
テップS5,S6)。なお、ステップS5,S6の詳細
な動作については後述する。
Next, as shown in FIG. 3, the target pattern T corresponding to the embossed character is divided vertically and horizontally into five sections by the image processing section 8 and divided into 25 sections, and these sections K will be described later. According to the method, it is classified into one of the identification values “0”, “1”, and “2” according to the binarized data in the section, and stored in association with each section K (step S5). S6). The detailed operations of steps S5 and S6 will be described later.

【0017】続いて、上記車体番号に対応するマスクパ
ターンM(図4参照)が不図示のメモリから読み出され
る。このマスクパターンMは、例えば図4に示すよう
に、対象パターンTに対応させて25区画(領域)に分
割されており、各区画K0には、予め設定された判定値
“0”,“1”,“2”及び後述するマスク区画Wを示
す判定値“5”が割り当てられている。
Subsequently, a mask pattern M (see FIG. 4) corresponding to the vehicle number is read from a memory (not shown). This mask pattern M is divided into 25 sections (areas) corresponding to the target pattern T, as shown in FIG. 4, for example, and each of the sections K0 has a predetermined determination value “0”, “1”. , "2" and a determination value "5" indicating a mask section W to be described later.

【0018】そして、画像処理部8は、上記対象パター
ンTの区画Kの識別値とマスクパターンMの区画K0の
判定値とを比較する(ステップS7)。すなわち、マス
クパターンMの区画K0が判定値“0”,“1”,
“2”のいずれかであれば、対応する対象パターンTの
区画Kの識別値と一致するかどうかの比較を行なう。ま
た、上記区画K0が判定値“5”であれば、マスク区画
Wとして対応する対象パターンTの区画Kとの比較を行
なわないようにしている。このようにマスク区画Wを設
けたのは、上記対象パターンTにあっては、照明光の明
るさ、外乱光の影響等により、撮影毎に識別値が変動す
る区画が生じ、このため車体番号が正常に刻印されてい
るにも拘らず上記対象パターンTが車体番号に対応して
いないと誤認識される場合があるからである。なお、マ
スクパターンMの各区画K0の判定値は、サンプルの対
象パターンを複数回読み取って各区画K0の打刻文字を
示す2値化データのトータル数を求めることにより設定
されるとともに、上記2値化データのトータル数の変動
が所定値以上である区画を検出することによりマスク区
画Wを示す値“5”が設定される。
The image processing section 8 compares the identification value of the section K of the target pattern T with the determination value of the section K0 of the mask pattern M (step S7). In other words, the section K0 of the mask pattern M has the determination values “0”, “1”,
If it is any of “2”, a comparison is made as to whether or not it matches the identification value of the corresponding section K of the target pattern T. When the section K0 is the determination value “5”, the comparison with the section K of the target pattern T corresponding to the mask section W is not performed. The reason why the mask section W is provided in the target pattern T is that the identification value fluctuates for each photographing due to the brightness of illumination light, the influence of disturbance light, and the like. This is because the target pattern T may be erroneously recognized as not corresponding to the vehicle body number even though is normally imprinted. The judgment value of each section K0 of the mask pattern M is set by reading the target pattern of the sample a plurality of times and calculating the total number of binarized data indicating the embossed characters of each section K0. The value “5” indicating the mask section W is set by detecting a section in which the total number of quantified data changes by a predetermined value or more.

【0019】続いて、上述したマスク区画W以外の区画
K0の判定値と、対応する対象パターンTの区画Kの識
別値とが全て一致するかどうかが判別され(ステップS
8)、上記各区画K0の判定値と上記各区画Kの識別値
とが全て一致すると(ステップS8でYES)、画像処
理部8は、上記打刻文字が正しい車体番号であると判断
し、例えばディスプレイ9へOK信号を出力する(ステ
ップS9)。ディスプレイ9は、このOK信号に基づい
て当該車体番号が正常に刻印されている旨を表示する。
Subsequently, it is determined whether or not the determination values of the section K0 other than the mask section W and the identification values of the corresponding section K of the target pattern T all match (step S).
8) When the determination value of each section K0 and the identification value of each section K all match (YES in step S8), the image processing section 8 determines that the embossed character is a correct vehicle number, For example, an OK signal is output to the display 9 (step S9). The display 9 displays that the vehicle number is normally engraved based on the OK signal.

【0020】次に、全打刻文字に対して上記ステップS
9までの認識処理が終了したかどうかが判別され(ステ
ップS10)、上記認識処理の終了していない打刻文字
があれば(ステップS10でNO)、ステップS5に戻
る。一方、全ての打刻文字に対して上記ステップS9ま
での認識処理が終了した場合には、ステップS10でY
ESとなり、当該車体が他のステーション等へ搬送され
る。この後、次の車体に対して上記ステップS1からの
処理が行なわれる。
Next, the above-described step S is performed for all the embossed characters.
It is determined whether or not the recognition processing up to 9 has been completed (step S10). If there is any embossed character for which the recognition processing has not been completed (NO in step S10), the process returns to step S5. On the other hand, if the recognition processing up to step S9 has been completed for all the embossed characters, Y is determined in step S10.
It becomes ES, and the vehicle body is transported to another station or the like. Thereafter, the processing from step S1 is performed on the next vehicle body.

【0021】一方、上記区画K0の判定値と上記区画K
の識別値とが一致しない区画があれば(ステップS8で
NO)、車体番号として刻印され得る全ての英数字等に
対応する複数の基準パターンNが画像処理部8により不
図示のメモリから順次読み出される。この基準パターン
Nは、例えば図5に示すように、対象パターンTに対応
させて25区画に分割されており、各区画K1には、予
め設定された判定値“0”,“1”,“2”が割り当て
られている。そして、これらの基準パターンNの各区画
K1の判定値と、対応する対象パターンTの各区画Kの
識別値とがそれぞれ比較される(ステップS11)。な
お、各基準パターンNの各区画K1の判定値は、サンプ
ルの対象パターンを複数回読み取り、この読み取り毎に
各区画K1内の打刻文字を示す2値化データのトータル
数を求め、この2値化データのトータル数を区画K1毎
に平均することにより、この平均値に基づいて設定され
る。
On the other hand, the judgment value of the section K0 and the section K
If there is a section where the identification value does not match (NO in step S8), a plurality of reference patterns N corresponding to all the alphanumeric characters and the like that can be engraved as the vehicle body number are sequentially read from a memory (not shown) by the image processing unit 8. It is. For example, as shown in FIG. 5, the reference pattern N is divided into 25 sections corresponding to the target pattern T, and each section K1 has a predetermined determination value “0”, “1”, “1”. 2 "is assigned. Then, the determination value of each section K1 of the reference pattern N is compared with the identification value of each section K of the corresponding target pattern T (step S11). The determination value of each section K1 of each reference pattern N is obtained by reading the target pattern of the sample a plurality of times, obtaining the total number of binarized data indicating the embossed characters in each section K1 for each reading. By averaging the total number of quantified data for each section K1, it is set based on this average value.

【0022】そして、上記基準パターンNの内、上記対
象パターンTの識別値と対応する基準パターンNの判定
値とが一致する区画数が最も多い基準パターンNが抽出
される(ステップS12)。続いて、この最も多く一致
する基準パターンNが上記車体番号に対応する基準パタ
ーンNであるかどうかが判別され(ステップS13)、
上記最も多く一致する基準パターンNが車体番号に対応
する基準パターンNの場合(ステップS13でYE
S)、画像処理部8は車体番号が正常に刻印されている
と判断して、ステップS9へ移行する。
Then, among the reference patterns N, a reference pattern N having the largest number of sections where the identification value of the target pattern T matches the determination value of the corresponding reference pattern N is extracted (step S12). Subsequently, it is determined whether or not the most matching reference pattern N is the reference pattern N corresponding to the vehicle number (step S13).
In the case where the above-mentioned most common reference pattern N is the reference pattern N corresponding to the vehicle body number (YE in step S13)
S), the image processing unit 8 determines that the vehicle number is normally imprinted, and proceeds to step S9.

【0023】一方、ステップS13で上記最も多く一致
する基準パターンNが上記車体番号に対応する基準パタ
ーンNでなければ(ステップS13でNO)、ステップ
S3〜ステップS13の処理が2回以上実行されたかど
うかが判別され(ステップS14)、上記実行が1回目
であれば(ステップS14でNO)、上記ステップS8
及びステップS13での不一致は、照明光の明るさ、外
乱光の影響等による可能性があるため、上述したステッ
プS3での2値化を行なうための閾値が変更される(ス
テップS15)。例えば、照明ランプの劣化により照明
光が暗くなることが想定される場合には、上記閾値は小
さくなるように変更される。この後、ステップS3に戻
る。
On the other hand, if it is determined in step S13 that the most matching reference pattern N is not the reference pattern N corresponding to the vehicle body number (NO in step S13), whether the processing in steps S3 to S13 has been performed twice or more. It is determined whether or not the above-described execution is the first time (NO in step S14).
Since the discrepancy at step S13 may be caused by the brightness of the illumination light, the influence of disturbance light, or the like, the threshold value for performing the binarization at step S3 is changed (step S15). For example, when it is assumed that the illumination light is darkened due to deterioration of the illumination lamp, the threshold is changed to be small. Thereafter, the process returns to step S3.

【0024】一方、ステップS14でステップS3〜ス
テップS13の処理が2回目以上実行された場合には
(ステップS14でYES)、画像処理部8により他の
打刻文字と誤認識されたか、あるいは対象パターンTを
認識することができない場合なので、ディスプレイ9へ
NG信号が出力される(ステップS16)。ディスプレ
イ9は、このNG信号に応じて刻印が認識できない旨を
表示する。これにより、作業者は、上記表示を認識して
当該車体に対して車体番号の訂正等の処理を行なう。
On the other hand, if the processing of steps S3 to S13 has been executed for the second time or more in step S14 (YES in step S14), whether the image processing unit 8 has erroneously recognized another embossed character, Since the pattern T cannot be recognized, an NG signal is output to the display 9 (step S16). The display 9 displays that the inscription cannot be recognized according to the NG signal. As a result, the worker recognizes the display and performs processing such as correcting the vehicle body number on the vehicle body.

【0025】続いて、上記ステップS5,S6の詳細な
動作について図6,図7のフローチャートを用いて説明
する。すなわち、上述したステップS3,S4で2値化
されてノイズが除去された対象パターンTの面積A、す
なわち対象パターンTの2値化データのトータル数が算
出される(ステップS21)。
Next, detailed operations of steps S5 and S6 will be described with reference to the flowcharts of FIGS. That is, the area A of the target pattern T from which noise has been removed by binarization in steps S3 and S4, that is, the total number of binarized data of the target pattern T is calculated (step S21).

【0026】次いで、この面積Aが、打刻文字である場
合の面積に相当するかどうか、すなわち、例えば60<
A<500であるかどうかが判別される(ステップS2
2)。上記面積Aが打刻文字の面積に相当しない場合
(ステップS22でNO)、例えば、面積Aが“60”
以下の場合にはノイズ等を、面積Aが“500”以上の
場合には外乱光等による影等を打刻文字と誤認したもの
なので、上記ステップS3に戻って、次の対象パターン
Tについて処理を行なう。
Next, whether the area A corresponds to the area in the case of embossed characters, that is, for example, 60 <
It is determined whether or not A <500 (step S2).
2). If the area A does not correspond to the area of the embossed character (NO in step S22), for example, the area A is "60".
In the following cases, noise and the like are mistakenly recognized as embossed characters when the area A is equal to or more than "500", and the process returns to step S3 to process the next target pattern T. Perform

【0027】一方、上記面積Aが打刻文字の面積に相当
する場合(ステップS22でYES)、照明光等による
陰影の付き方がパターン認識の認識精度に及ぼす影響を
低減させるため、上記対象パターンTの文字部分の線幅
を細める、いわゆる従来より知られている細線化処理が
行なわれる(ステップS23)。続いて、上記細線化さ
れた文字部分の面積B、すなわち文字部分に対応する2
値化データの個数が算出され(ステップS24)、この
面積Bが予め設定された所定値、例えば15以上かどう
かが判別される(ステップS25)。この面積Bが上記
所定値未満の場合(ステップS25でNO)、当該対象
パターンTは、ノイズ等を打刻文字と誤認識したものな
ので、上記ステップS3に戻って、次の対象パターンT
について処理を行なう。
On the other hand, if the area A corresponds to the area of the embossed character (YES in step S22), the target pattern is reduced in order to reduce the influence of shading by illumination light or the like on the recognition accuracy of pattern recognition. A so-called conventionally known thinning process for reducing the line width of the character portion of T is performed (step S23). Subsequently, the area B of the thinned character portion, that is, 2 corresponding to the character portion
The number of the quantified data is calculated (step S24), and it is determined whether or not the area B is equal to or larger than a predetermined value, for example, 15 (step S25). If the area B is less than the predetermined value (NO in step S25), since the target pattern T has erroneously recognized noise or the like as an embossed character, the process returns to step S3 to return to the next target pattern T
Is processed.

【0028】一方、上記面積Bが上記所定値以上の場合
(ステップS25でYES)、ステップS26で対象パ
ターンTにおいて文字としてパターン認識すべき領域を
更に限定し、その画像処理の開始座標を定める(周知の
特徴量抽出)。次に、この領域を25区画に分割すべ
く、縦横に5分割する(ステップS27)。
On the other hand, if the area B is equal to or larger than the predetermined value (YES in step S25), the area of the target pattern T to be recognized as a character in the target pattern T is further limited in step S26, and the starting coordinates of the image processing are determined ( Well-known feature extraction). Next, in order to divide this area into 25 sections, it is divided vertically and horizontally into five (step S27).

【0029】次いで、上記各区画K内の2値化データの
個数がカウントされ(ステップS28)、各区画Kの座
標が算出される(ステップS29)。そして、上記各区
画Kが順次、画像処理部8のウィンドウ内に取り込まれ
(ステップS30)、この区画K内の細線化された文字
部分の面積C及び当該区画Kの面積Dが求められ、これ
らの面積に基づいて面積比率E(=C/D)が演算され
る(ステップS31〜ステップS33)。
Next, the number of binarized data in each section K is counted (step S28), and the coordinates of each section K are calculated (step S29). Then, the sections K are sequentially taken into the window of the image processing section 8 (step S30), and the area C of the thinned character portion in the section K and the area D of the section K are obtained. The area ratio E (= C / D) is calculated based on the area (steps S31 to S33).

【0030】この面積比率Eが予め設定された第1の閾
値F1(例えば10%)以上の場合(ステップS34で
YES)、当該区画Kに識別値“2”が設定される(ス
テップS35)。
When the area ratio E is equal to or larger than a first threshold value F1 (for example, 10%) set in advance (YES in step S34), an identification value "2" is set in the section K (step S35).

【0031】また、上記面積比率Eが上記第1の閾値F
1未満であって(ステップS34でNO)、予め設定さ
れた第2の閾値F2(例えば0%)よりも多い場合には
(ステップS36でYES)、当該区画Kに対応させて
識別値“1”が設定される(ステップS37)。一方、
上記面積比率Eが上記第2の閾値F2以下の場合(ステ
ップS36でNO)、当該区画Kに対応させて識別値
“0”が設定される(ステップS38)。
The area ratio E is equal to the first threshold value F.
If it is less than 1 (NO in step S34) and greater than a preset second threshold value F2 (for example, 0%) (YES in step S36), the identification value "1" is set in correspondence with the section K. Is set (step S37). on the other hand,
When the area ratio E is equal to or smaller than the second threshold value F2 (NO in step S36), an identification value “0” is set corresponding to the section K (step S38).

【0032】この後、全区画Kに対して上記ステップS
30〜ステップS38の処理が終了したかどうかが判別
され(ステップS39)、上記処理の終了していない区
画Kがあれば(ステップS39でNO)、ステップS3
0に戻る。一方、全区画Kに対して上記ステップS30
〜ステップS38の処理が終了した場合には、ステップ
S39でYESとなり、上述したステップS7に移行す
る。
Thereafter, the above step S is performed for all the sections K.
It is determined whether or not the processing from 30 to S38 has been completed (step S39). If there is a section K for which the above processing has not been completed (NO in step S39), step S3 is performed.
Return to 0. On the other hand, the above step S30 is performed for all the sections K.
When the processing of Steps S38 to S38 is completed, YES is determined in Step S39, and the process proceeds to Step S7 described above.

【0033】そして、上記対象パターンTの各区画Kに
ついて識別値が設定されると、上述したステップS7に
移行して、この対象パターンTとマスクパターンMとが
比較されるようになっている。
When an identification value is set for each section K of the target pattern T, the process proceeds to step S7, where the target pattern T and the mask pattern M are compared.

【0034】このように、まず、マスクパターンMと対
象パターンTとが比較され、マスクパターンMの各区画
K0の判定値と、対応する対象パターンTの区画Kの識
別値とが一致した場合には、打刻文字が正しく刻印され
ていると判断し、一方、上記区画K0の判定値と上記区
画Kの識別値とが不一致の場合には、全ての基準パター
ンNの各区画K1の判定値と、対応する対象パターンT
の区画Kの識別値とを比較し、上記基準パターンNの判
定値と上記対象パターンTの識別値とが一致する区画が
最も多い基準パターンNを抽出することによって打刻文
字が正しく刻印されているかどうかを判別するので、照
明光の明るさ、外乱光の影響等を除去することができ、
パターン認識の精度を向上させて打刻文字を正確に認識
することができるとともに、基準パターンNと対象パタ
ーンTとの比較のみに比して、パターン認識を迅速に行
なうことができる。また、一致する区画が最も多い基準
パターンNが車体番号に対応する基準パターンNでなけ
れば、上記ステップS3での2値化を行なうための閾値
を変更して撮像された画像の2値化データを修正するの
で、パターン認識の精度がより向上する。
As described above, first, the mask pattern M and the target pattern T are compared, and when the judgment value of each section K0 of the mask pattern M matches the identification value of the corresponding section K of the target pattern T, Determines that the embossed character is correctly imprinted, while if the determination value of the section K0 and the identification value of the section K do not match, the determination value of each section K1 of all the reference patterns N And the corresponding target pattern T
Is compared with the identification value of the section K, and the reference pattern N having the largest number of sections in which the determination value of the reference pattern N matches the identification value of the target pattern T is extracted. Since it is determined whether or not the brightness of the illumination light, the influence of disturbance light, etc. can be removed,
Imprinted characters can be accurately recognized by improving the accuracy of pattern recognition, and pattern recognition can be performed more quickly than when only the reference pattern N and the target pattern T are compared. If the reference pattern N with the most matching sections is not the reference pattern N corresponding to the vehicle number, the threshold value for performing the binarization in step S3 is changed and the binarized data of the image captured is changed. Is corrected, the accuracy of pattern recognition is further improved.

【0035】なお、上記実施例では、ステップS7で車
体番号(打刻文字)に対応するマスクパターンMと直ち
に比較されたが、打刻文字が任意の英数字等であっても
認識することができる。この場合、ステップS7で対象
パターンTと、車体番号として刻印され得る英数字等に
対応する全てのマスクパターンMとが順次比較され、対
象パターンTの各区画Kの識別値とマスクパターンMの
区画K0の判定値が一致した場合に、上記対象パターン
Tは、当該マスクパターンMに対応する英数字等である
と判断されることになる。
In the above embodiment, the mask pattern M is immediately compared with the mask pattern M corresponding to the vehicle body number (imprinted character) in step S7. However, even if the embossed character is an arbitrary alphanumeric character or the like, it can be recognized. it can. In this case, in step S7, the target pattern T and all the mask patterns M corresponding to alphanumeric characters and the like that can be engraved as the vehicle body number are sequentially compared, and the identification value of each section K of the target pattern T and the section of the mask pattern M are compared. When the determination values of K0 match, it is determined that the target pattern T is an alphanumeric character or the like corresponding to the mask pattern M.

【0036】また、上記実施例では、打刻文字のパター
ン認識を行なう場合について説明したが、これに限られ
るものではなく、スタンプ文字、印刷文字等のパターン
認識を行なう場合であってもよい。
Further, in the above embodiment, the case where the pattern recognition of the embossed character is performed is described. However, the present invention is not limited to this, and the case where the pattern recognition of the stamp character, the print character, and the like may be performed.

【0037】[0037]

【発明の効果】本発明は、マスクパターンの判定値が対
象パターンの識別値に一致しなかった場合には、基準パ
ターンの判定値と対象パターンの識別値が一致する領域
が最も多い基準パターンが対象パターンに対応するパタ
ーンであると判断するので、パターン認識の精度が向上
し、打刻文字を正確に認識することができるとともに、
パターン認識を迅速に行なうことができる。
According to the present invention, when the judgment value of the mask pattern does not match the identification value of the target pattern, the reference pattern having the largest number of areas where the judgment value of the reference pattern matches the identification value of the target pattern is determined. Since it is determined that the pattern corresponds to the target pattern, the accuracy of pattern recognition is improved, and the embossed characters can be accurately recognized.
Pattern recognition can be performed quickly.

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

【図1】本発明のパターン認識方法を実施した刻印ステ
ーションの構成の一実施例を示すブロック図である。
FIG. 1 is a block diagram showing an embodiment of a configuration of a marking station implementing a pattern recognition method of the present invention.

【図2】刻印ステーションにおける制御動作を示すフロ
ーチャートである。
FIG. 2 is a flowchart showing a control operation in the marking station.

【図3】対象パターンの一例を示すイメージ図である。FIG. 3 is an image diagram showing an example of a target pattern.

【図4】マスクパターンの一例を示すイメージ図であ
る。
FIG. 4 is an image diagram showing an example of a mask pattern.

【図5】基準パターンの一例を示すイメージ図である。FIG. 5 is an image diagram showing an example of a reference pattern.

【図6】対象パターンの識別値を求めるフローチャート
である。
FIG. 6 is a flowchart for determining an identification value of a target pattern.

【図7】対象パターンの識別値を求めるフローチャート
である。
FIG. 7 is a flowchart for determining an identification value of a target pattern.

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

1 ホストコンピュータ 2 刻印ブロック 3 刻印認識ブロック 4 刻印機 5 刻印コントローラ 6 照明器 7 ビデオカメラ(検出手段) 8 画像処理部 9 ディスプレイ 10 ラインコントローラ DESCRIPTION OF SYMBOLS 1 Host computer 2 Marking block 3 Marking recognition block 4 Marking machine 5 Marking controller 6 Illuminator 7 Video camera (detection means) 8 Image processing unit 9 Display 10 Line controller

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06K 9/62 G06T 7/00 JICSTファイル(JOIS)──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int.Cl. 7 , DB name) G06K 9/62 G06T 7/00 JICST file (JOIS)

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 検出手段により対象パターンを検出し、
この対象パターンを分割し、得られた各領域について上
記対象パターンの濃淡レベルに応じた識別値をそれぞれ
設定し、この対象パターンの各領域の識別値と、上記対
象パターンに対応させて分割して各領域について判別値
を予め設定した比較パターンの各領域の判別値とを比較
し、上記比較パターンの各領域の判別値と上記対象パタ
ーンの対応する領域の判別値との一致度で上記対象パタ
ーンに対応するパターンを判別するパターン認識方法に
おいて、上記比較パターンとしては、パターン内の予め
設定した領域を上記識別値と上記判定値との比較対象か
ら除外したマスクパターンと、パターン内の全ての領域
で上記識別値と上記判定値とを比較する複数種類の基準
パターンとを設定し、上記マスクパターンの判定値が上
記対象パターンの識別値に一致しなかった場合に、上記
基準パターンの判定値と上記対象パターンの識別値とを
比較し、上記基準パターンの判定値と上記対象パターン
の識別値とが一致する領域が最も多い基準パターンを選
択し、この選択された基準パターンに基づいてパターン
の判別を行なうことを特徴とするパターン認識方法。
An object pattern is detected by a detection means,
The target pattern is divided, and an identification value corresponding to the gray level of the target pattern is set for each of the obtained regions, and the identification value of each region of the target pattern is divided according to the target pattern. The discrimination value of each area is compared with the discrimination value of each area of the comparison pattern in which the discrimination value is set in advance. In the pattern recognition method for determining a pattern corresponding to the above, as the comparison pattern, a mask pattern in which a preset area in the pattern is excluded from a comparison target between the identification value and the determination value, and all areas in the pattern Sets a plurality of types of reference patterns for comparing the identification value and the determination value, and determines the mask pattern determination value of the target pattern. If the values do not match the different values, the determination value of the reference pattern is compared with the identification value of the target pattern, and the reference value in which the determination value of the reference pattern matches the identification value of the target pattern is the largest. A pattern recognition method comprising: selecting a pattern; and determining the pattern based on the selected reference pattern.
JP04156865A 1992-06-16 1992-06-16 Pattern recognition method Expired - Fee Related JP3126491B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP04156865A JP3126491B2 (en) 1992-06-16 1992-06-16 Pattern recognition method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP04156865A JP3126491B2 (en) 1992-06-16 1992-06-16 Pattern recognition method

Publications (2)

Publication Number Publication Date
JPH064710A JPH064710A (en) 1994-01-14
JP3126491B2 true JP3126491B2 (en) 2001-01-22

Family

ID=15637084

Family Applications (1)

Application Number Title Priority Date Filing Date
JP04156865A Expired - Fee Related JP3126491B2 (en) 1992-06-16 1992-06-16 Pattern recognition method

Country Status (1)

Country Link
JP (1) JP3126491B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0615455B2 (en) * 1985-09-11 1994-03-02 ライオン株式会社 Hair cosmetics
KR100880919B1 (en) * 2007-06-12 2009-02-04 주식회사 피엘케이 테크놀로지 Moving vehicle recognition method using multi-pattern mask

Also Published As

Publication number Publication date
JPH064710A (en) 1994-01-14

Similar Documents

Publication Publication Date Title
EP1400922B1 (en) Print inspection method
US4817166A (en) Apparatus for reading a license plate
CN106326887B (en) A kind of method of calibration and device of optical character identification result
JP4243454B2 (en) Brightness correction method, selective defect detection method, and recording medium on which these are recorded
US7570788B2 (en) Printed paper inspecting method and apparatus
JP3126491B2 (en) Pattern recognition method
EP4318304A1 (en) Information reading device
JPH02293989A (en) character recognition device
JP2005332268A (en) Traveling path recognition device
JP3620081B2 (en) Template matching method
JPH0520459A (en) Method and device for recognizing pattern
JP3153627B2 (en) Pattern confirmation method
JPH08159712A (en) Pattern recognition method
JPH10207978A (en) Pattern matching method and device for characters etc.
JPH05342414A (en) Template preparing device and pattern recognizing device
JP3025290B2 (en) Pattern recognition method
JP2805476B2 (en) Character recognition method
JPH09305709A (en) Image recognition method and its device
JPH04268987A (en) character recognition device
JPH0584946B2 (en)
JP2003016386A (en) Character recognition method and device
JPH08145642A (en) Component recognition method and component recognition device
JPH0746372B2 (en) Character recognition device
JPS60200375A (en) Template matching method
JPH06187450A (en) Pattern recognition method and recognition device

Legal Events

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