JPH05334490A - Table recognizing device - Google Patents
Table recognizing deviceInfo
- Publication number
- JPH05334490A JPH05334490A JP4161858A JP16185892A JPH05334490A JP H05334490 A JPH05334490 A JP H05334490A JP 4161858 A JP4161858 A JP 4161858A JP 16185892 A JP16185892 A JP 16185892A JP H05334490 A JPH05334490 A JP H05334490A
- Authority
- JP
- Japan
- Prior art keywords
- character
- rectangle
- block
- ruled line
- rectangular frame
- 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
Links
- 238000000605 extraction Methods 0.000 claims description 161
- 239000013598 vector Substances 0.000 claims description 76
- 239000000470 constituent Substances 0.000 claims description 72
- 238000000034 method Methods 0.000 claims description 48
- 238000000926 separation method Methods 0.000 claims description 15
- 239000000284 extract Substances 0.000 claims description 12
- 238000010586 diagram Methods 0.000 description 35
- 230000001174 ascending effect Effects 0.000 description 5
- 239000000203 mixture Substances 0.000 description 4
- 230000002093 peripheral effect Effects 0.000 description 4
- 238000007796 conventional method Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000001502 supplementing effect Effects 0.000 description 1
Landscapes
- Character Input (AREA)
- Document Processing Apparatus (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は文書画像処理の分野にお
いて、表画像から表の構造を認識する表認識装置に関す
る。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a table recognition device for recognizing a table structure from a table image in the field of document image processing.
【0002】[0002]
【従来の技術】従来の表認識の方式としては、表領域の
周辺分布を用いる方式や、表を構成する罫線をベクトル
線分に変換して、罫線で囲まれた矩形枠を抽出する方式
が知られている。周辺分布を使用する方式として例えば
特開平2−61775公報記載のものがあり、ベクトル
線分を使用する方式として例えば特開平1−12935
8公報記載のものがある。2. Description of the Related Art Conventional table recognition methods include a method using a peripheral distribution of a table area and a method of converting a ruled line forming a table into a vector line segment and extracting a rectangular frame surrounded by the ruled line. Are known. A method using the marginal distribution is disclosed in, for example, Japanese Patent Laid-Open No. 2-61775, and a method using a vector line segment is, for example, Japanese Patent Laid-Open No. 1-21935.
8 publications are available.
【0003】特開平2−61775公報記載の周辺分布
を使用する方式は、表領域の画像の周辺分布をとり、そ
の周辺分布のヒストグラムからある閾値以上の高さを持
つ山から罫線の位置を推定し、罫線の位置が表の最も外
側にある外枠の罫線を取り出す。次にこの外枠に両端を
接する罫線を求め、その罫線により外枠を複数の矩形枠
に分割する。さらに、分割された各矩形枠内に対して同
様の処理を再帰的に施すことにより、罫線で囲まれた矩
形枠を抽出する。後者の特開平1−129358公報記
載の方式は、ベクトル線分を追跡して取り出した各矩形
枠の位置関係を調べることで表の認識を行なう。The method using the peripheral distribution described in Japanese Patent Laid-Open No. 2-61775 takes the peripheral distribution of an image in a table area and estimates the position of a ruled line from a mountain having a height higher than a certain threshold from the histogram of the peripheral distribution. Then, the ruled line of the outer frame having the ruled line position on the outermost side of the table is taken out. Next, a ruled line contacting both ends of this outer frame is obtained, and the outer frame is divided into a plurality of rectangular frames by the ruled line. Further, the same processing is recursively performed on each of the divided rectangular frames to extract a rectangular frame surrounded by ruled lines. The latter method disclosed in Japanese Patent Laid-Open No. 1-129358 recognizes a table by tracing the vector line segments and checking the positional relationship between the extracted rectangular frames.
【0004】これらの方式は、表を構成する罫線に省略
が無いことを前提としているが、実際に文書中に使用さ
れる表には罫線の一部が省略されているものも結構多
い。特開平2−264386公報記載の方式においては
表の両脇の罫線が省略されている場合でも、正しく矩形
枠を取り出せる方式である。すなわち、表画像から取り
出した縦罫線、横罫線から表の両脇に罫線があるかを判
別し、無い場合に表の両脇に縦罫線を仮想的に生成する
方式である。These systems are based on the assumption that the ruled lines that make up the table are not omitted, but there are quite a few tables that are actually used in a document in which some of the ruled lines are omitted. In the method described in Japanese Patent Laid-Open No. 2-264386, even if the ruled lines on both sides of the table are omitted, the rectangular frame can be taken out correctly. That is, it is a method of determining whether there are ruled lines on both sides of the table from the vertical ruled lines and the horizontal ruled lines extracted from the table image and virtually generating vertical ruled lines on both sides of the table when there is no ruled line.
【0005】[0005]
【発明が解決しようとする課題】従来、文書中に使用さ
れている表には、様々な形態のものがある。図2はその
例を示すもので、同図(a)の表は全ての罫線が揃った
表、(b)は両脇の罫線が省略された表、(c)および
(d)は両脇の罫線の他にも省略されている縦罫線、横
罫線がある表、(e)は全ての罫線が省略された表であ
る。このうち(a)および(b)の各表に関しては従来
の技術によって対応可能であるが、(c)(d)の表の
ように両脇の罫線の他にも省略されている縦罫線、横罫
線がある場合および(e)の表のように全ての罫線が省
略されている場合には表の構造を正確に認識して、表と
して意味のある単位で文字列を取り出すことができなか
った。本発明の目的は、縦罫線、横罫線の一部または全
部に省略のあるような表であっても、表を構成する各枠
を正確に切り出すことのできる、表認識装置を提供する
ことにある。Conventionally, there are various types of tables used in documents. FIG. 2 shows an example thereof. The table in FIG. 2 (a) is a table in which all ruled lines are aligned, (b) is a table in which ruled lines on both sides are omitted, and (c) and (d) are both sides. In addition to the above ruled lines, a table having vertical ruled lines and horizontal ruled lines which are omitted, and (e) is a table in which all ruled lines are omitted. Of these, the tables of (a) and (b) can be dealt with by the conventional technique, but vertical ruled lines omitted in addition to the ruled lines on both sides as in the tables of (c) and (d), When there are horizontal ruled lines and when all ruled lines are omitted like the table in (e), it is not possible to correctly recognize the structure of the table and extract the character strings in meaningful units as a table. It was An object of the present invention is to provide a table recognition device capable of accurately cutting out each frame forming a table even in a table in which some or all of vertical and horizontal ruled lines are omitted. is there.
【0006】[0006]
【課題を解決するための手段および作用】本発明の表認
識装置は、表画像から文字ブロックを抽出する文字ブロ
ック抽出手段(図1の11、図8の81)と、前記文字
ブロック抽出手段により抽出された文字ブロック相互の
位置関係を識別し、表の構造を表すデータを出力する位
置関係識別手段(図1の12、図8の82)とを基本的
な構成として備えたものである。この発明によれば、文
字ブロック抽出手段により抽出された文字ブロック相互
の位置関係を位置関係識別手段により識別する。表にお
ける文字ブロックは表の構成要素として一般に規則正し
く整列した位置関係にあるので、文字ブロック相互の位
置関係を見ることにより表の構造を認識できる。従来
は、表の罫線のみに着目して表を構成する枠を求めてい
たので、縦罫線、横罫線の一部または全部に省略のある
ような表の構造を正確に認識することができないという
問題があったが、本発明によれば文字ブロックの並びを
用いて表の構造を認識するので、その問題は解消でき
る。The table recognition device of the present invention comprises a character block extracting means (11 in FIG. 1 and 81 in FIG. 8) for extracting a character block from a table image, and the character block extracting means. It is provided with a positional relationship identifying means (12 in FIG. 1, 82 in FIG. 8) for identifying the positional relationship between the extracted character blocks and outputting data representing the structure of the table as a basic configuration. According to the present invention, the positional relationship between the character blocks extracted by the character block extracting means is identified by the positional relationship identifying means. Since the character blocks in the table generally have a positional relationship in which they are regularly arranged as constituent elements of the table, the structure of the table can be recognized by looking at the positional relationship between the character blocks. In the past, since the frame forming the table was sought by paying attention only to the ruled lines of the table, it is impossible to accurately recognize the structure of the table in which some or all of the vertical ruled lines and the horizontal ruled lines are omitted. Although there is a problem, according to the present invention, since the structure of the table is recognized by using the arrangement of the character blocks, the problem can be solved.
【0007】本発明の一態様によれば、前記の基本的な
構成において、前記文字ブロック抽出手段は、文字の書
かれている画素の塊を囲む矩形領域を求める文字矩形抽
出手段(図1の111)と、その文字矩形抽出手段で求
めた各文字矩形間の距離を求めて、その距離がある閾値
より小さな文字矩形を全て1つの文字ブロックとして統
合する文字ブロック矩形抽出手段(図1の112)を備
えている。その閾値は全体の文字矩形間の距離の統計を
調べて決めたり、文字の幅を基準にしてその何%という
ようにして決めたりすればよい。According to one aspect of the present invention, in the basic configuration described above, the character block extracting means is a character rectangle extracting means (see FIG. 1) for obtaining a rectangular area surrounding a block of pixels in which characters are written. 111) and the distance between the respective character rectangles obtained by the character rectangle extracting means, and all the character rectangles whose distances are smaller than a certain threshold are integrated as one character block. Character block rectangle extracting means (112 in FIG. 1). ) Is provided. The threshold value may be determined by examining statistics of the distance between the entire character rectangles, or by determining what percentage of the width of the character is the standard.
【0008】本発明の他の態様によれば、前記の基本的
な構成において、前記文字ブロック抽出手段は、表中の
文字と罫線を分離して、罫線をベクトル化する罫線ベク
トル化手段(図8の811)と、罫線ベクトル化手段に
より得られた罫線のベクトルデータを基に文字が書かれ
ているべき矩形領域を文字領域として抽出する文字領域
抽出手段(図8の812)と、その文字領域抽出手段で
求めた各文字領域に対して、文字の書かれている画素の
塊を囲む矩形領域を求める文字矩形抽出手段(図8の8
13)と、その文字矩形抽出手段で求めた各文字矩形間
の距離を求めて、ある閾値より小さな文字矩形を全て1
つの文字ブロックとして統合する文字ブロック矩形抽出
手段(図8の814)とを備えている。これは前の段落
(0007)で説明した文字ブロック抽出手段に、罫線
ベクトル化手段と文字領域抽出手段とを付加した構成の
ものである。この態様によれば、罫線ベクトル化手段で
罫線を求め、文字領域抽出手段により罫線により挟まれ
た領域を調べて文字が書かれるべき各文字領域を把握
し、その各文字領域において文字矩形を抽出するように
したので、文字ブロックを精度良く抽出することができ
る。According to another aspect of the present invention, in the above basic structure, the character block extracting means separates the characters in the table from the ruled lines and vectorizes the ruled lines (see FIG. 811), a character area extraction means (812 in FIG. 8) for extracting a rectangular area in which a character should be written as a character area based on the ruled line vector data obtained by the ruled line vectorization means, and the character. For each character area obtained by the area extracting means, a character rectangle extracting means (8 in FIG. 8) for obtaining a rectangular area surrounding a block of pixels in which characters are written.
13) and the distance between the character rectangles obtained by the character rectangle extraction means, and all character rectangles smaller than a certain threshold are set to 1
And a character block rectangle extraction unit (814 in FIG. 8) that is integrated as one character block. This has a configuration in which ruled line vectorization means and character area extraction means are added to the character block extraction means described in the previous paragraph (0007). According to this aspect, the ruled line vectorization unit obtains the ruled line, the character region extraction unit checks the region sandwiched by the ruled lines to grasp each character region in which the character is to be written, and the character rectangle is extracted in each of the character regions. As a result, the character block can be accurately extracted.
【0009】本発明の他の態様によれば、前記の基本的
な構成において、前記位置関係識別手段は、文字ブロッ
ク抽出処理により抽出された文字ブロック矩形を構成枠
とし、その構成枠の行方向の並びを識別する行抽出手段
(図1の121、図8の821)と、構成枠識別手段で
抽出した表を構成する構成枠の列方向の並びを識別する
列抽出手段(図1の122、図8の822)とを備えて
いる。また、そのさらに具体的態様においては、前記行
抽出手段は各構成枠の中心のy座標が所定の誤差範囲で
同一である構成枠の群を同一の行として抽出するよう構
成され、前記列抽出手段は各構成枠の中心のx座標が所
定の誤差範囲で同一である構成枠の群を同一の列として
抽出するよう構成される。表における文字ブロックは一
般に表の行および列に沿って配置されているので、この
ように文字ブロック矩形を構成枠として行および列方向
の並びを調べ、行および列にグループ化することにより
表構造の構成要素を抽出することができる。According to another aspect of the present invention, in the above basic structure, the positional relationship identifying means uses a character block rectangle extracted by the character block extraction process as a constituent frame, and a line direction of the constituent frame. Row extracting means (121 in FIG. 1, 821 in FIG. 8) for identifying the arrangement of columns, and column extracting means for identifying the arrangement in the column direction of the constituent frames that make up the table extracted by the constituent frame identifying means (122 in FIG. 1). , 822 in FIG. 8). Further, in a more specific aspect thereof, the row extracting means is configured to extract a group of constituent frames having the same y-coordinate of the center of each constituent frame within a predetermined error range as the same row, and extract the column. The means are arranged to extract groups of constituent frames in which the x-coordinate of the center of each constituent frame is the same within a predetermined error range as the same column. Since the character blocks in a table are generally arranged along the rows and columns of the table, the table structure is determined by grouping rows and columns by checking the arrangement in the row and column directions using the character block rectangle as a frame. Can be extracted.
【0010】さらに、本発明の他の態様では、前記の基
本的な構成において、さらに罫線によって囲まれる矩形
枠を抽出する矩形枠抽出手段を設け、位置関係識別手段
において罫線で囲まれた矩形枠と表中の文字ブロックを
同等に扱い各位置関係を識別するようにしたものであ
る。すなわち、この表認識装置は、表画像から文字ブロ
ックを抽出する文字ブロック抽出手段(図11の11
3)と、表画像から表を構成する罫線によって囲まれる
矩形枠を抽出する矩形枠抽出手段(図11の112)
と、前記矩形枠抽出手段により抽出された矩形枠および
前記文字ブロック抽出手段により抽出された文字ブロッ
ク相互の位置関係を識別し、表の構造を表すデータを作
成する位置関係識別手段(図11の114)とを備えて
いる。表の罫線で囲まれた矩形枠と表中の文字ブロック
を同等に扱うことにより、罫線で囲まれていない表中の
枠であっても、文字ブロックとして表の中の1つの構成
要素であると識別されるので、図2における(a),
(b)の表はもちろん、(c),(d),(e)の表も
正確に認識することができる。Further, according to another aspect of the present invention, in the above basic structure, a rectangular frame extracting means for extracting a rectangular frame surrounded by ruled lines is further provided, and the rectangular frame surrounded by the ruled lines in the positional relationship identifying means. The character blocks in the table are treated equally and each positional relationship is identified. That is, this table recognition device is a character block extracting means (11 in FIG. 11) for extracting a character block from a table image.
3) and a rectangular frame extracting means for extracting a rectangular frame surrounded by ruled lines forming a table from the table image (112 in FIG. 11).
And a positional relationship identifying means for identifying the positional relationship between the rectangular frame extracted by the rectangular frame extracting means and the character blocks extracted by the character block extracting means, and creating data representing the structure of the table (see FIG. 11). 114) and. By treating the rectangular frame surrounded by the ruled line of the table and the character block in the table equally, even a frame in the table not surrounded by the ruled line is one component in the table as a character block. (A) in FIG. 2,
Not only the table of (b) but also the tables of (c), (d), and (e) can be recognized accurately.
【0011】上記発明において、矩形枠抽出手段は、罫
線画像をベクトルデータに変換する罫線ベクトル化手段
(図8の1121)と、その罫線ベクトル化手段により
出力された罫線ベクトルの接続関係を基に矩形枠を求め
る第1の矩形枠抽出手段(図11の1121)と、一端
が他のいずれの罫線ベクトルにも接続されていない罫線
ベクトルから一部の罫線が省略された矩形枠を抽出する
第2の矩形枠抽出手段(図11の1123)とを備えて
いる。In the above invention, the rectangular frame extraction means is based on the connection relation between the ruled line vectorization means (1121 in FIG. 8) for converting the ruled line image into vector data and the ruled line vector output by the ruled line vectorization means. First rectangular frame extraction means (1121 in FIG. 11) for obtaining a rectangular frame, and a rectangular frame in which some ruled lines are omitted from a ruled line vector whose one end is not connected to any other ruled line vector 2 rectangular frame extracting means (1123 in FIG. 11).
【0012】上記発明において、位置関係識別手段は、
その一態様によれば、前記矩形抽出手段により抽出した
表の罫線から構成される矩形枠と文字ブロック抽出処理
により抽出された文字ブロック矩形枠とから表を構成す
る構成枠を識別する構成枠識別手段(図11の114
1)と、その構成枠識別手段で抽出した表を構成する構
成枠の行方向の並びを識別する行抽出手段(図11の1
142)と、構成枠識別手段で抽出した表を構成する構
成枠の列方向の並びを識別する列抽出手段(図11の1
143)を備えている。また、その構成枠識別手段は、
具体的態様においては、前記矩形抽出手段により抽出し
た矩形枠については、その矩形枠内の文字ブロックを抽
出し、複数の文字ブロックがあったときは、その複数の
文字ブロックをそれぞれ構成枠と決定し、単一の文字ブ
ロックがあったときは矩形枠を構成枠と決定するもので
ある。このように構成枠を決定(認識)することによ
り、図2の(d)のように一部に罫線が省略されている
罫線の矩形枠があっても、表の構成要素である構成枠を
正確に決定することができる。In the above invention, the positional relationship identifying means is
According to one aspect thereof, a component frame identification for identifying a component frame forming a table from a rectangular frame formed by the ruled lines of the table extracted by the rectangle extraction means and a character block rectangular frame extracted by the character block extraction processing. Means (114 in FIG. 11)
1) and the row extracting means (1 in FIG. 11) for identifying the arrangement in the row direction of the constituent frames forming the table extracted by the constituent frame identifying means.
142) and column extraction means (1 in FIG. 11) for identifying the arrangement in the column direction of the constituent frames that make up the table extracted by the constituent frame identification means.
143). Further, the constituent frame identification means is
In a specific aspect, with respect to the rectangular frame extracted by the rectangular extraction means, a character block within the rectangular frame is extracted, and when there are a plurality of character blocks, the plurality of character blocks are respectively determined as constituent frames. However, when there is a single character block, the rectangular frame is determined as the constituent frame. By determining (recognizing) the constituent frame in this way, even if there is a rectangular frame of ruled lines in which the ruled lines are partially omitted as shown in FIG. Can be accurately determined.
【0013】[0013]
(第1の実施例)図1は本発明の第1の実施例の構成を
示す図である。この実施例の表認識装置は、一連の文字
からなる文字ブロックの配置状態を調べて表の構造を認
識するものであって、図1に示すように表画像中の文字
画像から文字ブロックを抽出する文字ブロック抽出部1
1と、文字ブロック抽出部11により抽出された文字ブ
ロック相互の位置関係を識別し表の構造を表すデータを
得る位置関係識別部12とを備えている。(First Embodiment) FIG. 1 is a diagram showing the configuration of the first embodiment of the present invention. The table recognition device of this embodiment is for recognizing the structure of a table by checking the arrangement state of a character block consisting of a series of characters, and extracting the character block from the character image in the table image as shown in FIG. Character block extraction unit 1
1 and a positional relationship identifying unit 12 for identifying the positional relationship between the character blocks extracted by the character block extracting unit 11 and obtaining data representing the structure of the table.
【0014】文字ブロック抽出部11は、文字の書かれ
ている画素の塊を囲む矩形領域を求める文字矩形抽出処
理部111と、その文字矩形抽出処理部111で求めた
各文字矩形間の距離を求めて、その距離がある閾値より
小さな文字矩形を文字ブロックとして統合する文字ブロ
ック矩形抽出処理部112からなっている。また、位置
関係識別部12は、文字ブロック抽出処理により抽出さ
れた文字ブロック矩形を構成枠として受け取り、その構
成枠の行方向の並びを識別する行抽出処理部121と、
構成枠の列方向の並びを識別する列抽出処理部122
と、位置関係の識別結果を記憶する表構造記憶部123
からなっている。The character block extraction unit 11 calculates a character rectangle extraction processing unit 111 that obtains a rectangular area that surrounds a block of pixels in which characters are written, and a distance between each character rectangle obtained by the character rectangle extraction processing unit 111. A character block rectangle extraction processing unit 112 that obtains and integrates a character rectangle whose distance is smaller than a certain threshold as a character block. Further, the positional relationship identifying unit 12 receives a character block rectangle extracted by the character block extracting process as a constituent frame, and a line extraction processing unit 121 for identifying the arrangement in the row direction of the constituent frame,
Column extraction processing unit 122 for identifying the arrangement of the constituent frames in the column direction
And a table structure storage unit 123 that stores the identification result of the positional relationship.
It consists of
【0015】以上のように構成された本実施例の各部の
処理について、詳細に説明する。本実施例で処理の対象
とする画像は、イメージスキャナなどの画像入力装置に
より入力された表を含む文書画像から表領域が分離され
て得られた表画像である。表領域の分離手段は画面上で
マウスのようなポインティングデバイスにより操作者が
指定するものや、画像の属性を基に自動的に分離する表
領域分離装置(例えば、特開平2−210586号公報
参照)などがあり、いずれも公知の技術である。文字矩
形抽出処理部111は、表画像中の文字画像部分に対し
て、図3の(a),(b)に示すように、字の書かれて
いる画素の塊31,32,33,34を囲む矩形領域3
5,36,37,38を求める。すなわち、表の画像が
背景の画素値が0、文字/線の画素値が1で書かれてい
る時、画素値が1である塊を取り出してその矩形領域を
求める。このとき、2つの矩形領域が重なってるとき
は、図3の(b)のように2つの矩形領域37,38を
包含できるような矩形領域39で表す。なお、文字の矩
形領域を抽出する方法は、良く知られている技術(例え
ば、特開平2−267678号公報参照)であるので詳
細な説明は省略する。The processing of each section of the present embodiment configured as above will be described in detail. The image to be processed in this embodiment is a table image obtained by separating a table area from a document image including a table input by an image input device such as an image scanner. The table area separating means is a table area separating device that is specified by an operator on a screen with a pointing device such as a mouse, or a table area separating device that automatically separates images based on image attributes (see, for example, Japanese Patent Laid-Open No. 2-210586). ) And the like, all of which are known techniques. The character rectangle extraction processing unit 111, as shown in (a) and (b) of FIG. 3, for the character image portion in the front image, a block of pixels 31, 32, 33, 34 in which characters are written. Rectangular area 3 surrounding
Find 5, 36, 37, 38. That is, when the table image is written with a background pixel value of 0 and a character / line pixel value of 1, a block having a pixel value of 1 is taken out to obtain its rectangular area. At this time, when the two rectangular areas overlap each other, they are represented by a rectangular area 39 which can include the two rectangular areas 37 and 38 as shown in FIG. 3B. The method of extracting the rectangular area of the character is a well-known technique (see, for example, Japanese Patent Laid-Open No. 2-267678), and detailed description thereof will be omitted.
【0016】さらに文字ブロック矩形抽出処理部112
では、文字矩形抽出処理部112で求めた各文字矩形間
の距離を求めて、ある閾値より小さな文字矩形を全て1
つの文字ブロックとして統合する処理を行なう。この処
理で用いる閾値は、全体の文字矩形間の距離の統計を調
べて決めてもいいし、文字の大きさの数%として決めて
もよく、ここでは特に閾値の決定方法については定めな
い。この処理を図4の(a)に示す罫線のない表に適用
した時の結果は、同図(b)のようになる。これらの処
理の結果得られた文字ブロックの矩形枠はそれぞれに識
別子が付され矩形枠の位置(x座標,y座標)、幅、高
さ等がデータとして適宜のメモリに蓄積される。Further, the character block rectangle extraction processing unit 112.
Then, the distance between the character rectangles calculated by the character rectangle extraction processing unit 112 is calculated, and all character rectangles smaller than a certain threshold are set to 1
Performs the process of integrating as one character block. The threshold used in this processing may be determined by examining statistics of the distances between the entire character rectangles, or may be determined as a few% of the size of the character, and the method of determining the threshold is not specified here. When this process is applied to the table without ruled lines shown in FIG. 4A, the result is as shown in FIG. The rectangular frame of the character block obtained as a result of these processes is given an identifier, and the position (x coordinate, y coordinate), width, height, etc. of the rectangular frame is stored as data in an appropriate memory.
【0017】図5aおよび図5bは、文字ブロック矩形
抽出処理部112の処理のフローを示す図である。図5
aは文字矩形をブロックにまとめるための前記閾値を求
めるための処理手順を示すものである。処理に必要な定
数や中間結果を格納する格納部として、定数N、文字矩
形の幅の集計結果を格納する変数sumw、文字矩形の
高さの集計結果を格納する変数sumh、幅および高さ
の閾値Tw,Th、変数iが用意されている。まず、初期
設定としてNには文字矩形抽出処理部111で抽出した
文字矩形の総数を設定し、sumw、sumh、およびi
はそれぞれ0に設定する(ステップ501)。そして、
iがNを越えていないかどうかを判定し(ステップ50
2)、i<Nのときは、sumw、sumhに文字矩形C
iの幅、高さを加算し(ステップ503)、その加算値
を2Nで除する(ステップ504)。そしてiを1ずつ
増加させながら(ステップ505)、iがNより大きく
なるまでステップ502〜505の処理を繰り返す。i
がNより大きくなったとき、幅および高さの閾値Tw,
Thは文字矩形の幅の平均値の1/2の値として得られ
る。FIGS. 5a and 5b are diagrams showing the flow of processing of the character block rectangle extraction processing unit 112. Figure 5
Reference character a indicates a processing procedure for obtaining the threshold value for grouping the character rectangles into blocks. As a storage unit that stores constants and intermediate results necessary for processing, a constant N, a variable sum w that stores the totaling result of the width of the character rectangle, a variable sum h that stores the totaling result of the height of the character rectangle, width, and height Thresholds T w and T h and a variable i are prepared. First, as an initial setting, the total number of character rectangles extracted by the character rectangle extraction processing unit 111 is set to N, and sum w , sum h, and i are set.
Are set to 0 (step 501). And
It is determined whether i does not exceed N (step 50).
2) When i <N, sum w and sum h are character rectangles C
The width and height of i are added (step 503), and the added value is divided by 2N (step 504). Then, while increasing i by 1 (step 505), the processes of steps 502 to 505 are repeated until i becomes larger than N. i
Is greater than N, the width and height thresholds T w ,
T h is obtained as a value of ½ of the average width of the character rectangle.
【0018】図5aの処理で閾値が得られると、図5b
の処理により文字矩形をブロックにまとめる処理を行
う。変数jおよびBを0に設定する(ステップ50
6)。文字矩形Cjはいずれかの文字ブロックCBに登
録済かを判定する(ステップ507)。登録済みであれ
ば、次の文字矩形を処理するため変数jを1だけ増加さ
せる(ステップ517)。ステップ507の判定の結
果、文字矩形Cjがまだ未登録であったなら、文字ブロ
ックCBBに文字矩形Cjを登録する(ステップ50
8)。この登録された文字矩形Cjは一つの文字ブロッ
クCBBの先頭の文字矩形となる。次に、その登録した
文字と距離が閾値TwあるいはTh以内の距離にある文字
矩形を探して文字ブロックCBBに登録する処理を行
う。そのため、先ず変数kをjに設定する(ステップ5
09)。そして文字矩形Ckはいずれかの文字ブロック
に登録済かどうかを調べる(ステップ510)。登録済
みでなければ、CBBとCkとの距離Dを求める(ステッ
プ511)。求めた距離Dが閾値TwあるいはTh以内の
距離にあるか否かを調べる(ステップ512)。距離D
が閾値TwあるいはThの範囲内にあったならば、文字矩
形Ckを文字ブロックCBBに追加し、CBBの大きさを
変更する(ステップ513)。ステップ510で、文字
矩形Ckが登録済みであると判定されたとき、ステップ
512で距離Dが閾値TwあるいはThの範囲内にないと
判定されたとき、およびステップ513での追加の処理
を終えたときには、次の文字矩形を探すために、k=k
+1に設定し(ステップ514)、すべての文字矩形に
対する処理が終えたか否かを判定した後(ステップ51
5)、まだ処理が終わっていないときはその設定した次
の文字矩形についてステップ510〜514の処理を繰
り返す。ステップ515の判定で、k<Nではなくなっ
たときは、次の文字ブロックを求めるために、B=B+
1とすると共に(ステップ516)、j=j+1とする
(ステップ517)。j<Nの間は、ステップ507〜
ステップ518の処理を続行し、j<Nでなくなったと
き処理を終了する(ステップ519)。When the threshold value is obtained by the process of FIG.
The process of grouping the character rectangles into blocks is performed. Set variables j and B to 0 (step 50).
6). It is determined whether the character rectangle C j has been registered in any of the character blocks CB (step 507). If registered, the variable j is incremented by 1 to process the next character rectangle (step 517). Is determined in step 507, if the character rectangle C j was still registered, registers the character rectangle C j into character blocks CB B (Step 50
8). The registered character rectangle C j becomes the leading character rectangle of one character block CB B. Next, the character rectangle whose distance from the registered character is within the threshold T w or T h is searched for and registered in the character block CB B. Therefore, first, the variable k is set to j (step 5).
09). Then, it is checked whether or not the character rectangle C k is already registered in any of the character blocks (step 510). If it has not been registered, the distance D between CB B and C k is calculated (step 511). It is checked whether or not the obtained distance D is within the threshold T w or T h (step 512). Distance D
If There were within the range of the threshold value T w or T h, and add the character rectangle C k into character blocks CB B, to change the size of the CB B (step 513). When it is determined in step 510 that the character rectangle C k has been registered, when it is determined in step 512 that the distance D is not within the range of the threshold T w or T h , and additional processing in step 513. When you have finished, to find the next character rectangle, k = k
After setting it to +1 (step 514), it is determined whether or not the processing for all the character rectangles has been completed (step 51).
5) If the processing is not finished yet, the processing of steps 510 to 514 is repeated for the set next character rectangle. When it is determined in step 515 that k <N is not satisfied, B = B + in order to obtain the next character block.
The value is set to 1 (step 516) and j = j + 1 (step 517). While j <N, steps 507-
The process of step 518 is continued, and when j <N is not satisfied, the process ends (step 519).
【0019】次に、位置関係識別部12の働きについて
説明する。位置関係識別部12は、前述のように行抽出
処理部121、列抽出処理部122の3つの処理部から
なり、以下に順をおって説明する。この実施例では、文
字ブロック抽出部11で抽出した文字ブロックをそのま
ま構成枠として登録する。図4の(c)が構成枠を示す
ものである。Next, the function of the positional relationship identifying section 12 will be described. The positional relationship identifying unit 12 is composed of the three processing units, the row extraction processing unit 121 and the column extraction processing unit 122 as described above, and will be described below in order. In this embodiment, the character block extracted by the character block extraction unit 11 is registered as it is as a constituent frame. FIG. 4C shows the configuration frame.
【0020】行抽出処理部121と列抽出処理部122
では、文字ブロック矩形抽出処理部121で抽出した文
字ブロック矩形を表を構成する構成枠とみなし、それら
の並びを識別する。図6aおよび図6bは行抽出処理の
フロー、図7aおよび図7bは列抽出処理のフローを示
す図である。同図に示すように、全ての構成枠の中心点
の座標を求め、行抽出処理では構成枠の中心点のY座標
がある誤差範囲内に並んでいる構成枠を表の行と識別
し、列抽出処理では構成枠の中心点のX座標がある誤差
範囲内に並んでいる構成枠を表の列と識別する。Row extraction processing section 121 and column extraction processing section 122
Then, the character block rectangles extracted by the character block rectangle extraction processing unit 121 are regarded as the constituent frames forming the table, and their arrangement is identified. 6a and 6b are flowcharts of the row extraction process, and FIGS. 7a and 7b are flowcharts of the column extraction process. As shown in the figure, the coordinates of the center points of all the constituent frames are calculated, and in the line extraction processing, the constituent frames in which the Y coordinates of the central points of the constituent frames are arranged within a certain error range are identified as rows of the table, In the column extraction processing, the constituent frames in which the X-coordinates of the center points of the constituent frames are arranged within a certain error range are identified as columns in the table.
【0021】即ち、行抽出処理では、図6aおよび図6
bに示すように、先ず構成枠の総数を変数Nに設定する
(ステップ601)。全ての構成枠の中心点のY座標を
求め,配列CBに格納する(ステップ602)。全矩形
枠の中で最大の高さを持つものを探索し、その高さの1
/2を誤差範囲の閾値Thの値とする(ステップ60
3)。次に文字ブロックのY座標の配列CBを昇順にソ
ートする(ステップ604)。そして、i=G=0、y
=CBiに設定し、行配列をクリアする(ステップ60
5)。次に、配列CBから一つの構成枠のY座標CBi
を取り出し、行配列に登録済かどうかを判定し(ステッ
プ607)、登録されていない構成枠CBiにたいして
は、yとの距離が閾値Th以内の範囲にあるか否かを|
CBi−y|<Thの演算により判定し(ステップ60
8)、yとの距離が閾値Th以内の範囲にあった場合は
CBiに対応する構成枠を行配列に格納する(ステップ
609)。文字ブロックが登録済みであった場合、およ
びyとの距離が閾値Th以内の範囲になかった場合は、
次の文字ブロックを取り出すためにi=i+1とする
(ステップ610)。取り出した新しい文字ブロックに
対して同様の行配列への判定、登録処理(ステップ60
7〜609)を行う。処理が進みi<Nでなくなったら
(ステップ606の判定)、一つの行に対する抽出処理
が終了し、次の行の抽出処理を行うため図6bのフロー
へ進む。行配列の内容をG番目の行情報として出力する
(ステップ611)。次に行配列をクリアするととも
に、i=0、G=G+1に設定する(ステップ61
2)。そして、G+1番目の行の先頭となるべき構成枠
を探す。すなわち、構成枠を最初から一つずつ取り出
し、いずれかの行に登録済みか否かを判定し(ステップ
614)、最初に見つかった未登録の構成枠をG+1番
目の行の先頭となるべき構成枠yとして指定するととも
に、i=0に設定し(ステップ616)、図6aのステ
ップ606〜610の1行の抽出処理へ移る。なお、ス
テップ613においてi<Nでないと判定されたとき、
すなわち未登録の構成枠がなくなったときは行の抽出処
理を終了する。That is, in the line extraction process, the process shown in FIGS.
As shown in b, first, the total number of constituent frames is set to a variable N (step 601). The Y coordinates of the center points of all the constituent frames are obtained and stored in the array CB (step 602). Search for the one with the maximum height in all the rectangular frames, and set the height to 1
/ 2 is the value of the error range threshold T h (step 60)
3). Next, the array CB of Y coordinates of the character blocks is sorted in ascending order (step 604). Then, i = G = 0, y
= CB i and clear the row array (step 60)
5). Next, the Y coordinate CB i of one constituent frame from the array CB
Is taken out and it is judged whether or not it has been registered in the row array (step 607). For the unregistered component frame CB i , it is judged whether or not the distance from y is within the threshold value T h.
CB i −y | <T h is determined (step 60
8) If the distance from y is within the threshold value T h , the configuration frame corresponding to CB i is stored in the row array (step 609). When the character block has been registered, and when the distance from y is not within the range of the threshold value T h ,
Set i = i + 1 to retrieve the next character block (step 610). Judgment and registration processing in the same row array for the new character block taken out (step 60)
7 to 609). When the process progresses and i <N is not satisfied (determination in step 606), the extraction process for one row ends, and the process proceeds to the flow of FIG. 6b to perform the extraction process for the next row. The contents of the row array are output as the Gth row information (step 611). Next, the row array is cleared, and i = 0 and G = G + 1 are set (step 61).
2). Then, the constituent frame that should be the head of the (G + 1) th row is searched. That is, the composition frames are taken out one by one from the beginning, and it is judged whether or not the composition frames are already registered in any of the rows (step 614), and the first unregistered composition frame found should be the head of the G + 1th row. The frame y is designated, and i = 0 is set (step 616), and the process proceeds to the extraction processing of one row in steps 606 to 610 of FIG. 6a. When it is determined in step 613 that i <N is not satisfied,
That is, when there is no unregistered component frame, the line extraction process is terminated.
【0022】列抽出処理は、図7aおよび図7bに示す
通りであり、行抽出処理とは行と列とが入れ替わりって
いる点を除けばほぼ同様の処理を行う。すなわち、全て
の構成枠の中心点のX座標を配列CBに格納し(ステッ
プ702)、昇順にソートする(ステップ704)。全
矩形枠の中で最大の幅の1/2を誤差範囲の閾値Twの
値とし(ステップ703)、i=G=0 、x=CBi
に設定し、行配列をクリアする(ステップ705)。次
に、配列CBに格納された構成枠CBiを一つずつ取り
出し、登録されていない構成枠CBiにたいしては、x
との距離が誤差範囲の閾値Tw以内の範囲にあるか否か
を判定し(ステップ707〜708)、誤差範囲内にあ
った場合はCB iに対応する構成枠を列配列に格納する
(ステップ709)。一つの列に対する抽出処理が終了
したら、次の列の抽出処理を行うため図7bのフローへ
進む。次に、次の列の先頭となるべき未登録の最初の構
成枠を探し(ステップ714〜715)、見つかった
ら、図7aのステップ706〜710の1列の抽出処理
へ移る。未登録の構成枠がなくなったときは列の抽出処
理を終了する。The column extraction process is shown in FIGS. 7a and 7b.
It ’s the same as the row extraction process
Except for the fact that it is present, almost the same processing is performed. That is, all
The X coordinate of the center point of the component frame of is stored in the array CB (step
702) and sort in ascending order (step 704). all
½ of the maximum width in the rectangular frame is the threshold T of the error rangewof
Value (step 703), i = G = 0, x = CBi
To clear the row array (step 705). Next
And the configuration frame CB stored in the array CB.iTake one by one
Outgoing and unregistered component frame CBiFor x
The distance T is the threshold T of the error rangewWhether it is within the range
Is determined (steps 707 to 708) and is within the error range.
CB if iStore the configuration frame corresponding to to the column array
(Step 709). Extraction process for one column ends
Then, to perform the extraction process of the next column, go to the flow of FIG. 7b.
move on. Next, the first unregistered structure that should be the beginning of the next column.
I searched for a frame (steps 714-715) and found it
Et al., The extraction process of one column in steps 706 to 710 of FIG. 7a.
Move to. Column extraction process when there are no unregistered components
End the reason.
【0023】行抽出処理部121および列抽出処理部1
22の処理により、図4の(d)(e)に示すように構
成枠は行と列にグループ化される。その出力データは、
例えば、構成枠を表す識別番号に、行番号と列番号を与
えた形式で表構造記憶部123に記憶され、任意のシス
テム例えばワープロで利用可能な状態となる。Row extraction processing section 121 and column extraction processing section 1
By the processing of 22, the constituent frames are grouped into rows and columns as shown in (d) and (e) of FIG. The output data is
For example, it is stored in the table structure storage unit 123 in a format in which the row number and the column number are given to the identification number representing the configuration frame, and the system can be used in an arbitrary system such as a word processor.
【0024】以上に説明したように、この第1の実施例
は、文字ブロック抽出部11で抽出した文字ブロックを
表の構成枠とし、その並びにより行および列からなる表
の構造を抽出するので、図4の(a)に示すような全く
罫線のない表であっても、表構造を認識することができ
る。なお、罫線のある表の場合でも、この第1の実施例
により同様に文字ブロックのみに基づいて表構造を認識
することができる。As described above, according to the first embodiment, the character blocks extracted by the character block extraction unit 11 are used as a table configuration frame, and the table structure including the rows and columns is extracted. The table structure can be recognized even in a table having no ruled lines as shown in FIG. Even in the case of a table having ruled lines, the table structure can be recognized based on only the character blocks by the first embodiment.
【0025】(第2の実施例)図8は本発明の第2の実
施例の構成を示す図である。この実施例の表認識装置
は、罫線を基に表における文字領域を抽出し、その文字
領域内で文字ブロックを抽出し、抽出した文字ブロック
の配置状態を調べて表の構造を認識するものであって、
図1に示す第1の実施例の構成と同様に、表画像から文
字ブロックを抽出する文字ブロック抽出部81と、文字
ブロック抽出部81により抽出された文字ブロック相互
の位置関係を識別し表構造を表すデータを生成する位置
関係識別部82とからなる基本構成を備えている。そし
て、この第2の実施例は、第1の実施例とは、文字ブロ
ック抽出部81の構成が異なり、文字矩形抽出処理部8
13の前段に、罫線ベクトル化処理部811および文字
領域抽出処理部812からなる文字領域を求めるための
手段が付加されている。その罫線ベクトル化処理部81
1は、表中の文字と罫線を分離して、罫線をベクトル化
するものである。また、文字領域抽出処理部812は、
罫線ベクトル化処理部811により得られた罫線のベク
トルデータを基に文字が書かれているべき矩形領域を文
字領域として抽出するものである。(Second Embodiment) FIG. 8 is a diagram showing the configuration of the second embodiment of the present invention. The table recognition device of this embodiment is for recognizing the structure of a table by extracting a character area in a table based on a ruled line, extracting a character block in the character area, and checking the arrangement state of the extracted character block. There
Similar to the configuration of the first embodiment shown in FIG. 1, a character block extraction unit 81 for extracting character blocks from a table image and a positional relationship between the character blocks extracted by the character block extraction unit 81 are identified to form a table structure. And a positional relationship identifying unit 82 that generates data representing The second embodiment is different from the first embodiment in the configuration of the character block extraction unit 81, and the character rectangle extraction processing unit 8 is different.
A unit for determining a character area including a ruled line vectorization processing unit 811 and a character area extraction processing unit 812 is added to the preceding stage of 13. The ruled line vectorization processing unit 81
1 is to separate the characters and ruled lines in the table and vectorize the ruled lines. Further, the character area extraction processing unit 812
Based on the ruled line vector data obtained by the ruled line vectorization processing unit 811, a rectangular area in which a character should be written is extracted as a character area.
【0026】表の罫線だけをベクトル化するには表を構
成する線の部分と文字の部分とに分ける必要がある。こ
の分離処理は、図形中の文字と線分を分離する処理と同
様の既存の手法を用いることができる。なお、本願出願
人が先に特許出願した特願平3−290299号「文字
/図形分離装置」(発明者 清水昇)の技術を用いた場
合は、誤りの少ない正確な分離処理をより高速に行うこ
とができる。その文字/図形分離装置について簡単に説
明する。これは、図9に示すように、入力画像における
各黒画素塊の二以上の特徴を抽出する特徴抽出部91
と、その特徴抽出手段91の特徴抽出結果を利用して初
期クラスタ中心を求める初期クラスタ中心決定部92
と、特徴抽出部91の特徴抽出結果と初期クラスタ中心
決定部92の決定結果とを利用してクラスタリングする
ことにより領域の判定を行う領域判定部93とを備えて
いる。各黒画素塊の特徴量としては、たとえば黒画素塊
の面積、偏平率、輪郭線の複雑さなどを用いることがで
きる。特徴抽出部91でこのような特徴量が抽出される
と、次に初期クラスタ中心決定部92は、抽出された黒
画素塊の特徴量の分布を用いて初期クラスタの中心を求
める。領域判定部93は、抽出された黒画素塊の2以上
の特徴量に対して、初期クラスタ中心決定部92により
求められた初期クラスタ中心を用いて、クラスタリング
を行って各黒画素塊の属すべき領域を判定する。In order to vectorize only the ruled lines of the table, it is necessary to divide the table into lines and characters. For this separation processing, an existing method similar to the processing for separating a character and a line segment in a figure can be used. It should be noted that, when the technique of the Japanese Patent Application No. 3-290299 “Character / figure separation device” (inventor Noboru Shimizu), which was previously filed by the applicant of the present application, is used, accurate separation processing with few errors can be performed faster. It can be carried out. The character / graphic separation device will be briefly described. As shown in FIG. 9, this is a feature extraction unit 91 that extracts two or more features of each black pixel block in the input image.
And an initial cluster center determination unit 92 that obtains an initial cluster center using the feature extraction result of the feature extraction means 91.
And a region determination unit 93 that determines a region by performing clustering using the feature extraction result of the feature extraction unit 91 and the determination result of the initial cluster center determination unit 92. As the feature amount of each black pixel block, for example, the area of the black pixel block, the flatness ratio, the complexity of the contour line, or the like can be used. When such a feature amount is extracted by the feature extraction unit 91, the initial cluster center determination unit 92 then obtains the center of the initial cluster using the distribution of the extracted feature amounts of the black pixel blocks. The area determination unit 93 uses the initial cluster centers determined by the initial cluster center determination unit 92 for two or more feature amounts of the extracted black pixel clusters, and should belong to each black pixel cluster. Determine the area.
【0027】分離された表の罫線の領域は、2値画像
を、端点、折れ線、交差点、分岐点などの特徴点を始点
および終点とするベクトルデータに変換する。このベク
トルデータに変換する方法は既存の技術(例えば、信学
技報PRL83−8、PRL85−24、PRL86−
89、特開平2−210586号公報、特開平2−10
5265号公報等参照)を用いればよいのでここでは説
明を省略する。The ruled line area of the separated table converts the binary image into vector data having start points and end points of characteristic points such as end points, polygonal lines, intersections, and branch points. The method for converting this vector data is based on existing technology (for example, Technical Report PRL83-8, PRL85-24, PRL86-).
89, JP-A-2-210586, JP-A-2-10
5265, etc.) may be used, and the description thereof is omitted here.
【0028】図10aおよび図10bは文字領域抽出処
理部812の抽出処理のフローを示す図である。罫線ベ
クトル化処理部811で得られた罫線ベクトルを縦罫線
VRと横罫線HRに分け(ステップ1001)、それぞ
れをカウントして、縦罫線の数をVに格納し、横罫線を
Hに格納する(ステップ1002)。横罫線の有無を判
定し(ステップ1003)、横罫線がなければ文字領域
数Rを1に設定し、領域の大きさを入力画像の大きさと
する(ステップ1009)。横罫線があれば文字領域数
RをH−1に設定し、iを0に設定する(ステップ10
04)。次に、横罫線をY座標の昇順にソートする(ス
テップ1005)。そして、Y座標の小さい順から文字
領域に番号を割り付けて行く。すなわち、i番目の横罫
線とi+1番目の横罫線で区切られる領域をi番目の文
字領域とする(ステップ1007)。i<Rでなくなっ
たら(ステップ1006)、番号の割り付けが終わり、
図10bに示す垂直方向の罫線による文字領域の処理に
移る。FIGS. 10a and 10b are diagrams showing the flow of the extraction processing of the character area extraction processing unit 812. The ruled line vector obtained by the ruled line vectorization processing unit 811 is divided into vertical ruled lines VR and horizontal ruled lines HR (step 1001), each is counted, the number of vertical ruled lines is stored in V, and the horizontal ruled lines are stored in H. (Step 1002). The presence / absence of a horizontal ruled line is determined (step 1003). If there is no horizontal ruled line, the number of character areas R is set to 1 and the size of the area is set as the size of the input image (step 1009). If there is a horizontal ruled line, the number of character areas R is set to H-1, and i is set to 0 (step 10).
04). Next, the horizontal ruled lines are sorted in ascending order of the Y coordinate (step 1005). Then, numbers are assigned to the character areas in ascending order of the Y coordinate. That is, the area delimited by the i-th horizontal ruled line and the i + 1-th horizontal ruled line is set as the i-th character area (step 1007). When i <R is not satisfied (step 1006), the number assignment is completed,
The process moves to the processing of the character area by the vertical ruled lines shown in FIG. 10b.
【0029】縦罫線の有無を判定し(ステップ101
0)、縦罫線がなければ文字領域数Rを1に設定し、領
域の大きさを入力画像の大きさとする(ステップ101
8)。縦罫線があれば、図10aの処理で求めた横罫線
による文字領域数Rの内容をR1に移し、RにはR+V
−1を設定し、i,j,kをそれぞれ0に設定する(ス
テップ1011)。次に、縦罫線をX座標の昇順にソー
トする(ステップ1012)。そして横罫線で区切られ
た各領域ごとに、縦罫線で区切られた領域を求めて行く
(ステップ1014〜1017)。すなわち、横罫線で
区切られたj番目の領域について、i番目とi+1番目
の縦罫線で区切られる領域をk番目の文字領域とする
(ステップ1013)。この番号付けを順次iおよびk
を1ずつ増加しながら、j番目の領域に縦罫線で区切ら
れた未処理の領域がなくなったと判定されるまで、繰り
返す(ステップ1014,1015)。そして、つぎの
横罫線で区切られた領域について処理するため、jを1
だけ増加させるとともにiを0にクリアする。そして横
罫線で区切られた領域の最後のものについて処理が終わ
るまで、すなわちj<R1ではなくなったと判定される
まで、ステップ1013〜1017を繰り返す。以上の
ようにして、罫線で区切られた文字領域が抽出され、そ
の結果は文字矩形抽出処理部813へ渡される。The presence or absence of vertical ruled lines is determined (step 101
0), if there is no vertical ruled line, the number R of character areas is set to 1 and the size of the area is set as the size of the input image (step 101).
8). If there is a vertical ruled line, the content of the number R of character areas by the horizontal ruled line obtained in the processing of FIG. 10A is transferred to R1, and R + V
-1 is set, and i, j, and k are set to 0 (step 1011). Next, the vertical ruled lines are sorted in ascending order of the X coordinate (step 1012). Then, for each area delimited by the horizontal ruled line, the area delimited by the vertical ruled line is obtained (steps 1014 to 1017). That is, regarding the j-th area delimited by the horizontal ruled lines, the area delimited by the i-th and i + 1-th vertical ruled lines is set as the k-th character area (step 1013). This numbering is sequentially i and k
Is incremented by 1 and repeated until it is determined that there is no unprocessed area delimited by the vertical ruled line in the j-th area (steps 1014 and 1015). Then, in order to process the area separated by the next horizontal ruled line, j is set to 1
And i is cleared to 0. Then, steps 1013 to 1017 are repeated until the processing is completed for the last one of the areas delimited by the horizontal ruled lines, that is, until it is determined that j <R1 is not satisfied. As described above, the character area delimited by the ruled lines is extracted, and the result is passed to the character rectangle extraction processing unit 813.
【0030】文字矩形抽出処理部813以降の処理部の
動作は、基本的には第1の実施例と同じである。ただ、
文字矩形抽出処理および文字ブロック抽出処理は、文字
領域抽出処理部812により抽出された文字領域の情報
を用いて行われる。従って、文字矩形の抽出が容易にな
り、しかも確実となるとともに、文字ブロックについて
も、罫線を挟んで近接している文字を一つのブロックと
して検出する誤りがなくなり、文字ブロックを確実に抽
出することができる。The operation of the processing units after the character rectangle extraction processing unit 813 is basically the same as that of the first embodiment. However,
The character rectangle extraction processing and the character block extraction processing are performed using the information of the character area extracted by the character area extraction processing unit 812. Therefore, the extraction of the character rectangle becomes easier and more reliable, and with respect to the character block, there is no error in detecting characters that are close to each other with the ruled line as one block, and the character block can be reliably extracted. You can
【0031】(第3の実施例)図11は本発明の第3の
実施例を示すブロック図である。この実施例の表認識装
置は、表画像に含まれる文字部分と罫線部分を分離する
文字・罫線分離処理部1110と、文字・罫線分離処理
部1110により分離された罫線画像から表を構成する
罫線によって囲まれる矩形枠を抽出する矩形枠抽出部1
120と、文字・罫線分離処理部1110により分離さ
れた文字画像から表を構成する文字ブロック矩形枠を抽
出する文字ブロック抽出部1130と、矩形枠抽出部1
120により抽出された矩形枠および文字ブロック抽出
部1130により抽出された文字ブロック相互の位置関
係を識別し表の構造を表すデータを作成する位置関係識
別部1140と、位置関係識別部1140により識別さ
れた表の構造を表すデータを記憶する表構造記憶部11
44とを備えている。(Third Embodiment) FIG. 11 is a block diagram showing a third embodiment of the present invention. The table recognition device according to this embodiment includes a character / ruled line separation processing unit 1110 for separating a character portion and a ruled line portion included in a table image, and a ruled line forming a table from the ruled line image separated by the character / ruled line separation processing unit 1110. Rectangular frame extraction unit 1 for extracting a rectangular frame surrounded by
120, a character block extraction unit 1130 for extracting a character block rectangular frame forming a table from the character images separated by the character / ruled line separation processing unit 1110, and a rectangular frame extraction unit 1
The rectangular frame extracted by 120 and the positional relationship identifying unit 1140 that identifies the positional relationship between the character blocks extracted by the character block extracting unit 1130 and creates data representing the structure of the table, and the positional relationship identifying unit 1140 Table structure storage unit 11 for storing data representing the structure of the opened table
44 and.
【0032】矩形枠抽出部1120は、罫線画像をベク
トル化する罫線ベクトル化処理部1121と、罫線ベク
トル化処理部1121の出力する罫線ベクトルを基に、
罫線ベクトルにより囲まれた完全な矩形枠を抽出する完
全矩形枠抽出処理部1122と、罫線の一部が省略され
て矩形枠の一部がない不完全な矩形枠を抽出し足りない
ところを補って矩形枠とする不完全矩形枠抽出処理部1
123とを備えている。The rectangular frame extraction unit 1120, based on the ruled line vectorization processing unit 1121 for vectorizing the ruled line image and the ruled line vector output from the ruled line vectorization processing unit 1121,
A complete rectangular frame extraction processing unit 1122 that extracts a complete rectangular frame surrounded by a ruled line vector, and an incomplete rectangular frame in which some of the ruled lines are omitted and there is no part of the rectangular frame is extracted to compensate for the lack. Incomplete rectangular frame extraction processing unit 1 that creates a rectangular frame
And 123.
【0033】文字ブロック抽出部1130は、字領域抽
出処理部1131と、文字矩形抽出処理部1131と、
文字ブロック矩形抽出処理部矩形抽出部11とを備えて
いる。文字領域抽出処理部1131は、矩形枠抽出部1
120により得られた矩形枠により囲まれた領域をそれ
ぞれ文字領域と決定し、文字・罫線分離処理部1110
からの文字画像を各文字領域ごとに切り出し、文字矩形
抽出処理部1132へ渡す。文字矩形抽出処理部113
2は、文字の書かれている画素の塊を囲む矩形領域を求
めるものである。文字ブロック矩形抽出処理部1133
は、文字矩形抽出処理部1132で求めた各文字矩形間
の距離を求めて、その距離がある閾値より小さな文字矩
形を全て1つの文字ブロックとして統合するものであ
る。The character block extraction unit 1130 includes a character area extraction processing unit 1131, a character rectangle extraction processing unit 1131,
The character block rectangle extraction processing unit rectangle extraction unit 11 is provided. The character area extraction processing unit 1131 is a rectangular frame extraction unit 1.
Each of the areas surrounded by the rectangular frame obtained by 120 is determined as a character area, and the character / ruled line separation processing unit 1110 is executed.
The character image from is cut out for each character area and passed to the character rectangle extraction processing unit 1132. Character rectangle extraction processing unit 113
2 is for obtaining a rectangular area surrounding a block of pixels in which characters are written. Character block rectangle extraction processing unit 1133
Is to obtain the distance between the character rectangles obtained by the character rectangle extraction processing unit 1132 and integrate all the character rectangles whose distance is smaller than a certain threshold value as one character block.
【0034】また、位置関係識別部1140は、矩形枠
抽出部1120により抽出された矩形枠および前記文字
ブロック抽出113により抽出された文字ブロック相互
の位置関係を識別するものであって、構成枠識別処理部
1141と、行抽出処理部1142と、列抽出処理部1
143と、それらの抽出結果を記憶する表構造記憶部1
141からなっている。構成枠識別処理部1141は、
前記矩形抽出手段により抽出した表の罫線から構成され
る矩形枠と文字ブロック抽出手段により抽出された文字
ブロック矩形枠から表を構成する構成枠を識別するもの
である。行抽出処理部1142は、構成枠識別処理部1
141で抽出した表を構成する構成枠の行方向の並びを
識別し、列抽出処理部1143は、構成枠識別処理部1
141で抽出した表を構成する構成枠の列方向の並びを
識別するものである。The positional-relationship identifying unit 1140 identifies the positional relationship between the rectangular frame extracted by the rectangular-frame extracting unit 1120 and the character blocks extracted by the character block extracting 113. Processing unit 1141, row extraction processing unit 1142, column extraction processing unit 1
143 and a table structure storage unit 1 for storing the extraction results thereof
It consists of 141. The configuration frame identification processing unit 1141
The constituent frame forming the table is identified from the rectangular frame composed of the ruled lines of the table extracted by the rectangle extracting means and the character block rectangular frame extracted by the character block extracting means. The line extraction processing unit 1142 includes the component frame identification processing unit 1
The arrangement in the row direction of the constituent frames forming the table extracted in 141 is identified, and the column extraction processing unit 1143 determines that the constituent frame identification processing unit 1
It identifies the arrangement in the column direction of the constituent frames that make up the table extracted in 141.
【0035】以上のように構成された本実施例の動作に
ついて説明する。文字・罫線分離処理部1110は、図
形中の文字と線分を分離する処理と同様の既存の手法を
用いることができる。なお、第2の実施例において挙げ
た特願平3−290299号「文字/図形分離装置」の
技術を用いると、誤りの少ない正確な分離処理をより高
速に行うことができる。ここで分離した罫線画像の情報
は矩形枠抽出部1120に出力され、文字画像の情報は
文字ブロック抽出部1130へ出力される。The operation of this embodiment configured as described above will be described. The character / ruled line separation processing unit 1110 can use an existing method similar to the processing for separating a character and a line segment in a figure. By using the technique of Japanese Patent Application No. 3-290299 "Character / Figure Separation Device" mentioned in the second embodiment, an accurate separation process with few errors can be performed at a higher speed. The information of the ruled line image separated here is output to the rectangular frame extraction unit 1120, and the information of the character image is output to the character block extraction unit 1130.
【0036】罫線画像は罫線ベクトル化処理部1121
でベクトル化される。すなわち、2値画像を、端点、折
れ線、交差点、分岐点などの特徴点を始点および終点と
するベクトルデータに変換する。このベクトルデータに
変換する方法は前掲の既存の技術を用いればよい。変換
された罫線ベクトルデータは、罫線ベクトルにより囲ま
れた完全な矩形枠を抽出する完全矩形枠抽出処理部11
22と、罫線の一部が省略されて矩形枠の一部がない不
完全な矩形枠を抽出し足りないところを補って矩形枠と
する不完全矩形枠抽出処理部1123とに渡される。The ruled line image is a ruled line vectorization processing unit 1121.
Is vectorized with. That is, the binary image is converted into vector data having characteristic points such as end points, polygonal lines, intersections, and bifurcation points as start points and end points. As a method of converting this vector data, the existing technology described above may be used. The converted ruled line vector data is a complete rectangular frame extraction processing unit 11 for extracting a complete rectangular frame surrounded by the ruled line vector.
22 and an incomplete rectangular frame extraction processing unit 1123 that extracts an incomplete rectangular frame in which a part of the ruled lines is omitted and a part of the rectangular frame is omitted to form a rectangular frame.
【0037】完全矩形枠抽出処理部1122は、罫線ベ
クトルデータを基に罫線ベクトルにより囲まれた完全な
矩形枠を取り出す。図12aおよび12bはその処理の
フローチャートである。表の矩形枠は、1つの水平ベク
トルデータの左右に垂直ベクトルデータが接続し、さら
にその下に水平ベクトルデータが接続していることか
ら、各水平ベクトルデータを調べて、条件を満たすベク
トルデータを図14に示す矩形枠構成表に記入する。ま
ず、表を構成する全てのベクトルデータの数を計数する
(ステップ1201)。以下のステップ1202からス
テップ1212の処理を全てのベクトルデータに対して
適用する。矩形枠の上罫線となる水平ベクトルデータV
iを捜す(ステップ1203)。これは、ベクトルデー
タと水平線とのなす角度がある閾値以下であることから
水平なベクトルデータを見つけることができる。ここで
みつけた水平ベクトルデータViは、k番目の矩形枠の
上罫線となる可能性があるので、矩形枠構成表141の
k番目の矩形枠の上罫線の欄にこのベクトルデータVi
を登録する(ステップ1204)。次に矩形枠Wkの右
側の辺を構成するベクトルデータを捜す(ステップ12
05)。すなわち、ベクトルデータViの右端の端点に
接し、かつベクトルデータViに接していないほうの端
点がベクトルデータViより下にあるような垂直ベクト
ルデータをみつける処理を行なう。垂直ベクトルデータ
は、垂線とのなす角度がある閾値以下であることから容
易に求めることができる。このステップで見つけたベク
トルデータは矩形枠Wkの右罫線を構成する可能性があ
るので、矩形枠構成表141のk番目の矩形枠の右罫線
の欄に登録する(ステップ1206)。同様に矩形枠W
kの左罫線を捜し(ステップ1207)、矩形枠構成表
141のk番目の矩形枠の左罫線の欄に登録する(ステ
ップ1208)。さらに、いま求めた右罫線、左罫線の
下側に接するベクトルデータを見つけ(ステップ120
9)、矩形枠構成表141のk番目の矩形枠の下罫線の
欄に登録する(ステップ1210)。以上の処理のう
ち、1つでも罫線が見つからない場合は、矩形枠構成表
141のk番目の矩形枠のすべての登録を破棄して、他
のベクトルデータで構成される矩形枠を登録できるよう
にリセットする。以上の処理を図13の表に適用した時
の矩形枠構成表141は図14のようになる。また、他
の例として図15のような表に対する処理では、矩形枠
構成表141は図16のようになる。さらに、この後の
処理に便利なように矩形枠構成表141を、各矩形枠の
左上隅のX座標、Y座標と矩形の幅と高さで表す矩形枠
テーブル171に書き換える。図14の矩形枠テーブル
は図17の(a)のようになる。The complete rectangular frame extraction processing unit 1122 extracts a complete rectangular frame surrounded by the ruled line vector based on the ruled line vector data. 12a and 12b are a flow chart of the process. In the rectangular frame in the table, vertical vector data is connected to the left and right of one horizontal vector data, and horizontal vector data is connected below it. Therefore, each horizontal vector data is examined and vector data satisfying the condition is searched. Fill in the rectangular frame configuration table shown in FIG. First, the number of all vector data forming the table is counted (step 1201). The processes of steps 1202 to 1212 below are applied to all vector data. Horizontal vector data V that is the upper ruled line of the rectangular frame
Search for i (step 1203). This is because the horizontal vector data can be found because the angle between the vector data and the horizontal line is less than or equal to a certain threshold. Since the horizontal vector data V i found here may become the upper ruled line of the k-th rectangular frame, the vector data V i is written in the column of the upper ruled line of the k-th rectangular frame of the rectangular frame configuration table 141.
Is registered (step 1204). Next, the vector data forming the right side of the rectangular frame W k is searched (step 12).
05). That is, in contact with the right end of the end point of the vector data V i, and the end point of more not in contact with the vector data V i performs the processing of finding the vertical vector data such that below the vector data V i. The vertical vector data can be easily obtained because the angle formed by the perpendicular is less than or equal to a certain threshold. Since the vector data found in this step may form the right ruled line of the rectangular frame W k , it is registered in the right ruled line of the k-th rectangular frame of the rectangular frame configuration table 141 (step 1206). Similarly, a rectangular frame W
The left ruled line of k is searched (step 1207) and registered in the column of the left ruled line of the kth rectangular frame of the rectangular frame configuration table 141 (step 1208). Further, find the vector data that touches the lower sides of the right and left ruled lines that have just been found (step 120).
9), it is registered in the column of the lower ruled line of the kth rectangular frame of the rectangular frame configuration table 141 (step 1210). If at least one ruled line is not found in the above processing, all the registrations of the kth rectangular frame in the rectangular frame configuration table 141 are discarded, and a rectangular frame composed of other vector data can be registered. Reset to. The rectangular frame configuration table 141 when the above processing is applied to the table of FIG. 13 is as shown in FIG. Further, as another example, in the processing on the table shown in FIG. 15, the rectangular frame configuration table 141 becomes as shown in FIG. Further, the rectangular frame configuration table 141 is rewritten to a rectangular frame table 171 represented by the X coordinate, Y coordinate of the upper left corner of each rectangular frame, and the width and height of the rectangle for convenience of the subsequent processing. The rectangular frame table of FIG. 14 is as shown in FIG.
【0038】不完全矩形枠抽出処理部1123は、罫線
の一部が省略されて矩形枠の一部がない不完全な矩形枠
を抽出し足りないところを補って表の矩形枠として取り
出す。図18aおよび18bはその処理のフローチャー
トである。まず、完全矩形枠抽出処理部1122により
抽出された矩形枠の要素として矩形枠構成表に登録され
ているベクトルデータ以外の未登録ベクトルを抽出する
(ステップ1801〜1806)。そのために、まず、
Nにベクトルデータの総数を設定し、i=k=0にクリ
アする(ステップ1801)。ベクトルデータViを取
り出し、矩形枠構成表に登録されているか否かを調べ
(ステップ1803)、登録されていなければベクトル
列VVに登録するとともに(ステップ1804)、カウ
ンタkにより計数する(ステップ1805)。そして次
のベクトルを取り出すためにi=i+1とする(ステッ
プ1806)。ベクトルデータViが矩形枠構成表に登
録されていた場合には、そのまま次のベクトルの処理に
移る(ステップ1806)。iがNに達したとき、すな
わちすべてのベクトルについて未登録ベクトルの登録処
理が終わったら(ステップ1802)、未登録ベクトル
列VV内で、最も近い2つの端点を結ぶ水平/垂直なベ
クトルを補う(ステップ1807)。その補った数をn
とする。ベクトルの総数kをk+nとし、またi=m=
0にクリアする(ステップ1808)。矩形枠の上罫線
となる水平ベクトルデータVViを捜す(ステップ18
10)。これは、ベクトルデータと水平線とのなす角度
がある閾値以下であることから水平なベクトルデータを
見つけることができる。ここでみつけた水平ベクトルデ
ータVViは、m番目の矩形枠Wmの上罫線となる可能性
があるので、不完全矩形枠構成表のm番目の矩形枠の上
罫線の欄にこのベクトルデータVViを登録する(ステ
ップ1811)。次に矩形枠Wmの右側の辺を構成する
ベクトルデータを捜す(ステップ1812)。すなわ
ち、ベクトルデータVViの右端の端点に接し、かつベ
クトルデータVViに接していないほうの端点がベクト
ルデータViより下にあるような垂直ベクトルデータを
みつける処理を行なう。垂直ベクトルデータは、垂線と
のなす角度がある閾値以下であることから容易に求める
ことができる。このステップで見つけたベクトルデータ
は矩形枠Wmの右罫線を構成する可能性があるので、不
完全矩形枠構成表のm番目の矩形枠の右罫線の欄に登録
する(ステップ1813)。同様に矩形枠Wmの左罫線
を捜し(ステップ1814)、不完全矩形枠構成表のm
番目の矩形枠の左罫線の欄に登録する(ステップ181
5)。さらに、いま求めた右罫線、左罫線の下側に接す
るベクトルデータを見つけ(ステップ1816)、不完
全矩形枠構成表のm番目の矩形枠Wmの下罫線の欄に登
録する(ステップ1817)。以上の処理のうち、1つ
でも罫線が見つからない場合は、不完全矩形枠構成表の
m番目の矩形枠Wmのすべての登録を破棄して、他のベ
クトルデータで構成される矩形枠を登録できるようにリ
セットする。図20の(b)は不完全矩形枠構成表の例
を示すもので、これは図19の表の不完全矩形枠部分を
表すものである。さらに、この後の処理に便利なように
不完全矩形枠構成表を、各矩形枠の左上隅のX座標、Y
座標と矩形の幅と高さで表す矩形枠テーブルに書き換え
る。The incomplete rectangular frame extraction processing unit 1123 extracts an incomplete rectangular frame in which a part of the ruled lines is omitted and a part of the rectangular frame is omitted, and the insufficient part is supplemented to extract it as a rectangular frame of the table. 18a and 18b are a flow chart of the process. First, unregistered vectors other than the vector data registered in the rectangular frame configuration table as the elements of the rectangular frame extracted by the complete rectangular frame extraction processing unit 1122 are extracted (steps 1801 to 1806). To do that, first
The total number of vector data is set in N, and i = k = 0 is cleared (step 1801). The vector data V i is taken out, and it is checked whether or not it is registered in the rectangular frame configuration table (step 1803). If it is not registered, it is registered in the vector column VV (step 1804) and counted by the counter k (step 1805). ). Then, i = i + 1 is set to retrieve the next vector (step 1806). If the vector data V i is registered in the rectangular frame configuration table, the process moves to the next vector as it is (step 1806). When i reaches N, that is, when the registration processing of the unregistered vector is completed for all the vectors (step 1802), the horizontal / vertical vector connecting the two nearest endpoints in the unregistered vector string VV is complemented ( Step 1807). The supplemented number is n
And Let k + n be the total number of vectors and i = m =
It is cleared to 0 (step 1808). Search for horizontal vector data VV i which is the upper ruled line of the rectangular frame (step 18).
10). This is because the horizontal vector data can be found because the angle between the vector data and the horizontal line is less than or equal to a certain threshold. Here found horizontal vector data VV i is, m-th rectangular frame W so on is likely to be a border of m, the vector data in the column on borders of the m-th rectangular frame incomplete rectangular frame configuration table to register the VV i (step 1811). Then search for vector data constituting the right side of the rectangular frame W m (step 1812). That is, in contact with the right end of the end point of the vector data VV i, and the end point of more not in contact with the vector data VV i performs the processing of finding the vertical vector data such that below the vector data V i. The vertical vector data can be easily obtained because the angle formed by the perpendicular is less than or equal to a certain threshold. Since the vector data found in this step may form the right ruled line of the rectangular frame W m , it is registered in the right ruled line of the m-th rectangular frame in the incomplete rectangular frame configuration table (step 1813). Similarly looking left border of the rectangular frame W m (step 1814), incomplete rectangular frame configuration table m
It is registered in the left ruled line of the second rectangular frame (step 181).
5). Further, the vector data which touches the lower side of the right ruled line and the left ruled line thus obtained is found (step 1816), and registered in the column of the lower ruled line of the m-th rectangular frame W m of the incomplete rectangular frame configuration table (step 1817). .. If at least one ruled line is not found in the above processing, all the registrations of the m-th rectangular frame W m in the incomplete rectangular frame configuration table are discarded, and a rectangular frame composed of other vector data is deleted. Reset to allow registration. FIG. 20B shows an example of an incomplete rectangular frame configuration table, which represents the incomplete rectangular frame portion of the table in FIG. Further, the incomplete rectangular frame configuration table is set to the X coordinate, Y coordinate of the upper left corner of each rectangular frame for convenience of the subsequent processing.
Rewrite to the rectangular frame table expressed by coordinates, width and height of rectangle.
【0039】次に文字ブロック抽出部1130の処理に
ついて説明する。文字領域抽出処理部1131では、表
の中で罫線で区切られ、文字が書かれているべき矩形を
見つけ文字領域テーブルに登録する。本実施例では、完
全矩形枠抽出部および不完全矩形枠抽出部により矩形枠
が抽出されているので、これを文字領域テーブルに登録
すればよい。図19の例では、2個の完全矩形枠に囲ま
れた文字領域と、4個の不完全矩形枠内の文字領域とが
得られる。他の例としては、図21の(a)のような罫
線の不足している表に対してこの処理は、図21の
(b)のように罫線を補い、図21の(c)のように複
数の文字ブロックを包含する文字領域211を抽出す
る。この後の処理は、ここで求めた文字領域ごとに処理
を進める。このように文字領域を得て、文字領域ごとに
文字ブロックの抽出を行うようにすることにより罫線を
またぐような文字ブロックの抽出を防ぐことができる。Next, the processing of the character block extraction unit 1130 will be described. The character area extraction processing unit 1131 finds a rectangle in which a character should be written and which is delimited by ruled lines, and registers it in the character area table. In the present embodiment, since the rectangular frame is extracted by the complete rectangular frame extraction unit and the incomplete rectangular frame extraction unit, it may be registered in the character area table. In the example of FIG. 19, a character area surrounded by two complete rectangular frames and a character area within four incomplete rectangular frames are obtained. As another example, for a table lacking ruled lines as shown in FIG. 21A, this processing is performed by supplementing the ruled lines as shown in FIG. 21B and then as shown in FIG. A character area 211 including a plurality of character blocks is extracted. Subsequent processing proceeds for each of the character areas obtained here. By thus obtaining the character regions and extracting the character blocks for each of the character regions, it is possible to prevent the extraction of the character blocks that straddle the ruled line.
【0040】次の文字矩形抽出処理1132について説
明する。ここでは、文字領域抽出処理部1131で求め
た各文字領域に対して、文字の書かれている画素の塊を
囲む矩形領域を求める。すなわち、表の画像が背景の画
素値が0、文字/線の画素値が1で書かれている時、画
素値が1である塊を取り出してその矩形領域を求める。
2つの矩形領域が重なってるときは、図3の(b)のよ
うに2つの矩形領域37,38を包含できるような矩形
領域39で表す。なお、文字の矩形領域を抽出する方法
は、既存の技術であるので詳細な説明は省略する。Next, the character rectangle extraction processing 1132 will be described. Here, for each character area obtained by the character area extraction processing unit 1131, a rectangular area enclosing a block of pixels in which characters are written is obtained. That is, when the table image is written with a background pixel value of 0 and a character / line pixel value of 1, a block having a pixel value of 1 is taken out to obtain its rectangular area.
When the two rectangular areas overlap, they are represented by a rectangular area 39 that can include the two rectangular areas 37 and 38 as shown in FIG. Since the method of extracting the rectangular area of the character is an existing technique, detailed description thereof will be omitted.
【0041】さらに文字ブロック矩形抽出処理部113
3では、文字矩形抽出処理部1132で求めた各文字矩
形間の距離を求めて、ある閾値より小さな文字矩形を全
て1つの文字ブロックとして統合する処理を行なう。そ
の処理の詳細は、第1の実施例における文字ブロック矩
形抽出処理部112の処理と基本的には同じであり、図
5aおよび図5bのフローチャートに示されている。こ
のフローチャートについては第1の実施例において既に
説明したので、ここでの説明は省略する。ただ、第1の
実施例の場合はブロックに統合するか否かを前記閾値の
みにより判定していたが、本実施例は文字領域の情報を
参照して同じ文字領域にある場合にのみ一つの文字ブロ
ックに統合する。これにより罫線をまたぐような文字ブ
ロックの抽出を防ぐことができる。Further, the character block rectangle extraction processing unit 113
In step 3, the distance between the character rectangles calculated by the character rectangle extraction processing unit 1132 is calculated, and all the character rectangles smaller than a certain threshold are integrated into one character block. The details of the processing are basically the same as the processing of the character block rectangle extraction processing unit 112 in the first embodiment, and are shown in the flowcharts of FIGS. 5a and 5b. Since this flow chart has already been described in the first embodiment, description thereof will be omitted here. However, in the case of the first embodiment, whether or not to integrate into a block is determined only by the threshold value. However, this embodiment refers to the information of the character area and only if the same character area exists. Integrate into a character block. As a result, it is possible to prevent the extraction of character blocks that cross ruled lines.
【0042】最後に位置関係識別部1140の働きにつ
いて説明する。位置関係識別114はさらに、構成枠識
別処理部1141、行抽出処理1142、列抽出処理1
143の3つの処理部からなる。構成枠識別処理では、
実際に表の構造を構成する枠は、表の罫線から構成され
る矩形枠なのか、文字ブロックの枠なのかを識別し、選
択する処理である。矩形枠の内部には少なくとも1つ以
上の文字ブロックが存在しているはずなので、矩形枠の
内部にある文字ブロックの数を計数して、2つ以上の文
字ブロックが確認された場合は、文字ブロックを構成枠
として登録し、また、1つの文字ブロックだけが存在す
る場合は、矩形枠を構成枠として登録する。Finally, the operation of the positional relationship identifying section 1140 will be described. The positional relationship identification 114 further includes a component frame identification processing unit 1141, a row extraction processing 1142, a column extraction processing 1
It is composed of three processing units 143. In the component frame identification process,
The frame that actually forms the structure of the table is a process of identifying and selecting whether the frame is a rectangular frame composed of ruled lines of the table or a frame of a character block. Since there should be at least one character block inside the rectangular frame, if the number of character blocks inside the rectangular frame is counted and two or more character blocks are confirmed, the A block is registered as a constituent frame, and when only one character block exists, a rectangular frame is registered as a constituent frame.
【0043】図22は上記の構成枠識別処理の詳細を示
すフロー図である。Nに完全矩形枠の総数、Mに文字ブ
ロックの総数を設定し、完全矩形枠wの配列の要素を指
定する変数i、識別した構成枠の配列の要素を指定する
変数C、各完全矩形枠に含まれる文字ブロックを計数す
る変数sをそれぞれ0に設定する(ステップ220
1)。文字ブロックCBjの配列の要素を指定する変数
jと変数sを0に設定する(ステップ2202)。文字
ブロックCBjを取り出し、完全矩形枠Wiに含まれるか
否かを判定し(ステップ2203)、含まれる場合には
sをインクリメントし(ステップ2204)、含まれな
い場合には何もしない。そして、次の文字ブロックを取
り出すためjをインクリメントする(ステップ220
5)。以上のステップ2204〜2205の処理を、順
次、未処理の文字ブロックがなくなったと判定される
(ステップ2206)まで繰り返す。このようにして、
ひとつの完全矩形枠について、すべての文字ブロックを
調べ終わったら、その完全矩形枠に含まれる文字ブロッ
クの数sが複数あるか否かを判定し(ステップ220
7)、複数あっだ場合には、完全矩形枠Wiに含まれる
s個の文字ブロックを構成枠として登録する(ステップ
2208)。s個登録したのでCをC+sとする(ステ
ップ2209)。一方、その完全矩形枠Wiに含まれる
文字ブロックの数sが1であったときは、完全矩形枠W
iをC番目の構成枠として登録し(ステップ221
0)、Cをインクリメントする(ステップ2211)。
以上の処理により、ひとつの完全矩形枠について、関連
する構成枠を識別したら、次に完全矩形枠について同様
の処理を行うためi=i+1とし、ステップ2202に
戻る。i<Nでないとの判定(ステップ2213)がな
されると、すべての処理が終了する。図23の(a)お
よび(b)に、構成枠を抽出した結果の一例を示す。同
図(a)は表の例、(b)は(a)の表から抽出した構
成枠を示す。FIG. 22 is a flow chart showing details of the above-mentioned component frame identification processing. A variable i that specifies the elements of the array of the complete rectangular frame w, where N is the total number of complete rectangular frames and M is the total number of character blocks, variable C that specifies the elements of the identified constituent frame array, and each complete rectangular frame Each variable s for counting the character blocks included in the is set to 0 (step 220).
1). The variables j and s that specify the elements of the array of the character block CB j are set to 0 (step 2202). The character block CB j is extracted, and it is determined whether or not it is included in the complete rectangular frame W i (step 2203). If it is included, s is incremented (step 2204), and if it is not included, nothing is done. Then, j is incremented to fetch the next character block (step 220).
5). The above steps 2204 to 2205 are sequentially repeated until it is determined that there are no unprocessed character blocks (step 2206). In this way
When all the character blocks have been checked for one complete rectangular frame, it is determined whether or not there are a plurality of character blocks s included in the complete rectangular frame (step 220).
7) If there are a plurality of them, s character blocks included in the complete rectangular frame W i are registered as constituent frames (step 2208). Since s pieces have been registered, C is set to C + s (step 2209). On the other hand, when the number s of character blocks included in the complete rectangular frame W i is 1, the complete rectangular frame W i
i is registered as the Cth component frame (step 221).
0) and C are incremented (step 2211).
Through the above processing, when the related constituent frame is identified for one complete rectangular frame, i = i + 1 is set to perform similar processing for the complete rectangular frame, and the process returns to step 2202. When it is determined that i <N is not satisfied (step 2213), all the processes are completed. 23A and 23B show an example of the result of extracting the constituent frames. FIG. 10A shows an example of the table, and FIG. 9B shows the constituent frames extracted from the table of FIG.
【0044】行抽出処理部1142と列抽出処理部11
43では、構成枠識別処理部1141で抽出した表を構
成する枠の並びを識別する。すなわち、全ての構成枠の
中心点の座標を求め、行抽出処理部1142では構成枠
の中心点のY座標がある誤差範囲内に並んでいる構成枠
を表の行と識別し、列抽出処理1143では構成枠の中
心点のX座標がある誤差範囲内に並んでいる構成枠を表
の列と識別する。この処理の詳細は、行抽出処理フロー
を図6aおよび図6bに示し、列抽出処理フローを図7
aおよび図7bに示す。これらの処理の詳細な説明は、
第1の実施例により説明したところと同じである。行抽
出処理152、列抽出処理153の結果を図24と図2
5に示す。Row extraction processing section 1142 and column extraction processing section 11
At 43, the arrangement of the frames forming the table extracted by the configuration frame identification processing unit 1141 is identified. That is, the coordinates of the center points of all the constituent frames are obtained, and the row extraction processing unit 1142 identifies the constituent frames in which the Y coordinates of the central points of the constituent frames are arranged within a certain error range as a row of the table, and performs the column extraction processing. In 1143, the constituent frames in which the X coordinates of the center points of the constituent frames are arranged within a certain error range are identified as columns in the table. The details of this processing are shown in FIG. 6A and FIG. 6B for the row extraction processing flow and in FIG.
a and FIG. 7b. For a detailed description of these processes,
This is the same as that described in the first embodiment. The results of the row extraction processing 152 and the column extraction processing 153 are shown in FIGS.
5 shows.
【0045】このような処理を行なった後に、抽出した
行と列の並びで順に番号付けを行ない、この番号付けに
従って、ワープロの表のデータを記述することで、画像
として入力した表をワープロで編集が可能な表に変換す
ることが可能である。また、構成枠を用いて文字を切り
出すことにより、図24の(a)に示した表のように表
の両脇に罫線が不足している場合、図24の(b)のよ
うに表の第2列目と第3列目が罫線からなる矩形枠で、
残りは文字ブロックであるような構成枠が抽出できる。
線の不足している表も容易に文字認識装置へ入力するこ
とも可能となる。たとえば、図24の(a)に示した表
のように表の両脇に罫線が不足している場合、図24の
(b)のように表の第2列目と第3列目が罫線からなる
矩形枠で、残りは文字ブロックであるような構成枠が抽
出できる。また、図25の(a)に示した表のように縦
の罫線が全てと横罫線の一部が省略されている場合に
は、同図(b)のように構成枠は全て文字ブロックとな
る。また、図26の(a)に示した表のように表の縦罫
線、横罫線の一部が省略されている場合、表の中に罫線
からなる矩形枠を抽出することができるが、さらにその
内部に複数の文字ブロックを含んでいるために、図26
の(b)のようにその構成枠は全て文字ブロックとな
る。図24、図25、図26に示したようにどのタイプ
の表に対しても、本実施例は表の行と列の構造を正確に
取り出すことができる。本実施例では少なくとも罫線が
書かれている表を対象として説明したが、同様の処理を
行なうことにより、罫線をまったく含まない表に対して
も適用しうるものである。さらに、明示的に表として書
かれていない文章、たとえば箇条書の文書に対して、表
としての構造を付加することも可能である。After performing such processing, the extracted rows and columns are numbered in order, and the data of the word processor table is described according to this numbering, so that the table input as an image can be written in the word processor. It is possible to convert it into a table that can be edited. Further, when the characters are cut out by using the configuration frame, when the ruled lines are insufficient on both sides of the table as shown in the table of FIG. 24A, the table of FIG. The second and third columns are rectangular frames with ruled lines,
The rest can be extracted as constituent blocks that are character blocks.
It is also possible to easily input a table lacking lines into the character recognition device. For example, when there are insufficient ruled lines on both sides of the table as shown in the table of FIG. 24 (a), the second and third columns of the table have ruled lines as shown in FIG. 24 (b). It is possible to extract a constituent frame which is a rectangular frame consisting of, and the rest is a character block. Further, when all the vertical ruled lines and part of the horizontal ruled lines are omitted as in the table shown in FIG. 25A, the constituent frames are all character blocks as shown in FIG. 25B. Become. Further, when a part of the vertical ruled lines and the horizontal ruled lines of the table is omitted as in the table shown in FIG. 26A, a rectangular frame composed of ruled lines can be extracted in the table. Due to the fact that it contains multiple character blocks within it, FIG.
As shown in (b), all the constituent frames are character blocks. For any type of table as shown in FIGS. 24, 25, and 26, the present embodiment can accurately extract the row and column structure of the table. In the present embodiment, at least the table in which the ruled lines are written has been described as an object, but by performing the same processing, the present invention can be applied to a table including no ruled lines at all. Furthermore, it is possible to add a structure as a table to a sentence that is not explicitly written as a table, for example, a document of a clause.
【0046】[0046]
【発明の効果】本発明によれば、文字ブロック抽出手段
により抽出された文字ブロック相互の位置関係を位置関
係識別手段により識別する。表における文字ブロックは
表の構成要素として一般に規則正しく整列した位置関係
にあるので、文字ブロック相互の位置関係を見ることに
より表の構造を認識できる。従来は、表の罫線のみに着
目して表を構成する枠を求めていたので、縦罫線、横罫
線の一部または全部に省略のあるような表の構造を正確
に認識することができないという問題があったが、本発
明によれば文字ブロックの並びを用いて表の構造を認識
するので、その問題は解消できる。According to the present invention, the positional relationship between the character blocks extracted by the character block extracting means is identified by the positional relationship identifying means. Since the character blocks in the table generally have a positional relationship in which they are regularly arranged as constituent elements of the table, the structure of the table can be recognized by looking at the positional relationship between the character blocks. In the past, since the frame forming the table was sought by paying attention only to the ruled lines of the table, it is impossible to accurately recognize the structure of the table in which some or all of the vertical ruled lines and the horizontal ruled lines are omitted. Although there is a problem, according to the present invention, since the structure of the table is recognized by using the arrangement of the character blocks, the problem can be solved.
【0047】また、本発明の文字領域抽出手段を設けた
態様によれば、文字領域抽出手段により罫線の情報を用
いて文字領域を抽出し、文字領域ごとに文字ブロックを
抽出する。したがって、罫線を挟んで近接した文字矩形
を一つのブロックとして抽出されるおそれはなく、文字
ブロックを精度よく抽出することができ、ひいては表の
構造を正確に認識することができる。According to the aspect in which the character area extracting means of the present invention is provided, the character area extracting means extracts the character area by using the information of the ruled line, and the character block is extracted for each character area. Therefore, there is no possibility that character rectangles that are close to each other with a ruled line in between will be extracted as one block, the character blocks can be extracted with high accuracy, and the structure of the table can be accurately recognized.
【0048】本発明において、罫線によって囲まれる矩
形枠を抽出する矩形枠抽出手段を設け、位置関係識別手
段において罫線で囲まれた矩形枠と表中の文字ブロック
を同等に扱い各位置関係を識別するようにした態様のも
のにおいては、表の罫線で囲まれた矩形枠と表中の文字
ブロックを同等に扱うことにより、罫線で囲まれていな
い表中の枠であっても、文字ブロックとして表の中の1
つの構成要素であると識別されるので、罫線の一部また
は全部が省略された表も、罫線が全部揃っている表と同
様に正確に認識することができる。In the present invention, a rectangular frame extracting means for extracting a rectangular frame surrounded by ruled lines is provided, and the positional relationship identifying means treats the rectangular frame surrounded by the ruled lines and the character blocks in the table equally and identifies each positional relationship. In such a mode, by treating the rectangular frame surrounded by the ruled lines of the table and the character block in the table equally, even the frame in the table not surrounded by the ruled lines is treated as the character block. 1 in the table
Since it is identified as one component, a table in which some or all of the ruled lines are omitted can be recognized as accurately as a table in which all the ruled lines are complete.
【図1】 本発明の第1の実施例の構成を示す図FIG. 1 is a diagram showing a configuration of a first exemplary embodiment of the present invention.
【図2】 (a)〜(e)は文書中で使われる表の例を
示す図2A to 2E are diagrams showing examples of tables used in a document.
【図3】 (a)および(b)は文字矩形の例を示した
図3A and 3B are diagrams showing an example of a character rectangle.
【図4】 (a)〜(e)は罫線がすべて省略された表
の認識を説明するための図4A to 4E are views for explaining recognition of a table in which all ruled lines are omitted.
【図5a】 文字ブロックの抽出処理のフローを示す図FIG. 5a is a diagram showing a flow of character block extraction processing.
【図5b】 文字ブロックの抽出処理のフローを示す図
(図5aの続き)FIG. 5b is a diagram showing a flow of character block extraction processing (continuation from FIG. 5a).
【図6a】 行抽出処理のフローを示す図FIG. 6a is a diagram showing a flow of a line extraction process.
【図6b】 行抽出処理のフローを示す図(図6aの続
き)FIG. 6b is a diagram showing a flow of line extraction processing (continuation of FIG. 6a).
【図7a】 列抽出処理のフローを示す図FIG. 7a is a diagram showing a flow of column extraction processing.
【図7b】 列抽出処理のフローを示す図(図7aの続
き)FIG. 7b is a diagram showing a flow of column extraction processing (continuation from FIG. 7a).
【図8】 本発明の第2の実施例の構成を示す図FIG. 8 is a diagram showing a configuration of a second exemplary embodiment of the present invention.
【図9】[Figure 9]
【図10a】 第2の実施例における文字領域抽出処理
のフローを示す図FIG. 10a is a diagram showing a flow of character region extraction processing in the second embodiment.
【図10b】 第2の実施例における文字領域抽出処理
のフローを示す図(図10aの続き)FIG. 10b is a diagram showing a flow of character area extraction processing in the second embodiment (sequel to FIG. 10a).
【図11】 本発明の第3の実施例の構成を示す図FIG. 11 is a diagram showing a configuration of a third exemplary embodiment of the present invention.
【図12a】 完全矩形枠抽出処理部の処理フローを示
す図FIG. 12a is a diagram showing a processing flow of a complete rectangular frame extraction processing unit.
【図12b】 完全矩形枠抽出処理部の処理フローを示
す図(図12aの続き)FIG. 12b is a diagram showing a processing flow of the complete rectangular frame extraction processing unit (continuation of FIG. 12a).
【図13】 表を構成するベクトルデータの例を示す図FIG. 13 is a diagram showing an example of vector data forming a table.
【図14】 矩形枠構成表の一例を示す図を示す図FIG. 14 is a diagram showing a diagram showing an example of a rectangular frame configuration table.
【図15】 表を構成するベクトルデータの他の例を示
す図FIG. 15 is a diagram showing another example of vector data forming a table.
【図16】 矩形枠構成表の他の例を示す図FIG. 16 is a diagram showing another example of the rectangular frame configuration table.
【図17】 (a)矩形枠テーブルおよび(b)文字領
域テーブルの一例を示す図FIG. 17 is a diagram showing an example of (a) a rectangular frame table and (b) a character area table.
【図18a】 不完全矩形枠抽出処理のフローを示す図FIG. 18a is a diagram showing a flow of incomplete rectangular frame extraction processing.
【図18b】 不完全矩形枠抽出処理のフローを示す図
(図18aの続き)FIG. 18b is a diagram showing a flow of incomplete rectangular frame extraction processing (continuation of FIG. 18a).
【図19】 一部の罫線が省略された表を構成するベク
トルデータの例を示す図FIG. 19 is a diagram showing an example of vector data forming a table in which some ruled lines are omitted.
【図20】 図19の表に対応する矩形枠構成表の例を
示すもので、(a)は完全矩形枠構成表、(b)は不完
全矩形枠構成表をそれぞれ示す図20 shows an example of a rectangular frame configuration table corresponding to the table of FIG. 19, (a) showing a complete rectangular frame configuration table, and (b) showing an incomplete rectangular frame configuration table.
【図21】 文字領域の抽出を説明するための図FIG. 21 is a diagram for explaining extraction of a character area.
【図22】 構成枠識別処理部の処理のフローを示す図FIG. 22 is a diagram showing a processing flow of a component frame identification processing unit.
【図23】 構成枠、行および列の抽出の例を示した図
で、(a)は右端の縦罫線が省略された表の例、(b)
は抽出された構成枠、(c)は抽出された行、(d)は
抽出された列をそれぞれ示す。FIG. 23 is a diagram showing an example of extraction of a configuration frame, rows, and columns, (a) is an example of a table in which the vertical ruled line at the right end is omitted, (b)
Indicates an extracted constituent frame, (c) indicates an extracted row, and (d) indicates an extracted column, respectively.
【図24】 構成枠、行および列の抽出の他の例を示し
た図で、(a)は左右両端の縦罫線が省略された表の
例、(b)は抽出された構成枠、(c)は抽出された
行、(d)は抽出された列をそれぞれ示す。FIG. 24 is a diagram showing another example of extraction of a configuration frame, rows and columns, where (a) is an example of a table in which vertical ruled lines at the left and right ends are omitted, and (b) is an extracted configuration frame ( c) shows the extracted row, and (d) shows the extracted column, respectively.
【図25】 構成枠、行および列の抽出の他の例を示し
た図で、(a)は縦罫線がすべて省略された表の例、
(b)は抽出された構成枠、(c)は抽出された行、
(d)は抽出された例をそれぞれ示す。FIG. 25 is a diagram showing another example of extraction of a configuration frame, rows and columns, (a) is an example of a table in which all vertical ruled lines are omitted,
(B) is the extracted configuration frame, (c) is the extracted line,
(D) shows each extracted example.
【図26】 構成枠、行および列の抽出の他の例を示し
た図で、(a)は縦罫線および横罫線の一部が省略され
た表の例、(b)は抽出された構成枠、(c)は抽出さ
れた行、(d)は抽出された列をそれぞれ示す。FIG. 26 is a diagram showing another example of extraction of a configuration frame, rows, and columns, (a) is an example of a table in which some vertical and horizontal ruled lines are omitted, and (b) is an extracted configuration. A frame, (c) shows an extracted row, and (d) shows an extracted column, respectively.
11,81…文字ブロック抽出部、111,813…文
字矩形抽出処理部、112,814…文字ブロック矩形
抽出処理部、12,82…位置関係識別部、121,8
21…行抽出処理部、122,822…列抽出処理部、
123,823…表構造記憶部、811…罫線ベクトル
化処理部、812…文字領域抽出処理部、1110…文
字・罫線分離処理部、1120…矩形枠抽出部、112
1…罫線ベクトル化処理部、1122…完全矩形枠抽出
処理部、1123…不完全矩形抽出処理部、1130…
文字ブロック抽出部、1132…文字矩形抽出処理部、
1133…文字ブロック矩形抽出処理部、1140…位
置関係識別部、1141…構成枠識別処理部、1142
…行抽出処理部、1143…列抽出処理部、1144…
表構造記憶部、31,32,33,34…黒画素塊、3
5,36,39…文字矩形、161…構成枠、171…
矩形枠テーブル、172…文字領域テーブル211…文
字領域。11, 81 ... Character block extraction unit, 111, 813 ... Character rectangle extraction processing unit, 112, 814 ... Character block rectangle extraction processing unit, 12, 82 ... Positional relationship identification unit, 121, 8
21 ... Row extraction processing unit, 122, 822 ... Column extraction processing unit,
123, 823 ... Table structure storage unit, 811 ... Ruled line vectorization processing unit, 812 ... Character area extraction processing unit, 1110 ... Character / ruled line separation processing unit, 1120 ... Rectangular frame extraction unit, 112
1 ... Ruled line vectorization processing unit, 1122 ... Complete rectangular frame extraction processing unit, 1123 ... Incomplete rectangle extraction processing unit, 1130 ...
Character block extraction unit 1132 ... Character rectangle extraction processing unit,
1133 ... Character block rectangle extraction processing unit, 1140 ... Positional relationship identification unit, 1141 ... Configuration frame identification processing unit, 1142
... Row extraction processing unit, 1143 ... Column extraction processing unit, 1144 ...
Table structure storage unit, 31, 32, 33, 34 ... Black pixel block, 3
5, 36, 39 ... Character rectangle, 161, ... Composition frame, 171 ...
Rectangular frame table, 172 ... Character area table 211 ... Character area.
Claims (15)
ブロック抽出手段と、 前記文字ブロック抽出手段により抽出された文字ブロッ
ク相互の位置関係を識別し、表の構造を表すデータを生
成する位置関係識別手段とを有することを特徴とする表
認識装置。1. A character block extracting unit for extracting a character block from a table image, and a positional relationship identifying unit for identifying a positional relationship between the character blocks extracted by the character block extracting unit and generating data representing a table structure. A table recognition device having means.
文字・罫線分離手段を設け、前記文字ブロック抽出手段
へ前記文字・罫線分離手段により分離された文字画像を
入力することを特徴とする請求項1記載の表認識装置。2. A character / ruled line separating means for separating a front image into a character image and a ruled line image is provided, and the character image separated by the character / ruled line separating means is input to the character block extracting means. The table recognition device according to claim 1.
かれている画素の塊を囲む矩形領域を求める文字矩形抽
出手段と、文字矩形抽出手段で求めた各文字矩形間の距
離に基づいて1以上の文字矩形を文字ブロックとして統
合する文字ブロック矩形抽出手段を備えたことを特徴と
する請求項1記載の表認識装置。3. The character block extracting means calculates a value of 1 based on a character rectangle extracting means for obtaining a rectangular area surrounding a block of pixels in which characters are written and a distance between the character rectangles obtained by the character rectangle extracting means. The table recognition device according to claim 1, further comprising a character block rectangle extraction unit that integrates the above character rectangles as a character block.
抽出手段で求めた各文字矩形間の距離を求めて、ある閾
値より小さな距離で連続した文字矩形群を1つの文字ブ
ロックとして統合する処理を行うことを特徴とする請求
項3記載の表認識装置。4. The character block rectangle extraction means obtains the distance between the character rectangles obtained by the character rectangle extraction means, and integrates consecutive character rectangle groups with a distance smaller than a certain threshold value into one character block. The table recognition device according to claim 3, wherein the table recognition device is performed.
字と罫線を分離する文字・罫線分離手段と、文字・罫線
分離手段により分離した罫線をベクトル化する罫線ベク
トル化手段と、罫線ベクトル化手段により得られた罫線
のベクトルデータを基に文字が書かれているべき矩形領
域を文字領域として抽出する文字領域抽出手段と、文字
矩形抽出手段で求めた各文字矩形間の距離に基づいて1
以上の文字矩形を文字ブロックとして統合する文字ブロ
ック矩形抽出手段とを備えたことを特徴とする請求項1
記載の表認識装置。5. The character block extraction means is a character / ruled line separation means for separating characters in the table from the ruled lines, a ruled line vectorization means for vectorizing the ruled lines separated by the character / ruled line separation means, and a ruled line vectorization. 1 based on the distance between each character rectangle obtained by the character rectangle extraction means and the character area extraction means for extracting a rectangular area in which a character should be written as a character area based on the ruled line vector data obtained by the means.
A character block rectangle extracting means for integrating the above-mentioned character rectangles as a character block is provided.
The described table recognition device.
抽出手段により抽出された文字ブロック矩形を表の構成
枠とみなし、その構成枠の行方向の並びを識別する行抽
出手段と、前記構成枠の列方向の並びを識別する列抽出
手段を備えたことを特徴とする請求項1記載の表認識装
置。6. The positional relationship identifying means regards the character block rectangle extracted by the character block extracting means as a constituent frame of a table, and the row extracting means for identifying the arrangement of the constituent frame in the row direction; and the constituent frame. 2. The table recognition device according to claim 1, further comprising a column extracting means for identifying the arrangement in the column direction.
標が所定の誤差範囲で同一である構成枠の群を同一の行
として抽出するものであり、前記列抽出手段は各構成枠
の中心のx座標が所定の誤差範囲で同一である構成枠の
群を同一の列として抽出するものであることを特徴とす
る請求項6記載の表認識装置。7. The row extracting means extracts a group of constituent frames having the same y-coordinate of the center of each constituent frame within a predetermined error range as the same row, and the column extracting means extracts each constituent frame. 7. The table recognition device according to claim 6, wherein groups of constituent frames having the same x-coordinate of the center within a predetermined error range are extracted as the same column.
によって囲まれる矩形枠を抽出する矩形枠抽出手段と、 対象とする表領域から文字ブロックを抽出する文字ブロ
ック抽出手段と、 前記矩形枠抽出手段により抽出された矩形枠および前記
文字ブロック抽出手段により抽出された文字ブロック相
互の位置関係を識別する位置関係識別手段と、を有する
ことを特徴とする表認識装置。8. A rectangular frame extracting means for extracting a rectangular frame surrounded by ruled lines forming a table from a target table area, a character block extracting means for extracting a character block from the target table area, and the rectangular frame. A table recognition device comprising: a rectangular frame extracted by the extraction means; and a positional relationship identification means for identifying the positional relationship between the character blocks extracted by the character block extraction means.
文字・罫線分離手段を設け、前記文字ブロック抽出手段
へは前記文字・罫線分離手段により分離された文字画像
を入力し、前記矩形抽出手段へは前記文字・罫線分離手
段により分離された罫線画像を入力することを特徴とす
る請求項8記載の表認識装置。9. A character / ruled line separating means for separating a front image into a character image and a ruled line image is provided, and the character image separated by the character / ruled line separating means is input to the character block extracting means to extract the rectangle. 9. The table recognition device according to claim 8, wherein the ruled line image separated by the character / ruled line separating means is input to the means.
離手段により分離した罫線画像をベクトルデータに変換
する罫線ベクトル化手段と、その罫線ベクトル化手段に
より出力された罫線ベクトルの接続関係を基に矩形枠を
求める第1の矩形枠抽出手段と、一端が他のいずれの罫
線ベクトルにも接続されていない罫線ベクトルから一部
の罫線が省略された矩形枠を推定する第2の矩形枠抽出
手段とを備えたことを特徴とする請求項8記載の表認識
装置。10. The rectangular frame extraction means is based on a ruled line vectorization means for converting the ruled line image separated by the character / ruled line separation means into vector data, and a connection relationship between the ruled line vectors output by the ruled line vectorization means. And a second rectangular frame extracting means for estimating a rectangular frame in which some of the ruled lines are omitted from a ruled line vector whose one end is not connected to any other ruled line vector. 9. The table recognition device according to claim 8, further comprising means.
書かれている画素の塊を囲む矩形領域を求める文字矩形
抽出手段と、その文字矩形抽出手段で求めた各文字矩形
間の距離を求め、その距離に基づいて1以上の文字矩形
を文字ブロックとして統合する文字ブロック矩形抽出手
段を備えたことを特徴とする請求項8記載の表認識装
置。11. The character block extracting means obtains a character rectangle extracting means for obtaining a rectangular area surrounding a block of pixels in which characters are written, and a distance between each character rectangle obtained by the character rectangle extracting means, 9. The table recognition device according to claim 8, further comprising character block rectangle extraction means for integrating one or more character rectangles as a character block based on the distance.
抽出手段の出力を基に、文字が書かれているべき矩形領
域を文字領域として抽出する文字領域抽出手段と、文字
領域抽出手段で求めた各文字領域に対して、文字の書か
れている画素の塊を囲む矩形領域を求める文字矩形抽出
手段と、文字矩形抽出手段で求めた各文字矩形の間の距
離に基づいて1以上の文字矩形を文字ブロックとして統
合する文字ブロック矩形抽出手段とを備えたことを特徴
とする請求項8記載の表認識装置。12. The character block extracting means obtains the character area extracting means for extracting a rectangular area in which a character is to be written as a character area based on the output of the rectangular frame extracting means, and the character area extracting means. For each character area, one or more character rectangles based on the distance between the character rectangle extracting means for obtaining a rectangular area enclosing a block of pixels in which characters are written and each character rectangle obtained by the character rectangle extracting means. 9. The table recognition device according to claim 8, further comprising a character block rectangle extraction unit that integrates as a character block.
出手段により抽出した表の罫線から構成される矩形枠と
文字ブロック抽出手段により抽出された文字ブロック矩
形とから表を構成する構成枠を識別する構成枠識別手段
と、構成枠識別手段で抽出した表を構成する構成枠の行
方向の並びを識別する行抽出手段と、構成枠識別手段で
抽出した表を構成する構成枠の列方向の並びを識別する
列抽出手段を備えたことを特徴とする請求項8記載の表
認識装置。13. The positional relationship identifying means identifies a constituent frame forming a table from a rectangular frame composed of ruled lines of the table extracted by the rectangle extracting means and a character block rectangle extracted by the character block extracting means. And a row extracting means for identifying the arrangement in the row direction of the constituent frames constituting the table extracted by the constituent frame identifying means, and a column direction of the constituent frames constituting the table extracted by the constituent frame identifying means. 9. The table recognition device according to claim 8, further comprising a column extraction unit for identifying a row.
手段により抽出した矩形枠については、その矩形枠内の
文字ブロックを抽出し、複数の文字ブロックがあったと
きは、その複数の文字ブロックをそれぞれ構成枠と決定
し、単一の文字ブロックがあったときは矩形枠を構成枠
と決定する処理を行うことを特徴とする請求項13記載
の表認識装置。14. The component frame identifying means extracts a character block in the rectangular frame extracted by the rectangular extracting means, and when there are a plurality of character blocks, the plurality of character blocks are extracted. 14. The table recognizing device according to claim 13, wherein each of the above is determined as a constituent frame, and when there is a single character block, a process of determining a rectangular frame as a constituent frame is performed.
座標が所定の誤差範囲で同一である構成枠の群を同一の
行として抽出するものであり、前記列抽出手段は各構成
枠の中心のx座標が所定の誤差範囲で同一である構成枠
の群を同一の列として抽出するものであることを特徴と
する請求項13記載の表認識装置。15. The line extracting means is arranged at the center y of each constituent frame.
A group of constituent frames whose coordinates are the same within a predetermined error range is extracted as the same row, and the column extracting means of the constituent frames whose x-coordinates of the centers of the respective constituent frames are the same within a predetermined error range. 14. The table recognition device according to claim 13, wherein the groups are extracted as the same column.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP4161858A JP2926066B2 (en) | 1992-05-29 | 1992-05-29 | Table recognition device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP4161858A JP2926066B2 (en) | 1992-05-29 | 1992-05-29 | Table recognition device |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH05334490A true JPH05334490A (en) | 1993-12-17 |
JP2926066B2 JP2926066B2 (en) | 1999-07-28 |
Family
ID=15743300
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP4161858A Expired - Fee Related JP2926066B2 (en) | 1992-05-29 | 1992-05-29 | Table recognition device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2926066B2 (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002032770A (en) * | 2000-06-23 | 2002-01-31 | Internatl Business Mach Corp <Ibm> | Method and system for processing document and medium |
JP2011123825A (en) * | 2009-12-14 | 2011-06-23 | Fujitsu Frontech Ltd | Character recognition method, character recognition device, and character recognition program |
US8914419B2 (en) | 2012-10-30 | 2014-12-16 | International Business Machines Corporation | Extracting semantic relationships from table structures in electronic documents |
US9164977B2 (en) | 2013-06-24 | 2015-10-20 | International Business Machines Corporation | Error correction in tables using discovered functional dependencies |
US9286290B2 (en) | 2014-04-25 | 2016-03-15 | International Business Machines Corporation | Producing insight information from tables using natural language processing |
US9600461B2 (en) | 2013-07-01 | 2017-03-21 | International Business Machines Corporation | Discovering relationships in tabular data |
US9607039B2 (en) | 2013-07-18 | 2017-03-28 | International Business Machines Corporation | Subject-matter analysis of tabular data |
US9830314B2 (en) | 2013-11-18 | 2017-11-28 | International Business Machines Corporation | Error correction in tables using a question and answer system |
US10095740B2 (en) | 2015-08-25 | 2018-10-09 | International Business Machines Corporation | Selective fact generation from table data in a cognitive system |
US10289653B2 (en) | 2013-03-15 | 2019-05-14 | International Business Machines Corporation | Adapting tabular data for narration |
-
1992
- 1992-05-29 JP JP4161858A patent/JP2926066B2/en not_active Expired - Fee Related
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002032770A (en) * | 2000-06-23 | 2002-01-31 | Internatl Business Mach Corp <Ibm> | Method and system for processing document and medium |
US7046847B2 (en) | 2000-06-23 | 2006-05-16 | International Business Machines Corporation | Document processing method, system and medium |
JP2011123825A (en) * | 2009-12-14 | 2011-06-23 | Fujitsu Frontech Ltd | Character recognition method, character recognition device, and character recognition program |
US8914419B2 (en) | 2012-10-30 | 2014-12-16 | International Business Machines Corporation | Extracting semantic relationships from table structures in electronic documents |
US10303741B2 (en) | 2013-03-15 | 2019-05-28 | International Business Machines Corporation | Adapting tabular data for narration |
US10289653B2 (en) | 2013-03-15 | 2019-05-14 | International Business Machines Corporation | Adapting tabular data for narration |
US9569417B2 (en) | 2013-06-24 | 2017-02-14 | International Business Machines Corporation | Error correction in tables using discovered functional dependencies |
US9164977B2 (en) | 2013-06-24 | 2015-10-20 | International Business Machines Corporation | Error correction in tables using discovered functional dependencies |
US9600461B2 (en) | 2013-07-01 | 2017-03-21 | International Business Machines Corporation | Discovering relationships in tabular data |
US9606978B2 (en) | 2013-07-01 | 2017-03-28 | International Business Machines Corporation | Discovering relationships in tabular data |
US9607039B2 (en) | 2013-07-18 | 2017-03-28 | International Business Machines Corporation | Subject-matter analysis of tabular data |
US9830314B2 (en) | 2013-11-18 | 2017-11-28 | International Business Machines Corporation | Error correction in tables using a question and answer system |
US9286290B2 (en) | 2014-04-25 | 2016-03-15 | International Business Machines Corporation | Producing insight information from tables using natural language processing |
US10095740B2 (en) | 2015-08-25 | 2018-10-09 | International Business Machines Corporation | Selective fact generation from table data in a cognitive system |
Also Published As
Publication number | Publication date |
---|---|
JP2926066B2 (en) | 1999-07-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6006240A (en) | Cell identification in table analysis | |
US5907631A (en) | Document image processing method and system having function of determining body text region reading order | |
US5668892A (en) | Table recognition apparatus | |
JPH05242292A (en) | Separating method | |
JPH01292486A (en) | Device for recognizing character | |
JPH05225378A (en) | Area dividing system for document image | |
JP2926066B2 (en) | Table recognition device | |
Saitoh et al. | Document image segmentation and layout analysis | |
JP3904397B2 (en) | Table recognition method | |
JPH06131497A (en) | Table recognition system | |
KR100331035B1 (en) | Automatic Analysis of Format Document Image | |
JPH0452783A (en) | Graphic reader | |
JPH03126188A (en) | Character recognizing device | |
JP3009237B2 (en) | Feature extraction method | |
JP2918363B2 (en) | Character classification method and character recognition device | |
JPS63126082A (en) | Character recognition method | |
KR950011065B1 (en) | A character recognition method | |
JP3428504B2 (en) | Character recognition device | |
JPH05120483A (en) | Character recognizing device | |
CN116958995A (en) | Segmentation method based on character plane position information | |
JP2795222B2 (en) | Character extraction method and character extraction device | |
JPH03177985A (en) | Registering method for character data | |
JPS63131287A (en) | Character recognition method | |
JPH0334081A (en) | Drawing reader | |
JPH03113688A (en) | Drawing reading device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080514 Year of fee payment: 9 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090514 Year of fee payment: 10 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100514 Year of fee payment: 11 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110514 Year of fee payment: 12 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120514 Year of fee payment: 13 |
|
LAPS | Cancellation because of no payment of annual fees |