JPH0576664B2 - - Google Patents
Info
- Publication number
- JPH0576664B2 JPH0576664B2 JP60110287A JP11028785A JPH0576664B2 JP H0576664 B2 JPH0576664 B2 JP H0576664B2 JP 60110287 A JP60110287 A JP 60110287A JP 11028785 A JP11028785 A JP 11028785A JP H0576664 B2 JPH0576664 B2 JP H0576664B2
- Authority
- JP
- Japan
- Prior art keywords
- character
- point
- scanning
- area
- feature
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Landscapes
- Character Discrimination (AREA)
Description
【発明の詳細な説明】
(産業上の利用分野)
本発明は印刷文字認識、特に、漢字、平仮名、
片仮名、英字、数字等の印刷邦文文字の認識にお
ける分類方式に関する。[Detailed Description of the Invention] (Industrial Application Field) The present invention relates to printed character recognition, particularly kanji, hiragana,
This paper relates to a classification method for recognizing printed Japanese characters such as katakana, alphabets, and numbers.
(従来技術とその問題点)
従来印刷漢字認識では、シングルフオントの場
合には、字種の多さ、字形の複雑さ、類似文字対
の多さ等の問題があり、マルチフオントになると
さらに字体の変化が問題とされて来た。一般に漢
字認識の対象字種は少なくとも常用漢字約2000字
からJIS第一水準約3000字であり、場合によつて
はそれ以上の字種の読み取りの要望もある。そこ
で字種の多さに対する対策として、比較的簡単な
処理によつて100字種程度に候補を絞る大分類が、
おおくの場合に採用されている。このようにして
選択された候補字種に対して、字形の複雑さを考
慮した認識方式を適用し、その結果認識出力が一
字種に絞れずに、類似文字対が残つたときには詳
細識別処理が行わなれる。このような処理の例で
は、大分類として複雑指数、四辺コード法の組み
合わせ、認識処理として複合類似度法、詳細識別
処理として混合類似度法が、約2000字のシングル
フオント印刷漢字認識に適用されたことが知られ
ている。(日経エレクトロニクス1977.10.31号
pp.102−128森健一、坂井邦夫、“2000字種を100
字/秒で読む印刷漢字OCRの開発”)しかしこの
ような大分類処理では認識対象をマルチフオント
にしたときの分類性能に問題があり、正しい候補
字種を後続する認識処理に送るために候補字種を
多くすると、認識処理の重荷が増大し、認識性能
および処理速度を維持することが難しくなるとい
う問題が生じる。(Prior art and its problems) Conventional printed kanji recognition has problems such as a large number of character types, complexity of character shapes, and large number of similar character pairs when using a single font, and even more when using a multi-font. Changes have been considered a problem. In general, the target character types for kanji recognition are at least about 2,000 commonly used kanji to about 3,000 JIS first-level characters, and in some cases there is a need to read more character types. Therefore, as a countermeasure against the large number of character types, a broad classification that narrows down the candidates to about 100 character types through relatively simple processing,
It is used in most cases. A recognition method that takes into account the complexity of the character shape is applied to the candidate character types selected in this way, and if the recognition output cannot be narrowed down to one character type and similar character pairs remain, detailed recognition processing is performed. can be done. In an example of such processing, a combination of complexity index and four-sided code method as a major classification, a composite similarity method as a recognition process, and a mixed similarity method as a detailed discrimination process are applied to the recognition of approximately 2000 single-font printed Kanji characters. It is known that (Nikkei Electronics 1977.10.31 issue
pp.102−128 Kenichi Mori, Kunio Sakai, “2000 character types to 100
(Development of OCR for printed kanji that can be read in characters per second) However, in this type of broad classification processing, there is a problem in classification performance when the recognition target is multi-font, and in order to send the correct candidate character type to the subsequent recognition processing, Increasing the number of character types increases the burden of recognition processing, creating a problem in that it becomes difficult to maintain recognition performance and processing speed.
この例とは別に常用漢字等の約2000字種のマル
チフオント印刷漢字を対象とし、分類処理をより
高性能にして、形状の類似した文字のある候補だ
けを詳細識別で処理し、殆どの文字は撫類過程で
認識処理してしまう例も報告されている。(電子
通信学会論文誌Vol.J67−D,No.8,目黒真一、
梅田三千雄、“マルチフオント印刷漢字認識装
置”)この分類過程では、下記に示す通り2種類
の特徴量を用いる。一つは、文字部を黒点、背景
部を白点で二値化されたm×n二次元配列で表わ
される文字パタンの外接矩形の水平方向の辺をM
分割、垂直方向をN分割し、この外接矩形を、M
×Nの矩形部分領域に分割し、各部分領域での黒
点数を計数し、M×N次元ベクトルを作り、ベク
トル空間での分類を行なうもので、実験的には、
8×8の部分領域に分割を行なつて64次元ベクト
ルで分類をするときが最も分類性能がよい。もう
一つの特徴量は、同じく二値化された文字パタン
の外接矩形の水平方向の辺をM分割、垂直方向の
辺をN分割し、左側の垂直方向の辺からは水平方
向右向きに走査し、黒点に初めて到達するまでの
白点数と2度目に到達するまでの白点数を計数す
る。この2種類の白点数をN個の区間でそれぞれ
合計すると、2×N個の要素が得られる。同様の
処理を、右側の垂直方向の辺からは水平方向左向
きに走査して行ない、上側の水平方向の辺からは
垂直方向下向きに走査して行ない、下側水平方向
の辺からは垂直方向上向きに走査して行ない、そ
れぞぞれの辺に対して、2×N個、2×M個、2
×M個の要素が得られる。従つて合計(M+N)
×2×2個の要素が得られるので、(M+N)×2
×2次元ベクトルを作り、ベクトル空間で分類を
行なう。実際的にはM=N=8として64次元ベク
トルで処理を行なうと最も性能がよい。 In addition to this example, we targeted approximately 2,000 types of multi-font printed kanji, such as commonly used kanji, and made the classification process more efficient, processing only candidates with similar shapes using detailed identification, and processing most of the characters. There have also been reports of cases in which recognition processing occurs during the recognition process. (IEICE Journal Vol. J67-D, No. 8, Shinichi Meguro,
(Michio Umeda, “Multi-font printed kanji recognition device”) In this classification process, two types of feature quantities are used as shown below. One is to define the horizontal sides of the circumscribed rectangle of the character pattern, which is expressed as an m×n two-dimensional array in which the character part is binarized with black dots and the background part is white dot, by M.
Divide the vertical direction into N parts, and divide this circumscribed rectangle into M
It divides into ×N rectangular partial regions, counts the number of sunspots in each partial region, creates M×N-dimensional vectors, and performs classification in vector space.Experimentally,
The best classification performance is obtained when dividing into 8×8 partial regions and performing classification using 64-dimensional vectors. Another feature quantity is to divide the horizontal side of the circumscribed rectangle of the same binarized character pattern into M divisions, and the vertical side into N divisions, and scan horizontally to the right from the left vertical side. , the number of white points until reaching the black point for the first time and the number of white points until reaching the black point for the second time are counted. By summing these two types of white point numbers for each of the N sections, 2×N elements are obtained. The same process is performed by scanning horizontally to the left from the right vertical side, vertically downward from the top horizontal side, and vertically upward from the bottom horizontal side. 2×N, 2×M, 2
xM elements are obtained. Therefore the total (M+N)
×2×2 elements are obtained, so (M+N)×2
x Create a two-dimensional vector and perform classification in vector space. In practice, the best performance is achieved by setting M=N=8 and processing using a 64-dimensional vector.
前者の特徴ベクトルは文字パタンの文字部の大
局的な分布を示しており、後者の特徴ベクトルは
文字パタンの周辺の形状を反映しており、共に絶
対位置に文字パタンの構造を大局的に反映させた
異なつた特徴となつている。しかしこれらの特徴
はいずれも大局的な性質を捉えているものなの
で、認識対象をJIS第一水準約3000字のように拡
大し、複雑な構造をした字形の文字が極端に多く
なり、かつ類似文字対の組み合わせが増加する
と、後続する識別処理に負担が大きくかかり、分
類性能の維持が困難になるという問題点がある。 The former feature vector indicates the global distribution of the character parts of the character pattern, and the latter feature vector reflects the shape of the periphery of the character pattern, and both reflect the structure of the character pattern in the absolute position in a global manner. It has become a different characteristic. However, since all of these characteristics capture global characteristics, we expanded the recognition target to approximately 3,000 characters of the JIS first level, and the number of characters with complex structures and shapes became extremely large. As the number of combinations of character pairs increases, there is a problem in that the subsequent identification processing becomes burdensome, making it difficult to maintain classification performance.
一方、文字パタンの相対位置の情報を反映させ
た特徴ベクトルによる分類方式もある。 On the other hand, there is also a classification method using feature vectors that reflect information on the relative positions of character patterns.
従来、この種の代表的な方式として下記の方式
が知られている。すなわち、まず、4辺が認識す
べき文字を囲むような矩形領域を作り、この領域
を縦方向にm個、横方向にn個に分割し、m×n
個の微小領域の集合とする。この各々の微小領域
を前記文字を含む領域内の点と定義する。このよ
うな点は文字を表わす線を含まない背景点と文字
を表わす線を含む文字点との2種類に分けられ
る。今、こうして定義されたある1つの背景点P
をとり、その点から左右の水平方向および上下の
垂直方向に走査線を出し、それらの走査線が前記
文字の線と、それぞれ左方にc回、右方にd回、
上方にa回、および下方にb回交差したとする。
これを背景点Pに付随する1つの特性を表わす量
と考え、すべての背景点には、あるそれぞれの
c,d,aおよびbの値をもつ特性が付随するこ
とになる。 Conventionally, the following method is known as a typical method of this type. That is, first, create a rectangular area whose four sides surround the character to be recognized, divide this area into m pieces vertically and n pieces horizontally, and divide the area into m×n pieces.
A set of microregions. Each minute area is defined as a point within the area containing the character. Such points are divided into two types: background points that do not include lines representing characters, and character points that include lines that represent characters. Now, a certain background point P defined in this way
From that point, scan lines are drawn horizontally to the left and right, and vertically to the top and bottom, and these scan lines are connected to the character line c times to the left and d times to the right, respectively.
Suppose that it has crossed upwards a times and downwards b times.
Considering this as a quantity representing one characteristic associated with the background point P, all background points are associated with a characteristic having certain respective values of c, d, a, and b.
今、仮に文字の線と交差する回数を表わす前記
c,d,a及びbの値が2又は2以上の場合に
は、それを2と制限することにすると許される値
は0,1および2の3種類とする。従つて、各点
の特性として許される種類の数は34=81であり、
81種類の各特性について背景点を集計し、81次元
のベクトルを生成し、このベクトルを用いて線形
識別関数によつて文字認識を行なう。 Now, if the values of c, d, a, and b, which represent the number of times the character lines intersect, are 2 or more than 2, then if we limit it to 2, the allowed values are 0, 1, and 2. There are three types. Therefore, the number of types allowed as characteristics of each point is 3 4 = 81,
We aggregate background points for each of the 81 types of characteristics to generate an 81-dimensional vector, and use this vector to perform character recognition using a linear discriminant function.
これはグラツクスマン(Glucksman)の方法
[エイチ・エイ・グラツクスマン:クラシフイケ
ーシヨンオブミツクスドフオントアルフアベチツ
クスバイキヤラクタリスチツクスロシ,ダイジエ
ストオブフアストアイイーイーイーコンピユータ
コンフアレンス,138ページ,1967年参照(H.A.
Glucksman:Classification of Mixed font
Alphabetics by Characteristic Loci,Digest
of First IEEE computer Conference,P.138,
1967)]として知られているがこれを漢字を含む
邦文文字の認識に適用しようとすると、次のよう
な問題が生じる。 This is Glucksman's method [H.A. Year reference (HA
Glucksman: Classification of Mixed font
Alphabetics by Characteristic Loci, Digest
of First IEEE computer Conference, P.138,
1967)], but when trying to apply this to the recognition of Japanese characters including Kanji, the following problems arise.
まず、第1に水平あるいは垂直の走査線が文字
と交差回路を2回を上限としているが、漢字のよ
うにストローク数が多い文字に対しては少なすぎ
る。 First, the number of times a horizontal or vertical scanning line intersects a character is limited to two times, which is too small for characters with a large number of strokes, such as Kanji characters.
第2に単に文字部との交差回数を計数するだけ
では、文字の傾きに対して上記ベクトルの要素の
値が不安定になる。 Second, simply counting the number of intersections with the character portion will make the values of the vector elements unstable with respect to the inclination of the character.
第3に交差回数の上限を漢字の複数さに合わせ
7程度までとつた場合には、上記のようなベクト
ルを作ると、84=4096次元という膨大な次元数を
もつ空間のベクトルを処理する必要が生じ、処理
が非常に困難になる。 Third, if the upper limit of the number of intersections is set to about 7 to match the plurality of kanji, then creating a vector like the one above will process a vector in a space with a huge number of dimensions, 8 4 = 4096 dimensions. The need arises and the process becomes very difficult.
上記のような欠点を除去するために交差回数の
上限を増加し、交差回数の計数値を文字の傾きに
対して安定に決定し、さらに処理量を実現可能な
量に軽減する文字認識方式は、既に特開昭58−
70383号公報(特願昭56−169153号明細書文字認
識方式)として示されている。この認識方式は、
相対位置情報だけを扱いながら効果的な分類を行
なつているが、印刷文字の分類に用途を限定する
と印刷文字特有の絶対位置情報を導入することに
より、さらに効果的な分類が期待できる。 In order to eliminate the above-mentioned drawbacks, a character recognition method that increases the upper limit of the number of intersections, stably determines the count value of the number of intersections with respect to the inclination of the character, and further reduces the amount of processing to a feasible amount is proposed. , has already been published in Japanese Patent Publication No. 1983-
This method is disclosed in Japanese Patent Application No. 70383 (Patent Application No. 169153/1983 Character Recognition System). This recognition method is
Although effective classification is performed using only relative position information, if the application is limited to the classification of printed characters, even more effective classification can be expected by introducing absolute position information specific to printed characters.
このような一つの試みとしては既に特公昭58−
16503号公報(文字識別処理方式)がある。ここ
ではまず前記グラツクスマンの方法と同様に各背
景点から上下左右に走査したときの交差回数a,
b,c,dを求めるが、特に交差回数は2回まで
とは限定していない。前記交差回数が割りつけら
れた後に、前記m×nの文字パタンを横方向にM
分割、縦方向にN分割してM×Nの局所領域を定
める。この局所領域は、横方向にp個、縦方向に
q個から成つており、m=M×p,n=N×qと
いう関係がある。前記各局所領域において、前記
局所領域内の各点に割りつけられた上下左右方向
ごとの交差数の合計を求め、上方向の交差数の合
計をA、下方向の交差数の合計をB、左方向の交
差数の合計をC、右方向の交差数の合計をDとし
たとき、この(A,B,C,D)で示される4次
元ベクトルを前記局所領域を代表する特徴ベクト
ルとしている。前記各局所領域について、代表す
る4次元特徴ベクトルを求め、すべての特徴ベク
トル或いは選択された特徴ベクトルを用いてベク
トル演算で分類を行なつている。この方法は確か
に位置情報が反映されてはいるが、各局所領域内
で上下左右方向ごとの交差数の合計を求め、4次
元ベクトルにしていることにより、局所領域が比
較的小さいときには、前記グラツクスマンの方
法、或いは前記特開昭58−70383号公報の方法の
特徴となつている相対位置情報が、前記4次元ベ
クトルでもほぼ保存されるが、前記局所領域が大
きくなると前記相対位置情報が劣化するという問
題がある。従つて分類能力を優先すると、前記局
所領域を小さくすることになる。すなわち前記
p,qの値を小さくすることになる。しかし、前
記m,n,M,N,p,qの関係から、前記p,
qの値を小さくすると、前記M,Nの値は大きく
なり、局所領域の数M×Nが大きくなる。前記各
局所領域は4次元ベクトルで代表されているの
で、すべての局所領域を用いて文字パタンを代表
すると4×M×N次元のベクトルとなり、前記局
所領域の数M×Nが増大することは前記文字パタ
ンを代表するベクトルの次元が増大することを意
味し、これは分類のためのベクトル演算での処理
の増大を招くことになる。例えば文字パタンが64
×64のパタンであるとき、すなわちm=n=64で
あるとき、局所領域の大きさを4×4、すなわち
p=q=4とすると、前記m,n,M,N,p,
qの関係からM=N=16となり、局所領域の数は
256個、すなわちM×N=256となる。従つてすべ
ての局所領域を用いて前記文字パタンを表わすと
4×M×N=1024次元という膨大な次元数のベク
トルとなる。また前記次元数を減らすために局所
領域を選択することにしても、仮に8分の1の32
個を選択しても、ベクトルの次元数は128次元
(=4次元×32)となるが、逆に文字パタンとし
て失なれる情報が大きすぎるという問題点が残
る。また局所領域の大きさを大きくして、仮にp
=q=8とすると、M=N=8となり、文字パタ
ンを代表するベクトルの次元数は256次元(=4
次元×8×8)と低くなるが、既に述べた通り8
×8の領域をわずか4次元ベクトルで代表すると
いうことで分類能力に問題が生じる。 One such attempt was already made in 1983.
There is a publication No. 16503 (character identification processing method). Here, first, as in Glucksman's method, the number of intersections a, when scanning from each background point in the vertical and horizontal directions,
Although b, c, and d are determined, the number of intersections is not particularly limited to two times. After the number of intersections is assigned, the m×n character pattern is
Divide, divide into N in the vertical direction to define M×N local areas. This local area consists of p pieces in the horizontal direction and q pieces in the vertical direction, and the relationship is m=M×p, n=N×q. In each local area, calculate the total number of intersections in each of the vertical and horizontal directions assigned to each point in the local area, and calculate the total number of intersections in the upward direction as A, the total number of intersections in the downward direction as B, When the total number of intersections in the left direction is C and the total number of intersections in the right direction is D, the four-dimensional vector represented by (A, B, C, D) is the feature vector representing the local area. . For each local area, a representative four-dimensional feature vector is obtained, and classification is performed by vector calculation using all feature vectors or selected feature vectors. Although this method does reflect position information, by calculating the total number of intersections in each direction, up, down, left, and right within each local area and making it into a four-dimensional vector, when the local area is relatively small, the Relative position information, which is a feature of Glucksmann's method or the method of JP-A-58-70383, is almost preserved in the four-dimensional vector, but as the local area becomes larger, the relative position information deteriorates. There is a problem with doing so. Therefore, if priority is given to classification ability, the local area will be made smaller. In other words, the values of p and q are reduced. However, from the relationship of m, n, M, N, p, q, the p,
When the value of q is reduced, the values of M and N become larger, and the number of local regions M×N becomes larger. Each of the local regions is represented by a four-dimensional vector, so if all the local regions are used to represent a character pattern, it becomes a 4×M×N-dimensional vector, and the number M×N of the local regions increases. This means that the dimension of the vector representing the character pattern increases, which leads to an increase in the processing required for vector calculations for classification. For example, the character pattern is 64
When the pattern is ×64, that is, m=n=64, and the size of the local area is 4×4, that is, p=q=4, the m, n, M, N, p,
From the relationship of q, M=N=16, and the number of local regions is
256 pieces, that is, M×N=256. Therefore, if the character pattern is represented using all the local regions, it will become a vector with an enormous number of dimensions of 4×M×N=1024 dimensions. In addition, even if we choose local regions to reduce the number of dimensions, if 1/8th of 32
Even if this number is selected, the number of dimensions of the vector becomes 128 dimensions (=4 dimensions x 32), but the problem remains that too much information can be lost as a character pattern. Also, by increasing the size of the local region and assuming that p
= q = 8, M = N = 8, and the number of dimensions of the vector representing the character pattern is 256 dimensions (= 4
dimension × 8 × 8), but as already mentioned, 8
A problem arises in the classification ability because the ×8 area is represented by only a four-dimensional vector.
(発明の目的)
本発明の目的は字種の増加に伴ない、複雑な構
造をした文字が極端に多くなり、かつ類似文字の
組合わせが増加しても充分に印刷文字の分類性能
を維持するために、相対位置情報と絶対位置情報
とを反映する安定した特徴を、64次元ベクトルと
いう非常に低い次元のベクトルで実現することに
より、処理量の増大をも防止することのできる文
字分類方式を提供するものである。(Objective of the Invention) The object of the present invention is to maintain sufficient classification performance for printed characters even when the number of characters with complex structures increases and the number of combinations of similar characters increases with the increase in character types. In order to do this, we have developed a character classification method that can prevent an increase in the amount of processing by realizing stable features that reflect relative position information and absolute position information using a 64-dimensional vector, which is a very low-dimensional vector. It provides:
(発明の構成)
本発明によれば、文字部と背景部とが、二値か
ら成る量子化信号に変換されて成る文字パタン上
で、背景部の各点より複数方向に走査し、交差す
るストローク数を計数し、特徴付けを行なうこと
によつて得られる特徴を用いる文字分類方式に於
いて、前記文字パタンの外接矩形領域を、水平方
向及び垂直方向にそれぞれ二等分して4種の小領
域を定め、前記小領域のうち、左上の小領域では
前記背景部の各点から上方向及び左方向の2方向
へ走査を行ない、右上の小領域では前記背景部の
各点から上方向及び右方向の2方向へ走査を行な
い、左下の小領域では前記背景部の各点から下方
向及び左方向の2方向へ走査を行ない、右下の小
領域では前記背景部の各点から下方向及び右方向
の2方向へ走査を行ない、前記上方向及び下方向
の走査では水平方向と斜方向のストロークと交差
した回数を計数し、前記左方向及び右方向の走査
では垂直方向と斜方向のストロークと交差した回
数を計数し、交差回数が0,1,2回のときには
そのままの交差回数を、前記交差回数が3回以上
のときは交差回数を3とし、前記それぞれの4箇
所の小領域の背景部の各点に、2方向の交差回数
の組み合わせて16種類の特徴コードを割りつける
特徴パタン生成部と、前記4箇所の小領域に於い
て、それぞれ16種類の特徴コードの出現頻度を計
数して16個の要素を求め、この結果全領域で求ま
る64個の要素を前記外接矩形の面積で正規化して
得られる64次元ベクトルを入力特徴ベクトルとす
る特徴ベクトル抽出部と、前記入力特徴ベクトル
と同じ形式の64次元ベクトルで記述されて各字種
ごとに用意されている標準ベクトルを格納する標
準ベクトル記憶部と、前記入力特徴ベクトルと前
記各字種ごとの標準特徴ベクトルとを照合し、ベ
クトル計算によつて前記入力特徴ベクトルと前記
各字種ごとの標準ベクトルとの相違度を求める相
違度演算部と、前記相違度によつて各字種の順位
付けを行ない、詳細識別のための候補字種を定め
る分類処理部とを有し、絶対位置情報と文字パタ
ンの構造情報とを反映した特徴量によつて文字認
識のための大分類を行なうことを特徴とする文字
分類方式を実現することができる。(Structure of the Invention) According to the present invention, a character pattern formed by converting a character portion and a background portion into a quantized signal consisting of binary values is scanned in multiple directions from each point of the background portion and intersected. In a character classification method that uses features obtained by counting the number of strokes and performing characterization, the circumscribed rectangular area of the character pattern is divided into two halves in the horizontal and vertical directions, and four types of characters are classified. A small area is defined, and in the upper left small area, scanning is performed in two directions upward and to the left from each point in the background area, and in the upper right small area, scanning is performed in the upward direction from each point in the background area. In the lower left small area, scanning is performed in two directions, downward and to the left from each point in the background part, and in the lower right small area, scanning is performed in two directions from each point in the background part to the downward direction. Scanning is performed in two directions, ie, the horizontal direction and the right direction, and the number of times the horizontal and diagonal strokes intersect with each other is counted in the upward and downward scans, and the number of times the strokes intersect with the horizontal and diagonal strokes is counted in the left and right scans. Count the number of times the stroke intersects with the stroke of A feature pattern generation unit that assigns 16 types of feature codes to each point in the background part of the region by combining the number of intersections in two directions, and the appearance frequency of each of the 16 types of feature codes in the four small regions mentioned above. a feature vector extraction unit that takes as an input feature vector a 64-dimensional vector obtained by calculating 16 elements, and normalizing the 64 elements found in the entire region by the area of the circumscribed rectangle; Compare the input feature vector and the standard feature vector for each character type with a standard vector storage unit that stores standard vectors described in 64-dimensional vectors in the same format as the feature vectors and prepared for each character type. and a dissimilarity calculation unit that calculates the degree of dissimilarity between the input feature vector and the standard vector for each character type by vector calculation, and a dissimilarity calculation unit that ranks each character type based on the dissimilarity and performs detailed discrimination. a classification processing unit that determines candidate character types for character recognition, and performs broad classification for character recognition based on feature amounts that reflect absolute position information and character pattern structure information. can be realized.
(発明の作用原理)
以下図面を用いて本発明の原理について詳細に
説明する。第6図は本発明の原理を説明するため
の図である。第6図aにおいて、A,B,C,D
は二値化された文字パタンの外接矩形上のそれぞ
れの辺を2等分する点であり、E,F,G,Hは
それぞれ前記外接矩形を前記二等分点A,B,
C,Dで4分割したときの、左上部分領域、右上
部分領域、左下部分領域、右下部分領域に属する
文字の背景部の点である。この背景部の点から、
従来技術の上、下、左、右へと4つの方向に走査
するのと異りその点の属する部分領域によつて指
定される2つの方向のみに走査が行なわれる。す
なわち、前記左上部分領域の背景部のすべての点
からは、上向き及び左向きに走査を行ない、前記
右上部分領域の背景部のすべての点からは上向き
及び右向きに走査を行ない、前記左下部分領域の
背景部のすべての点からは下向き及び左向きに走
査を行ない、前記右下部分領域の背景部のすべて
の点からは下向き及び右向きに走査を行ない、走
査方向と、交差した文字パタンの輪郭部の接線方
向とが、定められた閾値以上の角度で交差してい
れば、交差回数を計数することにより、各背景部
の点を特徴づける。第6図bは前記背景点E,
F,G,Hの特徴表現を示しており、前記背景点
Eは上に2回、左に1回交差し、前記背景点Fは
上に1回右に0回交差し、前記背景点Gは下に2
回、左に1回交差し、前記背景点Hは下に1回、
右に2回交差している。第6図c,dは、走査線
が文字ストロークと交差したときに、前記文字パ
タンの輪郭部の接線の方向を考慮して交差回数を
計数することの効果を表わす図である。第6図c
においては第6回aと同じ文字パタンが傾いて入
力されたことを示しており、A′,B′,C′,D′は
外接矩形の各辺を二等分する点、E′,F′,G′,
H′はそれぞれ背景部の点である。前記背景点
E′から左向きに走査したとき文字部と1回交差す
るが走査方向と輪郭部の接線方向のなす角度が小
さいので計数しない。同じく前記背景点E′から上
向きに走査したとき文字部と2回交差するが、1
回は走査方向と輪郭部の接線方向のなす角度が小
さいので、特徴づけるときの交差回数は1とす
る。前記他の背景点F′,G′,H′についても同様
であり、前記各背景点E′,F′,G′,H′の特徴づ
けられた結果を第6図dに示す。この例で示すよ
うに交差回数を計数するときに文字パタンの輪郭
の接線方向と走査方向のなす角度を考慮すること
により、文字パタンの傾きを吸収する効果が得ら
れる。印刷文字認識においては、文字パタンが傾
いて入力されることは頻繁に起こるので、文字パ
タンの傾きが吸収できるか否かは、認識能力に大
きく影響する。(Principle of operation of the invention) The principle of the invention will be explained in detail below using the drawings. FIG. 6 is a diagram for explaining the principle of the present invention. In Figure 6a, A, B, C, D
are the points that bisect each side of the circumscribed rectangle of the binarized character pattern, and E, F, G, and H are the points A, B, and H that bisect the circumscribed rectangle, respectively.
These are the background points of characters belonging to the upper left partial area, upper right partial area, lower left partial area, and lower right partial area when divided into four by C and D. From this background point,
Unlike the prior art, which scans in four directions: up, down, left, and right, scanning is performed in only two directions specified by the partial area to which the point belongs. That is, from all points in the background part of the upper left partial area, scanning is performed upward and to the left, from all points in the background part of the upper right partial area, scanning is performed upward and rightward, and from all points in the background part of the upper left partial area, scanning is performed upward and to the left. Scanning is performed downward and to the left from all points in the background area, and scanning is performed downward and to the right from all points in the background area in the lower right partial area, and the outline of the character pattern that intersects with the scanning direction is scanned. If the tangential direction intersects at an angle greater than or equal to a predetermined threshold, each background point is characterized by counting the number of times of intersection. FIG. 6b shows the background point E,
The feature expressions of F, G, and H are shown, where the background point E intersects upward twice and to the left once, the background point F intersects upward once and to the right zero times, and the background point G intersects upward once and to the right zero times. is below 2
times, cross once to the left, and the background point H crosses downward once,
It crosses to the right twice. FIGS. 6c and 6d are diagrams showing the effect of counting the number of times a scanning line intersects a character stroke, taking into account the direction of the tangent to the contour of the character pattern. Figure 6c
shows that the same character pattern as in the 6th a was inputted at an angle, and A', B', C', and D' are the points that bisect each side of the circumscribed rectangle, and E' and F. ′、G′、
H′ is a point in the background area. The background point
When scanning leftward from E', it intersects the character part once, but it is not counted because the angle between the scanning direction and the tangential direction of the outline part is small. Similarly, when scanning upward from the background point E', it intersects the character part twice, but 1
Since the angle between the scanning direction and the tangential direction of the contour is small, the number of times of intersection is set to 1 when characterizing. The same applies to the other background points F', G', and H', and the results of characterizing each of the background points E', F', G', and H' are shown in FIG. 6d. As shown in this example, by considering the angle between the tangential direction of the contour of the character pattern and the scanning direction when counting the number of intersections, it is possible to obtain the effect of absorbing the inclination of the character pattern. In printed character recognition, character patterns are frequently input at an angle, so whether or not the inclination of the character pattern can be absorbed has a large effect on recognition ability.
交差回数には、最大3の上限を設定する。すな
わち走査して4回以上の交差をしても交差回数を
3回とする。これは交差回数をコード化するとき
に2ビツトを割当てればよいことを意味する。そ
の理由は文字パタンを前記4箇所の部分領域に分
割したときに、4回以上の交差が起こりうる場合
は非常に稀であるので、交差回数に上限を設けて
特徴づけを行なつても、分類のための特徴として
はその性能を劣化させるものではないからであ
る。このように前記各部分領域において、各背景
点は、垂直、水平の2方向の交差回数で特徴づけ
られ、1方向の特徴に2ビツトが必要なので、2
方向の特徴には4ビツトが必要となり、2方向で
特徴づけられる各背景点は4ビツトが割当てられ
ることになる。従つて前記各部分領域において、
前記各背景点に16種類の特徴のいずれかが割当て
られることなり、前記それぞれの16種類の特徴を
属する4つの部分領域で特徴づけすると、前記文
字パタンの全領域の背景点に64種類の特徴のいず
れかが割当てられる。ここで交差回数を2回以下
に限定すると、1方向の交差回数が0,1,2の
3通りであるので2方向で特徴づけられる背景点
に割当てられる特徴は9(=3×3)種類となり、
前記全領域の背景点には36(=9×4)種の特徴
のいずれかが割当てられる。これは交差回数を最
大3回とした場合に比べ、特徴の数は半分以下に
もなつていないが、分類対象を形状の複雑な漢字
としたときには、あまり粗い特徴である。従つて
本方式のように4箇所の部分領域を設定する場合
には、分類能力、処理量を考えて、交差数を最大
3回と定めるのが最もよい効果が得られる。 An upper limit of 3 is set for the number of intersections. That is, even if the scanning crosses four or more times, the number of crosses is set to three. This means that it is sufficient to allocate 2 bits when encoding the number of crossings. The reason for this is that when a character pattern is divided into the four partial areas, it is extremely rare for more than four intersections to occur. This is because the feature for classification does not deteriorate its performance. In this way, in each partial area, each background point is characterized by the number of intersections in two directions, vertical and horizontal, and since two bits are required for the feature in one direction, two
The directional feature will require 4 bits, and each background point characterized in two directions will be allocated 4 bits. Therefore, in each of the partial regions,
One of the 16 types of features is assigned to each of the background points, and if each of the 16 types of features is characterized by the four partial areas to which it belongs, 64 types of features are assigned to the background points of the entire area of the character pattern. will be assigned. Here, if we limit the number of intersections to 2 or less, there are 3 types of intersections in one direction: 0, 1, and 2, so there are 9 (= 3 × 3) types of features that can be assigned to background points characterized by two directions. Then,
Any one of 36 (=9×4) types of features is assigned to the background points in the entire area. This is less than half the number of features compared to the case where the number of intersections is set to 3 at most, but when the classification target is a Chinese character with a complex shape, the features are not very coarse. Therefore, when setting four partial regions as in the present method, the best effect can be obtained by setting the number of intersections to a maximum of three in consideration of classification ability and processing amount.
さて、前記処理を次のように定式化する。前記
部分領域を示すコードをiとし、左上の前記部分
領域を示すときi=0、右上の前記部分領域を示
すときi=1、左下の前記部分領域を示すときi
=2、右下の前記部分領域を示すときi=3とす
る。次に前記各部分領域における2方向の交差回
数を示すコードをj,kとする。例えば、i=0
のとき、jは上方向の交差回数でkは左方向の交
差回数、i=1のとき、jは上方向の交差回数で
kは右方向の交差回数、i=2のとき、jは下方
向の交差回数、kは左方向の交差回数、i=3の
とき、jは下方向の交差回数、kは右方向の交差
回数を示すことにする。前記コードi,j,kを
用いて前記各背景点に割当てられる特徴をfijkと
表わすと、前記第6図aの前記背景点Eに割当て
られる特徴はf021、前記背景点Fに割当てられる
特徴はf110、前記背景点Gに割当てられる特徴は
f221、前記背景点Hに割当てられる特徴はf312と
なる。これまでの説明で前記コードi,j,kは
0,1,2,3の4種類の値をとるので、特徴
fijkは64種類である。 Now, the above processing will be formulated as follows. Let the code indicating the partial area be i, i = 0 when indicating the partial area on the upper left, i = 1 when indicating the partial area on the upper right, and i when indicating the partial area on the lower left.
=2, and when indicating the partial area at the lower right, i=3. Next, let j and k be codes indicating the number of intersections in two directions in each of the partial regions. For example, i=0
When , j is the number of crosses in the upward direction and k is the number of crosses in the left direction.When i=1, j is the number of crosses in the upward direction and k is the number of crosses in the right direction.When i=2, j is the number of crosses in the downward direction. The number of crossings in the direction, k is the number of crossings in the left direction, when i=3, j is the number of crossings in the downward direction, and k is the number of crossings in the right direction. If the feature assigned to each background point using the codes i, j, and k is expressed as fijk, the feature assigned to the background point E in FIG. 6a is f 021 and the feature assigned to the background point F is f 021 . is f 110 and the feature assigned to the background point G is
f 221 , and the feature assigned to the background point H is f 312 . In the explanation so far, the codes i, j, and k take on four types of values, 0, 1, 2, and 3, so the characteristics
There are 64 types of f ijk .
一つの文字パタンの各背景点に前記特徴付けを
行なつたとき、前記特徴fijkの割当てられた背景
点の数をFijkとし、前記特徴点Fijkを外接矩形を面
積で正規化した値をF^ijkとする。前記正規化され
た値F^ijkを要素とする64次元ベクトルを、前記文
字パタンの特徴ベクトルとする。分類処理は次の
ように行なう。前記64次元の特徴ベクトルを字種
ごとに用意し、これを標準ベクトル〓(S)lとする。
Sは字種を表わすコードである。入力文字パタン
から得られる前記64次元の特徴ベクトルを入力ベ
クトル〓とすると、前記入力ベクトル〓と前記
各々の標準ベクトル〓(S)lとのベクトル演算で定
義される相違度をD(〓,〓(S)l)とし、前記相違
度の値が小さい順に順位付けを行ない、分類処理
を行なう。この場合の相違度は、ユークリツド距
離、シテイブロツク距離等のベクトル距離等を採
用して、通常の文字認識で行なわれている処理を
実行すればよい。 When each background point of one character pattern is characterized, the number of background points to which the feature f ijk is assigned is F ijk , and the value of the feature point F ijk normalized by the area of the circumscribed rectangle. Let be F^ ijk . A 64-dimensional vector having the normalized value F^ ijk as an element is a feature vector of the character pattern. The classification process is performed as follows. The 64-dimensional feature vector is prepared for each character type, and this is defined as the standard vector 〓(S) l .
S is a code representing the character type. If the 64-dimensional feature vector obtained from the input character pattern is the input vector 〓, then the degree of dissimilarity defined by the vector operation between the input vector 〓 and each of the standard vectors 〓(S) l is expressed as D(〓, 〓 (S) l ), and the ranking is performed in descending order of the value of the degree of difference, and classification processing is performed. In this case, the degree of difference may be determined by a vector distance such as a Euclidean distance or a City Block distance, and processing that is performed in normal character recognition may be performed.
(実施例)
第1図は本発明の構成を示すブロツク図であ
る。(Embodiment) FIG. 1 is a block diagram showing the configuration of the present invention.
1は特徴パタン生成部であり、二値化された文
字パタンを信号90として入力し、前記4種の部分
領域の前記各背景点に前記特徴づけを行ない、前
記文字パタンの外接矩形情報を信号91、前記部分
領域ごとの特徴づけされた特徴パタンを信号92と
して出力する。2は特徴ベクトル抽出部で、前記
特徴パタン信号92を入力して前記特徴fijkをごと
に割当てられた前記文字パタンの背景点の点の数
を計数し、前記出現頻度F^ijkを求め、同時に前記
外接矩形情報信号91を入力して外接矩形の面積を
計算し、前記出現頻度Fijkを前記外接矩形の面積
で正規化して、前記正規化された値をF^ijk求め、
前記64次元入力特徴ベクトル〓として信号93を出
力する。3は相違度演算部で、前記入力特徴ベク
トルを信号93、前記標準特徴ベクトルを信号95と
して入力し、あらかじめ定められたベクトル演算
により、前記入力特徴ベクトルFと前記標準特徴
ベクトル〓(S)lとの相違度D(〓,〓(S)l)を計算
し、相違度信号94として出力する。4は分類部
で、前記相違度信号94を入力し、準位付等の処理
を行ない、分類結果を信号96として出力する。5
は標準特徴ベクトル記憶部で、字種ごとに前記64
次元の標準特徴ベクトルを格納し、前記相違度演
算部3から前記信号95として、前記標準特徴ベク
トルが読み出される。図中、相違度演算部3、分
類部4、標準ベクトル記憶部5は通常の文字認識
方式等で用いられるものであり、前記相違度演算
部3は、加算器、乗算器、比較器、レジスター等
で容易に実現でき、前記分類部4も同様に、比較
器、レジスター等で容易に実現でき、前記標準特
徴ベクトル記憶部5は、通常の記憶素子で容易に
実現できる。 Reference numeral 1 denotes a feature pattern generation unit, which inputs a binarized character pattern as a signal 90, performs the characterization on each of the background points of the four types of partial areas, and generates a signal containing circumscribed rectangle information of the character pattern. 91, outputting the characterized feature pattern for each partial region as a signal 92; 2 is a feature vector extraction unit which inputs the feature pattern signal 92 and counts the number of background points of the character pattern assigned to each feature f ijk to obtain the frequency of appearance F^ ijk ; At the same time, input the circumscribed rectangle information signal 91 to calculate the area of the circumscribed rectangle, normalize the frequency of appearance F ijk by the area of the circumscribed rectangle, and obtain the normalized value F^ ijk ;
A signal 93 is output as the 64-dimensional input feature vector. 3 is a dissimilarity calculation unit which inputs the input feature vector as a signal 93 and the standard feature vector as a signal 95, and calculates the input feature vector F and the standard feature vector 〓(S) l by a predetermined vector calculation. The degree of dissimilarity D (〓,〓(S) l ) with respect to the calculated value is calculated and outputted as a degree of dissimilarity signal 94. 4 is a classification section which inputs the dissimilarity signal 94, performs processing such as assigning levels, and outputs the classification result as a signal 96. 5
is a standard feature vector storage unit, and the above 64 characters are stored for each character type.
A dimensional standard feature vector is stored, and the standard feature vector is read out from the dissimilarity calculation unit 3 as the signal 95. In the figure, a dissimilarity calculation unit 3, a classification unit 4, and a standard vector storage unit 5 are used in a normal character recognition method, etc., and the dissimilarity calculation unit 3 includes an adder, a multiplier, a comparator, and a register. Similarly, the classification section 4 can be easily realized using a comparator, a register, etc., and the standard feature vector storage section 5 can be easily realized using a normal storage element.
第2図aは、前記特徴パタン生成部1の構成の
一実施例を示す図である。 FIG. 2a is a diagram showing an example of the configuration of the feature pattern generation section 1. As shown in FIG.
11は二値パタン記憶部で、前記二値化された
文字パタンを信号90として入力し、格納するもの
で通常の記憶素子で容易に実現できるものであ
る。12は特徴処理領域抽出部で、信号911とし
て前記二値パタン記憶部11から前記二値化され
た文字パタンを読み込み、前記文字パタンの外接
矩形を求め、前記外接矩形の頂点の座標値を信号
91として出力する。前記特徴処理は前記外接矩形
の内側で行なわれる。本外接矩形を求める処理
は、文字認識に限らず一般のイメージ処理で行な
われるものであり、前記特徴処理領域抽出部12
は容易に実現できる。13は輪郭方向コード生成
部で、前記信号911として前記二値化した文字パ
タンを読み込み、同時に前記特徴処理領域抽出部
12から前記信号91として前記外接矩形の頂点の
座標値を読み込み、前記外接矩形の内側の各画素
に対して、文字パタンの背景部の点か、輪郭部の
点か、内部の点かを検出し、前記輪郭部の点の場
合には、前記輪郭点における仮の傾斜コードを検
出し、前記背景部の点の場合には、前記外接矩形
の座標値から求められる前記4分割部分領域の各
座標を参照し、前記左上部分領域かを識別するコ
ードを定めて、前記画素の情報とし、前記画素の
情報を信号9131として出力し、次に前記画素の情
報の書き込まれた特徴パタンの画素および隣接す
る画素を同時に信号9132として前記文字部の輪郭
点においては前記画素と前記隣接する画素の仮の
傾斜コードから、前記輪郭点における方向コード
を決定し、信号9133として出力する。14は特徴
パタン記憶部で、各画素は前記背景点、前記輪郭
点、前記内部点等のパタン上の点の識別子、前記
輪郭点に対しては、前記仮の傾斜コード、前記方
向コード、前記背景点に対しては前記部分領域識
別子、前記特徴づけのための交差数等の属性があ
り、前記パタン上の点の識別子、前記輪郭点に対
する仮の傾斜コードおよび前記部分領域識別子は
前記信号9131として書き込まれ、前記輪郭点に対
する仮の傾斜コードは前記信号9132として読み出
され、前記方向コードは前記信号9133として書き
込まれ、前記画素全体は、信号9141として読み出
され、信号9142として書き込まれ、すべての特徴
づけ処理が行なわれた後には、前記画素全体がそ
れぞれ信号92として読み出されるものである。1
5は交差回数計数部で、前記特徴処理領域抽出部
12から信号91して前記外接矩形の座標値を読み
込み、前記4分割部分領域の座標を求め、前記特
徴パタン記憶部14から前記部分領域に応じた走
査手順に従つて前記特徴パタンの画素を信号9141
として順次読み込み、前記文字パタンの輪郭点に
割当てられた方向コードに応じて前記背景部の点
に前記交差数を信号9142として前記特徴パタン記
憶部14に書き込むものである。 Reference numeral 11 denotes a binary pattern storage section which inputs and stores the binary character pattern as a signal 90, which can be easily realized with a normal storage element. Reference numeral 12 denotes a feature processing area extraction unit which reads the binarized character pattern from the binary pattern storage unit 11 as a signal 911, determines a circumscribing rectangle of the character pattern, and outputs the coordinate values of the vertices of the circumscribed rectangle as a signal.
Output as 91. The feature processing is performed inside the circumscribed rectangle. The process of determining the main circumscribed rectangle is performed not only in character recognition but also in general image processing, and is carried out by the feature processing area extraction unit 12.
can be easily realized. Reference numeral 13 denotes a contour direction code generation section which reads the binarized character pattern as the signal 911, and at the same time reads the coordinate values of the vertices of the circumscribed rectangle from the feature processing area extraction section 12 as the signal 91; For each pixel inside the character pattern, detect whether it is a point on the background part, a point on the outline part, or a point inside the character pattern, and if it is a point on the outline part, a temporary slope code at the outline point is detected. In the case of a point in the background area, refer to each coordinate of the quadrant partial area obtained from the coordinate values of the circumscribed rectangle, determine a code to identify whether it is the upper left partial area, and detect the pixel. The pixel information is output as a signal 9131, and then the pixel of the characteristic pattern in which the pixel information is written and the adjacent pixel are simultaneously output as a signal 9132. At the contour point of the character area, the pixel and the pixel are The direction code at the contour point is determined from the temporary slope code of the adjacent pixel and output as a signal 9133. Reference numeral 14 denotes a feature pattern storage unit, in which each pixel stores an identifier for a point on the pattern such as the background point, the contour point, the interior point, etc., and for the contour point, the temporary slope code, the direction code, and the The background points have attributes such as the partial area identifier and the number of intersections for characterization, and the identifiers of the points on the pattern, the temporary slope codes for the contour points, and the partial area identifiers are based on the signal 9131. , the tentative slope code for the contour point is read out as the signal 9132, the direction code is written as the signal 9133, the entire pixel is read out as the signal 9141 and written as the signal 9142, After all characterization processing has been performed, each of the pixels is read out as a signal 92. 1
Reference numeral 5 denotes a crossing number counting unit which reads the coordinate values of the circumscribed rectangle using the signal 91 from the feature processing area extraction unit 12, calculates the coordinates of the four-part partial area, and calculates the coordinates of the partial area from the feature pattern storage unit 14. The pixels of the feature pattern are scanned as signals 9141 according to the corresponding scanning procedure.
The number of intersections is written as a signal 9142 in the characteristic pattern storage section 14 at points in the background area according to the direction code assigned to the contour point of the character pattern.
第2図bは前記輪郭方向コード生成部13の構
成の一実施例を示すためのブロツク図である。1
30は部分領域決定部であり、前記信号91として
前記外接矩形の頂点の座標値を読み込み、水平方
向並び垂直方向の辺をそれぞれ2等分する点の座
標を求め、前記4分割部分領域を決定し、前記4
分割部分領域を定める4個の矩形の頂点の座標を
それぞれ信号9134として出力するもので、容易に
実現できる。131は局所画素処理部で、前記信
号911として二値化された文字パタンの各参照画
素と前記参照画素に隣接する8画素の計9画素を
読み込み、前記参照画素が文字パタンの輪郭点の
場合には前記9画素によつて前記仮の傾斜コード
を決定し、前記輪郭点を示すコードと、前記仮の
傾斜コードを前記信号9131として前記特徴パタン
記憶部14の対応する画素に書き込み、前記参照
画素が文字パタンの内部点の場合には前記内部点
を示すコードを前記信号9131として前記特徴パタ
ン記憶部14の前記対応する画素に書き込み、前
記参照画素が前記文字パタンの外接矩形内の背景
点の場合には、前記背景点を示すコードと、前記
背景点が属する前記4部割部分領域を示すコード
とを、前記信号9131として前記特徴パタン記憶部
14の前記対応する画素に書き込むものである。
132は輪郭方向決定部であり、前記部分領域決
定部130から信号9134として入力される前記4
分割部分領域の頂点の座標から処理を行なう領域
を定め、前記局所画素処理部131によつて定め
られた前記特徴パタン記憶部14の画素を信号
9132として読み込み、前記仮の傾斜コードから前
記方向コードを決定し信号9133として前記特徴パ
タン記憶部の対応する画素に書き込むものであ
る。第3図aは前記参照画素と前記隣接する8画
素の位置関係を示しており、xが参照画素、a,
b,c,d,e,f,g,hが隣接する8画素を
示している。第3図bは前記仮の傾斜コードを示
す図であり、3桁の2進数、すなわち3ビツトで
表現される。第3図cは前記参照画素が文字パタ
ン上の輪郭点である場合に前記仮の傾斜コード
0,1,…,7を割当てる規則を示す図である
が、図中前記傾斜コードの欄が+になつている部
分は文字パタンの内部となつているので前記傾斜
コードが割当てられない点、*となつているの
は、前記輪郭点とは見なさずに内部点と同一のコ
ードを割当て、前記方向コードを割当てる処理の
対象外とされる点になることを示す。 FIG. 2b is a block diagram showing one embodiment of the configuration of the contour direction code generation section 13. 1
Reference numeral 30 denotes a partial area determination unit, which reads the coordinate values of the vertices of the circumscribed rectangle as the signal 91, calculates the coordinates of points that divide the horizontal and vertical sides into two, and determines the four-part partial area. 4 above
The coordinates of the vertices of the four rectangles that define the divided partial areas are output as signals 9134, which can be easily realized. 131 is a local pixel processing unit that reads each reference pixel of the character pattern binarized as the signal 911 and 8 pixels adjacent to the reference pixel, a total of 9 pixels, and when the reference pixel is a contour point of the character pattern; Then, the temporary slope code is determined using the nine pixels, and the code indicating the contour point and the temporary slope code are written as the signal 9131 in the corresponding pixel of the feature pattern storage unit 14, and the reference If the pixel is an internal point of the character pattern, a code indicating the internal point is written as the signal 9131 to the corresponding pixel of the feature pattern storage unit 14, and if the reference pixel is a background point within the circumscribed rectangle of the character pattern. In this case, a code indicating the background point and a code indicating the quadrant partial area to which the background point belongs are written into the corresponding pixels of the feature pattern storage unit 14 as the signal 9131. .
Reference numeral 132 denotes a contour direction determining unit, which receives the 4th line inputted as a signal 9134 from the partial area determining unit 130.
A region to be processed is determined based on the coordinates of the vertices of the divided partial regions, and the pixels in the feature pattern storage section 14 determined by the local pixel processing section 131 are used as signals.
9132, the direction code is determined from the temporary inclination code, and is written as a signal 9133 to the corresponding pixel of the feature pattern storage section. FIG. 3a shows the positional relationship between the reference pixel and the eight adjacent pixels, where x is the reference pixel, a,
b, c, d, e, f, g, and h indicate eight adjacent pixels. FIG. 3b is a diagram showing the temporary slope code, which is expressed as a 3-digit binary number, that is, 3 bits. FIG. 3c is a diagram showing a rule for assigning the tentative slope codes 0, 1, ..., 7 when the reference pixel is a contour point on a character pattern. In the figure, the column for the slope code is + The points marked with ``*'' are inside the character pattern, so the slope code cannot be assigned to them, and the points marked with * are not regarded as the contour points, but are assigned the same code as the interior points. Indicates that the point is excluded from the process of assigning a direction code.
第3図cの適用の仕方を以下に示す。 How to apply FIG. 3c is shown below.
前記参照画素xの値が0、すなわち背景点の場
合には、前記方向コードを割り当てる処理の対象
外である。前記参照画素xの値が1で、第3図a
のa,b,c,d,e,f,g,hが0,0,
0,0,1,1,1,1の場合には、第3図cの
a,b,c,dが0,0,0,0となつている行
と、e,f,g,hが1,1,1,1となつてい
る列の交差する欄に注目すると、‘3'となつてい
るので、仮の傾斜コードを3とする。同様に前記
参照画素xの値が1で、第3図aのa,b,c,
d,e,f,g,hが0,1,1,0,1,0,
1,1の場合には、第3図cのa,b,c,dが
0,1,1,0となつている行と、e,f,g,
hが1,0,1,1となつている列の交差する欄
に注目すると、‘0'となつているので、仮の傾斜
コードを0とする。このように、参照画素に隣接
する8画素の値から、第3図cの規則を適用す
る。前記局所画素処理部131は、以上説明した
ように仮の傾斜コードを割当てる処理等前記特徴
パタン記憶部14の各画素に書き込みを行なうの
で、通常の論理回路、順序回路等で容易に実現で
きる。 If the value of the reference pixel x is 0, that is, it is a background point, it is not subject to the process of assigning the direction code. When the value of the reference pixel x is 1, FIG.
a, b, c, d, e, f, g, h are 0, 0,
In the case of 0, 0, 1, 1, 1, 1, the rows where a, b, c, d in Figure 3 c are 0, 0, 0, 0, and e, f, g, h If you pay attention to the intersecting column of the columns where is 1, 1, 1, 1, it is '3', so set the temporary slope code to 3. Similarly, if the value of the reference pixel x is 1, a, b, c,
d, e, f, g, h are 0, 1, 1, 0, 1, 0,
In the case of 1, 1, the rows where a, b, c, d in Figure 3 c are 0, 1, 1, 0, and e, f, g,
If we pay attention to the intersecting column of the columns where h is 1, 0, 1, 1, it is '0', so we set the temporary slope code to 0. In this way, the rule in FIG. 3c is applied from the values of the eight pixels adjacent to the reference pixel. The local pixel processing section 131 performs writing to each pixel of the characteristic pattern storage section 14, such as the process of assigning a temporary slope code, as described above, and therefore can be easily realized using a normal logic circuit, sequential circuit, etc.
第3図dは前記方向コードを示す図であり、4
桁の2進数、すなわち4ビツトで表現される。第
3図e〜l前記第3図bに示す仮の傾斜コード
X1X2X3から前記第3図方向コードY1Y2Y3Y4を
生成する規則を示す図で、例えば前記仮の傾斜コ
ードX1X2X3が000のときには、前記隣接する画
素のうち前記第3図aのb,gに対応する画素の
前記仮の傾斜コードを調べ、それぞれ111,111の
ときには方向コードを1110とし、前記b,gに対
応する画素の前記仮の傾斜コードがそれぞれ111,
000のときには方向コードを1111と決定する規則
を示し、前記第3図fの前記画素bとgの9通り
以外の組合わせのときには方向コードを000とす
る。 FIG. 3d is a diagram showing the direction code, and 4
It is expressed as a binary number of digits, that is, 4 bits. Figures 3e to 1Temporary slope code shown in Figure 3b above
3 is a diagram showing the rules for generating the direction code Y 1 Y 2 Y 3 Y 4 from X 1 X 2 X 3. For example, when the tentative slope code X 1 X 2 Check the tentative slope code of the pixel corresponding to b and g in FIG. The code is 111, respectively.
When the value is 000, the direction code is determined to be 1111, and when the combinations of pixels b and g shown in FIG.
同様に前記仮の傾斜コードX1X2X3が001のと
きには、前記隣接する画素のうちの前記第3図a
の画素b,gの組合せまたは、c,gの組合せを
調べ前記仮の傾斜コードX1X2X3が010のときに
は、前記隣接する画素のc,fの組合せを調べ、
前記X1X2X3かつ011のときには前記隣接画素の
c,dの組合せまたはe,fの組合せを調べ、前
記X1X2X3が100ときには前記隣接画素e,dの
組合せを調べ、前記X1X2X3が101のときには前
記隣接画素e,aの組合せまたはd,hの組合せ
を調べ、前記X1X2X3が110のときには前記隣接
画素h,aの組合せを調べ、前記X1X2X3が111
のときには前記隣接画素b,hの組合せまたは
g,aの組合せを調べ、第3図e〜lに示す方向
コード決定規則に該当する隣接画素の組合せがあ
るときには、前記方向コード決定規則から前記方
向コードY1Y2Y3Y4を決定し、前記該当する組合
せがないときにはY1Y2Y3Y4=X1X2X30として前
記方向コードY1Y2Y3Y4を決定する。これらの処
理は通常の論理回路、順序回路により容易に実現
することができるものであり、従つて前記輪郭方
向決定部132は容易に実現することができる。 Similarly, when the tentative slope code X 1
When the temporary slope code X 1 X 2 X 3 is 010, examine the combination of pixels c and f of the adjacent pixels;
When X 1 X 2 X 3 and 011, the combination of c and d or e and f of the adjacent pixels is checked, and when X 1 When the X 1 X 2 X 3 is 101, the combination of the adjacent pixels e and a or the combination of d and h is examined; when the X 1 X 2 The above X 1 X 2 X 3 is 111
When , the combination of adjacent pixels b and h or the combination of g and a is checked, and if there is a combination of adjacent pixels that corresponds to the direction code determination rules shown in FIG. 3 e to l, the direction is determined from the direction code determination rule. The code Y 1 Y 2 Y 3 Y 4 is determined, and when there is no corresponding combination, the direction code Y 1 Y 2 Y 3 Y 4 is determined as Y 1 Y 2 Y 3 Y 4 = X 1 X 2 X 3 0 . do. These processes can be easily realized using ordinary logic circuits and sequential circuits, and therefore the contour direction determining section 132 can be easily realized.
第4図は前記特徴パタン記憶部14の画素の構
成の一実施例を示すための図である。 FIG. 4 is a diagram showing an example of the pixel configuration of the feature pattern storage section 14. In FIG.
1画素あたり8ビツトの情報を有し、図中ビツ
ト0は文字パタンの輪郭を示すビツトであり、前
記ビツト0が“1”のときは輪郭部の画素、前記
ビツト0が“0”のときは輪郭部でない画素であ
る。前記輪郭部の画素の場合は、ビツト1,2,
3の3ビツトが前記仮の傾斜コードX1X2X3に対
応し、ビツト4,5,6,7の4ビツトが前記方
向コードY1Y2Y3Y4に対応する。 Each pixel has 8 bits of information, and bit 0 in the figure indicates the outline of the character pattern. When bit 0 is "1", it is the outline pixel, and when bit 0 is "0", it is the outline pixel. is a pixel that is not a contour part. In the case of a pixel in the contour part, bits 1, 2,
The three bits 3 correspond to the temporary slope code X 1 X 2 X 3 , and the four bits 4, 5, 6, and 7 correspond to the direction code Y 1 Y 2 Y 3 Y 4 .
前記輪郭部でない画素の場合は、ビツト1は文
字部の点か背景部の点かの識別子で、ビツト1が
“1”の場合には前記文字内部の点、ビツト1が
“0”の場合には前記背景部の点としている。前
記文字内部の点では2,3,4,5,6,7ビツ
トはDon'tCareである。 In the case of a pixel that is not the outline part, bit 1 is an identifier for whether it is a point in the character part or a point in the background part, and if bit 1 is "1", it is an identifier for the point inside the character, and if bit 1 is "0", it is an identifier for the point inside the character. is the point in the background. At points within the character, bits 2, 3, 4, 5, 6, and 7 are Don't Care.
前記背景部の点の場合、ビツト2,3の2ビツ
トは前記4分割部分領域の識別子、ビツト4,5
の2ビツトとビツト6,7の2ビツトはそれぞれ
2方向への交差回数の計数情報である。前記特徴
パタン記憶部14は以上のようなビツトごとに属
性を持つもので通常の記憶素子を用いればよい。 In the case of the point in the background part, bits 2 and 3 are the identifier of the quadrant partial area, and bits 4 and 5 are the identifier of the quadrant partial area.
2 bits and 2 bits 6 and 7 are count information of the number of crossings in two directions, respectively. The characteristic pattern storage section 14 has an attribute for each bit as described above, and may be a normal storage element.
第5図a,bは前記交差回数計数部15で、前
記各4分割部領域における交差回数計数のための
特徴づけられた画素を効果的に走査方向を示す図
である。 FIGS. 5A and 5B are diagrams effectively showing the scanning direction of the characterized pixels for counting the number of intersections in each of the quadrant regions by the intersection number counting unit 15.
前記交差回数を計数する処理としては、第6図
a,cに示すようにすべての背景点を出発点とし
て、それぞれ2方向に走査する方法もある。しか
し、前記方法は背景点の画素の特徴づけをわかり
やすく説明することには向いているが、実際に行
なう処理としては、同じ向きに何度も走査を行な
うことになるので効率的ではない。しかし第5図
a,bのように走査を行なうと、効率的にすべて
の背景点の特徴づけが行なえる。 As a process for counting the number of intersections, there is also a method of scanning in each of two directions using all background points as starting points, as shown in FIGS. 6a and 6c. However, although this method is suitable for explaining the characterization of pixels of background points in an easy-to-understand manner, it is not efficient in actual processing because scanning is performed many times in the same direction. However, if scanning is performed as shown in FIGS. 5a and 5b, all background points can be efficiently characterized.
前記4分割部分領域の左上及び左下の部分領域
では水平方向右むきの走査を行ない、右上及び右
下の部分領域では水平方向左向きの走査を行な
い、左上及び右上の部分領域では垂直方向下向き
の走査を行ない、左下及び右下の部分領域では垂
直方向上向きの走査を行ない、0に初期化された
交差数値を背景点の画素に逐次書き込み、文字パ
タンの輪郭部と交差し、前記ストロークとの交差
条件を満足した場合には前記交差数値に1を加え
たものを新たに交差数値とし、次に出現する背景
部の画素に前記新たな交差数値を書き込むという
処理を繰り返す。上記の処理順序に従つて、左上
及び右下の部分領域で右向きの走査をすべての行
で1回行なうと、前記部分領域内のすべての背景
点から左向きに走査したときの交差回数と同じ値
が求まる。右向き、下向き、上向きの走査のとき
も同様であり、第5図a,bように走査を行なう
と、走査回数を重複することなく、すべての背景
点の特徴づけが効率的に行なえる。 The upper left and lower left partial areas of the quadrant partial areas are scanned horizontally to the right, the upper right and lower right partial areas are scanned horizontally to the left, and the upper left and upper right partial areas are scanned vertically downward. The lower left and lower right partial areas are scanned vertically upward, and intersection values initialized to 0 are sequentially written to the pixels of the background points, which intersect with the outline of the character pattern and intersect with the stroke. If the condition is satisfied, the process of adding 1 to the intersection value to create a new intersection value and writing the new intersection value to the next appearing background pixel is repeated. According to the above processing order, scanning rightward once for every row in the upper left and lower right subregions results in the same number of intersections as scanning leftward from all background points in the subregion. is found. The same holds true for rightward, downward, and upward scanning, and by performing scanning as shown in FIGS. 5a and 5b, all background points can be efficiently characterized without duplicating the number of scans.
以上の処理は、記憶部との間の読み出し、書き
込み処理、比較、加算といつた処理から成り立つ
ており、通常の論理回路、順序回路等で容易に実
現できる。 The above processing consists of processing such as read/write processing, comparison, and addition to/from the storage section, and can be easily realized using ordinary logic circuits, sequential circuits, and the like.
(発明の効果)
以上のように本発明によれば、文字パタンの外
接矩形で定まる領域を4分割した部分領域ごとに
特徴を求めることにより、絶対位置情報を反映さ
せることができ、前記部分領域ごとに走査方向を
定めて特徴抽出を行なつているので、安定した相
対位置情報を反映するベクトルを16次元という低
次元で実現することができたので、文字パタン全
体を比較的低次元の64次元ベクトルで表わすこと
ができ、この64次元ベクトルで、漢字のような複
雑な構造を持ち、類似字形のおおき多字種の印刷
文字を充分な性能で分類できる文字分類方式を提
供することができる。(Effects of the Invention) As described above, according to the present invention, absolute position information can be reflected by determining characteristics for each partial area obtained by dividing the area defined by the circumscribed rectangle of a character pattern into four, and By determining the scanning direction for each character and extracting features, we were able to create vectors that reflect stable relative position information in as low as 16 dimensions. It can be expressed as a dimensional vector, and with this 64-dimensional vector, it is possible to provide a character classification method that can classify with sufficient performance a large variety of printed characters with complex structures and similar glyph shapes, such as kanji. .
第1図は本発明の一実施例を示すブロツク図
で、第2図aは特徴パタン生成部の構成の一実施
例を示すブロツク図で、第2図bは輪郭方向コー
ド生成部の構成の一実施例を示すブロツク図であ
る。第3図a〜lは輪郭方向コード生成部の原理
を説明する図で、第3図aは隣接画素を示すため
の図、第3図bは仮の傾斜方向を示す図、第3図
cは仮の傾斜方向を定める規則を示す図、第3図
dは方向コードを示す図、第3図e〜lは仮の傾
斜コードから方向コードを定める規則を示す図で
ある。第4図は特徴パタン記憶部14の画素の構
成の一実施例を示す図、第5図は交差回数を計数
するときの各部分領域ごとの走査方向を示す図で
ある。第6図は本発明の原理を示すための図であ
る。
図において、1は特徴パタン生成部、2は特徴
ベクトル抽出部、3は相違度演算部、4は分類処
理部、5は標準特徴ベクトル記憶部、11は二値
パタン記憶部、12は特徴処理領域抽出部、13
は輪郭方向コード生成部、14は特徴パタン記憶
部、15は交差回数計数部、130は部分領域決
定部、131は局所画素処理部、132は輪郭方
向決定部である。
FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2a is a block diagram showing an embodiment of the configuration of the feature pattern generation section, and FIG. 2b is a block diagram of the configuration of the contour direction code generation section. FIG. 2 is a block diagram showing one embodiment. 3A to 3L are diagrams explaining the principle of the contour direction code generation section, FIG. 3A is a diagram showing adjacent pixels, FIG. 3B is a diagram showing a temporary tilt direction, and FIG. 3C 3 is a diagram showing rules for determining a temporary tilt direction, FIG. 3 d is a diagram showing a direction code, and FIGS. 3 e to 1 are diagrams showing rules for determining a direction code from a temporary tilt code. FIG. 4 is a diagram showing an example of the pixel configuration of the feature pattern storage section 14, and FIG. 5 is a diagram showing the scanning direction for each partial area when counting the number of intersections. FIG. 6 is a diagram showing the principle of the present invention. In the figure, 1 is a feature pattern generation section, 2 is a feature vector extraction section, 3 is a dissimilarity calculation section, 4 is a classification processing section, 5 is a standard feature vector storage section, 11 is a binary pattern storage section, and 12 is a feature processing section. Area extraction section, 13
14 is a contour direction code generation section, 14 is a feature pattern storage section, 15 is an intersection count section, 130 is a partial area determination section, 131 is a local pixel processing section, and 132 is a contour direction determination section.
Claims (1)
号に変換されて成る文字パタン上で、背景部の各
点より複数方向に走査し、交差するストローク数
を計数し、特徴付けを行なうことによつて得られ
る特徴を用いる文字分類方式において、前記文字
パタンの外接矩形領域を、水平方向及び垂直方向
にそれぞれ二等分して4種の小領域を定め、前記
小領域のうち、左上の小領域では前記背景部の各
点から上方向及び左方向の2方向へ走査を行な
い、右上の小領域では前記背景部の各点から上方
向及び右方向の2方向へ走査を行ない、左下の小
領域では前記背景部の各点から下方向及び左方向
の2方向へ走査を行ない、右下の小領域では前記
背景部の各点から下方向及び右方向の2方向へ走
査を行ない、前記上方向及び下方向の走査では水
平方向と斜方向のストロークと交差した回数を計
数し、前記左方向及び右方向の走査では垂直方向
と斜方向のストロークと交差した回数を計数し、
交差回数が0,1,2回のときにはそのままの交
差回数を、前記交差回数が3回以上のときは交差
回数を3とし、前記それぞれの4箇所の小領域の
背景部の各点に、2方向の交差回数の組み合わせ
て16種類の特徴コードを割りつける特徴パタン生
成部と、前記4箇所の小領域に於いて、それぞれ
16種類の特徴コードの出現頻度を計数して16個の
要素を求め、この結果全領域で求まる64個の要素
を前記外接矩形の面積で正規化して得られる64次
元ベクトルを入力特徴ベクトルとする特徴ベクト
ル抽出部と、前記入力特徴ベクトルと同じ形式の
64次元ベクトルで記述されて各字種ごとに用意さ
れている標準特徴ベクトルを格納する標準特徴ベ
クトル記憶部と、前記入力特徴ベクトルと前記各
字種ごとの標準特徴ベクトルとを照合し、ベクト
ル計算によつて前記入力特徴ベクトルと前記各字
種ごとの標準特徴ベクトルとの相違度を求める相
違度演算部と、前記相違度によつて各字種の順位
付けを行ない、詳細識別のための候補字種を定め
る分類処理部とを有し、絶対位置情報と文字パタ
ンの構造情報とを反映した特徴量によつて文字認
識のための大分類を行なうことを特徴とする文字
分類方式。1. On a character pattern formed by converting a character part and a background part into a quantized signal consisting of binary values, scan in multiple directions from each point of the background part, count the number of intersecting strokes, and perform characterization. In a character classification method that uses features obtained by In the small area, scanning is performed in two directions upward and to the left from each point in the background area, and in the upper right small area, scanning is performed in two directions upward and to the right from each point in the background area, and scanning is performed in two directions upward and to the left from each point in the background area. In the small area, scanning is performed in two directions, downward and to the left from each point in the background part, and in the lower right small area, scanning is performed in two directions, downward and to the right from each point in the background part, In the upward and downward scanning, the number of times the stroke intersects with the horizontal direction and the diagonal direction is counted, and in the leftward and rightward scanning, the number of times the stroke intersects with the vertical direction and the diagonal direction is counted,
When the number of intersections is 0, 1, or 2, the number of intersections is kept as is, and when the number of intersections is 3 or more, the number of intersections is set to 3, and 2 A feature pattern generation unit that assigns 16 types of feature codes based on the number of intersections in the directions, and
The frequency of appearance of 16 types of feature codes is counted to find 16 elements, and the 64 elements found in the entire area are normalized by the area of the circumscribed rectangle, and the resulting 64-dimensional vector is used as the input feature vector. A feature vector extraction unit and a feature vector having the same format as the input feature vector.
Vector calculation is performed by comparing the input feature vector with the standard feature vector for each character type with a standard feature vector storage unit that stores standard feature vectors described in 64-dimensional vectors and prepared for each character type. a dissimilarity calculation unit that calculates the dissimilarity between the input feature vector and the standard feature vector for each character type; and a dissimilarity calculation unit that ranks each character type based on the dissimilarity and generates candidates for detailed identification. 1. A character classification method, comprising a classification processing unit that determines character types, and performs broad classification for character recognition based on feature amounts that reflect absolute position information and character pattern structure information.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP60110287A JPS6284389A (en) | 1985-05-24 | 1985-05-24 | Character classification system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP60110287A JPS6284389A (en) | 1985-05-24 | 1985-05-24 | Character classification system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS6284389A JPS6284389A (en) | 1987-04-17 |
| JPH0576664B2 true JPH0576664B2 (en) | 1993-10-25 |
Family
ID=14531870
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP60110287A Granted JPS6284389A (en) | 1985-05-24 | 1985-05-24 | Character classification system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS6284389A (en) |
-
1985
- 1985-05-24 JP JP60110287A patent/JPS6284389A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS6284389A (en) | 1987-04-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4408342A (en) | Method for recognizing a machine encoded character | |
| JP2700130B2 (en) | Handwritten character recognition system and method | |
| US6701022B2 (en) | Pattern matching coding device and method thereof | |
| US5825925A (en) | Image classifier utilizing class distribution maps for character recognition | |
| US4641355A (en) | Pattern recognition apparatus | |
| JPH0576664B2 (en) | ||
| JPS6132187A (en) | Character recognition system | |
| JP2001506383A (en) | How to perform character recognition on a pixel matrix | |
| JP3196291B2 (en) | Character recognition method and device | |
| JP2550867B2 (en) | Structure analysis method of mixed figure image | |
| JP2005302056A (en) | Pattern extraction device | |
| JP3104355B2 (en) | Feature extraction device | |
| Chen et al. | On-line handwriting recognition of Chinese characters via a rule-based approach | |
| JP2582611B2 (en) | How to create a multi-font dictionary | |
| JP3083609B2 (en) | Information processing apparatus and character recognition apparatus using the same | |
| JPH03126188A (en) | Character recognizing device | |
| JP2918363B2 (en) | Character classification method and character recognition device | |
| JP2993533B2 (en) | Information processing device and character recognition device | |
| JPS5855551B2 (en) | Discrimination feature extraction device | |
| JPH0252313B2 (en) | ||
| JPS58165178A (en) | Character reader | |
| Gao et al. | Segmentation of stick text based on sub connected area analysis | |
| JPH04280393A (en) | Character/graphic recognizing device | |
| JPH09114927A (en) | Method and apparatus for classifying input characters in online character recognition | |
| JPH03214285A (en) | Data conversion system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| EXPY | Cancellation because of completion of term |