JPH0535914A - Picture inclination detection method - Google Patents

Picture inclination detection method

Info

Publication number
JPH0535914A
JPH0535914A JP3329955A JP32995591A JPH0535914A JP H0535914 A JPH0535914 A JP H0535914A JP 3329955 A JP3329955 A JP 3329955A JP 32995591 A JP32995591 A JP 32995591A JP H0535914 A JPH0535914 A JP H0535914A
Authority
JP
Japan
Prior art keywords
character string
image
inclination
picture
area
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.)
Granted
Application number
JP3329955A
Other languages
Japanese (ja)
Other versions
JP3187894B2 (en
Inventor
Takashi Saito
高志 齋藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP32995591A priority Critical patent/JP3187894B2/en
Publication of JPH0535914A publication Critical patent/JPH0535914A/en
Application granted granted Critical
Publication of JP3187894B2 publication Critical patent/JP3187894B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)

Abstract

PURPOSE:To reduce the processing quantity by determining the inclination of an picture from a character string defined area. CONSTITUTION:A document is fetched as a binarized picture by a picture input part 101 such as a scanner, etc. For the extraction of a character string area from an input picture, the input picture is reduced in a picture reduction part 102. A block generation/classification part 103 extracts blocks by performing a gradation processing in the character string direction of the reduced picture and classifies into diagrams, photographs, character string defined areas and character string candidate area from the sizes of the blocks. The block generation/classification part 103 selects areas where the lateral lengths are more than three times as the vertical lengths in the areas extracted as character string defined areas. An inclination detection part 104 calculates a straight line whose deviation from a center point of each circumscribed rectangular is the smallest in the selected areas and the inclination of the calculated straight line becomes the inclination of the character string.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、文書画像から文字列領
域の傾きを検出する画像傾き検出方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image inclination detecting method for detecting the inclination of a character string area from a document image.

【0002】[0002]

【従来の技術】従来、画像の傾きを検出する方法とし
て、文書画像に対して2次元フーリエ変換処理を行うこ
とによって画像の傾きを検出する方法(情報処理学会第
22回全国大会、pp677−678)、あるいは画像
を複数の帯状領域に分割し、各領域内における周辺分布
を求め、周辺分布間の位相のずれから画像の傾きを検出
する方法がある(電子通信学会論文誌、1983年 V
ol.J66−D No.1pp.111〜118)。
2. Description of the Related Art Conventionally, as a method of detecting the inclination of an image, a method of detecting the inclination of an image by performing a two-dimensional Fourier transform process on a document image (The 22nd National Convention of Information Processing Society of Japan, pp. 677-678). ), Or dividing the image into a plurality of strip-shaped regions, obtaining the peripheral distribution in each region, and detecting the inclination of the image from the phase shift between the peripheral distributions (The Institute of Electronics, Communication Engineers, 1983 V
ol. J66-D No. 1 pp. 111-118).

【0003】[0003]

【発明が解決しようとする課題】しかしながら、上記し
た方法は、何れも画像全体に対する処理を行うことによ
って画像の傾きを求めているので処理データ量が多くな
るという欠点があった。本発明の目的は、文字列確定領
域から画像の傾きを求めることにより、処理量を軽減し
た画像傾き検出方法を提供することにある。
However, each of the above-mentioned methods has a drawback in that the amount of data to be processed becomes large because the inclination of the image is obtained by processing the entire image. An object of the present invention is to provide an image inclination detection method that reduces the amount of processing by obtaining the image inclination from a character string confirmation area.

【0004】[0004]

【課題を解決するための手段】前記目的を達成するため
に、本発明では、2値化された文書画像から文字列領域
の傾きを検出する画像傾き検出方法において、入力画像
を縮小するステップと、縮小された画像に対してぼかし
処理を施すことによりブロックを生成し、生成されたブ
ロックから文字列領域を分類するステップと、該文字列
領域内の所定領域の外接矩形の位置から画像の傾きを検
出するステップとを含むことを特徴としている。
In order to achieve the above object, the present invention comprises a step of reducing an input image in an image inclination detecting method for detecting the inclination of a character string region from a binarized document image. A step of generating a block by performing a blurring process on the reduced image and classifying a character string area from the generated block; and an inclination of the image from the position of a circumscribed rectangle of a predetermined area in the character string area. Is detected.

【0005】[0005]

【作用】スキャナ等の画像入力部によって文書を2値画
像として取り込み、入力された画像から文字列領域を抽
出するために、画像縮小部において入力画像を縮小す
る。ブロック生成、分類部は、縮小された画像の文字列
方向にぼかし処理を施すことによってブロックを抽出
し、ブロックの大きさから図、写真、文字列確定領域、
文字列候補領域に分類し、さらにブロック生成、分類部
は、文字列確定領域として抽出された領域中から、横の
長さが縦の長さの3倍以上の領域を選択する。傾き検出
部は、選択された領域中の各外接矩形の中心点からの最
もずれの小さい直線を最小二乗近似法を用いて算出し、
算出された直線の傾きが文字列の傾きとなる。
The document is captured as a binary image by the image input unit such as a scanner, and the input image is reduced by the image reduction unit in order to extract the character string region from the input image. The block generation / classification unit extracts a block by performing blurring processing in the character string direction of the reduced image, and determines a figure, a photograph, a character string confirmation region from the size of the block,
The area is classified into character string candidate areas, and the block generation / classification unit selects an area having a horizontal length of three times or more the vertical length from the areas extracted as the character string finalized areas. The inclination detection unit calculates a straight line with the smallest deviation from the center point of each circumscribing rectangle in the selected area by using the least squares approximation method,
The calculated slope of the straight line becomes the slope of the character string.

【0006】[0006]

【実施例】以下、本発明の一実施例を図面を用いて具体
的に説明する。図1は、本発明の実施例のブロック構成
図であり、101は、スキャナ等の文書画像を読み取っ
て入力する画像入力部、102は、入力された画像を縮
小する画像縮小部、103は、縮小画像からブロックを
抽出し、抽出されたブロックを写真、文字列確定領域、
文字列候補領域に分類するブロック生成、分類部、10
4は、画像の傾き検出部、105は、入力画像、縮小画
像、ブロックデータ等のデータを記憶するデータ記憶
部、106は、各部を制御する制御部である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be specifically described below with reference to the drawings. 1 is a block diagram of an embodiment of the present invention, in which 101 is an image input unit for reading and inputting a document image such as a scanner, 102 is an image reducing unit for reducing the input image, and 103 is Extract the block from the reduced image, the extracted block photo, character string confirmation area,
Block generation and classification unit for classifying into character string candidate areas, 10
Reference numeral 4 is an image inclination detection unit, 105 is a data storage unit that stores data such as an input image, a reduced image, and block data, and 106 is a control unit that controls each unit.

【0007】図2は、本発明の処理フローチャートを示
したものである。ステップ201において、スキャナ等
の画像入力部101によって文書を2値画像として取り
込む。次いで、入力された画像から文字列領域を抽出す
るために、画像縮小部102において入力画像を縮小す
る。この画像の縮小は、上下左右の文字列の黒画素が接
触しない程度に縦横に画像を縮小するものである(ステ
ップ202)。ブロック生成、分類部103は、縮小さ
れた画像の文字列方向にぼかし処理を施すことによって
ブロックを抽出し、ブロックの大きさから図、写真、文
字列確定領域、文字列候補領域に分類する。
FIG. 2 shows a processing flowchart of the present invention. In step 201, the document is captured as a binary image by the image input unit 101 such as a scanner. Next, in order to extract the character string region from the input image, the image reducing unit 102 reduces the input image. This reduction of the image is to reduce the image vertically and horizontally so that the black pixels of the upper, lower, left and right character strings do not come into contact with each other (step 202). The block generation / classification unit 103 extracts blocks by performing blurring processing in the character string direction of the reduced image, and classifies the blocks into figures, photographs, character string confirmed areas, and character string candidate areas.

【0008】なお、ここで、ぼかし処理とは、画像のラ
ンレングスデータに対して、長い白ランで区切られた黒
ランと短い白ランのつながりを一つのランとする処理で
あり、このぼかし処理されたランのつながりが上下に連
結しているものをブロックという。
Here, the blurring process is a process in which the connection of a black run and a short white run separated by a long white run is made into one run for the run length data of the image. Blocks are those in which the connected runs are connected vertically.

【0009】ブロック生成、分類部103は、さらに文
字列確定領域として抽出された領域中から、横の長さが
縦の長さの3倍以上の領域を選択する(ステップ20
4)。このように複数の文字が含まれる領域を選出する
ことにより、多くの黒画素連結成分が計算対象となり、
従って傾き検出の精度を上げることができる。
The block generation / classification unit 103 further selects a region whose horizontal length is three times or more the vertical length from the regions extracted as the character string finalized region (step 20).
4). By selecting an area containing multiple characters in this way, many black pixel connected components can be calculated,
Therefore, the accuracy of tilt detection can be improved.

【0010】図3は、横の長さが縦の長さの3倍以上の
文字列確定領域301を示し、302から308は、黒
画素連結成分の外接矩形である。なお、この黒画素は縮
小画像上での画素ではなく、入力された原画像の画素で
ある。
FIG. 3 shows a character string definite area 301 whose horizontal length is three times or more the vertical length, and 302 to 308 are circumscribed rectangles of black pixel connected components. The black pixels are not the pixels on the reduced image but the pixels of the input original image.

【0011】傾き検出部104は、求められた各外接矩
形の中心点(外接矩形302の中心点を310とする)
からの最もずれの小さい直線を最小二乗近似法を用いて
算出し、算出された直線の傾きが求めるべき文字列の傾
きとなる。なお、直線を算出するとき、各中心点に対し
て、外接矩形の面積に比例した重み付けを行う。
The tilt detecting section 104 determines the center point of each circumscribed rectangle (the center point of the circumscribed rectangle 302 is 310).
The straight line with the smallest deviation from is calculated using the least-squares approximation method, and the slope of the calculated straight line is the slope of the character string to be obtained. When the straight line is calculated, each center point is weighted in proportion to the area of the circumscribed rectangle.

【0012】すなわち、y(x)=a+bxとしたと
き、J=Σmi{y(xi)−fi}*2においてJを
最小にするようにa,bを決定する。ここで、各中心点
を(xi,fi)の座標で表わし、各外接矩形の面積を
miで表す。また、*2は2乗を表す。図3の309
は、このようにして算出された直線である。そして、以
上の処理をいくつかの文字列確定領域について行い、傾
き検出部104は、傾きの平均値をとることによって画
像の傾きを求める(ステップ205)。
That is, when y (x) = a + bx, a and b are determined so as to minimize J in J = Σmi {y (xi) -fi} * 2. Here, each center point is represented by coordinates (xi, fi), and the area of each circumscribed rectangle is represented by mi. Also, * 2 represents the square. 309 of FIG.
Is a straight line calculated in this way. Then, the above processing is performed for some character string confirmation areas, and the inclination detection unit 104 obtains the inclination of the image by taking the average value of the inclinations (step 205).

【0013】〈実施例2〉英文書等アルファベット中心
の文字列においては、“d”,“l”等、上に伸びた文
字、“g”,“y”等、下に伸びた文字、さらには大文
字があり、上記した実施例のように外接矩形の中心点の
並びから画像の傾きを求めると、誤差が大きくなる。そ
こで、本実施例2では、外接矩形の大きさ、位置にばら
つきがある英文の文字列においても正しく画像の傾きを
検出する方法に係るものである。
<Embodiment 2> In a character string centered on the alphabet such as an English document, characters extending upward such as "d" and "l", characters extending downward such as "g" and "y", and Has a capital letter, and the error becomes large when the inclination of the image is obtained from the arrangement of the center points of the circumscribing rectangle as in the above embodiment. Therefore, the second embodiment relates to a method for correctly detecting the inclination of an image even in an English character string in which the size and position of the circumscribing rectangle vary.

【0014】図4は、外接矩形の大きさ、位置にばらつ
きがある英文文字列の具体例を示す図である。本実施例
の傾き検出部104では、このような外接矩形の高さの
ヒストグラムを作成し(図5)、頻度の最も高い外接矩
形を基準の大きさとする。そして、この基準値に対して
閾値以上大きい(つまり高い)外接矩形については、そ
の上部を削る。すなわち、図6において、601は、原
画像の黒画素連結成分の外接矩形であり、図5のヒスト
グラムで求められた外接矩形の高さの基準値が603で
あるとき、外接矩形601の高さは、基準値に変換され
て外接矩形602になる。
FIG. 4 is a diagram showing a specific example of an English character string in which the size and position of the circumscribing rectangle vary. The inclination detection unit 104 of this embodiment creates a histogram of the height of such a circumscribed rectangle (FIG. 5), and sets the circumscribed rectangle with the highest frequency as the reference size. Then, with respect to the circumscribed rectangle that is larger (that is, higher) than the reference value by the threshold value or more, the upper portion is cut. That is, in FIG. 6, reference numeral 601 denotes the circumscribed rectangle of the black pixel connected component of the original image, and when the reference value of the height of the circumscribed rectangle obtained from the histogram of FIG. 5 is 603, the height of the circumscribed rectangle 601 is Is converted into a reference value and becomes a circumscribed rectangle 602.

【0015】図4の例では、外接矩形402、403、
405が基準値より大きい外接矩形であるとすると、そ
の高さが図6の602のように変換処理される。そし
て、変換後の外接矩形に対して、前述した実施例と同様
にして、各外接矩形の中心点からの最もずれの小さい直
線を最小二乗近似法を用いて算出することにより、文字
列の傾きを求める。
In the example of FIG. 4, circumscribed rectangles 402, 403,
If 405 is a circumscribed rectangle larger than the reference value, its height is converted as indicated by 602 in FIG. Then, with respect to the circumscribed rectangle after conversion, the straight line with the smallest deviation from the center point of each circumscribed rectangle is calculated using the least-squares approximation method in the same manner as in the above-described embodiment, and thus the inclination of the character string is calculated. Ask for.

【0016】なお、他の実施例としては、図5のヒスト
グラムで求められた外接矩形の高さの基準値よりも非常
に小さい外接矩形404、411は、ピリオドやカンマ
等である場合が多く、文字矩形の並びから少しずれてい
るので、これらの矩形を傾き検出の処理対象外にするこ
とによって、誤差を小さくすることができる。
As another embodiment, the circumscribed rectangles 404 and 411, which are much smaller than the reference value of the height of the circumscribed rectangle obtained by the histogram of FIG. 5, are often periods, commas, etc. Since there is a slight deviation from the arrangement of the character rectangles, the error can be reduced by excluding these rectangles from the tilt detection processing target.

【0017】更に、上記基準値よりも非常に小さい外接
矩形の内、ブロックの最右翼にある小さい外接矩形のみ
を処理対象外にするように、実施例を変更することがで
きる。すなわち、図4において、外接矩形404は、基
準値よりも非常に小さい外接矩形であるが、ピリオドや
カンマ等ではなく、文字の一部である。このような外接
矩形は、文字“i”,“j”などに現われるが、外接矩
形404を除いた場合、外接矩形405が下方よりであ
るので、誤差が生じる。従って、ピリオドやカンマであ
る確率が高いブロックの最右翼の小さい外接矩形のみ
を、傾き検出の処理対象外にする。
Further, the embodiment can be modified so that only the small circumscribing rectangle on the rightmost wing of the block among the circumscribing rectangles much smaller than the reference value is excluded from the processing target. That is, in FIG. 4, the circumscribing rectangle 404 is a circumscribing rectangle that is much smaller than the reference value, but is not a period, a comma, or the like, but a part of a character. Such a circumscribed rectangle appears in the characters "i", "j", etc. However, when the circumscribed rectangle 404 is excluded, the circumscribed rectangle 405 is located at the lower side, so an error occurs. Therefore, only the circumscribing rectangle with the smallest rightmost wing of a block having a high probability of a period or a comma is excluded from the processing target of inclination detection.

【0018】更に、フォントや文字サイズによっては大
文字と小文字の高さに閾値ほど大きな差がない場合があ
る。このような場合においてもサイズのずれは誤差とな
って表れるので、ブロックの先頭文字に相当する最左翼
の外接矩形については、大文字である確率が高いから、
必ず基準の高さに変換処理するように、更に実施例を変
更することも可能である。
Further, depending on the font and the character size, there is a case where the heights of uppercase letters and lowercase letters do not differ as much as the threshold value. Even in such a case, the size shift appears as an error, so the circumscribed rectangle of the leftmost wing corresponding to the first character of the block is likely to be capitalized,
It is possible to further change the embodiment so that the conversion processing is always performed to the standard height.

【0019】[0019]

【発明の効果】以上、説明したように、本発明によれ
ば、文字列確定領域から画像の傾きを求めているので、
従来の方法に比べて処理量が大幅に軽減され、また、ぼ
かし処理による文字領域の抽出を行う場合には、抽出さ
れた領域に対して画像の傾きを求めることになるので、
傾き検出処理と領域抽出処理との整合性がよい。また、
英文書においても画像の傾きを正しく検出することがで
きる。
As described above, according to the present invention, the inclination of the image is obtained from the character string determination area.
The amount of processing is greatly reduced compared to the conventional method, and when the character area is extracted by the blurring processing, the inclination of the image is calculated with respect to the extracted area.
The inclination detection process and the region extraction process have good consistency. Also,
Even in English documents, the inclination of the image can be detected correctly.

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

【図1】本発明の実施例のブロック構成図である。FIG. 1 is a block configuration diagram of an embodiment of the present invention.

【図2】本発明の処理フローチャートを示したものであ
る。
FIG. 2 shows a processing flowchart of the present invention.

【図3】横の長さが縦の長さの3倍以上の文字列確定領
域を示す図である。
FIG. 3 is a diagram showing a character string determination area whose horizontal length is three times or more the vertical length.

【図4】外接矩形の大きさ、位置にばらつきがある英文
文字列の例を示す図である。
FIG. 4 is a diagram showing an example of an English character string in which the size and position of a circumscribing rectangle vary.

【図5】外接矩形の高さのヒストグラムを示す図であ
る。
FIG. 5 is a diagram showing a height histogram of a circumscribed rectangle.

【図6】原画像の外接矩形の大きさを基準値に変換する
図である。
FIG. 6 is a diagram for converting the size of a circumscribed rectangle of an original image into a reference value.

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

101 画像入力部 102 画像縮小部 103 ブロック生成、分類部 104 傾き検出部 105 データ記憶部 106 制御部 Reference Signs List 101 image input unit 102 image reduction unit 103 block generation / classification unit 104 tilt detection unit 105 data storage unit 106 control unit

Claims (1)

【特許請求の範囲】 【請求項1】 2値化された文書画像から文字列領域の
傾きを検出する画像傾き検出方法において、入力画像を
縮小するステップと、縮小された画像に対してぼかし処
理を施すことによりブロックを生成し、生成されたブロ
ックから文字列領域を分類するステップと、該文字列領
域内の所定領域の外接矩形の位置から画像の傾きを検出
するステップとを含むことを特徴とする画像傾き検出方
法。
Claim: What is claimed is: 1. An image tilt detection method for detecting a tilt of a character string region from a binarized document image, the step of reducing an input image, and a blurring process for the reduced image. A step of generating a block by subjecting the block to classification of a character string area from the generated block, and a step of detecting an image inclination from the position of a circumscribed rectangle of a predetermined area in the character string area. Image tilt detection method.
JP32995591A 1991-05-02 1991-11-19 Document image tilt detection method Expired - Fee Related JP3187894B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP32995591A JP3187894B2 (en) 1991-05-02 1991-11-19 Document image tilt detection method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP3-128341 1991-05-02
JP12834191 1991-05-02
JP32995591A JP3187894B2 (en) 1991-05-02 1991-11-19 Document image tilt detection method

Publications (2)

Publication Number Publication Date
JPH0535914A true JPH0535914A (en) 1993-02-12
JP3187894B2 JP3187894B2 (en) 2001-07-16

Family

ID=26464037

Family Applications (1)

Application Number Title Priority Date Filing Date
JP32995591A Expired - Fee Related JP3187894B2 (en) 1991-05-02 1991-11-19 Document image tilt detection method

Country Status (1)

Country Link
JP (1) JP3187894B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07192086A (en) * 1993-12-27 1995-07-28 Ricoh Co Ltd Picture inclination detection method
JP2007316754A (en) * 2006-05-23 2007-12-06 Canon Inc Handwritten character processing device and method
JP2008186451A (en) * 2007-01-29 2008-08-14 Toshiba Corp Document data management apparatus

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07192086A (en) * 1993-12-27 1995-07-28 Ricoh Co Ltd Picture inclination detection method
JP2007316754A (en) * 2006-05-23 2007-12-06 Canon Inc Handwritten character processing device and method
JP2008186451A (en) * 2007-01-29 2008-08-14 Toshiba Corp Document data management apparatus
JP2010160811A (en) * 2007-01-29 2010-07-22 Toshiba Corp Document data management apparatus

Also Published As

Publication number Publication date
JP3187894B2 (en) 2001-07-16

Similar Documents

Publication Publication Date Title
US6574375B1 (en) Method for detecting inverted text images on a digital scanning device
US6674900B1 (en) Method for extracting titles from digital images
US8155445B2 (en) Image processing apparatus, method, and processing program for image inversion with tree structure
US5563403A (en) Method and apparatus for detection of a skew angle of a document image using a regression coefficient
JP3308032B2 (en) Skew correction method, skew angle detection method, skew correction device, and skew angle detection device
JP4646797B2 (en) Image processing apparatus, control method therefor, and program
US6798906B1 (en) Image processing apparatus and method including line segment data extraction
JP2001297303A (en) Method and device for recognizing document image and computer readable recording medium
JP2002133426A (en) Ruled line extracting device for extracting ruled line from multiple image
JPH05500129A (en) Line-by-line segmentation and thresholding for optical character recognition
JP2000207489A (en) Character extracting method and device and record medium
US6269186B1 (en) Image processing apparatus and method
EP1296283A2 (en) Half-tone dot elimination method and system thereof
JP3215163B2 (en) Ruled line identification method and area identification method
JPH0535914A (en) Picture inclination detection method
US11288536B2 (en) Image processing apparatus, image processing method, and non-transitory computer-readable storage medium
JP3187895B2 (en) Character area extraction method
JP4409713B2 (en) Document image recognition apparatus and recording medium
JPH10232926A (en) Image processor and its method
JP2861860B2 (en) Address line extraction device
JP3086277B2 (en) Document image processing device
KR100334624B1 (en) Clustering based document image segmentation method
JP2001043312A (en) Document picture processor
JP2881066B2 (en) How to determine the attributes of text images
JPH05128306A (en) Attribute discriminating method for sentence picture

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees