JPH0620093A - Character recognition device - Google Patents

Character recognition device

Info

Publication number
JPH0620093A
JPH0620093A JP4178294A JP17829492A JPH0620093A JP H0620093 A JPH0620093 A JP H0620093A JP 4178294 A JP4178294 A JP 4178294A JP 17829492 A JP17829492 A JP 17829492A JP H0620093 A JPH0620093 A JP H0620093A
Authority
JP
Japan
Prior art keywords
image data
inclination
memory
tilt
document
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP4178294A
Other languages
Japanese (ja)
Inventor
Shigeru Kafuku
滋 加福
Takeshi Matsuoka
毅 松岡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP4178294A priority Critical patent/JPH0620093A/en
Publication of JPH0620093A publication Critical patent/JPH0620093A/en
Pending legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)

Abstract

PURPOSE:To easily and quickly correct the inclination of image data obtained from a document. CONSTITUTION:Image data of the document inputted from an input part 1 is stored in a memory 2 as a two-dimensional matrix, and this image data stored in the memory 2 is stepwise read out in accordance with an angle thetaof inclination dependent upon values (a) and (b) read out from an angle table 3 by an inclination extracting part 4, and the sum of black points of each image data is obtained as an inclination value, and the inclination value which maximizes the sum of black points is given to an inclination correcting part 5, and thereby, the matrix of image data in the memory 2 is shifted to correct the inclination of image data.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、印刷文字などの認識に
用いられる文字認識装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a character recognition device used for recognizing printed characters and the like.

【0002】[0002]

【従来の技術】最近の文字認識技術の進歩は目覚ましい
ものがあり、各分野において広く用いられるようになっ
ている。
2. Description of the Related Art Recent advances in character recognition technology are remarkable and have been widely used in various fields.

【0003】ところで、印刷文書などの文字認識を行う
場合、例えば、光学式の文字読取り手段を用いて文字列
方向に各文字をイメージデータとして読取り、このイメ
ージデータを使用して各文字の認識を行うようにしてい
る。
When performing character recognition on a printed document, for example, each character is read as image data in the character string direction using an optical character reading means, and each character is recognized using this image data. I am trying to do it.

【0004】この場合、文字認識される印刷文書は、文
字読取り手段での読取り方向に対して文字列方向が一致
していることが、適性なイメージデータが得られ、正確
な文字認識を行う上で重要とされている。
In this case, it is necessary for the character document to have a proper character image data because the character string direction of the printed document is the same as the reading direction of the character reading means, so that accurate character recognition can be performed. Is considered important in.

【0005】ところが、実際は、文字読取り手段に対し
て文字認識を行う印刷文書などをセットする場合に、印
刷文書のセット状態が傾いたままでイメージデータの読
取りが行われることが多々あり、このままではイメージ
データに傾きが生じ、正確な文字認識ができないことが
あった。
However, in actuality, when setting a print document or the like for performing character recognition to the character reading means, image data is often read while the set state of the print document is tilted, and the image data is read as it is. In some cases, data was skewed and accurate character recognition was not possible.

【0006】そこで、従来では、イメージデータの傾き
を補正する方法が考えられているが、従来の傾き補正方
法は、三角関数などの数学的な手法を用いてイメージデ
ータの傾きを補正するものであるため、かかる傾き補正
のための計算量が膨大となり、処理に多大の時間がかか
っていた。
Therefore, conventionally, a method of correcting the inclination of the image data has been considered, but the conventional inclination correction method is to correct the inclination of the image data by using a mathematical method such as a trigonometric function. Therefore, the amount of calculation for such inclination correction becomes enormous, and the processing takes a lot of time.

【0007】[0007]

【発明が解決しようとする課題】このように、従来の三
角関数などの数学的な手法を用いイメージデータの傾き
補正では、補正のための計算量が膨大となり、その処理
に多大の時間がかかるという問題点があった。本発明
は、上記事情に鑑みてなされたもので、イメージデータ
の傾き補正を簡単にかつ高速に行うことができる文字認
識装置を提供することを目的とする。
As described above, in the correction of the inclination of the image data by using the conventional mathematical method such as the trigonometric function, the amount of calculation for the correction becomes enormous, and the processing takes a lot of time. There was a problem. The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a character recognition device that can easily and quickly correct inclination of image data.

【0008】[0008]

【課題を解決するための手段】本発明は、文書のイメー
ジデータを2次元配列で格納する記憶手段、この記憶手
段に格納された2次元配列のイメージデータをそれぞれ
設定される傾き角にしたがって階段的に読み出し各イメ
ージデータの黒点の和を傾斜値として求めるとともに該
黒点の和が最大になる傾斜値を出力する傾き抽出手段、
この傾き抽出手段より抽出される傾斜値に応じて前記メ
モリのイメージデータの配列をずらし該イメージデータ
の傾きを補正する傾き補正手段により構成されている。
SUMMARY OF THE INVENTION According to the present invention, storage means for storing image data of a document in a two-dimensional array, and stairs according to inclination angles set respectively for the two-dimensional array of image data stored in the storage means. And a gradient extracting means for reading out the sum of black points of each image data as a gradient value and outputting a gradient value at which the sum of the black points is maximum,
It is composed of a tilt correcting means for correcting the tilt of the image data by shifting the array of the image data in the memory according to the tilt value extracted by the tilt extracting means.

【0009】[0009]

【作用】この結果、本発明によれば2次元配列で格納さ
れたイメージデータをそれぞれ設定される傾き角にした
がって階段的に読み出されるとともに、各イメージデー
タの黒点の和が最大になる傾斜値が求められ、この傾斜
値によりイメージデータの配列をずらしその傾きを補正
するようにしている。これにより、三角関数などの数学
的な手法を用いることがなく傾きを補正を実現すること
ができるので、イメージデータの傾き補正のための計算
量を少なくでき、その処理時間も短縮することができ
る。
As a result, according to the present invention, the image data stored in the two-dimensional array is read out stepwise according to the inclination angles set, and the inclination value that maximizes the sum of the black points of each image data is obtained. The arrangement of the image data is shifted by the obtained inclination value and the inclination is corrected. As a result, the inclination can be corrected without using a mathematical method such as a trigonometric function, so that the amount of calculation for correcting the inclination of the image data can be reduced and the processing time can be shortened. .

【0010】[0010]

【実施例】まず、本発明の考え方を簡単に説明する。First, the concept of the present invention will be briefly described.

【0011】いま、横書の文書について、各行ごとの文
字列のイメージデータの黒点の投影を考えると、図1に
示すように文書が傾いた状態では、黒点の投影は各行の
区別がつかないほどなだらかに得られるのに対して、図
2に示すように文書が傾いていない状態で場合は、黒点
の投影は各行ごとに得られるようになる。このことは、
文書の傾き度合いにより黒点の投影が変化し、傾きが少
なくなるほど投影は各行の区別が得られるほどに尖った
状態になる。従って、この性質を利用すれば、文書の傾
きによるイメージデータの傾きを補正できるようにな
る。以下、この考え方に基づいたに本発明の一実施例を
図面に従い説明する。
Considering the projection of the black dots of the image data of the character string for each line in a horizontally written document, the black dots cannot be distinguished for each line when the document is tilted as shown in FIG. On the other hand, in the case where the document is not tilted as shown in FIG. 2, the black dot projection is obtained for each line, while the image is moderately obtained. This is
The projection of black dots changes depending on the degree of inclination of the document, and the smaller the inclination, the sharper the projection becomes so that each line can be distinguished. Therefore, by utilizing this property, the inclination of the image data due to the inclination of the document can be corrected. An embodiment of the present invention will be described below with reference to the drawings based on this concept.

【0012】図3は同実施例の概略構成を示している。
図において、1は入力部で、この入力部1は、図示しな
い光学式の文字読取り手段などにより読み取られた印刷
文書のイメージデータをメモリ2に与えるようにしてい
る。メモリ2は入力部1から与えられるイメージデータ
を1頁単位で2次元配列により格納するようにしてい
る。メモリ2には、角度テーブル3が接続された傾き抽
出部4と傾き補正部5を接続している。
FIG. 3 shows a schematic configuration of the same embodiment.
In the figure, reference numeral 1 denotes an input unit, and the input unit 1 supplies to a memory 2 image data of a print document read by an optical character reading means (not shown). The memory 2 stores the image data supplied from the input unit 1 in a two-dimensional array on a page-by-page basis. The memory 2 is connected to a tilt extraction unit 4 and a tilt correction unit 5 to which an angle table 3 is connected.

【0013】ここで、角度テーブル3は、傾き抽出部4
がメモリ2に記憶されたイメージデータを読み出す際の
傾き角θ(図4)を決定する値a、bを複数種類ずつ記
憶したものである。
Here, the angle table 3 includes a tilt extraction unit 4
Is a plurality of values a and b for determining the tilt angle θ (FIG. 4) when the image data stored in the memory 2 is read out.

【0014】傾き抽出部4は、文書の傾きに応じたメモ
リ2のイメージデータの傾斜値Dを抽出するもので、角
度テーブル3より読み出される値a、bからメモリ2の
イメージデータを読み出す傾き角θを決定し、この傾き
角θにしたがって各イメージデータを階段的に読み出す
とともに、これら各イメージデータの黒点の和の大きさ
を傾斜値Dとして求める。このような処理は角度テーブ
ル3に記憶される値a、bのすべてについて行い、この
うち最も大きな黒点和を有する傾き角θの傾斜値Dを出
力するようにしている。
The inclination extraction unit 4 extracts the inclination value D of the image data of the memory 2 according to the inclination of the document, and the inclination angle for reading the image data of the memory 2 from the values a and b read from the angle table 3. θ is determined, each image data is read stepwise according to this inclination angle θ, and the size of the sum of the black points of each image data is obtained as the inclination value D. Such processing is performed for all the values a and b stored in the angle table 3, and the inclination value D of the inclination angle θ having the largest sum of black points is output.

【0015】傾き補正部5は、傾き抽出部4より抽出さ
れた最大の傾斜値Dに基づいてメモリ2のイメージデー
タの配列をずらしイメージデータの傾きを補正するよう
にしている。
The inclination correction unit 5 shifts the arrangement of the image data in the memory 2 based on the maximum inclination value D extracted by the inclination extraction unit 4 to correct the inclination of the image data.

【0016】なお、6は予め所定のプログラムを格納し
た制御部で、この制御部6は、メモリ2、傾き抽出部
4、傾き補正部5に対しプログラムにしたがって所定の
制御指令を出力するようになっている。次に、以上のよ
うに構成した実施例の動作を説明する。
A control unit 6 stores a predetermined program in advance. The control unit 6 outputs a predetermined control command to the memory 2, the tilt extraction unit 4, and the tilt correction unit 5 according to the program. Has become. Next, the operation of the embodiment configured as described above will be described.

【0017】いま、制御部6が入力部1に対し読み込み
指令を与えると、入力部1により図示しない文書の印刷
文字が読取られる。そして、この入力部1からの出力
は、メモリ2に格納される。この場合、メモリ2には、
1頁分のイメージデータが2次元配列で格納される。こ
の状態で、制御部6の指示で角度テーブル3よりイメー
ジデータ読み出しの傾き角θを決定する最初の値a、b
が読み出され、傾き抽出部4に送られる。
When the control section 6 gives a read command to the input section 1, the input section 1 reads the print characters of a document (not shown). Then, the output from the input unit 1 is stored in the memory 2. In this case, the memory 2
Image data for one page is stored in a two-dimensional array. In this state, the first values a and b for determining the tilt angle θ of the image data read from the angle table 3 according to the instruction of the control unit 6
Is read out and sent to the inclination extracting unit 4.

【0018】すると、傾き抽出部4では、これら値a、
bから図4に示すようにメモリ2のイメージデータを読
み出す傾き角θが決定されるとともに、この傾き角θに
したがって各イメージデータが階段的に読み出され、こ
れら各イメージデータから黒点の和の大きさが傾斜値D
として求められる。
Then, the inclination extracting unit 4 uses these values a,
As shown in FIG. 4B, the tilt angle θ for reading the image data of the memory 2 is determined, and each image data is read stepwise according to the tilt angle θ, and the sum of the black dots is obtained from each of these image data. The size is the slope value D
Is required as.

【0019】このような処理動作は、角度テーブル3に
記憶される値a、bのすべてについて行われるが、この
場合、傾斜値Dが最大となる時の値a、bの傾き角θを
保存しておく。そして、最終的に、最も大きな黒点の和
が得られる傾き角θの傾斜値Dが傾き抽出部4より出力
される。
Such a processing operation is performed for all the values a and b stored in the angle table 3. In this case, the inclination angle θ of the values a and b when the inclination value D becomes maximum is stored. I'll do it. Finally, the inclination extraction unit 4 outputs the inclination value D of the inclination angle θ that gives the largest sum of the black dots.

【0020】これにより、例えば、図1に示すように文
書が傾いている場合は、角度テーブル3からの各値a、
bより決定されるメモリ2のイメージデータを読み出す
傾き角θが、文書の傾きと一致した時に、この傾き角θ
に沿って階段的に読み出されるメモリ2の各イメージデ
ータの黒点の和の大きさが最大になり、これが傾斜値D
として出力されることになる。
Thus, for example, when the document is tilted as shown in FIG. 1, each value a from the angle table 3,
When the tilt angle θ for reading the image data of the memory 2 determined from b matches the tilt of the document, this tilt angle θ
The sum of the black points of each image data of the memory 2 read in a stepwise manner along the maximum becomes maximum, and this is the slope value D.
Will be output as.

【0021】この結果、この傾斜値Dに基づいて傾き補
正部5により図5に示すようにメモリ2のイメージデー
タをb/aづつ配置をずらすようにすれば、イメージデ
ータの傾きを補正することができるようになる。
As a result, if the image data in the memory 2 is shifted by b / a by the inclination correction unit 5 based on the inclination value D, the inclination of the image data can be corrected. Will be able to.

【0022】また、図2に示すように文書が傾いていな
い場合は、角度テーブル3からの値a、bより決定され
るメモリ2のイメージデータを読み出す傾き角θが0の
時、この傾き角θ=0に沿って読み出されるメモリ2の
各イメージデータの黒点の和の大きさが最大になり、こ
れが傾斜値Dとして出力されることになる。この場合
は、傾き補正部5は、メモリ2のイメージデータを補正
することがない。
Further, when the document is not tilted as shown in FIG. 2, when the tilt angle θ for reading out the image data of the memory 2 determined from the values a and b from the angle table 3 is 0, this tilt angle is 0. The sum of the black points of each image data of the memory 2 read along θ = 0 becomes the maximum, and this is output as the slope value D. In this case, the tilt correction unit 5 does not correct the image data in the memory 2.

【0023】従って、このようにすれば印刷文書から得
られた2次元配列されたイメージデータについて、傾き
抽出部4により角度テーブル3から読み出される各値
a、bによる傾き角θにしたがって階段的に読み出すと
ともに、各イメージデータの黒点の和を傾斜値として求
め、該黒点の和が最大になる傾斜値を抽出し、これを傾
き補正部5に与えイメージデータの配列をずらしイメー
ジデータの傾きを補正するようにしたので、従来の三角
関数などの数学的な手法を用い計算量が膨大になるもの
に比べ、イメージデータの傾き補正のための計算量を飛
躍的に少なくすることできことから処理を簡単なものに
でき、さらに、その処理時間を短縮することができるこ
とから高速処理を実現することもできる。
Therefore, in this way, with respect to the two-dimensionally arrayed image data obtained from the print document, the inclination extraction unit 4 reads out stepwise according to the inclination angles θ of the values a and b read from the angle table 3. At the same time as reading, the sum of the black points of each image data is obtained as a tilt value, the tilt value that maximizes the sum of the black points is extracted, and this is given to the tilt correction unit 5 to shift the image data array and correct the tilt of the image data Therefore, the processing amount for correcting the inclination of the image data can be dramatically reduced as compared with the conventional method that requires a mathematical method such as a trigonometric function and the amount of calculation becomes enormous. Since it can be made simple and the processing time can be shortened, high-speed processing can be realized.

【0024】なお、本発明は上記実施例にのみ限定され
ず、要旨を変更しない範囲で適宜変形して実施できる。
例えば、上述では、横書きの文書についてのべたが、縦
書きの文書についても同様に適用できる。また、上述で
は、1頁分の文書のイメージデータをそのままメモリ2
に格納するようにしているが、書き込みの際に1/4程
度に圧縮してメモリ2に格納するようにしたものにも適
用できる。
The present invention is not limited to the above-mentioned embodiments, and can be carried out by appropriately modifying it without departing from the scope of the invention.
For example, in the above description, a horizontal document is described, but the same applies to a vertical document. Further, in the above description, the image data of the document for one page is directly stored in the memory 2
However, the present invention can be applied to a memory which is compressed to about 1/4 and stored in the memory 2 at the time of writing.

【0025】[0025]

【発明の効果】本発明は、2次元配列で格納されたイメ
ージデータをそれぞれ設定される傾き角にしたがって階
段的に読み出されるとともに、各イメージデータの黒点
の和が最大になる傾斜値が求められ、この傾斜値により
イメージデータの配列をずらしその傾きを補正するよう
にしている。これにより、三角関数などの数学的な手法
を用いることがなく傾きを補正を実現することができる
ので、イメージデータの傾き補正のための計算量を飛躍
的に少なくでき処理を簡単にできるとともに、その処理
時間も短縮することができることから高速処理を実現す
ることもできる。
According to the present invention, the image data stored in the two-dimensional array is read stepwise according to the inclination angles set, and the inclination value that maximizes the sum of the black points of each image data is obtained. The inclination of the image data is shifted by the inclination value to correct the inclination. This makes it possible to correct the tilt without using a mathematical method such as a trigonometric function, so that the amount of calculation for tilt correction of image data can be dramatically reduced and the processing can be simplified. Since the processing time can be shortened, high-speed processing can be realized.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の考え方を説明するための図。FIG. 1 is a diagram for explaining the concept of the present invention.

【図2】本発明の考え方を説明するための図。FIG. 2 is a diagram for explaining the concept of the present invention.

【図3】本発明の一実施例の概略構成を示す図。FIG. 3 is a diagram showing a schematic configuration of an embodiment of the present invention.

【図4】実施例の動作を説明するための図。FIG. 4 is a diagram for explaining the operation of the embodiment.

【図5】実施例の動作を説明するための図。FIG. 5 is a diagram for explaining the operation of the embodiment.

【符号の説明】[Explanation of symbols]

1…入力部、2…メモリ、3…角度テーブル、4…傾き
抽出部、5…傾き補正部、6…制御部。
1 ... Input unit, 2 ... Memory, 3 ... Angle table, 4 ... Tilt extraction unit, 5 ... Tilt correction unit, 6 ... Control unit.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 文書のイメージデータを2次元配列で格
納する記憶手段と、 この記憶手段に格納された2次元配列のイメージデータ
をそれぞれ設定される傾き角にしたがって階段的に読み
出し各イメージデータの黒点の和を傾斜値として求める
とともに該黒点の和が最大になる傾斜値を出力する傾き
抽出手段と、 この傾き抽出手段より抽出される傾斜角に応じて前記メ
モリのイメージデータの配列をずらし該イメージデータ
の傾きを補正する傾き補正手段とを具備したことを特徴
とする文字認識装置。
1. A storage unit for storing image data of a document in a two-dimensional array, and the image data of the two-dimensional array stored in the storage unit are read out stepwise according to a tilt angle set for each image data. A slope extracting unit that obtains the sum of black points as a slope value and outputs a slope value that maximizes the sum of the black points, and shifts the array of image data in the memory according to the slope angle extracted by the slope extracting unit. A character recognition device, comprising: a tilt correction means for correcting the tilt of image data.
JP4178294A 1992-07-06 1992-07-06 Character recognition device Pending JPH0620093A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4178294A JPH0620093A (en) 1992-07-06 1992-07-06 Character recognition device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4178294A JPH0620093A (en) 1992-07-06 1992-07-06 Character recognition device

Publications (1)

Publication Number Publication Date
JPH0620093A true JPH0620093A (en) 1994-01-28

Family

ID=16045959

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4178294A Pending JPH0620093A (en) 1992-07-06 1992-07-06 Character recognition device

Country Status (1)

Country Link
JP (1) JPH0620093A (en)

Similar Documents

Publication Publication Date Title
EP0343786A2 (en) Method and apparatus for reading and recording text in digital form
JPH0620093A (en) Character recognition device
US5977949A (en) Character forming apparatus
JP2000187705A (en) Document reader, document reading method and storage medium
JPS5892072A (en) Printer
JP3082228B2 (en) Data converter
JP2706744B2 (en) Image data position distortion correction method
JP3114289B2 (en) Character pattern generator
JPH05303669A (en) Optical character reader
JP2002197452A (en) Processor for correcting image distortion
JPH08202887A (en) Device and method for processing picture
JP3024479B2 (en) Data converter
JPS6252911B2 (en)
JPS62251884A (en) Recorder
JPS5860382A (en) Character recognition/pattern processing device
JPH05151350A (en) Method for correcting position distortion of image data
JP2962525B2 (en) Text block recognition method
JPH11224306A (en) Device and method for recognizing character
JPH096918A (en) Document recognition processing method
JPS6214274A (en) Drawing input controller
JP2019110506A (en) Image processing apparatus and image processing program
JPS63109650A (en) Picture reader
JPS6249482A (en) Image preprocessing device
JPH04340682A (en) Optical character reader
JPH0273467A (en) Electronic filing system