JPH0147829B2 - - Google Patents
Info
- Publication number
- JPH0147829B2 JPH0147829B2 JP57004922A JP492282A JPH0147829B2 JP H0147829 B2 JPH0147829 B2 JP H0147829B2 JP 57004922 A JP57004922 A JP 57004922A JP 492282 A JP492282 A JP 492282A JP H0147829 B2 JPH0147829 B2 JP H0147829B2
- Authority
- JP
- Japan
- Prior art keywords
- character
- coordinates
- coordinate
- division
- barycenter
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/18—Extraction of features or characteristics of the image
- G06V30/18086—Extraction of features or characteristics of the image by performing operations within image blocks or by using histograms
- G06V30/18095—Summing image-intensity values; Projection and histogram analysis
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character 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)
Description
本発明は、入力文字パターンの特定方向のスト
ロークをあらわす各サブパターンにおける各文字
枠分割単位領域毎の黒ビツト和を文字線幅と各サ
ブパターンに対応した文字枠の大きさとで正規化
して特徴要素を抽出し、入力文字パターンの複雑
度に応じて文字枠分割単位領域の分割形式を決定
し、その分割形式に対応した辞書を参照して文字
を認識する文字認識方式に関する。
文字認識方式の1形式として上記の式であらわ
される量を特徴要素F(k、ki、kj)とする特徴
マトリクスを作成し、同様の形式であらわされた
標準文字マスクとの類似度を測定して文字を認識
する文字認識方式がある。
F(k、ki、kj)=Bk(ki、kj)/WL・WPk
WLは入力文字パターンの文字線幅をあらわ
す。
WPkはWPh、WPv、WPr、WPl等をあらわし、
例えばWPhは水平方向の文字枠の大きさであり、
以下同様にWPv、WPr、WPlはそれぞれ垂直方
向、右斜め45度方向、左斜め45度方向の文字枠の
大きさである。Bk(ki、kj)はBh(hi、hj)、Bv(vi、
vj)、Br(ri、rj)、Bl(li、lj)等をあらわし、例え
ばBh(hi、hj)は水平サブパターンHSPの分割単
位領域(hi、hj)における黒ビツトの和であり、
hiは文字枠のX軸方向の分割単位領域の番号であ
り、hjは文字枠のY軸方向の分割単位領域の番号
である。以下同様にBv(vi、vj)、Br(ri、rj)、Bl
(li、lj)はそれぞれ垂直サブパターンVSP、右斜
め45度サブパターンRSP、左斜め45度サブパタ
ーンLSPの分割単位領域(vi、vj)、(ri、rj)、(li
、
lj)における黒ビツトの和である。又、vi、ri、li
はそれぞれのサブパターンの文字枠のX軸方向の
分割単位領域の番号であり、vj、rj、ljはそれぞ
れのサブパターンの文字枠のY軸方向の分割単位
領域の番号である。
この方式における文字ストロークの位置情報は
分割単位領域に保持され、分割単位領域の設定は
認識率を左右する一要素となる。文字枠のX軸、
Y軸方向を夫々均等に分割して分割単位領域を設
定した場合は、個人差に基づくストローク位置変
動の影響が大きく現われる。
第1図は、漢字「目」の水平ストロークの位置
が異なつた2つの例を示しており、ORGAと
ORGBは漢字「目」の入力文字パターン、
HSPAとHSPBはそれらの水平サブパターンであ
る。第1図に示した例で、一点鎖線で示すよう
に、文字枠のY軸方向を均等に4分割して分割単
位領域h1〜h4を設定した場合、水平サブパターン
に関する一部の黒ビツト和Bh(hi、h3)、Bh(hi、
h4)は両水平サブパターンHSPA、HSPB間で1/
2文字線幅相当分づつ異なるものとなり、従つて
2つの入力文字パターンORGA、ORGBの特徴
マトリクスも異なつたものとなり、結果として認
識率が低下するか又は文字変形を考慮した多くの
辞書が必要となる。
本発明の目的は、分割座標をストロークの位置
変動に追従して変化設定することにより、個人差
に基づくストローク位置変動の影響を軽減するこ
とにあり、これを、入力文字パターンをX軸、Y
軸夫々に投影して黒ビツト数分布を夫々求め、
夫々の黒ビツト数分布における重心座標系列を求
め、この重心座標系列を分割座標候補として分割
座標番号と重心座標番号とをほぼ均等に対応づけ
て分割座標を決定し、これら2系統の分割座標系
列で文字枠の分割単位領域を設定することによつ
て達成したものである。
第2図は、本発明による文字認識装置の実施例
を示したものである。以下第2図に基づいて詳細
に説明する。
1は帳票からの光入力である。この光入力1は
光電変換部2に入力される。光電変換部2は1つ
の文字予定領域を128×128の画像へ分解し、各画
素を2値のデイジタル信号(以下これを入力文字
パターンと呼ぶ)へ変換するものであり、平均的
大きさの1文字は60×60ビツト程度の入力文字パ
ターンで表現される。パターンレジスタ3は文字
予定領域における各画素のX、Y座標を再現でき
る形式で入力文字パターンを記憶するものであ
り、文字予定領域に対応して128×128ビツトの容
量を有するものである。文字線幅計算部4は周知
のフイルタ回路と同様にシフトレジスタ構成とな
つており、入力文字パターンを受けて2×2段の
シフトレジスタ窓のすべての画素が黒ビツトとな
る状態の個線Qと入力文字パターンの黒ビツト和
Aを計数し、下記に示す周知線で線幅WLを算出
する。
WL=A/A−Q
文字枠検出部5は文字の外接枠をそのパターン
レジスタにおける左端座標Xl、右端座標Xr、上
端座標Yt、下端座標Ybで表現して検出し、更に
文字枠の大きさを検出するものである。文字枠の
大きさは水平方向の大きさとしてWPh=Xr−Xl
+1、垂直方向の大きさとしてWPv=Yt−Yb−
1、として検出される。右斜め45度方向及び左斜
め45度方向の大きさとして
WPr=WPl=WPh+WPv/2
として検出する。水平、垂直、右斜め、左斜めサ
ブパターン抽出部6〜9は入力文字パターンと線
幅WLとに基づいて水平、垂直、右斜め、左斜
め、の各方向のストロークをあらわすサブパター
ンHSP、VSP、RSP、LSPを夫々抽出するもの
であり、各方向に対応した線幅より十分長く連続
する黒ビツトを抽出することにより行う。例えば
サブパターンHSPはパターンレジスタ3の全面
を水平に走査し、各走査線毎に黒ビツトの連続す
る個数を検出し、その長さが2WLより大きい黒
ビツトを抽出することにより水平ストロークから
なる水平サブパターンを抽出する。同様に、垂
直、右斜め、左斜めの各サブパターンはパターン
レジスタ3をそれぞれ垂直方向、右斜め方向、左
斜め方向へ走査することにより抽出する。
このように抽出されたサブパターンの一例を第
3図に示しており、第3図のORGは入力文字パ
ターンHSPは水平サブパターン、VSRは垂直サ
ブパターン、RSPは右斜めサブパターン、LSP
は左斜めサブパターンである。文字投影作成部1
0はパターンレジスタの入力文字パターンをX
軸、Y軸(夫々パターンレジスタの2次元座標に
おける水平方向、垂直方向)へ投影して黒ビツト
数の分布を求め、黒ビツト数分布SX(x)、SY
(y)を作成する。
SX(x)=y=Yt
〓y=Yb
P(x、y)
SY(y)=x=Xr
〓x=X1
P(x、y)
但し、x、yはパターンレジスタ3における
夫々0〜127なる2次元座標であり、Yt、Ybは文
字枠のY軸方向の上端座標、下端座標、Xl、Xr
はX軸方向の左端座標、右端座標であり、P(x、
y)は黒ビツト又は白ビツトを意味し、黒ビツト
(有意色)の場合P(x、y)=1、白ビツト(背
景色)の場合P(x、y)=0をとる。
第1図に示した漢字「目」の2つの入力文字パ
ターンORGA、ORGBに対する黒ビツト分布SX
(x),SY(y)を第4図に示す。重心検出部11
は、文字枠のX、Y各軸方向の全範囲Xl〜Xr,
Yb〜Yt及び前の過程で検出した重心座標でその
範囲Xl〜Xr,Yb〜Ytを分割した各範囲を対象と
して、入力文字パターンの夫々の黒ビツト数分布
SX(x),SY(y)の重心座標系列X(Mp)、Y
(Mq)を求めるものであり、各範囲の1次モーメ
ントの和をその範囲の黒ビツト和で除算すること
によつて求めるものである。但し、Mp、Mqは座
標値の大きさの順に付した重心座標番号であり、
Mp=1〜MX(MXはX軸方向の重心の個数であ
つて奇数)Mq=1〜MY(MYはY軸方向の重心
の個数であつて奇数)である。X軸方向の重心座
標の個数MXとしては、15個程度の比較的多い数
(分割数に比べて)を採用することが望ましいが、
説明の簡略化のために7個の重心座標X(Mp)を
検出する場合について述べると、まず、文字枠の
X軸方向の範囲Xl〜Xrを対象として、次式に示
すように入力文字パターンの黒ビツト数分布SX
(x)の1次モーメント和をその範囲の黒ビツト
和で除算することによつて、中央の重心座標番号
M4の重心座標X(M4)を求める(第4図参照)。
X(M4)=x=Xr
〓x=Xl
SX(x)・x/x=Xr
〓x=Xl
SX(x)
次いで、その重心座標X(M4)で分割された
夫々の範囲、Xl〜X(M4)、X(M4)〜Xrを対象
として2つの重心座標X(M2)、X(M6)を求め
る。
X(M2)=x=X(M4)
〓x=Xl
SX(x)・x/x=X(M4)
〓x=Xl
SX(x)
X(M6)=x=Xr
〓x=(M4)
SX(x)・x/x=Xr
〓x=(M4)
SX(x)
次いで、これまで検出された重心座標X(M2),
X(M4),X(M4)で分割された範囲Xl〜X
(M2),X(M2)〜X(M4),X(M4)〜X(M6),
X(M6)〜Xrを対象として4個の重心座標X
(M1),X(M3),X(M5),X(M7)を求める。
X(M1)=x=X(M2)
〓x=Xl
SX(x)・x/x=X(M2)
〓x=Xl
SX(x)
X(M3)=x=X(M4)
〓x=X(M2)
SX(x)・x/x=X(M4)
〓x=X(M2)
SX(x)
〓
X(M7)=x=Xr
〓x=X(M6)
SX(x)・x/x=Xr
〓x=X(M6)
SX(x)
Y軸方向の重心座標X(Mq)の検出も検出する
重心座標個数MYを7個とした場合、まず、文字
枠の範囲Yb〜Ytを対象として入力文字パターン
の黒ビツト分布SY(y)の重心座標Y(M4)を検
出し、次いで文字枠を重心座標で2分した範囲
Yb〜Y(M4),Y(M4)〜Ytをそれぞれ対象とし
て黒ビツト分布SY(y)の重心座標Y(M2),Y
(M6)を検出し、更にこれまでに検出された重心
座標Y(M2),Y(M4),Y(M6)でY軸方向の文
字枠を分割した夫々の範囲Yb〜Y(M2),Y(M2)
〜Y(M4),Y(M4)〜Y(M6),Y(M6)〜Ytを
対象として黒ビツト分布SY(y)の重心座標を検
出することによつて、計7個の重心座標Y(M1)
〜Y(M7)を検出する。
文字枠分割点決定部12は、各サブパターン対
応のX、Y軸方向の分割数をNX、NYとし、各
サブパターン対応のX、Y軸各方向の分割座標系
列をXd(I),Yd(J)として、X、Y軸各方向の重心
座標系列X(Mp)、Y(Mq)を分割座標候補とし
て、重心座標番号Mp、Mqを分割座標番号I、J
にほぼ均等に対応づけて分割座標Xd(I),Yd(J)を
決定するものである。
この実施例における分割単位領域の分割形式
は、全てのサブパターンHSP、VSP、LSP、
RSPに対して同一であり、X軸Y軸ともに同一
数の分割領域に分割するものであるが、X軸方向
に関する分割数としてNX=4、5、6、8なる
4形式を取ることができ、Y軸方向に関する分割
数NYとしてNY=4、5、6、8なる4形式を
取ることができ、X軸方向の分割座標番号をI
(I=1〜NX−1、NX=4、5、6、8)とし
且つY軸方向の分割座標番号をJ(J=1〜NY
−1、NY=4、5、6、8)として、文字枠を
NX、NYなる個数の分割単位領域に分割する分
割座標系列Xd(I),Yd(J)を決定する。X、Y軸各
方向の重心座標番号Mp、MqとX、Y軸方向の重
心座標番号I、Jをほぼ均等に対応づけて分割座
標系列Xd(I),Yd(J)を決定するために、次記に示
す如きテーブルが用意されていて、X、Y軸各方
向の分割数NX、NYに対応してこのテーブルか
ら重心座標番号Mp、Mqを読み出し、その重心座
標番号Mp、Mqに対応した重心座標M(Mp)、Y
(Mq)を分割座標Xd(I),Yd(J)として決定する。
The present invention is characterized by normalizing the sum of black bits for each character frame division unit area in each subpattern representing a stroke in a specific direction of an input character pattern by the character line width and the size of the character frame corresponding to each subpattern. The present invention relates to a character recognition method in which elements are extracted, a division format of a character frame division unit area is determined according to the complexity of an input character pattern, and characters are recognized by referring to a dictionary corresponding to the division format. As a form of character recognition method, a feature matrix is created with the quantities expressed by the above formula as feature elements F (k, k i , k j ), and the similarity with a standard character mask expressed in a similar format is calculated. There is a character recognition method that recognizes characters by measuring them. F (k, k i , k j )=B k (k i , k j )/WL·WP k WL represents the character line width of the input character pattern. WP k represents WP h , WP v , WP r , WP l , etc.
For example, WP h is the horizontal character frame size,
Similarly, WP v , WP r , and WP l are the sizes of the character frame in the vertical direction, the 45-degree diagonal right direction, and the 45-degree diagonal left direction, respectively. B k (k i , k j ) is B h (h i , h j ), B v (v i ,
v j ), B r (r i , r j ), B l (l i , l j ), etc. For example, B h (h i , h j ) represents the divided unit area (h i , h i ) of the horizontal sub-pattern HSP. is the sum of black bits in h j ),
h i is the number of the divided unit area of the character frame in the X-axis direction, and h j is the number of the divided unit area of the character frame in the Y-axis direction. Similarly, B v (v i , v j ), B r (r i , r j ), B l
(l i , l j ) are the divided unit areas (v i , v j ), (r i , r j ), ( l i
,
is the sum of black bits in l j ). Also, v i , r i , l i
is the number of the dividing unit area in the X-axis direction of the character frame of each sub-pattern, and v j , r j , l j is the number of the dividing unit area in the Y-axis direction of the character frame of each sub-pattern. In this method, the positional information of character strokes is held in the divided unit areas, and the setting of the divided unit areas is one factor that influences the recognition rate. X-axis of character frame,
If divided unit areas are set by equally dividing each area in the Y-axis direction, the influence of stroke position fluctuations based on individual differences will be significant. Figure 1 shows two examples where the horizontal stroke position of the kanji ``eye'' is different.
ORGB is the input character pattern for the kanji "eye",
HSPA and HSPB are their horizontal subpatterns. In the example shown in Figure 1, if the Y-axis direction of the character frame is equally divided into four and divided unit areas h 1 to h 4 are set, as shown by the dashed line, some black parts related to the horizontal sub-pattern Bit sum B h (h i , h 3 ), B h (h i ,
h4 ) is 1/ between both horizontal subpatterns HSPA and HSPB.
The character matrices of the two input character patterns ORGA and ORGB are also different, resulting in a lower recognition rate or the need for many dictionaries that take into account character deformation. Become. An object of the present invention is to reduce the influence of stroke position fluctuations based on individual differences by setting dividing coordinates to follow the stroke position fluctuations.
Find the black bit number distribution by projecting it onto each axis,
Find the barycenter coordinate series for each black bit number distribution, use this barycenter coordinate series as a division coordinate candidate, and determine the division coordinates by associating the division coordinate number and barycenter coordinate number almost equally, and divide the division coordinate series of these two systems. This was achieved by setting the dividing unit area of the character frame. FIG. 2 shows an embodiment of a character recognition device according to the present invention. A detailed explanation will be given below based on FIG. 2. 1 is optical input from the form. This optical input 1 is input to a photoelectric conversion section 2. The photoelectric conversion unit 2 decomposes one character planned area into a 128 x 128 image and converts each pixel into a binary digital signal (hereinafter referred to as input character pattern). One character is represented by an input character pattern of about 60 x 60 bits. The pattern register 3 stores the input character pattern in a format capable of reproducing the X and Y coordinates of each pixel in the expected character area, and has a capacity of 128×128 bits corresponding to the expected character area. The character line width calculation unit 4 has a shift register configuration similar to a well-known filter circuit, and receives an input character pattern to calculate an individual line Q in which all pixels in a 2×2 shift register window become black bits. and the black bit sum A of the input character pattern, and calculate the line width WL using the known line shown below. WL=A/A-Q The character frame detection unit 5 detects the circumscribed frame of a character by expressing it in the left end coordinate X l , right end coordinate X r , upper end coordinate Y t , and lower end coordinate Y b in the pattern register, and then detects the circumscribed frame of the character. It detects the size of the frame. The size of the character frame in the horizontal direction is WP h = X r −X l
+1, as the vertical dimension WP v = Y t − Y b −
1. The size in the 45-degree right diagonal direction and the 45-degree left diagonal direction is detected as WP r =WP l =WP h +WP v /2. The horizontal, vertical, right diagonal, and left diagonal subpattern extraction units 6 to 9 extract subpatterns HSP and VSP representing strokes in the horizontal, vertical, right diagonal, and left diagonal directions based on the input character pattern and line width WL. , RSP, and LSP, respectively, by extracting continuous black bits that are sufficiently longer than the line width corresponding to each direction. For example, the sub-pattern HSP is created by horizontally scanning the entire surface of the pattern register 3, detecting the number of consecutive black bits for each scanning line, and extracting the black bits whose length is greater than 2WL. Extract subpatterns. Similarly, vertical, diagonal right, and diagonal left subpatterns are extracted by scanning the pattern register 3 in the vertical direction, diagonal right direction, and diagonal left direction, respectively. An example of subpatterns extracted in this way is shown in Fig. 3. In the ORG in Fig. 3, the input character pattern HSP is a horizontal subpattern, VSR is a vertical subpattern, RSP is a right diagonal subpattern, and LSP is a horizontal subpattern.
is a left diagonal subpattern. Character projection creation section 1
0 is the input character pattern of the pattern register
The distribution of the number of black bits is obtained by projecting it onto the axis and the Y axis (horizontal and vertical directions in the two-dimensional coordinates of the pattern register, respectively), and the distribution of the number of black bits SX(x), SY
Create (y). SX (x) = y=Yt 〓 y=Yb P (x, y) SY (y) = x=Xr 〓 x=X1 P (x, y) However, x and y are each 0 to 127 in the pattern register 3 Y t , Y b are the upper and lower coordinates of the character frame in the Y-axis direction, X l , X r
are the leftmost coordinate and rightmost coordinate in the X-axis direction, and P(x,
y) means a black bit or a white bit; in the case of a black bit (significant color), P(x, y)=1, and in the case of a white bit (background color), P(x, y)=0. Black bit distribution SX for the two input character patterns ORGA and ORGB of the kanji ``eye'' shown in Figure 1
(x) and SY(y) are shown in Figure 4. Center of gravity detection unit 11
is the entire range X l to X r of the character frame in the X and Y axis directions,
The distribution of the number of black bits for each of the input character patterns is calculated for each range obtained by dividing the ranges X l - X r and Y b - Y t by Y b - Y t and the centroid coordinates detected in the previous process.
Centroid coordinate series X (M p ), Y of SX (x), SY (y)
(M q ) is obtained by dividing the sum of the first moments of each range by the sum of black bits of that range. However, M p and M q are the barycenter coordinate numbers assigned in order of the size of the coordinate values,
M p =1 to MX (MX is the number of centers of gravity in the X-axis direction and is an odd number) M q =1 to MY (MY is the number of centers of gravity in the Y-axis direction and is an odd number). It is desirable to adopt a relatively large number (compared to the number of divisions) of about 15 as the number MX of the center of gravity coordinates in the X-axis direction.
To simplify the explanation , we will describe the case of detecting seven barycenter coordinates Black bit count distribution of input character pattern SX
By dividing the sum of the first moments of (x) by the sum of black bits in that range, we can calculate the central barycenter coordinate number.
Find the center of gravity coordinates X (M 4 ) of M 4 (see Figure 4). X(M 4 )= x=Xr 〓 x=Xl SX(x)・x/ x=Xr 〓 x=Xl SX(x) Next, each range divided by the center of gravity coordinates X(M 4 ), Two barycenter coordinates X( M2 ) and X( M6 ) are obtained for l ~X( M4 ) and X(M4)~ Xr . X(M 2 )= x=X(M4) 〓 x=Xl SX(x)・x/ x=X(M4) 〓 x=Xl SX(x) X(M 6 )= x=Xr 〓 x=( M4) SX(x)・x/ x=Xr 〓 x=(M4) SX(x) Next, the centroid coordinates detected so far X(M 2 ),
Range X l to X divided by X (M 4 ), X (M 4 )
( M2 ), X( M2 )~X( M4 ), X( M4 )~X( M6 ),
Four centroid coordinates X for X (M 6 ) ~ X r
Find (M 1 ), X (M 3 ), X (M 5 ), and X (M 7 ). X(M 1 )= x=X(M2) 〓 x=Xl SX(x)・x/ x=X(M2) 〓 x=Xl SX(x) X(M 3 )= x=X(M4) 〓 x=X(M2) SX(x)・x/ x=X(M4) 〓 x=X(M2) SX(x) 〓 X(M 7 )= x=Xr 〓 x=X(M6) SX(x )・x/ x=Xr 〓 x=X(M6) SX (x) Detection of barycenter coordinates The centroid coordinates Y (M 4 ) of the black bit distribution SY (y) of the input character pattern are detected in the range Y b to Y t , and then the range is divided into two by the centroid coordinates of the character frame.
The barycenter coordinates Y (M 2 ), Y of the black bit distribution SY (y) for Y b ~ Y (M 4 ) and Y (M 4 ) ~ Y t , respectively.
(M 6 ) and further divide the character frame in the Y-axis direction by the centroid coordinates Y (M 2 ), Y (M 4 ), and Y (M 6 ) detected so far, each range Y b ~ Y( M2 ), Y( M2 )
By detecting the barycenter coordinates of the black bit distribution SY(y) for ~Y( M4 ), Y( M4 )~Y( M6 ), Y( M6 )~ Yt , a total of 7 Coordinates of the center of gravity Y (M 1 )
~Y( M7 ) is detected. The character frame dividing point determination unit 12 sets the number of divisions in the X and Y axis directions corresponding to each subpattern to NX and NY, and sets the division coordinate series in each direction of the X and Y axes corresponding to each subpattern to X d (I), As Y d (J), the barycenter coordinate series X (M p ), Y (M q ) in each direction of the X and Y axes are used as division coordinate candidates, and the barycenter coordinate numbers M p and M q are divided coordinate numbers I and J.
The divisional coordinates X d (I) and Y d (J) are determined in almost equal correspondence to . The division format of the division unit area in this example is all subpatterns HSP, VSP, LSP,
It is the same for RSP, and is divided into the same number of divided regions on both the X and Y axes, but the number of divisions in the X-axis direction can take four formats: NX = 4, 5, 6, and 8. , the division number NY in the Y-axis direction can take four formats: NY = 4, 5, 6, 8, and the division coordinate number in the X-axis direction is I.
(I = 1 to NX-1, NX = 4, 5, 6, 8), and the division coordinate number in the Y-axis direction is J (J = 1 to NY
-1, NY = 4, 5, 6, 8) and set the character frame to
The division coordinate series X d (I) and Y d (J) to be divided into NX and NY division unit areas are determined. The barycenter coordinate numbers M p and M q in each direction of the X and Y axes are almost equally matched with the barycenter coordinate numbers I and J in the X and Y axes directions to form a divided coordinate series X d (I), Y d (J). In order to determine this, a table as shown below is prepared, and the barycenter coordinate numbers M p and M q are read out from this table corresponding to the number of divisions NX and NY in each direction of the X and Y axes, and the barycenter coordinates are determined. Centroid coordinates M (M p ), Y corresponding to numbers M p and M q
(M q ) is determined as the division coordinates X d (I) and Y d (J).
【表】
このテーブルは、重心検出部11で検出する重
心座標の個数MX、MYが7個の場合であるが、
一般的な場合においても、X、Y各方向の分割数
に対応して均等個数の重心座標が含まれるように
対応させ、且つその際余分の重心座標が残つた場
合は両端の領域から順に1個多い重心座標が含ま
れるように対応させることによつて作ることがで
きる。
第5図には、X、Y軸各方向の分割数NX、
NYとしてNX=NY=5なる分割数が指定され
た場合について、分割座標系列Xd(I)、Yd(J)と重
心座標系列X(Mp)、Y(Mq)との対応関係を示
し、また、それらの分割座標系列Xd(I)、Yd(J)で
設定される分割単位領域ki,kjを示している。
なお、分割数NX、NYは入力文字の複雑度を
検出し、この複雑度に応じて分割数NX、NYを
決定し、或いはいつたんリジエクトされた場合に
分割数NX、NYを変更して再度文字認識を行な
わせるものであるが、その詳細説明は省略する。
ここでは、漢字「目」なる入力文字パターンに
対して、前記分割数決定部8で各サブパターン毎
の分割数が全て4×4として決定されたものとし
て、それに対応してX軸方向の分割座標としてX
(M2),X(M4),X(M6)を、Y軸方向の分割座
標としてY(M2),Y(M4),Y(M6)を決定す
る。特徴マトリクス抽出部13はサブパターンの
分割数に対応したX軸方向の両端座標及び分割座
標Xl、X(M2),Y(M3),X(M4),Xrと、Y軸
方向の両端座標及び分割座標Yb,Y(M2),Y
(M4),Y(M6),Ytと、各サブパターンHSP、
VSP、RSP、LSPと、各サブパターンに対応し
た文字枠の大きさWPh、WPv、WPr、WPlと、文
字線幅WLとを受けて、各サブパターンを前記分
割座標からきまる複数の分割単位領域に分割し
て、各分割単位領域毎の黒ビツト数Bk(ki、kj)
を計数し、下記の式で示すように線幅Wと各サブ
パターンに対応する文字枠の大きさWPh、WPv、
WPr、WPlとで正規化し、各サブパターンの分割
単位領域毎に特徴要素
F(k、ki、kj)=Bk(ki、kj)/WL・WPk(但し、
k=h、
v、r、l)を抽出し、特徴マトリクスを作成す
る。
F(h、hi、hj)=Bh(hi、hj)/WL・WPh
F(v、vi、vj)=Bv(vi、vj)/WL・WPv
F(r、ri、rj)=Br(ri、rj)/WL・WPr
F(l、li、lj)=Bl(li、lj)/WL・WPl
各サブパターンの分割単位領域(ki、kj)毎の
黒ビツト和Bk(ki、kj)の算出は、分割単位領域
ki,kj)に対応した分割座標で各サブパターンを
読み込み、黒ビツトの個数を加算することによつ
て行う。例えば特徴要素F(h、1、1)に対応
した黒ビツト和Bh(1、1)は分割単位領域
(1、1)に対応したX座標Xl、X(M2)及びY
座標Yb、Y(M2)で決定される範囲の水平サブ
パターンHSPを水平サブパターン抽出部6から
読み出し、黒ビツト数を計数することによつて求
められる。識別部14には、標準文字マスクFS
(k、ki、kj)が入力文字パターンにおける特徴
マトリクスと同様に、各サブパターンに関する各
分割単位領域ki,kjの黒ビツト和を文字線幅とサ
ブパターンに対応した文字枠の大きさとで正規化
した標準文字の特徴で表現され、分割単位領域の
分割形式に関する複数の辞書が用意されていて、
入力文字パターンと標準文字マスクとの類似度が
測定され、最も類似する標準文字マスクの文字コ
ードを入力文字パターン名として認識し、その文
字コードを文字コード出力端に出力する。ここで
の分割形式は、全てのサブパターンに共通であり
且つX、Y方向共に同数で4、5、6もしくは8
分割して分割単位領域を決定したものである。
以上の説明から明らかなように、この実施例で
は、文字枠のX、Y軸各方向を4、5、6、8等
の分割領域に分割して分割単位領域を設定する場
合、入力文字パターンのX、Y軸各方向の黒ビツ
ト数分布の重心座標系列X(Mp)、Y(Mq)に基
づいているため、個人差によるストローク変動に
追従していて分割単位領域が決定される利点があ
る。
第4図を参照するに、2つの入力文字パターン
ORGA、ORGBには水平ストロークの位置に相
違があるが、両入力文字パターンORGA、
ORGBをX軸に投影した黒ビツト分布SX(x)は
同じであるので、X軸方向の分割座標Xd(1),
Xd(2),Xd(3)も同じであり、X軸方向の分割
座標は水平ストロークの位置の違いに影響されな
い。Y軸方向の分割座標Xd(1),Xd(2),Xd
(3)は、入力文字パターンORGA、ORGBをY
軸に投影した黒ビツト数分布SY(y)の重心座標
系列に基づいて決定されるため、水平ストローク
のY軸方向の位置の変動に応じて移動し、両入力
文字パターンORGA、ORGBの分割座標Yd(1)
〜Yd(3)で決定される垂直方向の分割領域と水
平ストロークとの相対位置は近似したものとな
る。
このように、重心座標系列に基づいて分割座標
を決定した場合、特徴マトリクスが安定に抽出で
き、個人差による文字パターンの変動を吸収でき
る利点がある。
なお、前記実施例におけるサブパターンの分割
形式は、X軸、Y軸共に同数に分割し且つ全ての
サブパターンを同一形式で分割するものであつた
が、文字枠分割決定部のテーブルとして、分割形
式対応で各サブパターン毎に且つX軸、Y軸毎に
区別して重心座標番号を記憶させておくことによ
り、本発明を適用することができる。
なおまた、前記実施例においてはテーブルを採
用することによつて重心座標と分割座標とを対応
づけたが、第6図に示すフローチヤートの演算処
理を実行させることによつても対応づけることが
できる。なお、第6図における除去の結果はすべ
て小数点以下切り捨てである。
第6図において、ステツプS1で(重心個数
MX+1)を分割数NXで割つた数Maを求め、ス
テツプS2,S3で(MX+1)/NXの剰余R1
とを求める。又、ステツプS4でkaを求め、ステ
ツプS5,S6で分割番号kiと重心番号Mpを0
にセツトする。又、ステツプS7,S8,S9
で、分割番号kiを1つ増加する毎に、前に設定さ
れているR2を1つ減じ、重心番号MpをMaずつ増
加させる。ステツプS10で剰余R2が負でない
ことを調べ、剰余R2が負でない限りステツプS
11で重心番号の数を1つ増し、ステツプS12
でその重心番号Mpを分割番号kiに対応づけ、分
割座標Xd(ki)を決定する。剰余R2が負の場合、
ステツプS13で現在の分割番号kiがkaより大き
いか否かを判定し、大きい場合は重心番号を1つ
増し、小さい場合はステツプS9で設定された重
心番号を分割番号に対応づけて分割座標Xd(ki)
決定し、ステツプS14で分割番号kiが(NX−
1)に一致したことを検出して終了する。
以上の説明から明らかなように、文字枠の分割
座標を、文字パターンのX、Y軸各方向の黒ビツ
ト数分布の重心座標を基準にして決定しているの
で、文字ストロークの移動等がある場合でも、ス
トロークの含まれる分割単位領域の位置が安定で
あり、文字の変動が吸収できるという利点がある
ので、辞書が簡単となり、高速で安定な文字認識
装置が実現できる。[Table] This table is for the case where the number of barycenter coordinates MX and MY detected by the barycenter detection unit 11 is seven.
In the general case, the number of barycenter coordinates is set to be equal to the number of divisions in each of the X and Y directions, and if there are any extra barycenter coordinates remaining, the number of barycenter coordinates is divided in order from both ends. It can be created by making the correspondence so that many centroid coordinates are included. Figure 5 shows the number of divisions NX in each direction of the X and Y axes,
When the number of divisions NX=NY=5 is specified as NY, the correspondence between the division coordinate series X d (I), Y d (J) and the barycentric coordinate series X (M p ), Y (M q ) It also shows the divided unit areas k i and k j set by these divided coordinate series X d (I) and Y d (J). In addition, the number of divisions NX, NY detects the complexity of the input character, and determines the number of divisions NX, NY according to this complexity, or if it is rejected, change the number of divisions NX, NY and try again. Although character recognition is performed, detailed explanation thereof will be omitted. Here, it is assumed that the number of divisions for each sub-pattern is all determined to be 4×4 by the division number determining unit 8 for the input character pattern of the kanji character "me", and the division in the X-axis direction is performed accordingly. X as coordinate
(M 2 ), X (M 4 ), and X (M 6 ) are divided coordinates in the Y-axis direction, and Y (M 2 ), Y (M 4 ), and Y (M 6 ) are determined. The feature matrix extraction unit 13 extracts the coordinates of both ends in the X-axis direction and the division coordinates X l , X (M 2 ), Y (M 3 ), X (M 4 ), X r in the Y-axis corresponding to the number of divisions of the sub-pattern Coordinates at both ends of the direction and division coordinates Y b , Y (M 2 ), Y
(M 4 ), Y (M 6 ), Y t and each sub-pattern HSP,
In response to VSP, RSP, LSP, the size of the character frame WP h , WP v , WP r , WP l corresponding to each sub-pattern, and the character line width WL, each sub-pattern is determined from the division coordinates. The number of black bits for each divided unit area B k (k i , k j )
, and calculate the line width W and the character frame size WP h , WP v , corresponding to each sub-pattern as shown in the formula below.
Normalized by WP r and WP l , the feature element is calculated for each divided unit area of each sub-pattern .
k=h, v, r, l) and create a feature matrix. F (h, h i , h j ) = B h (h i , h j ) / WL・WP h F (v, v i , v j ) = B v (v i , v j ) / WL・WP v F (r, r i , r j ) = B r (r i , r j )/WL・WP r F (l, l i , l j )=B l (l i , l j )/WL・WP l Calculation of the black bit sum B k (k i , k j ) for each divided unit area (k i , k j ) of each sub-pattern is performed using the divided unit area
This is done by reading each sub-pattern at the dividing coordinates corresponding to k i , k j ) and adding up the number of black bits. For example, the black bit sum B h (1, 1) corresponding to the feature element F (h, 1, 1) is the X coordinate X l , X (M 2 ) and Y corresponding to the divided unit area (1, 1).
It is obtained by reading out the horizontal sub-pattern HSP in the range determined by the coordinates Y b and Y (M 2 ) from the horizontal sub-pattern extraction section 6 and counting the number of black bits. The identification section 14 includes a standard character mask FS.
(k, k i , k j ) is the same as the feature matrix in the input character pattern, and the sum of black bits of each divided unit area k i , k j for each sub-pattern is calculated by the character line width and the character frame corresponding to the sub-pattern. It is expressed by the characteristics of standard characters normalized by size, and multiple dictionaries regarding the division format of the division unit area are prepared.
The degree of similarity between the input character pattern and the standard character mask is measured, and the character code of the most similar standard character mask is recognized as the input character pattern name, and the character code is output to the character code output terminal. The division format here is common to all subpatterns, and the same number of subpatterns in the X and Y directions is 4, 5, 6, or 8.
The area is divided into divided unit areas. As is clear from the above explanation, in this embodiment, when dividing the character frame in each direction of the X and Y axes into 4, 5, 6, 8, etc. division areas and setting division unit areas, the input character pattern Since it is based on the barycentric coordinate series X (M p ), Y (M q ) of the black bit number distribution in each direction of the X and Y axes, it follows stroke fluctuations due to individual differences and determines the dividing unit area. There are advantages. Referring to Figure 4, two input character patterns
There is a difference in the horizontal stroke position between ORGA and ORGB, but both input character patterns ORGA,
Since the black bit distribution SX(x) obtained by projecting ORGB onto the X-axis is the same, the division coordinate in the X-axis direction X d (1),
X d (2) and X d (3) are also the same, and the division coordinates in the X-axis direction are not affected by the difference in horizontal stroke position. Divided coordinates in the Y-axis direction X d (1), X d (2), X d
(3) is input character pattern ORGA, ORGB as Y
Since it is determined based on the barycentric coordinate series of the black bit number distribution SY (y) projected onto the axis, it moves according to the change in the position of the horizontal stroke in the Y-axis direction, and the division coordinates of both input character patterns ORGA and ORGB are Y d (1)
~Y d The relative positions of the vertical divided area determined by (3) and the horizontal stroke are approximate. In this way, when dividing coordinates are determined based on the barycentric coordinate series, there is an advantage that feature matrices can be extracted stably and variations in character patterns due to individual differences can be absorbed. Note that the subpattern division format in the above embodiment was such that both the X and Y axes were divided into the same number of subpatterns, and all subpatterns were divided in the same format. The present invention can be applied by storing barycenter coordinate numbers for each sub-pattern and for each X-axis and Y-axis in accordance with the format. Furthermore, in the above embodiment, the center of gravity coordinates and the divided coordinates were associated with each other by employing a table, but the correspondence can also be established by executing the arithmetic processing of the flowchart shown in FIG. can. Note that all the results of removal in FIG. 6 are rounded down to the nearest whole number. In FIG. 6, in step S1 (the number of centroids
MX+1) divided by the number of divisions NX to find the number M a , and in steps S2 and S3, the remainder R 1 of (MX+1)/NX is calculated.
and seek. In addition, k a is determined in step S4, and division number k i and center of gravity number M p are set to 0 in steps S5 and S6.
Set to . Also, steps S7, S8, S9
Then, each time the division number k i is increased by one, the previously set R 2 is decreased by one, and the center of gravity number M p is increased by M a . In step S10, it is checked whether the remainder R2 is non-negative, and unless the remainder R2 is negative, the process proceeds to step S10.
11, the number of the center of gravity is increased by one, and the process proceeds to step S12.
Then, the centroid number M p is associated with the division number k i and the division coordinates X d (k i ) are determined. If the remainder R 2 is negative,
In step S13, it is determined whether the current division number k i is larger than k a , and if it is larger, the center of gravity number is incremented by one, and if it is smaller, the center of gravity number set in step S9 is associated with the division number and divided. Coordinates X d (k i )
Then, in step S14, the division number k i is (NX-
1) is detected and ends. As is clear from the above explanation, since the dividing coordinates of the character frame are determined based on the barycenter coordinates of the black bit number distribution in each direction of the X and Y axes of the character pattern, there may be movement of character strokes, etc. Even in this case, the position of the divided unit area containing the stroke is stable and character fluctuations can be absorbed, which has the advantage that the dictionary is simple and a high-speed and stable character recognition device can be realized.
第1図は入力文字パターン例を示す図、第2図
は本発明による文字認識装置の一実施例を示す機
能ブロツク図、第3図は第2図におけるサブパタ
ーンの一例を示す図、第4図は第2図における入
力文字パターン例と重心座標系列との関係を示す
図、第5図は重心座標系列と分割座標系列との対
応関係を示す図であり、第6図は分割座標系列の
他の決定方法におけるフローチヤートを示すもの
である。
1……光入力、2……光電変換部、3……パタ
ーンレジスタ、4……文字線幅計算部、5……文
字枠検出部、6……水平サブパターン抽出部、7
……垂直サブパターン抽出部、8……右斜めサブ
パターン抽出部、9……左斜めサブパターン抽出
部、10……文字投影作成部、11……重心検出
部、12……文字枠分割点決定部、13……特徴
マトリクス抽出部、14……識別部、15……文
字コード出力端。SX(x),SY(y)……黒ビツ
ト数分布、Xl,Xr……X軸方向の文字枠座標、
Xd(1)〜Xd(4)……X軸方向の分割座標、X
(M1)〜X(M7)……X軸方向の重心座標、Yt,
Yb……Y軸方向の文字枠座標、Yd(1)〜Yd
(4)……Y軸方向の分割座標、Y(M1)〜Y
(M7)……Y軸方向の重心座標。
FIG. 1 is a diagram showing an example of an input character pattern, FIG. 2 is a functional block diagram showing an embodiment of a character recognition device according to the present invention, FIG. 3 is a diagram showing an example of a sub-pattern in FIG. 2, and FIG. The figure shows the relationship between the input character pattern example and the barycenter coordinate series in Figure 2, Figure 5 shows the correspondence between the barycenter coordinate series and the divided coordinate series, and Figure 6 shows the relationship between the barycenter coordinate series and the divided coordinate series. It shows a flowchart for another determination method. 1... Optical input, 2... Photoelectric conversion section, 3... Pattern register, 4... Character line width calculation section, 5... Character frame detection section, 6... Horizontal sub-pattern extraction section, 7
... Vertical sub-pattern extraction section, 8 ... Right diagonal sub-pattern extraction section, 9 ... Left diagonal sub-pattern extraction section, 10 ... Character projection creation section, 11 ... Center of gravity detection section, 12 ... Character frame division point Determination unit, 13...Feature matrix extraction unit, 14...Identification unit, 15...Character code output end. SX(x), SY(y)...Black bit number distribution, Xl , Xr ...Character frame coordinates in the X-axis direction,
X d (1) to X d (4)...Divided coordinates in the X-axis direction,
(M 1 ) to X (M 7 )...Coordinates of the center of gravity in the X-axis direction, Y t ,
Y b ...Character frame coordinates in the Y-axis direction, Y d (1) ~ Y d
(4)...Divided coordinates in the Y-axis direction, Y (M 1 ) ~ Y
(M 7 )...Coordinates of the center of gravity in the Y-axis direction.
Claims (1)
あらわすサブパターンにおける任意の分割単位領
域の黒ビツト数を、文字線幅とストローク方向に
対応した文字枠の大きさとで正規化して得られる
量を特徴要素として、ストローク方向の異なる複
数の各サブパターン毎に且つ文字枠を分割するこ
とによつて得られる前記各分割単位領域毎に入力
文字パターンから前記特徴要素を抽出して特徴マ
トリクスを作成し、標準文字マスクが当該特徴マ
トリクスと同形式で記述されている辞書を参照し
て入力文字パターンの認識を行う文字認識方式に
おいて、 入力文字パターンをX軸とY軸とに夫々投影し
て夫々の黒ビツト数分布を求める段階と、 まず、文字枠の範囲を対象として夫々の黒ビツ
ト数分布の夫々の重心座標を決定し次いでそれま
でに検出した夫々の重心座標で文字枠を分割した
夫々の範囲を対象として夫々の前記黒ビツト数分
布の重心座標を決定する過程を複数回繰返して夫
夫の重心座標系列を求める段階と、 座標値の大きさの順に付した夫々の重心座標系
列における重心座標番号と座標値の大きさの順に
付したX軸、Y軸の分割座標系列における夫々の
分割座標番号とをほぼ均等に対応させて重心座標
系列における1つの重心座標を1つの分割座標に
対応づけて夫々の分割座標系列を決定する段階と
を備え、2系統の前記分割座標で文字枠を分割し
た領域を前記分割単位領域として設定することを
特徴とした文字認識方式。[Claims] 1. Obtained by normalizing the number of black bits of an arbitrary divided unit area in a subpattern representing a stroke in a specific direction of an input character pattern by the character line width and the size of a character frame corresponding to the stroke direction. A feature matrix is created by extracting the feature elements from the input character pattern for each of a plurality of sub-patterns with different stroke directions and for each divided unit region obtained by dividing the character frame, using the quantity as a feature element. In a character recognition method that creates a standard character mask and recognizes an input character pattern by referring to a dictionary in which the standard character mask is described in the same format as the feature matrix, the input character pattern is projected onto the First, the barycentric coordinates of each black bit number distribution are determined for the range of the character frame, and then the character frame is divided at each barycenter coordinate detected so far. repeating the process of determining the barycenter coordinates of each of the black bit number distributions multiple times for each of the ranges in which the barycenter coordinates of the husband and husband are determined; One barycenter coordinate in the barycenter coordinate series is divided into one by almost equally corresponding the barycenter coordinate number in the series and each division coordinate number in the X-axis and Y-axis split coordinate series, which are assigned in the order of the size of the coordinate value. A character recognition method comprising the step of determining each division coordinate series in association with the coordinates, and setting an area obtained by dividing a character frame by two systems of the division coordinates as the division unit area.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP57004922A JPS58123171A (en) | 1982-01-18 | 1982-01-18 | Character recognizing system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP57004922A JPS58123171A (en) | 1982-01-18 | 1982-01-18 | Character recognizing system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS58123171A JPS58123171A (en) | 1983-07-22 |
| JPH0147829B2 true JPH0147829B2 (en) | 1989-10-17 |
Family
ID=11597099
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP57004922A Granted JPS58123171A (en) | 1982-01-18 | 1982-01-18 | Character recognizing system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS58123171A (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0799534B2 (en) * | 1987-03-18 | 1995-10-25 | 沖電気工業株式会社 | Character figure recognition method |
| JPH0799535B2 (en) * | 1987-03-24 | 1995-10-25 | 沖電気工業株式会社 | Character figure recognition method |
| JPH0799536B2 (en) * | 1987-03-26 | 1995-10-25 | 沖電気工業株式会社 | Character figure recognition method |
| JPH0337557U (en) * | 1989-08-25 | 1991-04-11 |
-
1982
- 1982-01-18 JP JP57004922A patent/JPS58123171A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS58123171A (en) | 1983-07-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH0147835B2 (en) | ||
| JPH0147831B2 (en) | ||
| JPS58123171A (en) | Character recognizing system | |
| JP2616994B2 (en) | Feature extraction device | |
| JPH0656625B2 (en) | Feature extraction method | |
| JP3661774B2 (en) | Character string recognition method, character recognition device and program | |
| JP2749947B2 (en) | Character recognition method | |
| JPH0147830B2 (en) | ||
| JPH0147833B2 (en) | ||
| JPS63234372A (en) | Feature extracting system | |
| JPH0547871B2 (en) | ||
| JPH0147832B2 (en) | ||
| JPH0412512B2 (en) | ||
| JPH0147834B2 (en) | ||
| JPS63238685A (en) | Character pattern recognizing system | |
| JPH0412511B2 (en) | ||
| JPS6047635B2 (en) | Character recognition method | |
| JPH02287894A (en) | Character recognizing device | |
| JP2980636B2 (en) | Character recognition device | |
| JPS60181884A (en) | Character discriminating system | |
| JPS63234374A (en) | Character graphic recognizing system | |
| JPH0646418B2 (en) | Feature extraction method | |
| JPH04590A (en) | Method for character recognition | |
| JPH04148488A (en) | Character recognizing device | |
| JPH0799534B2 (en) | Character figure recognition method |