JP2004164376A - Identification-code-attached form, form reading program, and form creation program - Google Patents

Identification-code-attached form, form reading program, and form creation program Download PDF

Info

Publication number
JP2004164376A
JP2004164376A JP2002330452A JP2002330452A JP2004164376A JP 2004164376 A JP2004164376 A JP 2004164376A JP 2002330452 A JP2002330452 A JP 2002330452A JP 2002330452 A JP2002330452 A JP 2002330452A JP 2004164376 A JP2004164376 A JP 2004164376A
Authority
JP
Japan
Prior art keywords
field
information
reading
identification code
attribute information
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
Application number
JP2002330452A
Other languages
Japanese (ja)
Inventor
Hitoshi Okabe
等 岡部
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2002330452A priority Critical patent/JP2004164376A/en
Publication of JP2004164376A publication Critical patent/JP2004164376A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Character Input (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a form reading program that can read a new form while maintaining similar reading precision for an old form without changes in setting information in a device even when the layout of the form is changed. <P>SOLUTION: The form reading program for recognizing characters in a form commands a computer to execute: a step of extracting a field on the form; a step of detecting an identification code of the field described in a given position to the field; a step of reading out prestored field attribute information corresponding to the identification code; and a step of recognizing contents of information entered in the field and an item designated for the field according to the field attribute information. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、帳票のフィールドデータとフィールドの属性とを認識可能とすることによる帳票のフォーマットに依存しない帳票読み込み方法に関する。
【0002】
【従来の技術】
従来、帳票フォーマット内に記載されている文字やデータの読取方法には、以下の方法がある。例えば、特開平9−259221号公報(特許文献1)に示されているように、帳票のフィールドの位置を罫線パタンとして抽出し、抽出した罫線パタンと予め装置内に罫線パタンにより示される帳票フォーマットの特徴として保持されている辞書データとを照合して、帳票フォーマットの種別を識別する。帳票フォーマットの識別結果に基づいて、データ帳票上に記載されている文字を抽出し、抽出した文字と予め装置内に文字パタンの特徴として保持されている辞書データとを照合して帳票上の文字を認識していた。即ち、帳票フォーマットの種別を識別することで、帳票上に記載された文字を読み取るための情報を取得し、帳票上に記載されている文字を認識していた。
【0003】
また、帳票のフォーマットの違いに対応可能な帳票データの読取方法には、以下の方法がある。例えば、特開2000−29986号公報(特許文献2)に示されているように、帳票内に記載された項目名を文字認識し、予め装置内に登録してある帳票のフォーマット情報に基づき、認識した項目名の種類に応じて項目内容を読み取っていた。即ち、項目名自体を読み取ることにより、その項目(フィールド)の属性を判断し、属性に応じて項目の内容を読み取っていた。
【0004】
その他に、本発明に関連する技術として、罫線の抽出方法が、特開2000−339406号公報に示されている。
【0005】
【特許文献1】
特開平9−259221号公報(段落0059、段落0154、図8)
【特許文献2】
特開2000−29986号公報(段落0005)
【特許文献3】
特開2000−339406号公報(段落0032、段落0075〜段落0078)
【0006】
【発明が解決しようとする課題】
しかしながら、従来のような帳票の読取方法は、以下の問題があった。例えば、罫線パタンから帳票のフォーマットを識別することにより、帳票上に記載された文字を認識するためには、予め帳票の罫線(フィールド)の位置情報をフィールド毎に設定しておく必要がある。従って、帳票上のレイアウトに変更があった場合(帳票上のフィールド位置に変更が生じた場合)には、装置内の設定情報をその都度変更する必要があった。
【0007】
また、帳票内に記載された項目名を読み取ることにより、項目名の種類に応じて項目内容を読み取るためには、項目名の文字認識において、漢字等の複雑な文字を読み取る際に、文字の読取精度を安定させることが困難であった。
【0008】
本発明は、このような問題を解決し、帳票上のレイアウトが変更になった場合(帳票上のフィールド位置が変更になった場合でも)でも、装置内の設定情報を変更することなく、旧帳票と同様の読取精度を維持したまま、新帳票を読込ことができる帳票読込方法を提供することを目的とする。
【0009】
【課題を解決するための手段】
上記問題を解決するため、本発明は以下のような構成をとる。本発明は、帳票内の文字を認識させる帳票読取プログラムであって、
帳票上のフィールドを抽出するステップと、
上記フィールドに対して所定位置に記載されているこのフィールドの識別コードを検出するステップと、
予め記憶された上記識別コードに対応するフィールド属性情報を読み出すステップと、
上記フィールド属性情報に基づき上記フィールド内に記入された情報の内容および上記フィールドに対して規定された項目を認識するステップと、
をコンピュータに実行させる。
【0010】
本発明によれば、まず、帳票上の各フィールドを抽出する。抽出したフィールドに対して所定位置に記載されている上記フィールドを識別するための識別コードを検出する。装置内には、フィールドを特定するフィールド属性情報を予め記憶させておく。この記憶されたフィールド属性情報に基づいて、検出した識別コードに対応するフィールド属性情報を読み出す。読み出したフィールド属性情報に基づいて、フィールド内に記入された情報の内容およびこのフィールドに対して規定された項目を認識する。従って、帳票上のフィールドから、領域内に存在する情報を特定する識別コードを検出することにより、帳票上のレイアウトが変更になっても、装置内の設定を変更することなく、旧帳票と同様に帳票内のデータを読取ることができる。
【0011】
また、本発明に使用する帳票は、情報記入用のフィールドを有し、このフィールドに対する所定位置に、コンピュータがフィールドを識別するとともにフィールド内に記入された情報とフィールドに対して規定された項目を認識するためのフィールド属性情報を記憶装置から読み出すためのフィールドの識別コードが記載されている。
【0012】
本発明によれば、帳票上に存在する各フィールドに対する識別コード(例えば、文字コードやバーコード)を付加することにより、帳票上のフィールド(項目)を識別する識別子をコードとして一律に認識することができる。例えば、帳票により表示が異なる「お名前」、「氏名」という項目を「名前」として一律に認識することができる。
【0013】
また、本発明は、上記帳票を作成する帳票作成プログラムであって、
帳票上のフィールドを抽出するステップと、
予め記憶された上記フィールド内に記入される情報の項目と該情報の内容を認識するための上記フィールドの識別コードを読み出すステップと、
上記読み出された識別コードを上記フィールドに対する所定位置に付加するステップと、
をコンピュータに実行させる。
【0014】
本発明によれば、まず、帳票上の各フィールドを抽出する。装置内には、フィールド内に記入される情報の項目とその情報の内容を認識するためのフィールド毎の識別コードを予め記憶させておく。この記憶された情報を用いて、抽出したフィールドに対応する識別コードを読み出す。読み出された識別コードを各フィールドに対する所定位置に付加する。これにより、帳票上の各フィールドを識別する識別コードが付加された帳票を作成することができる。
【0015】
【発明の実施の形態】
以下に図面を参照して、この発明の好適な実施の形態を説明する。
(実施の形態1)
図1は、本発明の実施形態における帳票読取方法を提供する帳票読取装置のシステムの一例を示すブロック図である。帳票読取装置1は、周辺機器としてイメージリーダー10とインターフェースを介して接続されている。イメージリーダー10は、帳票を光学的に読み取ることができる画像情報入力装置(例えば、スキャナ)により構成される。インターフェースは、USB(Universal Serial Bus)により構成される。帳票読取装置1は、イメージリーダー10から帳票をイメージデータとして取り込むことにより機能する。以下に、帳票読取装置1の構成例について図1を用いて説明する。
【0016】
<帳票読取装置>
帳票読取装置1は、パソコン(PC)やワークステーション(WS)等のコンピュータで構成され、CPU11と、記憶部12と、図示しないが、入出力部と、通信制御部とを備えている。帳票読取装置1は、記憶部12に記憶された各種プログラムをCPU11上で実行することにより実現される。CPU11は、罫線抽出部11aと、フィールドID抽出部11bと、属性決定部11cと、文字認識部11dとを備える。記憶部12は、フィールドID位置情報ファイル12aと、フィールド属性情報ファイル12bとを備える。以下、帳票読取装置1が備える各構成要素について説明する。
【0017】
《罫線抽出部》
罫線抽出部11aは、イメージデータとして取り込まれた帳票内のフィールドを罫線として抽出する。ここでは、罫線で囲まれた四角の領域(フィールド枠)とフィールド内に記載されている内容データとが罫線として抽出される。罫線は、座標データとして抽出され、縦罫線及び横罫線が開始座標、終点座標として示される。この罫線の抽出方法は、例えば、特開2000−339406号公報に示された方法を適用することができる。
【0018】
《フィールドID抽出部》
フィールドID抽出部11bは、罫線抽出部11aにより抽出した四角の領域(フィールド枠)の右下から一定距離離れた位置にある領域を切り出し、切り出した領域内の数字を認識してフィールドIDとして設定する。即ち、抽出したフィールド枠の罫線座標データとフィールドID位置情報ファイル12aに格納してある情報とに基づいて、フィールド枠の右下辺りに示された数字(タグ)を文字認識し、その認識結果をフィールドを識別するための識別子として設定する。
【0019】
《属性決定部》
属性決定部11cは、フィールドID抽出部11bにより抽出されたフィールドIDに基づいて、フィールド属性情報ファイル12bに格納してあるフィールドIDに対応付けられている情報からフィールド内の文字列の属性を決定する。
【0020】
《文字認識部》
文字認識部11dは、属性決定部11cにより決定したフィールド内の文字列の属性を元に、罫線抽出部11aにおいて認識したフィールド内に記載されている内容データを文字として認識する。
【0021】
<帳票のフォーマット>
図2は、本発明の実施形態に用いられる帳票フォーマットの一例を示す図である。この帳票は、銀行で新規に口座を開設する時に用いられる、ご新規申込書である。帳票には、新規に口座を開設する顧客の名前、住所、入金金額、口座の種別を記入するフィールド(項目)がある。口座の種別は、総合、普通、定期により示される。帳票内の各フィールドの近傍、例えば、右下にはそのフィールドの内容を識別するための識別子としてIDが付記される。このIDは、例えば、図2に示すように、複数桁(この例では、3桁)の数字の組み合わせにより示され、フィールドの属性を示すフィールドIDとして機能する。
【0022】
<データ構成>
次に、記憶部12に備わるフィールドID位置情報ファイル12a、フィールド属性情報ファイル12bのデータ構造について説明する。
【0023】
図3は、フィールドID位置情報を示すデータ構造の例である。フィールドID位置情報は、フィールド位置情報ファイル12aにおいて定義される。フィールドID位置情報には、抽出されたフィールド枠の罫線座標データ(X,Y)に対する起点座標(X,Y)、終点座標(X,Y)のオフセット量がそれぞれ示される。即ち、フィールドID位置情報には、各フィールド罫線に対して、どの位置にIDがあるのかを決定するための情報が定義される。従って、フィールドID位置情報は、全てのフィールドに対して固定的に定義されており、システム全体としては1つだけ定義すればよい。また、複数のフィールド位置情報が設定されてもよい。
【0024】
また、図4(B)に示す従来のフィールド属性情報のように、各フィールド毎に位置を示すパラメータを設ける必要をなくすことができる。
【0025】
図4(A)は、フィールド属性情報を示すデータ構造の例であり、図4(B)は、比較例としての従来のフィールド属性情報を示す図である。フィールド属性情報は、フィールド属性情報ファイル12bにおいて定義される。フィールド属性情報には、図4に示すように、各フィールドIDに関連づけて、項目ID、文字属性、文字数、知識変換、知識辞書等の情報が定義されている。項目IDは、プログラムが当該データを認識するための識別番号である。文字属性、文字数は、フィールド内に記入されている文字列の属性を示す情報である。例えば、文字属性には、文字(NCHR)であるか、数字(MUN)であるかの情報が示される。また、文字数には、列なる文字の数が示される。知識変換は、フィールド内の文字を認識する際の手がかりとなる情報(知識辞書)があるか否かを示す。知識変換は、知識辞書の有無をY,Nにより示す。知識辞書は、図4に示すように、知識辞書があり(Y)の場合、該当する知識辞書を示す情報を示す。ここでは、フィールドの内容(項目)がNAME(名前)である例が示されている。知識辞書の種別は、フィールド内に記入される項目種別によって決まる。例えば、その他の知識辞書として、ADDRESS(住所)等を用いることもできる。例えば、フィールドの内容(項目)がADDRESSに該当する場合であって、フィールド内容が文字認識において、「東京都太田区」という記入データを「東京都大田区」と正規な地名として認識するように機能する。
【0026】
<処理フロー>
次に、帳票読取装置1の処理について、図5,6を用いて説明する。
【0027】
《帳票の読込処理》
図5は、帳票読取装置における帳票の読取処理を示すフローチャート例である。この処理は、帳票読取装置1内のCPU11が罫線抽出部11aと、フィールドID抽出部11bと、属性決定部11cと、文字認識部11dを実現するための各種プログラムをそれぞれ実行することにより行われる。
【0028】
まず、イメージリーダー10から帳票フォーマットをイメージデータとして読み込み帳票読取装置1の記憶部12に取り込む(S1)。
【0029】
帳票読取装置1では、罫線抽出部11aにおいて、取り込んだ帳票のイメージデータから各フィールドを規定する罫線を抽出する(S2)。即ち、罫線で囲まれた四角の領域(フィールド枠)とフィールド内に記入されている内容データを罫線として抽出する。この時、罫線は、起点と終点とが座標データ(X,Y)として抽出される。抽出したフィールド枠とフィールド内の内容データとは、対で記憶部12に記憶される。
【0030】
次に、フィールドID抽出部11bにおいて、S2により抽出されたフィールドの罫線座標データとフィールドID位置情報とに基づいて、各フィールド(項目)の右下辺りに付記されているフィールドIDを抽出する(S3)。即ち、各フィールド(項目)毎に付記されているフィールドIDの位置を抽出し、抽出した位置に示されている数字をそれぞれ文字認識して、認識した文字(数字)を当該フィールドに対するフィールドIDとして設定する。
【0031】
次に、属性決定部11cにおいて、フィールド属性情報に基づいて、S3により設定されたフィールドIDに対応する文字(文字列)の属性を決定する(S4)。ここでは、フィールド属性情報として定義されている各フィールドIDに対応づけられた文字認識に必要な情報(文字属性、文字数、知識変換、知識辞書)と、項目IDとを読み出す。文字認識に必要なこれらの情報は、処理プログラム(文字認識部)が当該情報を認識するための識別情報としての役割をする項目IDと共に文字認識部11dに渡される。文字認識部11dでは、渡された文字認識に必要な情報と罫線抽出部11aで認識したフィールド内の内容データとを関連づけてフィールド内の内容データを文字として認識する(S5)。
【0032】
なお、上述したS2の罫線の抽出は、本発明の抽出するステップに相当する。また、S3のフィールドIDの抽出は、本発明の検出するステップに相当する。また、S4の文字(文字列)の属性の決定は、本発明のフィールド情報を読み出すステップに相当する。また、S5のフィールド内の内容データの文字認識は、本発明の項目を認識するステップに相当する。
【0033】
これにより、帳票読取装置1では、帳票内の各フィールドの罫線データからフィールドIDを抽出することにより、予め定義されているフィールドIDとの対応関係に基づいて当該フィールドに対する文字列の属性を認識することができ、認識した文字列の属性を利用してフィールド内の内容データを文字認識することができる。また、項目IDにより認識された文字列の項目を識別できる。従って、帳票によりフィールドの位置が異なっている場合(レイアウトが変更になった場合)でも、帳票内のフィールド位置に関係なく、各フィールドに記入された文字列、及びその項目を文字認識することができる。以下に、S3におけるフィールドIDの抽出処理について詳しく説明する。
【0034】
《フィールドIDの抽出処理》
図6は、フィールドIDの抽出処理を示すフローチャート例である。この処理は、フィールドID抽出部11bが主体となり動作する。図5に示されるS3では、S2において、罫線で囲まれた四角の領域(フィールド)が座標データとして抽出された際に、罫線を構成する終点座標(X,Y)のみを取得する(S10)。即ち、罫線で囲まれた四角の領域(フィールド)の右下を終点座標(X,Y)として取得する。取得した終点座標(X,Y)は、フィールドIDの位置を特定する基準となる。取得した終点座標(X,Y)とフィールドID位置情報に定義されているデータとに基づいて、各フィールドに対するフィールドIDが存在する領域の起点を計算する(S11)。ここでは、取得した終点座標(X,Y)にフィールドID位置情報に定義されている起点に対する座標X,Yのオフセット量をそれぞれ加算する。次に、S10において取得した終点座標(X,Y)とフィールドID位置情報に定義されているデータとに基づいて、各フィールドに対するフィールドIDが存在する領域の終点を計算する(S12)。ここでは、取得した終点座標(X,Y)にフィールドID位置情報に定義されている終点に対する座標X,Yのオフセット量をそれぞれ加算する。S11とS12とにおいて、計算されたフィールドIDの起点(X)とフィールドIDの終点(Y)とから構成される領域内に存在するフィールドIDを数字の組み合わせとして文字認識する(S13)。認識した数字の組み合わせを当該フィールドを識別するためのフィールドIDとして設定する(S14)。
【0035】
これにより、フィールド枠を構成する罫線の座標データからフィールドIDを文字として抽出することができる。また、フィールドIDは、0〜9という規定された数字を組み合わせることにより示されているため、文字(平仮名、漢字等)に比べて、高い認識率でフィールドIDを認識することができる。
【0036】
<変形例>
上記の実施形態では、図2に示すように、帳票フォーマット内のフィールドに対するフィールドIDを数字の組み合わせとしていた。しかし、本発明では、図7に示すように、フィールドIDを数字の組み合わせではなく、バーコードとしてもよい。また、フィールドIDであるバーコードを付記する位置としては、例えば、図7に示すように、罫線上でもよい。これにより、各フィールドに対するフィールドIDをバーコードとして認識することができ、フィールドIDの認識率をさらに高めることができる。
【0037】
<帳票の作成方法>
次に、フィールドIDが記入された帳票の作成方法について説明する。図8は、帳票作成装置の構成例を示す図である。帳票作成装置2は、図1に示したような帳票読取装置の構成を利用できる。帳票読取装置1と異なる点は、次の通りである。
【0038】
(A)記憶部12が、フィールドIDが記入されていない状態の帳票のイメージデータを記憶している。但し、当該イメージデータの入手経路は問わず、ダウンロードや可搬性記録媒体からの読取等によって入手できる。
【0039】
(B)記憶部12に記憶されたフィールド属性情報ファイル12cが、図4(A)と異なり、図8に示すようなフィールドIDとフィールドの属性情報との対応テーブルとしての構造を持つ。但し、フィールドID位置情報ファイル12aとフィールド属性情報ファイル12bとは別個に、図9に示すような、フィールドIDとフィールド属性情報との対応テーブル12dを持つようにしても良い。
【0040】
(C)CPU11が各種のプログラムの実行により、フィールド抽出部11a,フィールドID決定部11e,フィールドID付加部11f,印刷制御部11gを実現し、帳票作成装置に接続されるプリンタを制御して、帳票のイメージをシートに印刷できるようになっている。
【0041】
上記のような帳票作成装置の動作例は、次の通りである。図10は、動作例を示すフローチャートである。
【0042】
(S21)記憶部12から帳票のイメージデータが読み出されると、フィールド抽出部11aは、上記と同様の手法により、イメージデータ中の各フィールド(罫線枠)を抽出する。
【0043】
(S22)フィールドID決定部11eは、フィールド属性情報ファイル12cを参照し、フィールド属性情報S21にて抽出された各フィールドの属性情報に対応するフィールドIDを読み出す。
【0044】
(S23)フィールドID付加部は、読み出された帳票のイメージデータに対し、フィールドID位置情報ファイル12aの情報で規定されている位置に、各フィールドに対応するフィールドIDが記載されるように、読み出された帳票のイメージデータの編集処理を行い、フィールドIDを帳票に付加する。編集されたイメージデータは、記憶部12に保存されるようにしても良い。
【0045】
(S24)印刷制御部11gは、プリンタを制御し、編集されたイメージデータをプリンタに印刷出力させる。
【0046】
なお、S23で作成されたイメージデータは、記憶部12に保存され、S24の処理が必要に応じて行われるようにしても良い。また、上記S21〜S23の処理は、フィールド毎に繰り返して行われるようにしても良い。また、作成装置が、シートに印刷された帳票(フィールドIDを含まない)に新たにフィールドIDを追加印刷することで、帳票にフィールドIDを付加するようにしても良い。この場合には、イメージデータを編集するS23を省略するようにしても良い。
【0047】
なお、上述したS21のフィールドの抽出は、本発明の抽出するステップに相当する。また、S22のフィールドIDの読み出しは、本発明の識別コードを読み出すステップに相当する。また、S23のフィールドIDの付加は、本発明の付加するステップに相当する。
【0048】
【発明の効果】
本発明によれば、帳票内のフィールド罫線から各フィールドに対するフィールドIDを抽出することにより、帳票上のレイアウトが変更になった場合(帳票上のフィールド位置が変更になった場合でも)でも、装置内の設定情報を変更することなく、旧帳票と同様の読取精度を維持したまま、新帳票を読取ることが可能となる。
【図面の簡単な説明】
【図1】本発明の実施形態における帳票読取方法を提供する帳票読取装置のシステムの一例を示すブロック図である。
【図2】本発明の実施形態に用いられる帳票フォーマット例(1)を示す図である。
【図3】フィールドID位置情報を示すデータ構造の例である。
【図4】フィールド属性情報を示すデータ構造の例である。
【図5】帳票読取装置における帳票の読取処理を示すフローチャート例である。
【図6】フィールドIDの抽出処理を示すフローチャート例である。
【図7】本発明の実施形態に用いられる帳票フォーマット例(2)を示す図である。
【図8】帳票作成装置の構成例を示す図である。
【図9】フィールドIDとフィールド属性情報との対応テーブル例を示す図である。
【図10】帳票作成装置における動作例を示すフローチャート例である。
【符号の説明】
1 帳票読取装置
2 帳票作成装置
10 イメージリーダー
11 CPU
11a 罫線抽出部(フィールド抽出部)
11b フィールドID抽出部
11c 属性決定部
11d 文字認識部
11e フィールドID決定部
11f フィールドID付加部
11g 印刷制御部
12 記憶部
12a フィールドID位置情報ファイル
12b フィールド属性情報ファイル(帳票読取装置)
12c フィールド属性情報ファイル(帳票作成装置)
12d フィールドIDとフィールド属性情報との対応テーブル
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a form reading method that does not depend on a form format by enabling field data and field attributes of the form to be recognized.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, there are the following methods for reading characters and data described in a form format. For example, as disclosed in Japanese Patent Application Laid-Open No. 9-259221 (Patent Document 1), the position of a field of a form is extracted as a ruled line pattern, and the extracted ruled line pattern and a form format previously indicated in the apparatus by the ruled line pattern The type of the form format is identified by collating with the dictionary data stored as a feature of the form. Based on the identification result of the form format, the characters described on the data form are extracted, and the extracted characters are collated with the dictionary data held in advance as a feature of the character pattern in the apparatus, and the characters on the form are compared. Was aware of. That is, by identifying the type of the form, information for reading a character written on the form is obtained, and the character described on the form is recognized.
[0003]
In addition, there are the following methods for reading form data that can cope with a difference in form format. For example, as shown in Japanese Patent Application Laid-Open No. 2000-29986 (Patent Document 2), an item name described in a form is recognized by a character, and based on the format information of the form registered in advance in the apparatus, The item contents were read according to the type of the recognized item name. That is, by reading the item name itself, the attribute of the item (field) is determined, and the content of the item is read according to the attribute.
[0004]
In addition, as a technique related to the present invention, a method of extracting ruled lines is disclosed in Japanese Patent Application Laid-Open No. 2000-339406.
[0005]
[Patent Document 1]
JP-A-9-259221 (paragraph 0059, paragraph 0154, FIG. 8)
[Patent Document 2]
JP-A-2000-29986 (paragraph 0005)
[Patent Document 3]
JP-A-2000-339406 (paragraph 0032, paragraph 0075 to paragraph 0078)
[0006]
[Problems to be solved by the invention]
However, the conventional form reading method has the following problems. For example, in order to recognize a character written on a form by identifying a format of the form from a ruled line pattern, it is necessary to set position information of a ruled line (field) of the form in advance for each field. Therefore, when the layout on the form is changed (when the field position on the form is changed), it is necessary to change the setting information in the apparatus each time.
[0007]
In addition, in order to read the item contents according to the type of the item name by reading the item name described in the form, when reading complicated characters such as kanji in the character recognition of the item name, the character It was difficult to stabilize the reading accuracy.
[0008]
The present invention solves such a problem, and even if the layout on the form is changed (even if the field position on the form is changed), the old information is not changed without changing the setting information in the apparatus. It is an object of the present invention to provide a form reading method capable of reading a new form while maintaining the same reading accuracy as a form.
[0009]
[Means for Solving the Problems]
In order to solve the above problem, the present invention has the following configuration. The present invention is a form reading program for recognizing characters in a form,
Extracting fields on the form;
Detecting an identification code of the field described at a predetermined position with respect to the field;
Reading field attribute information corresponding to the identification code stored in advance,
Recognizing the contents of the information entered in the field and the items defined for the field based on the field attribute information;
On a computer.
[0010]
According to the present invention, first, each field on the form is extracted. An identification code for identifying the field described in a predetermined position with respect to the extracted field is detected. Field attribute information for specifying a field is stored in the device in advance. Based on the stored field attribute information, field attribute information corresponding to the detected identification code is read. Based on the read field attribute information, the contents of the information entered in the field and the items specified for this field are recognized. Therefore, even if the layout on the form is changed by detecting the identification code for identifying the information existing in the area from the field on the form, the same setting as the old form is performed without changing the setting in the apparatus. Can read the data in the form.
[0011]
Also, the form used in the present invention has a field for information entry, and a computer identifies the field and stores the information entered in the field and the item specified for the field at a predetermined position with respect to this field. A field identification code for reading field attribute information for recognition from the storage device is described.
[0012]
According to the present invention, an identifier for identifying a field (item) on a form is uniformly recognized as a code by adding an identification code (for example, a character code or a bar code) to each field present on the form. Can be. For example, items such as “name” and “name”, which are displayed differently depending on the form, can be uniformly recognized as “name”.
[0013]
The present invention is also a form creation program for creating the form,
Extracting fields on the form;
Reading an item of information written in the field stored in advance and an identification code of the field for recognizing the content of the information;
Adding the read identification code to a predetermined position with respect to the field;
On a computer.
[0014]
According to the present invention, first, each field on the form is extracted. In the apparatus, an item of information to be entered in a field and an identification code for each field for recognizing the content of the information are stored in advance. The identification code corresponding to the extracted field is read using the stored information. The read identification code is added to a predetermined position for each field. This makes it possible to create a form to which an identification code for identifying each field on the form is added.
[0015]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, preferred embodiments of the present invention will be described with reference to the drawings.
(Embodiment 1)
FIG. 1 is a block diagram illustrating an example of a system of a form reading apparatus that provides a form reading method according to an embodiment of the present invention. The form reader 1 is connected to an image reader 10 as a peripheral device via an interface. The image reader 10 includes an image information input device (for example, a scanner) that can optically read a form. The interface is configured by a USB (Universal Serial Bus). The form reading device 1 functions by taking in a form from the image reader 10 as image data. Hereinafter, a configuration example of the form reading device 1 will be described with reference to FIG.
[0016]
<Form reader>
The form reading device 1 is configured by a computer such as a personal computer (PC) or a workstation (WS), and includes a CPU 11, a storage unit 12, an input / output unit (not shown), and a communication control unit. The form reader 1 is realized by executing various programs stored in the storage unit 12 on the CPU 11. The CPU 11 includes a ruled line extraction unit 11a, a field ID extraction unit 11b, an attribute determination unit 11c, and a character recognition unit 11d. The storage unit 12 includes a field ID position information file 12a and a field attribute information file 12b. Hereinafter, each component included in the form reading apparatus 1 will be described.
[0017]
《Rules extraction section》
The ruled line extracting unit 11a extracts a field in a form taken in as image data as a ruled line. Here, a square area (field frame) surrounded by ruled lines and content data described in the field are extracted as ruled lines. Ruled lines are extracted as coordinate data, and vertical ruled lines and horizontal ruled lines are indicated as start coordinates and end point coordinates. As a method for extracting the ruled line, for example, a method disclosed in Japanese Patent Application Laid-Open No. 2000-339406 can be applied.
[0018]
<< Field ID extractor >>
The field ID extraction unit 11b cuts out an area at a position separated by a certain distance from the lower right of the square area (field frame) extracted by the ruled line extraction unit 11a, recognizes a number in the cut out area, and sets it as a field ID. I do. That is, based on the ruled line coordinate data of the extracted field frame and the information stored in the field ID position information file 12a, the character (number) indicated at the lower right of the field frame is recognized as a character. Is set as an identifier for identifying the field.
[0019]
《Attribute determining unit》
The attribute determining unit 11c determines the attribute of the character string in the field from information associated with the field ID stored in the field attribute information file 12b based on the field ID extracted by the field ID extracting unit 11b. I do.
[0020]
《Character recognition section》
The character recognizing unit 11d recognizes, as a character, the content data described in the field recognized by the ruled line extracting unit 11a based on the attribute of the character string in the field determined by the attribute determining unit 11c.
[0021]
<Format of form>
FIG. 2 is a diagram showing an example of a form format used in the embodiment of the present invention. This form is a new application form used when opening a new account at a bank. The form includes fields (items) for entering the name, address, deposit amount, and account type of a customer who opens a new account. The type of account is indicated by general, ordinary, or regular. In the vicinity of each field in the form, for example, at the lower right, an ID is added as an identifier for identifying the contents of the field. For example, as shown in FIG. 2, this ID is indicated by a combination of a plurality of digits (three digits in this example), and functions as a field ID indicating a field attribute.
[0022]
<Data structure>
Next, the data structure of the field ID position information file 12a and the field attribute information file 12b provided in the storage unit 12 will be described.
[0023]
FIG. 3 is an example of a data structure indicating field ID position information. Field ID position information is defined in the field position information file 12a. The field ID position information indicates the offset amounts of the start point coordinates (X, Y) and the end point coordinates (X, Y) with respect to the ruled line coordinate data (X, Y) of the extracted field frame. That is, in the field ID position information, information for determining at which position the ID is located for each field ruled line is defined. Therefore, the field ID position information is fixedly defined for all fields, and only one field ID needs to be defined for the entire system. Also, a plurality of pieces of field position information may be set.
[0024]
Further, unlike the conventional field attribute information shown in FIG. 4B, it is not necessary to provide a parameter indicating a position for each field.
[0025]
FIG. 4A is an example of a data structure showing field attribute information, and FIG. 4B is a diagram showing conventional field attribute information as a comparative example. Field attribute information is defined in the field attribute information file 12b. In the field attribute information, as shown in FIG. 4, information such as an item ID, a character attribute, the number of characters, knowledge conversion, and a knowledge dictionary are defined in association with each field ID. The item ID is an identification number for the program to recognize the data. The character attribute and the number of characters are information indicating the attribute of the character string entered in the field. For example, the character attribute indicates information indicating whether the character is a character (NCHR) or a number (MUN). The number of characters indicates the number of characters in a column. The knowledge conversion indicates whether or not there is information (knowledge dictionary) that is a clue when recognizing characters in the field. In the knowledge conversion, the presence or absence of a knowledge dictionary is indicated by Y and N. As shown in FIG. 4, the knowledge dictionary indicates information indicating the corresponding knowledge dictionary when there is a knowledge dictionary (Y). Here, an example in which the content (item) of the field is NAME (name) is shown. The type of the knowledge dictionary is determined by the type of item entered in the field. For example, ADDRESS (address) can be used as another knowledge dictionary. For example, in the case where the contents (items) of the field correspond to ADDRESS, and the field contents are recognized in character recognition, the entry data of "Ota-ku, Tokyo" is recognized as a regular place name of "Ota-ku, Tokyo". Function.
[0026]
<Processing flow>
Next, the processing of the form reading apparatus 1 will be described with reference to FIGS.
[0027]
《Form reading processing》
FIG. 5 is an example of a flowchart showing a form reading process in the form reading apparatus. This processing is performed by the CPU 11 in the form reading apparatus 1 executing various programs for implementing the ruled line extracting unit 11a, the field ID extracting unit 11b, the attribute determining unit 11c, and the character recognizing unit 11d. .
[0028]
First, a form format is read from the image reader 10 as image data, and is taken into the storage unit 12 of the form reading apparatus 1 (S1).
[0029]
In the form reading device 1, the ruled line extracting unit 11a extracts ruled lines defining each field from the image data of the fetched form (S2). That is, a square area (field frame) surrounded by ruled lines and content data written in the field are extracted as ruled lines. At this time, the starting point and the ending point of the ruled line are extracted as coordinate data (X, Y). The extracted field frame and the content data in the field are stored in the storage unit 12 in pairs.
[0030]
Next, the field ID extraction unit 11b extracts the field ID added to the lower right of each field (item) based on the ruled line coordinate data of the field extracted in S2 and the field ID position information ( S3). That is, the position of the field ID added to each field (item) is extracted, the number indicated at the extracted position is recognized as a character, and the recognized character (number) is used as the field ID for the field. Set.
[0031]
Next, the attribute determining unit 11c determines the attribute of the character (character string) corresponding to the field ID set in S3 based on the field attribute information (S4). Here, information (character attribute, number of characters, knowledge conversion, knowledge dictionary) necessary for character recognition associated with each field ID defined as field attribute information and an item ID are read. These pieces of information necessary for character recognition are passed to the character recognition unit 11d together with an item ID that serves as identification information for the processing program (character recognition unit) to recognize the information. The character recognizing unit 11d recognizes the content data in the field as a character by associating the passed information necessary for character recognition with the content data in the field recognized by the ruled line extracting unit 11a (S5).
[0032]
Note that the above-described extraction of the ruled line in S2 corresponds to the extraction step of the present invention. The extraction of the field ID in S3 corresponds to the detecting step of the present invention. Further, the determination of the attribute of the character (character string) in S4 corresponds to the step of reading out the field information of the present invention. The character recognition of the content data in the field in S5 corresponds to the step of recognizing the item of the present invention.
[0033]
As a result, the form reading apparatus 1 extracts the field ID from the ruled line data of each field in the form, thereby recognizing the attribute of the character string for the field based on the correspondence with the field ID defined in advance. By using the attribute of the recognized character string, the character data of the content data in the field can be recognized. Further, the item of the character string recognized by the item ID can be identified. Therefore, even when the position of a field is different depending on the form (when the layout is changed), it is possible to recognize the character string written in each field and its item regardless of the field position in the form. it can. Hereinafter, the process of extracting the field ID in S3 will be described in detail.
[0034]
<< Field ID extraction processing >>
FIG. 6 is an example of a flowchart showing the extraction processing of the field ID. This processing is mainly performed by the field ID extraction unit 11b. In S3 shown in FIG. 5, when the rectangular area (field) surrounded by the ruled line is extracted as coordinate data in S2, only the end point coordinates (X, Y) constituting the ruled line are acquired (S10). . That is, the lower right of the square area (field) surrounded by the ruled line is obtained as the end point coordinates (X, Y). The acquired end point coordinates (X, Y) serve as a reference for specifying the position of the field ID. Based on the acquired end point coordinates (X, Y) and the data defined in the field ID position information, the starting point of the area where the field ID exists for each field is calculated (S11). Here, the offset amounts of the coordinates X and Y with respect to the starting point defined in the field ID position information are added to the acquired end point coordinates (X, Y). Next, based on the end point coordinates (X, Y) acquired in S10 and the data defined in the field ID position information, the end point of the area where the field ID exists for each field is calculated (S12). Here, the offset amounts of the coordinates X, Y with respect to the end point defined in the field ID position information are respectively added to the obtained end point coordinates (X, Y). In S11 and S12, the field ID existing in the area composed of the calculated starting point (X) of the field ID and the ending point (Y) of the field ID is recognized as a combination of numbers (S13). The combination of the recognized numbers is set as a field ID for identifying the field (S14).
[0035]
As a result, the field ID can be extracted as characters from the coordinate data of the ruled lines forming the field frame. Further, since the field ID is indicated by combining specified numbers of 0 to 9, the field ID can be recognized at a higher recognition rate than characters (such as hiragana and kanji).
[0036]
<Modification>
In the above embodiment, as shown in FIG. 2, the field ID for the field in the form format is a combination of numbers. However, in the present invention, as shown in FIG. 7, the field ID may be a bar code instead of a combination of numbers. The position where the barcode, which is the field ID, is added may be, for example, on a ruled line as shown in FIG. As a result, the field ID for each field can be recognized as a barcode, and the field ID recognition rate can be further increased.
[0037]
<How to create a form>
Next, a method of creating a form in which a field ID is entered will be described. FIG. 8 is a diagram illustrating a configuration example of a form creation device. The form creation device 2 can use the configuration of the form reading device as shown in FIG. The differences from the form reader 1 are as follows.
[0038]
(A) The storage unit 12 stores image data of a form in which no field ID is entered. However, the image data can be obtained by downloading, reading from a portable recording medium, or the like, regardless of the obtaining route.
[0039]
(B) The field attribute information file 12c stored in the storage unit 12 has a structure as a correspondence table between field IDs and field attribute information as shown in FIG. 8 unlike FIG. 4A. However, the field ID position information file 12a and the field attribute information file 12b may have a separate table 12d of field ID and field attribute information as shown in FIG.
[0040]
(C) The CPU 11 realizes a field extraction unit 11a, a field ID determination unit 11e, a field ID addition unit 11f, and a print control unit 11g by executing various programs, and controls a printer connected to the form creation device. The form image can be printed on a sheet.
[0041]
An operation example of the form creation device as described above is as follows. FIG. 10 is a flowchart illustrating an operation example.
[0042]
(S21) When the image data of the form is read from the storage unit 12, the field extraction unit 11a extracts each field (ruled line frame) in the image data by the same method as described above.
[0043]
(S22) The field ID determination unit 11e refers to the field attribute information file 12c and reads out the field ID corresponding to the attribute information of each field extracted in the field attribute information S21.
[0044]
(S23) The field ID addition unit sets the field ID corresponding to each field at the position specified by the information of the field ID position information file 12a with respect to the read image data of the form. The image data of the read form is edited and a field ID is added to the form. The edited image data may be stored in the storage unit 12.
[0045]
(S24) The print control unit 11g controls the printer, and causes the printer to print out the edited image data.
[0046]
Note that the image data created in S23 may be stored in the storage unit 12, and the processing in S24 may be performed as needed. Further, the processing of S21 to S23 may be repeatedly performed for each field. Further, the creation device may add a field ID to a form by additionally printing a field ID on a form (not including the field ID) printed on the sheet. In this case, S23 for editing the image data may be omitted.
[0047]
Note that the extraction of the fields in S21 described above corresponds to the extraction step of the present invention. The reading of the field ID in S22 corresponds to the step of reading the identification code of the present invention. The addition of the field ID in S23 corresponds to the adding step of the present invention.
[0048]
【The invention's effect】
According to the present invention, even if the layout on the form is changed (even if the position of the field on the form is changed), the device is extracted by extracting the field ID for each field from the field ruled line in the form. It is possible to read the new form without changing the setting information in the section, while maintaining the same reading accuracy as the old form.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating an example of a system of a form reading apparatus that provides a form reading method according to an embodiment of the present invention.
FIG. 2 is a diagram showing a form format example (1) used in an embodiment of the present invention.
FIG. 3 is an example of a data structure showing field ID position information.
FIG. 4 is an example of a data structure showing field attribute information.
FIG. 5 is an example of a flowchart showing a form reading process in the form reading apparatus.
FIG. 6 is a flowchart example showing a field ID extraction process.
FIG. 7 is a diagram showing a form format example (2) used in the embodiment of the present invention.
FIG. 8 is a diagram illustrating a configuration example of a form creation device.
FIG. 9 is a diagram illustrating an example of a correspondence table between a field ID and field attribute information.
FIG. 10 is a flowchart example showing an operation example in the form creation device.
[Explanation of symbols]
DESCRIPTION OF REFERENCE NUMERALS 1 form reading device 2 form creating device 10 image reader 11 CPU
11a Ruled line extraction unit (field extraction unit)
11b Field ID extraction unit 11c Attribute determination unit 11d Character recognition unit 11e Field ID determination unit 11f Field ID addition unit 11g Print control unit 12 Storage unit 12a Field ID position information file 12b Field attribute information file (form reader)
12c Field attribute information file (form creation device)
12d Correspondence table between field ID and field attribute information

Claims (3)

帳票内の文字を認識させる帳票読取プログラムにおいて、
帳票上のフィールドを抽出するステップと、
前記フィールドに対して所定位置に記載されているこのフィールドの識別コードを検出するステップと、
予め記憶された前記識別コードに対応するフィールド属性情報を読み出すステップと、
前記フィールド属性情報に基づき前記フィールド内に記入された情報の内容および前記フィールドに対して規定された項目を認識するステップと、
をコンピュータに実行させることを特徴とする帳票読取プログラム。
In a form reading program for recognizing characters in a form,
Extracting fields on the form;
Detecting an identification code of the field described in a predetermined position with respect to the field;
Reading field attribute information corresponding to the identification code stored in advance,
Recognizing the contents of the information entered in the field and the items defined for the field based on the field attribute information;
And a computer for executing the program.
情報記入用のフィールドを有し、このフィールドに対する所定位置に、コンピュータがフィールドを識別するとともにフィールド内に記入された情報とフィールドに対して規定された項目を認識するためのフィールド属性情報を記憶装置から読み出すためのフィールドの識別コードが記載された帳票。A storage device having a field for information entry and storing, at a predetermined position with respect to this field, a computer for identifying the field and for recognizing the information entered in the field and the field attribute information for recognizing an item specified for the field. A form in which the identification code of the field to be read from is described. 帳票を作成する帳票作成プログラムにおいて、
帳票上のフィールドを抽出するステップと、
予め記憶された前記フィールド内に記入される情報の項目と該情報の内容を認識するための前記フィールドの識別コードを読み出すステップと、
前記読み出された識別コードを前記フィールドに対する所定位置に付加するステップと、
をコンピュータに実行させることを特徴とする帳票作成プログラム。
In a form creation program that creates a form,
Extracting fields on the form;
Reading an item of information written in the field stored in advance and an identification code of the field for recognizing the content of the information;
Adding the read identification code to a predetermined position with respect to the field;
Which is executed by a computer.
JP2002330452A 2002-11-14 2002-11-14 Identification-code-attached form, form reading program, and form creation program Pending JP2004164376A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002330452A JP2004164376A (en) 2002-11-14 2002-11-14 Identification-code-attached form, form reading program, and form creation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002330452A JP2004164376A (en) 2002-11-14 2002-11-14 Identification-code-attached form, form reading program, and form creation program

Publications (1)

Publication Number Publication Date
JP2004164376A true JP2004164376A (en) 2004-06-10

Family

ID=32808138

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002330452A Pending JP2004164376A (en) 2002-11-14 2002-11-14 Identification-code-attached form, form reading program, and form creation program

Country Status (1)

Country Link
JP (1) JP2004164376A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009163398A (en) * 2007-12-28 2009-07-23 Toshiba Corp Form reading device, form reading system and program
JP2010176267A (en) * 2009-01-28 2010-08-12 Ricoh Co Ltd Information processor and program
JP2013030040A (en) * 2011-07-29 2013-02-07 Fujitsu Frontech Ltd Information processing program, information processor, and character recognition method
JP2022504454A (en) * 2019-09-30 2022-01-13 北京市商▲湯▼科技▲開▼▲發▼有限公司 Form recognition method, form extraction method and related devices

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009163398A (en) * 2007-12-28 2009-07-23 Toshiba Corp Form reading device, form reading system and program
JP2010176267A (en) * 2009-01-28 2010-08-12 Ricoh Co Ltd Information processor and program
JP2013030040A (en) * 2011-07-29 2013-02-07 Fujitsu Frontech Ltd Information processing program, information processor, and character recognition method
JP2022504454A (en) * 2019-09-30 2022-01-13 北京市商▲湯▼科技▲開▼▲發▼有限公司 Form recognition method, form extraction method and related devices

Similar Documents

Publication Publication Date Title
US8107727B2 (en) Document processing apparatus, document processing method, and computer program product
US8213717B2 (en) Document processing apparatus, document processing method, recording medium and data signal
JP2004258706A (en) Form definition data creation method and form processing device
JP2006065477A (en) Character recognition device
US7844138B2 (en) History control apparatus
JP2008282094A (en) Character recognition processing apparatus
JP2004164376A (en) Identification-code-attached form, form reading program, and form creation program
JPH1125209A (en) Information input device, its method, recording medium, and two-dimensional bar code printer
JP2006119712A (en) Information management terminal device and program, and document for electronic pen
JP2007241355A (en) Image processor and image processing program
JP3159087B2 (en) Document collation device and method
JP2010157078A (en) Information processing apparatus and locus data recognition method
JP2005208934A (en) Document distribution processing device and program
WO2023021636A1 (en) Data processing device, data processing method, and program
JP2013182459A (en) Information processing apparatus, information processing method, and program
JPH01243174A (en) System for defining business form data processing
JP2000339405A (en) Optical character recognition system, format control generation method of slip in the same and storage medium storing format control generation method
JP4651407B2 (en) Image processing apparatus, computer program, and storage medium
US10659654B2 (en) Information processing apparatus for generating an image surrounded by a marking on a document, and non-transitory computer readable recording medium that records an information processing program for generating an image surrounded by a marking on a document
JPH1196148A (en) Document management device
JP3006294B2 (en) Optical character reader
JPH09218741A (en) Information controller and its control method
JPH0678119A (en) Picture filing device and picture reading and processing device
JP2003248794A5 (en) Form processing device and program
JPH09288718A (en) Character processor and method therefor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051104

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080619

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080624

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080820

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20081028