JP2005128865A - Data recognition device and program - Google Patents
Data recognition device and program Download PDFInfo
- Publication number
- JP2005128865A JP2005128865A JP2003364812A JP2003364812A JP2005128865A JP 2005128865 A JP2005128865 A JP 2005128865A JP 2003364812 A JP2003364812 A JP 2003364812A JP 2003364812 A JP2003364812 A JP 2003364812A JP 2005128865 A JP2005128865 A JP 2005128865A
- Authority
- JP
- Japan
- Prior art keywords
- field
- recognition
- information
- result
- calculation
- 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 Input (AREA)
- Character Discrimination (AREA)
Abstract
Description
本発明は、照射した光の反射光から文字、数字及び記号を読み取り、演算式に含まれる数値の修正作業を行うデータ認識装置及びプログラムに関する。 The present invention relates to a data recognition apparatus and a program for reading characters, numbers, and symbols from reflected light of irradiated light and performing a correction operation on numerical values included in an arithmetic expression.
近年、紙に書かれた文字を文字コードとしてコンピュータに取り込む技術が飛躍的に進歩している。一般的には、イメージスキャナによって紙に書かれた文字や図形を読み込み、読み込んだイメージデータの中の文字部分を専用のソフトウェアによって文字コードに変換するという方法がとられている。この専用ソフトウェアはOCRソフトと呼ばれ、ビジネスユース、パーソナルユースに広く使われている。このOCRソフトの良し悪しを決定するのが認識率である。 In recent years, technology for taking characters written on paper into a computer as character codes has been dramatically improved. In general, a method is used in which characters and figures written on paper are read by an image scanner, and character portions in the read image data are converted into character codes by dedicated software. This dedicated software is called OCR software and is widely used for business use and personal use. The recognition rate determines whether the OCR software is good or bad.
OCRソフトの認識率を向上させる方法として、大きく2通りのアプローチが行われている。一つは「1文字1文字の認識率を向上させる」方法であり、もう一つは「前後の文脈やフィールド属性から、より確からしい認識候補を導き出す」方法である。後者の代表的な例として住所の認識が挙げられる。例えば、図24に示すように、予め得意先データベースや商品データベースを保持させておき、認識した文字列と該データベースを比較しながらより確からしい結果を導き出すというものである。 There are two main approaches for improving the recognition rate of OCR software. One is a method of “improving the recognition rate of one character per character”, and the other is a method of “deriving more probable recognition candidates from the preceding and following contexts and field attributes”. A typical example of the latter is address recognition. For example, as shown in FIG. 24, a customer database or a product database is held in advance, and a more probable result is derived while comparing the recognized character string with the database.
さらに、複数のフィールドの関連から認識率を上げる方法がある。具体的には、電話番号のフィールドの認識結果と住所フィールドの認識結果の確からしさを比較して、より確からしいフィールドの認識結果を元に他方を修正するという方法である。これにより、OCRソフトの認識率を向上させることができる。 Furthermore, there is a method for increasing the recognition rate from the relationship between a plurality of fields. Specifically, the probability of the recognition result of the telephone number field is compared with the probability of the recognition result of the address field, and the other is corrected based on the more probable field recognition result. Thereby, the recognition rate of OCR software can be improved.
また、伝票の明細行の誤認識を検出する為に相互に演算関係にある認識フィールド同士を演算し、演算結果と認識結果を比較することにより誤認識を検出する方法も知られている(例えば、特許文献1参照)。この方法は、図25に示すように、相互に演算関係にある数量×単価の演算を実行し、演算結果と、認識された金額のフィールドとを比較して、誤認識を検出する。また、金額フィールドの演算を行い、認識された合計金額と比較を行うことにより誤認識を検出し、検出結果に基づいて誤認識されたフィールドを判別する。具体的には、パイナップルの行において、”2(数量)×300(単価)≠500”を検出する。また、合計金額において、”500+100+500+2000+6000≠9200”を検出する。そして、この検出結果に基づいて、誤認識された可能性の高いフィールドが「パイナップルの金額」であると判別する。これにより、より確からしいフィールドの認識結果と、誤認識された可能性の高いフィールドの認識結果を正確に導き出すことができる。
しかしながら、上述した従来の光学的文字読取装置(例えば、特許文献1)においては、誤認識の検出は可能であるが誤認識フィールドの修正までは行えなかった。したがって、光学的文字読取装置により誤認識が検出された場合、オペレータによる修正作業を行う必要があった。ここで、修正箇所が多数ある場合、作業が煩雑であるという問題があり、オペレータ等の人的要因により誤修正が施される場合も少なくなかった。 However, in the above-described conventional optical character reading device (for example, Patent Document 1), it is possible to detect erroneous recognition but not to correct the erroneous recognition field. Therefore, when an erroneous recognition is detected by the optical character reader, it is necessary to perform a correction operation by an operator. Here, when there are a large number of correction points, there is a problem that the work is complicated, and there are not a few cases where erroneous correction is performed due to human factors such as an operator.
本発明の課題は、伝票や帳票から認識されるデータの認識率を向上させると共に、誤認識フィールドの修正を行うことにより精度良く伝票や帳票に記載されたデータを認識することができるデータ認識装置及びプログラムを提供することである。 An object of the present invention is to improve the recognition rate of data recognized from a slip or form, and to recognize the data described in the slip or form with high accuracy by correcting a misrecognition field And providing a program.
上記課題を解決するために、請求項1記載の発明は、
帳票に記入された情報を画像情報として読み取り、当該画像情報の文字認識を行うデータ認識装置であって、
前記画像情報に含まれるフィールドを定義するための設定情報を記憶する定義ファイルと、
前記設定情報に基づいて前記画像情報に含まれるフィールドを認識する認識手段と、
前記認識されたフィールド間における演算関係を入力する入力手段と、
前記演算関係に基づいて認識されたフィールド間の演算を行い、フィールドの認識結果と演算結果を比較して、誤認識があるか否かを判別する判別手段と、
フィールドの認識結果に誤認識があると判別された場合に、誤認識がないと判別されたフィールドの認識結果に基づいて、当該誤認識があると判別されたフィールドの値を算出する演算手段と、
を備えることを特徴としている。
In order to solve the above problem, the invention according to
A data recognition device that reads information entered in a form as image information and performs character recognition of the image information,
A definition file for storing setting information for defining fields included in the image information;
Recognition means for recognizing a field included in the image information based on the setting information;
Input means for inputting an arithmetic relationship between the recognized fields;
A discriminating means for performing an arithmetic operation between recognized fields based on the arithmetic relation, comparing the recognition result of the field with the arithmetic result, and determining whether or not there is a misrecognition;
Calculating means for calculating the value of the field determined to have the misrecognition based on the recognition result of the field determined to have no misrecognition when it is determined that the field recognition result has misrecognition; ,
It is characterized by having.
請求項1又は4記載の発明によれば、帳票に記入された情報を画像情報として読み取り、設定情報に基づいて画像情報に含まれるフィールドを認識し、認識されたフィールド間における演算関係を入力させ、入力された演算関係に基づいて、認識されたフィールド間の演算を行い、認識結果と演算結果に基づいて、各フィールドの認識結果に誤認識があるかを判別する。そして、誤認識があると判別されたフィールドに付いては、誤認識がないと判別されたフィールドの認識結果に基づいて演算を行い、正しい演算結果を取得することができる。これにより、誤認識として検出されたフィールドの修正作業を容易かつ正確に行うことができる。 According to the first or fourth aspect of the present invention, the information entered in the form is read as image information, the field included in the image information is recognized based on the setting information, and the arithmetic relationship between the recognized fields is input. Based on the input calculation relationship, the calculation between recognized fields is performed, and based on the recognition result and the calculation result, it is determined whether there is a misrecognition in the recognition result of each field. For a field determined to have erroneous recognition, an operation can be performed based on the recognition result of the field determined to have no erroneous recognition, and a correct operation result can be obtained. As a result, it is possible to easily and accurately correct the field detected as erroneous recognition.
請求項2記載の発明によれば、入力された演算関係を演算情報として記憶手段に記憶するため、形式が同じ帳票については、過去に定義された演算関係に基づいて、帳票の認識を行うことができる。これにより、業務効率を大幅に向上させることができる。 According to the second aspect of the present invention, since the inputted calculation relation is stored in the storage means as calculation information, for a form having the same format, the form is recognized based on the calculation relation defined in the past. Can do. Thereby, business efficiency can be improved significantly.
請求項3記載の発明によれば、認識結果と演算結果とが異なるフィールド及び認識の確からしさを記憶し、当該認識の確からしさに基づいて、認識されたフィールドに誤認識があるか否かを判別するため、誤認識のないフィールドと誤認識されたフィールドを精度よく判別することができる。これにより、データ認識装置の認識率を向上させると共に、誤認識されたフィールドついて正確な値を算出することができる。 According to the third aspect of the present invention, the field in which the recognition result and the calculation result are different and the probability of the recognition are stored, and whether or not the recognized field has a misrecognition based on the certainty of the recognition. In order to discriminate, it is possible to accurately discriminate between a field having no erroneous recognition and a field that has been erroneously recognized. As a result, the recognition rate of the data recognition apparatus can be improved, and an accurate value can be calculated for the misrecognized field.
以下、図を参照して本発明を実施するための最良の形態を詳細に説明する。ただし、発明の範囲は、図示例に限定されない。 Hereinafter, the best mode for carrying out the present invention will be described in detail with reference to the drawings. However, the scope of the invention is not limited to the illustrated examples.
まず、本実施の形態の構成を説明する。
図1は、本実施の形態におけるデータ認識装置1の概略構成を示す図である。図1に示すように、データ認識装置1は、読取装置11、定義ツール12、定義ファイル13、OCR認識エンジン14、業務アプリ15、記憶装置16、入力装置17、表示装置18等を備えて構成される。
First, the configuration of the present embodiment will be described.
FIG. 1 is a diagram showing a schematic configuration of a
読取装置11は、伝票や帳票を画像データとして取得し、取得した画像データを定義ツール12及びOCR認識エンジン14に出力する。図2に、読取装置11の構成ブロック図を示す。図2に示すように、読取装置11は、読取部11a、イメージ処理部11b、メモリ部11c、スキャナ制御部11d、インターフェース部11eを備えて構成される。
The
読取部11aは、伝票に光を照射する光源部111と、伝票から反射された光を読み取るCCD(Charge Coupled Device)112と、CCD112が読み取る画像信号をアナログ/デジタル変換するA/D変換部113とを備えている。この読取部11aは、光源部111からの光を伝票に対して照射し、その反射光をCCD112で検出することにより伝票の画像データを取得する。
The
イメージ処理部11bは、読取部11aで読み取った画像データに二値化、スムージング、ノイズ除去等の画像処理を施す。メモリ部11cは、イメージ処理部11bにおいて画像処理が施された伝票の画像データを格納する。
The
スキャナ制御部11dは、記憶装置16に格納されている各種制御プログラムを読み出してRAM内に展開し、それらの制御プログラムに従って、読取装置10の各部を制御する。インターフェース部11fは、スキャナ制御部11dの制御に応じて、メモリ部11cに格納された伝票の画像データを定義ツール12、OCR認識エンジン14、表示装置18に出力する。
The
図1に戻り、定義ツール12は、読み込まれた伝票の画像データ上に点在する認識フィールドの位置、認識フィールドの文字数や文字種、認識フィールド間における演算関係等の設定情報を定義するための役割を担うツールである。具体的に、定義ツール12は、記憶装置16から各種処理プログラムを読み出して、後述するメイン処理、イメージ読込処理、フィールド設定処理、演算設定処理を実行する。なお、各処理の詳細は後述する。
Returning to FIG. 1, the
以下、図3〜図4を参照して、定義ツール12により、定義される情報について説明する。図3(a)は、読み取られた伝票から認識フィールドの位置、認識フィールドの文字数及び文字種を設定する設定画面181を示す図である。図3(a)に示すように、例えば、設定画面181の上段には、得意先名を入力するフィールド181a、住所を入力するフィールド181b、電話番号を入力するフィールド181cが設けられている。ここで、入力装置17に備えるマウス等により、各フィールドの範囲(例えば、矩形領域)が指定されると、定義ツール12により、指定された矩形領域の位置情報(例えば、左上座標及び右下座標)が取得され、指定された矩形領域が認識フィールドとして設定される。
Hereinafter, information defined by the
また、フィールドの矩形領域が指定されると、図3(b)に示す設定画面182が表示され、この設定画面182において、対応する認識フィールドの文字数及び文字種が設定される。すなわち、設定画面182において入力された文字数及び文字種が指定されたフィールドの範囲と対応付けて取得され、定義ファイル13に設定情報として格納される。
When the rectangular area of the field is designated, a
また、設定画面181の下段には、商品名を入力するフィールド181d、数量を入力するフィールド181e、単価を入力するフィールド181f、金額を入力するフィールド181g、合計金額を入力するフィールド181hが設けられている。フィールド181d〜181hにおいても、認識フィールドの位置、認識フィールドの文字数及び文字種が同様に設定画面181及び182において設定される。
In the lower part of the
さらに、設定画面181の下段に示されるフィールド181d〜181hにおいては、演算関係が成立するため、これらの演算関係が定義ツール12により定義される。図4を参照して、定義ツール12により定義される演算関係について説明する。
Furthermore, in the
図4(a)は、2通りの演算関係が存在する伝票のデータ構成例を示す図である。まず、第1の演算関係として、図4(b)に示す通り、
金額フィールドf(4)=数量フィールドf(2)×単価フィールドf(3)
の演算関係が成立している。この演算関係は、"f(4)・1=f(2)・1xf(3)・1"を定義する演算情報として、定義ファイル13に格納可能なデータ形式に変換され、後述する定義ファイル13に格納される。例えば、上述した演算情報は、図5(b)のデータ181iに示すように、逆ポーランド記法を用いてスタック形式に変換される。なお、データ形式はこれに限定されない。
FIG. 4A is a diagram illustrating a data configuration example of a slip having two types of calculation relationships. First, as the first calculation relationship, as shown in FIG.
Amount field f (4) = quantity field f (2) × unit price field f (3)
The calculation relationship is established. This calculation relationship is converted into a data format that can be stored in the
次に、第2の演算関係として、図4(c)に示すとおり、
合計フィールドsum(1)=合計フィールドf(4)・1+合計フィールドf(4)・2+合計フィールドf(4)・3+合計フィールドf(4)・4+合計フィールドf(4)・5
の演算関係が成立している。この演算関係は、"sum(1)=f(4)・1+f(4)・2+f(4)・3+f(4)・4+f(4)・5"を定義する演算情報として、定義ファイル13に格納可能なデータ形式に変換され、後述する定義ファイル13に格納される。
Next, as the second calculation relationship, as shown in FIG.
Total field sum (1) = total field f (4) .1 + total field f (4) .2 + total field f (4) .3 + total field f (4) .4 + total field f (4) .5
The calculation relationship is established. This operation relation is an operation that defines "sum (1) = f (4) ・ 1 + f (4) ・ 2 + f (4) ・ 3 + f (4) ・ 4 + f (4) ・ 5" Information is converted into a data format that can be stored in the
定義ファイル13は、上述した定義ツール12により定義された設定情報、演算情報を格納する。図5〜図6を参照して、定義ツール12により定義された各情報のデータ構成例について説明する。図5〜図6に示すように、定義ファイル13は、階層構造的に接続された構造体を構築し、当該構造体の中に各情報に格納している。
The
図5に示すように、最上位の構造体として、伝票情報構造体12aが構築される。この伝票情報構造体12aには、基本情報、ヘッダ情報、明細情報が格納される。また、基本情報の下層には、基本情報構造体12bが構築され、読み取られた伝票の伝票サイズ(横)、伝票サイズ(縦)が格納される。
As shown in FIG. 5, a
ヘッダ情報の下層には、ヘッダ情報構造体12cが構築され、ヘッダ情報構造体12cには、発行元会社コード、発行元会社コード表示情報、発行元会社名、表示情報、発行元TEL番号、発行元TEL番号表示情報、発行元FAX番号、発行元FAX番号表示情報が格納される。
Below the header information, a
また、図6に示すように、ヘッダ情報構造体12cの項目の下層には、対応する表示表示情報構造体12i〜12lが構築されされている。そして、表示情報構造体12i〜12lには、対応するフィールドを表示画面に表示する位置を示す情報として、左下座標(横)、左下座標(縦)、右下座標(横)、右下座標(縦)が格納される。
Further, as shown in FIG. 6, corresponding display
図5に戻り、明細情報の下層には、明細情報構造体12dが構築され、明細情報構造体12dには、明細行数、フィールド数、フィールド情報、フィールド演算情報、合計フィールド数、合計フィールド情報、合計フィールド演算情報が格納される。
Returning to FIG. 5, a
また、明細情報構造体12dの下層には、フィールド情報に対応してフィールド情報構造体12m(図6)、フィールド演算情報に対応してフィールド演算情報構造体12e(図5)、合計フィールド情報に対応して合計フィールド情報構造体12q(図6)、合計フィールド演算情報に対応して合計フィールド演算情報構造体12g(図6)がそれぞれ構築されている。
Below the
図6に示すように、フィールド情報構造体12mには、文字数、文字種、フィールド表示情報、認識の確からしさ、認識候補、認識結果、次のフィールド情報が格納されている。また、フィールド表示情報の下層には、表示情報構造体12nが構築され、次のフィールド情報の下層には、フィールド情報構造体12oが構築されている。
As shown in FIG. 6, the
同様に、合計フィールド情報構造体12qには、文字数、文字種、フィールド表示情報、認識の確からしさ、認識候補、認識結果、次の合計フィールド情報が格納されている。また、フィールド表示情報の下層には、表示情報構造体12rが構築され、次のフィールド情報の下層には、合計フィールド情報構造体12sが構築されている。
Similarly, the total
また、図5に示すように、フィールド演算情報構造体12eには、演算情報、次の演算情報が格納されており、合計フィールド演算情報構造体12gには、合計演算情報、次の合計演算情報が格納されている。
Further, as shown in FIG. 5, the field
図1に戻り、OCR認識エンジン14は、データ処理部14a、データ管理部14b等を備えて構成され、定義ツール12により定義された各情報を定義ファイル13から取得し、読取装置11から入力される伝票の画像データの各種認識処理を行うと共に、処理された情報を管理する。
Returning to FIG. 1, the
データ処理部14aは、読取装置11から伝票の画像データを取得し、取得した画像データから定義ツール12により定義された情報に基づいてフィールドを認識し、認識したフィールドをデータ管理部14bに格納する。そして、データ処理部14aは、記憶装置16から各種プログラムを取得し、データ管理部14bに格納される情報に対して、後述するメイン処理、検算処理、誤認識フィールド検出処理、誤認識フィールド修正処理を実行する。なお、各処理の詳細については後述する。
The
データ管理部14bは、データ処理部14aにより認識されたフィールドをフィールド情報構造体に分類して格納すると共に、上述したデータ処理部14aにより実行された各処理において生成された情報を各構造体に格納して、管理する。図7〜図8を参照して、データ管理部14bに格納される情報のデータ構成例について説明する。図7〜図8に示すように、データ管理部14bは、各情報を階層構造的に接続された構造体に格納する。
The
図7は、伝票の画像データから認識されたフィールドに関する情報のデータ構成例を示す図である。図7に示すように、最上位の構造体として、伝票情報構造体14cが構築され、伝票情報構造体14cには、基本情報、ヘッダ情報、明細情報が格納される。また、伝票情報構造体14cの下層には、明細情報に対応して明細情報構造体14dが構築される。明細情報構造体14dには、明細行数、フィールド数、フィールド情報、フィールド演算情報、合計フィールド数、合計フィールド情報、合計フィールド演算情報が格納される。
FIG. 7 is a diagram illustrating a data configuration example of information regarding fields recognized from the image data of the slip. As shown in FIG. 7, a
また、明細情報構造体14dの下層には、フィールド情報に対応してフィールド情報構造体14eが構築され、フィールド情報構造体14eには、文字数、文字種、フィールド表示情報、認識の確からしさ、認識候補、認識結果、次のフィールド情報が格納される。フィールド演算情報に対応して、フィールド演算情報構造体14hが構築され、フィールド演算情報構造体14hには、演算情報、次の演算情報が格納される。
Further, a
また、図8は、認識されたフィールドのうち誤認識フィールドを特定するためのデータ管理情報のデータ構成例を示す図である。最上位の構造体には、検算管理情報14jが構築され、検算管理情報14jの下層には、検算管理構造体14kが構築されている。この検算管理構造体14kには、異常フィールド情報、正常フィールド情報が格納される。
FIG. 8 is a diagram illustrating a data configuration example of data management information for specifying a misrecognized field among recognized fields. The
また、検算管理構造体14kの下層には、異常フィールド情報に対応して異常フィールド管理構造体14lが構築され、異常フィールド管理構造体14lには、不正フィールド情報と次の管理構造体が格納される。そして、後述する検算処理の結果、異常フィールド管理構造体14lに不正フィールド情報が格納された場合、検算結果が異常であったフィールドのフィールド情報構造体(図7)がポイントされる。
In addition, an abnormal
また、検算管理構造体14kの下層には、正常フィールド情報に対応して正常フィールド管理構造体14hが構築され、正常フィールド管理構造体14hには、正常フィールド情報と次の管理構造体が格納される。そして、後述する検算処理の結果、正常フィールド管理構造体14hに正常フィールド情報が格納された場合、検算結果が正常であったフィールドのフィールド情報構造体(図7)がポイントされる。
Further, a normal
図1に戻り、業務アプリ15は、OCR認識エンジン14において、処理されたデータを用いて各種業務処理を行うアプリケーションである。
Returning to FIG. 1, the
記憶装置16は、プログラムやデータ等があらかじめ記憶されている記録媒体(図示せず)を有しており、この記録媒体は磁気的、光学的記録媒体、若しくは半導体メモリで構成されている。この記録媒体は記録装置16に固定的に設けられるもの、若しくは着脱自在に装着するものであり、この記録媒体には、前記システムプログラム及び当該システムに対応する各種アプリケーションプログラム、及び各種処理プログラムで処理されたデータ等を記憶する。
The
また、記録媒体に記憶するプログラム、データ等は、その一部若しくは全部をサーバやクライアント等の他の機器からWAN(Wide Area Netwrok)、LAN(Local Area Network)等のネットワーク回線の伝送媒体を介して伝送制御部14から受信して記憶する構成にしてもよく、さらに、記録媒体はネットワーク上に構築されたサーバの記録媒体であってもよい。さらに、前記プログラムをネットワーク回線等の伝送媒体を介してサーバやクライアントへ伝送してこれらの機器にインストールするように構成してもよい。
Some or all of the programs, data, and the like stored in the recording medium are transmitted from other devices such as a server and a client via a network line transmission medium such as a WAN (Wide Area Network) and a LAN (Local Area Network). The recording medium may be received and stored from the
入力装置17は、カーソルキー、数字入力キー、及び各種機能キーを備えたキーボードを含み、このキーボードで押下されたキーに対応する押下信号を読取装置11、定義ツール12又はデータ処理部14aに出力する。なお、入力装置17は、必要に応じてマウス、タッチパネル等のポインティングデバイスや、その他の入力装置を備えるものとしてもよい。
The
表示装置18は、CRT(Cathode Ray Tube)やLCD(Liquid Crystal Display)等によってなる表示画面を備え、読取装置11から読み取られた画像データや入力装置17から入力された入力指示等の表示情報を画面上に表示する。
The
次に、本実施の形態の動作を説明する。
後述する各フローチャートに記述されている各機能を実現するためのプログラムは読み取り可能なプログラムコードの形態でデータ認識装置1の記憶装置16に格納されており、定義ツール12又はデータ処理部14aは、該プログラムコードに従った動作を逐次実行する。
Next, the operation of the present embodiment will be described.
A program for realizing each function described in each flowchart described later is stored in the
まず、図9〜図18を参照して、定義ツール12により実行される処理について説明する。図9は、定義ツール12により実行されるメイン処理を示すフローチャートである。図9に示すように、入力装置17を介して実行する処理が選択されると(ステップS1)、定義ツール12により、終了選択であるか否かを判別され、終了選択でない場合(ステップS2;NO)、イメージ読込処理が選択されたか否かが判別される(ステップS3)。ここで、イメージ読込処理が選択された場合(ステップS3;YES)、定義ツール12により、記憶装置16からイメージ読込処理プログラムが読み出され、後述するイメージ読込処理(図10)が実行される(ステップS6)。図10を参照してイメージ読込処理について説明する。
First, processing executed by the
図10は、メイン処理の一部として実行されるイメージ読込処理を示すフローチャートである。図10に示すように、読取装置11から伝票の画像データ(イメージ)が読み込まれると(ステップS11)、定義ツール12により、読み込まれた画像データが記憶装置16(主記憶装置)の所定のアドレスに格納される(ステップS12)。さらに、読み込まれた画像データが表示装置18に表示され(ステップS13)、本イメージ読込処理終了後、メイン処理に移行する。
FIG. 10 is a flowchart showing an image reading process executed as a part of the main process. As shown in FIG. 10, when the slip image data (image) is read from the reading device 11 (step S11), the
図9に戻り、ステップS1においてフィールド設定の処理が選択された場合(ステップS4;YES)、定義ツール12により、記憶装置16からフィールド設定処理プログラムが読み出され、後述するフィールド設定処理(図11)が実行される。図11を参照して、フィールド設定処理について説明する。
Returning to FIG. 9, when the field setting process is selected in step S1 (step S4; YES), the
図11は、メイン処理の一部として実行されるフィールド設定処理を示すフローチャートである。図11に示すように、フィールド設定処理を実行するにあたり、初期化処理(図12)が実行される。図12を参照して初期化処理について説明する。 FIG. 11 is a flowchart showing a field setting process executed as part of the main process. As shown in FIG. 11, when the field setting process is executed, an initialization process (FIG. 12) is executed. The initialization process will be described with reference to FIG.
図12に示すように、レジスタの初期化が行われ、「CNT=0,SX=0,SY=0,EX=0,ET=0,CN=0,CK=0」としてセットされる(ステップS41)。次に、フィールド情報構造体が確保され、アドレスが「Mlinep→Fieldp」及びレジスタFPにセットされる(ステップS42)。さらに、表示情報構造体が確保され、アドレスが「Mlinep→Fieldp→FieldDispp」及びレジスタFDPにセットされる(ステップS43)。そして、本初期化処理終了後、フィールド設定処理に移行する。 As shown in FIG. 12, the register is initialized and set as “CNT = 0, SX = 0, SY = 0, EX = 0, ET = 0, CN = 0, CK = 0” (step S41). Next, the field information structure is secured, and the address is set in “Mlinep → Fieldp” and the register FP (step S42). Further, the display information structure is secured, and the address is set in “Mlinep → Fieldp → FieldDispp” and the register FDP (step S43). Then, after the initialization process is completed, the process proceeds to the field setting process.
図11に戻り、入力装置17を介して実行する処理が選択されると(ステップS22)、定義ツール12により、終了選択であるか否かを判別され、終了選択でない場合(ステップS23;NO)、位置・大きさ設定の指示が選択されたか否かが判別される(ステップS24)。
Returning to FIG. 11, when the process to be executed is selected via the input device 17 (step S22), the
ここで、位置大きさ設定の指示が入力された場合(ステップS24;YES)、すなわち、上述した図3(a)に示す設定画面181において、マウス等により、矩形領域が指定された場合、指定された矩形領域の左上座標(SX,SY)及び右下座標(EX,EY)を取得する(ステップS25)。次に、指定された矩形領域の最大文字数及び文字種を設定するための設定画面182(図3(b))を表示装置18に表示させ(ステップS26)、設定画面182において入力された最大文字数(CN)及び文字種(CK)を取得する(ステップS27、S28)。
Here, when an instruction to set the position size is input (step S24; YES), that is, when a rectangular area is specified by the mouse or the like on the
そして、取得した各情報が所定のアドレスに格納される(ステップS28)。すなわち、フィールド情報構造体(FP)の文字数(Chanum)に取得された文字種(CN)が格納され、フィールド情報構造体(FP)の文字種(Charkind)に取得された文字種(CK)が格納される。また、表示構造情報体(FDP)の左上座標横(SX)、左上座標縦(SY)、右下座標横(EX)、右下座標縦(EY)に、取得された左上座標(SX,SY)、右下座標(EX,EY)がそれぞれ格納される。 Then, each acquired information is stored at a predetermined address (step S28). That is, the acquired character type (CN) is stored in the number of characters (Chanum) of the field information structure (FP), and the acquired character type (CK) is stored in the character type (Charkind) of the field information structure (FP). . The upper left coordinate (SX, SY), the upper left coordinate horizontal (SX), the upper left coordinate vertical (SY), the lower right coordinate horizontal (EX), and the lower right coordinate vertical (EY) of the display structure information body (FDP) are obtained. ) And lower right coordinates (EX, EY) are stored.
次いで、次のフィールドを定義するため、領域確保・レジスタ更新処理が実行される(ステップS30)。図13は、フィールド設定処理の一部として実行フィールド情報構造体を確保され(ステップS45)、アドレスが「FP→Nextp」にセットされる(ステップS45)。次いで、「FP」を「FP→Nextp」とする(ステップS46)。また、表示情報構造体が確保され、アドレスが「FP→FieldDispp」にセットされる(ステップS47)。次いで、「FDP」を「FP→FieldDispp」とする(ステップS46)。そして、領域確保・レジスタ更新処理終了後、フィールド設定処理に移行する。 Next, in order to define the next field, an area reservation / register update process is executed (step S30). In FIG. 13, the execution field information structure is secured as part of the field setting process (step S45), and the address is set to “FP → Nextp” (step S45). Next, “FP” is changed to “FP → Nextp” (step S46). Further, the display information structure is secured and the address is set to “FP → FieldDispp” (step S47). Next, “FDP” is changed to “FP → FieldDispp” (step S46). Then, after the area reservation / register update process is completed, the process proceeds to the field setting process.
図11に戻り、レジスタのカウンタがインクリメント(+1)されて(ステップS31)、ステップS22に移行し、次の処理が選択されると(ステップS22)、ステップS24〜S31の処理が繰り返して実行される。一方、終了処理が選択された場合(ステップS23;YES)、フィールド設定処理を終了するための後処理が実行される(ステップS32)。図14を参照して後処理について説明する。 Returning to FIG. 11, the register counter is incremented (+1) (step S31), the process proceeds to step S22, and when the next process is selected (step S22), the processes of steps S24 to S31 are repeatedly executed. The On the other hand, when the end process is selected (step S23; YES), a post process for ending the field setting process is executed (step S32). The post-processing will be described with reference to FIG.
図14に示すように、まず、カウンタが0であるか否かが判別され、カウンタが0である場合(ステップS51;YES)、「Mlinp→Fieldp→FieldDispp」でポイントされたメモリが解放される(ステップS52)。次いで、「Mlinp→Feildp」でポイントされたメモリが解放され(ステップS53)、フィールド設定処理が終了される。 As shown in FIG. 14, first, it is determined whether or not the counter is 0. If the counter is 0 (step S51; YES), the memory pointed to by “Mlinp → Fieldp → FieldDispp” is released. (Step S52). Next, the memory pointed to by “Mlinp → Feildp” is released (step S53), and the field setting process ends.
続いて、図9に戻り、ステップS1において、演算設定の処理が選択されると(ステップS5;YES)、定義ツール12により、記憶装置16から演算設定処理プログラムを読み出して、後述する演算設定処理を実行させる(ステップS8)。図15を参照して演算設定処理について説明する。
Subsequently, returning to FIG. 9, when calculation setting processing is selected in step S <b> 1 (step S <b> 5; YES), the
図15は、メイン処理の一部として実行される演算設定処理を示すフローチャートである。図15に示すように、演算設定処理を実行するにあたり、初期化処理(図16)が実行される(ステップS61)。図16を参照して初期化処理について説明する。 FIG. 15 is a flowchart showing calculation setting processing executed as part of the main processing. As shown in FIG. 15, in executing the calculation setting process, an initialization process (FIG. 16) is executed (step S61). The initialization process will be described with reference to FIG.
図16は、演算設定処理の一部として実行される初期化処理を示すフローチャートである。図16に示すように、レジスタの初期化が行われ、カウンタが0にセットされる(ステップS71)。次いで、フィールド情報構造体が確保され、アドレスが「Mlinep→FieldCulp」及びレジスタFCPにセットされる(ステップS72)。さらに、表示情報構造体が確保され、アドレスが「FCP→FieldCulp」及びレジスタFCPにセットされる(ステップS73)。そして、本初期化処理終了後、演算設定処理に移行する。 FIG. 16 is a flowchart showing an initialization process executed as a part of the calculation setting process. As shown in FIG. 16, the register is initialized and the counter is set to 0 (step S71). Next, the field information structure is secured, and the address is set in “Mlinep → FieldCulp” and the register FCP (step S72). Further, the display information structure is secured, and the address is set in “FCP → FieldCulp” and the register FCP (step S73). Then, after the initialization process is completed, the process proceeds to the calculation setting process.
図15に戻り、入力装置17を介して実行する処理が選択されると(ステップS62)、定義ツール12により、終了選択であるか否かを判別され、終了選択でない場合(ステップS63;NO)、認識フィールドが選択されたか否かが判別される(ステップS64)。
Returning to FIG. 15, when the process to be executed is selected via the input device 17 (step S62), the
認識フィールドが選択された場合(ステップS64;YES)、選択されたフィールドのフィールド情報構造体が特定される(ステップS65)。次いで、FCPスタックに「FP」が追加され(ステップS66)、FCPスタックに「=」が追加される(ステップS67)。続いて、定義ツール12により、記憶装置16から演算情報のセット処理プログラムが読み出され、演算情報のセット処理が実行される(ステップS68)。図17を参照して、演算情報のセット処理について説明する。
When the recognition field is selected (step S64; YES), the field information structure of the selected field is specified (step S65). Next, “FP” is added to the FCP stack (step S66), and “=” is added to the FCP stack (step S67). Subsequently, the
図17は、演算設定処理の一部として実行される演算情報のセット処理を示すフローチャートである。図17に示すように、入力装置17を介して認識フィールドが選択される(ステップS82;YES)、選択された認識フィールドのフィールド情報構造体(FP)が特定され(ステップS83)、FCPスタックに「FP」が追加される(ステップS84)。 FIG. 17 is a flowchart showing calculation information setting processing executed as part of the calculation setting processing. As shown in FIG. 17, a recognition field is selected via the input device 17 (step S82; YES), and the field information structure (FP) of the selected recognition field is specified (step S83), and is added to the FCP stack. “FP” is added (step S84).
次いで、演算子が入力されたか否かが判別され(ステップS85)、演算子が入力された場合(ステップS85;YES)、FCPスタックに入力された演算子が追加される(ステップS86)。続いて、終了指示が選択されたか否かが判別され、終了指示が入力されない場合(ステップS81;NO)、ステップS82〜S86の処理が繰り返して実行される。終了指示が選択された場合(ステップS81;YES)、本演算情報のセット処理を終了して、演算設定処理に移行する。 Next, it is determined whether or not an operator has been input (step S85). If an operator has been input (step S85; YES), the operator input to the FCP stack is added (step S86). Subsequently, it is determined whether or not an end instruction has been selected. If no end instruction is input (step S81; NO), the processes of steps S82 to S86 are repeated. When the end instruction is selected (step S81; YES), the calculation information setting process is ended, and the process proceeds to the calculation setting process.
図15に戻り、演算情報のセット処理が終了されると(ステップS68)、レジスタのカウンタがインクリメントされ(ステップS69)、ステップS62に移行して、次の処理が選択される(ステップS62)。ここで、次の認識フィールドが選択されると、ステップS65〜S69の処理が繰り返して実行される。一方、終了処理が選択されると(ステップS63;YES)、演算設定処理を終了するための後処理を実行される(ステップS70)。図18を参照して、後処理について説明する。 Returning to FIG. 15, when the calculation information setting process is completed (step S68), the counter of the register is incremented (step S69), the process proceeds to step S62, and the next process is selected (step S62). Here, when the next recognition field is selected, the processes of steps S65 to S69 are repeated. On the other hand, when the end process is selected (step S63; YES), a post process for ending the calculation setting process is executed (step S70). The post-processing will be described with reference to FIG.
図18に示すように、まず、カウンタが0であるか否かが判別され、カウンタが0である場合(ステップS87;YES)、「Mlinp→FieldCulp→Culinfop」でポイントされたメモリが解放される(ステップS88)。次いで、「Mlinp→FeildCulp」でポイントされたメモリが解放され(ステップS89)、演算設定処理が終了される。 As shown in FIG. 18, first, it is determined whether or not the counter is 0. If the counter is 0 (step S87; YES), the memory pointed to by “Mlinp → FieldCulp → Culinfop” is released. (Step S88). Next, the memory pointed to by “Mlinp → FeildCulp” is released (step S89), and the calculation setting process ends.
図9に戻り、イメージ読込処理(図10)、フィールド設定処理(図11)、演算設定処理(図18)等の各処理が終了すると、ステップS1に移行して、次の処理を選択させる。ここで、終了処理が選択されると(ステップS2)、定義ツール12により実行されるメイン処理が終了する。
Returning to FIG. 9, when the image reading process (FIG. 10), the field setting process (FIG. 11), the calculation setting process (FIG. 18), and the like are completed, the process proceeds to step S <b> 1 and the next process is selected. Here, when the termination process is selected (step S2), the main process executed by the
次に、図19〜図23を参照してデータ処理部14aにより実行される各処理について説明する。図19は、データ処理部14aにより実行されるメイン処理を示すフローチャートである。図19に示すように、「FCP」を「Mlinep→FieldCulp」とする(ステップS91)。次いで、データ処理部14aにより、正常フィールド管理構造体領域を確保させ、アドレスが「KMNP→rightp」及びレジスタrightpにセットされる(ステップS92)。
Next, each process executed by the
また、異常フィールド管理構造体領域が確保され、アドレスが「KMNP→badp」及びレジスタBadpにセットされる(ステップS92)。次いで、FCPが0であるか否かを判別され(ステップS94)、FCPが0でない場合(ステップS94;NO)、記憶装置16から検算処理プログラムが読み出され、後述する検算処理(図20)が実行される。図20を参照して検算処理について説明する。
Also, an abnormal field management structure area is secured, and the address is set in “KMNP → badp” and the register Badp (step S92). Next, it is determined whether or not the FCP is 0 (step S94). If the FCP is not 0 (step S94; NO), the verification processing program is read from the
図20は、メイン処理の一部として実行される検算処理を示すフローチャートである。図20に示すように、「SP」を「FCP->Culinfop」とする(ステップS111)。次いで、SPでポイントされたスタックに、例えば、逆ポーランド記法によりスタックされた演算を実行する(ステップS112)。そして、演算結果が正しいか否かが判別される(ステップS113)。 FIG. 20 is a flowchart showing a verification process executed as part of the main process. As shown in FIG. 20, “SP” is set to “FCP-> Culinfop” (step S111). Next, for example, an operation stacked in the reverse Polish notation on the stack pointed by SP is executed (step S112). Then, it is determined whether or not the calculation result is correct (step S113).
演算結果が正しい場合(ステップS113;YES)、引数を「Rightp」として、フィールド管理構造体の構築が行われる(ステップS114)。一方、演算結果が誤っている場合(ステップS113;NO)、引数を「Badp」として、フィールド管理構造体の構築が行われる(ステップS114)。図21を参照して、フィールド管理構造体の構築処理について説明する。 If the calculation result is correct (step S113; YES), the field management structure is constructed with the argument “Rightp” (step S114). On the other hand, if the operation result is incorrect (step S113; NO), the field management structure is constructed with the argument “Badp” (step S114). With reference to FIG. 21, the construction process of the field management structure will be described.
図21は、検算処理の一部として実行されるフィールド管理構造体の構築処理を示すフローチャートである、図21に示すように、データ処理部14aにより、スタックポインタSPが抜き出され、レジスタの「RR」に格納される(ステップS121)。次いで、「RR」が「=」であるか否かどうかが判別され(ステップS122)、「RR」が「=」でない場合(ステップS122;NO)、「RR」が演算子であるか否かが判別される(ステップS123)。「RR」が演算子である場合(ステップS123;YES)、ステップS121に移行する。
FIG. 21 is a flowchart showing a field management structure construction process executed as a part of the verification process. As shown in FIG. 21, the
一方、「RR」が演算子でない場合(ステップS123;NO)、「PP→fp」を「RR」とする(ステップS124)。そして、フィールド管理構造体が確保され、アドレスが「PP→Nextp」及び「PP」にセットされる(ステップS124)。そして、スタックポイントSPが抜き出され、「RR」が「=」であるか否かどうかが判別される(ステップS122)。ここで、「RR」が「=」である場合(ステップS122)、本フィールド管理構造体の構築処理が終了される。 On the other hand, when “RR” is not an operator (step S123; NO), “PP → fp” is set to “RR” (step S124). Then, the field management structure is secured, and the addresses are set to “PP → Nextp” and “PP” (step S124). Then, the stack point SP is extracted, and it is determined whether or not “RR” is “=” (step S122). Here, when “RR” is “=” (step S122), the construction process of the field management structure is ended.
上述した本フィールド管理構造体の構築処理においては、検算処理において演算結果が正解であった場合、その演算結果を構成するフィールドのフィールド情報構造体のアドレスが正常フィールド管理構造体に記憶される。また、検算処理において演算結果に誤りがあった場合、その演算結果を構成するフィールドのフィールド情報構造体のアドレスが異常構造フィールド管理構造体に格納される。 In the construction process of the field management structure described above, when the calculation result is correct in the verification process, the address of the field information structure of the field constituting the calculation result is stored in the normal field management structure. If there is an error in the operation result in the verification process, the address of the field information structure of the field constituting the operation result is stored in the abnormal structure field management structure.
したがって、フィールド管理構造体の構築処理により、正常フィールド管理構造体にリストされるフィールドには、誤認識フィールドは含まれないが、異常フィールド管理構造体にリストされるフィールドには、正しく認識されているフィールドも含まれることとなる。 Therefore, the field management structure construction process does not include the misrecognized field in the field listed in the normal field management structure, but the field listed in the abnormal field management structure is correctly recognized. This field is also included.
次いで、図19に戻り、検算処理が終了すると、「FCP」を「FCP→FieldNextp」とし、ステップS94に移行する。ステップS94において、FCPが0であると判別された場合(ステップS94;YES)、「FCP」を「Mlinep→FieldCulp」とする(ステップS97)。次いで、「KMNP→badp」が0であるか否かが判別され(ステップS98)、「KMNP→badp」が0の場合(ステップS98;YES)、メイン処理が終了される。 Next, returning to FIG. 19, when the verification process ends, “FCP” is changed to “FCP → FieldNextp”, and the process proceeds to step S94. If it is determined in step S94 that FCP is 0 (step S94; YES), “FCP” is changed to “Mlinep → FieldCulp” (step S97). Next, it is determined whether or not “KMNP → badp” is 0 (step S98). If “KMNP → badp” is 0 (step S98; YES), the main process is terminated.
一方、「KMNP→badp」が0でない場合(ステップS98;NO)、データ処理部14aにより、記憶装置16から誤認識フィールド検出処理プログラムが読みだされ、後述する誤認識フィールド検出処理(ステップS99)が実行される。この誤認識フィールド検出処理は、上述したフィールド管理構造体の構築処理において、異常フィールド構造体にリストされたフィールドの中から、正しく認識されたフィールドを取り除く処理である。図22を参照して誤認識フィールド検出処理を説明する。
On the other hand, if “KMNP → badp” is not 0 (step S98; NO), the
図22は、メイン処理の一部として実行される誤認識フィールド検出処理を示すフローチャートである。図22に示すように、「Rightp」を「KMNP→rightp」、「Badp」を「KMNP→badp」、レジスタの「B」を「Badp」、レジスタの「R」を「Rightp」とする(ステップS131〜S134)。次いで、「R」が0であるか否かが判別され(ステップS135)、「R」が0の場合(ステップS135;YES)、「B」が「B→Nextp」とされて、ステップS134に移行する。 FIG. 22 is a flowchart showing a misrecognition field detection process executed as part of the main process. As shown in FIG. 22, “Rightp” is “KMNP → rightp”, “Badp” is “KMNP → badp”, register “B” is “Badp”, and register “R” is “Rightp” (step) S131-S134). Next, it is determined whether or not “R” is 0 (step S135). If “R” is 0 (step S135; YES), “B” is changed to “B → Nextp”, and the process proceeds to step S134. Transition.
一方、「R」が0でない場合(ステップS135;NO)、「B」が0であるか否かが判別され(ステップS137)、「B」が0である場合(ステップS137;YES)、本誤認識フィールド検出処理を終了する。また、「B」が0でない場合(ステップS137;NO)、「R→fp」と「B→fp」が等しいかどうかが判別される(ステップS138)。 On the other hand, if “R” is not 0 (step S135; NO), it is determined whether or not “B” is 0 (step S137). If “B” is 0 (step S137; YES), this The erroneous recognition field detection process is terminated. If “B” is not 0 (step S137; NO), it is determined whether “R → fp” and “B → fp” are equal (step S138).
「R→fp」と「B→fp」が等しい場合(ステップS138;YES)、「B→fp」を0とする(ステップS139)。一方、「R→fp」と「B→fp」が等しくない場合(ステップS138;NO)、「R」を「R→Nextp」とする(ステップS140)。そして、ステップS135に移行して、「B」が0となるまで、上述した処理を繰り返して実行する。 When “R → fp” and “B → fp” are equal (step S138; YES), “B → fp” is set to 0 (step S139). On the other hand, if “R → fp” and “B → fp” are not equal (step S138; NO), “R” is set to “R → Nextp” (step S140). Then, the process proceeds to step S135, and the above-described processing is repeatedly executed until “B” becomes zero.
図19に戻り、誤認識フィールド検出処理が終了すると(ステップS99)、異常フィールド管理構造体の再チェーン化が行われる(ステップS100)。具体的には、「KMNP→badp→fp→RecLebel」に記憶されている認識の確からしさの低い順に「KMNP→badp」でチェーンされている異常フィールド管理構造体がソートされて再チェーン化が行われる。 Returning to FIG. 19, when the erroneous recognition field detection process is completed (step S99), the abnormal field management structure is re-chained (step S100). Specifically, the abnormal field management structures chained in “KMNP → badp” are sorted in the order of the low probability of recognition stored in “KMNP → badp → fp → RecLebel” and re-chaining is performed. Is called.
次いで、再チェーン化が行われると、データ処理部14aにより、記憶装置16から誤認識フィールド修正処理プログラムが読み出され、後述する誤認識フィールド修正処理(図23)が実行される。図23を参照して誤認識フィールド修正処理について説明する。
Next, when re-chaining is performed, an erroneous recognition field correction processing program is read from the
図23は、メイン処理の一部として実行される誤認識フィールド修正処理を示すフローチャートである、図23に示すように、「Ilp」を「KMNP→FieldCulp」、「Badp」を「KMNP→badp」、レジスタの「I」を「Ilp」、レジスタの「B」を「Badp」とする(ステップS141〜S144)。次いで、「B」が0であるか否かが判別され(ステップS145)、「B」が0の場合(ステップS145;YES)、「I」が「I→FieldNextp」とされて(ステップS146)、ステップS144に移行する。 FIG. 23 is a flowchart showing a misrecognition field correction process executed as part of the main process. As shown in FIG. 23, “Ilp” is “KMNP → FieldCulp”, and “Badp” is “KMNP → badp”. The register “I” is “Ilp” and the register “B” is “Badp” (steps S141 to S144). Next, it is determined whether or not “B” is 0 (step S145). If “B” is 0 (step S145; YES), “I” is changed to “I → FieldNextp” (step S146). The process proceeds to step S144.
一方、「B」が0でない場合(ステップS145;NO)、「I」が0であるか否かが判別され(ステップS147)、「I」が0である場合(ステップS147;YES)、本誤認識フィールド修正処理を終了する。また、「I」が0でない場合(ステップS147;NO)、「R→fp」と同じアドレスが「I→Colinfop」のポイントするスタックに存在するか否かが判別される(ステップS148)。 On the other hand, if “B” is not 0 (step S145; NO), it is determined whether or not “I” is 0 (step S147). If “I” is 0 (step S147; YES), this The erroneous recognition field correction process is terminated. If “I” is not 0 (step S147; NO), it is determined whether or not the same address as “R → fp” exists in the stack pointed to by “I → Colinfop” (step S148).
「R→fp」と同じアドレスが「I→Colinfop」のポイントするスタックに存在する場合(ステップS148;YES)、「I→Culinfop」スタックの「B→fp」で管理する入力フィールドの正しい値をスタックの計算式から求めて「B→fp→RecReslt」に格納する(ステップS149)。すなわち、スタックに記憶している計算式により、最も確からしさの低いフィールドの演算結果を他のフィールドの認識結果を用いて算出する。 If the same address as “R → fp” exists in the stack pointed to by “I → Colinfop” (step S148; YES), the correct value of the input field managed by “B → fp” in the “I → Culinfop” stack is set. It is obtained from the calculation formula of the stack and stored in “B → fp → RecReslt” (step S149). That is, the calculation result stored in the stack is used to calculate the operation result of the least probable field using the recognition result of the other field.
また、「R→fp」と同じアドレスが「I→Culinfop」のポイントするスタックに存在しない場合(ステップS148;NO)、「B」を「B→Nextp」として(ステップS150)、ステップS145に移行する。そして、「I」が0となるまで、上述した処理が繰り返して実行される。 If the same address as “R → fp” does not exist in the stack pointed to by “I → Culinfop” (step S148; NO), “B” is changed to “B → Nextp” (step S150), and the process proceeds to step S145. To do. Then, the above-described processing is repeatedly executed until “I” becomes zero.
図19に戻り、誤認識フィールド認識処理が終了すると(ステップS101)、ステップS91に移行して、ステップS91〜S101の処理が繰り返して実行され、「KMNP→badp」が0になった場合(ステップS98;YES)、本メイン処理が終了される。 Returning to FIG. 19, when the misrecognition field recognition process is completed (step S <b> 101), the process proceeds to step S <b> 91, and the processes of steps S <b> 91 to S <b> 101 are repeatedly executed. S98; YES), the main process is terminated.
以上のように、伝票の画像データを認識させ、認識された明細行に含まれる演算関係を予め定義ツール12により定義する。そして、明細行の各フィールドの認識結果に、定義された演算を施し、認識結果と演算結果を比較することにより、誤認識が発生しているフィールドを特定する。また、正しく認識されたと推測されるフィールドの認識結果に定義されている演算を施し、誤認識のあったと推測されるフィールドの正しい値を算出する。そして、誤認識のあったと推測されるフィールドの値を算出された正しい値として修正する。
As described above, the image data of the slip is recognized, and the calculation relationship included in the recognized detail line is defined by the
これにより、画像データから認識された認識結果から誤認識を検出するだけでなく、正しく認識されたと推測されるフィールドの認識結果に基づいて、誤認識されたと推測されるフィールドの正しい値を算出することができる。したがって、誤認識されたフィールドの修正作業を容易かつ正確に行うことができ、データ認識装置1における認識率を向上させることができる。
As a result, not only erroneous recognition is detected from the recognition result recognized from the image data, but also the correct value of the field presumed to be misrecognized is calculated based on the recognition result of the field presumed to be correctly recognized. be able to. Therefore, it is possible to easily and accurately correct the erroneously recognized field, and to improve the recognition rate in the
また、複数の演算関係に基づいて、認識されたフィールドの確からしさを記憶し、正しく認識された推測されるフィールドの認識結果に基づいて、誤認識のあったと推測されるフィールドの値を算出するため、より正確な値に基づいて、誤認識のあったと推測されるフィールドの値を修正することができ、データ認識装置1の認識率を向上させることができる。
Further, the probability of the recognized field is stored based on a plurality of arithmetic relationships, and the value of the field that is presumed to be erroneously recognized is calculated based on the recognition result of the presumed field that is correctly recognized. Therefore, based on a more accurate value, the value of the field estimated to have been erroneously recognized can be corrected, and the recognition rate of the
また、定義ツール12により、取得した伝票の画像データからフィールドを認識して、フィールド間の演算関係をそれぞれ定義することができるため、種々の演算関係を含む伝票や帳票等に本発明を適用することが可能であり、汎用性の高いデータ認識装置1を提供することができる。
In addition, since the
なお、本実施の形態における記述は、本発明に係る好適なデータ認識装置1の一例であり、これに限定されるものではない。例えば、本実施の形態において、データ認識装置1は伝票の画像データを読み取り、伝票に記入された情報を認識処理する場合を例として説明を行ったが、その他の帳票、見積書、設計書等を用いるものでもよい。
The description in the present embodiment is an example of a suitable
また、定義ファイル13又はデータ管理部14bに格納されるデータの構成例は一例であり、上述した例に限定されない。例えば、演算情報は、逆ポーランド記法を用いてスタック記憶する方法を用いて説明を行ったがこれに限らない。また、本実施の形態においては、合計フィールドをフィールド演算情報の1つとして処理したが、合計フィールドとフィールド演算情報を区別して扱ってもよい。
The configuration example of the data stored in the
その他、本実施の形態におけるデータ認識装置1の細部構成及び詳細動作に関しては、本発明の趣旨を逸脱しない範囲で適宜変更可能であることはもちろんである。
In addition, it is needless to say that the detailed configuration and detailed operation of the
1 データ認識装置
11 読取装置
12 定義ツール
13 定義ファイル
14 OCR認識エンジン
14a データ処理部
14b データ管理部
15 業務アプリ
16 記憶装置
17 入力装置
18 表示装置
DESCRIPTION OF
Claims (4)
前記画像情報に含まれるフィールドを定義するための設定情報を記憶する定義ファイルと、
前記設定情報に基づいて前記画像情報に含まれるフィールドを認識する認識手段と、
前記認識されたフィールド間における演算関係を入力する入力手段と、
前記演算関係に基づいて認識されたフィールド間の演算を行い、フィールドの認識結果と演算結果を比較して、誤認識があるか否かを判別する判別手段と、
フィールドの認識結果に誤認識があると判別された場合に、誤認識がないと判別されたフィールドの認識結果に基づいて、当該誤認識があると判別されたフィールドの値を算出する演算手段と、
を備えることを特徴とするデータ認識装置。 A data recognition device that reads information entered in a form as image information and performs character recognition of the image information,
A definition file for storing setting information for defining fields included in the image information;
Recognition means for recognizing a field included in the image information based on the setting information;
Input means for inputting an arithmetic relationship between the recognized fields;
A discriminating means for performing an arithmetic operation between recognized fields based on the arithmetic relationship, comparing the recognition result of the field with the arithmetic result, and determining whether or not there is a misrecognition;
Calculating means for calculating the value of the field determined to have the misrecognition based on the recognition result of the field determined to have no misrecognition when it is determined that the field recognition result has the misrecognition; ,
A data recognition apparatus comprising:
前記判別手段は、前記記憶手段に記憶された認識結果と演算結果とが異なるフィールドの認識の確からしさを比較して、認識されたフィールドに誤認識があるか否かを判別することを特徴とする請求項1記載のデータ認識装置。 Based on the comparison result between the recognition result of the field and the calculation result, the storage unit stores a field in which the recognition result and the calculation result are different and the probability of the recognition,
The determination means compares the probability of recognition of a field in which the recognition result stored in the storage means and the calculation result are different, and determines whether or not the recognized field has a false recognition. The data recognition apparatus according to claim 1.
前記画像情報に含まれるフィールドを定義するための設定情報を記憶する機能と、
前記設定情報に基づいて前記画像情報に含まれるフィールドを認識する機能と、
前記認識されたフィールド間における演算関係を入力する機能と、
前記演算関係に基づいて認識されたフィールド間の演算を行い、フィールドの認識結果と演算結果とを比較して、誤認識があるか否かを判別する機能と、
フィールドの認識結果に誤認識があると判別された場合に、誤認識がないと判別されたフィールドの認識結果に基づいて、当該誤認識があると判別されたフィールドの値を算出する機能と、
を実現させるためのプログラム。 On the computer,
A function of storing setting information for defining a field included in the image information;
A function of recognizing a field included in the image information based on the setting information;
A function of inputting an arithmetic relationship between the recognized fields;
A function of performing an operation between the recognized fields based on the operation relationship, comparing the field recognition result and the operation result, and determining whether or not there is a recognition error;
A function for calculating the value of the field determined to have the erroneous recognition based on the recognition result of the field determined to have no erroneous recognition when it is determined that the recognition result of the field has erroneous recognition;
A program to realize
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003364812A JP2005128865A (en) | 2003-10-24 | 2003-10-24 | Data recognition device and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003364812A JP2005128865A (en) | 2003-10-24 | 2003-10-24 | Data recognition device and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005128865A true JP2005128865A (en) | 2005-05-19 |
JP2005128865A5 JP2005128865A5 (en) | 2006-11-24 |
Family
ID=34643686
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003364812A Pending JP2005128865A (en) | 2003-10-24 | 2003-10-24 | Data recognition device and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005128865A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007179395A (en) * | 2005-12-28 | 2007-07-12 | Fujitsu Ltd | Medium processing apparatus, method and system, and computer readable recording medium for recording medium processing program |
JP2011028370A (en) * | 2009-07-22 | 2011-02-10 | Fuji Xerox Co Ltd | Image processing device and image processing program |
JP6464440B1 (en) * | 2017-12-27 | 2019-02-06 | 株式会社日本デジタル研究所 | Accounting processing apparatus, accounting processing system, accounting processing method and program |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0256086A (en) * | 1988-08-22 | 1990-02-26 | Ricoh Co Ltd | Method for postprocessing for character recognition |
JP2001325562A (en) * | 2000-05-17 | 2001-11-22 | Minolta Co Ltd | Image recognizing device, image forming device, image recognizing method, and computer-readable recording medium with image reocgnizing program stored therein |
JP2002056354A (en) * | 2000-08-14 | 2002-02-20 | Toshiba Corp | Optical character reader and data correcting method therefor |
-
2003
- 2003-10-24 JP JP2003364812A patent/JP2005128865A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0256086A (en) * | 1988-08-22 | 1990-02-26 | Ricoh Co Ltd | Method for postprocessing for character recognition |
JP2001325562A (en) * | 2000-05-17 | 2001-11-22 | Minolta Co Ltd | Image recognizing device, image forming device, image recognizing method, and computer-readable recording medium with image reocgnizing program stored therein |
JP2002056354A (en) * | 2000-08-14 | 2002-02-20 | Toshiba Corp | Optical character reader and data correcting method therefor |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007179395A (en) * | 2005-12-28 | 2007-07-12 | Fujitsu Ltd | Medium processing apparatus, method and system, and computer readable recording medium for recording medium processing program |
JP2011028370A (en) * | 2009-07-22 | 2011-02-10 | Fuji Xerox Co Ltd | Image processing device and image processing program |
JP6464440B1 (en) * | 2017-12-27 | 2019-02-06 | 株式会社日本デジタル研究所 | Accounting processing apparatus, accounting processing system, accounting processing method and program |
JP2019117527A (en) * | 2017-12-27 | 2019-07-18 | 株式会社日本デジタル研究所 | Accounting processing apparatus, accounting processing system, accounting processing method and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11170248B2 (en) | Video capture in data capture scenario | |
JP4996940B2 (en) | Form recognition device and program thereof | |
WO2019024692A1 (en) | Speech input method and device, computer equipment and storage medium | |
JP4977368B2 (en) | Medium processing apparatus, medium processing method, medium processing system, and computer-readable recording medium recording medium processing program | |
JP4733577B2 (en) | Form recognition device and form recognition program | |
JP2016048444A (en) | Document identification program, document identification device, document identification system, and document identification method | |
KR20210038384A (en) | Apparatus, method, and storage medium for supporting data entry | |
US20040141646A1 (en) | Arabic handwriting recognition using feature matching | |
JP2018156308A (en) | Information processing device, information processing system, and program | |
JP2012181653A (en) | Scoring method, program of scoring method, and scoring system | |
EP2849132A1 (en) | Sensor information management device and sensor information management method | |
JP2005128865A (en) | Data recognition device and program | |
JP4102365B2 (en) | Data linkage support method between applications | |
JP6302317B2 (en) | Form format information registration method, system, and program | |
JPWO2014068770A1 (en) | Data extraction method, data extraction device and program thereof | |
US20220292857A1 (en) | Information processing apparatus, information processing method, and recording medium | |
JP2020087112A (en) | Document processing apparatus and document processing method | |
JP5134383B2 (en) | OCR device, trail management device and trail management system | |
JP2021152696A (en) | Information processor and program | |
JP6217403B2 (en) | Handwritten amount entry column check screen output method, handwritten amount entry column check screen output program, and handwritten amount entry column check screen output device | |
TWI807467B (en) | Key-item detection model building method, business-oriented key-value identification system and method | |
JP2019168856A (en) | Image processing apparatus, image processing method, and image processing program | |
EP4036871B1 (en) | Image processing apparatus, image processing method, program and storage medium | |
JP2017151793A (en) | Image segmentation device, image segmentation method, and image segmentation processing program | |
JP3648270B2 (en) | Form reading device and accounting form reading device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20061006 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20061006 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20091001 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20091027 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20091222 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20100316 |