JPH01169587A - Character recognizing method - Google Patents
Character recognizing methodInfo
- Publication number
- JPH01169587A JPH01169587A JP62328503A JP32850387A JPH01169587A JP H01169587 A JPH01169587 A JP H01169587A JP 62328503 A JP62328503 A JP 62328503A JP 32850387 A JP32850387 A JP 32850387A JP H01169587 A JPH01169587 A JP H01169587A
- Authority
- JP
- Japan
- Prior art keywords
- center position
- circumscribed rectangle
- pattern
- window
- character
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Landscapes
- Character Input (AREA)
- Character Discrimination (AREA)
Abstract
(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.
Description
【発明の詳細な説明】
産業上の利用分野
本発明は文字認識方法に関し、特に文字相互の位置がず
れたり文字列が回転する場合に好適に適用できる文字認
識方法に関するものである。DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a character recognition method, and particularly to a character recognition method that can be suitably applied when the positions of characters are shifted from each other or when a character string is rotated.
従来の技術
近年、工場において工程管理のために製品に印字された
製造番号を認識装置により認識し分類する必要性が高ま
ってきた。2. Description of the Related Art In recent years, there has been an increasing need for recognition devices to recognize and classify serial numbers printed on products for process control in factories.
その方法としては撮像装置で対象文字を撮像し、その映
像信号を2値化後フレームメモリに格納し、CPUで演
算処理をする方法がよく知られている。A well-known method for this is to image the target character with an imaging device, binarize the video signal, store it in a frame memory, and perform arithmetic processing on the CPU.
次に図面を参照しながら具体的な演算処理方法(文字認
識方法)の−例について説明する。第6図は撮像装置で
撮像された対象の文字列である。Next, an example of a specific arithmetic processing method (character recognition method) will be described with reference to the drawings. FIG. 6 shows a character string of an object imaged by an imaging device.
1〜3はあらかじめ教示されている文字が存在する領域
(ウィンドウ)を示す。14は画面の大きさを示す。1
6は英数文字36種類の標準パターンである。1 to 3 indicate areas (windows) in which characters taught in advance exist. 14 indicates the size of the screen. 1
6 is a standard pattern of 36 types of alphanumeric characters.
第6図は従来の文字認識方法を説明する流れ図である。FIG. 6 is a flowchart illustrating a conventional character recognition method.
まず撮像された画面14の中であらかじめ教示されてい
るウィンドウ1を設定し、その位置で標準パターン16
の各パターンと照合し、最も一致度の高い文字を認識結
果として決定する。First, the window 1 taught in advance on the captured screen 14 is set, and the standard pattern 16 is set at that position.
The character with the highest degree of matching is determined as the recognition result.
次に同様にしてウィンドウ2.3についても教示された
位置で標準パターンと照合を行ない文字を認識している
。Next, in the same manner, the character in window 2.3 is compared with the standard pattern at the taught position to recognize the character.
発明が解決しようとする問題点
しかしながら上記のような方法では、文字と文字との相
対関係がずれていたり文字列が回転していると、文字の
存在位置が変化し正しくパターン照合が行なえず認識不
可となることがある。また、特に文字列が2列以上ある
場合に列の構成文字位置を間違えて誤認識するという問
題点があった。Problems to be Solved by the Invention However, with the above method, if the relative relationship between characters is off or the character string is rotated, the position of the characters changes and pattern matching cannot be performed correctly, resulting in recognition failure. It may not be possible. In addition, there is a problem that, especially when there are two or more character strings, the positions of the characters forming the string may be incorrectly recognized.
本発明は上記問題点を解消し、文字相互間の位置がずれ
ていたり文字列が回転していても、対象の文字パターン
と標準パターンの照合を適切に行なうことのできる文字
認識方法を提供するものである。The present invention solves the above problems and provides a character recognition method that can appropriately match a target character pattern with a standard pattern even if the positions of the characters are shifted or the character string is rotated. It is something.
問題点を解決するだめの手段
上記問題点を解決するために本発明の文字認識方法は、
あらかじめ教示されたデータにより、文字の数だけウィ
ンドウを設定し、各ウィンドウ内に少なくとも一部が存
在するパターンの外接四角形の中心位置を検出し、各ウ
ィンドウについてその中心位置と外接四角形の中心位置
との距離が最も短い外接四角形を選択し、選択した外接
四角形の中心位置と標準パターンの中心位置とを重ねて
パターン照合して文字を認識するものである。Means for Solving the Problems In order to solve the above problems, the character recognition method of the present invention is as follows:
Using the data taught in advance, set up as many windows as the number of characters, detect the center position of the circumscribed rectangle of the pattern that exists at least partially within each window, and calculate the center position and the center position of the circumscribed rectangle for each window. The character is recognized by selecting the circumscribed rectangle with the shortest distance, and by overlapping the center position of the selected circumscribed rectangle with the center position of the standard pattern and performing pattern matching.
作 用
本発明は上記した構成によって、文次相互間の位置がず
れていたり文字列が回転していても、対象の文字パター
ンと標準パターンの照合が適切に行えて文字を正確に認
識することができる。Effect: With the above-described configuration, the present invention can appropriately match a target character pattern with a standard pattern and accurately recognize characters even if the positions of sentences are shifted or the character strings are rotated. Can be done.
実施例
以下、本発明の一実施例を第1図〜第4図を参照しなが
ら説明する。EXAMPLE Hereinafter, an example of the present invention will be described with reference to FIGS. 1 to 4.
第1図は処理の流れ図であり、第2図は対象物に印字さ
れた文字とマークの関係を示す図で、1〜6が文字の位
置を定義するウィンドウ、7はマークを示す。第3図は
文字認識時に文字列が回転している例を示す図である。FIG. 1 is a flowchart of the process, and FIG. 2 is a diagram showing the relationship between characters printed on an object and marks, where 1 to 6 are windows defining the positions of characters, and 7 is a mark. FIG. 3 is a diagram showing an example in which a character string is rotated during character recognition.
8〜13は検、出した文字の外接四角形を示す。第4図
は第3図の一部を詳細に説明するだめの図で、ウィンド
ウ4と文字の外接四角形の関係を示している。8 to 13 indicate the circumscribed rectangle of the detected and output character. FIG. 4 is a diagram for explaining a part of FIG. 3 in detail, and shows the relationship between the window 4 and the circumscribed rectangle of the characters.
あらかじめ第2図に示すように、マークと文字との相対
関係dr1 〜dr6 を登録しておく。次に、文字
を認識する時にマーク位置を認識した後、dt1〜dr
6を使ってウィンドウ1〜6を設定する。マーク位置を
認識する方法については、例えば本出願人による特願昭
61−247729号及び特願昭61−247730号
に詳しく開示されている。As shown in FIG. 2, the relative relationships dr1 to dr6 between marks and characters are registered in advance. Next, when recognizing characters, after recognizing the mark position, dt1~dr
6 to set windows 1 to 6. The method of recognizing the mark position is disclosed in detail in, for example, Japanese Patent Application No. 61-247729 and Japanese Patent Application No. 61-247730 filed by the present applicant.
ウィンドウが設定されると、ウィンドウ内のパターンを
捜し、そのパターンの外接四角形を検出する。外接四角
形を検出するには、例えばパターンの境界を追跡し、境
界点のうちX方向の最大座標と最小座標及びy方向の最
大座標と最小座標を捜すことにより容易に求められる。Once the window is set, we look for a pattern within the window and find the bounding rectangle of that pattern. The circumscribed rectangle can be easily detected, for example, by tracing the boundary of the pattern and searching for the maximum and minimum coordinates in the X direction and the maximum and minimum coordinates in the y direction among the boundary points.
この時、ノイズ等がウィンドウ内に存在する場合は境界
点内の面積値等の検定により除くことができる。At this time, if noise or the like exists within the window, it can be removed by testing the area value within the boundary point.
次に、第4図に示すように、ウィンドウの中心位置P。Next, as shown in FIG. 4, the center position P of the window.
とパターン外接四角形の中心位置Q1及びQ2を演算し
て求める。第4図の例ではパターンが2つあるので、P
o−Ql の距離drQ1とPo−Q2 の距離drQ
2 を比較し、短い方のdrQ2 をもつ外接四角
形11を選択する。第3図の例でウィンドウ3等にはパ
ターンが1つしか存在しないので、外接四角形の中心位
置を求める動作のみを行なう。and the center positions Q1 and Q2 of the pattern circumscribing rectangle are calculated. In the example in Figure 4, there are two patterns, so P
Distance drQ1 of o-Ql and distance drQ of Po-Q2
2 and select the circumscribed rectangle 11 with the shorter drQ2. In the example of FIG. 3, only one pattern exists in window 3, etc., so only the operation of determining the center position of the circumscribed rectangle is performed.
最後に、選択した外接四角形11の中心と標準パターン
の中心を重ねてパターン照合して、文字の認識を行ない
動作は終了する。この処理をすべてのウィンドウについ
て行なう。Finally, the center of the selected circumscribed rectangle 11 and the center of the standard pattern are overlapped and pattern-matched to perform character recognition and the operation ends. Perform this process for all windows.
このように、あらかじめ教示されたデータにより、ウィ
ンドウを設定し、各ウィンドウ内に存在するパターンの
外接四角形の中心位置を検出し、各ウィンドウについて
その中心位置と外接四角形の中心位置との距離が最も短
い外接四角形を選択し、選択した外接四角形の中心位置
と標準パターンの中心位11′tとを重ねてパターン照
合することにより、文字相互の位置関係がずれたり、文
字列が回転したりしていても、正しく文字を認識できる
のである。In this way, the windows are set using the data taught in advance, the center position of the circumscribed rectangle of the pattern existing in each window is detected, and the distance between the center position and the center position of the circumscribed rectangle for each window is the closest. By selecting a short circumscribed rectangle and performing pattern matching by overlapping the center position of the selected circumscribed rectangle with the center position 11't of the standard pattern, it is possible to check whether the positional relationship between characters is shifted or the character string is rotated. However, the characters can be recognized correctly.
上記実施例においては、マーク位置を求めてウィンドウ
を設定する例を示したが、文字列の位]1(tが登録時
と大きく変わらない場合は、マーク位置認識を行なわず
にウィンドウを設定してもよい。In the above embodiment, an example was shown in which a window is set by determining the mark position, but if the character string position] 1 (t is not significantly different from the time of registration, a window is set without performing mark position recognition. You can.
発明の効果
以上のように本発明は、あらかじめ教示されたデータに
より、文字の数だけウィンドウを設定し、各ウィンドウ
内に少なくとも一部が存在するパターンの外接四角形の
中心位置を検出し、各ウィンドウについてその中心位置
と外接四角形の中心位置との距離が最も短い外接四角形
を選択し、選択した外接四角形の中心位置と標準パター
ンの中心位置とを重ねてパターン照合することにより、
文字相互の位置がずれていたり、文字列が回転していて
も、正しく文字をghできる。Effects of the Invention As described above, the present invention sets windows as many as the number of characters using data taught in advance, detects the center position of a circumscribed rectangle of a pattern that exists at least partially within each window, and By selecting the circumscribed rectangle with the shortest distance between its center position and the center position of the circumscribed rectangle, and performing pattern matching by overlapping the center position of the selected circumscribed rectangle and the center position of the standard pattern,
Even if the positions of the characters are shifted or the character string is rotated, the characters can be correctly written.
第1図〜第4図は本発明の一実施例を示し、第1図は処
理の手順を示す流れ図、第2図はマークと文字位置を表
すウィンドウとの関係を示す図、第3図は文字列が回転
している時の状態を説明する図、第4図はウィンドウと
パターンの外接四角形の関係を説明する図、第6図は従
来方法の説明図、第6図は従来の処理手順を示す流れ図
である。
1〜6・・・・・・ウィンドウ、7・・・・・・マーク
、8〜13・・・・・・パターンの外接四角形。
代理人の氏名 弁理士 中 尾 敏 男 ほか1名第1
図
第2図
第3図
第4図
第5図1 to 4 show an embodiment of the present invention, FIG. 1 is a flowchart showing the processing procedure, FIG. 2 is a diagram showing the relationship between marks and windows representing character positions, and FIG. A diagram explaining the state when the character string is rotated, Figure 4 is a diagram explaining the relationship between the window and the circumscribed rectangle of the pattern, Figure 6 is an illustration of the conventional method, and Figure 6 is the conventional processing procedure. FIG. 1-6... Window, 7... Mark, 8-13... Circumscribed rectangle of pattern. Name of agent: Patent attorney Toshio Nakao and 1 other person No. 1
Figure 2 Figure 3 Figure 4 Figure 5
Claims (1)
ンドウを設定し、前記各ウィンドウ内に少なくとも一部
が存在するパターンの外接四角形の中心位置を検出し、
前記各ウィンドウについてその中心位置と前記外接四角
形の中心位置との距離が最も短い外接四角形を選択し、
前記選択した外接四角形の中心位置と標準パターンの中
心位置とを重ねてパターン照合して文字を認識すること
を特徴とする文字認識方法。Set windows as many as the number of characters according to data taught in advance, and detect the center position of a circumscribed rectangle of a pattern that is at least partially located within each window;
For each window, select a circumscribed rectangle with the shortest distance between its center position and the center position of the circumscribed rectangle;
A character recognition method characterized in that the character is recognized by pattern matching by overlapping the center position of the selected circumscribed rectangle and the center position of a standard pattern.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62328503A JP2663468B2 (en) | 1987-12-24 | 1987-12-24 | Character recognition method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62328503A JP2663468B2 (en) | 1987-12-24 | 1987-12-24 | Character recognition method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH01169587A true JPH01169587A (en) | 1989-07-04 |
| JP2663468B2 JP2663468B2 (en) | 1997-10-15 |
Family
ID=18211001
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP62328503A Expired - Lifetime JP2663468B2 (en) | 1987-12-24 | 1987-12-24 | Character recognition method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2663468B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2015019487A1 (en) * | 2013-08-09 | 2015-02-12 | 富士機械製造株式会社 | Mounting device and part detection method |
-
1987
- 1987-12-24 JP JP62328503A patent/JP2663468B2/en not_active Expired - Lifetime
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2015019487A1 (en) * | 2013-08-09 | 2015-02-12 | 富士機械製造株式会社 | Mounting device and part detection method |
| JPWO2015019487A1 (en) * | 2013-08-09 | 2017-03-02 | 富士機械製造株式会社 | Mounting apparatus and component detection method |
| US10314220B2 (en) | 2013-08-09 | 2019-06-04 | Fuji Corporation | Mounting machine and component detection method |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2663468B2 (en) | 1997-10-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2822189B2 (en) | Character recognition apparatus and method | |
| JPS63123167A (en) | Part recognition method | |
| JPH02306386A (en) | Character recognizing device | |
| JP2663468B2 (en) | Character recognition method | |
| JPH065545B2 (en) | Figure recognition device | |
| JPH087041A (en) | Character recognition method and device | |
| JP2909132B2 (en) | Optical character reader | |
| JP4194301B2 (en) | Character recognition system and character recognition program | |
| JPH0520459A (en) | Pattern recognition method and device | |
| JPS63237184A (en) | Character recognition method | |
| JP3000480B2 (en) | Character area break detection method | |
| JP2511131B2 (en) | Character recognition device | |
| JPH01265377A (en) | Segmenting system for handwritten character | |
| JP3088088B2 (en) | Drawing symbol recognition method | |
| JPH0728953A (en) | Character detector | |
| JPH01137385A (en) | Character recognizing device | |
| JPH06187450A (en) | Pattern recognition method and recognition device | |
| JPS647183A (en) | Pattern recognition method | |
| JPH06282682A (en) | Chatacter recognizing method | |
| JP3170010B2 (en) | Printing defect detection method | |
| JPS63250787A (en) | Method for segmentating character | |
| JP2953162B2 (en) | Character recognition device | |
| JPH05128309A (en) | Edge detecting method for character recognition | |
| JPH10293845A (en) | Dashed line recognition method | |
| JPH10162104A (en) | Character recognition device |