JP3541093B2 - Document image inclination detection method and apparatus - Google Patents
Document image inclination detection method and apparatus Download PDFInfo
- Publication number
- JP3541093B2 JP3541093B2 JP26422095A JP26422095A JP3541093B2 JP 3541093 B2 JP3541093 B2 JP 3541093B2 JP 26422095 A JP26422095 A JP 26422095A JP 26422095 A JP26422095 A JP 26422095A JP 3541093 B2 JP3541093 B2 JP 3541093B2
- Authority
- JP
- Japan
- Prior art keywords
- pattern
- same
- patterns
- document image
- character
- 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 - Fee Related
Links
Images
Landscapes
- Character Input (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、文書画像の傾き検出方法および装置に関する。
【0002】
【従来の技術】
文書画像の傾きを検出する従来の方法としては、例えば様々な方向に特徴の射影をとって、最も行方向に沿っていると判定されるピークを検出する方法(特開平5−174183号公報を参照)や、同一行内の文字パターンの外接矩形の位置を比較することによって傾きを求める方法(特開平2−44486号公報を参照)などがある。
【0003】
【発明が解決しようとする課題】
上記した複数方向に特徴の射影をとる前者の方法は、特徴のとりかたによっては正しい角度方向とピークがづれるという問題がある。また、後者の方法は、傾きが不明な状態で行を検出するのに時間を要し、加えて、元々異なる文字を比較するので正確な位置で比較することができず、傾き検出の精度が上がらないという問題がある。
【0004】
本発明の目的は、同一パターンを検出する方法によって、まず同一パターンを選択し、この位置を比較することにより、関係のない文字パターン同志の比較を行わず、高精度にまた効率よく傾きの検出を行う文書画像の傾き検出方法および装置を提供することにある。
【0005】
【課題を解決するための手段】
前記目的を達成するために、請求項1記載の発明では、文書画像の傾き検出方法において、該文書画像から文字に相当するパターンを切り出し、該切り出されたパターン系列において同一文字に相当する類似パターンに同一のラベルを与え、同一ラベルのパターン間を結ぶ線分と、他のパターンとの交差を基に、該同一ラベルのパターンが同一行に存在するか否かを判定し、同一行に存在する同一ラベルのパターン間の位置関係を基に画像の傾きを検出することを特徴としている。
【0006】
請求項2記載の発明では、文書画像の傾き検出装置において、該文書画像から文字に相当するパターンを切り出す手段と、該切り出されたパターン系列において同一文字に相当する類似パターンに同一のラベルを与える手段と、同一ラベルのパターン間を結ぶ線分と、他のパターンとの交差を基に、該同一ラベルのパターンが同一行に存在するか否かを判定する手段と、同一行に存在する同一ラベルのパターン間の位置関係を基に画像の傾きを 検出する手段とを備えたことを特徴としている。
【0007】
【発明の実施の形態】
以下、本発明の一実施例を図面を用いて具体的に説明する。
図1は、本発明の実施例の構成を示す。図において、101はスキャナなどの画像入力手段、102は文字パターン切り出し手段、103は切り出したパターン列の中から類似パターンを抽出する類似パターン検出手段、104は同一行に所属する類似パターンを検出する同一行判定手段、105は検出した同一行内の類似パターン間の角度を検出する手段、106は各類似パターンによって求められた角度から画像全体の角度を決定する角度決定手段、107は各種データを記憶する記憶部、108は全体の制御部、109はデータの通信路である。
【0008】
図2は、本発明の処理フローチャートである。まず、スキャナなどの画像入力手段101によって画像を入力する(ステップ201)。次いで、文字パターン切り出し手段102は、入力画像から各文字パターンを切り出す。この切り出しは、連結する黒画素成分のうち近接するものを統合するなどして行われる。傾き角度が不明である場合には、特に日本語では正確な文字切り出しは難しい。しかし、本発明は文字切り出しが最終目的ではないし、文字パターンが偏や旁に分離していても後の処理で問題にならないので、基本的には連結する黒画素成分が抽出されればよい。
【0009】
次に、類似パターン検出手段103は、この切り出した文字パターン同志を比較して、類似パターンを抽出し、ラベリングする(ステップ203)。図3は、ステップ203の詳細なフローチャートである。ステップ303のパターンマッチング方法としては、例えば米国特許第5,303,313号公報の段落9で説明されているテスト方法を用いる。つまり、この方法は、位置を補正しながらパターンを重ね合わせて差異の出る画素の現れる位置、現れる画素のパターンによって類似であるか否かを判定する方法である。このテスト方法によって、処理対象のパターンが既存のテンプレートとマッチングしたとき、マッチングしたテンプレートに付けられているラベルを、処理対象のパターンに付与する(ステップ304)。マッチングしないときは、処理対象パターンを新しいテンプレートとして登録して新しいラベルを付与する(ステップ305)。なお、ステップ302において、処理時間を短縮するために、全てのパターンを処理対象とせずに、画像中の所定範囲にあるパターンだけを処理対象としてもよい。
【0010】
類似パターンのラベリングが済んだら、同一行判定手段104は、同一行内にある類似パターンを検出する(ステップ204)。図4は、同一行内にある類似パターンの検出を説明する図であり、図5は、ステップ204の詳細なフローチャートである。
【0011】
まず、類似パターンとして抽出されたペアを選択する(ステップ501)。図4において、401と402が同一ラベルを付与された類似パターンであるとする。先のステップ203の処理においてパターンマッチングを行うときには、パターンの重ね合わせの位置を合わせるために、パターンの中心位置を求めている。404は、類似パターン401と402のパターン中心位置を結んだ線分である。また、405、406は、それぞれパターン401とパターン402の外接矩形の左上頂点同志を接続した線分、左下頂点同志を接続した線分である。そして、この線分405および406と交差する矩形を検出する(ステップ503)。この矩形は、図4では410、411、412である。ここで、矩形411は現在の処理対象パターン401に比べてかなり小さいので、このような矩形は処理対象外としてもよい。
【0012】
次に、これら交差矩形の内、類似パターンの中心を結ぶ線分404と交差しない矩形を検出する(ステップ504)。図4の例では、矩形410、411、412は共に交差するので、該当するものはない。このとき、類似パターン401と402のペアは同一行であると判定され、同一行所属パターンペアのリストに登録される(ステップ505)。
【0013】
再びステップ501に戻って、次の類似パターンのペアが選択される。ここではパターン401と403が類似パターンであるとする。407は類似パターン401と403のパターン中心位置を結んだ線分である。また、408と409は、パターン401と403の外接矩形の左上頂点同志、左下頂点同志を接続した線分である。上記したと同様に、線分408および409と交差する矩形を検出し(ステップ503)、このうち、線分407と交差しない矩形を検出する
(ステップ504)。該当する矩形として矩形413が検出されたので、パターン401とパターン403のペアを同一行とはしない(ステップ506)。以上の処理を繰り返すことによって同一行に存在するパターンのペアを検出することができる。
【0014】
図1、2に戻って、パターン間角度検出手段105は、検出された同一行の類似パターン間の角度を検出する(ステップ205)。図4の例では、線分404などのパターン中心間を結ぶ線分の角度である。各パターンペアの角度が求められたら、全体角度決定手段106は画像全体の角度を決定する(ステップ206)。これは、ステップ205で求めた角度の平均値、中央値などをとって画像全体の角度とする。
【0015】
なお、上記した実施例では専用の各処理手段を持つ構成を採っているが、本発明はこれに限定されるものではなく、手段102〜106および108を1つのCPUで構成して、処理することも可能である。
【0016】
【発明の効果】
以上、説明したように、本発明によれば、同じ形のパターン間の位置だけを比較しているので、より正確に傾き角度を検出することができる。また、同一行のパターン間のみを比較しているので、より正確に傾き角度を検出することができる。また、簡単な処理で当該パターンが同一行に存在するか否かを判断することができるので、処理速度が向上する。
【図面の簡単な説明】
【図1】本発明の実施例の構成である。
【図2】本発明の処理フローチャートである。
【図3】図2のステップ203の詳細なフローチャートである。
【図4】同一行内にある類似パターンの検出を説明する図である。
【図5】図2のステップ204の詳細なフローチャートである。
【符号の説明】
101 画像入力手段
102 文字パターン切り出し手段
103 類似パターン検出手段
104 同一行判定手段
105 パターン間角度検出手段
106 全体角度決定手段
107 データ記憶部
108 制御部
109 データ通信路[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a method and an apparatus for detecting the inclination of a document image.
[0002]
[Prior art]
As a conventional method of detecting the inclination of a document image, for example, a method of projecting features in various directions and detecting a peak determined to be most along the line direction (see Japanese Patent Application Laid-Open No. 5-174183). (See Japanese Patent Application Laid-Open No. 2-44486.
[0003]
[Problems to be solved by the invention]
The former method of projecting a feature in a plurality of directions as described above has a problem that a correct angle direction and a peak may be shifted depending on how the feature is taken. In the latter method, it takes time to detect a line in a state where the inclination is unknown.In addition, since different characters are originally compared, comparison cannot be performed at an accurate position. There is a problem that it does not go up.
[0004]
An object of the present invention is to select the same pattern by a method of detecting the same pattern, and compare the positions of the same pattern, thereby comparing the irrelevant character patterns without performing the same. And a method and apparatus for detecting the inclination of a document image.
[0005]
[Means for Solving the Problems]
In order to achieve the above object, in the invention according to
[0006]
According to the second aspect of the present invention, in the document image inclination detecting apparatus, means for extracting a pattern corresponding to a character from the document image, and assigning the same label to a similar pattern corresponding to the same character in the extracted pattern sequence Means for determining whether or not the pattern of the same label exists on the same line based on the intersection of a line connecting the pattern of the same label with another pattern; Means for detecting the inclination of the image based on the positional relationship between the label patterns .
[0007]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, an embodiment of the present invention will be specifically described with reference to the drawings.
FIG. 1 shows the configuration of an embodiment of the present invention. In the figure, 101 is an image input unit such as a scanner, 102 is a character pattern cutout unit, 103 is a similar pattern detection unit that extracts a similar pattern from a cutout pattern sequence, and 104 is a similar pattern belonging to the same row. Same row determination means, 105 means for detecting the angle between similar patterns detected in the same row, 106 means angle determination means for determining the angle of the entire image from the angle obtained by each similar pattern, 107 stores various data Is a control unit, and 109 is a data communication path.
[0008]
FIG. 2 is a processing flowchart of the present invention. First, an image is input by the image input unit 101 such as a scanner (step 201). Next, the character pattern cutout means 102 cuts out each character pattern from the input image. This cutout is performed by, for example, integrating adjacent black pixel components. If the tilt angle is unknown, it is difficult to extract characters accurately, especially in Japanese. However, in the present invention, character extraction is not the final object, and even if the character pattern is separated in a partial or side manner, there is no problem in the subsequent processing. Therefore, basically, it is sufficient to extract a connected black pixel component.
[0009]
Next, the similar pattern detection means 103 compares the extracted character patterns, extracts a similar pattern, and performs labeling (step 203). FIG. 3 is a detailed flowchart of
[0010]
After the labeling of the similar pattern is completed, the same-
[0011]
First, a pair extracted as a similar pattern is selected (step 501). In FIG. 4, it is assumed that 401 and 402 are similar patterns provided with the same label. When performing the pattern matching in the processing of the
[0012]
Next, of these intersecting rectangles, a rectangle that does not intersect with the
[0013]
Returning again to
[0014]
Returning to FIGS. 1 and 2, the inter-pattern angle detection means 105 detects the detected angle between similar patterns in the same row (step 205). In the example of FIG. 4, the angle is a line segment connecting the centers of the patterns such as the
[0015]
In the above-described embodiment, a configuration having dedicated processing units is adopted. However, the present invention is not limited to this, and the
[0016]
【The invention's effect】
As described above, according to the present invention , since only the positions between patterns having the same shape are compared, the tilt angle can be detected more accurately. Further, since only the patterns in the same row are compared, the tilt angle can be detected more accurately. Further, since it is possible to determine whether or not the pattern exists on the same line by a simple process, the processing speed is improved.
[Brief description of the drawings]
FIG. 1 is a configuration of an embodiment of the present invention.
FIG. 2 is a processing flowchart of the present invention.
FIG. 3 is a detailed flowchart of
FIG. 4 is a diagram illustrating detection of a similar pattern in the same row.
FIG. 5 is a detailed flowchart of
[Explanation of symbols]
Reference Signs List 101 Image input means 102 Character pattern cutout means 103 Similar pattern detection means 104 Same line determination means 105 Inter-pattern angle detection means 106 Overall angle determination means 107
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP26422095A JP3541093B2 (en) | 1995-10-12 | 1995-10-12 | Document image inclination detection method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP26422095A JP3541093B2 (en) | 1995-10-12 | 1995-10-12 | Document image inclination detection method and apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH09106436A JPH09106436A (en) | 1997-04-22 |
JP3541093B2 true JP3541093B2 (en) | 2004-07-07 |
Family
ID=17400171
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP26422095A Expired - Fee Related JP3541093B2 (en) | 1995-10-12 | 1995-10-12 | Document image inclination detection method and apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3541093B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5337194B2 (en) * | 2011-04-25 | 2013-11-06 | シャープ株式会社 | Image processing device |
-
1995
- 1995-10-12 JP JP26422095A patent/JP3541093B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH09106436A (en) | 1997-04-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6778703B1 (en) | Form recognition using reference areas | |
JP5600723B2 (en) | Method and system for splitting characters in a text line having various character widths | |
JPH04195692A (en) | Document reader | |
CN108171229A (en) | A kind of recognition methods of hollow adhesion identifying code and system | |
JP3541093B2 (en) | Document image inclination detection method and apparatus | |
JP3494388B2 (en) | Fingerprint matching method and fingerprint matching device | |
JP2866461B2 (en) | Fingerprint collation device | |
JP3698867B2 (en) | Circular pattern determination method, apparatus and recording medium | |
JPH07220081A (en) | Segmenting method for graphic of image recognizing device | |
JP2000357287A (en) | Method and device for number plate recognition | |
JPH10208040A (en) | Image processing method and recording medium | |
JP3585143B2 (en) | Character string extraction method and device | |
JP2630261B2 (en) | Character recognition device | |
JP3074691B2 (en) | Character recognition device | |
JPH05242224A (en) | Fingerprint collating device | |
JPH10154191A (en) | Business form identification method and device, and medium recording business form identification program | |
JPH07160810A (en) | Character recognizing device | |
JP2001216473A (en) | Method and device for processing image and recording medium | |
JPH07118016B2 (en) | Figure recognition device | |
JPH06309503A (en) | English character recognizing device | |
JPS6165378A (en) | Character pattern recognizing method and device | |
JP2925270B2 (en) | Character reader | |
CN115171123A (en) | Text processing method and device, storage medium and computer equipment | |
JPH05166010A (en) | Character siegmenting method | |
JP2001307101A (en) | Method for detecting specific image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20040323 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20040329 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080402 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090402 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090402 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100402 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100402 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110402 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120402 Year of fee payment: 8 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130402 Year of fee payment: 9 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140402 Year of fee payment: 10 |
|
LAPS | Cancellation because of no payment of annual fees |