JPH04135287A - Pattern recognition method - Google Patents

Pattern recognition method

Info

Publication number
JPH04135287A
JPH04135287A JP2259177A JP25917790A JPH04135287A JP H04135287 A JPH04135287 A JP H04135287A JP 2259177 A JP2259177 A JP 2259177A JP 25917790 A JP25917790 A JP 25917790A JP H04135287 A JPH04135287 A JP H04135287A
Authority
JP
Japan
Prior art keywords
image
area
pattern
recognized
ratio
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2259177A
Other languages
Japanese (ja)
Inventor
Toshizumi Tokunaga
徳永 利澄
Yoshiaki Mukai
向井 義陽
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 JP2259177A priority Critical patent/JPH04135287A/en
Publication of JPH04135287A publication Critical patent/JPH04135287A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To accurately recognize an object pattern without being affected by shading conditions by thinning a line after binalizing a picture that includes the object pattern and calculating the ratio of the area of an extracted object picture element obtained after thinning a line to the total area of the picture element. CONSTITUTION:A marking device 5 for marking a car body number on a car body which is carried into a station 1 and a marking inspection unit 10 for automatically reading and inspecting the marked car body number are provided. After the image of a picture picked up when the image of an object pattern is picked up under shaded conditions is binarized, line thinning is conducted. Then, the ratio of the area of an extracted object picture element to the area of each partition is calculated. Thus, the object pattern is recognized on the basis of the combination of respective partitions having either of plural signals obtained by classifying the ratio according to a specified threshold level. In this way, after the influence of the shading conditions of the object pattern is excluded, the combinations of respective partitions are obtained. Thus, the object pattern can be recognized accurately.

Description

【発明の詳細な説明】 [産業上の利用分野コ この発明は、画像処理によって2次元パターンを認識す
るパターン認識方法に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a pattern recognition method for recognizing two-dimensional patterns by image processing.

[従来の技術] 従来より、2次元の対象パターンを認識するパターン認
識方法として、認識すべき対象パターンを撮像して得ら
れた画像に画像処理を施すことによってパターン認識を
行う方法は、一般に良く知られている(例えば特公昭6
1−9562号公報参照)。
[Prior Art] Conventionally, as a pattern recognition method for recognizing a two-dimensional target pattern, a method of performing pattern recognition by performing image processing on an image obtained by capturing an image of the target pattern to be recognized is generally well known. known (for example, Tokuko Sho 6)
(See Publication No. 1-9562).

ところで、上記認識すべき対象パターンを撮像する際に
、該対象パターンを照明光により陰影を付けた状態で撮
像することにより、明暗がより強調されたパターンの画
像を得ることができ、認識精度の向上を図ることができ
る。
By the way, when capturing an image of the target pattern to be recognized, by capturing the target pattern in a state where it is shaded by illumination light, it is possible to obtain an image of the pattern in which the brightness and darkness are further emphasized, which improves the recognition accuracy. You can improve your performance.

[発明が解決しようとする課題] ところが、上記のように対象パターンを陰影を付けた状
態で撮像する場合、照明器、カメラ及び対象物の相互の
位置関係や、照明光の明るさ、周囲の照明状態等に起因
する外乱光の影響などの諸条件により、対象パターンへ
の陰影の付き方が必ずしも一定せず、このため、対象パ
ターンの認識精度を十分に向上させることが難しいとい
う難点があった。
[Problems to be Solved by the Invention] However, when capturing an image of a target pattern with shading as described above, the mutual positional relationship between the illuminator, the camera, and the target object, the brightness of the illumination light, and the surrounding Due to various conditions such as the influence of ambient light caused by lighting conditions, etc., the way in which shading is applied to the target pattern is not necessarily consistent, and this poses a problem in that it is difficult to sufficiently improve the recognition accuracy of the target pattern. Ta.

この発明は、上記問題点に鑑みてなされたもので、陰影
の付き方の影響を受けることなく、正確に対象パターン
を認識することができるパターン認識方法を提供するこ
とを目的とする。
The present invention has been made in view of the above problems, and an object of the present invention is to provide a pattern recognition method that can accurately recognize a target pattern without being affected by shading.

[課題を解決するための手段〕 このため、この発明は、認識すべき対象パターンを照明
光により陰影を付けた状態で撮像し、得られた画像に画
像処理を施すことによって2次元パターンを認識するパ
ターン認識方法において、上記対象パターンを含む画像
を2値化した後に細線化するとともに、該画像を分割し
て得られた各区画領域について、各区画の全画素面積に
対する該区画内の細線化された抽出対象画素面積の比率
を算出し、該比率を所定のしきい値によって複数の信号
に分類し、これら信号のいずれかを各々有する各区画の
組み合わせに基づいて、上記対象パターンを認識するよ
うにしたものである。
[Means for Solving the Problems] Therefore, the present invention recognizes a two-dimensional pattern by capturing an image of a target pattern to be recognized in a shaded state using illumination light and performing image processing on the obtained image. In a pattern recognition method, an image containing the target pattern is binarized and then thinned, and for each divided area obtained by dividing the image, line thinning is performed in the total pixel area of each divided area. calculate the ratio of the extraction target pixel area, classify the ratio into a plurality of signals according to a predetermined threshold, and recognize the target pattern based on the combination of each section each having one of these signals. This is how it was done.

[発明の効果] この発明によれば、対象パターンを陰影を付けた状態で
撮像して得られた画像を2値化した後に細線化し、その
後に上記各区画面積に対する抽出対象画素面積の比率を
算出するようにしたので、陰影の付き方の影響を受ける
ことなく、上記比率を算出することができる。そして、
該比率を所定のしきい値で分類して得られた複数の信号
のいずれかを有する各区画の組み合わせに基づいて、上
記対象パターンを認識するようにしたので、対象パター
ンの陰影の付き方の影響を排除した上で上記各区画の組
み合わせを得ることができ、正確に対象パターンを認識
することができる。
[Effects of the Invention] According to the present invention, the image obtained by capturing the target pattern in a shaded state is binarized and then thinned, and then the ratio of the extraction target pixel area to the area of each section is calculated. Since the above ratio is calculated, the above ratio can be calculated without being affected by the way shading is applied. and,
Since the target pattern is recognized based on the combination of each section having one of a plurality of signals obtained by classifying the ratio using a predetermined threshold, the method of shading of the target pattern can be A combination of the above sections can be obtained after eliminating the influence, and the target pattern can be recognized accurately.

[実施例コ 以下、この発明の実施例を、例えば、自動車の製造ライ
ンにおいてく車体に刻印された車体番号を自動的に読み
取って検査する方法に適用した場合について、添付図面
を参照しながら説明する。
[Example 1] Hereinafter, a case in which an embodiment of the present invention is applied to, for example, a method of automatically reading and inspecting a vehicle body number engraved on a vehicle body on an automobile production line will be described with reference to the accompanying drawings. do.

第1図は、本実施例に係る自動車製造ラインにおいて、
車体に対して各々固有の車体番号を刻印する刻印ステー
ションの概略を表すブロック構成図であるが、この図に
示すように、本刻印ステーションlには、該ステーショ
ン!に搬入されてきた車体に車体番号を刻印する刻印袋
[5と、刻印された車体番号を自動的に読み取って検査
する刻印検査装置IOとが設けられている。
FIG. 1 shows the automobile manufacturing line according to this embodiment.
This is a block configuration diagram schematically showing a stamping station that stamps a unique vehicle body number on each vehicle body. A stamping bag [5] for stamping a vehicle body number on a vehicle body brought into the factory, and a stamp inspection device IO for automatically reading and inspecting the stamped vehicle body number are provided.

上記刻印袋[5は、車体の所定部位(例えばカウルボッ
クス)に車体番号を自動的に刻印することができる刻印
機6と、該刻印機6の打刻動作を制御する刻印コントロ
ーラ7とを備え、該コントローラ7には、工場の上位コ
ンピュータ3から、車体の製造ラインでのコミットナン
バやこのナンバに応じた車体番号などの基本データが入
力され、これが記憶されるようになっている。上記刻印
コントローラ7は、例えばマイクロコンピュータを主要
部として構成されたもので、上記刻印ステーションlを
含む車体組立ライン全体の制御を行うラインコントロー
ラ2に接続されている。
The engraving bag [5] includes a stamping machine 6 that can automatically stamp a vehicle body number on a predetermined part of the vehicle body (for example, a cowl box), and a stamping controller 7 that controls the stamping operation of the stamping machine 6. The controller 7 receives basic data such as a commit number on the production line of the vehicle body and a vehicle body number corresponding to this number from the host computer 3 of the factory, and stores this data. The marking controller 7 is configured, for example, with a microcomputer as its main part, and is connected to the line controller 2 which controls the entire vehicle body assembly line including the marking station 1.

また、上記刻印検査装置10は、第2図に示すように、
車体の打刻箇所に照明光を当てて刻印文字に陰影を付け
る照明器1夏(例えば高周波蛍光灯)と、該照明器11
で陰影を付けて照らし出された車体番号を撮影する例え
ば複数の工業用ビデオカメラ12と、後で詳しく説明す
るように、該カメラ12で撮影された画像情報から、実
際に車体に刻印された車体番号のパターン認識を行う画
像処理装置13とを備え、該画像処理装置I3には、デ
イスプレィ装置14やプリンタ装置(不図示)などが付
設されている。
Further, as shown in FIG. 2, the marking inspection device 10 has the following features:
An illuminator 1 (for example, a high-frequency fluorescent lamp) that shines illumination light on the stamped part of the car body to shade the engraved characters, and the illuminator 11
For example, a plurality of industrial video cameras 12 photograph the illuminated vehicle body number with shading, and as will be explained in detail later, from the image information photographed by the cameras 12, it is possible to determine whether the vehicle body number is actually engraved on the vehicle body. The image processing device I3 is provided with an image processing device 13 that performs pattern recognition of a vehicle body number, and a display device 14, a printer device (not shown), etc. are attached to the image processing device I3.

以下、上記刻印ステーション1での車体番号の刻印及び
その検査工程の概略について、第3図のフローチャート
を参照しながら説明する。
Hereinafter, an outline of the car body number stamping and inspection process at the stamping station 1 will be described with reference to the flowchart of FIG. 3.

ラインが始動され上記ラインコントローラ2による制御
が開始されると、まず、車体搬送機(不図示)が起動さ
れて刻印ステーションに車体が搬送され、刻印機6に対
して上記車体がクランプして固定される(ステップ#1
乃至ステップ#3)。
When the line is started and control by the line controller 2 begins, first, a car body conveyor (not shown) is started and the car body is transported to the marking station, where the car body is clamped and fixed to the marking machine 6. (Step #1
to step #3).

次に、刻印機6が起動されて車体の所定箇所(カウルボ
ックス)に、当該車体の車体番号が刻印され、その後、
例えばエアブロ−により刻印箇所の清浄が行なわれる(
ステップ#4乃至ステップ#6)。
Next, the stamping machine 6 is activated and the vehicle body number of the vehicle concerned is stamped on a predetermined location (cowl box) of the vehicle body, and then,
For example, the stamped area is cleaned by air blowing (
Step #4 to Step #6).

次に、刻印検査袋!!10が作動させられ、照明によっ
て陰影が付けられた打刻文字が、認識すべき対象パター
ンとして上記ビデオカメラ12で撮像され、その画像が
画像処理装置13に取り込まれる(ステップ#7)。そ
して、後で詳しく説明するように、取り込まれた画像に
対して所定の画像処理が施され、打刻文字のパターン認
識が行なわれる(ステップ#8)。
Next, the engraved inspection bag! ! 10 is activated, the embossed characters shaded by illumination are imaged by the video camera 12 as a target pattern to be recognized, and the image is taken into the image processing device 13 (step #7). Then, as will be explained in detail later, predetermined image processing is performed on the captured image, and pattern recognition of the engraved characters is performed (step #8).

そして、ステップ#9で、上記画像処理に基づくパター
ン認識で読み取られた刻印文字が、予め入力・記憶され
た当該車体の車体番号と一致しているか否かが照合・判
定され、この判定結果がYES(一致)の場合には、O
K倍信号出力(ステップ#10)されるとともに、読み
取られた車体番号がコミットNo、などと共にプリンタ
で印字される(ステップ#II)。この印字が終了する
と、次ワークに対する刻印工程が開始されるようになっ
ている(ステップ#12)。
Then, in step #9, it is collated and determined whether the stamped characters read by pattern recognition based on the image processing described above match the vehicle body number of the vehicle body that has been input and stored in advance, and this determination result is If YES (match), O
The K times signal is output (step #10), and the read vehicle body number is printed along with the commit number and the like by a printer (step #II). When this printing is completed, the marking process for the next workpiece is started (step #12).

一方、上記ステップ#9での判定結果がNo(不一致)
の場合には、NG信号が出力されて検査員が呼び出され
(ステップ#13及びステップ#14)、上記パターン
認識で読み取られモニタ画面14に表示された認識文字
と本来の車体番号とが一致しているか否かが照合・判定
される(ステップ#15)。この判定結果がYES(一
致)の場合には、ステップ#16で、マニュアルボタン
によりOK倍信号出力される(ステップ#!0)。
On the other hand, the determination result in step #9 above is No (mismatch).
In this case, an NG signal is output and an inspector is called (step #13 and step #14), and the recognized characters read by the pattern recognition and displayed on the monitor screen 14 match the original vehicle body number. It is checked and determined whether or not it is true (step #15). If the determination result is YES (coincidence), in step #16, an OK double signal is output by pressing the manual button (step #!0).

また、上記ステップ#15での判定結果がN。Also, the determination result in step #15 is N.

(不一致)の場合には、当該車体に対して車体番号の訂
正打刻(ステップ#17)が行なわれるとともに、シス
テムに対して、予め定められた異常処理マニュアルに沿
って異常対策処置が講じられるようになっている。
(In the case of mismatch), the vehicle body number is corrected and stamped on the vehicle concerned (step #17), and abnormality countermeasures are taken for the system according to a predetermined abnormality handling manual. It looks like this.

次に、上記画像処理装置I3による文字認識システム(
ステップ#8及び#9)の概略について、刻印コントロ
ーラ7と画像処理装置13との間の信号系統図(第4図
)、及び第5図のフローチャートを参照しながら説明す
る。
Next, a character recognition system (
The outline of steps #8 and #9) will be explained with reference to the signal system diagram (FIG. 4) between the marking controller 7 and the image processing device 13 and the flowchart of FIG. 5.

画像処理システムがスタートすると、まず、複数設けら
れたビデオカメラI2のいずれの影像を入力するかの選
択、開始時刻の印字、テスト信号の有無の確認などの準
備ステップが実行され(ステップ#21.#22及び#
23)、これら準備が完了するとREADY ON信号
が刻印コントローラ7に対して出力される(ステップ#
24)。尚、上記テスト信号は、刻印の試し打ちなどの
場合に、これを知らせるために刻印コントローラ7から
出力される信号である。また、画像処理袋!!13を途
中から立ち上げる場合には、上記準備ステップ中にデー
タ再送信要求信号が゛刻印コントローラ7に対して出力
される。
When the image processing system starts, first, preparatory steps are executed, such as selecting which image from the plurality of video cameras I2 is to be input, printing the start time, and checking the presence or absence of a test signal (step #21. #22 and #
23) When these preparations are completed, a READY ON signal is output to the marking controller 7 (step #
24). The test signal is a signal outputted from the marking controller 7 in order to notify the user of the trial stamping. Also, an image processing bag! ! 13, a data retransmission request signal is output to the marking controller 7 during the preparation step.

次に、画像処理システムが刻印機6の作動と連動して実
行されるか、または単独で実行されるかを指示する信号
が受信される(ステップ#25)。
Next, a signal is received that instructs whether the image processing system is executed in conjunction with the operation of the stamping machine 6 or independently (step #25).

そして、ステップ#26で、刻印機6と連動するか否か
が判定される。この判定結果がYESの場合には、刻印
機側からの起動信号の入力を待ってシステムが起動され
る。そして、上記起動信号が受信されると、続いてコミ
ットNo及び車体番号等の基本データが受信される(ス
テップ#27及び#28)。
Then, in step #26, it is determined whether or not the stamping machine 6 is to be operated in conjunction with the marking machine 6. If the result of this determination is YES, the system is activated after waiting for input of a activation signal from the stamping machine. When the activation signal is received, basic data such as a commit number and a vehicle body number are subsequently received (steps #27 and #28).

その後、画像取り込み指令に基づいてビデオカメラ12
による画像が入力され、この画像入力が完了すると、画
像入力完了信号が刻印コントローラ7に対して出力され
る(ステップ#29.#30及び#31)。尚、上記ス
テップ#26での判定結果がNoの場合、つまり画像処
理システムが単独で実行される場合には、ステップ#2
8°で基本データ(ステップ#28参照)の受信が行な
われ、起動信号(ステップ#27)を待つことなく、ス
テップ#30の画像入力が行なわれる。
Then, based on the image capture command, the video camera 12
When the image input is completed, an image input completion signal is output to the engraving controller 7 (steps #29, #30 and #31). Note that if the determination result in step #26 is No, that is, if the image processing system is executed independently, step #2
Basic data (see step #28) is received at 8°, and image input in step #30 is performed without waiting for the activation signal (step #27).

そして、画像処理に基づいて刻印文字(車体番号)の認
識が行なわれ、この認識された車体番号と予め入力され
記憶されていた基本データとが照合され、両者か一致し
ているか否かの判定が行なわれる(ステップ#32及び
#33)。
Then, the stamped characters (vehicle number) are recognized based on image processing, and the recognized vehicle number is compared with the basic data that has been input and stored in advance, and it is determined whether the two match. is performed (steps #32 and #33).

この判定終了後、読み取り完了信号が刻印コントローラ
7に対して出力され、また、判定結果及びコミットNO
9/車体番号がデイスプレィ装置l4のモニタ画面上に
表示されるとともに、これらがプリンタで印字される(
ステップ#35.#36及び#37)。
After this judgment is completed, a reading completion signal is output to the marking controller 7, and the judgment result and commit NO.
9/The vehicle body number is displayed on the monitor screen of the display device l4, and these are printed on the printer (
Step #35. #36 and #37).

そして、画像処理システムが刻印機6の作動と連動して
いる場合には、該刻印機6の作動完了信号を待って、ま
た連動していない場合にはそのまま、出力信号がリセッ
トされ(ステップ43B、#39及び#40)、その後
、ステップ#23に戻って以下同様のステップを繰り返
すようになっている。
If the image processing system is interlocked with the operation of the stamping machine 6, the output signal is reset after waiting for the operation completion signal of the stamping machine 6, and if the image processing system is not interlocked, the output signal is reset (step 43B). , #39 and #40), and then returns to step #23 to repeat the same steps.

次に、上記画像処理装置13による画像処理及びパター
ン認識の具体的例について、第6図のフローチャートを
参照しながら説明する。
Next, a specific example of image processing and pattern recognition by the image processing device 13 will be described with reference to the flowchart of FIG. 6.

まず、画像入力に先立って、前ワークに対する読み取り
文字、同一文字の格納、及び記憶されていた車体番号等
の初期化を行う(ステップ#51゜#52及び#53)
。次いで、フロッピディスク等のメモリ手段から当該ワ
ークに対する基本データを読み出すとともに、ビデオカ
メラ12で撮影された画像を入力する(ステップ#54
及び#55)。
First, before inputting the image, read characters for the previous work, store the same characters, and initialize the stored vehicle body number, etc. (Steps #51, #52 and #53)
. Next, basic data for the workpiece is read from a memory means such as a floppy disk, and an image taken by the video camera 12 is input (step #54).
and #55).

そして、ステップ#56で、入力された画像に対して、
当該画面内で処理を施す領域を限定するウィンドウ処理
を行い、この限定された領域に対して、所定のしきい値
による2値化処理(ステップ#57)を行った後、ノイ
ズ除去処理(ステップ#58)を施す。
Then, in step #56, for the input image,
Window processing is performed to limit the area to be processed within the screen, and this limited area is subjected to binarization processing (step #57) using a predetermined threshold. After that, noise removal processing (step #57) is performed. #58).

本実施例では、上記ノイズ除去を行った後に、照明光に
より陰影を付けて得られた上記画像に対して、この陰影
の付き方がパターン認識の認識精度に及ぼす影響を低減
させるために、画像に表示された図形または文字の線幅
を細める、所謂、細線化処理を施すようにしている(ス
テップ#59)。
In this example, in order to reduce the influence that this shading has on the recognition accuracy of pattern recognition, for the above-mentioned image obtained by adding shading with illumination light after performing the above-mentioned noise removal, A so-called thinning process is performed to narrow the line width of the figure or character displayed (step #59).

尚、上記ウィンドウ、2値化、ノイズ除去及び細線化の
各処理は、いずれも、従来より良く知られている方法と
同様の手法で行うことができる。
Note that the windowing, binarization, noise removal, and line thinning processes described above can all be performed using methods similar to those well known in the past.

次に、ステップ#60で、対象パターンの一連の文字に
対して順番を定めるラベル付けを行う。
Next, in step #60, a series of characters of the target pattern is labeled to determine the order.

本実施例の場合、車体番号として、0乃至9の数字とA
乃至Zのアルファベット文字などを組み合わせて、例え
ば最大19桁の文字及び数字を刻印することができ、車
種に応じて14桁乃至19桁の車体番号が付与される。
In the case of this example, the numbers 0 to 9 and A
For example, a maximum of 19 digits of letters and numbers can be engraved by combining alphabetic characters from Z to Z, and a 14 to 19 digit vehicle body number is assigned depending on the vehicle type.

この後、上記ラベル付けされた各認識文字の面積(画素
数)を算出し、この面積が所定値(例えば15)以下で
あるか否かが判定される(ステップ#61及び#62)
。この判定結果がYESの場合には、当該認識文字は、
上記ノイズ除去処理で除去しきれなかったゴミ等による
ノイズによるもので、実際には文字または数字でないも
のと判断され、次のラベルに移行する(゛ステップ#6
3)。
After that, the area (number of pixels) of each labeled recognized character is calculated, and it is determined whether this area is less than or equal to a predetermined value (for example, 15) (steps #61 and #62)
. If this judgment result is YES, the recognized character is
This is due to noise caused by dust etc. that could not be removed by the noise removal process described above, and it is determined that the label is not actually a letter or number, and the process moves to the next label (Step #6).
3).

一方、上記ステップ#62の判定結果がYESの場合に
は、当該文字のパターン認識を行うために、まず、ステ
ップ#64で特徴量の抽出が行なわれる。すなわち、上
記ウィンドウ処理で得られた画像の中で、文字としてパ
ターン認識すべき領域を更に限定し、その画像処理の開
始座標を定める。そして、この領域を所定の細かさ(例
えば縦横5分割)で各区画領域に分割する(ステップ#
65)。そして、上記5分割した領域の画素数をカウン
トし、5分割した後の座標を算出する(ステップ#66
及び#67)。尚、第9図に、数字の「2」を例にとっ
て、上記細線化された後の画像例を示す。この第9図中
の2点鎖線は、画像を縦横5分割する際の分割線を示し
ている。
On the other hand, if the determination result in step #62 is YES, feature amounts are first extracted in step #64 in order to perform pattern recognition of the character. That is, in the image obtained by the window processing, the area to be pattern-recognized as a character is further limited, and the start coordinates of the image processing are determined. Then, this area is divided into each divided area at a predetermined level of detail (for example, 5 vertical and horizontal divisions) (step #
65). Then, the number of pixels in the 5-divided area is counted, and the coordinates after the 5-divided area are calculated (step #66
and #67). In addition, FIG. 9 shows an example of an image after the above-mentioned thinning, taking the number "2" as an example. The two-dot chain lines in FIG. 9 indicate dividing lines used to divide the image into five parts vertically and horizontally.

本実施例では、上記特徴量を抽出して画像分割を行うに
際して、より好ましくは、この分割すべき領域の大きさ
を、予め一定の大きさとして設定しておくのではなく、
文字として認識された範囲に応じて認識文字ごとに求め
、それぞれの文字に対応する領域の大きさに応じて5分
割するようにしている。従って、上記分割すべき領域の
画素数(ステップ#66参照)は文字によって異なるこ
とになる。このように、分割すべき領域を、文字として
認識された範囲に応じて可変させることにより、従来、
文字の大きさ・形状等にかかわらず一定の大きさで行っ
ていた場合に比べて、より効率良く画像処理を行うこと
ができる。また、領域内での文字のずれ等の影響を排除
することができるので、より精度の高いパターン認識を
行うことができる。
In this embodiment, when extracting the feature amounts and performing image segmentation, it is more preferable to set the size of the area to be segmented as a constant size in advance.
The area is determined for each recognized character according to the range recognized as a character, and divided into five areas according to the size of the area corresponding to each character. Therefore, the number of pixels in the area to be divided (see step #66) differs depending on the character. In this way, by varying the area to be divided according to the range recognized as a character,
Image processing can be performed more efficiently than when processing is performed at a constant size regardless of the size, shape, etc. of characters. Further, since the influence of character displacement within the area can be eliminated, more accurate pattern recognition can be performed.

また、本実施例では、この段階において(ステップ#6
5)、文字として認識された上記領域を分割するに際し
て縦横5分割するようにしたが、これは、他の数(伺え
ば4.6あるいはIOなど)で分割した場合と比較テス
トを行った結果、本実施例の場合には、この5分割が、
一般的に最も高い認識精度が得られたためである。従っ
て、条件が異なる場合などには、他の数で分割するよう
にしても良い。
Furthermore, in this embodiment, at this stage (step #6
5) When dividing the above area that was recognized as a character, it was divided into 5 vertically and horizontally, but this was the result of a comparison test with dividing by other numbers (such as 4.6 or IO). , in the case of this example, this five division is
This is because the highest recognition accuracy was generally obtained. Therefore, if the conditions are different, it may be divided by another number.

次に、上記5分割を行った後、この5分割された区画領
域について、ある任意の区画を取り出すウィンドウを行
い(ステップ#68)、該区画領域内において文字部分
を示す画素数、つまり細線化された抽出対象画素面積S
o、該区画領域の全画素数つまり区画の全画素面積St
、及び該全画素面積Stに対する抽出対象画素面積So
の比率Rsを順次算出する(ステップ#69、#70及
び#71)。
Next, after performing the above-mentioned 5-division, a window is created to take out a certain arbitrary section of the 5-divided divided area (step #68), and the number of pixels indicating the character part in the divided area, that is, thinning is performed. Extraction target pixel area S
o, the total number of pixels in the divided area, that is, the total pixel area of the divided area St
, and the extraction target pixel area So for the total pixel area St
The ratio Rs is calculated sequentially (steps #69, #70, and #71).

そして、この比率Rsが所定のしきい値(例えば10%
)以上である場合には、縦横5分割されて設けられた2
5のまず目の配列における当該区画に対応する配列位置
に信号「2」を代入する(ステップ#72及び#73)
。また、上記比率Rsが上記しきい値よりも小さく、こ
れより小さい第2のしきい値(PJえば0%)よりも大
きい場合(0%<Rsく10%)には信号rlJを、更
に、上記比率が0%の場合には信号「0」を、上記配列
中に代入する(ステップ#74.#75及び#76)。
Then, this ratio Rs is set to a predetermined threshold (for example, 10%
) or more, the 2
Assign the signal "2" to the array position corresponding to the section in the first array of No. 5 (Steps #72 and #73)
. Further, if the ratio Rs is smaller than the threshold value and larger than a second threshold value smaller than this (0% for PJ) (0%<Rs<10%), the signal rlJ is further set to If the ratio is 0%, a signal "0" is assigned to the array (steps #74, #75 and #76).

すなわち、当該認識文字に対する25の配列のうち、当
該区画に対応する部位には、所定のしきい値(10%及
び0%)によって分類された複数の信号(o、1又は2
)のいずれかが代入される。
That is, among the 25 arrays for the recognized character, a plurality of signals (o, 1, or 2
) is assigned.

上記区画についての信号の付与(代入)が終了すると次
区画に移行しくステップ#77)、上記ステップ#68
からステップ#76が実行される。これを、各区画につ
いて順次繰り返して実行することにより、当該文字に対
する25の区画すべてに上記いずれかの信号か付与され
、当該文字に対する配列パターンが得られる。そして、
この得られた配列パターンを、各文字に対して予め記憶
された基準データ(基準配列パターン)と比較すること
によって(ステップ#78)、当該文字が何であるかを
認識することができるようになっている。尚、第10図
に、数字の「2」を例にとって、予め記憶された上記基
準配列パターン例を示す。
When the signal assignment (assignment) for the above section is completed, the process proceeds to the next section (step #77), the above step #68
Step #76 is then executed. By sequentially repeating this for each section, one of the above signals is applied to all 25 sections for the character, and an arrangement pattern for the character is obtained. and,
By comparing this obtained sequence pattern with the standard data (standard sequence pattern) stored in advance for each character (step #78), it becomes possible to recognize what the character is. ing. FIG. 10 shows an example of the reference arrangement pattern stored in advance, taking the number "2" as an example.

上記文字に対するパターン認識を終えた後、ステップ#
79で、次のラベルの文字のパターン認識が実行される
(つまり、ステップ#60以降のステップを繰り返して
行う)。これを、全桁数だけ繰り返すことにより全文字
”のパターン認識が終了しくステップ#80)、その結
果を基本データの車体番号と照合し、照合結果かデイス
プレィ装置上に表示されるとともにプリンタで印字され
る(ステップ#81.#82及び#83)。
After finishing the pattern recognition for the above characters, step #
At step 79, pattern recognition of the characters of the next label is performed (that is, the steps from step #60 onward are repeated). By repeating this for the total number of digits, pattern recognition of all characters is completed (Step #80), the result is compared with the vehicle body number in the basic data, and the matching result is displayed on the display device and printed on the printer. (Steps #81, #82 and #83).

尚、本実施例では、認識対象文字かハイフォン(r−J
 )である場合には、上記ステップ#68の実行に先立
って、5分割されるべき領域の両側に所定数(例えば4
個分)だけ画素を追加し、この追加された部分には特定
の信号(例えば信号「6」)を付与した後、上記ステッ
プ#68乃至ステップ#76を実行して配列パターンを
求めるようにしている。上記のような処理を施すことに
より、ハイフォンの線に傾きがあった場合などでも、精
度の良いパターン認識を行うことができる。
In this embodiment, the characters to be recognized are hyphen (r-J
), prior to executing step #68, a predetermined number (for example, 4
After adding pixels by the number of pixels) and giving a specific signal (for example, signal "6") to this added part, the above-mentioned steps #68 to #76 are executed to obtain the array pattern. There is. By performing the above processing, it is possible to perform highly accurate pattern recognition even when the Haiphong line has an inclination.

また、本実施例では、より好ましくは、認識された各文
字について再照合を行うための再照合プログラムが各文
字毎に設けられており、パターン認識の結果得られた文
字をこの再照合プログラムによって再度検定し、より精
度の高いパターン認識結果を得ることができるようにな
っている。
Further, in this embodiment, more preferably, a re-verification program for performing re-verification of each recognized character is provided for each character, and the characters obtained as a result of pattern recognition are processed by this re-verification program. It is now possible to retest and obtain more accurate pattern recognition results.

特に、例えば数字の「0」とアに、ファベット文字のr
DJのように、配列パターンか類似する複数の文字また
は数字に対しては、予めこれらを一つのグループ(組)
として設定しておき、このグループ内の類似パターンの
文字が認識された場合には、特定の区画領域について、
前回とは設定を異ならせて画像処理を行い、この設定の
異なる画像処理に対して予め記憶された基準データと比
較することにより再検定を行うようにしている。
In particular, for example, the numbers “0” and a, the letter r
For DJs, if there are multiple letters or numbers that have a similar arrangement pattern, put them into one group (set) in advance.
, and when characters with similar patterns within this group are recognized, for a specific partition area,
Image processing is performed with settings different from the previous one, and re-verification is performed by comparing the image processing with different settings with previously stored reference data.

以下、上記再検定について、数字のrOJが認識された
場合を例にとって、第7図のフローチャートを参照しな
がら説明する。
Hereinafter, the re-verification will be described with reference to the flowchart of FIG. 7, taking as an example the case where the number rOJ is recognized.

上述した文字認識で、5分割による配列の25のます目
の全てが基準配列パターンと一致して数字の「0」が認
識されると、「0」再検定のプログラムが始動され、ま
ず、ステップ#91で、前回の5分IIJ(ステップ#
65参照)に代えて、細線化された画像を縦横6分割す
る。尚、分割すべき領域を縦横6分割して得られる配列
における36のまず目の各々には、第1L図に示すよう
に、O乃至35の区画番号が付与されている。尚、パタ
ーンが類似する数字の「0」とアルファベット文字rD
Jとは、上記6分割による配列中の第30区画と第35
区画にそれぞれ特徴があり、この2つの区画についての
比較を行うことにより、両者を明確に区別することがで
きる。
In the character recognition described above, when all 25 squares of the 5-division array match the standard array pattern and the number "0" is recognized, the "0" re-verification program is started, and first, step At #91, repeat the previous 5 minutes IIJ (step #
65), the thinned image is divided into six vertically and horizontally. It should be noted that each of the 36 first rows in the array obtained by dividing the area to be divided into six vertically and horizontally is assigned a section number from 0 to 35, as shown in FIG. 1L. In addition, the number “0” and the alphabet letter rD have similar patterns.
J means the 30th section and the 35th section in the above 6-division arrangement.
Each section has its own characteristics, and by comparing the two sections, it is possible to clearly distinguish between the two sections.

次に、ステップ#92乃至ステップ#95で、6分割し
て設けられた配列の第30区画について、5分割の場合
と同様の手法で(ステップ#68乃至ステップ#71参
照)、区画の全画素面積S1に対する抽出対象画素面積
Soの比率Rss。を算出する。また、同様にして、第
35区画についての上記比率R81,を算出する(ステ
ップ#96)。尚、6分割した場合には、数字「0」に
ついては、上記両比率の和が40%よりも小さくなるこ
とが予め確かめられている。
Next, in steps #92 to #95, for the 30th section of the array divided into six, all pixels of the section are The ratio Rss of the extraction target pixel area So to the area S1. Calculate. Similarly, the ratio R81 for the 35th section is calculated (step #96). It has been previously confirmed that when the number is divided into six, the sum of both ratios is smaller than 40% for the number "0".

そして、ステップ#97で、上記両比率の和(R6、。Then, in step #97, the sum of both the above ratios (R6,.

+R55s)が401%よりも小さいか否かが判定され
、YESの場合には数字の「0」であることが確認され
たので、このrOJが認識文字として格納される(ステ
ップ#99)。一方1.上記ステップ#97の判定結果
がNoの場合にはNG表示(ステップ#99)がされる
ようになっている。
+R55s) is smaller than 401%. If YES, it is confirmed that the number is "0", so this rOJ is stored as a recognized character (step #99). On the other hand 1. If the determination result in step #97 is No, NG is displayed (step #99).

尚、前回に認識された文字がアルファベットのrDJで
あった場合には、rDJ再検定プログラムにより上記ス
テップ#91乃至ステップ#96と同様のステップを実
行し、上記比率の和(R83゜+R11ss)が40%
以上である場合に、認識文字がアルファベットのrDJ
であることが検定される。
In addition, if the last recognized character was the alphabet rDJ, the same steps as steps #91 to #96 above are executed using the rDJ re-verification program, and the sum of the above ratios (R83°+R11ss) is calculated. 40%
or more, the recognition character is rDJ of the alphabet.
It is verified that

ちなみに、パターンが類似する他のグループの例として
は、数字「8コ、アルファベットrBJ及びrVJのグ
ループがあり、これらは6分割における第22区画の比
率RS f を及び第1区画の比率Rs。
Incidentally, examples of other groups with similar patterns include the groups of the number ``8'' and the alphabets rBJ and rVJ, which have the ratio RS f of the 22nd section and the ratio Rs of the first section in the 6-division.

の値によって、その違いを明確に区別することができる
The difference can be clearly distinguished depending on the value of .

また、ある一つの文字の対象パターンについて文字認識
の結果、複数の基準パターンと一致する場合がある。従
って、この−散散がIII!でない場合にはNGが表示
される。すなわち、第8図のフローチャートに示すよう
に、文字認識を実行するとともに、対象パターンが基準
パターンと一致した文字を格納し、更に、この一致が得
られた数をカウントして格納する(ステップ#101乃
至#夏03)。次に、この−散散が1であるか否かが判
定され(ステップ#104)、Noの場合には文字が特
定できないのでNG表示が行なわれ(ステップ#105
)、YESの場合には基本データと照合され(ステップ
#106)、NGまたはOKが表示される(ステップ#
107または#108)。
Further, as a result of character recognition, a target pattern of a certain character may match a plurality of reference patterns. Therefore, this - scattering is III! If not, NG is displayed. That is, as shown in the flowchart of FIG. 8, character recognition is executed, characters whose target pattern matches the reference pattern are stored, and the number of matches obtained is counted and stored (step # 101 to #Summer 03). Next, it is determined whether or not this -scattering is 1 (step #104), and if No, the character cannot be specified, so NG is displayed (step #105).
), if YES, it is compared with the basic data (step #106), and NG or OK is displayed (step #106).
107 or #108).

尚、上記実施例では、認識文字の再検定において、配列
パターンが類似するグループ内の文字が認識された場合
に、前回とは設定を異ならせて画像処理を行うに際して
、画像分割の分割数を異ならせて(5分割から6分割に
)行うようにしたものであったが、この代わりに、例え
ば、2値化処理を行う際のしきい値、あるいは全画素面
積に対する抽出対象画素面積の比率Rsに応じて複数の
信号値(0,1,2)を定める際のしきい値など、他の
設定条件を異ならせるようにしても良い。
In the above embodiment, in the re-verification of recognized characters, when characters in a group with similar arrangement patterns are recognized, the number of image divisions is changed when performing image processing with different settings from the previous one. However, instead of this, for example, the threshold value when performing binarization processing, or the ratio of the extraction target pixel area to the total pixel area Other setting conditions, such as threshold values for determining a plurality of signal values (0, 1, 2) depending on Rs, may be made different.

以上、説明したように、本実施例によれば、認識すべき
対象パターン(車体番号の刻印文字)を陰影を付けた状
態で撮像して得られた画像を2値化した後に細線化し、
その後に上記各区画面積Stに対する抽出対象画素面積
SOの比率Rsの算出、及びそれ以降の画像処理を行う
ようにしたので、陰影の付き方の影響を受けることのな
い、正確なパターン認識を行うことができるのである。
As described above, according to this embodiment, the image obtained by capturing the target pattern to be recognized (engraved characters of the vehicle body number) with shading is binarized and then thinned,
After that, the ratio Rs of the extraction target pixel area SO to each section area St is calculated, and the subsequent image processing is performed, so accurate pattern recognition is performed without being affected by shading. It is possible.

【図面の簡単な説明】 図面はいずれも本発明の詳細な説明するためのもので、
第1図は刻印ステーノヨンの概略構成を示すブロック構
成図、第2図は刻印検査装置の斜視図、第3図は上記刻
印ステーションでの刻印及び検査工程を説明するたぬの
フローチャート、第4図は刻印コントローラと画像処理
装置との間の信号系統図、第5図は上記画像処理装置に
よる文字認識の概略を説明するためのフローチャート、
第6図は上記画像処理装置による画像処理及びパターン
認識の具体例を説明するためのフローチャート、第7図
は認識文字の再検定を説明するためのフローチャート、
第8図は積数一致の場合における処理を説明すためのフ
ローチャート、第9図は細線化後の画像の一例を示す説
明図、第1O図は基準配列パターンの一例を示す説明図
、第11図は6分割におけるまず目の配列を示す説明図
である。 11・・・照明器、I2・・ビデオカメラ、13・・画
像処理装置、Rs・・比率、So  抽出対象画素面積
、St・・・区画の全画素面積。 第4図 第 図 第 図 ステンプ#23に リターン 第 図 第 図 第9図 第10図 第11図
[Brief Description of the Drawings] The drawings are for detailed explanation of the present invention.
Figure 1 is a block diagram showing the general structure of the stamping station, Figure 2 is a perspective view of the stamping inspection device, Figure 3 is a flowchart explaining the stamping and inspection process at the stamping station, and Figure 4. is a signal system diagram between the engraving controller and the image processing device, and FIG. 5 is a flowchart for explaining the outline of character recognition by the image processing device.
FIG. 6 is a flowchart for explaining a specific example of image processing and pattern recognition by the image processing device, FIG. 7 is a flowchart for explaining re-verification of recognized characters,
FIG. 8 is a flowchart for explaining the process in the case of product matching; FIG. 9 is an explanatory diagram showing an example of an image after thinning; FIG. FIG. 11 is an explanatory diagram showing the arrangement of the eyes in six divisions. 11...Illuminator, I2...Video camera, 13...Image processing device, Rs...Ratio, So pixel area to be extracted, St...Total pixel area of the section. Figure 4 Figure Figure Return to stencil #23 Figure Figure 9 Figure 10 Figure 11

Claims (1)

【特許請求の範囲】[Claims] (1)認識すべき対象パターンを照明光により陰影を付
けた状態で撮像し、得られた画像に画像処理を施すこと
によって2次元パターンを認識するパターン認識方法に
おいて、 上記対象パターンを含む画像を2値化した後に細線化す
るとともに、該画像を分割して得られた各区画領域につ
いて、各区画の全画素面積に対する該区画内の細線化さ
れた抽出対象画素面積の比率を算出し、該比率を所定の
しきい値によって複数の信号に分類し、これら信号のい
ずれかを各々有する各区画の組み合わせに基づいて、上
記対象パターンを認識することを特徴とするパターン認
識方法。
(1) In a pattern recognition method that recognizes a two-dimensional pattern by capturing an image of the target pattern to be recognized in a shaded state using illumination light and performing image processing on the obtained image, an image containing the target pattern is After binarization, thinning is performed, and for each divided area obtained by dividing the image, the ratio of the thinned extraction target pixel area in the divided area to the total pixel area of each divided area is calculated. A pattern recognition method characterized in that the ratio is classified into a plurality of signals according to a predetermined threshold, and the target pattern is recognized based on a combination of sections each having one of these signals.
JP2259177A 1990-09-27 1990-09-27 Pattern recognition method Pending JPH04135287A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2259177A JPH04135287A (en) 1990-09-27 1990-09-27 Pattern recognition method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2259177A JPH04135287A (en) 1990-09-27 1990-09-27 Pattern recognition method

Publications (1)

Publication Number Publication Date
JPH04135287A true JPH04135287A (en) 1992-05-08

Family

ID=17330435

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2259177A Pending JPH04135287A (en) 1990-09-27 1990-09-27 Pattern recognition method

Country Status (1)

Country Link
JP (1) JPH04135287A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010026805A (en) * 2008-07-18 2010-02-04 Denso Corp Character recognition device and character recognition method
WO2020100436A1 (en) * 2018-11-16 2020-05-22 株式会社 東芝 Reading system, reading method, program, storage medium, and moving body
JP2020194281A (en) * 2019-05-27 2020-12-03 株式会社東芝 Reading system, reading method, program, storage medium, and mobile body

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010026805A (en) * 2008-07-18 2010-02-04 Denso Corp Character recognition device and character recognition method
WO2020100436A1 (en) * 2018-11-16 2020-05-22 株式会社 東芝 Reading system, reading method, program, storage medium, and moving body
JP2020086615A (en) * 2018-11-16 2020-06-04 株式会社東芝 Reading system, reading method, program, storage medium and moving body
JP2021177435A (en) * 2018-11-16 2021-11-11 株式会社東芝 Reading system, reading method, program, storage medium and moving body
JP2020194281A (en) * 2019-05-27 2020-12-03 株式会社東芝 Reading system, reading method, program, storage medium, and mobile body

Similar Documents

Publication Publication Date Title
EP0372762B1 (en) Minutia data extraction in fingerprint identification
EP0437273B1 (en) Method of matching patterns and apparatus therefor
JP2004505337A (en) How to supply manufacturing-related data, especially for manufacturing objects
JPH0397086A (en) Character recognizing method
CN110596118A (en) Print pattern detection method and print pattern detection device
JPH04135287A (en) Pattern recognition method
CN106156774A (en) Image processing method and image processing system
JP2002042112A (en) Part mounting inspecting method for circuit board and its system
JP3025290B2 (en) Pattern recognition method
CN112633393B (en) Automatic classification method and device for ceramic tile textures
CN115601345A (en) Machine vision-based large-size punching plate hole group leakage-proof detection method and device
JP2005250786A (en) Image recognition method
JPH0520459A (en) Method and device for recognizing pattern
CN112529855A (en) Detection method and detection device for remote controller and computer readable storage medium
JP3395922B2 (en) Inspection method and inspection device
KR910007348B1 (en) Machine vision process and apparatus for reading a plurality of separated figures
CN117470872B (en) Board splitting quality detection method and device, board splitting machine and circuit board production line
JPH06317406A (en) Device for detecting position of article
JP3371614B2 (en) Recognition device
KR20020004313A (en) System and method for inspecting marks on semiconductor device using optical character recognition
JP2805476B2 (en) Character recognition method
JP3557814B2 (en) Image inspection apparatus and method
JP2002314982A (en) Method for detecting defect
CN114782509A (en) Workpiece waste detection method, system and device
JPH10332333A (en) Method for detecting angle of rotation and position of object