JP2931041B2 - Character recognition method in table - Google Patents
Character recognition method in tableInfo
- Publication number
- JP2931041B2 JP2931041B2 JP2134876A JP13487690A JP2931041B2 JP 2931041 B2 JP2931041 B2 JP 2931041B2 JP 2134876 A JP2134876 A JP 2134876A JP 13487690 A JP13487690 A JP 13487690A JP 2931041 B2 JP2931041 B2 JP 2931041B2
- Authority
- JP
- Japan
- Prior art keywords
- frame
- character
- scanning direction
- image
- line
- 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 - Lifetime
Links
Landscapes
- Character Input (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、文字認識装置における文書の表内文字認識
方法に関する。Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for recognizing characters in a table of a document in a character recognition device.
文字認識装置においては、文書画像を文字領域、写真
や図形などのイメージ領域、表領域などに分割し、それ
ぞれの領域に別の処理を行うことが多い。In a character recognition device, a document image is often divided into a character area, an image area such as a photograph or a figure, a table area, and the like, and different processing is performed on each area.
表領域に関しては、表を構成する罫線の位置を認識
し、罫線で囲まれた枠内の画像に対して連結した黒画像
の追跡を行い、黒画素連結の外接矩形を求め、それを統
合して文字行を抽出し、文字認識している。Regarding the table area, the positions of the ruled lines that make up the table are recognized, the connected black image is tracked for the image within the frame surrounded by the ruled line, the circumscribed rectangle of the black pixel connection is obtained, and these are integrated. Character line is extracted and character recognition is performed.
しかし従来は、表の各枠内の文字が横書きまたは縦書
きのいずれか一方で印字されていることを前提に文字行
抽出処理をしているため、例えば第3図に示すような横
書きの文字行と縦書きの文字行が混在した表の場合、横
書き(縦書き)を前提としているときには縦書き文字行
(横書き文字行)の抽出が正確に行われず、結果として
文字認識が正確に行われないことがある。Conventionally, however, the character line extraction processing is performed on the assumption that the characters in each frame of the table are printed in either horizontal writing or vertical writing. Therefore, for example, horizontal writing characters as shown in FIG. In the case of a table with both horizontal and vertical character lines, when horizontal writing (vertical writing) is assumed, vertical character lines (horizontal character lines) are not accurately extracted, and as a result, character recognition is performed correctly. There may not be.
本発明の目的は、表内の横書き文字行も縦書き文字行
も正確に抽出して文字認識することができる表内文字認
識方法を提供することにある。SUMMARY OF THE INVENTION It is an object of the present invention to provide an in-table character recognition method capable of accurately extracting both horizontal and vertical character lines in a table and performing character recognition.
本発明は、文書画像の表領域より、主走査方向及び副
走査方向の線分で囲まれた枠を抽出し、各枠内の文字行
を抽出して文字認識する表内文字認識方法において、各
枠の主走査方向の長さ及び副走査方向の長さによって各
枠内の文字行が横書きであるか縦書きであるかを判別
し、この判別の結果に応じて各枠内の文字行の抽出方法
を切り替えることを特徴とする。The present invention relates to an in-table character recognition method for extracting a frame surrounded by line segments in the main scanning direction and the sub-scanning direction from a table area of a document image, extracting a character line in each frame, and recognizing characters. Based on the length of each frame in the main scanning direction and the length in the sub-scanning direction, it is determined whether the character line in each frame is horizontal writing or vertical writing, and the character line in each frame is determined according to the result of this determination. The method is characterized by switching the extraction method.
本発明によれば、表中の各枠内に印字された文字が横
書きであるか縦書きであるかが自動的に判別され、判別
された方向に適した文字行抽出方法が適用されることに
より、横書きの枠と縦書きの枠が混在した表において
も、各枠内の文字行が正確に抽出され、したがって各枠
内の文字の切り出し及び文字認識の精度が上がる。According to the present invention, it is automatically determined whether a character printed in each frame in a table is horizontal writing or vertical writing, and a character line extraction method suitable for the determined direction is applied. Accordingly, even in a table in which horizontal writing frames and vertical writing frames coexist, character lines in each frame are accurately extracted, and thus the accuracy of character extraction and character recognition in each frame is improved.
第1図は本発明の一実施例を示すブロック図、第2図
は処理のフローチャートである。FIG. 1 is a block diagram showing an embodiment of the present invention, and FIG. 2 is a flowchart of a process.
スキャナーなどの2値画像入力部101によって文書を
読取り、その2値画像を2値イメージメモリ102に格納
する(処理ステップ201)。A document is read by a binary image input unit 101 such as a scanner, and the binary image is stored in a binary image memory 102 (processing step 201).
この文書画像に対して、表領域認識部103はランレン
グス分布などを利用して表領域を自動的に認識するか、
あるいはマウスなどを用いて操作者から指定された領域
を表領域として認識し、表領域のイメージを表領域イメ
ージメモリ104に格納する(処理ステップ202)。For the document image, the table area recognition unit 103 automatically recognizes the table area using a run-length distribution or the like,
Alternatively, an area specified by the operator is recognized as a table area using a mouse or the like, and an image of the table area is stored in the table area image memory 104 (processing step 202).
この表領域のイメージに対し、主走査方向線分抽出部
105において、主走査方向に連結した黒画素を追跡して
主走査方向の線分を抽出し、その始点及び終点の座標を
主走査方向線分座標メモリ106に格納する(処理ステッ
プ203)。同様に副走査方向線分抽出部107において、表
領域イメージ内の副走査方向に連結した黒画素を追跡し
て副走査方向の線分を抽出し、その始点及び終点の座標
を副走査方向線分座標メモリ108に格納する(処理ステ
ップ204)。For the image of this table area, the line segment extraction unit in the main scanning direction
At 105, the black pixels connected in the main scanning direction are traced to extract a line segment in the main scanning direction, and the coordinates of the starting point and the ending point are stored in the main scanning direction line segment coordinate memory 106 (processing step 203). Similarly, in the sub-scanning direction line segment extraction unit 107, the black pixels connected in the sub-scanning direction in the table area image are traced to extract a line segment in the sub-scanning direction, and the coordinates of the start point and the end point are set in the sub-scanning direction line. It is stored in the minute coordinate memory 108 (processing step 204).
次に枠認識部109において、各メモリ106,108に格納さ
れた線分座標を参照し、主走査方向線分と副走査方向線
分の組合せにより表の枠を認識し、枠の座標例えば対角
頂点の座標を枠座標メモリ110に格納する(処理ステッ
プ205)。また枠領域抽出部111において、枠座標メモリ
115内の枠座標を参照することにより、表領域イメージ
メモリ104より枠の領域の画像を抽出して枠領域画像メ
モリ112に格納する(処理ステップ206)。Next, the frame recognizing unit 109 refers to the line segment coordinates stored in each of the memories 106 and 108, recognizes a table frame by a combination of the main scanning direction line segment and the sub-scanning direction line segment, and coordinates the frame, for example, a diagonal vertex. Are stored in the frame coordinate memory 110 (processing step 205). In the frame area extraction unit 111, a frame coordinate memory
By referring to the frame coordinates in 115, the image of the frame area is extracted from the table area image memory 104 and stored in the frame area image memory 112 (processing step 206).
次に行方向判定部113において、枠座標メモリ110を参
照して全ての枠に対して主走査方向及び副走査方向の長
さのヒストグラムを作成する(処理ステップ207,20
8)。そして、最大度数の副走査方向の長さを持つ枠は
全て行方向が横書きの枠であると判別し(処理ステップ
209,210)、その長さと同じ主走査方向の長さを持つ枠
は行方向が縦書きの枠であると判別し(処理ステップ21
1,212)、残った枠はそれまでに判別された枠数が多い
ほうの行方向の枠であると判別する(処理ステップ21
3)。なお、処理ステップ207,208でヒストグラムを求め
る際には各走査方向の長さにある程度の幅を持たせ、同
様に処理ステップ211で長さを判別する際にも、比較す
る長さの差がある幅の範囲内のときは一致すると判定す
る。求められた行方向の情報は外接矩形抽出部114を経
由して行画像抽出部116へ伝えられる。Next, the row direction determination unit 113 creates histograms of the lengths in the main scanning direction and the sub-scanning direction for all the frames with reference to the frame coordinate memory 110 (processing steps 207 and 207).
8). Then, it is determined that all the frames having the maximum frequency in the sub-scanning direction have horizontal writing in the row direction (processing step).
209, 210), it is determined that a frame having the same length in the main scanning direction as the length thereof is a vertically written frame (processing step 21).
1, 212), it is determined that the remaining frame is the frame in the row direction having the larger number of frames determined so far (processing step 21).
3). It should be noted that when obtaining histograms in processing steps 207 and 208, a certain width is given to the length in each scanning direction. If they are within the range, it is determined that they match. The obtained row direction information is transmitted to the row image extraction unit 116 via the circumscribed rectangle extraction unit 114.
例えば第3図に示した表の場合、横書きの枠の副走査
方向の長さは全て同一(あるいは、ほぼ同一)であるの
で、その頻度は最大である。したがって、この表の横書
きの枠はすべて処理ステップ210で横書きと判別され
る。また、この表の縦書き文字列“データ”が印刷され
た枠の主走査方向の長さは、最大頻度の副走査方向の長
さとほぼ同一である(差が一定の幅の範囲である)の
で、処理ステップ212で縦書きの枠と判別される。For example, in the case of the table shown in FIG. 3, the length of the horizontal writing frame in the sub-scanning direction is all the same (or almost the same), so that the frequency is the maximum. Therefore, all horizontal writing frames in this table are determined to be horizontal writing in processing step 210. Further, the length of the frame in which the vertically written character string “data” of this table is printed is substantially the same as the length of the maximum frequency in the sub-scanning direction (the difference is within a certain width). Therefore, in processing step 212, it is determined that the frame is a vertically written frame.
次に外接矩形抽出部114において、枠領域画像メモリ1
12を参照し、各枠内の画像に対して連結した黒画素を追
跡し、黒画素連結の外接矩形を抽出して、その対角頂点
の座標を外接矩形座標メモリ115に格納する(処理ステ
ップ214)。Next, in the circumscribed rectangle extracting unit 114, the frame area image memory 1
12, the black pixels connected to the image in each frame are tracked, the circumscribed rectangle of the black pixel connection is extracted, and the coordinates of the diagonal vertices are stored in the circumscribed rectangle coordinate memory 115 (processing step). 214).
次に行画像抽出部116において、外接矩形座標メモリ1
15を参照し、枠領域画像メモリ112内の各枠領域画像に
対して黒画素連結の外接矩形を、行方向判別部113によ
り判別された行方向へ統合することにより、枠内の文字
行画像(文字列画像)を抽出し行画像メモリ117に格納
する(処理ステップ215,216)。Next, in the row image extracting unit 116, the circumscribed rectangular coordinate memory 1
15, the circumscribed rectangle of the black pixel connection is integrated with each frame area image in the frame area image memory 112 in the row direction determined by the row direction determination unit 113, and thereby the character line image in the frame is obtained. (Character string image) is extracted and stored in the row image memory 117 (processing steps 215 and 216).
このように各枠毎に行方向すなわち横書き・縦書きの
いずれであるかの判別を行い、判別した行方向に適した
方法により文字行画像抽出を行うため、横書きの枠と縦
書きの枠が混在した表領域において、いずれの行方向の
文字行画像も正確に抽出することが可能となる。In this manner, for each frame, the line direction, that is, whether it is horizontal writing or vertical writing is determined, and the character line image is extracted by a method suitable for the determined line direction. In a mixed table area, a character line image in any line direction can be accurately extracted.
次に文字認識部118において、行画像メモリ117内の各
枠の文字行画像をより文字画像を切り出すが、前段の文
字行画像抽出が正確であるため、この文字画像切出しも
正確に行うことができる。そして、切り出した文字画像
の特徴を抽出し、認識辞書とのマッチングを行って認識
し、認識結果を外部へ出力する(処理ステップ217)。Next, in the character recognition unit 118, a character image is cut out from the character line image of each frame in the line image memory 117, but since the extraction of the character line image in the preceding stage is accurate, this character image cutout can also be accurately performed. it can. Then, the features of the cut-out character image are extracted, matched with the recognition dictionary for recognition, and the recognition result is output to the outside (processing step 217).
以上説明した如く、本発明によれば、表中の各枠内に
印字された文字行が横書きであるか縦書きであるかを自
動的に判別し、判別した方向に応じた方法により文字行
抽出を行うので、横書き枠と縦書き枠が混在した表にお
いても、各枠内の文字行の切出しを精度良く行うことが
でき、したがって枠内文字の認識精度を上げることがで
きる。As described above, according to the present invention, it is automatically determined whether a character line printed in each frame in a table is horizontal writing or vertical writing, and the character line is printed by a method according to the determined direction. Since extraction is performed, even in a table in which horizontal writing frames and vertical writing frames coexist, character lines in each frame can be cut out with high accuracy, and thus the recognition accuracy of characters in the frame can be improved.
第1図は本発明の一実施例を示すブロック図、第2図は
処理のフローチャート、第3図は横書きと縦書きが混在
した表の例を示す図である。 101……2値画像入力部、102……2値イメージメモリ、
103……表領域認識部、104……表領域イメージメモリ、
105……主走査方向線分抽出部、106……主走査方向線分
座標メモリ、107……副走査方向線分抽出部、108……副
走査方向線分座標メモリ、109……枠認識部、110……枠
座標メモリ、111……枠領域抽出部、112……枠領域画像
メモリ、113……行方向判定部、114……外接矩形抽出
部、115……外接矩形座標メモリ、116……行画像抽出
部、117……行画像メモリ、118……認識部。FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2 is a flowchart of a process, and FIG. 3 is a diagram showing an example of a table in which horizontal writing and vertical writing are mixed. 101: binary image input unit, 102: binary image memory
103 ... Table area recognition unit, 104 ... Table area image memory,
105 main scanning direction line segment extraction unit 106 main scanning direction line segment coordinate memory 107 sub scanning direction line segment extraction unit 108 sub scanning direction line segment coordinate memory 109 frame recognition unit .., 110... Frame coordinate memory, 111... Frame area extraction unit, 112... Frame area image memory, 113... Row direction determination unit, 114. ... Line image extraction unit 117 117 Line image memory 118 Recognition unit.
Claims (1)
走査方向の線分で囲まれた枠を抽出し、各枠内の文字行
を抽出して文字認識する表内文字認識方法において、各
枠の主走査方向の長さ及び副走査方向の長さによって各
枠内の文字行が横書きであるか縦書きであるかを判別
し、この判別の結果に応じて各枠内の文字行の抽出方法
を切り替えることを特徴とする表内文字認識方法。An in-table character recognition method for extracting a frame surrounded by line segments in a main scanning direction and a sub-scanning direction from a table region of a document image, extracting a character line in each frame, and recognizing characters. Based on the length of each frame in the main scanning direction and the length in the sub-scanning direction, it is determined whether the character line in each frame is horizontal writing or vertical writing, and the character in each frame is determined according to the result of this determination. A method for recognizing characters in a table, wherein a method of extracting rows is switched.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2134876A JP2931041B2 (en) | 1990-05-24 | 1990-05-24 | Character recognition method in table |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2134876A JP2931041B2 (en) | 1990-05-24 | 1990-05-24 | Character recognition method in table |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH0433080A JPH0433080A (en) | 1992-02-04 |
| JP2931041B2 true JP2931041B2 (en) | 1999-08-09 |
Family
ID=15138558
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2134876A Expired - Lifetime JP2931041B2 (en) | 1990-05-24 | 1990-05-24 | Character recognition method in table |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2931041B2 (en) |
-
1990
- 1990-05-24 JP JP2134876A patent/JP2931041B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH0433080A (en) | 1992-02-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2940936B2 (en) | Tablespace identification method | |
| US7170647B2 (en) | Document processing apparatus and method | |
| US5075895A (en) | Method and apparatus for recognizing table area formed in binary image of document | |
| JP2000181988A (en) | Optical character reader | |
| JP2931041B2 (en) | Character recognition method in table | |
| JP2002342710A (en) | Character segmenting device and character segmenting method used for the same device and its program | |
| JP2003046746A (en) | Image processing method and image processing apparatus | |
| JP2993007B2 (en) | Image area identification device | |
| JP4040231B2 (en) | Character extraction method and apparatus, and storage medium | |
| JP2001236464A (en) | Character extraction method, character extraction device, and storage medium | |
| JP3157534B2 (en) | Table recognition method | |
| JP3391987B2 (en) | Form recognition device | |
| JP2800205B2 (en) | Image processing device | |
| JP3162414B2 (en) | Ruled line recognition method and table processing method | |
| JP3142950B2 (en) | Line segment recognition method | |
| JP2954218B2 (en) | Image processing method and apparatus | |
| JP3031565B2 (en) | Table space judgment method | |
| JP2002032713A (en) | Character recognition processing method | |
| JPH0573721A (en) | Table recognition device | |
| JPS6327990A (en) | Character recognizing method | |
| JPH05128305A (en) | Area division method | |
| JPH09161007A (en) | Tablespace character recognition method | |
| JPH03160582A (en) | Method for separating ruled line and character in document picture data | |
| JP2004240500A (en) | Image processing apparatus, image processing program, and storage medium | |
| JPH07254051A (en) | Template creation method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080521 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090521 Year of fee payment: 10 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100521 Year of fee payment: 11 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110521 Year of fee payment: 12 |
|
| EXPY | Cancellation because of completion of term | ||
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110521 Year of fee payment: 12 |