JPH03276380A - Character recognizing device - Google Patents
Character recognizing deviceInfo
- Publication number
- JPH03276380A JPH03276380A JP2077770A JP7777090A JPH03276380A JP H03276380 A JPH03276380 A JP H03276380A JP 2077770 A JP2077770 A JP 2077770A JP 7777090 A JP7777090 A JP 7777090A JP H03276380 A JPH03276380 A JP H03276380A
- Authority
- JP
- Japan
- Prior art keywords
- character
- pattern
- line width
- line
- character pattern
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000010606 normalization Methods 0.000 claims abstract description 40
- 230000008719 thickening Effects 0.000 claims abstract description 9
- 238000000034 method Methods 0.000 claims description 44
- 238000001514 detection method Methods 0.000 claims description 13
- 238000006243 chemical reaction Methods 0.000 claims description 9
- 230000008034 disappearance Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 10
- 230000003287 optical effect Effects 0.000 description 2
- FFBHFFJDDLITSX-UHFFFAOYSA-N benzyl N-[2-hydroxy-4-(3-oxomorpholin-4-yl)phenyl]carbamate Chemical compound OC1=C(NC(=O)OCC2=CC=CC=C2)C=CC(=C1)N1CCOCC1=O FFBHFFJDDLITSX-UHFFFAOYSA-N 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000006870 function Effects 0.000 description 1
Landscapes
- Character Input (AREA)
Abstract
Description
【発明の詳細な説明】 (産業上の利用分野) この発明は文字認識装置に関する。[Detailed description of the invention] (Industrial application field) The present invention relates to a character recognition device.
(従来の技術)
新聞、書籍、雑誌等の一般印刷文書では、本文の文字サ
イズと、見出し又は表題の文字サイズとが大きく異なる
。これら文字サイズの異なる文字の認識を同−製雪によ
り従って同一の認識方法及び回路を用いて行なうために
は、文字パタンの大きざを正規化する必要がある。(Prior Art) In general printed documents such as newspapers, books, and magazines, the font size of the main text and the font size of headings or titles are significantly different. In order to recognize these characters of different sizes using the same recognition method and circuit, it is necessary to normalize the size of the character pattern.
正規化の一方法として、文字サイズか基準値より大きい
場合に文字パタンを単純に間引く方法がある。この方法
はもとの文字パタンを1/2.1/3.1/4等の正規
化定数倍に縮少したパタンに変換するもので、文字認識
装置の処理速度を早くしまたハードウェアの規模を小さ
くすることかできる。One method of normalization is to simply thin out character patterns when the character size is larger than a standard value. This method converts the original character pattern into a pattern that is reduced by a normalization constant such as 1/2.1/3.1/4, etc., increasing the processing speed of the character recognition device and reducing the hardware cost. It is possible to reduce the scale.
(発明か解決しようとする課題)
しかしながら、一般の印刷文書では明朝体を主たる字体
としまた本文の文字サイズを約3mm及び見出しや表題
の文字サイズをほぼ12mm以上とすることか多い。(Problem to be Solved by the Invention) However, in general printed documents, the main font is Mincho, and the font size of the main text is approximately 3 mm, and the font size of headings and titles is often approximately 12 mm or more.
文字サイズ3mmの文字パタンを格納する正規化パタン
メモリには通常64X64画素或は128X128画素
の容量を有するものを用いるか、文字サイズの異なる文
字を同一の認識方法及び回路で認識するには、大きな文
字サイズ12mmの文字パタンを1/4に圧縮(正規化
)して正規化パタンメモリに格納しなければならない。A normalized pattern memory that stores character patterns with a character size of 3 mm usually has a capacity of 64 x 64 pixels or 128 x 128 pixels, or a large A character pattern with a character size of 12 mm must be compressed (normalized) to 1/4 and stored in a normalized pattern memory.
一方、文字サイズ12mmの明朝体文字の水平ストロー
クの線幅は0.3mm程度であり、この文字の画像パタ
ンを一般に用いられる解像度300clpiのスキャナ
ーにより得た場合、水平ストロークの線幅は3画素とな
り、従って文字サイズ12mmの明朝体文字のパタンを
単純に1/4に間引くと、水平ストロークが欠落するこ
とがある。また見出しや表題にはゴシック体、特別にデ
ザインした字体等の極端に線幅の太い文字を使用するこ
とも多いか、一般に文字線が太くなるに応じて文字線間
のす白は狭くなる傾向があり、従って極端に線幅か太く
なると文字線間の空白の幅が狭くなりすぎて空白かつぶ
れることもある。On the other hand, the line width of the horizontal stroke of a Mincho typeface character with a character size of 12 mm is approximately 0.3 mm, and when the image pattern of this character is obtained using a commonly used scanner with a resolution of 300 clpi, the line width of the horizontal stroke is 3 pixels. Therefore, if the pattern of a Mincho font with a character size of 12 mm is simply thinned out to 1/4, horizontal strokes may be missing. In addition, headings and titles often use characters with extremely thick lines, such as Gothic fonts or specially designed fonts, or in general, as the character lines become thicker, the spaces between the character lines tend to become narrower. Therefore, if the line width becomes extremely thick, the space between the character lines may become too narrow, causing the space to collapse.
これらの点につき、図%9照しより詳細に説明する。第
5図は水平ストローク欠落の説明に供する図であり、第
5図(A)は明朝体文字の一例を、また第5図CB)は
第5図(A)の−点鎖線丸で囲んだ部分の水平ストロー
クであって線幅3画素の水平ストロークの例を拡大して
示す。These points will be explained in more detail with reference to Figure 9. Figure 5 is a diagram used to explain missing horizontal strokes. Figure 5 (A) shows an example of Mincho typeface characters, and Figure 5 (CB) shows the circle surrounded by the - dotted chain line in Figure 5 (A). An example of a horizontal stroke with a line width of 3 pixels is shown enlarged.
第5図(B)においてスキャナ読取り時の画素位8%点
線の格子点で及び1/4に間引きした時の画素位置を直
線の格子点で表し、さらに白黒2値に量子化された文字
パタンの黒画素(文字線部)を黒丸印を付した格子点で
及び白画素(文字背景部)を無印の格子点て表す。正規
化前の文字パタンを格納するパタンメモリ上にはスキャ
ナの土走査位Wを表すX軸及びスキャナの副走査位曹を
表すY軸を設定しており、X軸及びY軸に平行な点線T
x及びTvを交差させてスキャナの読取り画素位置に対
応する位置に点線の格子点を設定しでいる。In Fig. 5(B), the pixel position when read by the scanner is represented by 8% dotted line grid points, and the pixel position when thinned out to 1/4 is represented by straight line grid points, and the character pattern is further quantized into black and white binary. The black pixels (character line part) are represented by grid points with black circles, and the white pixels (character background part) are represented by unmarked grid points. On the pattern memory that stores character patterns before normalization, an X-axis representing the scanner's scanning position W and a Y-axis representing the scanner's sub-scanning position are set, and dotted lines parallel to the X- and Y-axes are set. T
Dotted grid points are set at positions where x and Tv intersect and correspond to pixel positions read by the scanner.
単純に1/4に間引きを行なう場合、パタン上に設定し
たX−Y座標系の原点がら数えて4本目毎の点線Tx及
びTV¥!、英綴Jx及びJVとしで選択し、これら英
綴の格子点に存在する白画素或は黒画素をそのまま間引
きにより正規化した文字パタンの画素として採用する。When simply thinning out to 1/4, every fourth dotted line Tx and TV\! counting from the origin of the X-Y coordinate system set on the pattern. , Jx, and JV are selected, and the white pixels or black pixels existing at the grid points of these English spellings are directly adopted as pixels of the character pattern normalized by thinning.
従って第5図(B)に示すように、線幅3画素の水平ス
トロークが11g5接する直線Jx間に位置する場合、
間引き後の文字パタンには線幅3画素の水平ストローク
に対応する黒画素が残らず、この結果、水平ストローク
は欠落する。Therefore, as shown in FIG. 5(B), when a horizontal stroke with a line width of 3 pixels is located between straight lines Jx that are in contact with 11g5,
There are no black pixels left in the character pattern after thinning that correspond to a horizontal stroke with a line width of 3 pixels, and as a result, the horizontal stroke is missing.
第6図は文字間の空白のつぶれの説明に供する図であり
、第6図(A)はゴシック体文字の一例を、また第6図
(B)は第6図(A)の矢印で指し示した部分の文字線
間の空白であって幅3画素の空白の例を拡大して示す。Figure 6 is a diagram used to explain the collapse of spaces between characters. Figure 6 (A) shows an example of Gothic characters, and Figure 6 (B) shows the arrows in Figure 6 (A). An example of a blank space between character lines in a portion with a width of 3 pixels is shown enlarged.
第6図CB)においで第5図(B)に示す構成成分と同
様の構成成分については同一の符号を付してその詳細な
説明を省略する。In FIG. 6(CB), the same components as those shown in FIG. 5(B) are given the same reference numerals, and detailed explanation thereof will be omitted.
第6図(8)tこ示すよう1こ、幅3画素の空白が隣接
するM線Jx間に位置する場合、間引き後の文字パタン
には@3画素の空白(こ対応する白点が残らず、この結
果、文字線間の空白はつぶれる。Figure 6 (8) If a blank space of 1 pixel width and 3 pixels width is located between adjacent M lines Jx as shown in Fig. As a result, the spaces between character lines are collapsed.
このように文字パタンを単純に間引いで正規化すると、
文字サイズの大きな文字パタンの線幅か細い場合や太い
場合に正規化後の文字パタンにおいて文字線か欠落した
つ文字線間の空白がつぶれたりすることかあるため、文
字認識の誤読やりジェクト(認識不能)が増加し認識精
度が悪くなる。If you normalize the character pattern by simply thinning it out in this way,
If the line width of a character pattern with a large character size is thin or thick, character lines may be missing or the spaces between character lines may be collapsed in the character pattern after normalization. impossibility) increases and recognition accuracy deteriorates.
この発明の目的は上述した従来の問題点を解決するため
、正規化による文字線の欠落や空白のつぶれをなくす或
は減少させるようにした文字認識装Hを提供することに
ある。SUMMARY OF THE INVENTION An object of the present invention is to provide a character recognition device H that eliminates or reduces missing character lines and collapsed spaces due to normalization, in order to solve the above-mentioned conventional problems.
(課題を解決するための手段)
この目的の達成を図るため、この発明の文字認識装雪は
、文字媒体の量子化された画像データから一文字単位に
文字パタンを切出す文字切出し部と、各文字パタン毎に
文字外接枠を検出し、文字外接枠の位置から文字パタン
の文字サイズを求める文字枠検出部と、文字サイズに応
じた正規化定数を設定する正蜆化定数決定部と、正規化
定数に基づいて文字パタンを正規化する正規化部と、正
規化された文字パタンの認識を行なう認識部とを備えで
成る文字認識装置において、文字パタンの線幅を検出す
る線幅検出部と、線幅が第一の所定幅以下となる文字パ
タンの文字線を太くする!−の処理、及び、線幅が第二
の所定幅以上となる文字パタンの文字線を細くする第二
の処理の双方又はいずれか一方の処理を行なう線幅変換
部とを備えで成ることを特徴とする。(Means for Solving the Problem) In order to achieve this object, the character recognition system of the present invention includes a character cutting section that cuts out a character pattern for each character from quantized image data of a character medium; A character frame detection unit that detects a character circumscribing frame for each character pattern and determines the character size of the character pattern from the position of the character circumscribing frame, a normalization constant determination unit that sets a normalization constant according to the character size, A line width detection unit that detects the line width of a character pattern in a character recognition device comprising a normalization unit that normalizes a character pattern based on a constant and a recognition unit that recognizes the normalized character pattern. , thicken the character lines of character patterns whose line width is less than or equal to the first predetermined width! - a line width conversion unit that performs both or one of the processing of - and the second processing of thinning character lines of a character pattern whose line width is equal to or greater than a second predetermined width. Features.
(作用)
このような構成によれば、文字パタンの線幅を検出し、
線幅が第一の所定幅以下となる文字パタンの文字線を太
くする第一の処理、及び又は、線幅が第二の所定幅以上
となる文字パタンの線幅を細くする第二の処理を行なう
。(Function) According to such a configuration, the line width of the character pattern is detected,
A first process of thickening the character lines of a character pattern whose line width is less than or equal to a first predetermined width, and/or a second process of thinning the line width of a character pattern whose line width is greater than or equal to a second predetermined width. Do the following.
線幅が第一の所定幅以下となる文字パタンを検出した場
合この文字パタンは正規化後に欠落するおそれのある細
い文字線を有するので、このような文字線を太めること
によって正規化後に文字線か欠落するのを防止する。If a character pattern is detected whose line width is less than or equal to the first predetermined width, this character pattern has thin character lines that may be missing after normalization. Prevent lines from missing.
また線幅か第二の所定幅以上となる文字パタンを検出し
た場合この文字パタンは正規化後につぶれるおそれのあ
る文字線間空白を有するので、文字線を細めることによ
って文字線間空白の幅を広くし正規化後に文字線間空白
がつぶれるのを防止する。In addition, if a character pattern whose line width is equal to or larger than the second predetermined width is detected, this character pattern has spaces between character lines that may be collapsed after normalization, so the width of the spaces between character lines can be reduced by narrowing the character lines. Make it wider to prevent spaces between character lines from being collapsed after normalization.
従って第一の処理及び又は第二の処理を行なうことによ
って、文字線の欠落及び又は空白のつぶれが正規化によ
り生じるのをなくし或は減少させることができる。Therefore, by performing the first process and/or the second process, it is possible to eliminate or reduce the occurrence of missing character lines and/or collapsed spaces due to normalization.
(実施例)
以下、図面%9照し、この発明の実施例につき説明する
。(Examples) Examples of the present invention will be described below with reference to the drawings.
第1図はこの発明の詳細な説明に供する機能ブロック図
である。同図にも示すように、この実施例の文字認識装
置は、文字媒体の量子化された画像データから一文字単
位に文字パタンを切出す文字切出し部10と、各文字パ
タン毎に文字外接枠泡検出し、文字外接枠の位置から文
字パタンの文字サイズを求める文字枠検出部12と、文
字サイズに応じた正規化定数を設定するユ規化定数決定
部14と、正規化定数に基づいて文字パタンを正規化す
る正規化部16と、正規化された文字パタンの認識を行
なう認識部18とを備え、ざらに文字パタンの線幅を検
出する線幅検出部20と、線幅が第一の所定幅以下とな
る文字パタンの文字線を太くする第一の処理、及び、線
幅が第二の所定幅以上となる文字パタンの文字線を細く
する第二の処理の双方の処理を行なう線幅変換部22と
を備えて成る。FIG. 1 is a functional block diagram for explaining the invention in detail. As shown in the figure, the character recognition device of this embodiment includes a character cutting section 10 that cuts out character patterns character by character from quantized image data of a character medium, and a character circumscribing frame bubble for each character pattern. A character frame detection unit 12 detects the character size of a character pattern from the position of a character circumscribing frame, a normalization constant determination unit 14 sets a normalization constant according to the character size, and a It includes a normalization section 16 that normalizes a pattern, a recognition section 18 that recognizes a normalized character pattern, a line width detection section 20 that roughly detects the line width of the character pattern, and a line width detection section 20 that roughly detects the line width of the character pattern. A first process of thickening the character lines of a character pattern whose line width is equal to or larger than a second predetermined width is performed, and a second process of thinning the character lines of a character pattern whose line width is equal to or greater than a second predetermined width. The line width conversion section 22 is also provided.
尚、第1図において24及び26は光電変換部及びパタ
ンレジスタを示す。In FIG. 1, 24 and 26 indicate a photoelectric conversion section and a pattern register.
以下、より詳細にこの実施例につき説明する。This embodiment will be explained in more detail below.
光電変換部24は処理対象となる帳票を光学的に走査し
て帳票からの光信号LV大入力、光信号りを光電変換し
て電気信号の画像データを得、画像データを例えば白黒
2値に量子化する。The photoelectric conversion unit 24 optically scans the form to be processed, receives a large optical signal LV from the form, photoelectrically converts the optical signal to obtain electrical signal image data, and converts the image data into, for example, black and white binary. Quantize.
文字切出部10は図示しない画像メモリに光電変換部2
4からの画像データを保存し、この画像データを走査し
て画像データから一文字単位に文字パタンを切出し、切
出した文字パタンをパタンレジスタ26に保存する。The character cutting section 10 is connected to a photoelectric conversion section 2 in an image memory (not shown).
The image data from No. 4 is saved, the image data is scanned, character patterns are cut out character by character from the image data, and the cut out character patterns are stored in a pattern register 26.
文字枠検出部12はパタンレジスタ26の文字パタンを
走査して当該パタンの文字外接枠を検出する。パタンレ
ジスタ26上にはX−Y座標系を設定しでおり、この座
標系で表される文字外接枠の上端、下端、左端及び右端
位置Y丁、Y8、X、及びXRを検出する。上端、下端
位置Y工、Y、はY軸方向における文字外接枠の始端、
終端位Nを、また左端、右端位置XL、Xllはx軸方
向における文字外接枠の始端、終端位Mを表すものであ
り、文字枠検出部12は上端、下端位置YアsYBから
文字パタンの高さを算出し、さらに左端、右端位置XL
、XRから文字パタンの幅を算出する。The character frame detection unit 12 scans the character pattern in the pattern register 26 and detects the character circumscribing frame of the pattern. An X-Y coordinate system is set on the pattern register 26, and the upper, lower, left, and right end positions of the character circumscribing frame represented by this coordinate system are detected. Upper and lower end positions Y, Y, are the starting ends of the character circumscribing frame in the Y-axis direction,
The end position N, and the left and right end positions XL and Xll represent the start and end positions M of the character circumscribing frame in the x-axis direction, and the character frame detection unit 12 detects the character pattern from the top and bottom positions Y as YB. Calculate the height and further left end and right end positions XL
, XR to calculate the width of the character pattern.
正規化定数決定部14は各文字毎に文字パタンの高さ及
び幅から正規化定数を決定する。ここでパタンレジスタ
26に格納された文字パタンを着目文字パタンと称する
とすれば、まず、着目文字パタンの高さ及び幅のうち値
が大きい方を当該パタンの文字サイズSとして検出する
。ここで処理対象となる帳票において文字サイズの最小
値が例えば3mmであることが予めわかっているものと
すれば、例えば、3≦S<6のときN=1.6≦S<9
のときN=1/2.9≦S〈12のときN=1/3、・
・・以下3n≦S<3(n+1)のときN=i/n(n
は自然数)となるように3mm単位に文字サイズSを分
類し、その分類に応じた正規化定数In着目文字パタン
に付与する。The normalization constant determining unit 14 determines a normalization constant for each character from the height and width of the character pattern. If the character pattern stored in the pattern register 26 is referred to as a character pattern of interest, first, the larger value of the height and width of the character pattern of interest is detected as the character size S of the pattern. Assuming that it is known in advance that the minimum character size of the form to be processed is, for example, 3 mm, for example, when 3≦S<6, N=1.6≦S<9
When N=1/2.9≦S〈12, N=1/3,・
...When 3n≦S<3(n+1), N=i/n(n
is a natural number), and a normalization constant In corresponding to the classification is given to the character pattern of interest.
解像度300dpiのスキャナにより画像データを得た
場合、着目文字パタンの文字サイズが3mmであれば当
該文字パタンの大きさは35X35画素程度、また文字
サイズが6mmであれ(ざ文字パタンの大きざは70X
70画素程度となり、従ってこの場合に上述のように正
規化定数Nを付与するようにすれば、文字パタンの大き
ざを文字サイズに関わりなく35x35〜70X70画
素の大きざに正規化することができ従って正規化後の文
字パタンを格納するパタンメモリの容量!128x12
8画素以内とすることかできる。When image data is obtained using a scanner with a resolution of 300 dpi, if the character size of the character pattern of interest is 3 mm, the size of the character pattern is about 35 x 35 pixels, and if the character size is 6 mm (the size of the character pattern is 70 x
Therefore, if the normalization constant N is assigned as described above in this case, the size of the character pattern can be normalized to 35x35 to 70x70 pixels regardless of the character size. Therefore, the capacity of pattern memory to store character patterns after normalization! 128x12
It can be within 8 pixels.
線幅検出部2oはパタンレジスタ26の着目文字パタン
を走査し当該パタンの線幅を算出する。The line width detection unit 2o scans the character pattern of interest in the pattern register 26 and calculates the line width of the pattern.
線幅の算出を従来周知の任意好適な方法により行なって
よいがこの寅施例では、例えば、線幅検出部2oを従来
周知のフィルタ回路と同様のシフトレジスタ構成となし
、次式(1)に示す近似式に従って線幅Wを算出するよ
うにする。Although the calculation of the line width may be performed by any conventionally known suitable method, in this embodiment, for example, the line width detector 2o has a shift register configuration similar to a conventionally known filter circuit, and the following equation (1) is used. The line width W is calculated according to the approximate formula shown below.
(1)式においてQは2×2の窓の全ての点か黒画素と
なった総回数、Aは文字パタン中の黒画素総個数であり
、線幅検出部2oは2X2の窓の全ての点が黒画素とな
る回数及び文字パタン中の黒画素の個数を計数して総回
数へ及び総個数Qを求め、(1)式に従って線幅WIF
r算出する。In equation (1), Q is the total number of times that all points in the 2×2 window became black pixels, A is the total number of black pixels in the character pattern, and the line width detection unit 2o detects all the points in the 2×2 window. Count the number of times a point becomes a black pixel and the number of black pixels in the character pattern to calculate the total number of times and the total number Q, and calculate the line width WIF according to formula (1).
Calculate r.
この寅施例の線幅変換部22は、太め処理部28、細め
処理部30、データ切換部32及び処理選択部34から
成る。The line width conversion section 22 of this embodiment includes a thickening processing section 28, a thinning processing section 30, a data switching section 32, and a processing selection section 34.
処理選択部34は線幅W及び正規化定数Nに基づき、パ
タンレジスタ26の着目文字パタンに関し、着目文字パ
タン、着目文字パタンの線幅を第一の処理により太めて
得た文字パタン(以下、太めパタン〕、及び着目文字パ
タンの線幅を第二の処理により細めて得た文字パタン(
以下、細めパタン)のうちいずれを文字認識に用いるパ
タンとするかを決定する。Based on the line width W and the normalization constant N, the processing selection unit 34 selects a character pattern of interest, a character pattern obtained by thickening the line width of the character pattern of interest by the first process (hereinafter referred to as thick pattern], and a character pattern obtained by narrowing the line width of the character pattern of interest by the second process (
Hereinafter, it is determined which of the narrow patterns) is to be used for character recognition.
このため処理選択部34は、まず、第一の処理を実行す
る場合の処理実行回数MCNT及び第二の処理を実行す
る場合の処理実行回数NCNTを算出する。For this reason, the process selection unit 34 first calculates the number of times MCNT of process executions when executing the first process and the number of process executions NCNT when executing the second process.
第一の処理を1回行なうと線幅がMuPだけ増加し、第
一の処理をMCN7回繰返して太めた結果、第一の所定
幅C,(例えばC,=3)の線幅が得られたとすれば所
定幅C1は次式(1)のように表せる。When the first process is performed once, the line width increases by MuP, and as a result of repeating the first process MCN 7 times to increase the thickness, a line width of the first predetermined width C, (for example, C, = 3) is obtained. Then, the predetermined width C1 can be expressed as shown in the following equation (1).
C+ = N * (MCN T * Mup+W)・
・・・・・(1)線幅の増分M u pの設定値は、例
えば、文字線の縁にVa接する白点を全て黒点に盲き換
える場合にはMu、=2とし、文字線の上側縁及び右側
縁に隣接する白点を黒点に置き換える場合或は文字線の
上側縁及び左側縁にw4接する白点を黒点に置き換える
場合にはMup”1とすればよい。C+ = N * (MCN T * Mup+W)・
...(1) The setting value of the line width increment M u p is, for example, when all the white points touching the edge of the character line Va are to be replaced with black points, Mu = 2, and the setting value of the line width increment Mu When replacing the white points adjacent to the upper and right edges with black points, or when replacing the white points adjacent to the upper and left edges of the character line w4 with black points, Mup"1 may be used.
(1)式より次式(2)を得る。The following equation (2) is obtained from equation (1).
M CN T f、t 0以上の整数であって、(2)
式に従って算出したMCNTが負の値のときはMCNT
=Oとする。また、算出したMCNTが整数でない場合
には例えば小数点以下を切り上げ、切り捨て或は四捨五
入することにより、算出したMCNTを整数化するが、
好ましくは、(1)式の右辺が所定幅C1よりも大きく
なる最小の整数!MCNTとするのがよい。M CN T f,t is an integer greater than or equal to 0, (2)
If MCNT calculated according to the formula is a negative value, MCNT
=O. In addition, if the calculated MCNT is not an integer, the calculated MCNT is converted into an integer by, for example, rounding up, rounding down, or rounding off the decimal point.
Preferably, the right side of equation (1) is the smallest integer that is larger than the predetermined width C1! It is better to use MCNT.
また第二の処理を1回行なうと線幅かM。、た゛け減少
し、第二の処理をNCN7回繰返しで細めた結果、第二
の所定幅C2(例えばc2=3)の線幅が得られたとす
れば所定幅C2は次式(3)のように表せる。Also, if you perform the second process once, the line width will be M. , and as a result of thinning the second process by repeating the NCN seven times, if a line width of the second predetermined width C2 (for example, c2=3) is obtained, the predetermined width C2 is calculated as shown in the following equation (3) It can be expressed as
C2=N* (W−NCNT*Mo5)−−(3)線幅
の減分M。Nの設定値は、例えば、文字線の縁にllI
接する白点を全て黒点に置き換える場合にはM、、=2
とし、文字線の下側縁及び右側縁に隣接する白点を黒点
に置き換える場合或は文字線の上側縁及び左側縁にw4
接する白点を黒点に貫き換える場合にはM。、=1とす
ればよい。C2=N*(W-NCNT*Mo5)--(3) Decrement M of line width. The setting value of N is, for example, llI on the edge of the character line.
When replacing all touching white points with black points, M, , = 2
If you want to replace the white dots adjacent to the lower and right edges of the character line with black dots, or add w4 to the upper and left edges of the character line.
M to change the touching white point to a black point. ,=1.
(3)式より次式(4)を得る。The following equation (4) is obtained from equation (3).
NCNTは0以上の整数であって、(4)式に従って算
出したNCNTが負の値のときはNCNT=○とする。NCNT is an integer greater than or equal to 0, and when NCNT calculated according to equation (4) is a negative value, NCNT=◯.
また、算出したNCNTが整数でない場合には例えば小
数点以下を切り上げ、切り捨で或は四捨五入することに
より、算出したNCNTを整数化するか、好ましくは、
(3)式の右辺か所定幅C2よりも小ざくなる最大の整
数VNC:NTとするのがよい。In addition, if the calculated NCNT is not an integer, the calculated NCNT is converted into an integer by rounding up, rounding down, or rounding off to the nearest whole number, or preferably,
It is preferable to set the maximum integer VNC:NT that is smaller than the right side of equation (3) or the predetermined width C2.
上述のようにして求めた処理回数MCNT及びNCNT
が共に0である場合とMCNT及びNCNTが共に0で
ない場合には、処理選択部34はパタンレジスタ26の
着目文字パタンを文字認識に用いることを表す第一の指
示信号を出力する。Processing counts MCNT and NCNT obtained as described above
are both 0, and when both MCNT and NCNT are not 0, the processing selection unit 34 outputs a first instruction signal indicating that the character pattern of interest in the pattern register 26 is to be used for character recognition.
処理回数MCNT≠0かつNCNT=Oのとき着目パタ
ンの線幅は第一の所定幅C7以下であることを表すので
、処理選択部34は第一の処理で線幅を太めた太めパタ
ンを文字認識に用いることを表す第二の指示信号を出力
する。When the number of processes MCNT≠0 and NCNT=O indicates that the line width of the pattern of interest is less than or equal to the first predetermined width C7, the process selection unit 34 selects a thick pattern whose line width is thickened in the first process as a character. A second instruction signal representing use for recognition is output.
ざらに処理回数NCNT≠0かつMCNT=○のときは
着目パタンの線幅は第二の所定幅C2以下であることを
表すので、第二の処理で線幅を細めた細めパタンを文字
認識に用いることを表す第三の指示信号を出力する。When the rough processing number NCNT≠0 and MCNT=○, it means that the line width of the pattern of interest is less than or equal to the second predetermined width C2, so the narrow pattern whose line width is narrowed in the second process is used for character recognition. A third instruction signal indicating use is output.
太め処理部28は処理選択部34から第二の指示信号を
入力すると着目文字パタンの文字線を太める処理を行な
う。この実施例の太め処理部28は従来周知のフィルタ
構成と同様にシフトレジスタレジスタ構成を有し、例え
ば3×3の窓を用いて文字Saミラめる第一の処理を行
なう。When the thickening processing section 28 receives the second instruction signal from the processing selection section 34, it performs a process of thickening the character lines of the character pattern of interest. The thick processing section 28 of this embodiment has a shift register configuration similar to a conventionally well-known filter configuration, and performs the first process of mirroring the character Sa using, for example, a 3.times.3 window.
第2図は3X3の窓を示す図、第3図(A)及び(B)
は第一の処理前の文字線及び第一の処理後の文字線を示
す図である。第3図(A)は所定幅C1以下の線幅Wを
有する文字線(垂直ストローク)とこの文字線の縁に隣
接する白画素の全部とを示し、第3図(B)は第3図(
A)に示す文字線を第一の処理によって大めで得た文字
線を示す、これら第3図においで白丸は白画素を、黒丸
は黒画素を及び丸のなかに点を付した白丸は白画素から
黒画素に変更された画素を表す。Figure 2 shows a 3x3 window, Figure 3 (A) and (B)
FIG. 2 is a diagram showing a character line before the first process and a character line after the first process. FIG. 3(A) shows a character line (vertical stroke) having a line width W less than a predetermined width C1 and all white pixels adjacent to the edge of this character line, and FIG. 3(B) shows (
Figure 3 shows the character lines obtained by enlarging the character lines shown in A) in the first process. In these figures, white circles represent white pixels, black circles represent black pixels, and white circles with dots inside the circles represent white. Represents a pixel that has been changed from a pixel to a black pixel.
太め処理部28は、3x3の窓(第2図参照)の着目画
素aSが白画素で周囲の画素a、〜a6のいずれかの画
素が黒画素のとき着目画素a9を黒画素に変更し、所定
幅C1以下の文字線の締にwA接する白画素を全て黒画
素とし、線幅を2増加させる(第3図(A)及び(B)
?照)。The thick processing unit 28 changes the pixel of interest a9 to a black pixel when the pixel of interest aS in the 3x3 window (see FIG. 2) is a white pixel and any of the surrounding pixels a, to a6 is a black pixel, All white pixels that are in contact wA with the edge of a character line with a predetermined width C1 or less are made black pixels, and the line width is increased by 2 (Fig. 3 (A) and (B)
? (see).
細め処理部30は処理選択部34から第三の指示信号を
入力すると着目文字パタンの文字線を細める処理を行な
う。この実施例の細め処理部30は従来周知のフィルタ
構成と同様にシフトレジスタレジスタ構成を有し、例え
ば3×3の窓を用いて文字線を細める第二の処理を行な
う。When the narrowing processing section 30 receives the third instruction signal from the processing selection section 34, it performs a process of narrowing the character lines of the character pattern of interest. The thinning processing section 30 of this embodiment has a shift register structure similar to a conventionally known filter structure, and performs a second process of thinning a character line using, for example, a 3.times.3 window.
第4図(A)及び(8)は第二の処理前の文字線及び第
二の処理後の文字線を示す図である。第4図(A)は所
定幅C2以下の線幅Wを有する文字線(垂直ストローク
)とこの文字線の縁にwA接する白画素の全部とを示し
、篤4図(B)は第4図(A)に示す文字線を第二の処
理1こよって細めて得た文字線を示す。これら第4図に
おいて白丸は白画素を、黒丸は黒画素を及び丸のなかに
×を付した白丸は黒画素から白画素に変更された画素を
表す。FIGS. 4(A) and 4(8) are diagrams showing character lines before the second process and character lines after the second process. Figure 4 (A) shows a character line (vertical stroke) having a line width W less than a predetermined width C2 and all of the white pixels that are in contact with the edge of this character line. The character line obtained by thinning the character line shown in (A) through the second process 1 is shown. In FIG. 4, white circles represent white pixels, black circles represent black pixels, and white circles with an x inside the circle represent pixels that have been changed from black pixels to white pixels.
細め処理部30は、3X3の息(第2図参照)の着目画
素a9が黒画素でしかも周囲の画素a〜a8を順次に走
査したときに白画素の次に黒画素が現れる回数H1と黒
画素の次に白画素が現れる回数H2とを計数しこれら計
数値の和H,+H2がH,+H2=2となるとき着目画
素ae%白画素に変更し、所定幅C2以上の文字線の縛
に位置する黒画素を全て白画素とし、線幅を2減少させ
る(第4図(A)及び(B)参照)。The narrowing processing unit 30 calculates the number H1 of the number of times a black pixel appears next to a white pixel when the target pixel a9 of 3×3 breath (see FIG. 2) is a black pixel, and the surrounding pixels a to a8 are sequentially scanned, and the black pixel is a black pixel. Count the number of times H2 that a white pixel appears next to a pixel, and when the sum of these counted values H,+H2 becomes H,+H2=2, change the pixel of interest ae% to a white pixel, and restrict character lines with a predetermined width C2 or more. All black pixels located at are made white pixels, and the line width is decreased by 2 (see FIGS. 4(A) and 4(B)).
データ切換部32は処理選択部34から第一の指示信号
を入力した場合にはパタンレジスタ26の着目文字パタ
ンを、第二の指示信号を入力した場合には太め処理部2
8により作成された太めパタンを、また第三の指示信号
を入力した場合fこは細め処理部30により作成された
細めパタンを入力し、入力したパタンを正規化部16へ
出力する。The data switching unit 32 selects the character pattern of interest from the pattern register 26 when the first instruction signal is input from the processing selection unit 34, and selects the target character pattern from the thick processing unit 2 when the second instruction signal is input.
When the third instruction signal is inputted, the thinning pattern created by the thinning processing section 30 is inputted, and the inputted pattern is outputted to the normalization section 16.
この実施例の正規化部16はデータ切換部32から入力
した着目文字パタン、大めパタン或は細めパタンに対し
従来と同様に間引き処理を行なってパタンを正規化する
ものであり、N=1のときはデータ切換部32から入力
したパタンをそのまま認識部18へ出力し、O<N<1
のときはデータ切換部32から入力したパタンをN倍に
縮小したパタンを認識部18へ出力する。以下、正規化
部]6が出力したパタンを正規化パタンと称する。The normalization unit 16 of this embodiment normalizes the pattern by thinning out the character pattern of interest, large pattern, or narrow pattern input from the data switching unit 32 in the same manner as in the past. In this case, the pattern input from the data switching section 32 is output as is to the recognition section 18, and O<N<1.
In this case, a pattern obtained by reducing the pattern inputted from the data switching section 32 by N times is output to the recognition section 18 . Hereinafter, the pattern output by the normalization unit 6 will be referred to as a normalized pattern.
認識部18は正規化パタンかう文字特徴を抽出し、文字
特徴を図示しない辞書と照合して文学誌mを行ない、こ
の認識結果として例えば文字コードを次段の装置へ出力
する。The recognition unit 18 extracts the character features according to the normalized pattern, compares the character features with a dictionary (not shown), performs literary journal m, and outputs, for example, a character code as the recognition result to the next stage device.
尚、第一の所定幅C7は太めパタンの正規化パタンにお
ける文字線の平均的な線幅を表し、この平均的な線幅が
どの程度の値のとき或はどの程度の数値範囲のとき正規
化パタンでのストローク欠落を実質的になくせるか予め
統計的に調べて、ストロークの欠落を実質的になくせる
任意好適な値に所定幅C7を設定する。同様に、第二の
所定幅C2は細めパタンの正規化パタンにおける文字線
の平均的な線幅を表し、この平均的な線幅がどの程度の
値のとき或はどの程度の数値!!囲のとき正規化パタン
での文字線間空白のつぶれを実質的になくせるか予め統
計的に調べて、空白のつぶれを実質的になくせる任意好
適な値に所定幅C2を設定する。The first predetermined width C7 represents the average line width of character lines in the normalized thick pattern, and when this average line width is a value or in what numerical range it is normalized. The predetermined width C7 is set to an arbitrary suitable value by statistically examining in advance whether or not missing strokes in the cursive pattern can be substantially eliminated. Similarly, the second predetermined width C2 represents the average line width of the character lines in the normalized pattern of the narrow pattern, and what value is this average line width? ! It is statistically investigated in advance whether it is possible to substantially eliminate the collapse of spaces between character lines in the normalized pattern in the case of a normalization pattern, and the predetermined width C2 is set to an arbitrary suitable value that can substantially eliminate the collapse of spaces.
この発明は上述した実施例にのみ限定されるものではな
く、従って各構成成分の動作、構成、処理の流れ、数値
的条件そのほかを任意好適に変更することができる。The present invention is not limited to the embodiments described above, and therefore, the operation, configuration, processing flow, numerical conditions, etc. of each component can be changed as desired.
上述した実施例では処理寅行回数MCNT及びNCNT
の数値に応じて着目文字パタン、太めパタン及び細めパ
タンのいずれを文字認識に用いるパタンとするかを判定
するようにしたが、このほか着目文字パタンの線幅Wそ
予め与えられた設定値と比較し、この比較結果に応じて
いずれのパタンとするか判定するようにしてもよい0例
えば、W<10であれば着目文字パタンに対し第一の処
理を2回繰返して得た太めパタンを文字認識に用いるパ
タンとし、20≦Wであれば着目文字パタンに対し第二
の処理を2回繰返しで得た細めパタン壱文字認識に用い
るパタンとし、1o≦W〈20であれば着目文字パタン
を文字認識に用いるパタンとすればよい。In the embodiment described above, the number of processing times MCNT and NCNT
It is determined which of the character pattern of interest, a thick pattern, or a thin pattern is to be used for character recognition according to the numerical value of .In addition, the line width W of the character pattern of interest For example, if W<10, a thicker pattern obtained by repeating the first process twice for the character pattern of interest may be used. If 20≦W, use the narrow pattern obtained by repeating the second process twice for the character pattern of interest.1) Use the pattern to be used for character recognition; if 1o≦W<20, use the pattern of the character of interest. may be used as a pattern for character recognition.
また上述した実施例では、正規化定数Nの容重に全て共
通の優の第一、第二の所定幅c1、C2を用いるように
したか、これら所定幅C,、C2の118正規化定数N
の値の大きざに応じて変化させるようにしてもよい。例
えば正規化定数N=1のときにはC,=C2=3、N=
1/2のときにはC+ =C2=4、N=1/3のとき
にはC,=C2=5、・・・・・・とすればよい。また
所定幅C1、C2の値は等しくても等しくなくともよい
。In addition, in the embodiment described above, the first and second predetermined widths c1 and C2, which are common to all the normalization constants N, are used, or the 118 normalization constants N of these predetermined widths C, C2 are used.
It may be changed depending on the size of the value of . For example, when the normalization constant N=1, C,=C2=3,N=
When N=1/2, C+=C2=4, and when N=1/3, C,=C2=5, . . . Further, the values of the predetermined widths C1 and C2 may or may not be equal.
線幅Wは上述した式(1)で定義される以外のl!J幅
を用いてもよいし、パタンの正規化にも間引き以外の従
来周知の方法を用いることができる。The line width W is l! other than that defined by the above equation (1). The J width may be used, and conventionally known methods other than thinning may be used to normalize the pattern.
(発明の効果)
上述した説明からも明らかなように、この発明の文字認
識装置によれば、線幅が第一の所定幅以下となる文字パ
タンの文字線を太くする第一の処理、及び又は、線幅が
第二の所定幅以上となる文字パタンの線幅を細くする第
二の処理を行なう。(Effects of the Invention) As is clear from the above description, according to the character recognition device of the present invention, the first process of thickening the character lines of the character pattern in which the line width is equal to or less than the first predetermined width; Alternatively, a second process of thinning the line width of a character pattern whose line width is equal to or greater than a second predetermined width is performed.
線幅が第一の所定幅以下となる文字パタンを検出した場
合この文字パタンは正規化後に欠落するおそれのある細
い文字線を有するので、このような文字線を太めること
によって正規化後に文字線が欠落するのを防止する。ま
た線幅が第二の所定幅以上となる文字パタンを検出した
場合この文字パタンは正規化後につぶれるおそれのある
文字線間空白を有するので、文字線を細めることによっ
て文字!!闇空白の幅を広くし正規化後に文字線間空白
がつぶれるのを防止する。If a character pattern is detected whose line width is less than or equal to the first predetermined width, this character pattern has thin character lines that may be missing after normalization. Prevent missing lines. Also, if a character pattern with a line width greater than or equal to the second predetermined width is detected, this character pattern has spaces between character lines that may be collapsed after normalization, so by narrowing the character lines, the character pattern can be changed. ! Widen the width of the dark space to prevent the space between character lines from being collapsed after normalization.
従って第一の処理及び又は第二の処理を行なうことによ
って、文字線の欠落及び又は空白のつぶれが正規化によ
り生じるのをなくし或は減少させることができる。Therefore, by performing the first process and/or the second process, it is possible to eliminate or reduce the occurrence of missing character lines and/or collapsed spaces due to normalization.
この結果、例えば文字サイズが大きくかつ線幅の細い文
字パタン壱文字線の欠落なく或はほとんど欠落させるこ
となく正規化し、また文字サイズが大きくかつ線幅の太
い文字パタンを文字量空白のつぶれなく或はほとんどつ
ぶれることなく正規化することができ、従って誤読や読
取不能を減少させて文字認識精度を高めることができる
。As a result, for example, a character pattern with a large character size and thin line width can be normalized without or with almost no character lines missing, and a character pattern with a large character size and thick line width can be normalized without collapsing the amount of character space. Alternatively, it is possible to normalize with almost no distortion, thereby reducing misreading and unreadability and improving character recognition accuracy.
第1図はこの発明の実施例の構成を概略的に示す機能ブ
ロック図、
第2図は3×3の窓を示す図、
第3図(A)〜(B)は第一の処理前後の文字線を示す
図、
第4図(A)〜(B)は第二の処理前後の文字線を示す
図、
第5図(A)〜(B)は水平ストローク欠落の説明に供
する図、
第6図(A)〜(B)は文字量空白のつぶれの説明に供
する図である。
1o・・・文字切出部、 12・・・文字枠検出部1
4−・・正規化定数決定部
16・・・正規化部、 18・・・認識部2o・・
・線幅検出部、 22・・・線幅変換部。Fig. 1 is a functional block diagram schematically showing the configuration of an embodiment of the present invention, Fig. 2 is a diagram showing a 3 x 3 window, and Figs. 3 (A) and (B) are before and after the first processing. Figures 4(A) and 4(B) are diagrams showing character lines before and after the second process; Figures 5(A) and 5(B) are diagrams illustrating missing horizontal strokes; FIGS. 6(A) and 6(B) are diagrams for explaining the collapse of character amount spaces. 1o...Character cutting section, 12...Character frame detection section 1
4--Normalization constant determining section 16... Normalization section 18... Recognition section 2o...
- Line width detection section, 22...Line width conversion section.
Claims (2)
位に文字パタンを切出す文字切出し部と、各文字パタン
毎に文字外接枠を検出し、該文字外接枠の位置から前記
文字パタンの文字サイズを求める文字枠検出部と、該文
字サイズに応じた正規化定数を設定する正規化定数決定
部と、該正規化定数に基づいて前記文字パタンを正規化
する正規化部と、正規化された文字パタンの認識を行な
う認識部とを備えて成る文字認識装置において、前記文
字パタンの線幅を検出する線幅検出部と、 前記線幅が第一の所定幅以下となる文字パタンの文字線
を太くする第一の処理、及び、前記線幅が第二の所定幅
以上となる文字パタンの文字線を細くする第二の処理の
双方又はいずれか一方の処理を行なう線幅変換部とを備
えて成ることを特徴とする文字認識装置。(1) A character cutting unit that cuts out a character pattern one character at a time from quantized image data of a character medium, and detects a character circumscribing frame for each character pattern, and detects the character circumscribing frame from the position of the character circumscribing frame. a character frame detection unit that determines the size; a normalization constant determination unit that sets a normalization constant according to the character size; a normalization unit that normalizes the character pattern based on the normalization constant; A character recognition device comprising: a recognition unit that recognizes a character pattern, the line width detection unit that detects the line width of the character pattern; and a character recognition unit that detects the line width of the character pattern; a line width conversion unit that performs both or either of a first process of thickening a line and a second process of thinning a character line of a character pattern in which the line width is equal to or larger than a second predetermined width; A character recognition device comprising:
化定数の値の大きさに応じて変化させて設定することを
特徴とする請求項1に記載の文字認識装置。(2) The character recognition device according to claim 1, wherein the line width conversion unit sets the first and second predetermined widths by changing them according to the magnitude of a value of a normalization constant.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2077770A JPH03276380A (en) | 1990-03-27 | 1990-03-27 | Character recognizing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2077770A JPH03276380A (en) | 1990-03-27 | 1990-03-27 | Character recognizing device |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH03276380A true JPH03276380A (en) | 1991-12-06 |
Family
ID=13643187
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2077770A Pending JPH03276380A (en) | 1990-03-27 | 1990-03-27 | Character recognizing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH03276380A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5896470A (en) * | 1993-07-16 | 1999-04-20 | Sharp Kabushiki Kaisha | Image processor providing improved readability of characters |
WO2010073409A1 (en) * | 2008-12-26 | 2010-07-01 | 富士通株式会社 | Image processing system, image processing device, and image processing method |
-
1990
- 1990-03-27 JP JP2077770A patent/JPH03276380A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5896470A (en) * | 1993-07-16 | 1999-04-20 | Sharp Kabushiki Kaisha | Image processor providing improved readability of characters |
WO2010073409A1 (en) * | 2008-12-26 | 2010-07-01 | 富士通株式会社 | Image processing system, image processing device, and image processing method |
JP5093364B2 (en) * | 2008-12-26 | 2012-12-12 | 富士通株式会社 | Image processing system, image processing apparatus, and image processing method |
US8339677B2 (en) | 2008-12-26 | 2012-12-25 | Fujitsu Limited | Image processing system, image processing apparatus, and image processing method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5579414A (en) | OCR image preprocessing method for image enhancement of scanned documents by reversing invert text | |
US7054485B2 (en) | Image processing method, apparatus and system | |
US8218875B2 (en) | Method and system for preprocessing an image for optical character recognition | |
EP2386985A2 (en) | Method and system for preprocessing an image for optical character recognition | |
EP0381773B1 (en) | Character recognition apparatus | |
US4556985A (en) | Pattern recognition apparatus | |
US5625710A (en) | Character recognition apparatus using modification of a characteristic quantity | |
US8229214B2 (en) | Image processing apparatus and image processing method | |
US7738737B2 (en) | Image processing apparatus and image processing method | |
JPH03276380A (en) | Character recognizing device | |
US6983071B2 (en) | Character segmentation device, character segmentation method used thereby, and program therefor | |
Kar et al. | A three-phase noise removal approach to achieve accuracy in line segmentation of Odia text | |
US5361309A (en) | Character recognition apparatus and method with low-resolution storage for character extraction | |
JP2747136B2 (en) | Character recognition device | |
JPH03214281A (en) | Character recognizing device | |
JP4079411B2 (en) | Image processing method, image processing apparatus, image processing program, and computer-readable storage medium storing image processing program | |
JPH05159062A (en) | Document recognition device | |
JP3196603B2 (en) | Barcode recognition method and system | |
JP2708604B2 (en) | Character recognition method | |
JP2582611B2 (en) | How to create a multi-font dictionary | |
JP2980636B2 (en) | Character recognition device | |
JP2888885B2 (en) | Character extraction device | |
JPH05174179A (en) | Document image processor | |
JPH11175659A (en) | Character recognizing device | |
JP2918363B2 (en) | Character classification method and character recognition device |