JPS63103392A - Character recognizing system - Google Patents

Character recognizing system

Info

Publication number
JPS63103392A
JPS63103392A JP61249159A JP24915986A JPS63103392A JP S63103392 A JPS63103392 A JP S63103392A JP 61249159 A JP61249159 A JP 61249159A JP 24915986 A JP24915986 A JP 24915986A JP S63103392 A JPS63103392 A JP S63103392A
Authority
JP
Japan
Prior art keywords
character
histogram
character image
code
pixels
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
JP61249159A
Other languages
Japanese (ja)
Inventor
Hajime Sato
元 佐藤
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP61249159A priority Critical patent/JPS63103392A/en
Priority to GB8711738A priority patent/GB2190778B/en
Priority to DE19873716787 priority patent/DE3716787A1/en
Publication of JPS63103392A publication Critical patent/JPS63103392A/en
Priority to US07/241,825 priority patent/US4903312A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/18Extraction of features or characteristics of the image
    • G06V30/18086Extraction of features or characteristics of the image by performing operations within image blocks or by using histograms
    • G06V30/18095Summing image-intensity values; Projection and histogram analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/18Extraction of features or characteristics of the image
    • G06V30/182Extraction of features or characteristics of the image by coding the contour of the pattern
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Character Discrimination (AREA)

Abstract

PURPOSE:To recognize characters with high precision in a relatively simple constitution by dividing a character image into areas most suitably for the character image to extract stable features. CONSTITUTION:The character image on a document is read by a scanner 1 and is binarized by a preprocessing part 2 and is subjected to normalization and smoothing processings. A feature extracting part 3 adds direction codes to the character outline part of the binary character image preprocessed by the preprocessing part 2. The feature extracting part 3 divides the character image into mesh areas. This division is so determined that direction code giving picture elements are distributed to respective mesh areas as uniformly as possible. The histogram of each direction code in respective mesh areas is obtained by the feature extracting part 3. A recognizing part 4 outputs a recognized character code in accordance with the histograms of respective direction codes extracted from the input character and histograms registered in a dictionary 5.

Description

【発明の詳細な説明】 〔技術分野〕 本発明は、文字認識方式に関し、特に文字線の輪郭部に
付けた方向コードのヒストグラムを認識に利用する文字
認識方式の改良に関する。
DETAILED DESCRIPTION OF THE INVENTION [Technical Field] The present invention relates to a character recognition system, and more particularly to an improvement of a character recognition system that uses a histogram of direction codes attached to the contours of character lines for recognition.

〔従来技術〕[Prior art]

活字文字の認識方式として5文字画像を4X4メツシユ
の大きさの領域に分割し、各領域内の文字部を構成する
メツシュ数を計算し、計数値が1以上ならば1を差引き
、その後の値を用いて辞書とのマツチングを行うものが
ある(特開昭56−110191号)。この方式は、認
識装置を簡略できる利点があるが、領域のサイズおよび
分割位置が固定しているなどから、変形の大きな手書き
文字の認識には適用できない。
As a recognition method for printed characters, a 5-character image is divided into areas of 4×4 mesh size, the number of meshes that make up the character part in each area is calculated, and if the count value is 1 or more, 1 is subtracted, and the subsequent There is a method that performs matching with a dictionary using values (Japanese Patent Laid-Open No. 110191/1983). Although this method has the advantage of simplifying the recognition device, it cannot be applied to the recognition of handwritten characters that are highly deformed because the size of the region and the division position are fixed.

一方、変形の大きい手書き文字のL!、織方式としては
、ストローク特徴などを利用するものなど、種々考案さ
れているが、何れも認識装置が複雑になるという問題が
ある。
On the other hand, the handwritten letter L has a large deformation! Various weaving methods have been devised, including ones that utilize stroke characteristics, but all of them have the problem of complicating the recognition device.

また、文字認識においては、前記従来例のように、文字
画像を領域分割して特徴抽出を行う場合が多々ある。こ
のような領域分割の方式としては、■前記従来例のごと
く分割点を固定しておく方法と、■文献「沖電気研究開
発」昭和58年12月第121号vo1.5ONa3の
pp、’77−82などに示されているような、文字画
像の周辺分布の重心点を利用して分割点を文字毎に決定
する方法が知られている。
Furthermore, in character recognition, features are often extracted by dividing a character image into regions, as in the conventional example. As methods for such area division, there are two methods: (1) fixing the division points as in the conventional example, and (2) the document "Oki Electric Research and Development" December 1980, No. 121, vol. 1.5 ONa3, pp. '77. There is a known method of determining dividing points for each character by using the center of gravity of the peripheral distribution of a character image, as shown in No. 1-82.

上記方法■は、変形の大きい手書き文字などの認識に適
用すると、特徴の安定化に効果がある。
The above method (2) is effective in stabilizing features when applied to recognition of handwritten characters that are highly deformed.

しかし周辺分布の重心点を利用する関係から、領°域分
割のための演算量が多くなり、高速処理が容易でない。
However, since the center of gravity of the peripheral distribution is used, the amount of calculation required for region division becomes large, making high-speed processing difficult.

一方、方式■は格別の演算を必要としない反面。On the other hand, method ■ does not require any special calculations.

文字が変形した場合に領域分割が不適当なものとなり、
文字の特徴を正しく抽出できないという問題がある。す
なわち、変形の少ない場合には文字線が含まれている分
割領域でも、文字が変形すると、その分割領域に文字線
が入らなくなったりし、特徴が不安定になる。例えば、
カナの「つ」と「ワ」の識別の手掛りは、文字上部の突
出部の有無だけであり、この部分の情報を領域分野によ
り安定に抽出し、特徴ベクトルに反映させなければなら
ない。しかるに、固定分割であると、「つ」が変形する
と、その上突出部が特定領域に含まれたり、含ま九なく
なったりし、「ワ」と誤認識しやすい。
If the characters are deformed, the area division becomes inappropriate.
There is a problem that character features cannot be extracted correctly. That is, even if a divided area includes a character line when the deformation is small, if the character is deformed, the character line may no longer fit into the divided area, making the characteristics unstable. for example,
The only clue to identifying the kana characters ``tsu'' and ``wa'' is the presence or absence of a protruding part at the top of the character, and this information must be stably extracted based on the domain and reflected in the feature vector. However, with fixed division, when the ``tsu'' is deformed, the upper protrusion may be included or not included in the specific area, making it easy to misrecognize it as a ``wa''.

〔目 的〕〔the purpose〕

本発明は前記問題点に鑑みてなされたものであり、活字
および手書きの英字、数字、記号、カナなどの高精度に
認識でき、かつ比較簡単な構成の装置にて実施可能な文
字L2m方式を提供することを目的とする。
The present invention has been made in view of the above-mentioned problems, and provides a character L2m method that can recognize printed and handwritten alphabetic characters, numbers, symbols, kana, etc. with high precision, and can be implemented using a device with a relatively simple configuration. The purpose is to provide.

〔構 成〕〔composition〕

本発明の文字認識方式は、2値の文字画像の文字線輪郭
部に方向コードを付け、それと同時にまたその後に方向
コード付与画素の総数とX方向軸およびY方向軸への射
影のヒストグラムHX iおよびHYjを求め、前記総
数および前記ヒストグラムHXi、HYjに基づき方向
コード付与画素をほぼ均等に含む複数のメツシュ領域に
前記文字画像をX方向およびY方向に分割し、前記各メ
ツシュ領域毎に方向コード別のヒストグラムを求め、そ
のヒストグラムと辞書のヒス・トゲラムとの距離演算を
行って文字を認識することを特徴とするものである。
The character recognition method of the present invention attaches a direction code to the character line outline of a binary character image, and at the same time and after that, a histogram H and HYj, divides the character image in the X direction and Y direction into a plurality of mesh areas including direction coded pixels almost evenly based on the total number and the histogram HXi, HYj, and assigns a direction code to each mesh area. This method is characterized by obtaining another histogram and calculating the distance between the histogram and the dictionary's histogram to recognize characters.

〔実施例〕〔Example〕

以下、本発明の実施例について図面を参照しながら詳細
に説明する。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

第1図は、本発明による文字認識処理の概略フローチャ
ートであり、また第2図は同フローチャートにしたがっ
て文字認識を実行する光学的文字認識装置(OCR)の
概略ブロック図である。後述の各実施例に共通な内容に
ついて、ここで説明する。
FIG. 1 is a schematic flowchart of character recognition processing according to the present invention, and FIG. 2 is a schematic block diagram of an optical character recognition apparatus (OCR) that performs character recognition according to the same flowchart. Contents common to each of the embodiments to be described later will be described here.

原稿の文字画像はスキャナー1により読み込まれ、前処
理部2で2値化され、個々の文字ごとに切り出され、正
規化およびスムージング処理を施される。特徴抽出部3
は、前処理部2により前処理された2値の文字画像の文
字線輪郭部に方向コードを付ける。この方向コードは1
文字線輪郭部の黒画素に付ける方法と、白画素に付ける
方法とがある。黒画素に付ける場合は、注目黒画素とそ
の上下左右の画素、合計5画素のパターンを観測し、第
3図に示す方向コードを付ける。白画素に付ける場合は
、注目白画素とその上下左右の画素、合計5画素のパタ
ーンを観測し、第4図に示す方向コードを付ける。第3
図および第4図における各5画素パターンの斜線格子は
黒画素、白抜き格子は白画素を示す。
A character image of a document is read by a scanner 1, binarized by a preprocessing section 2, cut out into individual characters, and subjected to normalization and smoothing processing. Feature extraction part 3
adds a direction code to the character line contour of the binary character image preprocessed by the preprocessing unit 2. This direction code is 1
There are two methods: one method is to attach it to black pixels of the character line outline, and the other method is to attach it to white pixels. When attaching a direction code to a black pixel, a pattern of five pixels in total, including the black pixel of interest and the pixels above, below, left and right of it, is observed, and the direction code shown in FIG. 3 is attached. When attaching a direction code to a white pixel, observe a pattern of five pixels in total, including the target white pixel and the pixels above, below, left, and right of the target white pixel, and attach the direction code shown in FIG. 4. Third
In each of the 5-pixel patterns in the figure and FIG. 4, the diagonal grid indicates black pixels, and the open grid indicates white pixels.

なお、黒画素に方向コードを付ける方法では。In addition, in the method of attaching direction codes to black pixels.

線幅が2以上の文字線部分にはその各縁に方向コードが
それぞれ付与されるのに対し、線幅が1の文字線部分に
は各縁共通の方向コード付与され、前者に比べ後者の方
向コード数は半分になってしまう。これは、線幅が1の
文字線部分が生じるような「かすれ」文字の場合に、特
徴量が不安定になるということである。白画素に方向コ
ードを付与する方法では、そのような問題は避けられる
Character line parts with a line width of 2 or more are given a direction code on each edge, whereas character line parts with a line width of 1 are given a common direction code for each edge, and the latter is different from the former. The number of direction codes will be halved. This means that in the case of a "faint" character in which a character line portion with a line width of 1 occurs, the feature amount becomes unstable. Such a problem can be avoided by adding a direction code to a white pixel.

したがって、白画素の方向コードをつける方法を採用す
れば、文字の「かすれ」に強くなる。逆に、黒画素に方
向コードを付ける方法を採用すると、文字の「つぶれ」
に強い。
Therefore, if a method of attaching direction codes for white pixels is adopted, characters will be more resistant to "fading". On the other hand, if a method of attaching direction codes to black pixels is adopted, the characters will be "squashed".
Strong against

カナ文字「ア」の前処理後の画像を第5図に示す、同文
字画像の輪郭黒画素に方向コードを付与した結果を第6
図に、また1輪郭白画素に方向コードを付けた結果を第
7図に示す。
Figure 5 shows the preprocessed image of the kana character "A". Figure 6 shows the result of adding direction codes to the outline black pixels of the character image.
In addition, FIG. 7 shows the result of attaching a direction code to one outline white pixel.

なお、後述のように、方向コード付は処理と同時に、方
向コード付与画素の総数とX方向軸および/またはY方
向軸の射影のヒストグラムが求められてテーブルに登録
される。勿論、このような画素総数の計数やヒストグラ
ム・テーブルの作成は、方向コード付は処理の後に独立
に行うこともできるが、同時実行のほか1文字画像のス
キャン走査の回数が減るなど、処理時間を短縮できる利
点がある。
As will be described later, at the same time as the direction coding process, a histogram of the total number of direction coded pixels and the projection of the X direction axis and/or the Y direction axis is obtained and registered in the table. Of course, such counting of the total number of pixels and creation of a histogram table can be performed independently after adding direction codes, but in addition to simultaneous execution, the number of scans for one character image is reduced, which reduces processing time. It has the advantage of being able to shorten the time.

次に、特徴抽出部3において、文字画像がX。Next, in the feature extraction section 3, the character image is changed to "X".

Y方向にN×Mのメツシュ領域に分割される。その分割
位置は、実施例に関連して詳細に説明するように、N×
Mのメツシュ領域に方向コード付与画素ができるだけ均
等に分配されるように決定される。このようにすること
により、文字の変形に適応したメツシュ領域分割が可能
であり、固定した位置で分割した場合における前述のよ
うな問題を解消できる。
It is divided into N×M mesh regions in the Y direction. The dividing position is N×
The direction code-applied pixels are determined to be distributed as evenly as possible in the M mesh areas. By doing this, it is possible to divide the mesh area in a way that is compatible with the deformation of the characters, and it is possible to solve the above-mentioned problem when dividing at a fixed position.

次に、特徴抽出部3において、各メツシュ領域(II 
j)毎に方向コード別のヒストグラムHkijが求めら
れる。ここで、kは方向コード(1〜8)である。
Next, in the feature extraction unit 3, each mesh region (II
A histogram Hkij for each direction code is obtained for each direction code. Here, k is a direction code (1 to 8).

認識部4は、特徴抽出部3によって入力文字から抽出さ
れた方向コード別ヒストグラムと、辞書5に登録されて
いる同様のヒストグラムを用いて、入力文字と各辞書登
録文字との距離を演算し、最も距離の小さい文字コード
を認識文字コードとして出力する0例えば、単純なユー
クリッド距離を考えると、文字Ωと入力文字のヒストグ
ラムDkijQと入力文字のヒストグラムHkijとの
距離dQは dQ=ΣΣΣ1DkijQ−Hkij lik で表される。
The recognition unit 4 uses the direction code-specific histogram extracted from the input character by the feature extraction unit 3 and similar histograms registered in the dictionary 5 to calculate the distance between the input character and each dictionary registered character, Output the character code with the smallest distance as the recognized character code 0 For example, considering simple Euclidean distance, the distance dQ between the character Ω, the input character histogram DkijQ, and the input character histogram Hkij is dQ=ΣΣΣ1DkijQ−Hkij lik expressed.

以下、各実施例ごとに、その固有な内容について順に説
明する。
Hereinafter, the unique contents of each embodiment will be explained in order.

実施例1 2値の入力文字画像は前処理後、一定のアルゴリズムに
従って方向コード付は処理(特徴付は処理)を施される
Embodiment 1 After pre-processing, a binary input character image is subjected to direction coding processing (characteristic processing) according to a certain algorithm.

この処理と同時に、方向コード付与画素(特徴付は画素
)の総数(P E)が計数され、また、方向コード付与
画素のX方向軸およびY方向軸への射影のヒストグラム
HX iおよびHYjが求められる。
At the same time as this process, the total number (PE) of direction coded pixels (pixels with characteristics) is counted, and histograms HXi and HYj of the projection of the direction coded pixels onto the X and Y axes are calculated. It will be done.

このヒストグラムの具体例を第8図に示す、この図にお
いて、20は方向コード付は処理画像であり、上端の数
字列はXアドレスの下位1桁を示し、左端の数字列はY
アドレスを示し、それ以外の数字が方向コードである。
A specific example of this histogram is shown in FIG. 8. In this figure, 20 is the processed image with a direction code, the number string at the top end indicates the lower one digit of the X address, and the number string at the left end shows the Y address.
It shows the address, and the other numbers are direction codes.

なお、この実施例および後述の実施例では横方向をX方
向、縦方向をY方向としているが、その関係を逆にして
もよい。
In this embodiment and the embodiments to be described later, the horizontal direction is the X direction and the vertical direction is the Y direction, but the relationship may be reversed.

この画像20の方向コード付与画素のX方向軸への射影
のヒストグラムHXiと、Y方向軸への射影のヒストグ
ラムHYjは、それぞれ図示のような型式のテーブル2
1.22に登録される。
A histogram HXi of the projection of the direction coded pixels of this image 20 onto the X-direction axis and a histogram HYj of the projection onto the Y-direction axis are each stored in a table 2 of the type shown in the figure.
Registered on 1.22.

このような処理の後、文字画像がX方向にN分割され、
Y方向にM分割され、結果としてNXNのメツシュ領域
に分割される。
After such processing, the character image is divided into N parts in the X direction,
The area is divided into M areas in the Y direction, resulting in N×N mesh areas.

第9図は、X方向の分割点を求める処理の概略フローチ
ャートである。この処理について順次説明する。
FIG. 9 is a schematic flowchart of the process of determining dividing points in the X direction. This process will be explained in order.

カウンタnyiおよびレジスタPの初期設定(ステップ
100)の後、カウンタiがインクリメントされ(ステ
ップ104)、その値(i)に対応するヒストグラムH
Xiの値がテーブルから読み出されてレジスタPの値に
加算されてレジスタPに再設定される(ステップ106
)。
After initializing counter nyi and register P (step 100), counter i is incremented (step 104), and the histogram H corresponding to its value (i) is
The value of Xi is read from the table, added to the value of register P, and reset to register P (step 106).
).

レジステPの値(P)が(PE/N)Xnを越えたか調
べられる(ステップ108)。
It is checked whether the value (P) of register P exceeds (PE/N)Xn (step 108).

この判定結果がNoならば、ステップ104から同様な
処理が繰り返される。
If the result of this determination is No, similar processing is repeated from step 104.

この処理は実質的には、Xアドレスを1ずつ増加させな
がら、画像のラスタースキャンを行って方向コード付与
画素の個数(P)を計数し、その個数を(PE/N)X
nと比較しているわけである。しかし、このようなラス
タースキャン、さらには総数PEを求めるためのラスタ
ースキャンを繰り返すのは非能率である。
This process essentially involves raster scanning the image while incrementing the
It is compared with n. However, it is inefficient to repeat such a raster scan, and furthermore, a raster scan for determining the total number PE.

そこで、この実施例においては、画像のラスタースキャ
ンを伴う方向コード付は処理段階において、ヒストグラ
ムHXi、HYjおよび総数PEを同時に求めておき、
それを利用することによってラスタースキャンを行わな
いようにして処理の能率向上を図っている。
Therefore, in this embodiment, the histograms HXi, HYj and the total number PE are obtained at the same time in the processing stage for the direction coding accompanying the raster scanning of the image.
By using this, raster scanning is not performed and processing efficiency is improved.

さて、P≧(PE/N)Xnとなった場合、その時のカ
ウンタiの値が、n番目のX方向分割領域の終点のXア
ドレスとして記憶され、また、そのXアドレスから領域
型なり幅Tを差し引いたXアドレスが(n+1)番目の
X方向分割領域の始点のXアドレスとして記憶される(
ステップ110)。
Now, when P≧(PE/N) The X address obtained by subtracting is stored as the X address of the starting point of the (n+1)th X direction divided area (
Step 110).

なお、1番目のX方向分割領域の始点は文字画像の左端
(X=0) 、最後つまりN番目のX方向分割領域の終
点は文字画像の右端である。
Note that the starting point of the first X-direction divided area is the left end (X=0) of the character image, and the end point of the last, ie, Nth, X-direction divided area is the right end of the character image.

ステップ110の次にカウンタnがインクリメントされ
(ステップ112)、次の分割点を求める処理が行われ
る。
After step 110, the counter n is incremented (step 112), and processing for finding the next division point is performed.

このような処理は、ステップ102でn=Nとなると終
了する。
Such processing ends when n=N in step 102.

Y方向の分割点についても同様にして求められる。つま
り、この場合は、カウンタiの代わりにYアドレスに対
応したカウンタjが用いられ、またY方向軸に対する射
影のヒストグラムHYjが参照される。
Dividing points in the Y direction are found in the same way. That is, in this case, the counter j corresponding to the Y address is used instead of the counter i, and the histogram HYj of the projection onto the Y direction axis is referred to.

また、1番目のY方向分割領域の始点は文字画像の上端
とされ、M番目のY方向分割領域の終点は文字画像の下
端とされる。
Further, the starting point of the first Y-direction divided area is the upper end of the character image, and the ending point of the M-th Y-direction divided area is the lower end of the character image.

このようにしてX方向およびY方向の分割点が求められ
、それら分割点によって文字画像はX。
In this way, dividing points in the X direction and Y direction are found, and the character image is divided into X by these dividing points.

Y方向にN×M個のメツシュ領域に分割される。It is divided into N×M mesh regions in the Y direction.

手書きカナ文字1ヌJの画像のメツシュ領域分割の例を
第10図に示す、ただし、メツシュ領域の重なり量Tを
1とした場合である。「ヌjと「ス」の識別の手掛りと
なるのは右下がりのストロークであり、この特徴をメツ
シュ領域に正しく反映させることが重要である。本実施
例によれば、かかる条件を満足し、「ヌ」と「ス」なと
の紛られしい文字を正しく識別して認識可能である。
FIG. 10 shows an example of mesh area division of an image of handwritten kana characters 1-J, assuming that the overlapping amount T of the mesh areas is 1. The key to distinguish between "nuj" and "su" is the downward-sloping stroke to the right, and it is important to correctly reflect this feature in the mesh area. According to this embodiment, such conditions are satisfied and confusing characters such as "nu" and "su" can be correctly identified and recognized.

実施例2 この実施例においては、方向コード付は処理と同時に、
方向コード付与画素の総数PEと、方向コード付与画素
のY方向軸への射影のヒストグラムHYjが求められる
Example 2 In this example, direction coding is performed at the same time as processing.
The total number PE of direction coded pixels and a histogram HYj of the projection of the direction coded pixels onto the Y-direction axis are determined.

そして、実施例1と同様の処理によって、文字画像はY
方向にM分割される。
Then, by the same processing as in Example 1, the character image is Y
It is divided into M parts in the direction.

次に、各Y方向分割領域内をラスタースキャンしながら
、その領域内がX方向にN分割される6第11図は、一
つのY方向分割領域のN分割処理の概略フローチャート
である。
Next, each Y-direction divided area is raster-scanned while the area is divided into N parts in the X direction.6 FIG. 11 is a schematic flowchart of the process of dividing one Y-direction divided area into N parts.

この処理を説明すれば、カウンタn、iおよびレジスタ
Pの初期設定(ステップ200)の後、カウンタiがイ
ンクリメントされ(ステップ204)、その値(i)に
通塔するXアドレスについて文字画像がY方向にラスタ
ースキャンされ、そのラインの方向コード付与画素の個
数が計数され、その値PiがレジスタPに加算される(
ステップ208)。レジスタPの値CP)が(PE/N
×M)Xnを越えたか調べられる(ステップ210)。
To explain this process, after initializing counters n, i and register P (step 200), counter i is incremented (step 204), and the character image Y is The raster scan is performed in the direction, the number of direction coded pixels in that line is counted, and the value Pi is added to the register P (
Step 208). The value CP of register P is (PE/N
×M) It is checked whether Xn is exceeded (step 210).

この判定結果がNOならば、ステップ204から同様な
処理が繰り返される。
If the result of this determination is NO, similar processing is repeated from step 204.

P≧(PE/NxM)Xnとなった場合、その時のカウ
ンタiの値がn番目のX方向分割領域の終点のXアドレ
スとして記憶され、また、そのXアドレスから領域重な
り幅Tを差し引いたXアドレスが(n+1)番目のX方
向分割領域の始点のXアドレスとして記憶される(ステ
ップ212)。
When P≧(PE/NxM) The address is stored as the X address of the starting point of the (n+1)th X-direction divided area (step 212).

なお、1番目のX方向分割領域の始点は文字画像の左端
(X=O)、最後つまりN番目のX方向分割領域の終点
は文字画像の右端である。
Note that the starting point of the first X-direction divided area is the left end (X=O) of the character image, and the end point of the last, ie, Nth, X-direction divided area is the right end of the character image.

ステップ212の次にカウンタnがインクリメントされ
(ステップ214)、次の分割点を求める処理が行われ
る。
After step 212, the counter n is incremented (step 214), and processing for finding the next division point is performed.

このような処理は、ステップ202でn=Nとなると終
了する。
Such processing ends when n=N in step 202.

このようにしてX方向およびY方向の分割点が求められ
、それら分割点によって文字画像はX。
In this way, dividing points in the X direction and Y direction are found, and the character image is divided into X by these dividing points.

Y方向にN×M個のメツシュ領域に分割される。It is divided into N×M mesh regions in the Y direction.

本実施例による「ヌ」の画像の分割結果を第12図に示
す。ただし、中段のY方向領域に対するX方向分割の結
果だけが示されている。またT=0としている。
FIG. 12 shows the result of dividing the image of "nu" according to this embodiment. However, only the results of the X-direction division for the middle Y-direction region are shown. Also, T=0.

なお、以上の説明では実施例1の方法でY方向の分割を
行ったが、X方向の分割を行った後、各分割領域につい
て第3図フローチャートに示したと同様な処理によりY
方向分割を行ってもよい。
In the above explanation, the division in the Y direction was performed using the method of Example 1, but after the division in the X direction, the Y direction was
Directional division may also be performed.

実施例3 重なり領域に方向コード付与画素が集中した場合、X、
Y各方向の分割領域内での画素数のバラツキが大きくな
る。その場合、前記実施例2のようにPE/ (N×M
)を基準として領域分割点を決定すると、領域分割が不
適切になることがある。
Example 3 When direction coded pixels are concentrated in the overlapping area, X,
The variation in the number of pixels within the divided regions in each Y direction increases. In that case, PE/(N×M
), the region division may become inappropriate.

この実施例によれば、そのような問題を解決できる。According to this embodiment, such a problem can be solved.

この実施例においては、方向コード付与処理と同時に方
向コード付与画素の総数PEと、方向コード付与画素の
Y方向軸への射影のヒストグラムHYjが求められ、次
に前記実施例1と同様の処理によって文字画像はY方向
にM分割される。
In this embodiment, simultaneously with the direction code assignment process, the total number PE of direction code assignment pixels and the histogram HYj of the projection of the direction code assignment pixels onto the Y axis are obtained, and then the same processing as in the first embodiment is performed. The character image is divided into M parts in the Y direction.

このY方向分割の際に、ヒストグラムHYjを参照して
、各分割領域内の方向コード付与画素数Pmが求められ
る。
During this Y-direction division, the number Pm of direction code-applied pixels in each divided area is determined with reference to the histogram HYj.

次に、各Y方向分割領域内をラスタースキャンしながら
、その領域内がX方向にN分割される。
Next, while raster scanning the inside of each Y-direction divided area, the area is divided into N parts in the X-direction.

第13図は、一つのY方向分割領域のN分割処理の概略
フローチャートである。
FIG. 13 is a schematic flowchart of N-dividing processing for one Y-direction divided region.

この処理を説明すれば、カウンタn、iおよびレジスタ
Pの初期設定(ステップ300)の後、カウンタiがイ
ンクリメントされ(ステップ304)、その値(i)に
対応するXアドレスについて文字画像がY方向にラスタ
ースキャンされ、そのラインの方向コード付与画素の個
数が計数され。
To explain this process, after initializing counters n, i and register P (step 300), counter i is incremented (step 304), and the character image is moved in the Y direction for the X address corresponding to the value (i). The line is raster scanned, and the number of direction coded pixels in that line is counted.

その値PiがレジスタPに加算される(ステップ308
)。そして、レジスタPの値CP)が(Pm/N)Xn
を越えたか調べられる(ステップ310)。
The value Pi is added to register P (step 308
). Then, the value CP of register P is (Pm/N)Xn
It is checked whether the value exceeds (step 310).

この判定結果がNOならば、ステップ304かな同様な
処理が繰り返される。
If the result of this determination is NO, step 304 or similar processing is repeated.

P≧(Pm/N)Xnとなった場合、その時のカウンタ
iの値がn番目のX方向分割領域の終点のXアドレスと
して記憶され、また、そのXアドレスから領域重なり幅
Tを差し引いたXアドレスが(n+1)番目のX方向分
割領域の始点のXアドレスとして記憶される(ステップ
312)。
When P≧(Pm/N) The address is stored as the X address of the starting point of the (n+1)th X-direction divided area (step 312).

なお、1番目のX方向分割領域の始点は文字画像の左端
(X=O)、最終つまりN番目のX方向分割領域の終点
は文字画像の右端である。
Note that the starting point of the first X-direction divided area is the left end (X=O) of the character image, and the end point of the final, ie, Nth, X-direction divided area is the right end of the character image.

ステップ312の次にカウンタnのインクリメントされ
(ステップ314)、次の分割点を求める処理が行われ
る。
After step 312, the counter n is incremented (step 314), and processing for finding the next division point is performed.

このような処理は、ステップ302がn=Nとなると終
了する。
Such processing ends when n=N in step 302.

このようにして得られたX方向の分割点でY方向分割領
域はX方向にN分割され、画像はN×Mのメツシュ領域
に分割される。
At the division points in the X direction thus obtained, the Y direction divided area is divided into N parts in the X direction, and the image is divided into N×M mesh areas.

手書きの「ヌ」画像について、重なりT=1として領域
分割した結果を第14図に示す。ただし、中段のY方向
分割領域のX方向分割の結果だけが示されている。
FIG. 14 shows the result of region segmentation of the handwritten "nu" image with overlap T=1. However, only the result of dividing the middle Y-direction divided area in the X-direction is shown.

実施例4 文字線輪郭部の黒画素に方向コードを付ける。Example 4 Add a direction code to the black pixels of the character line outline.

これ以外は前記実施例1と同じ処理を行う。Other than this, the same processing as in the first embodiment is performed.

実施例5 文字線輪郭部の黒画素に方向コードを付ける。Example 5 Add a direction code to the black pixels of the character line outline.

これ以外は前記実施例2と同じ処理を行う。Other than this, the same processing as in the second embodiment is performed.

実施例6 文字線輪郭部の黒画素に方向コードを付ける。Example 6 Add a direction code to the black pixels of the character line outline.

これ以外は前記実施例3と同じ処理を行う。Other than this, the same processing as in the third embodiment is performed.

以上説明した各処理段階はハードウェアでもソフトウェ
アでも容易に実行できる。そのような処理実行手段は、
当業者であれば、以上の説明から容易に実現できるであ
ろうから、その具体例の呈示は割愛する。
Each of the processing steps described above can be easily performed by hardware or software. Such processing execution means are
Those skilled in the art will be able to easily realize this from the above explanation, so a specific example thereof will be omitted.

〔効 果〕〔effect〕

以上説明した本発明の文字認識方式によれば、文字画像
に応じて最適な領域分割を行い、文字の変形に影響され
にくい安定な特徴(方向コード・ヒストグラム)を抽出
できるため、活字ならびに手書きの英字、数字、記号、
カナなどを高精度に認識でき、しかも処理内容は単純で
あるから、比較的簡単な構成にて文字認識を行うことが
できる。
According to the character recognition method of the present invention described above, it is possible to perform optimal region segmentation according to the character image and extract stable features (orientation code and histogram) that are not easily affected by character deformation. letters, numbers, symbols,
Since characters such as kana can be recognized with high precision and the processing content is simple, character recognition can be performed with a relatively simple configuration.

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

第1図は本発明による文字認識方式の処理の流れを示す
概略フローチャ・−ト、第2図は本発明により文字認識
を行うための光学的文字認識装置の概略ブロック図、第
3図は文字線軸郭部の黒画素に付ける方向コードのパタ
ーン対応図、第4図は文字線輪郭部の白画素に付ける方
向コードのパターン対応図、第5図は手書きのカナ文字
「ア」の前処理後の画像を示す図、第6図は同前処理画
像の文字線輪郭部の黒画素に方向コード付ける処理を行
った結果を示す図、第7図は同前処理画像の文字線輪郭
部の白画素に方向コードを付ける処理を行った結果を示
す図、第8図は方向コード付与画素のヒストグラムの例
を示す図、第9図は実施例1における領域分割処理を説
明するためのフローチャート、第10図は実施例1にお
ける領域分割の結果を示す図、第11図は実施例2にお
ける領域分割処理を説明するためのフローチャート、第
12図は実施例2による領域分割処理の結果を示す図、
第13図は実施例3における領域分割処理を説明するた
めのフローチャート、第14図は実施例3による領域分
割処理の結果を示す図である。 1・・・スキャナー、 2・・・前処理部、3・・・特
徴抽出部、 4・・・認識部、 5・・・辞書。 :21  [!1 第 2 図 第3図 コード   0125306(1 コード  4   8   00   7   0  
 00第 4 図 コード  01253060 コート=4    8    0    0    7
    0    0    0第  5  図 第6図 第  7  図 拳−−リ−・#−−・−222・・−−・伊・meea
eamam*第  11  図 ”222mgmmmm*eeemee*aa會ee*a
 asleep第  13 図
FIG. 1 is a schematic flowchart showing the processing flow of the character recognition method according to the present invention, FIG. 2 is a schematic block diagram of an optical character recognition device for character recognition according to the present invention, and FIG. Figure 4 is a pattern correspondence diagram of the direction code added to the black pixels in the line axis outline. Figure 4 is a diagram showing the pattern correspondence of the direction code added to the white pixels in the character line outline. Figure 5 is the handwritten kana character "A" after pre-processing. Figure 6 is a diagram showing the result of processing to attach a direction code to the black pixels of the character line outline of the same pre-processed image, and Figure 7 is a diagram showing the result of processing to add direction codes to the black pixels of the character line outline of the same pre-processed image. FIG. 8 is a diagram showing an example of a histogram of direction coded pixels; FIG. 9 is a flowchart for explaining region division processing in the first embodiment; FIG. FIG. 10 is a diagram showing the results of region division in Example 1, FIG. 11 is a flowchart for explaining region division processing in Example 2, and FIG. 12 is a diagram showing the results of region division processing in Example 2.
FIG. 13 is a flowchart for explaining region division processing in the third embodiment, and FIG. 14 is a diagram showing the results of the region division processing according to the third embodiment. 1... Scanner, 2... Preprocessing unit, 3... Feature extraction unit, 4... Recognition unit, 5... Dictionary. :21 [! 1 Figure 2 Figure 3 Code 0125306 (1 Code 4 8 00 7 0
00 Figure 4 Code 01253060 Coat=4 8 0 0 7
0 0 0 Fig. 5 Fig. 6 Fig. 7 Fist - Lee - # - - - 222 - - - Italy - meea
eamam*Figure 11"222mgmmmm*eeemee*aa meetingee*a
asleepFigure 13

Claims (2)

【特許請求の範囲】[Claims] (1)2値の文字画像の文字線輪郭部に方向コードを付
け、それと同時にまたはその後に方向コード付与画素の
総数とX方向軸およびY方向軸への射影のヒストグラム
HXiおよびHYjを求め、前記総数および前記ヒスト
グラムHXi、HYjに基づき方向コード付与画素をほ
ぼ均等に含む複数のメッシュ領域に前記文字画像をX方
向およびY方向に分割し、前記各メッシュ領域毎に方向
コード別のヒストグラムを求め、そのヒストグラムと辞
書のヒストグラムとの距離演算を行って文字を認識する
ことを特徴とする文字認識方式。
(1) Attach a direction code to the character line outline of a binary character image, and at the same time or after that, calculate the total number of direction coded pixels and histograms HXi and HYj of the projections onto the X-direction axis and the Y-direction axis, and dividing the character image in the X direction and the Y direction into a plurality of mesh regions including direction code-applied pixels almost equally based on the total number and the histograms HXi and HYj, and obtaining a histogram for each direction code for each mesh region; A character recognition method that recognizes characters by calculating the distance between the histogram and the histogram of a dictionary.
(2)2値の文字画像の文字線輪郭部に方向コードを付
け、それと同時にまたはその後に方向コード付与画素の
総数とX方向軸への射影のヒストグラムHXiを求め、
総数および前記ヒストグラムHXiに基づき方向コード
付与画素をほぼ均等に含むN個の領域に前記文字画像を
X方向に分割し、それと同時にまたはその後に前記各X
方向分割領域内の方向コード付与画素数を求め、前記各
X方向分割領域内をYアドレスを1つずつ増加させなが
らX方向にラスタースキャンして方向コード付与画素を
計数することにより、前記各X方向分割領域内を方向コ
ード付与画素をほぼ均等に含むM個の領域に分割し、こ
のようにして分割された前記文字画像のN×M個のメッ
シュ領域毎に方向コード別のヒストグラムを求め、その
ヒストグラムと辞書のヒストグラムとの距離演算を行っ
て文字を認識することを特徴とする文字認識方式。
(2) Attach a direction code to the character line contour of a binary character image, and at the same time or after that, calculate the total number of direction coded pixels and the histogram HXi of the projection onto the X direction axis;
The character image is divided in the X direction into N regions including direction coded pixels almost equally based on the total number and the histogram HXi, and at the same time or after that, each of the X
The number of pixels to which a direction code is applied in each direction divided area is calculated, and the number of pixels to which a direction code is applied is calculated by raster scanning in the X direction while increasing the Y address by one in each of the X direction divided areas. Divide the direction divided region into M regions including direction code-applied pixels almost equally, and obtain a histogram for each direction code for each of the N×M mesh regions of the character image thus divided; A character recognition method that recognizes characters by calculating the distance between the histogram and the histogram of a dictionary.
JP61249159A 1986-05-19 1986-10-20 Character recognizing system Pending JPS63103392A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP61249159A JPS63103392A (en) 1986-10-20 1986-10-20 Character recognizing system
GB8711738A GB2190778B (en) 1986-05-19 1987-05-19 Character recognition with variable subdivisions of a character region
DE19873716787 DE3716787A1 (en) 1986-05-19 1987-05-19 CHARACTER RECOGNITION METHOD
US07/241,825 US4903312A (en) 1986-05-19 1988-09-06 Character recognition with variable subdivisions of a character region

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61249159A JPS63103392A (en) 1986-10-20 1986-10-20 Character recognizing system

Publications (1)

Publication Number Publication Date
JPS63103392A true JPS63103392A (en) 1988-05-09

Family

ID=17188783

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61249159A Pending JPS63103392A (en) 1986-05-19 1986-10-20 Character recognizing system

Country Status (1)

Country Link
JP (1) JPS63103392A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0283687A (en) * 1988-09-20 1990-03-23 Nec Corp Feature extracting system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0283687A (en) * 1988-09-20 1990-03-23 Nec Corp Feature extracting system

Similar Documents

Publication Publication Date Title
US4903312A (en) Character recognition with variable subdivisions of a character region
US5410611A (en) Method for identifying word bounding boxes in text
US5058182A (en) Method and apparatus for handwritten character recognition
US4757551A (en) Character recognition method and system capable of recognizing slant characters
JP2641380B2 (en) Bending point extraction method for optical character recognition system
JP2001092919A (en) Method for determining angle of torsion of two- dimensional bar code
CN108615058A (en) A kind of method, apparatus of character recognition, equipment and readable storage medium storing program for executing
US20110262013A1 (en) Fingerprint matcher using iterative process and related methods
JPS63103392A (en) Character recognizing system
JP3172498B2 (en) Image recognition feature value extraction method and apparatus, storage medium for storing image analysis program
CN111126382A (en) Bill correction method for OCR recognition based on key point positioning
JPS63106088A (en) Area dividing system
JP2832928B2 (en) Character recognition method
JP2675303B2 (en) Character recognition method
JPH05342412A (en) Extracting system for gradient vector and feature extracting system for character recognition
Mikheev et al. High-quality polygonal contour approximation based on relaxation
KR910000786B1 (en) Pattern recognition system
JP2853169B2 (en) Pattern recognition device
JP3104355B2 (en) Feature extraction device
JP2643960B2 (en) Character recognition method
JP3463255B2 (en) Multi-valued image pattern recognition processing method
KR930012139B1 (en) Stroke extracting method for letter recognition
KR940007935B1 (en) Candidate classification method for recognizing character
JP2575402B2 (en) Character recognition method
JPH03126188A (en) Character recognizing device