JP2008108114A - Document processor and document processing method - Google Patents
Document processor and document processing method Download PDFInfo
- Publication number
- JP2008108114A JP2008108114A JP2006291180A JP2006291180A JP2008108114A JP 2008108114 A JP2008108114 A JP 2008108114A JP 2006291180 A JP2006291180 A JP 2006291180A JP 2006291180 A JP2006291180 A JP 2006291180A JP 2008108114 A JP2008108114 A JP 2008108114A
- Authority
- JP
- Japan
- Prior art keywords
- area
- data
- item name
- document
- name column
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Character Discrimination (AREA)
Abstract
Description
本発明は文書解析技術に関し、特に文書内に表された表を読み取りデータを取得するための文書処理装置およびそれに適用される文書処理方法に関する。 The present invention relates to a document analysis technique, and more particularly to a document processing apparatus for reading a table represented in a document and acquiring data, and a document processing method applied thereto.
近年、手書きの書類や印刷された文書を機械的に読み取り、文字を認識するOCR(Optical Character Reader)の技術が一般化してきた。これによりユーザは、紙面に書かれた内容を電子データとして保存したり、出力結果を表計算のソフトウェアに読み込ませて計算を行ったりすることができるようになった。 In recent years, OCR (Optical Character Reader) technology for mechanically reading handwritten documents and printed documents and recognizing characters has become common. As a result, the user can save the contents written on the paper as electronic data, or read the output result into a spreadsheet software and perform the calculation.
また、紙面上の表を認識する技術は帳簿の自動管理や現金自動振込みなど身近な環境で利便性を発揮している。一般的に用いられる表は、罫線で囲まれた矩形の領域をさらに罫線で細分化して得られる複数の矩形領域を、項目名欄(以後、タイトルセルと呼ぶ)およびデータ欄(以後、データセルと呼ぶ)として使用することにより、項目とデータの対応付けを表している。したがって表を認識するためにはタイトルセルとデータセルとの区別、およびその対応関係を把握する必要がある。表認識の最も簡単な形態としては、あらかじめタイトルセルにのみ記入のある帳票等を読み込み、タイトルセルおよび対応するデータセルの位置と、項目名とを記憶しておく場合がある。この場合は、実際に入力された帳票のデータセルの位置にある文字列や数列などを読み取ることにより容易に項目とデータとの対応を取得することができる。 In addition, the technology for recognizing tables on paper is useful in familiar environments such as automatic book management and automatic cash transfer. A commonly used table is that a rectangular area surrounded by ruled lines is further subdivided by ruled lines into a plurality of rectangular areas, an item name column (hereinafter referred to as title cell) and a data column (hereinafter referred to as data cell). By using it as an item, it indicates the correspondence between items and data. Therefore, in order to recognize the table, it is necessary to understand the distinction between the title cell and the data cell and the corresponding relationship. As the simplest form of table recognition, there is a case where a form or the like that is filled in only in the title cell is read in advance and the position of the title cell and the corresponding data cell and the item name are stored. In this case, the correspondence between the item and the data can be easily obtained by reading a character string or a numeric string at the position of the data cell of the actually input form.
この形態は、あらかじめ読み込んだ帳票と同一様式の帳票のみ認識が可能である。一方、表構造のバリエーションを許容できる技術も開発されている。例えば、各矩形領域の枠の辺の長さなどを比較することによりタイトルセルとデータセルとを区別する手法や、あらかじめタイトルセルに記載されるであろう「氏名」や「住所」などの文字列を辞書に登録しておくことにより、登録された文字列が記載されたセルをタイトルセルと判定する手法などがある(例えば特許文献1、特許文献2、非特許文献1参照)。
ところが上述のような技術では、多少のバリエーションは許されるものの、構造の種類や項目名が限定的であり、あくまで最初に想定した範囲内の表を処理することが前提であるため、汎用性に乏しい。汎用性を向上させるためには様々な表の種類に応じた多数の情報をあらかじめ準備しておかなければならず、開発コストが増大する。またこれらの技術は、罫線に囲まれた矩形によって各セルの存在を認識するため、横方向の罫線のみ引かれた表や、罫線が引かれず文字の間隔のみで各セルを表した表などは認識できない。 However, with the technologies described above, although some variations are allowed, the types of structures and item names are limited, and it is assumed that the table within the initially assumed range is processed, so it is versatile. poor. In order to improve versatility, a large amount of information corresponding to various types of tables must be prepared in advance, which increases the development cost. In addition, since these technologies recognize the existence of each cell by a rectangle surrounded by ruled lines, a table in which only horizontal ruled lines are drawn or a table in which each cell is represented by only the character spacing without drawing ruled lines is used. I can't recognize it.
本発明はこうした状況に鑑みてなされたものであり、その目的は、汎用性が高く導入コストの低い表認識技術を提供することにある。 The present invention has been made in view of such circumstances, and an object of the present invention is to provide a table recognition technique having high versatility and low introduction cost.
本発明のある態様は、文書処理装置に関する。この文書処理装置は、文書の画像データに含まれる表を認識し、当該表の記載内容の読み出しを行う文書処理装置であり、文書の画像データから処理対象の表の画像データを抽出する表抽出部と、処理対象の表の画像データから項目名欄の領域を所定の判定手法により特定し、当該項目名欄の領域の全体形状について画像解析を行うことにより、処理対象の表に含まれ独立した表の形式を有する部分表に分割する領域分割部と、部分表ごとに項目名欄およびデータ欄から記載内容を読み出し、項目名欄およびデータ欄との対応関係に基づき当該記載内容を対応付けたデータを作成するデータ抽出部と、を備えたことを特徴とする。 One embodiment of the present invention relates to a document processing apparatus. This document processing device is a document processing device that recognizes a table included in image data of a document and reads out the contents of the table, and extracts table data to be processed from the image data of the document. By identifying the area of the item name column from the image data of the copy and the table to be processed by a predetermined determination method, and performing image analysis on the entire shape of the area of the item name column to be included in the table to be processed independently. Read the description from the item name column and data column for each partial table, and associate the description content based on the correspondence between the item name column and the data column. And a data extraction unit for creating the data.
ここで「全体形状」は罫線による区分けの情報を持たない項目名欄の「かたまり」の形状でよいが、孤立した1つの項目名欄であっても「全体形状」を構成しうる。また「全体形状」は1つの連続した領域の形状であってもよいし、2つ以上の領域の形状を含んでもよい。 Here, the “whole shape” may be the shape of the “chunk” in the item name field that does not have the classification information by ruled lines, but even an isolated item name field can constitute the “whole shape”. The “overall shape” may be the shape of one continuous region or may include the shape of two or more regions.
本発明の別の態様は、文書処理方法に関する。この文書処理方法は、文書の画像データに含まれる表を認識し、当該表の記載内容の読み出しを行う文書処理方法であり、文書の画像データから処理対象の表の画像データを抽出するステップと、処理対象の表の画像データから項目名欄の領域を所定の判定手法により特定し、当該項目名欄の領域の全体形状について画像解析を行うことにより、処理対象の表に含まれ独立した表の形式を有する部分表に分割するステップと、部分表ごとに項目名欄およびデータ欄から記載内容を読み出し、項目名欄およびデータ欄との対応関係に基づき当該記載内容を対応付けたデータを作成するステップと、を含むことを特徴とする。 Another aspect of the present invention relates to a document processing method. The document processing method is a document processing method for recognizing a table included in image data of a document and reading out the contents of the table, and extracting the image data of the table to be processed from the image data of the document; By identifying the area of the item name column from the image data of the table to be processed by a predetermined determination method and performing image analysis on the entire shape of the area of the item name column, an independent table included in the table to be processed Step to divide into partial tables having the format of, read out the description content from the item name column and data column for each partial table, and create data that correlates the description content based on the correspondence with the item name column and data column And a step of performing.
なお、以上の構成要素の任意の組合せ、本発明の表現を方法、装置、システムなどの間で変換したものもまた、本発明の態様として有効である。 It should be noted that any combination of the above-described constituent elements and a representation of the present invention converted between a method, an apparatus, a system, etc. are also effective as an aspect of the present invention.
本発明によれば、汎用性の高い表認識技術を低コストで実現できる。 According to the present invention, a highly versatile table recognition technique can be realized at low cost.
図1は本実施の形態における文書処理装置の全体的な構成を示している。文書処理装置100は、文書画像のデータなどを入力する入力部62、文書画像中に含まれる表を認識し、示されたデータを読み取る文書解析部10、表の認識に必要な情報などを記憶した記憶部60、表から読み取ったデータを適切な形式で出力する出力部64を含む。これらの機能ブロックはバス66を介して相互にデータの授受を行う。
FIG. 1 shows the overall configuration of a document processing apparatus according to this embodiment. The
入力部62はユーザが処理に係る入力を行うユーザインターフェースであり、キーボード、ポインティングデバイスなど一般的な入力装置のいずれかまたは組み合わせを含む。また、文書を読み込み2次元の画像データとして取得するスキャナーを含んでいてもよい。さらに、画像化した文書の処理を行う図示しない画像文書処理機能の出力ブロックを入力部62に含んでもよい。スキャナや画像文書処理機能の出力ブロックより取得した文書画像のデータ、または、ユーザが記憶部60などにあらかじめ記憶させ、キーボードなどにより指定した文書画像のデータのファイル名が、処理対象文書画像の情報として文書解析部10に提供される。
The
文書解析部10は文書処理装置100の主たる動作を掌るブロックであり、文書画像のデータから表データを抽出し、所定の処理を施すことにより解析を行って、タイトルセルとデータセルに記載された内容およびその対応関係を取得する。このとき文書解析部10はまず表を大域的に解析することで当該表を部分表に分割する。部分表とは文書画像から抽出した表に含まれ、タイトルセルおよびデータセルを有するそれ自体で独立して1つの表とすることのできる部分である。表がそれ以上分割できない場合は分割せずに当該表を部分表とする。そして部分表ごとに局所的な解析を行うことによりデータとその対応関係を取得する。
The
記憶部60はハードディスクなどの記憶装置、CD−ROMやMDなどの記録媒体およびそれらの読取装置などのいずれかまたは組み合わせを含む。記憶部60には、文書解析部10が表を部分表に分割するために行う照合処理に用いる表構造のテンプレートを記憶させる。さらに文書解析部10などを動作させるためのコンピュータプログラムや、処理対象たる文書画像のデータを記憶させてもよい。
The
出力部64はディスプレイおよびそれを制御するディスプレイコントローラを含む。処理を開始したり文書画像のファイル名を指定したりするための受け付け画面を表示させるなど、入力部62の補助たる機能も有する。さらに文書解析部10が取得したタイトルセルとデータセルに記載された内容およびその対応関係を適切な形式でデータ化したものを、図示しない別の機能ブロックなどに出力するインターフェースであってもよい。別の機能ブロックとは表計算や文書作成など当該データを利用してさらに別の処理を行うシステムの入力ブロックなどである。したがって適切な形式とはそのような機能ブロックが処理可能な形式である。出力部64の制御のもと、得られたデータを記憶部60やその他の記憶装置に出力し、データベースとして記憶させるようにしてもよい。
The
図2は文書解析部10の構造をより詳細に示している。ここに示す各ブロックは、ハードウェア的には、コンピュータのCPUをはじめとする素子や機械装置で実現でき、ソフトウェア的にはコンピュータプログラム等によって実現されるが、ここでは、それらの連携によって実現される機能ブロックを描いている。したがって、これらの機能ブロックはハードウェア、ソフトウェアの組合せによっていろいろなかたちで実現できることは、当業者には理解されるところである。
FIG. 2 shows the structure of the
文書解析部10は解析処理部12とメモリ30を含む。解析処理部12は画像取得部14、表抽出部16、領域分割部18、セル分割部20、およびデータ抽出部22を含む。画像取得部14は入力部62から入力された文書画像のデータ、あるいは入力部62により指定され記憶部60に記憶された文書画像のデータを読み出し、メモリ30に保存する。
The
表抽出部16は文書画像のデータから表の領域のデータを抽出する。例えば文書画像を走査して連結した罫線集合を求め、その外接矩形を表の領域として認識し抽出を行う。なお、以後説明する機能ブロックでは、基本的にはメモリ30に保存されたデータを取得し、処理を施してメモリ30に保存し直す、という手順を踏むが、メモリ30に対する入出力についてはその説明を省略する場合がある。
The
領域分割部18は表の全領域のうちタイトルセルが存在する領域(以後、タイトル領域と呼ぶ)を特定し、その領域の全体形状を2次元図形として画像解析することにより、部分表の境界を決定し分割する。例えば背景色が施されている領域、色など背景の属性が他と異なる領域、文字列と数列が認識された場合に文字列のみが存在する領域、文字列が太字であるなど所定の字体である領域、隣接する罫線が他よりも太い領域などのいずれか、またはそれらの組み合わせを、タイトル領域の判定手法に用いることにより特定する。
The
タイトル領域の判定基準としてはこのほかに、日本語仮名漢字、アルファベットといった文字列の文字種、文字サイズ、文字色、アンダーラインなどの文字飾りといった文字列の属性、右寄せ、左寄せ、中央寄せといった文字列の配置、字面、文字数、日付など特定の文字列パターンといった文字列そのもの、罫線の線種や色といった属性、罫線の有無などに基づいてもよい。 Other criteria for determining the title area include character types of character strings such as Japanese kana and kanji, alphabet, character string attributes such as character size, character color, character decoration such as underline, character strings such as right justification, left justification, and center justification It may be based on the character string itself such as a specific character string pattern such as the layout of the character, the face, the number of characters, the date, the attribute such as the line type and color of the ruled line, the presence or absence of the ruled line, and the like.
さらに表全体のうち左側、上側にあるなど、領域の位置情報を考慮してもよい。また、タイトル領域の特定は、上記のような判定手法を全て試行することにより総合的に判断してもよいし、ユーザに判定手法の選択を行わせたり、様々な判定手法によって導出されたタイトル領域の候補から選択させたりすることによって最終的な判断を行ってもよい。 Furthermore, the position information of the area may be considered, such as being on the left side or the upper side of the entire table. In addition, the title area may be determined comprehensively by trying all of the above-described determination methods, or the titles derived by various determination methods may be selected by allowing the user to select a determination method. The final determination may be made by selecting from the region candidates.
また部分表は、記憶部60からメモリ30に読み出した表構造のテンプレートを参照して認識する。テンプレートは部分表の構造の候補であり、基本となる表を画像データとして用意する。ここでは、前段で特定したタイトル領域と、テンプレートにおけるタイトル領域の形状とを比較することにより、テンプレートのいずれかに合致した領域を各部分表の領域として特定する。この処理で着目する箇所はタイトル領域の大域的な形状、すなわち配置であるため、表に含まれる罫線の情報や各セルの内容は使用しなくてもよい。具体例については後に詳述する。
The partial table is recognized with reference to a table-structured template read from the
セル分割部20は、各部分表の領域に罫線の情報を付加することにより部分表を各セルに分割する。罫線が引かれていない場合は各文字列や数列の間隔によってセルの境界を決定して分割する。本実施の形態において、罫線はタイトル領域の特定には用いず、縦および横のセルの境界を決定するのに用いられるため、データの間隔など他の情報で容易に代替することが可能である。 The cell dividing unit 20 divides the partial table into cells by adding ruled line information to the area of each partial table. When the ruled line is not drawn, the cell boundary is determined according to the interval between each character string or several strings, and divided. In the present embodiment, ruled lines are not used to specify the title area, but are used to determine the boundaries between the vertical and horizontal cells, so that they can be easily replaced with other information such as data intervals. .
データ抽出部22は分割したセルのそれぞれから文字列、数列などを読み取り、認識する。ここでは一般的に用いられる文字認識の手法のいずれかを採用すればよい。領域分割部18において表を部分表に分割する際、タイトルセルの位置は把握済みであるため、タイトルセルに記載の文字列などと、データセルに記載の数列などとを対応づけて出力データとし、出力部64に提供する。
The
次に領域分割部18、セル分割部20、データ抽出部22が行う処理について具体的に説明する。なおここで示す表および処理手順は例示であり、本実施の形態を限定するものではない。図3は表抽出部16が文書画像のデータから抽出した処理対象の表の構造例を示している。処理対象表70は、タイトルセル72a、72b、72c、およびデータセル74a、74b、74cを含む。同図では斜線パターンを施したセルをタイトルセル、白抜きのセルをデータセルとして示しているが、図を煩雑にしないため代表するそれぞれ3つのセルのみに符号を付している。また各セルには文字列や数列などが記載されているがここでは図示を省略している。この例では処理対象表70は5行5列のセルによって構成されている。
Next, the processing performed by the
タイトルセルは、タイトルセル72aを含む最も左の1列を構成する5つのセル、タイトルセル72bを含む左から4列目の上から3つのセル、およびタイトルセル72cを含む上から3行目の1行を構成するセルである。それ以外のセル、すなわちデータセル74aを含む2行2列の4つのセル、データセル74bを含む2行1列の2つのセル、データセル74cを含む2行4列の8つのセルがデータセルである。
The title cell includes five cells constituting the leftmost column including the
このような処理対象表70に対し、領域分割部18、セル分割部20、データ抽出部22は次に述べる処理を行う。図4〜図7は領域分割部18およびセル分割部20が処理対象表70の分割を行う様子を模式的に示している。まず図4に示すように、領域分割部18は、図3に示した処理対象表70のうちタイトル領域73を特定する。特定は上述したように背景色の有無、セル内の記載が文字列か数列か等、あるいはそれらの組み合わせに基づき行うが、ここでは一例としてタイトルセルにのみ背景色が施されていた場合について主に説明する。
For such a processing target table 70, the
このとき領域分割部18は、処理対象表70の画像データのうち、罫線および各セル内に記載された文字列、数列などの前景を除去した、図4に示す前景除去画像76の画像データを生成しメモリ30に保存する。この際、各画素値の濃度に対するヒストグラムを生成することにより、前景および背景の濃度のしきい値を求め、それを超えた濃度の画素値を近隣の画素値と置き換えるなど一般的な除去手法を用いてよい。前景除去画像76はおよそ背景色の画素値と白抜きの画素値とのいずれかを有する画素で構成されるため、結果としてタイトル領域73の全体形状を得ることができる。このときノイズ除去処理を施して得られた2値画像を前景除去画像76としてもよい。
At this time, the
文字の種類や形状をタイトル領域の判定手法とする場合は、罫線やセルの間隔に基づく境界線によってタイトル領域73を特定し、当該領域に所定の画素値、例えば「1」を代入し、その他の領域に別の画素値、例えば「0」を代入した2値画像を前景除去画像76としてもよい。
When the type and shape of the character are used as the title region determination method, the
次に領域分割部18は図5に示すように、記憶部60が記憶した表構造のテンプレートデータ78と前景除去画像76とを照合していくことにより部分表を特定する。テンプレートデータとしては例えば、タイトル列のみを含む表78a、タイトル行のみを含む表78b、およびタイトル行およびタイトル列の双方を含む表78cの画像データを用意する。そして前景除去画像76の左上から一般的なテンプレートマッチングを行っていくことにより、部分表への分割を実施する。なおテンプレートデータは上記構造に限らず、例えば様々な構造の処理対象表で試行を行うことにより必要なものを様々に決定してよい。タイトル領域だけからなるテンプレートやデータ領域だけからなるテンプレートを含めてもよい。またパターンマッチングにおいて縦横に伸縮処理を施すことが可能なため、テンプレートデータは例えば正方形の表の画像データなどでよい。
Next, as shown in FIG. 5, the
図5では、前景除去画像76のうち左上の領域82aおよび右上の領域82bがタイトル列のみを含む表78aと合致し、下の領域82cがタイトル行およびタイトル列の双方を含む表78cと合致している。例えば表の最も右側にタイトル領域が存在するなど、テンプレートデータのいずれとも合致しない領域が存在する場合は、その部分をデータセルと考えて隣接する部分表に含めることもできる。このようにテンプレートデータを用いることにより、タイトル領域の誤認識をスクリーニングすることもできる。
In FIG. 5, the upper
前景除去画像76をテンプレートデータ78と照合する際、前景除去画像76のうち同一の左上角を有する領域でも複数のテンプレートと合致したり、合致する領域が複数通り存在する場合が考えられる。このような場合に備え、どのテンプレート、どの領域を優先するかについてあらかじめ規則を設定しておく。例えば、合致する領域が縦長より横長となる方を優先させる。すなわち、図6のような前景除去画像76aに対しては、図5の78cのようなテンプレートが合致する領域として、点線で囲んだ領域90と一点鎖線で囲んだ領域92とが存在するが、横長である点線で囲んだ領域90を優先させて部分表とする。この規則は正確な部分表分割における経験則に基づいている。
When the
さらに、合致する領域の面積が大きい方を優先させてもよい。また、タイトル領域とデータ領域の双方を含むテンプレートを優先させたり、各テンプレートに優先順位を付与してもよい。以上のような規則のいずれか、またはその組み合わせを、想定される処理対象表70などを考慮した実験などによって最適なものをあらかじめ設定しておく。 Furthermore, priority may be given to the larger area of the matching region. Further, a template including both the title area and the data area may be given priority, or a priority order may be given to each template. Any one of the above rules or a combination thereof is set in advance by an experiment or the like considering the assumed processing target table 70 or the like.
また、照合は前景除去画像76の左上から行わなくてもよい。例えば前景除去画像76の左上、左下、右上、右下の4箇所でそれぞれ照合を行い、合致した領域の面積がより大きい部分を部分表として分割し、さらに同様の照合を繰り返すようにしてもよい。
The collation need not be performed from the upper left of the
領域分割部18は上述のようにテンプレートデータと照合することによって特定した部分表をなす領域82a、82b、82cの画像データを、それぞれ独立した表のデータとしてメモリ30に保存する。この際、処理対象表70と部分表をなす各領域との相対位置情報も保存しておく。
The
次にセル分割部20は、メモリ30に保存された部分表の領域ごとに、処理対象表70に付加されていた罫線および文字列、数列を当てはめ、図7に示すようなセルが区分けされた複数の部分表84a、84b、84cのデータを生成する。なおここでも各セルに記載された文字列および数列の図示を省略している。部分表84a、84b、84cは、部分表をなす各領域82a、82b、82cの処理対象表70に対する相対位置情報を基に、各画素値を処理対象表70の対応する画素の画素値に戻すことによって得られる。さらに罫線がある場合はそれをセルの境界線とし、罫線がない場合は文字列および数列のみを当てはめ、その間隔の中心線などを境界線とすることによってセル単位に分割する。
Next, the cell dividing unit 20 applies the ruled lines, character strings, and number sequences added to the processing target table 70 for each area of the partial table stored in the
データ抽出部22は、部分表84a、84b、84cの各セルに対し、一般的な文字認識処理を施すことより文字列および数列を読み出す。このとき、タイトルセルおよびデータセルとの境界はすでに判明しているため、タイトルセルに記載された文字列などと、その他のセルに記載された数列などとの対応づけは容易に行うことができる。またタイトルセルの配置も判明しているため、行または列内での対応か、行および列の交差による対応かを容易に区別することができる。
The
図8は以上述べた領域分割部18、セル分割部20、データ抽出部22が行う処理の手順を示している。まず領域分割部18は表抽出部16が抽出した処理対象表70を取得する(S10)。次に、背景色や文字列の種類などに基づきタイトルセルの領域を特定したうえで、処理対象表70から所定の手法で罫線、文字列、数列などの前景を除去した、前景除去画像76を生成する(S12)。次に記憶部60が記憶したテンプレートデータとのパターンマッチングを行うことにより、前景除去画像76から部分表の領域を特定し分割する(S14、S16)。
FIG. 8 shows a procedure of processing performed by the
次にセル分割部20は、各部分表に罫線、文字列、数列などもとの処理対象表70に記載されていた情報を当てはめることにより、セルに分割する(S18)。そしてデータ抽出部22は各セルに記載されてる文字列または数列を、所定の文字認識手法により読み取り、タイトルセルの記載内容とデータセルの記載内容とを、合致したテンプレートに基づく対応関係を参照して対応付けしながら抽出する(S20)。以上のようにして生成したcsvファイルなどのデータを別のソフトウェアへ入力したり、データベース化したりすることにより、表の内容を適宜電子処理することができる。
Next, the cell dividing unit 20 divides the cells into cells by applying the information described in the original processing target table 70 such as ruled lines, character strings, and numerical sequences to each partial table (S18). Then, the
以上述べた本実施の形態によれば、処理対象たる表の画像データからタイトルセルの配置を示す形状のみに着目してパターンマッチングを施し、画像処理的アプローチから部分表を特定する。これにより罫線が引かれていない表でも構造が単純な部分表に分割することができ、後の解析、すなわちデータの読み取りと対応付けを容易にすることができる。また処理対象表を大局的に解析することから元の画像に歪みや回転がある場合でも、特段の対策処理を行わずにデータ抽出処理までを進捗することができる。 According to the present embodiment described above, pattern matching is performed by focusing only on the shape indicating the arrangement of the title cells from the image data of the table to be processed, and the partial table is specified from the image processing approach. As a result, even a table without ruled lines can be divided into partial tables with a simple structure, and subsequent analysis, that is, data reading and association can be facilitated. In addition, since the processing target table is analyzed globally, even when the original image is distorted or rotated, it is possible to proceed to the data extraction processing without performing special countermeasure processing.
さらにタイトル領域を図形的に導き出すことから、あらかじめタイトルセルに記載される文字列について辞書登録を行う必要がない。さらに基本となる表構造をテンプレートデータとして用意することにより処理対象表を部分領域に分割していくため、いかに複雑な構造を有する表やサイズの大きな表でも同様に処理することが可能となり、あらかじめ全体的な表構造を登録しておく必要がない。さらに種々の手法によりタイトル領域を特定するため、記載された文字列に頼らずタイトル領域を特定でき、あらかじめ項目のみ記入された表を読み込ませるなどの手間を省略できる。結果として低い導入コストで汎用性の高い表認識技術を実現することができる。 Furthermore, since the title area is derived graphically, it is not necessary to perform dictionary registration for the character string described in the title cell in advance. Furthermore, by preparing the basic table structure as template data, the processing target table is divided into partial areas, so it is possible to process even a table having a complicated structure or a large table in advance. There is no need to register the overall table structure. Furthermore, since the title area is specified by various methods, the title area can be specified without relying on the written character string, and the trouble of reading a table in which only items are entered in advance can be omitted. As a result, a highly versatile table recognition technique can be realized at a low introduction cost.
以上、本発明を実施の形態をもとに説明した。この実施の形態は例示であり、それらの各構成要素や各処理プロセスの組合せにいろいろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。 The present invention has been described based on the embodiments. This embodiment is an exemplification, and it will be understood by those skilled in the art that various modifications can be made to combinations of the respective constituent elements and processing processes, and such modifications are also within the scope of the present invention. is there.
例えば、本実施の形態で述べた処理対象表は画素値の情報のみを有するラスタ画像であることを前提として説明したが、より高次の情報を有する画像データであっても本発明を適用できる。より高次の情報とは例えば、位置情報を有する矩形の塗りつぶし情報と位置情報を有する矩形の文字列情報などである。例えば、背景色を施された矩形領域、罫線の幅を有する罫線をなす矩形領域、文字列を囲む最小外接矩形領域のそれぞれを左上角、右下角のxy座標値で表した情報、および文字属性情報を含む文字列の情報からなってもよい。このような情報を有する画像においても、まず背景色を施された矩形領域の情報からなる前景除去画像とテンプレートデータとを照合して部分表に分割する。そして罫線をなす矩形領域や文字列を囲む矩形領域の情報を用いてセルに分割し、セルごとに文字列などを読み出す。これにより、本実施の形態と同様に、容易に汎用性の高い表認識技術を実現できる。 For example, the processing target table described in the present embodiment has been described on the assumption that it is a raster image having only pixel value information, but the present invention can be applied to image data having higher-order information. . The higher-order information includes, for example, rectangular fill information having position information and rectangular character string information having position information. For example, a rectangular area with a background color, a rectangular area forming a ruled line having a ruled line width, and a minimum circumscribed rectangular area surrounding a character string, each of which is represented by xy coordinate values at the upper left corner and the lower right corner, and character attributes It may consist of character string information including information. Even in an image having such information, first, the foreground-removed image made up of the information of the rectangular area with the background color and the template data are collated and divided into partial tables. Then, the information is divided into cells using the information of the rectangular area forming the ruled line and the rectangular area surrounding the character string, and the character string and the like are read for each cell. Thereby, similarly to the present embodiment, a highly versatile table recognition technique can be easily realized.
同様にテンプレートデータもラスタ画像に限らず、タイトル領域の形状を現す情報であればよい。例えば、ベクトル画像でもよいし、矩形を表す文字コードと改行情報を含むテキストデータでもよい。後者の場合、例えば黒塗り矩形をタイトル領域、白塗り矩形をデータ領域として表すことができる。異なるデータ形式を有する前景除去画像とテンプレートデータとの照合のためには、例えば低次の情報を有する側に合わせるように高次の情報のデータ変換を行ってもよいし、それ以外の一般的な解析手法を用いてもよい。テンプレートデータのデータ形式は照合に用いる解析手法やデータを記憶する記憶部の容量などに鑑み決定する。これによりより様々なデータ形式や記憶容量に応じた表認識技術を実現できる。 Similarly, the template data is not limited to a raster image, and may be information that represents the shape of the title area. For example, it may be a vector image or text data including a character code representing a rectangle and line feed information. In the latter case, for example, a black rectangle can be represented as a title area and a white rectangle can be represented as a data area. In order to collate foreground-removed images having different data formats with template data, for example, data conversion of high-order information may be performed so as to match the side having low-order information, or other general data Various analysis methods may be used. The data format of the template data is determined in view of the analysis method used for collation and the capacity of the storage unit for storing the data. Thereby, it is possible to realize a table recognition technique corresponding to various data formats and storage capacities.
10 文書解析部、 12 解析処理部、 14 画像取得部、 16 表抽出部、 18 領域分割部、 20 セル分割部、 22 データ抽出部、 60 記憶部、 62 入力部、 64 出力部、 70 処理対象表、 73 タイトル領域、 76 前景除去画像、 78 テンプレートデータ、 84 部分表、 100 文書処理装置。
DESCRIPTION OF
Claims (8)
前記文書の画像データから処理対象の表の画像データを抽出する表抽出部と、
前記処理対象の表の画像データから項目名欄の領域を所定の判定手法により特定し、当該項目名欄の領域の全体形状について画像解析を行うことにより、前記処理対象の表に含まれ独立した表の形式を有する部分表に分割する領域分割部と、
前記部分表ごとに項目名欄およびデータ欄から記載内容を読み出し、項目名欄およびデータ欄との対応関係に基づき当該記載内容を対応付けたデータを作成するデータ抽出部と、
を備えたことを特徴とする文書処理装置。 A document processing apparatus that recognizes a table included in image data of a document and reads out the contents of the table,
A table extraction unit that extracts image data of a table to be processed from image data of the document;
An area of the item name column is identified from the image data of the table to be processed by a predetermined determination method, and image analysis is performed on the entire shape of the area of the item name column, thereby being included in the table to be processed independently. An area division unit for dividing into partial tables having a table format;
A data extraction unit that reads the description content from the item name column and the data column for each partial table, and creates data in which the description content is associated based on the correspondence relationship between the item name column and the data column;
A document processing apparatus comprising:
前記領域分割部は前記記憶部を参照して、前記処理対象の表における項目名欄の領域の全体形状を、前記構造候補における項目名欄の領域の形状とマッチングさせることにより、前記処理対象の表における前記部分表の境界を特定し、分割を行うことを特徴とする請求項1に記載の文書処理装置。 A storage unit storing one or more types of partial table structure candidates;
The region dividing unit refers to the storage unit, and matches the overall shape of the item name column region in the processing target table with the shape of the item name column region in the structure candidate, thereby The document processing apparatus according to claim 1, wherein a boundary of the partial table in the table is specified and divided.
前記文書の画像データから処理対象の表の画像データを抽出するステップと、
前記処理対象の表の画像データから項目名欄の領域を所定の判定手法により特定し、当該項目名欄の領域の全体形状について画像解析を行うことにより、前記処理対象の表に含まれ独立した表の形式を有する部分表に分割するステップと、
前記部分表ごとに項目名欄およびデータ欄から記載内容を読み出し、項目名欄およびデータ欄との対応関係に基づき当該記載内容を対応付けたデータを作成するステップと、
を含むことを特徴とする文書処理方法。 A document processing method for recognizing a table included in image data of a document and reading out the contents of the table,
Extracting image data of a table to be processed from image data of the document;
An area of the item name column is identified from the image data of the table to be processed by a predetermined determination method, and image analysis is performed on the entire shape of the area of the item name column, thereby being included in the table to be processed independently. Dividing into sub-tables having a table format;
Reading the description content from the item name column and the data column for each partial table, and creating data that associates the description content based on the correspondence relationship between the item name column and the data column;
A document processing method comprising:
前記処理対象の表において特定した前記項目名欄の領域とそれ以外の領域とで異なる画素値を有する2値画像のデータを生成するステップと、
あらかじめ記憶装置に記憶させた、一種類以上の前記部分表の構造候補を、項目名欄の領域とそれ以外の領域とを前記2値画像と同様に区別して表したテンプレートデータと、前記2値画像のデータをマッチングさせることにより、前記処理対象の表における前記部分表の境界を特定するステップを含むことを特徴とする請求項6に記載の文書処理方法。 The dividing step includes:
Generating binary image data having different pixel values in the area of the item name column specified in the table to be processed and other areas;
Template data representing one or more types of partial table structure candidates stored in advance in a storage device, with the item name column area and other areas distinguished in the same manner as the binary image, and the binary The document processing method according to claim 6, further comprising: specifying a boundary of the partial table in the table to be processed by matching image data.
メモリに保存した前記文書の画像データから処理対象の表の画像データを抽出する機能と、
前記処理対象の表の画像データから項目名欄の領域を所定の判定手法により特定し、当該項目名欄の領域の全体形状について画像解析を行うことにより、前記処理対象の表に含まれ独立した表の形式を有する部分表に分割する機能と、
前記部分表ごとに項目名欄およびデータ欄から記載内容を読み出し、項目名欄およびデータ欄との対応関係に基づき当該記載内容を対応付けたデータを作成する機能と、
をコンピュータに実現させるコンピュータプログラム。 A computer program for causing a computer to realize a function of recognizing a table included in image data of a document and reading out the contents described in the table,
A function of extracting image data of a table to be processed from image data of the document stored in a memory;
An area of the item name column is identified from the image data of the table to be processed by a predetermined determination method, and image analysis is performed on the entire shape of the area of the item name column, thereby being included in the table to be processed independently. The ability to divide into sub-tables with table format;
A function of reading the description content from the item name column and the data column for each partial table, and creating data in which the description content is associated based on the correspondence relationship between the item name column and the data column;
A computer program that causes a computer to realize
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006291180A JP2008108114A (en) | 2006-10-26 | 2006-10-26 | Document processor and document processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006291180A JP2008108114A (en) | 2006-10-26 | 2006-10-26 | Document processor and document processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008108114A true JP2008108114A (en) | 2008-05-08 |
Family
ID=39441406
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006291180A Pending JP2008108114A (en) | 2006-10-26 | 2006-10-26 | Document processor and document processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008108114A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015153340A (en) * | 2014-02-19 | 2015-08-24 | 富士ゼロックス株式会社 | Image processor and image processing program |
JP2016103147A (en) * | 2014-11-28 | 2016-06-02 | 京セラドキュメントソリューションズ株式会社 | Answer grading device and answer grading program |
JP2019082814A (en) * | 2017-10-30 | 2019-05-30 | 株式会社インフォディオ | Sheet business form data coding system, image generation device for ocr engine learning and image analysis device |
CN112347831A (en) * | 2019-08-09 | 2021-02-09 | 株式会社日立制作所 | Information processing apparatus and table identification method |
JP2021140831A (en) * | 2018-08-24 | 2021-09-16 | ネットスマイル株式会社 | Document image processing system, document image processing method, and document image processing program |
CN113508393A (en) * | 2019-02-27 | 2021-10-15 | 日本电信电话株式会社 | Information processing apparatus, correlation method, and correlation program |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03179570A (en) * | 1989-07-10 | 1991-08-05 | Hitachi Ltd | Document processing system and automatic program generating method |
JP2001101340A (en) * | 1999-10-04 | 2001-04-13 | Oki Electric Ind Co Ltd | Character reader and character recognition method |
JP2003058556A (en) * | 2001-08-16 | 2003-02-28 | Ricoh Co Ltd | Method, device, and program for extracting title of document picture |
JP2004127203A (en) * | 2002-07-30 | 2004-04-22 | Ricoh Co Ltd | Image processor, image processing method, program for causing computer to execute the method, and computer readable recording medium with the program recorded thereon |
JP2004139484A (en) * | 2002-10-21 | 2004-05-13 | Hitachi Ltd | Form processing device, program for implementing it, and program for creating form format |
-
2006
- 2006-10-26 JP JP2006291180A patent/JP2008108114A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03179570A (en) * | 1989-07-10 | 1991-08-05 | Hitachi Ltd | Document processing system and automatic program generating method |
JP2001101340A (en) * | 1999-10-04 | 2001-04-13 | Oki Electric Ind Co Ltd | Character reader and character recognition method |
JP2003058556A (en) * | 2001-08-16 | 2003-02-28 | Ricoh Co Ltd | Method, device, and program for extracting title of document picture |
JP2004127203A (en) * | 2002-07-30 | 2004-04-22 | Ricoh Co Ltd | Image processor, image processing method, program for causing computer to execute the method, and computer readable recording medium with the program recorded thereon |
JP2004139484A (en) * | 2002-10-21 | 2004-05-13 | Hitachi Ltd | Form processing device, program for implementing it, and program for creating form format |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015153340A (en) * | 2014-02-19 | 2015-08-24 | 富士ゼロックス株式会社 | Image processor and image processing program |
JP2016103147A (en) * | 2014-11-28 | 2016-06-02 | 京セラドキュメントソリューションズ株式会社 | Answer grading device and answer grading program |
JP2019082814A (en) * | 2017-10-30 | 2019-05-30 | 株式会社インフォディオ | Sheet business form data coding system, image generation device for ocr engine learning and image analysis device |
JP7088661B2 (en) | 2017-10-30 | 2022-06-21 | 株式会社インフォディオ | Paper form data conversion system, OCR engine learning image generator and image analyzer |
JP2021140831A (en) * | 2018-08-24 | 2021-09-16 | ネットスマイル株式会社 | Document image processing system, document image processing method, and document image processing program |
CN113508393A (en) * | 2019-02-27 | 2021-10-15 | 日本电信电话株式会社 | Information processing apparatus, correlation method, and correlation program |
CN112347831A (en) * | 2019-08-09 | 2021-02-09 | 株式会社日立制作所 | Information processing apparatus and table identification method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8107727B2 (en) | Document processing apparatus, document processing method, and computer program product | |
EP0434930B1 (en) | Editing text in an image | |
US8824798B2 (en) | Information processing device, computer readable medium storing information processing program, and information processing method | |
EP0654751B1 (en) | Method of analyzing data defining an image | |
JPS61267177A (en) | Retrieving system for document picture information | |
JP4785655B2 (en) | Document processing apparatus and document processing method | |
JP2003288334A (en) | Document processor and document processing method | |
JP2008108114A (en) | Document processor and document processing method | |
JP2021043478A (en) | Information processing device, control method thereof and program | |
JP4227432B2 (en) | Image processing method | |
JP4232679B2 (en) | Image forming apparatus and program | |
JP5950700B2 (en) | Image processing apparatus, image processing method, and program | |
JP6931168B2 (en) | Information processing device, control method, program | |
JP2000322417A (en) | Device and method for filing image and storage medium | |
JPH08320914A (en) | Table recognition method and device | |
JP4518212B2 (en) | Image processing apparatus and program | |
JP2007241355A (en) | Image processor and image processing program | |
JP3898645B2 (en) | Form format editing device and form format editing program | |
JP4517822B2 (en) | Image processing apparatus and program | |
JP4310176B2 (en) | Image processing apparatus, image processing method, and program | |
JP2006134042A (en) | Image processing system | |
JP4213558B2 (en) | Document layout analysis program, computer-readable storage medium storing document layout analysis program, document layout analysis method, and document layout analysis apparatus | |
JP4651407B2 (en) | Image processing apparatus, computer program, and storage medium | |
JP2005208872A (en) | Image processing system | |
JP2006253995A (en) | Image processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20091007 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120223 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120228 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20120807 |