JP2013105344A - Business form processing system and business form processing method - Google Patents
Business form processing system and business form processing method Download PDFInfo
- Publication number
- JP2013105344A JP2013105344A JP2011249165A JP2011249165A JP2013105344A JP 2013105344 A JP2013105344 A JP 2013105344A JP 2011249165 A JP2011249165 A JP 2011249165A JP 2011249165 A JP2011249165 A JP 2011249165A JP 2013105344 A JP2013105344 A JP 2013105344A
- Authority
- JP
- Japan
- Prior art keywords
- frame
- extraction
- character
- extracted
- character line
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Abstract
Description
本発明は、帳票画像を認識するための帳票処理システムに関し、特に、帳票画像に含まれる枠に存在する文字行を抽出して、抽出した文字行を文字認識する帳票処理システムに関する。 The present invention relates to a form processing system for recognizing a form image, and more particularly to a form processing system that extracts a character line existing in a frame included in a form image and recognizes the extracted character line.
まず、以下の説明で用いる語句を定義する。「枠」は、文書及び帳票において縦罫線と横罫線とによって囲まれた矩形領域として定義する。「表」は、連結した枠の集合であるとして定義する。「枠構造」は、表に含まれる枠の配置構造として定義する。 First, terms used in the following description are defined. A “frame” is defined as a rectangular area surrounded by vertical ruled lines and horizontal ruled lines in a document and a form. A “table” is defined as a set of linked frames. “Frame structure” is defined as an arrangement structure of frames included in a table.
以下、OCR(Optical Character Reader)が帳票から特定の項目を抽出する技術について説明する。 Hereinafter, a technique in which an OCR (Optical Character Reader) extracts a specific item from a form will be described.
第1の従来技術として、帳票の表の構造が帳票認識装置に予め定義され、帳票認識装置が入力された帳票画像と予め定義された表の構造とを照合することによって、入力された帳票画像の枠の位置を自動的に検出する技術が知られている(例えば、特許文献1参照)。第1の従来技術では、表の構造が定型的な帳票において、帳票を入力する場合のひずみ、及び帳票の裁断誤差等に起因した帳票画像同士における枠の位置の相違を検出できる。また、第1の従来技術では、かすれ及びノイズが帳票画像に存在しても、かすれ及びノイズの影響を受けにくくできる。 As a first conventional technique, the structure of a form table is defined in advance in the form recognition apparatus, and the form image inputted by the form recognition apparatus is collated with the predefined structure of the table. A technique for automatically detecting the position of the frame is known (see, for example, Patent Document 1). In the first prior art, in a form with a regular table structure, it is possible to detect a difference in frame positions between form images due to distortion when a form is input, and a cutting error of the form. In the first prior art, even if blur and noise are present in the form image, it can be hardly affected by the blur and noise.
第2の従来技術として、帳票の枠同士の配置関係を帳票書式情報として装置に予め記憶する技術が知られている(例えば、非特許文献1参照)。具体的には、当該装置は、帳票全体に対する枠同士の配置関係を予め記憶しておき、入力された帳票画像と帳票書式情報とを照合することによって、枠の位置及び枠の大きさが異なる帳票からも枠の位置を検出できる。 As a second conventional technique, a technique is known in which an arrangement relationship between form frames is stored in advance in the apparatus as form format information (see, for example, Non-Patent Document 1). Specifically, the apparatus stores in advance the layout relationship between frames with respect to the entire form, and the position of the frame and the size of the frame differ by collating the input form image with the form format information. The position of the frame can also be detected from the form.
第3の従来技術として、帳票の部分領域の書式情報を予め記憶し、帳票上の表を部分領域に分割し、部分領域ごとに書式情報と照合し、書式情報のうち最も照合率が高いものを照合結果とする技術が知られている(例えば、特許文献2参照)。第3の従来技術では、枠の位置及び大きさ等が異なる帳票、並びに枠の配置が異なる帳票においても、最も照合率が高い書式情報から枠を特定できる。 As a third conventional technique, the format information of a partial area of a form is stored in advance, the table on the form is divided into partial areas, and the partial information is collated with the format information. Among the format information, the highest collation rate Is known as a verification result (see, for example, Patent Document 2). In the third conventional technique, a frame can be specified from format information having the highest collation rate even in a form having a different frame position and size and a form having a different frame arrangement.
第4の従来技術として、互いに隣接する枠候補及び離れている枠候補の組み合わせによって対象となる表を構成し出力する技術が知られている(例えば、特許文献3参照)。第4の従来技術では、枠の隣接関係及び位置関係に基づいて表を構成する最適な組み合わせを評価し、表を作成できる。 As a fourth conventional technique, a technique is known in which a target table is configured and output by a combination of adjacent frame candidates and distant frame candidates (see, for example, Patent Document 3). In the fourth prior art, it is possible to create a table by evaluating an optimal combination constituting the table based on the adjacent relationship and the positional relationship of the frames.
また、文字列照合を用いて入力された帳票画像から所望の項目を抽出する第5の技術として、項目名及びデータを予め文字列照合して、項目名候補の枠及びデータ候補の枠の配置関係並びに隣接関係等を評価することによって、各枠を抽出する方式がある(例えば、非特許文献2参照)。第5の技術では、帳票画像から抽出された文字行に対して項目名及びデータをそれぞれ予め設定された文字列辞書と照合し、項目名及びデータの仮説を生成し、すべての文字行に対する項目名とデータの仮説から枠の配置関係及び隣接関係等を評価し、項目名とデータとのセットを検出し、最も評価の高い組み合わせを項目として特定できる。 Further, as a fifth technique for extracting a desired item from a form image input using character string collation, item name candidates and character candidate frames are arranged by previously collating item names and data with character strings. There is a method of extracting each frame by evaluating the relationship and the adjacent relationship (for example, see Non-Patent Document 2). In the fifth technique, item names and data are collated with a character string dictionary set in advance for character lines extracted from a form image to generate item names and data hypotheses, and items for all character lines. From the name and data hypotheses, the frame layout and adjacency relationships are evaluated, the set of item names and data is detected, and the combination with the highest evaluation can be identified as the item.
一般に、帳票の一部に特定の項目が順番に記入されている。このような帳票では、項目名の枠とデータの枠とが横並びで項目順に右に並んでいる場合、及び、項目名の枠とデータの枠とが縦並びで項目順に右に並んでいる場合等がある。 In general, specific items are sequentially entered in a part of a form. In such a form, when the item name frame and the data frame are arranged side by side in the item order, and when the item name frame and the data frame are arranged in the vertical direction and arranged in the item order to the right Etc.
これらの枠の並びは単純な形であるため、第1〜第4の従来技術では、ノイズによる罫線が混入した場合、及び文字が枠線と接触した場合には、誤った罫線が抽出され、結果として項目が誤って抽出される可能性が高かった。 Since the arrangement of these frames is a simple shape, in the first to fourth prior arts, when ruled lines due to noise are mixed, and when characters come into contact with the frame lines, incorrect ruled lines are extracted, As a result, it was highly likely that items were extracted by mistake.
一方で、第5の従来技術では、項目名及びデータのそれぞれの文字列照合において、特に項目名の照合結果が不読である場合、特定の項目を抽出できないか、誤った項目を抽出してしまうという問題があった。また、項目名及びデータのそれぞれに仮説を生成し、組み合わせを評価することは、処理速度が遅いという問題もあった。 On the other hand, in the fifth prior art, in the item name and data character string matching, especially when the matching result of the item name is unread, a specific item cannot be extracted or an incorrect item is extracted. There was a problem that. In addition, generating a hypothesis for each item name and data and evaluating the combination has a problem in that the processing speed is slow.
本発明の目的は、特定の項目が記入される帳票に対して、特定の項目のデータを抽出する精度を高めることである。 An object of the present invention is to improve the accuracy of extracting data of a specific item for a form in which the specific item is filled.
本発明の代表的な一例を示せば、帳票画像に含まれ、線分に囲まれた領域である枠に存在する文字行を抽出して、抽出した文字行を文字認識する帳票処理システムにおいて、前記帳票処理システムは、前記文字行を抽出する対象となる複数の抽出対象枠に対応する文字列と、前記複数の抽出対象枠の配置関係と、を対応付けた枠構造辞書データを記憶し、前記帳票画像から枠を抽出枠として抽出する枠抽出部と、前記枠構造辞書データを参照し、前記枠抽出部によって抽出された前記抽出枠を前記抽出対象枠に対応付けた照合結果を算出する枠照合部と、前記枠照合部によって算出された照合結果に対して、前記抽出対象枠に対応付けられた抽出枠に存在する文字行を抽出する文字行抽出部と、前記枠照合部によって算出された各照合結果に対して、前記文字行抽出部によって抽出された文字行が抽出された抽出枠に対応する前記抽出対象枠の文字列に対する当該文字行の類似度を示す枠スコアを算出し、各照合結果に含まれる前記抽出対象枠に対応付けられた枠の枠スコアに基づいて、各照合結果のスコアである照合結果スコアを算出するスコア算出部と、前記スコア算出部によって算出された照合結果スコアに基づいて、前記枠照合部によって算出された照合結果のうち、一の照合結果を抽出照合結果とすることを特徴とする。 If a typical example of the present invention is shown, in a form processing system that extracts a character line that is included in a form image and exists in a frame that is an area surrounded by line segments, and that recognizes the extracted character line, The form processing system stores frame structure dictionary data in which a character string corresponding to a plurality of extraction target frames from which the character line is to be extracted and an arrangement relationship of the plurality of extraction target frames are associated with each other. A frame extraction unit that extracts a frame from the form image as an extraction frame, and the frame structure dictionary data are referred to, and a collation result in which the extraction frame extracted by the frame extraction unit is associated with the extraction target frame is calculated. A frame matching unit, a character line extracting unit that extracts a character line existing in an extraction frame associated with the extraction target frame, and a frame matching unit that are calculated with respect to the matching result calculated by the frame matching unit. For each matching result Then, a frame score indicating the similarity of the character line to the character string of the extraction target frame corresponding to the extraction frame from which the character line extracted by the character line extraction unit is extracted is included in each matching result A score calculation unit that calculates a matching result score that is a score of each matching result based on a frame score of the frame that is associated with the extraction target frame, and a matching result score that is calculated by the score calculating unit One of the matching results calculated by the frame matching unit is used as an extracted matching result.
本発明によれば、特定の項目が記入される帳票に対して、特定の項目のデータを抽出する精度を高めることができる。 ADVANTAGE OF THE INVENTION According to this invention, the precision which extracts the data of a specific item with respect to the form in which a specific item is filled can be improved.
本発明の実施形態を図1〜図21を用いて説明する。なお、本発明は、以下の記述に限定されるものではなく、本発明の要旨を逸脱しない範囲において適宜変更可能である。 An embodiment of the present invention will be described with reference to FIGS. In addition, this invention is not limited to the following description, In the range which does not deviate from the summary of this invention, it can change suitably.
図1は、本発明の実施形態の帳票処理システムの構成図である。 FIG. 1 is a configuration diagram of a form processing system according to an embodiment of the present invention.
帳票処理システムは、帳票処理用計算機100によって構成される。
The form processing system includes a
帳票処理用計算機100は、画像入力部103、入力部105、出力部106、通信部107、制御部108、補助記憶部109、記憶部110、及び外部補助記憶部111を備える。これらは、内部バス112を介して互いに接続される。
The
画像入力部103には、スキャナ102によって読み取られた帳票画像が入力される。画像入力部103には、スキャナ102を介さずネットワーク等を介して帳票画像が電子データ104として入力されてもよい。
A form image read by the
入力部105はユーザによる入力を受け付ける。例えば、入力部105はキーボード及びマウス等である。出力部106は帳票処理の結果を出力する。例えば、出力部106はディスプレイ及びプリンタ等である。通信部107は、外部ネットワーク113に接続されるインタフェースである。帳票処理の結果は、外部ネットワーク113に接続された外部サーバ114に出力されてもよい。
The
制御部108は帳票処理用計算機100の制御に関する各種処理を実行し、例えば、CPU等である。
The
補助記憶部109は、帳票処理用計算機100の内部に備わる記憶部110以外の記憶部であり、例えばHDDである。記憶部110は、制御部108が直接アクセスできる記憶部であり、例えばメモリである。外部補助記憶部111は、補助記憶部109の一種であり、帳票処理用計算機100の外部に備わる記憶部である。例えば、外部補助記憶部111は、CD−R、及びDVD−R等である。
The
帳票処理に関するプログラム(帳票処理プログラム)を含む各種プログラムは、補助記憶部109又は外部補助記憶部111に記憶され、制御部108が各種プログラムに実行する場合に記憶部110にロードされる。制御部108は、記憶部110にロードされたプログラムを実行する。
Various programs including programs related to form processing (form processing programs) are stored in the
また、制御部108は、画像入力部103に入力された帳票画像を内部バス112を介して記憶部110、補助記憶部109、及び外部補助記憶部111等に記憶する。
In addition, the
なお、帳票処理用計算機100は、画像入力部103、制御部108、及び記憶部110を少なくとも備えていればよく、他の部は備えなくてもよい。
The
次に、帳票処理の概要について図2を用いて説明する。 Next, an outline of the form processing will be described with reference to FIG.
図2は、本発明の実施形態の帳票処理のPAD図である。 FIG. 2 is a PAD diagram of the form processing according to the embodiment of the present invention.
制御部108が帳票処理プログラムを実行することによって、図2に示す帳票処理が実行される。
When the
帳票処理とは、帳票処理用計算機100に入力された帳票画像から取得対象となる項目名と、当該項目名に対応するデータとを取得する処理である。
The form process is a process for acquiring the item name to be acquired and the data corresponding to the item name from the form image input to the
制御部108は、画像入力部103に帳票画像が入力されたことを検出する(201)。
The
次に、制御部108は、ステップ201の処理で入力が検出された帳票画像から枠を抽出する(202)。ステップ202の処理は、図4及び図5で詳細を説明する。なお、ステップ202の処理は、帳票処理用計算機100における枠抽出部として機能する。
Next, the
次に、制御部108は、ステップ201の処理で入力が検出された帳票画像の種類が取得対象となる帳票の種類であるか否かを判定する(203)。ステップ203の処理の具体的な一例を示せば、制御部108は、取得対象となる帳票の種類を示すマークが入力された帳票画像に存在するか否かを判定する。
Next, the
なお、図2では、ステップ203の処理がステップ202の処理の後に実行されることを示したが、ステップ203の処理は、ステップ202の処理の前、すなわち、ステップ201の処理とステップ202の処理との間に実行されてもよい。
2 shows that the process of
ステップ203の処理で、入力された帳票画像が取得対象の帳票の種類であると判定された場合、制御部108は、ステップ202の処理で抽出された枠と、枠構造辞書600(図6A〜図6C参照)とを照合する枠構造照合処理を実行する(204)。枠構造処理は、ステップ202の処理で抽出された枠を、枠構造辞書600に登録された枠に対応付けた照合結果を算出する処理である。なお、ステップ204の処理は、帳票処理用計算機100における枠照合部として機能する。
When it is determined in the process of
ステップ202の処理で抽出された枠の数が枠構造辞書に登録された枠の数より少ない場合、照合結果が算出されない。なお、枠構造処理の詳細は図7及び図8で説明する。
When the number of frames extracted in the process of
次に、制御部108は、ステップ204の処理で照合結果が算出されたか否かを判定する(205)。
Next, the
ステップ204の処理で照合結果が算出されたとステップ205の処理で判定された場合、制御部108は、照合結果において、枠構造辞書600に登録された枠に対応付けられた枠に存在する文字行を抽出する(206)。文字行とは、枠内に存在する文字の集合体である。なお、ステップ206の処理は、図10で詳細を説明する。ステップ206の処理は、帳票処理用計算機100における文字行抽出部として機能する。
If it is determined in
次に、制御部108は、ステップ206の処理で抽出された文字行から文字らしい大きさの図形を文字パタン候補として切り出す(207)。ステップ207の処理では、例えば、漢字の偏を構成する図形と旁を構成する図形とを分離してもよいし、つぶれによる線同士の接触及びかすれによる線の分離を考慮して図形を切り出してもよい。ステップ207の処理における図形の切り出し方法は一意に定めず、複数の切り出し方法によって文字パタン候補を切り出す。なお、制御部108は、ステップ207の処理で切り出された文字パタン候補を候補文字ネットワーク形式(図16参照)で記憶部110に記憶する。
Next, the
次に、制御部108は、記憶部110に記憶され、複数の文字が登録された図示しない文字データを参照し、ステップ207の処理で切り出された文字パタン候補と類似する文字と、文字パタン候補の各文字に対する類似度とを算出する文字識別処理を実行する(208)。文字識別処理は図19で詳細を説明する。
Next, the
次に、制御部108は、ステップ208の処理で文字識別処理を実行した枠に対応付けられた枠構造辞書600に登録された枠の文字列情報と、ステップ208の処理で文字識別処理が実行された結果とを照合する特定項目文字列照合処理を実行する(209)。特定項目文字列照合処理では、制御部108は、ステップ208の処理で文字識別処理が実行された結果の識別候補から、当該文字識別処理が実行された枠に対応する枠構造辞書600に登録された枠の文字列情報を構成する文字と一致する識別候補を選択する。そして、制御部108は、抽出された文字行の選択した識別候補の類似度に基づいて、当該文字行を抽出した枠の枠スコアを算出する。そして、制御部108は、算出した枠スコアに基づいて照合結果の枠構造辞書600に対する類似度を示す照合結果スコアを算出し、算出した照合結果スコアが最大の照合結果を選択する。
Next, the
なお、特定項目文字列照合処理は、図17で詳細を説明する。 The specific item character string matching process will be described in detail with reference to FIG.
照合結果スコアを算出するために実行されるステップ207〜209の処理は、帳票処理用計算機100におけるスコア算出部として機能する。
The processing in
次に、制御部108は、ステップ209の処理で選択された照合結果の照合結果スコアが閾値以上であるか否かを判定する(210)。
Next, the
ステップ209の処理で選択された照合結果の照合結果スコアが閾値以上であると、ステップ210の処理で判定された場合、制御部108は、当該照合結果のステップ209の処理で選択された文字から構成される文字列を出力し、帳票処理を終了する。
When it is determined in the process of
入力された帳票画像が取得対象の帳票の種類でないとステップ203の処理で判定された場合、ステップ204の処理で照合結果が算出されていないとステップ205の処理で判定された場合、ステップ209の処理で選択された照合結果の照合結果スコアが閾値より小さいとステップ210の処理で判定された場合、制御部108は、入力された帳票画像の全領域又は指定された領域から枠構造辞書600に登録された項目名と一致する文字列を抽出し、当該抽出した項目名に対応するデータを抽出する(213)。
If it is determined in
そして、制御部108は、ステップ213の処理で抽出した項目名及びデータを出力し(213)、帳票処理を終了する。
Then, the
本実施形態によれば、ステップ204の処理で抽出されたすべての照合結果に対して、枠構造辞書600に登録された文字列情報を用いて照合結果スコアを算出し、照合結果スコアが最大の照合結果を選択する。
According to the present embodiment, for all the matching results extracted in the process of
これによって、罫線が少ない帳票から、取得対象の項目名及びデータを正確に取得できるようになる。 As a result, the item name and data to be acquired can be accurately acquired from a form with few ruled lines.
図3は、本発明の実施形態の処理対象となる帳票301の説明図である。
FIG. 3 is an explanatory diagram of a
図3に示す帳票301の点線で囲まれた領域302に存在する表に、取得対象となる枠303が存在する。
A
取得対象となる枠303とは、図6に示す枠構造辞書で項目名600と当該項目名に対応するデータとが登録された枠である。
The
本実施形態では、項目名が「収納機関番号」、「お客様番号」、及び「確認番号」である枠、並びこれらの項目名に対応するデータの枠が取得対象となる枠である。 In the present embodiment, the frames whose item names are “storage organization number”, “customer number”, and “confirmation number”, and the data frames corresponding to these item names are the frames to be acquired.
図4は、本発明の実施形態の各格子点における罫線の交差形状に応じて付加する符号(交点符号)の説明図である。 FIG. 4 is an explanatory diagram of codes (intersection point codes) that are added according to the intersection shape of ruled lines at each lattice point according to the embodiment of the present invention.
交点符号0は、罫線がないことを表す。交点符号1から4は、罫線の端点を表す。交点符号5と6は、罫線の一部分であることを表す。交点符号7から10は、2本の罫線がL字型に交差した交点を表す。交点符号11から14は、2本の罫線がT字型に交差した交点を表す。交点符号15は、2本の罫線が十字型に交差した交点を表す。
The
図5は、本発明の実施形態の入力帳票を格子点情報に変換した場合の説明図である。 FIG. 5 is an explanatory diagram when the input form according to the embodiment of the present invention is converted into grid point information.
直交する罫線の交点座標は、該当する格子点の座標値から獲得することができる。平行する2本の縦罫線間の距離は、罫線が存在する格子点の列間の距離から算出できる。 The intersection coordinates of the orthogonal ruled lines can be obtained from the coordinate values of the corresponding grid points. The distance between two parallel vertical ruled lines can be calculated from the distance between columns of grid points where ruled lines exist.
帳票上の枠は、枠の四隅に相当する格子点(格子点符号7〜15)の組合せにより表現することができる。このため、ステップ202の処理では、帳票画像が変換された格子点情報から格子点符号7〜15のいずれかによって囲まれる矩形を枠として抽出する。
The frame on the form can be expressed by a combination of lattice points (
なお,格子点情報を作成するための実線の抽出方式の例としては特開平11−232382号公報に,点線の抽出方式の例としては特開平09−319824号公報に開示されている。 An example of a solid line extraction method for creating lattice point information is disclosed in Japanese Patent Laid-Open No. 11-232382, and an example of a dotted line extraction method is disclosed in Japanese Patent Laid-Open No. 09-319824.
次に、枠構造辞書について、図6A〜図6Cを用いて説明する。 Next, the frame structure dictionary will be described with reference to FIGS. 6A to 6C.
図6Aは、本発明の実施形態の枠構造辞書600の説明図である。
FIG. 6A is an explanatory diagram of the
枠構造辞書600には、取得対象となる枠に関するデータが登録される。
In the
具体的には、枠構造辞書600は、項目ID601、項目602、属性603、文字列定義604、第1座標605、及び第2座標606を含む。
Specifically, the
項目ID601には、取得対象となる各枠の一意な識別子が登録される。項目602には、取得対象となる枠の名称が登録される。属性603には、取得対象となる枠が項目であるかデータ枠であるかを特定するためのデータが登録される。
In the
文字列定義604には、取得対象となる枠に存在する文字列に関する情報が登録される。第1座標605には、第1座標(図6B参照)に存在する枠の四隅の座標が登録される。第2座標606には、第2座標(図6C参照)に存在する枠の四隅の座標が登録される。第1座標605及び第2座標606に登録された座標を、取得対象となる枠の配置関係という。
In the
換言すれば、第1座標605及び第2座標606は、それぞれ、取得対象の項目の枠構造を示す。本実施形態では、二つの枠構造が枠構造辞書600に登録されているが、枠構造辞書600に登録される枠構造の数はこれに限られない。
In other words, the first coordinate 605 and the second coordinate 606 each indicate the frame structure of the item to be acquired. In the present embodiment, two frame structures are registered in the
さらに、第1座標605及び第2座標606には、図6Aでは図示しないが、図6Bに示す格子点情報612及び図6Cに示す格子点情報622が登録される。
Further, although not shown in FIG. 6A, the
図6Bは、本発明の実施形態の第1座標605の説明図である。
FIG. 6B is an explanatory diagram of the
第1座標605は、項目名の枠と当該項目名に対応するデータの枠とが左右方向に配列される場合の座標である。 The first coordinates 605 are coordinates when an item name frame and a data frame corresponding to the item name are arranged in the horizontal direction.
図6Bの帳票611では、項目602に登録された「収納機関番号」、「お客様番号」、及び「確認番号」の項目名枠及びデータ枠が左から順に並んでいる。
In the
このため、図6Aに示す「収納機関番号」の項目名の第1座標605には、「収納機関番号」の項目名枠の四隅に対応する図6Bの格子点情報612上の座標(0,0)、(0,1)、(1,1)、(1,0)が登録される。
Therefore, the
また、図6Aに示す「収納機関番号」のデータの第1座標605には、「収納機関番号」のデータ枠の四隅に対応する図6Bの格子点情報612上の座標(1,0)、(1,1)、(2,1)、(2,0)が登録される。
Further, the
また、図6Aに示す「お客様番号」の項目名の第1座標605には、「お客様番号」の項目名枠の四隅に対応する図6Bの格子点情報612上の座標(2,0)、(2,1)、(3,1)、(3,0)が登録される。
Further, the
また、図6Aに示す「お客様番号」のデータの第1座標605には、「お客様番号」のデータ枠の四隅に対応する図6Bの格子点情報612上の座標(3,0)、(3,1)、(4,1)、(4,0)が登録される。
Further, the
また、図6Aに示す「確認番号」の項目名の第1座標605には、「確認番号」の項目名枠の四隅に対応する図6Bの格子点情報612上の座標(4,0)、(4,1)、(5,1)、(5,0)が登録される。
Further, the
また、図6Aに示す「確認番号」のデータの第1座標605には、「確認番号」のデータ枠の四隅に対応する図6Bの格子点情報612上の座標(5,0)、(5,1)、(6,1)、(6,0)が登録される。
Further, the
図6Cは、本発明の実施形態の第2座標606の説明図である。
FIG. 6C is an explanatory diagram of the
第2座標606は、項目名の枠と当該項目名に対応するデータの枠とが上下方向に配列される場合の座標である。 The second coordinates 606 are coordinates when an item name frame and a data frame corresponding to the item name are arranged vertically.
図6Cの帳票621では、項目602に登録された「収納機関番号」、「お客様番号」、及び「確認番号」の項目名枠が左から順に並び、項目名枠に対応するデータ枠が、項目名枠の下方に並ぶ。
In the
このため、図6Aに示す「収納機関番号」の項目名の第2座標606には、「収納機関番号」の項目名枠の四隅に対応する図6Cの格子点情報622上の座標(0,0)、(0,1)、(1,1)、(1,0)が登録される。
Therefore, the
また、図6Aに示す「収納機関番号」のデータの第2座標606には、「収納機関番号」のデータ枠の四隅に対応する図6Cの格子点情報622上の座標(0,1)、(0,2)、(1,2)、(1,1)が登録される。
Further, the
また、図6Aに示す「お客様番号」の項目名の第2座標606には、「お客様番号」の項目名枠の四隅に対応する図6Cの格子点情報622上の座標(1,0)、(1,1)、(2,1)、(2,0)が登録される。
Further, the
また、図6Aに示す「お客様番号」のデータの第2座標606には、「お客様番号」のデータ枠の四隅に対応する図6Cの格子点情報622上の座標(1,1)、(1,2)、(2,2)、(2,1)が登録される。
Further, the
また、図6Aに示す「確認番号」の項目名の第2座標606には、「確認番号」の項目名枠の四隅に対応する図6Cの格子点情報622上の座標(2,0)、(2,1)、(3,1)、(3,0)が登録される。
Further, the
また、図6Aに示す「確認番号」のデータの第2座標606には、「確認番号」のデータ枠の四隅に対応する図6Cの格子点情報622上の座標(2,1)、(2,2)、(3,2)、(3,1)が登録される。
Further, the
以上によって、帳票処理用計算機100は、枠構造辞書600を参照することによって取得対象となる枠の配置関係を把握できる。
As described above, the
図7は、本発明の実施形態の枠構造照合処理のPAD図である。 FIG. 7 is a PAD diagram of the frame structure matching process according to the embodiment of the present invention.
枠構造照合処理は、図2に示すステップ204の処理で実行される。
The frame structure matching process is executed in the process of
まず、制御部108は、枠構造辞書600に登録された枠構造の数だけ、ステップ702の処理以降の処理を繰り返す(701)。例えば、図6Aに示す枠構造辞書600では、第1座標605及び第2座標606に対してステップ702以降の処理が繰り返し実行される。なお、ステップ701の処理では、ステップ702以降の処理で処理の対象となる一つの枠構造が選択される。
First, the
次に、制御部108は、ステップ701の処理で選択された枠構造に対応して、入力された帳票画像から取得対象となる領域を選択し、選択した取得対象となる領域を格子点情報に変換する(702)。取得対象となる領域とは、図3に示す点線で囲まれた領域302である。また、変換後の格子点情報は例えば図5に示す格子点情報である。
Next, the
ステップ702の処理を具体的に説明する。
The processing in
図6Aに示す枠構造辞書600では図示していないが、枠構造辞書600では、枠構造(第1座標605及び第2座標606)に対応して、ステッ702の処理で選択されるべき領域の帳票画像内における座標(選択座標)が登録されている。
Although not shown in the
制御部108は、ステップ701で選択した枠構造に対応する選択座標を参照し、当該選択座標によって指定される領域を取得対象となる領域として選択する。
The
次に、制御部108は、ステップ702の処理で変換した格子点情報の各行の格子点情報と、枠構造辞書600の処理対象となる枠構造の格子点情報とを対応付ける照合処理を実行する(703)。照合処理の詳細は、図8で詳細を説明する。
Next, the
次に、制御部108は、ステップ703の処理で実行した照合処理の照合結果があるか否かを判定する(704)。
Next, the
ステップ704の処理で、照合処理の照合結果があると判定された場合、照合結果を記憶部110に記憶し(705)、図2に示すステップ205の処理に処理を移行する。
If it is determined in
一方、ステップ704の処理で、照合処理の照合結果がないと判定された場合、図2に示すステップ205の処理に処理を移行する。
On the other hand, if it is determined in
図8は、本発明の実施形態の照合処理のPAD図である。 FIG. 8 is a PAD diagram of the matching process according to the embodiment of the present invention.
照合処理は、図7に示すステップ703の処理で実行される。
The collation process is executed in the process of
まず、制御部108は、枠構造辞書600の処理対象の枠構造の行数分、ステップ802及び803の処理を繰り返し実行する(801)。ステップ801の処理で、制御部108は、枠構造辞書600の処理対象の枠構造の行から、ステップ802及び803の処理の処理対象となる行を選択する。
First, the
そして、制御部108は、図7に示すステップ702の処理で変換された格子点情報の行数分、ステップ803の処理を繰り返し実行する(802)。ステップ802の処理で、制御部108は、ステップ702の処理で変換された格子点情報の行から、ステップ803の処理の処理対象となる行を選択する。
Then, the
次に、制御部108は、ステップ801の処理で選択した枠構造辞書600の処理対象となる行、及び、ステップ802の処理で選択した格子点情報の処理対象となる行に対して、格子点DPマッチングを実行する(803)。
Next, the
格子点DPマッチングは、ステップ802の処理で選択した格子点情報の処理対象となる行を構成する格子点(帳票格子点)のうち、ステップ801の処理で選択した枠構造辞書600の処理対象となる行を構成する格子点(辞書格子点)に対応する格子点を、音声認識等に利用されている動的計画法(Dynamic Programing)を用いて探索する処理である。この格子点DPマッチングの詳細は、特開2004−139484号公報に記載されている。また、動的計画法の原理については、T.コルメン、C.ライザーソン,R.リベスト共著、「アルゴリズムイントロダクション」第2巻、P5〜29、近代科学社、1995年出版をはじめ,さまざまな文献において解説されている。なお、格子点DPマッチングの詳細は図8の説明の直後に説明する。
Lattice point DP matching is performed with the processing target of the
次に、制御部108は、格子点DPマッチングの実行結果(枠構造照合結果)が存在するか否かを判定する(804)。
Next, the
ステップ804の処理で、格子点DPマッチングの実行結果が存在すると判定された場合、制御部108は、当該格子点DPマッチングの実行結果のスコアが閾値以上であるか否かを判定する(805)。
When it is determined in
ステップ805の処理で、格子点DPマッチングの実行結果のスコアが閾値以上であると判定された場合、制御部108は、当該格子点DPマッチングの実行結果を照合結果として返す(806)。
If it is determined in
一方、格子点DPマッチングの実行結果が存在しないと判定された場合、又は、格子点DPマッチングの実行結果のスコアが閾値未満であると判定された場合、制御部108は、照合結果がないという結果を返す(807)。
On the other hand, when it is determined that there is no execution result of the lattice point DP matching, or when it is determined that the score of the execution result of the lattice point DP matching is less than the threshold value, the
格子点DPマッチングは、上述したように、帳票格子点から辞書格子点に対応する格子点を探索する処理である。ここで、帳票格子点が辞書格子点に対応するとは、帳票格子点と辞書格子点とが同じ格子点である場合、及び、辞書格子点を構成するすべての線分が帳票格子点に含まれる場合をいう。 As described above, the lattice point DP matching is a process of searching for a lattice point corresponding to the dictionary lattice point from the form lattice point. Here, a form lattice point corresponds to a dictionary lattice point when the form lattice point and the dictionary lattice point are the same lattice point, and all line segments constituting the dictionary lattice point are included in the form lattice point. Refers to cases.
辞書格子点のすべての線分が帳票格子点に含まれる場合とは、例えば、辞書格子点が図4に示す交点符号7であれば、帳票格子点が図4に示す交点符号11、13、及び15である場合をいう。
The case where all the line segments of the dictionary lattice points are included in the form lattice point is, for example, if the dictionary lattice point is the
以下、格子点DPマッチングの処理手順について説明する。 Hereinafter, a processing procedure for lattice point DP matching will be described.
制御部108は、帳票格子点のX座標が0の格子点を処理対象の格子点(処理対象帳票格子点)として選択し、辞書格子点のX座標が0の格子点を処理対象の格子点(処理対象辞書格子点)として選択する。
The
次に、制御部108は、処理対象帳票格子点が処理対象辞書格子点に対応するか否かを判定する。
Next, the
処理対象帳票格子点が処理対象辞書格子点に対応すると判定された場合、制御部108は、以下の第1〜第4条件によって処理を分岐させる。
When it is determined that the processing target grid point corresponds to the processing target dictionary grid point, the
第1条件は、処理対象帳票格子点及び処理対象辞書格子点が最後の格子点でないという条件である。ここで、処理対象帳票格子点及び処理対象辞書格子点の最後の格子点とは、処理対象帳票格子点及び処理対象辞書格子点のX座標をインクリメントした座標に格子点が存在しない処理対象帳票格子点及び処理対象辞書格子点をいう。 The first condition is that the processing target form grid point and the processing target dictionary grid point are not the last grid point. Here, the processing target form grid point and the last grid point of the processing target dictionary grid point are processing target form grids that do not have a grid point at coordinates obtained by incrementing the X coordinate of the processing target form grid point and the processing target dictionary grid point. Points and processing target dictionary grid points.
第1条件が成立する場合、制御部108は、処理対象帳票格子点及び処理対象辞書格子点を次の格子点に移動させる。具体的には、制御部108は、処理対象帳票格子点となっている格子点のX座標をインクリメントした座標にある格子点を新たな処理対象帳票格子点として選択し、処理対象辞書格子点となっている格子点のX座標をインクリメントした座標にある格子点を新たな処理対象辞書格子点として選択する。
When the first condition is satisfied, the
第2条件は、処理対象帳票格子点及び処理対象辞書格子点が最後の格子点であるという条件である。第2条件が成立した場合、帳票格子点と辞書格子点とが一対一で対応する関係である。 The second condition is that the processing target form grid point and the processing target dictionary grid point are the last grid point. When the second condition is satisfied, the form grid point and the dictionary grid point have a one-to-one correspondence.
そして、現在処理対象となっているステップ702の処理で変換された格子点情報の行の次の行を構成する帳票格子点、及び、現在処理対象となっている枠構造辞書600の処理対象の枠構造の行の次の行を構成する辞書格子点でも、第2条件が成立すれば、2行の帳票格子点で区画される枠及び2行の辞書格子点で区画される枠が、一対一の関係で対応しており、図9(A)及び(B)のような対応関係となる。この場合、制御部108は、この対応関係を組み合わせ結果として保持する。
Then, the form grid point that forms the next line of the grid point information line converted in the process of
なお、本発明では、現在処理対象となっている行を構成する帳票格子点及び辞書格子点である条件が成立すれば、現在処理対象となっている行の次の行を構成する帳票格子点及び辞書格子点でも同じ条件が成立ものとする。現在処理対象となっている行を構成する帳票格子点及び辞書格子点で成立する条件と、現在処理対象となっている行の次の行を構成する帳票格子点及び辞書格子点で成立する条件とが異なる場合、制御部108は、これらの対応関係を組み合わせ結果として保持しない。
In the present invention, if a condition that is a grid grid point and a dictionary grid point constituting the currently processed line is satisfied, a form grid point constituting the next line of the currently processed line It is assumed that the same condition holds for dictionary grid points. Conditions established by the form grid points and dictionary grid points that make up the currently processed line, and conditions established by the form grid points and dictionary grid points that form the next line of the currently processed line Are different from each other, the
第3条件は、処理対象帳票格子点が最後の格子点でなく、処理対象辞書格子点が最後の格子点であるという条件である。第3条件が成立した場合、図13及び図14に示すように、帳票格子点の数が辞書格子点の数よりも多く、つまり、入力された帳票の枠が枠構造辞書600の枠構造に登録された枠の数よりも多く、帳票画像に含まれる文字等を罫線として誤って認識した可能性があるので、制御部108は、帳票格子点と辞書格子点との対応付けのすべての組み合わせを算出する強制対応処理を実行し、強制対応処理の実行結果を組み合わせ結果として保持する。強制対応処理の詳細は、図14A〜図14Cで詳細を説明する。
The third condition is a condition that the processing-target form grid point is not the last grid point and the processing-target dictionary grid point is the last grid point. When the third condition is satisfied, as shown in FIGS. 13 and 14, the number of form grid points is larger than the number of dictionary grid points, that is, the frame of the input form becomes the frame structure of the
第4条件は、処理対象帳票格子点が最後の格子点であり、処理対象辞書格子点が最後の格子点でないという条件である。第4条件が成立した場合、帳票格子点の数が辞書格子点の数より少なく、帳票格子点によって構成される帳票画像の行が、辞書格子点によって構成される枠構造辞書600の枠構造の行と対応しないものである。このため、制御部108は、組み合わせ結果を保持しない。
The fourth condition is a condition that the processing target lattice point is the last lattice point and the processing target dictionary lattice point is not the last lattice point. When the fourth condition is satisfied, the number of form lattice points is less than the number of dictionary lattice points, and the line of the form image composed of form lattice points is the frame structure of the
処理対象帳票格子点が処理対象格子点に対応しないと判定された場合、制御部108は、以下の第5〜第7条件によって処理を分岐させる。
When it is determined that the processing target grid point does not correspond to the processing target grid point, the
第5条件は、処理対象帳票格子点が最後の格子点でないという条件である。第5条件が成立する場合、制御部108は、処理対象帳票格子点を次の格子点に移動させる。
The fifth condition is a condition that the processing-target form grid point is not the last grid point. When the fifth condition is satisfied, the
第6条件は、処理対象帳票格子点が最後の格子点であり、処理対象辞書格子点が最後の格子点であるという条件である。第6条件が成立した場合、制御部108は、第2条件が成立した場合と同様に、この対応関係を組み合わせ結果として保持する。
The sixth condition is a condition that the processing target lattice point is the last lattice point and the processing target dictionary lattice point is the last lattice point. When the sixth condition is satisfied, the
第7条件は、処理対象帳票格子点が最後の格子点であり、処理対象辞書格子点が最後の格子点でないという条件である。第7条件が成立した場合、第4条件と同様に、帳票格子点によって構成される帳票画像の行が、辞書格子点によって構成される枠構造辞書600の枠構造の行と対応しないものであるため、制御部108は、組み合わせ結果を保持しない。
The seventh condition is a condition that the processing-target form grid point is the last grid point and the processing-target dictionary grid point is not the last grid point. When the seventh condition is satisfied, similarly to the fourth condition, the line of the form image constituted by the form lattice points does not correspond to the line of the frame structure of the
以上のように、格子点DPマッチングでは、帳票格子点と辞書格子点とを対応付け、帳票画像の枠と枠構造辞書の枠構造の枠とを対応付ける処理が実行される。 As described above, in lattice point DP matching, processing is performed in which form lattice points and dictionary lattice points are associated with each other and form image frames are associated with frame structure frames in the frame structure dictionary.
図9は、本発明の実施形態の格子点DPマッチングの組み合わせ結果の例の説明図である。 FIG. 9 is an explanatory diagram of an example of a combination result of lattice point DP matching according to the embodiment of this invention.
図9(A)を説明する前に、ステップ801の処理で選択した処理対象となる行が格子点情報612の0行目であり、ステップ802の処理で選択した処理対象となる行が格子点情報501の0行目である場合を例に、格子点DPマッチングについて説明する。
Before describing FIG. 9A, the row to be processed selected in the process of
まず、制御部108は、格子点情報612のX座標が0の辞書格子点(図4に示す交点符号7の格子点)を処理対象辞書格子点として選択し、格子点情報501のX座標が0の帳票格子点(図4に示す交点符号7の格子点)を処理対象帳票格子点として選択する。そして、制御部108は、処理対象帳票格子点と処理対象辞書格子点とが同じであるので、処理対象帳票格子点は処理対象辞書格子点に対応する。この場合、処理対象帳票格子点及び処理対象辞書格子点は最後の格子点でないので、第1条件が成立する。そして、制御部108は、格子点情報612のX座標が1の辞書格子点(図4に示す交点符号13の格子点)を新たな処理対象辞書格子点として選択し、格子点情報502のX座標が1の帳票格子点(図4に示す交点符号5)を新たな処理対象帳票格子点として選択する。
First, the
次に、制御部108は、処理対象帳票格子点は処理対象辞書格子点に対応しないと判定する。これは、図4を参照するに、交点符号5の格子点(処理対象帳票格子点)は、交点符号13の格子点(処理対象辞書格子点)のすべての線分を含まないためである。また、処理対象帳票格子点は最後の格子点でないので、第5条件が成立する。このため、格子点情報502のX座標が2の帳票格子点(図4に示す交点符号5)を新たな処理対象帳票格子点として選択する。
Next, the
このように、制御部108が格子点DPマッチングを実行していくことによって、X座標1の辞書格子点とX座標3の帳票格子点とが対応付けられ、X座標2の辞書格子点とX座標7の帳票格子点とが対応付けられ、X座標3の辞書格子点とX座標9の帳票格子点とが対応付けられ、X座標4の辞書格子点とX座標14の帳票格子点とが対応付けられる。
As described above, the
ここで、X座標4の辞書格子点とX座標14の帳票格子点とが対応すると判定された場合、処理対象帳票格子点が最後の格子点であり、処理対象辞書格子点が最後の格子点でないので、第4条件が成立し、帳票格子点によって構成される帳票画像の0行が、辞書格子点によって構成される枠構造辞書600の枠構造の0行と対応しないものと判定される。
Here, when it is determined that the dictionary grid point of the X coordinate 4 corresponds to the form grid point of the X coordinate 14, the processing target grid point is the last grid point, and the processing target dictionary grid point is the last grid point. Therefore, the fourth condition is satisfied, and it is determined that the 0th row of the form image constituted by the form lattice points does not correspond to the 0th row of the frame structure of the
なお、ステップ801の処理で選択した処理対象となる行が格子点情報612の1行目であり、ステップ802の処理で選択した処理対象となる行が格子点情報501の1行目である場合も、上述した通りに判定される。
Note that the processing target row selected in
このため、枠構造辞書600の格子点情報612の0行目と1行目との間の枠、及び帳票画像の格子点情報501の0行目と1行目との間の枠は対応しない。
For this reason, the frame between the 0th line and the 1st line of the
次に、図9(A)について説明する。 Next, FIG. 9A will be described.
図9(A)では、ステップ801の処理で選択した処理対象となる行が格子点情報612の0行目であり、ステップ802の処理で選択した処理対象となる行が格子点情報501の1行目である場合を例に、格子点DPマッチングについて説明する。
In FIG. 9A, the processing target row selected in
格子点DPマッチングが実行されると、X座標0の辞書格子点とX座標0の帳票格子点とが対応付けられ、X座標1の辞書格子点とX座標1の帳票格子点とが対応付けられ、X座標2の辞書格子点とX座標4の帳票格子点とが対応付けられ、X座標3の辞書格子点とX座標5の帳票格子点とが対応付けられ、X座標4の辞書格子点とX座標10の帳票格子点とが対応付けられ、X座標5の辞書格子点とX座標12の帳票格子点とが対応付けられ、X座標6の辞書格子点とX座標14の帳票格子点とが対応付けられる。 When the lattice point DP matching is executed, the dictionary lattice point of X coordinate 0 and the form lattice point of X coordinate 0 are associated with each other, and the dictionary lattice point of X coordinate 1 and the form lattice point of X coordinate 1 are associated with each other. The X-coordinate 2 dictionary lattice point is associated with the X-coordinate 4 form lattice point, the X-coordinate 3 dictionary lattice point is associated with the X-coordinate 5 form lattice point, and the X-coordinate 4 dictionary lattice point The point is associated with the form grid point of the X coordinate 10, the dictionary grid point of the X coordinate 5 is associated with the form grid point of the X coordinate 12, the dictionary grid point of the X coordinate 6 and the form grid point of the X coordinate 14 Points are associated with each other.
ここで、X座標6の辞書格子点とX座標14の帳票格子点とが対応すると判定された場合、処理対象帳票格子点及び処理対象辞書格子点が最後の格子点であるので、第2条件が成立する。したがって、制御部108は、帳票格子点と辞書格子点とが一対一で対応する関係であると判断する。
Here, if it is determined that the dictionary grid point of the X coordinate 6 corresponds to the form grid point of the X coordinate 14, the processing target form grid point and the processing target dictionary grid point are the last grid point. Is established. Therefore, the
また、ステップ801の処理で選択した処理対象となる行が格子点情報612の1行目であり、ステップ802の処理で選択した処理対象となる行が格子点情報501の2行目である場合も、上述した通りに判定される。
In addition, when the processing target row selected in
このため、図9(A)に示す領域901に示すように、枠構造辞書600の格子点情報612の0行目と1行目との間の枠、及び帳票画像の格子点情報501の1行目と2行目との間の枠はそれぞれ一対一の関係で対応付けられる。
For this reason, as shown in an
次に、図9(B)について説明する。 Next, FIG. 9B will be described.
図9(B)では、ステップ801の処理で選択した処理対象となる行が格子点情報612の0行目であり、ステップ802の処理で選択した処理対象となる行が格子点情報501の2行目である場合を例に、格子点DPマッチングについて説明する。
In FIG. 9B, the row to be processed selected in the processing of
格子点DPマッチングが実行されると、X座標0の辞書格子点とX座標0の帳票格子点とが対応付けられ、X座標1の辞書格子点とX座標2の帳票格子点とが対応付けられ、X座標2の辞書格子点とX座標6の帳票格子点とが対応付けられ、X座標3の辞書格子点とX座標8の帳票格子点とが対応付けられ、X座標4の辞書格子点とX座標11の帳票格子点とが対応付けられ、X座標5の辞書格子点とX座標13の帳票格子点とが対応付けられ、X座標6の辞書格子点とX座標14の帳票格子点とが対応付けられる。 When lattice point DP matching is executed, the dictionary lattice point of X coordinate 0 and the form lattice point of X coordinate 0 are associated, and the dictionary lattice point of X coordinate 1 and the form lattice point of X coordinate 2 are associated. The X-coordinate 2 dictionary lattice point is associated with the X-coordinate 6 form lattice point, the X-coordinate 3 dictionary lattice point is associated with the X-coordinate 8 form lattice point, and the X-coordinate 4 dictionary lattice point. The point is associated with the form grid point of the X coordinate 11, the dictionary grid point of the X coordinate 5 is associated with the form grid point of the X coordinate 13, the dictionary grid point of the X coordinate 6 and the form grid point of the X coordinate 14 Points are associated with each other.
ここで、X座標6の辞書格子点とX座標14の帳票格子点とが対応すると判定された場合、処理対象帳票格子点及び処理対象辞書格子点が最後の格子点であるので、第2条件が成立する。したがって、制御部108は、帳票格子点と辞書格子点とが一対一で対応する関係であると判断する。
Here, if it is determined that the dictionary grid point of the X coordinate 6 corresponds to the form grid point of the X coordinate 14, the processing target form grid point and the processing target dictionary grid point are the last grid point. Is established. Therefore, the
また、ステップ801の処理で選択した処理対象となる行が格子点情報612の1行目であり、ステップ802の処理で選択した処理対象となる行が格子点情報501の3行目である場合も、上述した通りに判定される。
In addition, when the row to be processed selected in the processing of
このため、図9(B)に示す領域902に示すように、枠構造辞書600の格子点情報612の0行目と1行目との間の枠、及び帳票画像の格子点情報501の2行目と3行目との間の枠はそれぞれ一対一の関係で対応付けられる。
For this reason, as shown in an
以上のように、図9(A)及び(B)では、第3条件が成立しない場合の格子点DPマッチングの例について説明した。 As described above, in FIGS. 9A and 9B, the example of the lattice point DP matching when the third condition is not satisfied has been described.
なお、図9(A)及び(B)に示す領域901及び902を、枠構造照合結果という。
Note that
次に、文字行抽出処理について図10を用いて説明する。 Next, the character line extraction process will be described with reference to FIG.
図10は、本発明の実施形態の文字行抽出処理のPAD図である。 FIG. 10 is a PAD diagram of character line extraction processing according to the embodiment of this invention.
文字行抽出処理は、ステップ206の処理で実行される。
The character line extraction process is executed in
まず、制御部108は、図7に示すステップ705の処理で記憶部110に記憶された照合結果の数だけステップ1002の処理以降の処理を実行する(1001)。ステップ1001の処理では、制御部108は、記憶部110に記憶された照合結果から、処理対象となる照合結果を一つ選択する。
First, the
次に、制御部108は、ステップ1001の処理で選択された照合結果に存在する枠の数だけ、ステップ1003の処理以降の処理を実行する(1002)。ステップ1002の処理では、制御部108は、ステップ1001の処理で選択された照合結果に存在する枠から、処理対象となる枠を一つ選択する。
Next, the
次に、制御部108は、ステップ1005の処理で記憶される文字行情報(抽出済み文字行)を参照して、ステップ1002の処理で選択された枠が未だ文字行を抽出していない枠であるか否かを判定する(1003)。
Next, the
ステップ1002の処理で選択された枠が未だ文字行を抽出していない枠であると、ステップ1003の処理で判定された場合、制御部108は、当該枠から文字行を抽出する(1004)。
If it is determined in
そして、制御部108は、ステップ1004の処理で抽出した文字行と当該文字行を抽出した枠の座標とを対応付けた文字行情報を記憶部110に記憶する(1005)。
Then, the
一方、ステップ1002の処理で選択された枠が既に文字行を抽出した枠である場合、制御部108は、ステップ1002の処理に処理を移行し、処理対象となる枠を新たに選択する。
On the other hand, when the frame selected in the process of
文字行抽出処理の例について、図11を用いて説明する。図11は、本発明の実施形態の文字行抽出処理によって抽出された文字行の一例の説明図である。 An example of character line extraction processing will be described with reference to FIG. FIG. 11 is an explanatory diagram illustrating an example of a character line extracted by the character line extraction process according to the embodiment of this invention.
図11に示す文字行1101〜1106は、図9(A)に示す領域901に対して文字行抽出処理が実行されて抽出された文字行を示し、図11に示す1111〜1116は、図9(B)に示す領域902に対して文字行抽出処理が実行されて抽出された文字行を示す。
まず、文字行1101〜1106について説明する。
First, the
図11に示す「収納機関」「番号」1101は、図9(A)に示す座標(0,1)、(0,2)、(1,2)、(1,1)の枠から抽出された文字行であり、「収納機関」「番号」1101は、座標(0,1)、(0,2)、(1,2)、(1,1)と対応付けて記憶される。 11 is extracted from the frame of coordinates (0, 1), (0, 2), (1, 2), (1, 1) shown in FIG. 9 (A). The “storage organization” and “number” 1101 are stored in association with the coordinates (0, 1), (0, 2), (1, 2), (1, 1).
図11に示す「12345」1102は、図9(A)に示す座標(1,1)、(1,2)、(4,2)、(4,1)の枠から抽出された文字行であり、「12345」1102は、座標(1,1)、(1,2)、(4,2)、(4,1)と対応付けて記憶される。 “12345” 1102 shown in FIG. 11 is a character line extracted from the frame of coordinates (1,1), (1,2), (4,2), (4,1) shown in FIG. Yes, “12345” 1102 is stored in association with coordinates (1,1), (1,2), (4,2), and (4,1).
図11に示す「お客様」「番号」1103は、図9(A)に示す座標(4,1)、(4,2)、(5,2)、(5,1)の枠から抽出された文字行であり、「お客様」「番号」1103は、座標(4,1)、(4,2)、(5,2)、(5,1)と対応付けて記憶される。 “Customer” “number” 1103 shown in FIG. 11 is extracted from the frame of coordinates (4, 1), (4, 2), (5, 2), (5, 1) shown in FIG. It is a character line, and “customer” and “number” 1103 are stored in association with coordinates (4, 1), (4, 2), (5, 2), and (5, 1).
図11に示す「67890123456」1104は、図9(A)に示す座標(5,1)、(5,2)、(10,2)、(10,1)の枠から抽出された文字行であり、「67890123456」1104は、座標(5,1)、(5,2)、(10,2)、(10,1)と対応付けて記憶される。 “67890123456” 1104 shown in FIG. 11 is a character line extracted from the frame of coordinates (5, 1), (5, 2), (10, 2), (10, 1) shown in FIG. Yes, “67890123456” 1104 is stored in association with coordinates (5,1), (5,2), (10,2), (10,1).
図11に示す「確認」「番号」1105は、図9(A)に示す座標(10,1)、(10,2)、(12,2)、(12,1)の枠から抽出された文字行であり、「確認」「番号」1105は、座標(10,1)、(10,2)、(12,2)、(12,1)と対応付けて記憶される。 The “confirmation” “number” 1105 shown in FIG. 11 is extracted from the frame of coordinates (10, 1), (10, 2), (12, 2), (12, 1) shown in FIG. It is a character line, and “confirmation” “number” 1105 is stored in association with coordinates (10, 1), (10, 2), (12, 2), and (12, 1).
図11に示す「789012」1106は、図9(A)に示す座標(12,1)、(12,2)、(14,2)、(14,1)の枠から抽出された文字行であり、「789012」1106は、座標(12,1)、(12,2)、(14,2)、(14,1)と対応付けて記憶される。 “789012” 1106 shown in FIG. 11 is a character line extracted from the frame of coordinates (12, 1), (12, 2), (14, 2), (14, 1) shown in FIG. Yes, “7899012” 1106 is stored in association with coordinates (12, 1), (12, 2), (14, 2), (14, 1).
次に、文字行1111〜1116について説明する。
Next, the
図11に示す「会員番号」1111は、図9(B)に示す座標(0,2)、(0,3)、(2,3)、(2,2)の枠から抽出された文字行であり、「会員番号」1111は、座標(0,2)、(0,3)、(2,3)、(2,2)と対応付けて記憶される。 “Member number” 1111 shown in FIG. 11 is a character line extracted from the frame of coordinates (0, 2), (0, 3), (2, 3), (2, 2) shown in FIG. The “membership number” 1111 is stored in association with the coordinates (0, 2), (0, 3), (2, 3), (2, 2).
図11に示す「000−000−000」1112は、図9(B)に示す座標(2,2)、(2,3)、(6,3)、(6,2)の枠から抽出された文字行であり、「000−000−000」1112は、座標(2,2)、(2,3)、(6,3)、(6,2)と対応付けて記憶される。 “000-000-000” 1112 shown in FIG. 11 is extracted from the frame of coordinates (2, 2), (2, 3), (6, 3), (6, 2) shown in FIG. 9B. "000-000-000" 1112 is stored in association with coordinates (2, 2), (2, 3), (6, 3), (6, 2).
図11に示す「請求番号」1113は、図9(B)に示す座標(6,2)、(6,3)、(8,3)、(8,2)の枠から抽出された文字行であり、「請求番号」1113は、座標(6,2)、(6,3)、(8,3)、(8,2)と対応付けて記憶される。 “Billing number” 1113 shown in FIG. 11 is a character line extracted from the frame of coordinates (6, 2), (6, 3), (8, 3), (8, 2) shown in FIG. “Billing number” 1113 is stored in association with coordinates (6, 2), (6, 3), (8, 3), (8, 2).
図11に示す「1234」1114は、図9(B)に示す座標(8,2)、(8,3)(11,3)、(11,2)の枠から抽出された文字行であり、「請求番号」1114は、座標(8,2)、(8,3)、(11,3)、(11,2)と対応付けて記憶される。 “1234” 1114 shown in FIG. 11 is a character line extracted from the frame of coordinates (8, 2), (8, 3) (11, 3), (11, 2) shown in FIG. 9B. “Billing number” 1114 is stored in association with coordinates (8, 2), (8, 3), (11, 3), (11, 2).
図11に示す「お支払い期日」1115は、図9(B)に示す座標(11,2)、(11,3)(13,3)、(13,2)の枠から抽出された文字行であり、「請求番号」1113は、座標(11,2)、(11,3)(13,3)、(13,2)と対応付けて記憶される。 “Payment due date” 1115 shown in FIG. 11 is a character line extracted from the frame of coordinates (11, 2), (11, 3) (13, 3), (13, 2) shown in FIG. 9B. “Billing number” 1113 is stored in association with coordinates (11, 2), (11, 3) (13, 3), (13, 2).
図11に示す「5月20日」1116は、図9(B)に示す座標(13,2)、(13,3)(14,3)、(14,2)の枠から抽出された文字行であり、「5月20日」1116は、座標(13,2)、(13,3)(14,3)、(14,2)と対応付けて記憶される。 “May 20” 1116 shown in FIG. 11 is a character extracted from the frame of coordinates (13, 2), (13, 3) (14, 3), (14, 2) shown in FIG. 9B. “May 20” 1116 is stored in association with coordinates (13, 2), (13, 3) (14, 3), (14, 2).
以上のように、文字行抽出処理によって抽出された文字行は、当該文字行が抽出された枠と対応付けて記憶される。これによって、既に文字行が抽出された枠に対して再度文字行を抽出しなくてもよく、処理コストを削減できる。 As described above, the character line extracted by the character line extraction process is stored in association with the frame from which the character line is extracted. As a result, it is not necessary to extract a character line again from a frame in which a character line has already been extracted, and the processing cost can be reduced.
次に、図12〜図15を用いて、枠が誤って抽出された場合について説明する。 Next, a case where a frame is erroneously extracted will be described with reference to FIGS.
図12は、本発明の実施形態の取得対象となる領域302の説明図である。
FIG. 12 is an explanatory diagram of the
制御部108は、矩形1201で囲まれた「1」のように、枠の上下の横罫線に接触している文字又は横罫線に接触しそうな文字(以下、このような文字を総称して接触文字という)を縦罫線として認識する場合がある。接触文字を含む取得対象となる領域が図7に示すステップ702の処理で格子点情報に変換されると、図13に示すような格子点情報1301となる。
The
図13は、本発明の実施形態の接触文字を含む入力帳票を格子点情報に変換した場合の説明図である。 FIG. 13 is an explanatory diagram when an input form including contact characters according to the embodiment of the present invention is converted into grid point information.
図13に示す格子点情報1301の矩形1302で示すように、図12に示す矩形1201で囲まれた「1」が座標(9,1)で図4に示す交点符号「13」及び座標(9,2)で図4に示す交点符号「14」として変換されている。
As shown by the
したがって、格子点情報1301に基づいて抽出された図13に示す格子点情報1301の1行目及び2行目の枠の数は、7個となり、枠構造辞書600の第1座標605の枠構造に登録された枠の数(6個)より多くなる。したがって、図13に示す格子点情報1301の1行目及び2行目の枠と枠構造辞書600の第1座標605に登録された枠との対応付けは、図9(A)に示すように一通りでなく、複数通り考えられる。
Accordingly, the number of frames in the first and second lines of the
格子点情報1301の枠と枠構造辞書600の第1座標605の枠構造605に登録された枠との対応付けについて図14A〜図14Cを用いて説明する。
The association between the frame of the
図14A〜図14Cは、本発明の実施形態の格子点DPマッチングの組み合わせ結果の例の説明図である。 FIG. 14A to FIG. 14C are explanatory diagrams illustrating examples of combination results of lattice point DP matching according to the embodiment of this invention.
図14A(A)では、図8に示すステップ801の処理で選択した処理対象となる行が格子点情報612の0行目であり、ステップ802の処理で選択した処理対象となる行が格子点情報501の1行目である場合を例に、格子点DPマッチングについて説明する。
In FIG. 14A (A), the processing target row selected in
格子点DPマッチングが実行されると、X座標0の辞書格子点とX座標0の帳票格子点とが対応付けられ、X座標1の辞書格子点とX座標1の帳票格子点とが対応付けられ、X座標2の辞書格子点とX座標4の帳票格子点とが対応付けられ、X座標3の辞書格子点とX座標5の帳票格子点とが対応付けられ、X座標4の辞書格子点とX座標9の帳票格子点とが対応付けられ、X座標5の辞書格子点とX座標11の帳票格子点とが対応付けられ、X座標6の辞書格子点とX座標13の帳票格子点とが対応付けられる。 When the lattice point DP matching is executed, the dictionary lattice point of X coordinate 0 and the form lattice point of X coordinate 0 are associated with each other, and the dictionary lattice point of X coordinate 1 and the form lattice point of X coordinate 1 are associated with each other. The X-coordinate 2 dictionary lattice point is associated with the X-coordinate 4 form lattice point, the X-coordinate 3 dictionary lattice point is associated with the X-coordinate 5 form lattice point, and the X-coordinate 4 dictionary lattice point The point is associated with the form grid point of X coordinate 9, the dictionary grid point of X coordinate 5 is associated with the form grid point of X coordinate 11, the dictionary grid point of X coordinate 6 and the form grid point of X coordinate 13 Points are associated with each other.
ここで、X座標6の辞書格子点とX座標13の帳票格子点とが対応すると判定された場合、処理対象帳票格子点が最後の格子点でなく、処理対象辞書格子点が最後の格子点でないので、第3条件が成立する。したがって、制御部108は、強制対応処理を実行する。
Here, when it is determined that the dictionary grid point of the X coordinate 6 corresponds to the form grid point of the X coordinate 13, the processing target grid grid point is not the last grid point but the processing target grid grid point is the last grid point. Therefore, the third condition is satisfied. Therefore, the
強制対応処理は、上述したように、帳票格子点と辞書格子点との対応付けのすべての組み合わせを算出する処理であり、図14A(B)〜図14C(H)を用いて説明する。 As described above, the forcible handling process is a process for calculating all combinations of correspondences between form grid points and dictionary grid points, and will be described with reference to FIGS. 14A (B) to 14C (H).
まず、制御部108は、図14A(A)では、最も右に位置する帳票格子点であるX座標15の帳票格子点がいずれの辞書格子点にも対応付けられていないので、当該帳票格子点を最も右に位置する辞書格子点に対応付ける。すなわち、X座標6の辞書格子点とX座標15の帳票格子点とが対応付けられる。
First, in FIG. 14A (A), the
この場合、新たに辞書格子点と対応付けたX座標15の帳票格子点よりも左に位置するX座標0、1、4、5、9、11、及び13のいずれか一つの帳票格子点と辞書格子点との対応付けを解除しなければならない。これによって、帳票画像から抽出された二つの枠を枠構造辞書600に登録された一つの枠に対応付ける。
In this case, any one of the form grid points X coordinates 0, 1, 4, 5, 9, 11, and 13 positioned to the left of the form grid point of the X coordinate 15 newly associated with the dictionary grid point; The correspondence with dictionary grid points must be canceled. Thereby, the two frames extracted from the form image are associated with one frame registered in the
図14A(B)は、1行目及び2行目のX座標15の帳票格子点と0行目及び1行目のX座標6の辞書格子点とを対応付け、1行目及び2行目のX座標13の帳票格子点と0行目及び1行目のX座標6の辞書格子点との対応付けを解除した組み合わせ結果である。 14A (B) associates the form grid point of the X coordinate 15 of the first line and the second line with the dictionary grid point of the X coordinate 6 of the 0th line and the first line, and the first line and the second line. This is a combination result of canceling the association between the form grid point of the X coordinate 13 and the dictionary grid point of the X coordinate 6 in the 0th and 1st rows.
図14A(C)は、1行目及び2行目のX座標15の帳票格子点と0行目及び1行目のX座標6の辞書格子点とを対応付け、1行目及び2行目のX座標11の帳票格子点と0行目及び1行目のX座標5の辞書格子点との対応付けを解除した組み合わせ結果である。 FIG. 14A (C) associates the form grid point of the X coordinate 15 of the first line and the second line with the dictionary grid point of the X coordinate 6 of the 0th line and the first line, and the first line and the second line. This is a combination result of canceling the correspondence between the form grid point of the X coordinate 11 and the dictionary grid point of the X coordinate 5 in the 0th and 1st rows.
図14B(D)は、1行目及び2行目のX座標15の帳票格子点と0行目及び1行目のX座標6の辞書格子点とを対応付け、1行目及び2行目のX座標9の帳票格子点と0行目及び1行目のX座標4の辞書格子点との対応付けを解除した組み合わせ結果である。 FIG. 14B (D) associates the form grid point of the X coordinate 15 of the first line and the second line with the dictionary grid point of the X coordinate 6 of the 0th line and the first line, and the first line and the second line. This is a combination result in which the correspondence between the form grid point of the X coordinate 9 and the dictionary grid point of the X coordinate 4 in the 0th row and the 1st row is released.
図14B(E)は、1行目及び2行目のX座標15の帳票格子点と0行目及び1行目のX座標6の辞書格子点とを対応付け、1行目及び2行目のX座標5の帳票格子点と0行目及び1行目のX座標3の辞書格子点との対応付けを解除した組み合わせ結果である。 FIG. 14B (E) associates the form grid points of the X coordinate 15 of the first line and the second line with the dictionary grid points of the X coordinate 6 of the 0th line and the first line, and the first and second lines. This is a combination result of canceling the association between the form grid point of the X coordinate 5 and the dictionary grid point of the X coordinate 3 in the 0th row and the 1st row.
図14B(F)は、1行目及び2行目のX座標15の帳票格子点とX座標6の辞書格子点とを対応付け、1行目及び2行目のX座標4の帳票格子点と0行目及び1行目のX座標2の辞書格子点との対応付けを解除した組み合わせ結果である。 FIG. 14B (F) associates the form grid point of the X coordinate 15 of the first line and the second line with the dictionary grid point of the X coordinate 6 and forms the grid point of the X coordinate 4 of the first line and the second line. Is a combination result in which the correspondence between the X-coordinate 2 dictionary lattice points in the 0th and 1st rows is canceled.
図14C(G)は、1行目及び2行目のX座標15の帳票格子点と0行目及び1行目のX座標6の辞書格子点とを対応付け、1行目及び2行目のX座標1の帳票格子点と0行目及び1行目のX座標1の辞書格子点との対応付けを解除した組み合わせ結果である。 FIG. 14C (G) associates the form grid point of the X coordinate 15 of the first line and the second line with the dictionary grid point of the X coordinate 6 of the 0th line and the first line, and the first line and the second line. This is a combination result of canceling the association between the form grid point of the X coordinate 1 and the dictionary grid point of the X coordinate 1 in the 0th and 1st lines.
図14C(H)は、1行目及び2行目のX座標15の帳票格子点と0行目及び1行目のX座標6の辞書格子点とを対応付け、1行目及び2行目のX座標0の帳票格子点と0行目及び1行目のX座標0の辞書格子点との対応付けを解除した組み合わせ結果である。 FIG. 14C (H) associates the form grid point of the X coordinate 15 of the first line and the second line with the dictionary grid point of the X coordinate 6 of the 0th line and the first line, and the first line and the second line. This is a combination result in which the correspondence between the form grid point of the X coordinate 0 and the dictionary grid point of the X coordinate 0 in the 0th row and the 1st row is canceled.
図14C(I)は、図8に示すステップ801の処理で選択した処理対象となる行が格子点情報612の0行目であり、ステップ802の処理で選択した処理対象となる行が格子点情報501の2行目である場合の格子点DPマッチングの結果であり、図9(B)と同じであるので説明を省略する。
In FIG. 14C (I), the row to be processed selected in the processing of
以上のように、格子点DPマッチングによって、図14A(A)〜図14C(I)に示す9通りの組み合わせ結果が算出される。なお、以下では、これらのすべての組み合わせ結果が照合結果となったことを前提に説明する。 As described above, nine combinations of results shown in FIGS. 14A (A) to 14C (I) are calculated by lattice point DP matching. In the following description, it is assumed that all of these combination results are matching results.
また、図14B(D)に示す組み合わせ結果が、図12に示す接触文字「1」を罫線として抽出していない正しい組み合わせ結果である。 Further, the combination result shown in FIG. 14B (D) is a correct combination result in which the contact character “1” shown in FIG. 12 is not extracted as a ruled line.
次に、図14A(A)〜図14C(I)に示す照合結果に対して文字行抽出処理が実行されることによって抽出された文字行について、図15を用いて説明する。 Next, a character line extracted by executing a character line extraction process on the matching results shown in FIGS. 14A (A) to 14C (I) will be described with reference to FIG.
図15は、本発明の実施形態の文字行抽出処理によって抽出された文字行の一例の説明図である。 FIG. 15 is an explanatory diagram illustrating an example of a character line extracted by the character line extraction process according to the embodiment of this invention.
図10に示す文字行抽出処理のステップ1001の処理で、制御部108は、図14A(A)〜図14C(I)に示す照合結果から、処理対象の照合結果として図14A(A)に示す照合結果を選択する。
In the process of
そして、制御部108は、図14A(A)に示す照合結果にステップ1002〜1004の処理を実行する。なお、図14A(A)に示す照合結果に対してステップ1002〜1004の処理が実行される前に抽出された文字行はないものとする。
And the
図14A(A)に示す照合結果に対してステップ1002〜1004の処理が実行されることによって、文字行1501〜1506が抽出される。
具体的には、図15に示す「収納機関」「番号」1501は、図14A(A)に示す座標(0,1)、(0,2)、(1,2)、(1,1)の枠から抽出された文字行であり、「収納機関」「番号」1501は、座標(0,1)、(0,2)、(1,2)、(1,1)と対応付けて記憶される。 Specifically, the “storage organization” and “number” 1501 shown in FIG. 15 are the coordinates (0, 1), (0, 2), (1, 2), (1, 1) shown in FIG. 14A (A). The character line extracted from the frame is stored in association with the coordinates (0, 1), (0, 2), (1, 2), (1, 1). Is done.
また、図15に示す「12345」1502は、図14A(A)に示す座標(1,1)、(1,2)、(4,2)、(4,1)の枠から抽出された文字行であり、「12345」1502は、座標(1,1)、(1,2)、(4,2)、(4,1)と対応付けて記憶される。 “12345” 1502 shown in FIG. 15 is a character extracted from the frame of coordinates (1,1), (1,2), (4,2), (4,1) shown in FIG. 14A (A). “12345” 1502 is stored in association with coordinates (1,1), (1,2), (4,2), and (4,1).
また、図15に示す「お客様」「番号」1503は、図14(A)に示す座標(4,1)、(4,2)、(5,2)、(5,1)の枠から抽出された文字行であり、「お客様」「番号」1503は、座標(4,1)、(4,2)、(5,2)、(5,1)と対応付けて記憶される。 Further, “customer” “number” 1503 shown in FIG. 15 is extracted from the frame of coordinates (4, 1), (4, 2), (5, 2), (5, 1) shown in FIG. The “customer” and “number” 1503 are stored in association with the coordinates (4, 1), (4, 2), (5, 2), (5, 1).
また、図15に示す「00000」1504は、図14(A)に示す座標(5,1)、(5,2)、(9,2)、(9,1)の枠から抽出された文字行であり、「00000」1504は、座標(5,1)、(5,2)、(9,2)、(9,1)と対応付けて記憶される。 Also, “00000” 1504 shown in FIG. 15 is a character extracted from the frame of coordinates (5, 1), (5, 2), (9, 2), (9, 1) shown in FIG. “00000” 1504 is stored in association with coordinates (5, 1), (5, 2), (9, 2), and (9, 1).
また、図15に示す「0」1505は、図14(A)に示す座標(9,1)、(9,2)、(11,2)、(11,1)の枠から抽出された文字行であり、「0」1505は、座標(9,1)、(9,2)、(11,2)、(11,1)と対応付けて記憶される。 Further, “0” 1505 shown in FIG. 15 is a character extracted from the frame of coordinates (9, 1), (9, 2), (11, 2), (11, 1) shown in FIG. “0” 1505 is stored in association with coordinates (9, 1), (9, 2), (11, 2), and (11, 1).
また、図15に示す「確認」「番号」1506は、図14(A)に示す座標(11,1)、(11,2)、(13,2)、(13,1)の枠から抽出された文字行であり、「確認」「番号」1506は、座標(11,1)、(11,2)、(13,2)、(13,1)と対応付けて記憶される。 15 is extracted from the frame of coordinates (11, 1), (11, 2), (13, 2), (13, 1) shown in FIG. The “confirmation” and “number” 1506 are stored in association with the coordinates (11, 1), (11, 2), (13, 2), and (13, 1).
次に、制御部108は、ステップ1001の処理で、処理対象の照合結果として図14A(B)に示す照合結果を選択する。
Next, in
この場合、図14A(B)に示す照合結果の枠のうち、座標(11,1)、(11,2)、(15,2)、(15,1)の枠よりも左に位置する枠から文字行は、すでに抽出されているので、座標(11,1)、(11,2)、(15,2)、(15,1)の枠から文字行を抽出する。 In this case, among the frames of the matching results shown in FIG. 14A (B), the frame is positioned to the left of the frame of coordinates (11, 1), (11, 2), (15, 2), (15, 1). Since the character line has already been extracted, the character line is extracted from the frame of the coordinates (11, 1), (11, 2), (15, 2), (15, 1).
図15に示す「確認番号」「789012」1507は、図14A(B)に示す座標(11,1)、(11,2)、(15,2)、(15,1)の枠から抽出された文字行であり、「確認番号」「789012」1507は、座標(11,1)、(11,2)、(15,2)、(15,1)と対応付けて記憶される。 15 is extracted from the frame of coordinates (11, 1), (11, 2), (15, 2), (15, 1) shown in FIG. 14A (B). The “confirmation number” “789012” 1507 is stored in association with the coordinates (11, 1), (11, 2), (15, 2), (15, 1).
次に、制御部108は、ステップ1001の処理で、処理対象の照合結果として図14A(C)に示す照合結果を選択する。
Next, in
この場合、図14A(C)に示す照合結果の枠のうち、座標(9,1)、(9,2)、(13,2)、(13,1)の枠よりも左に位置する枠から文字行は、すでに抽出されているので、座標(9,1)、(9,2)、(13,2)、(13,1)の枠及び座標(13,1)、(13,2)、(15,2)、(15,1)の枠から文字行を抽出する。 In this case, among the frames of the matching results shown in FIG. 14A (C), the frame is located to the left of the frame of coordinates (9, 1), (9, 2), (13, 2), (13, 1). Since the character line has already been extracted from the frame of coordinates (9,1), (9,2), (13,2), (13,1) and coordinates (13,1), (13,2) ), (15, 2), and a character line is extracted from the frame of (15, 1).
図15に示す「0」「確認番号」1508は、図14A(C)に示す座標(9,1)、(9,2)、(13,2)、(13,1)の枠から抽出された文字行であり、「0」「確認番号」1508は、座標(9,1)、(9,2)、(13,2)、(13,1)と対応付けて記憶される。 “0” “confirmation number” 1508 shown in FIG. 15 is extracted from the frame of coordinates (9, 1), (9, 2), (13, 2), (13, 1) shown in FIG. 14A (C). “0” and “confirmation number” 1508 are stored in association with coordinates (9, 1), (9, 2), (13, 2), and (13, 1).
図15に示す「789012」1509は、図14A(C)に示す座標(13,1)、(13,2)、(15,2)、(15,1)の枠から抽出された文字行であり、「789012」1509は、座標(13,1)、(13,2)、(15,2)、(15,1)と対応付けて記憶される。 “789012” 1509 shown in FIG. 15 is a character line extracted from the frame of coordinates (13, 1), (13, 2), (15, 2), (15, 1) shown in FIG. 14A (C). Yes, “7899012” 1509 is stored in association with coordinates (13, 1), (13, 2), (15, 2), and (15, 1).
次に、制御部108は、ステップ1001の処理で、処理対象の照合結果として図14B(D)に示す照合結果を選択する。
Next, in
この場合、図14B(D)に示す照合結果の枠のうち、座標(5,1)、(5,2)、(11,2)、(11,1)以外の枠から文字行は、すでに抽出されているので、座標(5,1)、(5,2)、(11,2)、(11,1)の枠から文字行を抽出する。 In this case, the character lines from the frames other than the coordinates (5, 1), (5, 2), (11, 2), (11, 1) in the matching result frame shown in FIG. Since it has been extracted, a character line is extracted from the frame of coordinates (5, 1), (5, 2), (11, 2), (11, 1).
図15に示す「0000010」1511は、図14B(D)に示す座標(5,1)、(5,2)、(11,2)、(11,1)の枠から抽出された文字行であり、「0000010」1511は、座標(5,1)、(5,2)、(11,2)、(11,1)と対応付けて記憶される。 “0000010” 1511 shown in FIG. 15 is a character line extracted from the frame of coordinates (5, 1), (5, 2), (11, 2), (11, 1) shown in FIG. 14B (D). Yes, “0000010” 1511 is stored in association with coordinates (5, 1), (5, 2), (11, 2), (11, 1).
次に、制御部108は、ステップ1001の処理で、処理対象の照合結果として図14B(E)に示す照合結果を選択する。
Next, the
この場合、図14B(E)に示す照合結果の枠のうち、座標(4,1)、(4,2)、(9,2)、(9,1)以外の枠から文字行は、すでに抽出されているので、座標(4,1)、(4,2)、(9,2)、(9,1)の枠から文字行を抽出する。 In this case, character lines from frames other than the coordinates (4, 1), (4, 2), (9, 2), and (9, 1) in the matching result frame shown in FIG. Since it has been extracted, a character line is extracted from the frame of coordinates (4, 1), (4, 2), (9, 2), (9, 1).
図15に示す「お客様番号」「00000」1510は、図14B(E)に示す座標(4,1)、(4,2)、(9,2)、(9,1)の枠から抽出された文字行であり、「お客様番号」「00000」1510は、座標(4,1)、(4,2)、(9,2)、(9,1)と対応付けて記憶される。 “Customer number” “00000” 1510 shown in FIG. 15 is extracted from the frame of coordinates (4, 1), (4, 2), (9, 2), (9, 1) shown in FIG. 14B (E). “Customer number” “00000” 1510 is stored in association with coordinates (4, 1), (4, 2), (9, 2), (9, 1).
次に、制御部108は、ステップ1001の処理で、処理対象の照合結果として図14B(F)に示す照合結果を選択する。
Next, in
この場合、図14B(F)に示す照合結果の枠のうち、座標(1,1)、(1,2)、(5,2)、(5,1)以外の枠から文字行は、すでに抽出されているので、座標(1,1)、(1,2)、(5,2)、(5,1)の枠から文字行を抽出する。 In this case, the character lines from the frames other than the coordinates (1, 1), (1, 2), (5, 2), (5, 1) among the frames of the matching result shown in FIG. Since it has been extracted, a character line is extracted from the frame of coordinates (1,1), (1,2), (5,2), (5,1).
図15に示す「12345」「お客様番号」1512は、図14B(F)に示す座標(1,1)、(1,2)、(5,2)、(5,1)の枠から抽出された文字行であり、「12345」「お客様番号」1512は、座標(1,1)、(1,2)、(5,2)、(5,1)と対応付けて記憶される。 “12345” and “customer number” 1512 shown in FIG. 15 are extracted from the frame of coordinates (1, 1), (1, 2), (5, 2), (5, 1) shown in FIG. 14B (F). “12345” and “customer number” 1512 are stored in association with coordinates (1,1), (1,2), (5,2), and (5,1).
次に、制御部108は、ステップ1001の処理で、処理対象の照合結果として図14C(G)に示す照合結果を選択する。
Next, in
この場合、図14C(G)に示す照合結果の枠のうち、座標(0,1)、(0,2)、(4,2)、(4,1)以外の枠から文字行は、すでに抽出されているので、座標(0,1)、(0,2)、(4,2)、(4,1)の枠から文字行を抽出する。 In this case, character lines from frames other than the coordinates (0, 1), (0, 2), (4, 2), and (4, 1) in the matching result frame shown in FIG. Since it has been extracted, a character line is extracted from the frame of coordinates (0, 1), (0, 2), (4, 2), (4, 1).
図15に示す「収納機関番号」「12345」1513は、図14C(G)に示す座標座標(0,1)、(0,2)、(4,2)、(4,1)の枠から抽出された文字行であり、「収納機関番号」「12345」1513は、座標(0,1)、(0,2)、(4,2)、(4,1)と対応付けて記憶される。 “Storage engine number” “12345” 1513 shown in FIG. 15 is obtained from the frame of coordinate coordinates (0, 1), (0, 2), (4, 2), (4, 1) shown in FIG. 14C (G). The extracted character line and “storage organization number” “12345” 1513 are stored in association with the coordinates (0, 1), (0, 2), (4, 2), (4, 1). .
次に、制御部108は、ステップ1001の処理で、処理対象の照合結果として図14C(H)に示す照合結果を選択する。
Next, in
この場合、図14C(G)に示す照合結果のすべての枠の文字行はすでに抽出されているので、制御部108は文字行を抽出しない。
In this case, since the character lines in all the frames of the matching result shown in FIG. 14C (G) have already been extracted, the
次に、制御部108は、ステップ1001の処理で、処理対象の照合結果として図14C(I)に示す照合結果を選択する。
Next, in
図14C(I)に示す照合結果の枠から抽出される文字行は図15に示す文字行1521〜1526である。文字行1521〜1526については図11に示す文字行1111〜1116と同じであるので説明を省略する。
Character lines extracted from the collation result frame shown in FIG. 14C (I) are character lines 1521 to 1526 shown in FIG. The character lines 1521 to 1526 are the same as the
図16は、本発明の実施形態の候補文字ネットワークの説明図である。 FIG. 16 is an explanatory diagram of a candidate character network according to the embodiment of this invention.
図2に示すステップ207の処理では、抽出された文字行から文字パタン候補が切り出され、ステップ208の処理では、切り出された文字パタン候補に対して、文字パタン候補に類似する文字(識別候補)と文字パタン候補の各識別候補に対する類似度とを算出し、候補文字ネットワークを生成する文字識別処理が実行される。
In the process of
文字パタン候補切出し及び文字識別処理は、特開2004−171316号公報に開示された手法を用いるが、他の手法を用いてもよい。 For the character pattern candidate extraction and character identification processing, the method disclosed in Japanese Patent Application Laid-Open No. 2004-171316 is used, but other methods may be used.
図16の(a)は、文字行抽出処理で抽出された文字行1601を示す。ここで、制御部108は、ステップ207の処理で、文字行1601から文字らしいパタンの候補を切出す。切り出された文字パタン候補は、図16の(b)に示すようにネットワークの形式で保存する。
(A) of FIG. 16 shows the
次に、ステップ208の処理で、制御部108は、切り出された文字パタン候補に対して文字識別処理を実行する。文字識別処理では、識別誤りを考慮し、複数の識別候補及び文字パタン候補の各識別候補に対する類似度が算出され、文字識別処理の識別結果として、図16の(b)に示す候補文字ネットワークが生成される。文字パタン候補の切り出し位置をノード1602とし、切り出された文字パタン候補はアーク1603とする。
Next, in the process of
図16の(c)は、候補文字ネットワークのデータの詳細を示す。図16の(c)では、識別候補を1605に示し、文字パタン候補の各識別候補に対する類似度を1606に示す。 FIG. 16C shows details of candidate character network data. In FIG. 16C, identification candidates are indicated by 1605, and the similarity of each character pattern candidate to each identification candidate is indicated by 1606.
図17は、本発明の実施形態の特定項目文字列照合処理のPAD図である。 FIG. 17 is a PAD diagram of specific item character string matching processing according to the embodiment of this invention.
特定項目文字列照合処理は、文字識別処理の結果と、当該文字識別処理を実行した枠に対応付けられた枠構造辞書に登録された枠の文字列情報と、を照合する。 The specific item character string collation process collates the result of the character identification process with the character string information of the frame registered in the frame structure dictionary associated with the frame on which the character identification process is executed.
まず、制御部108は、図7に示すステップ705の処理で記憶部110に記憶された照合結果の数だけステップ1702の処理以降の処理を実行する(1701)。ステップ1701の処理では、制御部108は、記憶部110に記憶された照合結果から、処理対象となる照合結果を一つ選択する。
First, the
次に、制御部108は、ステップ1701の処理で選択された照合結果に存在する枠の数だけ、ステップ1703の処理以降の処理を実行する(1702)。ステップ1702の処理では、制御部108は、ステップ1701の処理で選択された照合結果に存在する枠から、処理対象となる枠を一つ選択する。
Next, the
次に、制御部108は、処理対象の枠から抽出された文字行が複数行存在するか否かを判定する(1703)。ここで、文字行が複数行存在するとは、例えば、図11に示す文字行1101、1103、及び1105である。
Next, the
ステップ1703の処理で、処理対象の枠から抽出された文字行が複数行存在すると判定された場合、制御部108は、複数行の文字行に対してステップ208の処理の文字識別処理で算出された候補文字ネットワークを連結し(1704)、ステップ1705の処理に進む。具体的には、制御部108は、Y座標で上から下の順番で複数行の文字行の候補文字ネットワークを連結する。ステップ1704の処理の詳細は図18で詳細を説明する。
If it is determined in
ステップ1703の処理で、処理対象の枠から抽出された文字行が複数行存在しないと判定された場合、又は、ステップ1704の処理が実行された場合、制御部108は、処理対象の枠に対応する枠構造辞書600の枠の属性情報と、処理対象の枠の候補文字ネットワークとを照合することによって、処理対象の枠の属性情報に対する枠スコアを算出する(1705)。
When it is determined in the process of
ステップ1702の処理では、処理対象の照合結果のすべての枠にステップ1703〜1705の処理が実行された場合、つまり、処理対象の照合結果のすべての枠の枠スコアが算出された場合、制御部108は、枠スコアに基づいて当該処理対象の照合結果のスコアを算出する(1706)。照合結果のスコアは、例えば、枠スコアの平均値であってもよいし、枠スコアの和であってもよい。
In the processing of
ステップ1701の処理では、記憶部110に記憶されたすべての照合結果に対してステップ1706の処理でスコアが算出された場合、制御部108は、スコアが最大の照合結果を項目照合結果として返し(1707)、特定項目文字列照合処理を終了する。
In the processing of
図18は、本発明の実施形態の複数行の文字行の候補文字ネットワークを連結する処理の説明図である。 FIG. 18 is an explanatory diagram of processing for connecting candidate character networks of a plurality of character lines according to the embodiment of this invention.
文字行1801は、「収納機関」の文字行1802と「番号」の文字行1804との2行の文字行によって構成される。
The
文字行1802に対して文字識別処理が実行されて、候補文字ネットワーク1803が生成されている。また、文字行1804に対して文字識別処理が実行されて、候補文字ネットワーク1805が生成されている。
A character identification process is executed on the
ステップ1704の処理で、文字行1801の候補文字ネットワーク1803と候補文字ネットワーク1805とが連結され、連結候補文字ネットワーク1806が生成される。
In the process of
図19は、本発明の実施形態の候補文字ネットワークと枠構造辞書の文字列情報とを照合する処理の説明図である。 FIG. 19 is an explanatory diagram of a process of collating the candidate character network with the character string information of the frame structure dictionary according to the embodiment of this invention.
図19に示す1901は、図18に示す連結候補文字ネットワーク1806の各識別候補を枠構造辞書600の属性情報と照合した結果のパスである。また、図19に示す1902は、連結候補文字ネットワーク1806のデータの詳細である。
1901 shown in FIG. 19 is a path as a result of collating each identification candidate of the connection
図19に示す1903は、連結候補文字ネットワーク1806の切出候補の識別候補のうち、対応する枠構造辞書600の属性情報と一致する識別候補(識別結果)を示す。
19 indicates an identification candidate (identification result) that matches the attribute information of the corresponding
連結候補文字ネットワーク1806の基になった文字行が、図9(A)に示す照合結果の座標(0,1)、(0、2)、(1,2)、(1,1)の枠から抽出されているとした場合、当該枠は、枠構造辞書600の第1座標605の座標(0,0)、(0,1)、(1,1)、(1,0)に対応する。このため、連結候補文字ネットワーク1806の切出候補の識別候補を、枠構造辞書600の文字列定義604に登録された「収納機関番号」と照合する。
The character line that is the basis of the concatenation
図18に示す連結候補文字ネットワーク1806の同じノードの間に位置するアークが示す切出候補と照合される枠構造辞書600の文字列定義604の同じ文字である。例えば、図19に示す番号1、2、3の切出候補は、枠構造辞書600の文字列定義604の「収」と照合される。
This is the same character in the
図19に示す番号1の切出候補の識別候補には、文字列定義604に登録された「収納機関番号」の「収」と一致する識別候補が存在するので、当該識別候補を識別結果とする。
In the identification candidate of the extraction candidate No. 1 shown in FIG. 19, there exists an identification candidate that matches the “accommodation” of the “storage organization number” registered in the
図19に示す番号2及び番号3の切出候補の識別候補には、文字列定義604に登録された「収納機関番号」の「収」と一致する識別候補が存在しない。
In the identification candidates of the extraction candidates No. 2 and No. 3 shown in FIG. 19, there is no identification candidate that matches the “accommodation” of the “storage organization number” registered in the
図19に示す番号4の切出候補の識別候補には、文字列定義604に登録された「収納機関番号」の「納」と一致する識別候補が存在するので、当該識別候補を識別結果とする。
In the identification candidate of the
図19に示す番号5及び番号6の切出候補の識別候補には、文字列定義604に登録された「収納機関番号」の「納」と一致する識別候補が存在しない。
The identification candidates corresponding to the extraction candidates No. 5 and No. 6 shown in FIG. 19 do not have an identification candidate that matches the “payment” of the “storage organization number” registered in the
図19に示す番号7の切出候補の識別候補には、文字列定義604に登録された「収納機関番号」の「機」と一致する識別候補が存在するので、当該識別候補を識別結果とする。
In the identification candidate of the extraction candidate No. 7 shown in FIG. 19, there is an identification candidate that matches the “machine” of the “storage organization number” registered in the
図19に示す番号8の切出候補の識別候補には、文字列定義604に登録された「収納機関番号」の「関」と一致する識別候補が存在するので、当該識別候補を識別結果とする。
In the identification candidate of the
図19に示す番号9及び番号10の切出候補の識別候補には、文字列定義604に登録された「収納機関番号」の「関」と一致する識別候補が存在しない。
In the extraction candidate identification candidates No. 9 and No. 10 shown in FIG. 19, there is no identification candidate that coincides with “Seki” of “Storage Organization Number” registered in the
図19に示す番号11の切出候補の識別候補には、文字列定義604に登録された「収納機関番号」の「番」と一致する識別候補が存在するので、当該識別候補を識別結果とする。
In the identification candidate of the
図19に示す番号12の切出候補の識別候補には、文字列定義604に登録された「収納機関番号」の「号」と一致する識別候補が存在するので、当該識別候補を識別結果とする。
The identification candidate of the
なお、各切出候補の識別結果に対応する類似度に基づいて枠スコアが算出される。枠スコアは、各切出候補の識別結果に対応する類似度の平均であってもよいし、各切出候補の識別結果に対応する類似度の和であってもよい。 A frame score is calculated based on the similarity corresponding to the identification result of each extraction candidate. The frame score may be the average of the similarities corresponding to the identification results of each extraction candidate, or may be the sum of the similarities corresponding to the identification results of each extraction candidate.
また、図18に示す連結候補字ネットワーク1806の同じノードの間に位置するアークが示すすべての切出候補に識別結果が存在しない場合がある。これは、帳票に記載された文字が小さく、スキャナが帳票を取り込む際の解像度が低い場合等に、文字がつぶれて取り込まれることに起因する。このように、枠構造辞書600の文字列定義604に登録された文字列の文字のうち、識別結果が存在しない文字を不読文字という。
Further, there may be a case where there is no identification result for all extraction candidates indicated by arcs located between the same nodes of the linked
本実施形態では、文字列定義604に登録された文字列に不読文字が存在しても、不読文字が所定数以下であれば、枠の文字行を不読とせずに、次の切出候補に対して照合処理を継続して実行する。所定数は、例えば、文字列定義604に登録された文字列の文字数の1/3とする。
In the present embodiment, even if there is an unread character in the character string registered in the
これによって、帳票画像の枠の文字が認識でなくても、枠構造辞書600の当該枠に対応する文字列定義604によって当該文字を補完することができる。
Thus, even if the characters in the frame of the form image are not recognized, the characters can be complemented by the
さらに、本実施形態では、制御部108は、枠スコアが所定値以上であれば、当該枠スコアが算出された枠を、当該枠と照合した枠構造辞書600の文字列定義604として認識する。これによって、不読文字が存在しても、枠が枠構造辞書600のいずれの枠かを特定することができる。
Furthermore, in this embodiment, if the frame score is equal to or greater than a predetermined value, the
図20は、本発明の実施形態の特定項目文字列照合結果の説明図である。 FIG. 20 is an explanatory diagram of a specific item character string matching result according to the embodiment of this invention.
説明のために、図9(A)に示す枠構造照合結果901の帳票画像内における領域を照合領域2001として図示する。
For the sake of explanation, an area in the form image of the frame
枠構造照合結果901の各枠に対して特定項目文字列照合処理を実行した結果である特定項目文字列照合結果は、読取結果2002、枠スコア2003、枠構造照合結果のスコア2017を含む。読取結果2002、及び枠スコア2003は、枠構造照合結果901の各枠に対応する枠構造辞書600の項目602、属性603、及び文字列定義604と対応付けて、記憶部110に記憶される。
The specific item character string matching result that is a result of executing the specific item character string matching process for each frame of the frame
図20に示す2011は、項目602が「収納機関番号」で、属性603が「項目名」で、文字列定義604が「収納機関番号」である枠に対応する枠構造照合結果901の枠から抽出した文字行の読取結果2002が「機」が不読文字であることを示し、枠スコア2003が「206」であることを示す。
In FIG. 20,
図20に示す2012は、項目602が「収納機関番号」で、属性603が「データ」で、文字列定義604が「特定桁数数字列」である枠に対応する枠構造照合結果901の枠から抽出した文字行の読取結果2002が「12345」で、枠スコア2003が「246」であることを示す。
In FIG. 20, a frame
図20に示す2013は、項目602が「お客様番号」で、属性603が「項目名」で、文字列定義604が「お客様番号」である枠に対応する枠構造照合結果901の枠から抽出した文字行の読取結果2002が「お客様番号」で、枠スコア2003が「235」であることを示す。
20 shown in FIG. 20 is extracted from the frame of the frame
図20に示す2014は、項目602が「お客様番号」で、属性603が「データ」で、文字列定義604が「数字列」である枠に対応する枠構造照合結果901の枠から抽出した文字行の読取結果2002が「67890123456」で、枠スコア2003が「242」であることを示す。
In FIG. 20, a character extracted from the frame of the frame
図20に示す2015は、項目602が「確認番号」で、属性603が「項目名」で、文字列定義604が「確認番号」である枠に対応する枠構造照合結果901の枠から抽出した文字行が文字列定義604と照合できなかったことを示す。このため、読取結果2002が「?」で枠スコア2003が「0」である。
20 shown in FIG. 20 is extracted from the frame of the frame
図20に示す2016は、項目602が「確認番号」で、属性603が「データ」で、文字列定義604が「特定桁数数字列」である枠に対応する枠構造照合結果901の枠から抽出した文字行の読取結果2002が「789012」で、枠スコア2003が「234」であることを示す。
In FIG. 20,
枠構造照合結果901のスコア2017は各枠スコアの総和であり、「1163」である。なお、枠構造照合結果のスコア2017は各枠スコアの平均であってもよい。
The
図21は、本発明の実施形態の特定項目文字列照合の説明図である。なお、図21のうち図20の構成と同じ構成は、同じ符号を付与し、説明を省略する。 FIG. 21 is an explanatory diagram of specific item character string matching according to the embodiment of this invention. 21 that are the same as those in FIG. 20 are given the same reference numerals, and descriptions thereof are omitted.
説明のために、図9(B)に示す枠構造照合結果902の帳票画像内における領域を照合領域2101として図示する。
For the sake of explanation, an area in the form image of the frame
枠構造照合結果902の特定項目文字列照合結果は、読取結果2002、枠スコア2003、枠構造照合結果のスコア2017を含む。
The specific item character string matching result of the frame
図21に示す2111は、項目602が「収納機関番号」で、属性603が「項目名」で、文字列定義604が「収納機関番号」である枠に対応する枠構造照合結果902の枠から抽出した文字行の読取結果2002が「収納機関」が不読文字であり、「番号」が照合されたことを示し、枠スコア2003が「54」であることを示す。
2111 shown in FIG. 21 is from the frame of the frame
図21に示す2112は、項目602が「収納機関番号」で、属性603が「データ」で、文字列定義604が「特定桁数数字列」である枠に対応する枠構造照合結果902の枠から抽出した文字行の読取結果2002が「000−000−000」で、枠スコア2003が「233」であることを示す。
2112 shown in FIG. 21 is a frame of a frame
図21に示す2113は、項目602が「お客様番号」で、属性603が「項目名」で、文字列定義604が「お客様番号」である枠に対応する枠構造照合結果902の枠から抽出した文字行の読取結果2002が「お客様」が不読文字であり、「番号」が照合されたことを示し、枠スコア2003が「102」であることを示す。
21 is extracted from the frame of the frame
図21に示す2114は、項目602が「お客様番号」で、属性603が「データ」で、文字列定義604が「数字列」である枠に対応する枠構造照合結果902の枠から抽出した文字行の読取結果2002が「1234」で、枠スコア2003が「242」であることを示す。
21 is a character extracted from the frame of the frame
図21に示す2115は、項目602が「確認番号」で、属性603が「項目名」で、文字列定義604が「確認番号」である枠に対応する枠構造照合結果902の枠から抽出した文字行が文字列定義604と照合できなかったことを示す。このため、読取結果2002が「?」で枠スコア2003が「0」である。
21 is extracted from the frame of the frame
図21に示す2116は、項目602が「確認番号」で、属性603が「データ」で、文字列定義604が「特定桁数数字列」である枠に対応する枠構造照合結果901の枠から抽出した文字行が文字列定義604と照合できなかったことを示す。このため、読取結果2002が「?」で枠スコア2003が「0」である。
21 indicates a frame
枠構造照合結果902のスコア2017は各枠スコアの総和であり、「631」である。
The
図17に示すステップ1707の処理では、図20に示す枠構造照合結果901のスコア2017は、図21に示す枠構造照合結果902のスコア2017より大きいので、枠構造照合結果901の特定項目文字列照合結果を返す。
In the processing of
以上、本発明者によりなされた発明を実施形態に基づき具体的に説明したが、本発明は上述した実施形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることは言うまでもない。 Although the invention made by the present inventor has been specifically described based on the embodiments, the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the invention. Needless to say.
本願発明は、帳票を認識する帳票処理システムに適用可能である。 The present invention is applicable to a form processing system that recognizes forms.
100 帳票処理用計算機
101 帳票
102 スキャナ
103 画像入力部
104 電子データ
105 入力部
106 出力部
107 通信部
108 制御部
109 補助記憶部
110 記憶部
111 外部補助記憶部
112 内部バス
113 ネットワーク
114 外部サーバ
100 Computer for Form Processing 101
Claims (12)
前記帳票処理システムは、前記文字行を抽出する対象となる複数の抽出対象枠に対応する文字列と、前記複数の抽出対象枠の配置関係と、を対応付けた枠構造辞書データを記憶し、
前記帳票画像から枠を抽出枠として抽出する枠抽出部と、
前記枠構造辞書データを参照し、前記枠抽出部によって抽出された前記抽出枠を前記抽出対象枠に対応付けた照合結果を算出する枠照合部と、
前記枠照合部によって算出された照合結果に対して、前記抽出対象枠に対応付けられた抽出枠に存在する文字行を抽出する文字行抽出部と、
前記枠照合部によって算出された各照合結果に対して、前記文字行抽出部によって抽出された文字行が抽出された抽出枠に対応する前記抽出対象枠の文字列に対する当該文字行の類似度を示す枠スコアを算出し、各照合結果に含まれる前記抽出対象枠に対応付けられた枠の枠スコアに基づいて、各照合結果のスコアである照合結果スコアを算出するスコア算出部と、
前記スコア算出部によって算出された照合結果スコアに基づいて、前記枠照合部によって算出された照合結果のうち、一の照合結果を抽出照合結果とすることを特徴とする帳票処理システム。 In a form processing system that extracts character lines that are included in a form image and exists in a frame that is an area surrounded by line segments and recognizes the extracted character lines,
The form processing system stores frame structure dictionary data in which a character string corresponding to a plurality of extraction target frames from which the character line is to be extracted and an arrangement relationship of the plurality of extraction target frames are associated with each other.
A frame extraction unit for extracting a frame from the form image as an extraction frame;
A frame matching unit that refers to the frame structure dictionary data and calculates a matching result in which the extracted frame extracted by the frame extracting unit is associated with the extraction target frame;
A character line extraction unit that extracts a character line existing in an extraction frame associated with the extraction target frame with respect to the collation result calculated by the frame collation unit;
For each matching result calculated by the frame matching unit, the similarity of the character line with respect to the character string of the extraction target frame corresponding to the extraction frame from which the character line extracted by the character line extracting unit is extracted. A score calculation unit that calculates a frame score to indicate a matching result score that is a score of each matching result based on a frame score of the frame associated with the extraction target frame included in each matching result;
A form processing system characterized in that, based on the collation result score calculated by the score calculation unit, one collation result among the collation results calculated by the frame collation unit is used as an extraction collation result.
前記枠照合部は、前記枠抽出部によって抽出された抽出枠の数が前記抽出対象枠の数より多い場合、複数の前記抽出枠を一つの前記抽出対象枠に対応付けた照合結果を算出することを特徴とする請求項1に記載の帳票処理システム。 The frame extraction unit extracts grid points from the form image, extracts an area surrounded by predetermined grid points as the extraction frame,
When the number of extraction frames extracted by the frame extraction unit is greater than the number of extraction target frames, the frame verification unit calculates a verification result in which a plurality of the extraction frames are associated with one extraction target frame. The form processing system according to claim 1.
前記抽出された文字行と、当該文字行を抽出した抽出枠とを抽出済み文字行として記憶し、
前記文字行を抽出する対象となる抽出枠が前記抽出済み文字行として記憶されている場合、当該抽出枠から文字行を抽出しないことを特徴とする請求項1又は請求項2に記載の帳票処理システム。 The character line extraction unit
Storing the extracted character line and the extraction frame from which the character line is extracted as an extracted character line;
The form processing according to claim 1 or 2, wherein when an extraction frame that is a target for extracting the character line is stored as the extracted character line, a character line is not extracted from the extraction frame. system.
前記スコア算出部は、
前記文字行抽出部によって抽出された文字行から文字らしい大きさの切出候補を抽出し、
前記文字データを参照し、前記切出候補に類似する文字を識別候補として抽出し、当該識別候補の前記切出候補に対する類似度を算出し、
前記文字行が抽出された抽出枠に対応する前記抽出対象枠の文字列を構成する文字と一致する識別候補を前記識別候補から抽出し、
前記抽出した識別候補の類似度に基づいて前記枠スコアを算出することを特徴とする請求項1から請求項3のいずれか一つに記載の帳票処理システム。 Stores character data with multiple characters registered,
The score calculation unit
Extracting a candidate for a character-like size from the character line extracted by the character line extraction unit,
Referencing the character data, extracting a character similar to the extraction candidate as an identification candidate, calculating the similarity of the identification candidate to the extraction candidate,
Extracting an identification candidate that matches a character constituting a character string of the extraction target frame corresponding to the extraction frame from which the character line has been extracted from the identification candidate;
The form processing system according to claim 1, wherein the frame score is calculated based on a similarity of the extracted identification candidates.
前記文字行が抽出された抽出枠に対応する前記抽出対象枠の文字列を構成する文字と一致する識別候補が存在しない場合、当該識別候補が存在しない切出候補の次の切出候補の識別候補が当該抽出対象枠の文字列を構成する文字の次の文字と一致するか否かを判定することを特徴とする請求項4に記載の帳票処理システム。 The score calculation unit
When there is no identification candidate that matches the character constituting the character string of the extraction target frame corresponding to the extraction frame from which the character line has been extracted, identification of the extraction candidate next to the extraction candidate for which the identification candidate does not exist 5. The form processing system according to claim 4, wherein it is determined whether or not the candidate matches a character next to a character constituting the character string of the extraction target frame.
前記帳票処理システムは、前記文字行を抽出する対象となる複数の抽出対象枠に対応する文字列と、前記複数の抽出対象枠の配置関係と、を対応付けた枠構造辞書データを記憶し、
前記方法は、
前記帳票画像から枠を抽出枠として抽出する枠抽出ステップと、
前記枠構造辞書データを参照し、前記枠抽出ステップで抽出された前記抽出枠を前記抽出対象枠に対応付けた照合結果を算出する枠照合ステップと、
前記枠照合ステップで算出された照合結果に対して、前記抽出対象枠に対応付けられた抽出枠に存在する文字行を抽出する文字行抽出ステップと、
前記枠照合ステップで算出された各照合結果に対して、前記文字行抽出ステップで抽出された文字行が抽出された抽出枠に対応する前記抽出対象枠の文字列に対する当該文字行の類似度を示す枠スコアを算出し、各照合結果に含まれる前記抽出対象枠に対応付けられた枠の枠スコアに基づいて、各照合結果のスコアである照合結果スコアを算出するスコア算出ステップと、
前記スコア算出ステップで算出された照合結果スコアに基づいて、前記枠照合ステップで算出された照合結果のうち、一の照合結果を抽出照合結果とするステップと、を含むことを特徴とする帳票処理方法。 In a form processing method in which a form processing system extracts character lines existing in a frame that is included in a form image and is surrounded by a line segment, and recognizes the extracted character lines,
The form processing system stores frame structure dictionary data in which a character string corresponding to a plurality of extraction target frames from which the character line is to be extracted and an arrangement relationship of the plurality of extraction target frames are associated with each other.
The method
A frame extraction step of extracting a frame from the form image as an extraction frame;
A frame matching step of referring to the frame structure dictionary data and calculating a matching result in which the extraction frame extracted in the frame extraction step is associated with the extraction target frame;
A character line extraction step for extracting a character line existing in an extraction frame associated with the extraction target frame with respect to the collation result calculated in the frame collation step;
For each matching result calculated in the frame matching step, the similarity of the character line to the character string in the extraction target frame corresponding to the extraction frame from which the character line extracted in the character line extracting step is extracted. A score calculation step of calculating a matching score that is a score of each matching result based on a frame score of a frame associated with the extraction target frame included in each matching result;
A form processing comprising: a step of setting one collation result as an extraction collation result among the collation results calculated in the frame collation step based on the collation result score calculated in the score calculation step. Method.
前記枠照合ステップでは、前記枠抽出ステップで抽出された抽出枠の数が前記抽出対象枠の数より多い場合、複数の前記抽出枠を一つの前記抽出対象枠に対応付けた照合結果を算出することを特徴とする請求項7に記載の帳票処理方法。 In the frame extraction step, a grid point is extracted from the form image, an area surrounded by predetermined grid points is extracted as the extraction frame,
In the frame collation step, when the number of extraction frames extracted in the frame extraction step is larger than the number of extraction target frames, a collation result in which a plurality of the extraction frames are associated with one extraction target frame is calculated. The form processing method according to claim 7.
前記抽出された文字行と、当該文字行を抽出した抽出枠とを抽出済み文字行として記憶し、
前記文字行を抽出する対象となる抽出枠が前記抽出済み文字行として記憶されている場合、当該抽出枠から文字行を抽出しないことを特徴とする請求項7又は請求項8に記載の帳票処理方法。 In the character line extraction step,
Storing the extracted character line and the extraction frame from which the character line is extracted as an extracted character line;
The form processing according to claim 7 or 8, wherein when an extraction frame that is a target for extracting the character line is stored as the extracted character line, a character line is not extracted from the extraction frame. Method.
前記スコア算出ステップでは、
前記文字行抽出ステップで抽出された文字行から文字らしい大きさの切出候補を抽出し、
前記文字データを参照し、前記切出候補に類似する文字を識別候補として抽出し、当該識別候補の前記切出候補に対する類似度を算出し、
前記文字行が抽出された抽出枠に対応する前記抽出対象枠の文字列を構成する文字と一致する識別候補を前記識別候補から抽出し、
前記抽出した識別候補の類似度に基づいて前記枠スコアを算出することを特徴とする請求項7から請求項9のいずれか一つに記載の帳票処理方法。 The form processing system stores character data in which multiple characters are registered,
In the score calculation step,
Extracting a candidate for a character-like size from the character line extracted in the character line extraction step,
Referencing the character data, extracting a character similar to the extraction candidate as an identification candidate, calculating the similarity of the identification candidate to the extraction candidate,
Extracting an identification candidate that matches a character constituting a character string of the extraction target frame corresponding to the extraction frame from which the character line has been extracted from the identification candidate;
The form processing method according to any one of claims 7 to 9, wherein the frame score is calculated based on a similarity of the extracted identification candidates.
前記文字行が抽出された抽出枠に対応する前記抽出対象枠の文字列を構成する文字と一致する識別候補が存在しない場合、当該識別候補が存在しない切出候補の次の切出候補の識別候補が当該抽出対象枠の文字列を構成する文字の次の文字と一致するか否かを判定することを特徴とする請求項10に記載の帳票処理方法。 In the score calculation step,
When there is no identification candidate that matches the character constituting the character string of the extraction target frame corresponding to the extraction frame from which the character line has been extracted, identification of the extraction candidate next to the extraction candidate for which the identification candidate does not exist The form processing method according to claim 10, wherein it is determined whether or not the candidate matches a character next to a character constituting the character string of the extraction target frame.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011249165A JP5712415B2 (en) | 2011-11-14 | 2011-11-14 | Form processing system and form processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011249165A JP5712415B2 (en) | 2011-11-14 | 2011-11-14 | Form processing system and form processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013105344A true JP2013105344A (en) | 2013-05-30 |
JP5712415B2 JP5712415B2 (en) | 2015-05-07 |
Family
ID=48624827
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011249165A Active JP5712415B2 (en) | 2011-11-14 | 2011-11-14 | Form processing system and form processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5712415B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015135576A (en) * | 2014-01-16 | 2015-07-27 | グローリー株式会社 | Document item recognition method, device and program |
WO2017158800A1 (en) * | 2016-03-17 | 2017-09-21 | 株式会社Pfu | Mobile terminal, image processing method, and program |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH09161013A (en) * | 1995-12-13 | 1997-06-20 | Hitachi Ltd | Character read method and address read method |
US6246794B1 (en) * | 1995-12-13 | 2001-06-12 | Hitachi, Ltd. | Method of reading characters and method of reading postal addresses |
JP2009087378A (en) * | 2009-01-16 | 2009-04-23 | Hitachi Omron Terminal Solutions Corp | Business form processor |
JP2011221886A (en) * | 2010-04-13 | 2011-11-04 | Fujitsu Frontech Ltd | Business form recognition program, business form recognition device, and business form recognition method |
-
2011
- 2011-11-14 JP JP2011249165A patent/JP5712415B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH09161013A (en) * | 1995-12-13 | 1997-06-20 | Hitachi Ltd | Character read method and address read method |
US6246794B1 (en) * | 1995-12-13 | 2001-06-12 | Hitachi, Ltd. | Method of reading characters and method of reading postal addresses |
JP2009087378A (en) * | 2009-01-16 | 2009-04-23 | Hitachi Omron Terminal Solutions Corp | Business form processor |
JP2011221886A (en) * | 2010-04-13 | 2011-11-04 | Fujitsu Frontech Ltd | Business form recognition program, business form recognition device, and business form recognition method |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015135576A (en) * | 2014-01-16 | 2015-07-27 | グローリー株式会社 | Document item recognition method, device and program |
WO2017158800A1 (en) * | 2016-03-17 | 2017-09-21 | 株式会社Pfu | Mobile terminal, image processing method, and program |
JPWO2017158800A1 (en) * | 2016-03-17 | 2018-07-19 | 株式会社Pfu | Mobile terminal, image processing method, and program |
US10885375B2 (en) | 2016-03-17 | 2021-01-05 | Pfu Limited | Mobile terminal, image processing method, and computer-readable recording medium |
Also Published As
Publication number | Publication date |
---|---|
JP5712415B2 (en) | 2015-05-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2004139484A (en) | Form processing device, program for implementing it, and program for creating form format | |
JP6143111B2 (en) | Object identification device, object identification method, and program | |
JP2012083951A (en) | Information processing equipment, information processing method and program | |
JP4661921B2 (en) | Document processing apparatus and program | |
US11475688B2 (en) | Information processing apparatus and information processing method for extracting information from document image | |
JP2009193159A (en) | Area extraction program, character recognition program, and character recognition device | |
CN111340020B (en) | Formula identification method, device, equipment and storage medium | |
CN103136527B (en) | Image processing equipment and method | |
JP4834351B2 (en) | Character recognition device and character recognition method | |
CN114005126A (en) | Table reconstruction method and device, computer equipment and readable storage medium | |
JP4672692B2 (en) | Word recognition system and word recognition program | |
JP5712415B2 (en) | Form processing system and form processing method | |
US20180189562A1 (en) | Character recognition apparatus, character recognition method, and computer program product | |
US20180067916A1 (en) | Analysis apparatus, analysis method, and recording medium | |
JP4521466B2 (en) | Form processing device | |
JP2017187931A (en) | Table data conversion method, program, and image reading device | |
CN113269153B (en) | Form identification method and device | |
JP4521377B2 (en) | Form processing apparatus, program for executing the apparatus, and form format creation program | |
JP2023003887A (en) | Document image processing system, document image processing method, and document image processing program | |
JP2022095391A (en) | Information processing apparatus and information processing program | |
JP2009181225A (en) | Ocr device, trail management device and trail management system | |
JP6511942B2 (en) | INFORMATION PROCESSING APPARATUS AND INFORMATION PROCESSING PROGRAM | |
JP4213558B2 (en) | Document layout analysis program, computer-readable storage medium storing document layout analysis program, document layout analysis method, and document layout analysis apparatus | |
JP4221960B2 (en) | Form identification device and identification method thereof | |
JP7015706B2 (en) | Computer and document data processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140516 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150121 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20150210 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150213 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5712415 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |