JPS63196993A - Loop detecting method for optical character reader - Google Patents

Loop detecting method for optical character reader

Info

Publication number
JPS63196993A
JPS63196993A JP62028026A JP2802687A JPS63196993A JP S63196993 A JPS63196993 A JP S63196993A JP 62028026 A JP62028026 A JP 62028026A JP 2802687 A JP2802687 A JP 2802687A JP S63196993 A JPS63196993 A JP S63196993A
Authority
JP
Japan
Prior art keywords
pattern
character
loops
stroke
black
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
JP62028026A
Other languages
Japanese (ja)
Inventor
Yasushi Kuwabara
康 桑原
Naoto Aoki
直人 青木
Hideo Watanabe
英男 渡辺
Katsumi Fukuchi
克己 福地
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP62028026A priority Critical patent/JPS63196993A/en
Publication of JPS63196993A publication Critical patent/JPS63196993A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To detect the number of loops of a character graphic pattern by a simple algorithm, by detecting the number of loops in a character graphic, based on a confluence of the same stroke. CONSTITUTION:In a pattern memory 1, a pattern 2 which becomes an object to be recognized is stored, and its contents can be referred to arbitrarily by an X coordinate and a Y coordinate shown by an X counter 3 and a Y counter 4. The pattern 2 is brought to a raster scan once extending over the whole surface, and in each main scan, a coordinate by which the pattern is varied from white to black and from black to white is detected. Also, a variation point coordinate obtained in some main scan is compared with a variation point coordinate obtained in the previous main scan, the continuity of a stroke is checked and it is managed by a table. In this case, the number of confluences of the same stroke corresponds to the number of loops, therefore, by calculating the number of confluences, based on the table, the number of loops of the pattern concerned is calculated.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、光学式文字読取装置(以下OCRと略す)に
おいて、文字認識における一つの重要な文字図形の特徴
であるループを検出する方法に関するものである。
DETAILED DESCRIPTION OF THE INVENTION (Industrial Application Field) The present invention relates to a method for detecting loops, which are one of the important characteristics of character shapes in character recognition, in an optical character reading device (hereinafter abbreviated as OCR). It is something.

(従来の技術) OCRで文字認識を行う場合、先ず読取対象となる文字
パターンを1文字分取シ出し、該パターンについて文字
線の傾き、交さ、曲シ具合、文字線の本数およびループ
があるか等等の文字パターンの特徴を抽出し、この特徴
の組合せによって該文字が何であったかを判定する。こ
れらの特徴の中でループ数は一つの重要な特徴となる。
(Prior art) When performing character recognition using OCR, first, a character pattern to be read is extracted one character at a time, and the inclination, intersection, curvature, number of character lines, and loops of the character lines are determined for the pattern. Characteristics of the character pattern, such as presence or absence, are extracted, and the combination of these characteristics determines what the character was. Among these characteristics, the number of loops is one important characteristic.

例えば、数字0〜9について考えれば、ループ数Oのも
のは、1,2,3,4,5.7であシ、ループ数1は0
,6.9であり、ループ数2のものは8である。すなわ
ち、ループ数だけで、これだけの分類が可能であり、特
に8についてはループ数だけで認識する事が可能である
For example, considering the numbers 0 to 9, the number of loops O is 1, 2, 3, 4, 5.7, and the number of loops 1 is 0.
, 6.9, and the number of loops is 8. In other words, this much classification is possible just by the number of loops, and in particular 8 can be recognized just by the number of loops.

このループ数の検出は、従来、次の方法で行われていた
。第7図にループを検出しようとしているパターンを示
す。該パターンのエツジの一点をP、Qと仮定する。こ
の各点を開始点とし、背景部を右に見ながらエツジをト
レースする。ここで、pがP点のトレース径路、qがQ
点のトレース径路となる。P、Q各点がパターンをトレ
ースし、開始点に戻った時、トレース径路に着目し、周
回方向が反時計方向であれば外周をトレースし、時計方
向であれば内周をトレースした事になる。したがって時
計方向のトレースをした径路の数が求めるパターンのル
ープ数となる。
The number of loops has conventionally been detected using the following method. FIG. 7 shows a pattern in which loops are to be detected. Assume that points P and Q are the edges of the pattern. Using each point as a starting point, trace the edge while looking at the background to the right. Here, p is the trace path of point P, q is Q
It becomes a trace path of points. When each point P and Q traces the pattern and returns to the starting point, pay attention to the tracing route. If the direction of rotation is counterclockwise, the outer circumference is traced, and if it is clockwise, the inner circumference is traced. Become. Therefore, the number of routes traced in the clockwise direction is the number of loops of the desired pattern.

(発明が解決しようとする問題点) しかしながら、上記従来のループ検出方法では、パター
ンのエツジ点をトレースする為に特別のノ1−ドウエア
が必要であり、ノ・−ドウエアの規模が大きくなるとい
う問題点があった。またトレースのアルゴリズムも複雑
である。
(Problems to be Solved by the Invention) However, in the conventional loop detection method described above, special hardware is required to trace the edge points of the pattern, and the scale of the hardware becomes large. There was a problem. The tracing algorithm is also complex.

本発明は以上述べたハードウェア規模の増大、トレース
アルゴリズムの複雑さといった従来技術の問題点を除去
し、藺易なアルゴリズムにより文字図形パターンのルー
プ数を検出できる方法を提供することを目的とする。
It is an object of the present invention to eliminate the problems of the conventional technology such as the increase in hardware scale and the complexity of the tracing algorithm described above, and to provide a method that can detect the number of loops in a character/figure pattern using an easy-to-use algorithm. .

(問題点を解決するための手段) 本発明は、帳票上の文字図形を光学的に読取り、光電変
換を介して白黒2値の文字図形パターンを得、該文字図
形パターンに基づいて文字認識を行なう光学式文字読取
装置におけるループ検出方法を対象とし、前記従来技術
の問題点を解決するため、着目する文字図形パターンを
ラスタ走査してその各主走査中のパターンの白/黒の変
化点座標を検出し、該変化点座標を前回の走査時の変化
点座標と比較することによりストロークの連続性をテー
ブルにより管理し、同一ストロークの合流に基づいて文
字図形中のループ数を検出するようにしたものである。
(Means for Solving the Problems) The present invention optically reads character figures on a form, obtains a black and white binary character figure pattern through photoelectric conversion, and performs character recognition based on the character figure pattern. In order to solve the above-mentioned problems of the prior art, the loop detection method in an optical character reading device is targeted, and the character figure pattern of interest is raster-scanned, and the coordinates of the white/black change point of the pattern during each main scan are calculated. By detecting the change point coordinates and comparing the change point coordinates with the change point coordinates from the previous scan, the continuity of strokes is managed using a table, and the number of loops in a character shape is detected based on the merging of the same strokes. This is what I did.

(作用) 本発明では、認識対象のパターンを一度全面うスク走査
し、各主走査においてパターンが白から黒、黒から白に
変化する座標を検出する。そしである主走査において得
られた変化点座標を前回の主走査において得られた変化
点座標と比較し、ストロークの連続性を調べそれをテー
ブルにより管理する。ここで同一ストロークの合流の数
はループ数と対応しているので、テーブルに基づいテ合
流の数を計数することにより、当該パターンのループ数
が検出される。以上の処理はノ・−ドウエア規模の増大
を招かず、また簡易なアルゴリズムにより実現できるの
で、前記従来技術の問題点が解決される。
(Operation) In the present invention, the entire surface of the pattern to be recognized is scanned once, and coordinates at which the pattern changes from white to black and from black to white are detected in each main scan. The coordinates of the change point obtained in one main scan are then compared with the coordinates of the change point obtained in the previous main scan to check the continuity of the strokes and manage them using a table. Here, since the number of merging of the same stroke corresponds to the number of loops, the number of loops of the pattern is detected by counting the number of merging of strokes based on the table. The above-mentioned processing does not increase the size of the hardware and can be realized by a simple algorithm, thus solving the problems of the prior art.

(実施例) 以下本発明の一実施例について詳細に説明する。(Example) An embodiment of the present invention will be described in detail below.

第1図は本実施例を示すブロック図、第2図は文字パタ
ーンの座標情報を格納する作業用テーブルを示す図であ
る。
FIG. 1 is a block diagram showing this embodiment, and FIG. 2 is a diagram showing a working table that stores coordinate information of character patterns.

先ず、本実施例の説明に先立って、本実施例が適用され
るOCRについて第3図にしたがって説明する。
First, prior to explaining this embodiment, OCR to which this embodiment is applied will be explained with reference to FIG.

31 は読取対象となる文字が記入された帳票であり、
帳票31上の読取対象文字は光源32によって照光され
、その反射光が光学レンズ33により集光され、CCD
センサ34に結像する。CCDセンサ34上に結像した
画像は、光電変換され、さらにA/D変換器35により
、ディジタル信号に変換され、画像メモリ36に格納さ
れる。ここで画像メモリ36には、帳票31を帳票搬送
系37によυCCDセンサ34と同期して搬送する事に
より、36のブロック内に示す様に一行分の2次元画像
データとして文字列を格納する事ができる。次に画像メ
モリ36に格納された1行分の文字画像の認識を行う事
になるが、文字認識は1文字毎に行う為、文字切出し部
38により画像メモリ36中の1パターンを切出し、パ
ターンメモリ39に格納する。そして、パターンメモリ
39中のパターンについて、特徴抽出部40にて文字の
特徴となるループ、文字線の凹凸、傾き等を検出し、コ
ード化した文字の特徴を特徴衣41に登録する。次に、
文字判定部42において、特徴衣41と、読取対象とな
る全一ての文字の特徴の登録されている認識辞書43 
との照合をとる事により、読取対象文字を決定する。
31 is a form in which characters to be read are written,
Characters to be read on the form 31 are illuminated by a light source 32, and the reflected light is focused by an optical lens 33, and the CCD
An image is formed on the sensor 34. The image formed on the CCD sensor 34 is photoelectrically converted, further converted into a digital signal by the A/D converter 35, and stored in the image memory 36. Here, in the image memory 36, by transporting the form 31 through the form transport system 37 in synchronization with the υCCD sensor 34, a character string is stored as one line of two-dimensional image data as shown in block 36. I can do things. Next, one line of character images stored in the image memory 36 will be recognized, but since character recognition is performed character by character, the character cutting unit 38 cuts out one pattern in the image memory 36 and creates a pattern. The data is stored in the memory 39. Then, for the pattern in the pattern memory 39, a feature extraction unit 40 detects character features such as loops, unevenness, and inclination of character lines, and registers the encoded character features in a feature 41. next,
In the character determination unit 42, a recognition dictionary 43 in which characteristics of all characters to be read are registered is a characteristic clothing 41.
The characters to be read are determined by comparing with the characters.

以上がOCRの基本原理であるが、本発明は特徴抽出部
40における、各種特徴の中の重要な特徴の1つである
文字パターンのループ検出に係るものである。
The above is the basic principle of OCR, and the present invention relates to loop detection of a character pattern, which is one of the important features among various features, in the feature extraction section 40.

次に、本実施例の説明をする。第1図のブロック図にお
いて、1は第3図の39 に相当するパターンメモリで
あシ、認識の対象となるパターン2が格納されておシ、
その内容はXカウンタ3、Yカウンタ4が示すX座標、
Y座標により任意に参照できるようになりている。
Next, the present embodiment will be explained. In the block diagram of FIG. 1, 1 is a pattern memory corresponding to 39 in FIG. 3, in which pattern 2 to be recognized is stored.
The contents are the X coordinate indicated by the X counter 3 and Y counter 4,
It can be referenced arbitrarily by the Y coordinate.

本実施例によるループ検出手順について説明すると、先
ずカウンタの操作であるが、Xカウンタ3をOからmま
で順次カウントアツプし、そのXカウンタ3の各アドレ
スについて、Yカウンタ4をOからnまで順次カウント
アツプする。すなわち、ここではY方向を主走査とし、
X方向を副走査としたラスタ走査となる。ただし、ここ
では仮にY方向を主走査としただけであシ、必要に応じ
Xを主走査としても、走査方向を逆としてもさしつかえ
ない。
To explain the loop detection procedure according to this embodiment, the first step is to operate the counter.The X counter 3 is counted up sequentially from O to m, and for each address of the X counter 3, the Y counter 4 is sequentially counted up from O to n. Count up. That is, here, the Y direction is the main scan,
This is raster scanning with the X direction as the sub-scanning. However, here, the Y direction is merely assumed to be the main scan, and if necessary, the X direction may be used as the main scan, or the scanning direction may be reversed.

ラスタ走査を行っていく過程で、文字パターン黒点部分
に尚ると、その黒部分の開始点と終了点の座標をY方向
の走査中の全ての黒点部につき記録する。第4図に第1
図の文字パターン2の左端部の拡大したものを示すが、
本例の場合、最初に記録される座標はY、jY、+4で
ある。そしてこの座標を第2図の作業用テーブルに下記
のルールにより登録する。
In the process of raster scanning, when a character pattern black dot portion is reached, the coordinates of the start point and end point of the black portion are recorded for all black dot portions being scanned in the Y direction. Figure 4 shows the first
An enlarged view of the left end of character pattern 2 in the figure is shown.
In this example, the coordinates recorded first are Y, jY, +4. Then, these coordinates are registered in the work table shown in FIG. 2 according to the following rules.

■ 本座標が既に登録されたストロークと関連のない場
合は、抽出されたストロークのY座標の開始点をテーブ
ル中のY3に、終了点をY、に登録し、ストローク塩を
新規に付与する。
(2) If the coordinates are not related to any already registered strokes, register the starting point of the Y coordinate of the extracted stroke in Y3 and the end point in Y in the table, and add a new stroke salt.

■ 本座標が既に登録されているストロークと関連があ
れば、抽出されたストロークのY座標の開始点をテーブ
ル中のY3に、終了点をY。に登録し、ストローク塩は
以前に登録されていたストローク塩を引き継ぐ。
■ If this coordinate is related to a stroke that has already been registered, set the starting point of the Y coordinate of the extracted stroke to Y3 in the table and the ending point to Y. , and the stroke salt takes over the previously registered stroke salt.

ここで、ストロークの関連性とは、前列の主走査におい
て抽出されたストロークと、今回の主走査において抽出
されたストロークとの連続性を見るものであシ、第5図
の例ではxk+1 の走査でYtSYt+2のストロー
クはXkの走査のYt+2〜Yt+4のストロークAと
連続している為、関連していると見なし、ストローク塩
Aを引継ぐ。一方、Xk+1の走査のYt+6〜Yt+
8のストロークはXk   、の走査におけるストロー
クAと連続していない為、ストローク塩は新たにBとす
る。
Here, the relevance of strokes refers to the continuity between the strokes extracted in the previous main scan and the strokes extracted in the current main scan, and in the example of FIG. Since the stroke of YtSYt+2 is continuous with the stroke A of Yt+2 to Yt+4 of the scan of Xk, it is considered that they are related, and the stroke salt A is inherited. On the other hand, Yt+6 to Yt+ of scanning Xk+1
Since the stroke of 8 is not continuous with the stroke A in the scan of Xk, the stroke salt is newly set to B.

以上の2つのルールに従い、第2図のテーブルを各副走
査の度に作シ直すが、この過程において、以下の事がわ
かる。
In accordance with the above two rules, the table shown in FIG. 2 is regenerated every time the sub-scanning is performed, and in this process, the following is found.

(a)  パターンの発生−一一新しいストローク塩の
付与を行なう。
(a) Pattern generation--Apply a new stroke salt.

(b)  パターンの分枝−一一同一ストローク名がテ
ーブルに追加登録される。
(b) Branching of pattern - 1 The same stroke name is additionally registered in the table.

(C)パターンの合流−m−同一又は異ったストローク
塩が一つの共通ストロ ークとして登録される。
(C) Merging of patterns-m-Identical or different stroke salts are registered as one common stroke.

(d)  パターンの消滅−m−パターンの右端である
(d) Disappearance of the pattern - m - Right edge of the pattern.

以上(a)〜(d)の各特徴となる点をパターンと対応
させたものが第6図である。このうち着目する点ハ(C
)のパターンの合流である。異ったストローク名同志の
合流であればループとはならない(第6図C点)が、同
一ストローク塩の合流であれば、すなわち、第2図のテ
ーブルを更新するに当シ前回のスキャンでの同一ストロ
ーク塩が合流により一つ減少すれば、そこに一つのルー
プが検出された事になる(第6図C点)。この様に合流
による同一ストローク塩の減少を1つのパターン全体を
走査する間に計数していけば、本パターンに含まれる全
ループ数を計数した事になる。
FIG. 6 shows the correspondence between the characteristic points of (a) to (d) above and the patterns. Of these, the point to pay attention to is C.
) is a confluence of patterns. A confluence of stroke names with different stroke names does not constitute a loop (point C in Figure 6), but a confluence of strokes with the same name means that when updating the table in Figure 2, it is not a loop. If the same stroke salt of is decreased by one due to merging, one loop has been detected there (point C in Figure 6). In this way, if the decrease in the same stroke salt due to merging is counted while scanning the entire pattern, the total number of loops included in this pattern will be counted.

(発明の効果) 以上詳細に説明したように、本発明によれば、ループ検
出を行なおうとする着目パターンを1度合面ラスタ走査
してその各主走査中のパターンの白/黒の変化点座標を
検出し、この座標を前回の走査時の座標と比較するだけ
でループ検出が行える為、小規模なハードウェアでルー
プ検出が実現可能であシ、小型で高精度なOCRの構築
が可能となる。
(Effects of the Invention) As described above in detail, according to the present invention, a pattern of interest for which loop detection is to be performed is scanned once in a combined plane raster scan, and the white/black change point of the pattern during each main scan is performed. Loop detection can be performed simply by detecting coordinates and comparing these coordinates with the coordinates from the previous scan, so loop detection can be achieved with small-scale hardware, making it possible to construct a compact and highly accurate OCR. becomes.

さらに、本発明の方法は、文字パターンを走査するとい
う事だけでループ検出の実現が可能な為、既存のOCR
,パターン認識装置等ループ検出を必要とする装置に容
易に適用するφが可能である。
Furthermore, since the method of the present invention can realize loop detection simply by scanning character patterns, it is
, φ can be easily applied to devices that require loop detection, such as pattern recognition devices.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図社本発明の実施例を示すブロック図、第2図は文
字パターンの座標情報を格納する作業用テーブルを示す
図、第3図は本発明の実施例が適用されるOCRのブロ
ック図、第4図は第1図のパターンの一部拡大図、第5
図はスト0−りの連続性の説明図、第6図はパターンの
特徴点を示す図、第7図は従来のループ検出方法の説明
図である0 1・・・パターンメモリ 2山パターン 3・・・Xカウンタ 4・・・Yカウンタ
Figure 1 is a block diagram showing an embodiment of the present invention, Figure 2 is a diagram showing a working table that stores coordinate information of character patterns, and Figure 3 is a block diagram of OCR to which the embodiment of the present invention is applied. , Figure 4 is a partially enlarged view of the pattern in Figure 1, Figure 5
The figure is an explanatory diagram of the continuity of the 0-1 pattern, FIG. 6 is a diagram showing the characteristic points of the pattern, and FIG. 7 is an explanatory diagram of the conventional loop detection method. ...X counter 4...Y counter

Claims (1)

【特許請求の範囲】 帳票上の文字図形を光学的に読取り、光電変換を介して
白黒2値の文字図形パターンを得、該文字図形パターン
に基づいて文字認識を行なう光学式文字読取装置におい
て、 着目する文字図形パターンをラスタ走査してその各主走
査中のパターンの白/黒の変化点座標を検出し、 該変化点座標を前回の走査時の変化点座標と比較するこ
とによりストロークの連続性をテーブルにより管理し、 同一ストロークの合流に基づいて文字図形中のループ数
を検出することを特徴とするループ検出方法。
[Scope of Claims] An optical character reading device that optically reads character figures on a form, obtains a black and white binary character figure pattern through photoelectric conversion, and performs character recognition based on the character figure pattern, The character/figure pattern of interest is raster-scanned, and the coordinates of the white/black change points of the pattern during each main scan are detected, and the change point coordinates are compared with the change point coordinates of the previous scan to determine the continuity of strokes. A loop detection method is characterized in that the number of loops in a character figure is detected based on the merging of the same strokes by managing the number of loops using a table.
JP62028026A 1987-02-12 1987-02-12 Loop detecting method for optical character reader Pending JPS63196993A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62028026A JPS63196993A (en) 1987-02-12 1987-02-12 Loop detecting method for optical character reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62028026A JPS63196993A (en) 1987-02-12 1987-02-12 Loop detecting method for optical character reader

Publications (1)

Publication Number Publication Date
JPS63196993A true JPS63196993A (en) 1988-08-15

Family

ID=12237233

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62028026A Pending JPS63196993A (en) 1987-02-12 1987-02-12 Loop detecting method for optical character reader

Country Status (1)

Country Link
JP (1) JPS63196993A (en)

Similar Documents

Publication Publication Date Title
US5691527A (en) Two dimensional code reading apparatus
EP1456811B1 (en) Reconstruction of virtual raster
US5515455A (en) System for recognizing handwritten words of cursive script
Joseph Processing of engineering line drawings for automatic input to CAD
US5228097A (en) Method for registering image data
US20020021835A1 (en) Method and device for recording of information
JPS63196993A (en) Loop detecting method for optical character reader
JP2002133424A (en) Detecting method of inclination angle and boundary of document
JPS5850078A (en) Character recognizing device
EP0381794B1 (en) Method for registering image data
JP2650443B2 (en) Line figure vectorization method
EP1303830B1 (en) Method and device for recording of information
JP2001229339A (en) Barcode reader
JPH0423303B2 (en)
JPH04112276A (en) Binary picture contour line chain encoding device
JP3021708B2 (en) Line image analyzer
JP3037504B2 (en) Image processing method and apparatus
JPH01201788A (en) Character reading method
JP2882056B2 (en) How to identify specific patterns
JPS63251873A (en) Method for detecting rotational angle of character string
JPH0962764A (en) Reading method for two-dimensional code and device therefor
JPH01156875A (en) Contour extracting system for binarized image
JP2004038669A (en) Image processing method
JPH057751B2 (en)
JPS62208181A (en) Graphic extracting system