JP2016126636A - Document identification device and program - Google Patents
Document identification device and program Download PDFInfo
- Publication number
- JP2016126636A JP2016126636A JP2015001314A JP2015001314A JP2016126636A JP 2016126636 A JP2016126636 A JP 2016126636A JP 2015001314 A JP2015001314 A JP 2015001314A JP 2015001314 A JP2015001314 A JP 2015001314A JP 2016126636 A JP2016126636 A JP 2016126636A
- Authority
- JP
- Japan
- Prior art keywords
- image
- ruled line
- form image
- completed
- original
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Abstract
Description
本発明は、罫線を含む帳票に記載された文字を認識するための前処理を行う帳票識別装置及びそのプログラムに関する。 The present invention relates to a form identification device and a program for performing preprocessing for recognizing characters written on a form including ruled lines.
顧客からFAXや郵便などで送られてくる注文書などの帳票をOCR(Optical Character Recognition)処理で読み取り、読み取った注文内容などをデータ化して管理する情報管理システムが知られている。この種の情報管理システムでは、注文内容などのデータ化の際に、人手による修正作業をなるべく生じさせないようにするためにOCR処理による文字認識率の向上が求められる。 There is known an information management system for reading a form such as an order form sent from a customer by FAX or mail by OCR (Optical Character Recognition) processing and converting the read order contents into data. In this type of information management system, it is required to improve the character recognition rate by OCR processing in order to prevent manual correction work as much as possible when converting the order contents into data.
従来、FAXで受信された帳票画像のゆがみなどを補正して文字認識率を向上させるために、注文書などの帳票に予め罫線を付しておき、FAXなどによって取得された帳票の画像から罫線を検出し、その罫線が含まれる画像を一定間隔で短冊状に切り出し、その短冊画像の罫線の中央を予め定義された罫線の位置に再配置することが提案されている(例えば特許文献1)。 Conventionally, in order to improve the character recognition rate by correcting the distortion of the form image received by FAX, a ruled line is attached in advance to a form such as an order form, and the ruled line is obtained from the form image acquired by FAX or the like. It is proposed that an image including the ruled line is detected in a strip shape at regular intervals, and the center of the ruled line of the strip image is rearranged at a predetermined ruled line position (for example, Patent Document 1). .
しかし、FAXなどで受信される帳票では、画像にゆがみが生じているだけでなく、画像が擦れていることも多い。帳票画像が擦れると、帳票に付されている罫線が途中で切れた画像となることもある。特許文献1の従来技術では、帳票画像の罫線が切れていることが考慮されていないため、罫線が途中で切れている場合には帳票画像から適切に罫線を検出することができない。
However, in a form received by FAX or the like, not only is the image distorted, but the image is often rubbed. When the form image is rubbed, the ruled line attached to the form may be cut off in the middle. In the prior art of
またFAXなどで受信される帳票には、顧客が注文内容などを手書きで記入したものも多く含まれる。そのような場合、手書きされた文字が罫線と交わった状態となっていることもある。帳票に記載された文字が罫線と交わった状態になると、その部分の罫線を適切に検出することができなくなると共に、OCR処理において罫線が文字の一部と認識されることがあり、文字認識率が低下する。 In addition, forms received by FAX or the like include a lot of items in which the customer has entered the order contents and the like by handwriting. In such a case, the handwritten character may be in a state of intersecting with the ruled line. When the characters described in the form intersect with the ruled lines, the ruled lines at that part cannot be detected properly, and the ruled lines may be recognized as part of the characters in the OCR process, and the character recognition rate Decreases.
そこで本発明は、上記課題を解決することを目的としてなされたものであり、帳票に含まれる罫線を適切に検出できるようにしてOCR処理による文字認識率を向上させることができる帳票識別装置及びプログラムを提供することを目的とする。 Therefore, the present invention has been made for the purpose of solving the above-described problems, and is a form identification apparatus and program capable of improving the character recognition rate by OCR processing by appropriately detecting ruled lines included in the form. The purpose is to provide.
上記目的を達成するため、請求項1に係る発明は、罫線を含む帳票に記載された文字を認識するために帳票を識別する帳票識別装置であって、前記帳票のオリジナル帳票画像を記憶する記憶手段と、前記帳票に文字が記載された記入済帳票画像を取得する画像取得手段と、前記帳票に含まれる罫線及び罫線の近傍領域の画像を前記オリジナル帳票画像から抽出する共に、前記帳票に含まれる罫線及び罫線の近傍領域を除く画像を前記記入済帳票画像から抽出して文字認識用画像を生成する画像生成手段と、を備えることを特徴とする構成である。
In order to achieve the above object, the invention according to
請求項2に係る発明は、請求項1に記載の帳票識別装置において、前記画像生成手段は、前記オリジナル帳票画像に対する処理位置と、前記記入済帳票画像に対する処理位置とを一致させる位置調整手段と、前記位置調整手段による位置調整が行われた後、前記オリジナル帳票画像及び前記記入済帳票画像に対する処理位置が前記帳票に含まれる罫線の位置に一致するとき、前記オリジナル帳票画像の画素信号と前記記入済帳票画像の画素信号との論理和演算を行う罫線復元手段と、前記位置調整手段による位置調整が行われた後、前記オリジナル帳票画像及び前記記入済帳票画像に対する処理位置が前記帳票に含まれる罫線の近傍領域の位置に一致するとき、前記オリジナル帳票画像の画素信号と前記記入済帳票画像の画素信号との論理積演算を行う罫線分離手段と、前記罫線復元手段から出力される画像と、前記罫線分離手段から出力される画像とを合成して前記文字認識用画像を生成する画像合成手段と、を備えることを特徴とする構成である。 According to a second aspect of the present invention, in the form identification device according to the first aspect, the image generating unit includes a position adjusting unit that matches a processing position with respect to the original form image and a processing position with respect to the completed form image. After the position adjustment by the position adjustment means, when the processing position for the original form image and the completed form image matches the position of the ruled line included in the form, the pixel signal of the original form image and the A ruled line restoration unit that performs a logical OR operation with a pixel signal of a completed form image, and after the position adjustment by the position adjustment unit, the processing position for the original form image and the completed form image is included in the form AND of the pixel signal of the original form image and the pixel signal of the completed form image A ruled line separating means for performing calculation, and an image combining means for generating the character recognition image by combining the image output from the ruled line restoring means and the image output from the ruled line separating means. This is a characteristic configuration.
請求項3に係る発明は、請求項2に記載の帳票識別装置において、前記画像生成手段は、前記オリジナル帳票画像の罫線及び罫線の近傍領域を除く画像領域を塗り潰してマスクするマスク処理手段を更に備えることを特徴とする構成である。 According to a third aspect of the present invention, in the form identification device according to the second aspect, the image generating means further includes a mask processing means for filling and masking an image area excluding the ruled line of the original form image and the area near the ruled line. It is the structure characterized by providing.
請求項4に係る発明は、請求項3に記載の帳票識別装置において、前記罫線分離手段は、更に前記オリジナル帳票画像及び前記記入済帳票画像に対する処理位置が前記マスク処理手段によってマスクされた画像領域に含まれるとき、前記オリジナル帳票画像の画素信号と前記記入済帳票画像の画素信号との論理積演算を行うことを特徴とする構成である。
The invention according to
請求項5に係る発明は、請求項3に記載の帳票識別装置において、前記画像合成手段は、前記オリジナル帳票画像及び前記記入済帳票画像に対する処理位置が前記マスク処理手段によってマスクされた画像領域に含まれるとき、前記記入済帳票画像の画素信号を用いて前記文字認識用画像を生成することを特徴とする構成である。 According to a fifth aspect of the present invention, in the form identifying apparatus according to the third aspect, the image synthesizing unit is configured to create an image area in which a processing position for the original form image and the completed form image is masked by the mask processing unit. When included, the character recognition image is generated using a pixel signal of the completed form image.
請求項6に係る発明は、請求項1に記載の帳票識別装置において、前記画像生成手段は、前記オリジナル帳票画像の罫線及び罫線の近傍領域を除く画像領域を塗り潰してマスクするマスク処理手段と、前記マスク処理手段によってマスクされた前記オリジナル帳票画像に対する処理位置と、前記記入済帳票画像に対する処理位置とを一致させる位置調整手段と、前記位置調整手段による位置調整が行われた後、前記オリジナル帳票画像及び前記記入済帳票画像に対する処理位置が前記マスク処理手段によってマスクされた画像領域に含まれないとき、前記オリジナル帳票画像の画素信号を選択して出力する罫線分離復元手段と、前記位置調整手段による位置調整が行われた後、前記オリジナル帳票画像及び前記記入済帳票画像に対する処理位置が前記マスク処理手段によってマスクされた画像領域に含まれるとき、前記記入済帳票画像の画素信号を選択して出力する文字抽出手段と、前記罫線分離復元手段から出力される画像と、前記文字抽出手段から出力される画像とを合成して前記文字認識用画像を生成する画像合成手段と、を備えることを特徴とする構成である。
The invention according to
請求項7に係る発明は、請求項1乃至6のいずれかに記載の帳票識別装置において、前記画像取得手段によって取得される前記記入済帳票画像の解像度が前記オリジナル帳票画像の解像度と異なるとき、前記記入済帳票画像及び前記オリジナル帳票画像のいずれか一方の解像度を変換して互いの解像度を一致させる解像度変換手段を更に備え、前記画像生成手段は、前記解像度変換手段による解像度変換が行われた後に、前記文字認識用画像を生成する処理を開始することを特徴とする構成である。
The invention according to
請求項8に係る発明は、請求項1乃至7のいずれかに記載の帳票識別装置において、前記記憶手段は、解像度の異なる複数の前記オリジナル帳票画像を記憶しており、前記画像生成手段は、前記記入済帳票画像の解像度に一致する解像度の前記オリジナル帳票画像を選択して前記文字認識用画像を生成する処理を行うことを特徴とする構成である。
The invention according to
請求項9に係る発明は、コンピュータに罫線を含む帳票に記載された文字を認識するための帳票識別処理を行わせるプログラムであって、前記コンピュータを、前記帳票のオリジナル帳票画像を所定の記憶手段に記憶させるオリジナル画像登録手段、前記帳票に文字が記載された記入済帳票画像を取得する画像取得手段、及び、前記帳票に含まれる罫線及び罫線の近傍領域の画像を前記オリジナル帳票画像から抽出する共に、前記帳票に含まれる罫線及び罫線の近傍領域を除く画像を前記記入済帳票画像から抽出して文字認識用画像を生成する画像生成手段、として機能させることを特徴とする構成である。
The invention according to
請求項10に係る発明は、請求項9に記載のプログラムにおいて、前記画像生成手段は、前記オリジナル帳票画像に対する処理位置と、前記記入済帳票画像に対する処理位置とを一致させる位置調整手段、前記位置調整手段による位置調整が行われた後、前記オリジナル帳票画像及び前記記入済帳票画像に対する処理位置が前記帳票に含まれる罫線の位置に一致するとき、前記オリジナル帳票画像の画素信号と前記記入済帳票画像の画素信号との論理和演算を行う罫線復元手段、前記位置調整手段による位置調整が行われた後、前記オリジナル帳票画像及び前記記入済帳票画像に対する処理位置が前記帳票に含まれる罫線の近傍領域の位置に一致するとき、前記オリジナル帳票画像の画素信号と前記記入済帳票画像の画素信号との論理積演算を行う罫線分離手段、及び、前記罫線復元手段から出力される画像と、前記罫線分離手段から出力される画像とを合成して前記文字認識用画像を生成する画像合成手段、として機能することを特徴とする構成である。 According to a tenth aspect of the present invention, in the program according to the ninth aspect, the image generating means is a position adjusting means for matching a processing position with respect to the original form image and a processing position with respect to the completed form image, the position After the position adjustment by the adjusting means, when the processing position for the original form image and the completed form image matches the position of the ruled line included in the form, the pixel signal of the original form image and the completed form Ruled line restoration means for performing an OR operation with pixel signals of the image, and after the position adjustment by the position adjustment means, the processing position for the original form image and the completed form image is in the vicinity of the ruled line included in the form AND operation of the pixel signal of the original form image and the pixel signal of the completed form image when matching the position of the region A ruled line separating unit that performs the function, and an image combining unit that combines the image output from the ruled line restoring unit and the image output from the ruled line separating unit to generate the character recognition image. The configuration is as follows.
請求項11に係る発明は、請求項10に記載のプログラムにおいて、前記画像生成手段は、前記オリジナル帳票画像の罫線及び罫線の近傍領域を除く画像領域を塗り潰してマスクするマスク処理手段として更に機能することを特徴とする構成である。 According to an eleventh aspect of the present invention, in the program according to the tenth aspect, the image generating means further functions as a mask processing means for painting and masking an image area excluding the ruled line of the original form image and the area near the ruled line. It is the structure characterized by this.
請求項12に係る発明は、請求項11に記載のプログラムにおいて、前記罫線分離手段は、更に前記オリジナル帳票画像及び前記記入済帳票画像に対する処理位置が前記マスク処理手段によってマスクされた画像領域に含まれるとき、前記オリジナル帳票画像の画素信号と前記記入済帳票画像の画素信号との論理積演算を行うことを特徴とする構成である。 According to a twelfth aspect of the invention, in the program according to the eleventh aspect, the ruled line separating means is further included in an image area in which a processing position for the original form image and the completed form image is masked by the mask processing means. In this case, a logical product operation of the pixel signal of the original form image and the pixel signal of the completed form image is performed.
請求項13に係る発明は、請求項11に記載のプログラムにおいて、前記画像合成手段は、前記オリジナル帳票画像及び前記記入済帳票画像に対する処理位置が前記マスク処理手段によってマスクされた画像領域に含まれるとき、前記記入済帳票画像の画素信号を用いて前記文字認識用画像を生成することを特徴とする構成である。 According to a thirteenth aspect of the present invention, in the program according to the eleventh aspect, the image synthesizing means is included in an image area in which a processing position for the original form image and the completed form image is masked by the mask processing means. In this case, the character recognition image is generated using a pixel signal of the completed form image.
請求項14に係る発明は、請求項9に記載のプログラムにおいて、前記画像生成手段は、前記オリジナル帳票画像の罫線及び罫線の近傍領域を除く画像領域を塗り潰してマスクするマスク処理手段、前記マスク処理手段によってマスクされた前記オリジナル帳票画像に対する処理位置と、前記記入済帳票画像に対する処理位置とを一致させる位置調整手段、前記位置調整手段による位置調整が行われた後、前記オリジナル帳票画像及び前記記入済帳票画像に対する処理位置が前記マスク処理手段によってマスクされた画像領域に含まれないとき、前記オリジナル帳票画像の画素信号を選択して出力する罫線分離復元手段、前記位置調整手段による位置調整が行われた後、前記オリジナル帳票画像及び前記記入済帳票画像に対する処理位置が前記マスク処理手段によってマスクされた画像領域に含まれるとき、前記記入済帳票画像の画素信号を選択して出力する文字抽出手段、及び、前記罫線分離復元手段から出力される画像と、前記文字抽出手段から出力される画像とを合成して前記文字認識用画像を生成する画像合成手段、として機能することを特徴とする構成である。 According to a fourteenth aspect of the invention, in the program according to the ninth aspect, the image generating means fills and masks an image area excluding a ruled line of the original form image and an area near the ruled line, and the mask process. Position adjusting means for matching the processing position for the original form image masked by the means with the processing position for the completed form image, and after the position adjustment by the position adjusting means is performed, the original form image and the entry When the processing position for the completed form image is not included in the image area masked by the mask processing means, the ruled line separation / restoration means for selecting and outputting the pixel signal of the original form image and the position adjustment by the position adjustment means are performed. The processing position for the original form image and the completed form image is Character extraction means for selecting and outputting a pixel signal of the completed form image when included in the image area masked by the mask processing means, an image output from the ruled line separation and restoration means, and the character extraction means The image output unit generates a character recognition image by combining the image output from the image output unit.
請求項15に係る発明は、請求項9乃至14のいずれかに記載のプログラムにおいて、前記コンピュータを、前記画像取得手段によって取得される前記記入済帳票画像の解像度が前記オリジナル帳票画像の解像度と異なるとき、前記記入済帳票画像及び前記オリジナル帳票画像のいずれか一方の解像度を変換して互いの解像度を一致させる解像度変換手段として更に機能させ、前記画像生成手段は、前記解像度変換手段による解像度変換が行われた後に、前記文字認識用画像を生成する処理を開始することを特徴とする構成である。 According to a fifteenth aspect of the present invention, in the program according to any one of the ninth to fourteenth aspects, the resolution of the completed form image obtained by the image obtaining unit is different from the resolution of the original form image. The resolution conversion means for converting the resolution of one of the completed form image and the original form image to match each other's resolution, and the image generation means performs resolution conversion by the resolution conversion means. After being performed, the processing for generating the character recognition image is started.
請求項16に係る発明は、請求項9乃至15のいずれかに記載のプログラムにおいて、前記オリジナル画像登録手段は、解像度の異なる複数の前記オリジナル帳票画像を前記記憶手段に記憶させ、前記画像生成手段は、前記記入済帳票画像の解像度に一致する解像度の前記オリジナル帳票画像を選択して前記文字認識用画像を生成する処理を行うことを特徴とする構成である。 According to a sixteenth aspect of the present invention, in the program according to any one of the ninth to fifteenth aspects, the original image registration unit stores a plurality of the original form images having different resolutions in the storage unit, and the image generation unit. Is a configuration in which the original form image having a resolution matching the resolution of the completed form image is selected to generate the character recognition image.
本発明によれば、帳票に含まれる罫線を復元すると共に、罫線と文字とが重なっている場合に罫線と文字とを分離できるため、文字認識処理において罫線を適切に検出することができるようになり、文字認識率を向上させることができる。 According to the present invention, the ruled lines included in the form can be restored and the ruled lines and the characters can be separated when the ruled lines and the characters overlap, so that the ruled lines can be appropriately detected in the character recognition process. Thus, the character recognition rate can be improved.
以下、本発明に関する好ましい実施形態について図面を参照しつつ詳細に説明する。尚、以下に説明する実施形態において互いに共通する部材には同一符号を付しており、それらについての重複する説明は省略する。 Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings. In the embodiments described below, members that are common to each other are denoted by the same reference numerals, and redundant descriptions thereof are omitted.
(第1実施形態)
図1は、本発明における情報管理システム1の構成概念を示す図である。この情報管理システム1は、MFP(Multifunction Peripherals)などで構成される画像入力装置2と、コンピュータ3で構成される帳票識別装置10と、OCRなどの文字認識処理を行う文字認識装置4とを備え、これらが相互にデータ通信を行うことができる構成である。
(First embodiment)
FIG. 1 is a diagram showing a configuration concept of an
画像入力装置2は、スキャン機能やFAX機能などを有する。画像入力装置2は、スキャン機能により、顧客からFAXや郵便などで送られてきた注文書などの帳票5を読み取って記入済帳票画像6を生成する。図2は、帳票5の一例を示す図である。帳票5には、縦方向及び横方向の複数の罫線が予め付されており、それら罫線で囲まれた領域に、顧客によって記入された注文内容などの情報が含まれる。そして画像入力装置2は、顧客によって記入された情報を含む記入済帳票画像6を生成し、その記入済帳票画像6を帳票識別装置10へ出力する。また画像入力装置2は、FAXで帳票画像を受信した場合、その帳票画像を、記入済帳票画像6として帳票識別装置10へ出力することも可能である。
The
帳票識別装置10は、記入済帳票画像6に記載されている文字を認識するための前処理として、記入済帳票画像6に含まれる罫線を識別する装置であって、記入済帳票画像6において擦れて切れた状態となっている罫線や、顧客によって記入された文字と重なっている罫線を補正して文字認識用画像8を生成する装置である。この帳票識別装置10は、ハードディスクドライブなどで構成される記憶装置15を有しており、その記憶装置15に、顧客による記入が行われていないブランク状態の帳票5に関するオリジナル帳票画像7が予め記憶されている。そして帳票識別装置10は、画像入力装置2から記入済帳票画像6を取得すると、オリジナル帳票画像7を用いて記入済帳票画像6に含まれる罫線を補正し、文字認識用画像8を生成する。そして帳票識別装置10は、罫線を補正した文字認識用画像8を文字認識装置4へ出力する。このとき、帳票識別装置10は、例えば文字認識用画像8に対して文字認識処理を行うべき帳票部分を少なくとも1つ指定して文字認識装置4へ出力する。
The
文字認識装置4は、文字認識用画像8に対する文字認識処理を行い、文字認識の結果を帳票識別装置10へ出力する。例えば文字認識装置4は、帳票識別装置10から指定された帳票部分から縦方向及び横方向の罫線を検出した後、それら罫線によって囲まれた領域内にある文字画像を抽出して文字認識を行い、文字画像をテキストデータに変換する。そして帳票識別装置10から指定された帳票部分の全てをテキスト化することができれば、文字認識処理が正常に完了する。これに対し、帳票識別装置10から指定された帳票部分のうち、1箇所でもテキスト化することに失敗すると、文字認識エラーとなる。そして文字認識装置4は、文字認識処理が正常終了したか、或いは、文字認識エラーとなったかを示す文字認識結果9を帳票識別装置10へ返答する。
The
文字認識装置4において文字認識処理が正常終了した場合、それによって生成されたテキストデータは、文字認識結果9と共に、帳票識別装置10へ送信されても良いし、文字認識装置4から別の情報管理サーバー(図示省略)へ送信されても良い。尚、本実施形態では、文字認識装置4と帳票識別装置10とをそれぞれ別の装置として構成した場合を例示しているが、これに限られるものではなく、文字認識装置4と帳票識別装置10とを1つのコンピュータ3において実現するものであっても構わない。
When the character recognition processing is normally completed in the
次に帳票識別装置10の構成及び動作について詳しく説明する。図3は、帳票識別装置10のハードウェア構成及び機能構成の一例を示すブロック図である。帳票識別装置10は、ハードウェア構成として、CPUとメモリとを備えて構成あれる制御部11と、ユーザーに対して各種情報を表示する表示部12と、ユーザーによる入力操作を受け付ける操作入力部13と、帳票識別装置10をLAN(Local Area Network)などのネットワークに接続するためのネットワークインタフェース14と、上述した記憶装置15とを備えている。記憶装置15には、制御部11のCPUによって実行されるプログラム16が予めインストールされている。このプログラム16は、コンピュータ3を帳票識別装置10として機能させるためのプログラムである。例えば、コンピュータ3のユーザーが、操作入力部13を介してプログラム16の実行を指示すると、制御部11のCPUは記憶装置15からプログラム16を読み出して起動する。これにより、コンピュータ3が帳票識別装置10として機能するようになる。
Next, the configuration and operation of the
制御部11のCPUがプログラム16を実行することにより、制御部11は、オリジナル画像登録部21、記入済画像取得部22、画像読出部23、画像調整部24及び画像生成部30として機能する。制御部11においてこれら各部が機能することにより、帳票識別装置10は、記入済帳票画像6において擦れて切れた状態となっている罫線や、顧客によって記入された文字と重なっている罫線を補正して文字認識用画像8を生成する。以下、これら各部の詳細について説明する。
When the CPU of the
オリジナル画像登録部21は、記憶装置15に帳票5のオリジナル帳票画像7を記憶させる処理部である。このオリジナル画像登録部21は、ユーザーによって新たな帳票5の登録操作が行われた場合に動作し、指定された新たな帳票5のオリジナル帳票画像7を記憶装置15へ格納する。したがって、記憶装置15には、複数種類の帳票5のオリジナル帳票画像7が記憶されることもある。
The original
図4は、オリジナル帳票画像7の概念を示す図である。図4(a)に示すオリジナル帳票画像7は、図2の帳票5に対応する画像である。このようなオリジナル帳票画像7には、縦方向及び横方向の罫線で囲まれた領域のうち、顧客が書き込みを行う領域に対して文字認識領域71が設定される。例えば図4(a)では、斜線を施した部分が文字認識領域71である。また文字認識領域71は、罫線で囲まれた領域ごとに設定される。すなわち、図4(b)に示すように、上下左右が4つの罫線72で囲まれた矩形領域の最小単位が1つの文字認識領域71として設定される。そのため、図4(a)に示すオリジナル帳票画像7のように、罫線72で囲まれた矩形領域が複数ある場合には、文字認識領域71も個々の矩形領域に対応して複数設定される。
FIG. 4 is a diagram showing the concept of the
またオリジナル画像登録部21は、1つの帳票5について解像度の異なる複数のオリジナル帳票画像7を記憶装置15に格納する。例えば、図4(a)のようなオリジナル帳票画像7の場合、200dpi、300dpi、400dpi、600dpi、800dpiといった複数のデータが記憶装置15に格納される。
The original
記入済画像取得部22は、ネットワークインタフェース14を介して、画像入力装置2から送信される記入済帳票画像6を取得する。図5は、記入済帳票画像6の一部を拡大して示す図である。図5に示す例では、記入済帳票画像6に、罫線が途切れた部分61や、顧客が記入した文字が罫線と重なった部分62とが混在している。このような状態では、文字認識装置4が文字認識処理を行う際に罫線を正確に検出できず、文字認識エラーとなる可能性が高くなる。そのため、記入済画像取得部22は、記入済帳票画像6を取得すると、以下の各処理部を動作させて罫線を適切に検出できるように補正する。
The completed
画像読出部23は、記憶装置15からオリジナル帳票画像7を読み出す処理部である。画像読出部23は、記入済画像取得部22によって取得された記入済帳票画像6の解像度を判別し、記入済帳票画像6の解像度に対応する解像度のオリジナル帳票画像7を読み出す。すなわち、記憶装置15に記入済帳票画像6の解像度に一致する解像度のオリジナル帳票画像7が記憶されている場合、画像読出部23は、記入済帳票画像6と同一解像度のオリジナル帳票画像7を選択して読み出す。また記憶装置15に記入済帳票画像6の解像度に一致する解像度のオリジナル帳票画像7が記憶されていない場合、画像読出部23は、記入済帳票画像6の解像度に近い解像度のオリジナル帳票画像7を選択して読み出す。このとき、画像読出部23は、記入済帳票画像6より高解像度のオリジナル帳票画像7があれば、記入済帳票画像6より低解像度のオリジナル帳票画像7よりも高解像度のオリジナル帳票画像7を優先的に選択する。そして画像読出部23は、読み出したオリジナル帳票画像7を画像調整部24へ出力する。
The
画像調整部24は、記入済画像取得部22によって取得された記入済帳票画像6と、画像読出部23によって読み出されたオリジナル帳票画像7とを互いに対比できるように画像調整を行う処理部である。この画像調整部24は、解像度変換部25を備えている。解像度変換部25は、記入済帳票画像6の解像度とオリジナル帳票画像7の解像度とが互いに異なる場合に動作し、それらの解像度が互いに一致した状態となるように解像度変換を行う。例えば、解像度変換部25は、高解像度の画像を低解像度の画像に一致させるように解像度変換を行う。上述したように画像読出部23は、記入済帳票画像6より高解像度のオリジナル帳票画像7を優先的に読み出す。そのため、解像度変換部25は、オリジナル帳票画像7の解像度を低下させることにより、記入済帳票画像6とオリジナル帳票画像7の解像度を一致させる。このとき、記入済帳票画像6については解像度が変わらないため、文字画像に含まれる文字情報が失われてしまうことを防止できる。
The
また画像調整部24は、解像度変換部25による解像度変換の他、記入済帳票画像6に対する傾き補正や天地補正などを行うと共に、記入済帳票画像6に含まれる画像ノイズを除去するノイズ除去処理などを実施する。これらの処理により、記入済帳票画像6は、オリジナル帳票画像7と対比可能な画像となる。そして画像調整部24は、画像調整を行った記入済帳票画像6とオリジナル帳票画像7とを画像生成部30へ出力する。
In addition to the resolution conversion performed by the
画像生成部30は、画像調整の行われた記入済帳票画像6及びオリジナル帳票画像7に基づき、記入済帳票画像6に含まれる罫線を補正した文字認識用画像8を生成し、文字認識装置4へ出力する処理部である。すなわち、画像生成部30は、罫線及び罫線の近傍領域の画像をオリジナル帳票画像7から抽出する共に、罫線及び罫線の近傍領域を除く画像を記入済帳票画像6から抽出することにより、文字認識用画像8を生成する。以下、このような画像生成部30について更に詳しく説明する。
The
図6は、本実施形態における画像生成部30の詳細な構成例を示す図である。図6に示すように、画像生成部30は、マスク処理部31と、位置調整部32と、画素信号抽出部33と、罫線復元部34と、罫線分離部35と、画像合成部36とを備える。
FIG. 6 is a diagram illustrating a detailed configuration example of the
マスク処理部31は、オリジナル帳票画像7の罫線72で囲まれた個々の矩形領域に設定される文字認識領域71に対してマスク処理を施す処理部である。図7は、マスク処理の概念を示す図である。マスク処理部31は、図7に示すように罫線72に囲まれた文字認識領域71のうち、罫線72及び罫線72の近傍領域を除く画像領域を黒く塗り潰してマスク73を形成する。ここで、マスク73が形成されない罫線72の近傍領域は、文字認識領域71を囲む4つの罫線72のそれぞれから所定間隔Dの領域に設定される。この間隔Dは、数画素程度の間隔に設定される。そしてマスク処理部31は、罫線72と、罫線72からの間隔が所定間隔Dである近傍領域を除く画像領域に対してマスク73を形成する。オリジナル帳票画像7に複数の文字認識領域71が含まれる場合、マスク処理部31は、それら複数の文字認識領域71のそれぞれに対して個別にマスク73を形成する。マスク処理部31は、全ての文字認識領域71に対するマスク処理を完了すると、次に位置調整部32を機能させる。
The
位置調整部32は、記入済帳票画像6に対する処理位置とオリジナル帳票画像7に対する処理位置とを互いに一致させる処理部である。すなわち、後述する罫線復元部34及び罫線分離部35では、記入済帳票画像6の画素信号とオリジナル帳票画像7の画素信号とをそれぞれ1画素ずつ抽出しながら文字認識用画像8を構成する1画素分の画素信号を生成していくため、処理対象となる画素の位置を記入済帳票画像6とオリジナル帳票画像7との間で互いに一致させる必要がある。位置調整部32は、そのための位置調整を行うものであり、処理対象となる画素の位置を同一位置に設定する。そして位置調整部32は、記入済帳票画像6及びオリジナル帳票画像7に対する処理位置を一致させた後、画素信号抽出部33を機能させる。
The
画素信号抽出部33は、位置調整部32によって処理位置の調整が行われた後、記入済帳票画像6及びオリジナル帳票画像7のそれぞれから同じ処理位置の画素信号を1画素ずつ抽出する処理部である。画素信号抽出部33は、記入済帳票画像6及びオリジナル帳票画像7のそれぞれから画素信号を抽出する処理を開始すると、それらの画素信号を罫線復元部34及び罫線分離部35のそれぞれに出力する。
The pixel
図8は、罫線復元部34及び罫線分離部35の構成概念を示す図である。まず罫線復元部34は、記入済帳票画像6の罫線が途切れた部分61の罫線を復元する処理部である。この罫線復元部34は、画素に対する処理位置がオリジナル帳票画像7の罫線72の位置に一致するときに機能するものである。そして罫線復元部34は、図8(a)に示すように、記入済帳票画像6の画素信号S1とオリジナル帳票画像7の画素信号S2との論理和演算34aを行い、文字認識用画像8を構成する画素信号Saを出力する。これにより、記入済帳票画像6の罫線が途切れた部分61では、オリジナル帳票画像7の罫線72の画素信号S1が文字認識用画像8を構成する画素信号Saとして出力されるようになるため、記入済帳票画像6の途切れた罫線が復元される。
FIG. 8 is a diagram illustrating a configuration concept of the ruled
次に罫線分離部35は、記入済帳票画像6において罫線と文字とが重なった部分62の罫線を文字から分離する処理部である。この罫線分離部35は、画素に対する処理位置がオリジナル帳票画像7における罫線72の位置である場合を除き、その罫線72の近傍領域の位置に一致するときに機能するものである。すなわち、処理位置が図7に示す罫線72とマスク73とを除く領域に位置するときに、罫線分離部35が機能する。そして罫線分離部35は、図8(b)に示すように、記入済帳票画像6の画素信号S1とオリジナル帳票画像7の画素信号S2との論理積演算35aを行い、文字認識用画像8を構成する画素信号Sbを出力する。これにより、記入済帳票画像6において罫線と文字とが重なった部分62の文字画像のみが消去された画素信号Saが出力されるようになるため、記入済帳票画像6に記載された罫線と文字とを分離することができる。
Next, the ruled
罫線復元部34及び罫線分離部35のそれぞれは、上記のような処理をオリジナル帳票画像7に予め設定されている文字認識領域71の全てに対して実行する。そして画像合成部36は、罫線復元部34から出力される画像(画素信号Sa群)と、罫線分離部35から出力される画像(画素信号Sb群)とを合成して文字認識用画像8を生成する。
Each of the ruled
図9は、罫線復元部34、罫線分離部35及び画像合成部36による処理概念を示す図である。画像合成部36は、画素に対する処理位置がオリジナル帳票画像7の罫線72の位置に一致するときには、罫線復元部34から出力される画素信号Saを文字認識用画像8の画素信号に採用し、画素に対する処理位置がオリジナル帳票画像7の罫線72の近傍領域に一致するときには、罫線分離部35から出力される画素信号Sbを文字認識用画像8の画素信号に採用して文字認識用画像8を生成する。その結果、画像合成部36で生成される文字認識用画像8は、図9に示すように、記入済帳票画像6において途切れていた部分61の罫線が復元された状態になり、且つ、記入済帳票画像6において文字と重なっていた部分62の罫線が文字と分離された状態となる。したがって、文字認識装置4が、図9に示すような文字認識用画像8に基づいて文字認識処理を行うときには、文字認識用画像8に含まれる罫線を適切に検出することができるようになり、文字認識率を向上させることができる。
FIG. 9 is a diagram illustrating a processing concept by the ruled
ここで罫線分離部35が罫線72の近傍領域において論理積演算35aを行うときには、文字認識領域71を囲む4つの罫線72の近傍領域の全てに対して論理積演算35aを行うようにしてもよい。ただし、これに限らず、例えば図10に示すように記入済帳票画像6とオリジナル帳票画像7とを重ね合わせたときに文字がマスク73からはみ出すことによって形成される黒色部分66の有無を判別し、黒色部分66が存在する罫線72の近傍領域に対してのみ、論理積演算35aを行うようにしてもよい。すなわち、図10の例においては、上下左右の4辺のうち、下辺の罫線72の近傍領域に対してのみ論理積演算35aを行うようにしてもよい。このような構成によれば、上下左右の4辺の近傍領域の全てに対して論理積演算35aを行うよりも効率的に論理積演算35aを完了させることができるという利点がある。尚、論理積演算35aを行わない場合には、例えば記入済帳票画像6の画素信号が画像合成部36へ出力される。
Here, when the ruled
また画素に対する処理位置がマスク73の画像領域に含まれる場合には、罫線分離部35によって記入済帳票画像6の画素信号S1とオリジナル帳票画像7の画素信号S2との論理積演算35aを行い、画像合成部36はその論理積演算35aによって得られる画素信号を文字認識用画像8の画素信号に採用してもよい。マスク73の画像領域において論理積演算35aを行うことにより、記入済帳票画像6に含まれる文字画像を適切に出力することができる。
When the processing position for the pixel is included in the image area of the
ただし、マスク73の画像領域については、必ずしも論理積演算35aを行わなくてもよい。すなわち、画素に対する処理位置がマスク73の画像領域に含まれるときには、記入済帳票画像6の画素信号S1をそのまま文字認識用画像8の画素信号として採用してもよい。この場合、論理積演算35aを行う必要がなくなるので、処理効率が向上する。
However, the AND
帳票識別装置10は、上記のようにして生成した文字認識用画像8を文字認識装置4へ出力した後、文字認識装置4から文字認識結果9を受信する。そして文字認識結果9が文字認識エラーを示す場合、帳票識別装置10は、再び画像生成部30を機能させ、マスク処理部31がオリジナル帳票画像7に対してマスク73を形成する際の所定間隔Dを前回とは異なる値に変更して文字認識用画像8を再度生成する。
The
図11は、マスク処理部31において所定間隔Dを変更する手順の例を示す図である。マスク処理部31が所定間隔Dを変更する手順には2通りの手順がある。以下、これら2通りの手順について説明する。
FIG. 11 is a diagram illustrating an example of a procedure for changing the predetermined interval D in the
第1の手順は、文字認識エラーが検出される度に所定間隔Dを次第に大きくしていく手順である。マスク処理部31は、初めに罫線72に囲まれた文字認識領域71に対してマスク73を形成する際、図11(a)に示すように罫線72とマスク73との隙間となる所定間隔Dを1画素分の間隔に設定する。そして文字認識装置4から文字認識エラーを示す文字認識結果9を受信した場合、次にマスク処理部31は、図11(b)に示すように所定間隔Dを2画素分の間隔に変更し、前回よりも1画素分大きな間隔に設定する。その後更に文字認識装置4から文字認識エラーを示す文字認識結果9を受信した場合、マスク処理部31は、図11(c)に示すように所定間隔Dを3画素分の間隔に変更し、前回よりも更に1画素分大きな間隔に設定する。つまり、第1の手順では、図11において矢印F1で示すように文字認識エラーが検出される度に罫線72とマスク73との間隔Dが広がっていく。
The first procedure is a procedure in which the predetermined interval D is gradually increased every time a character recognition error is detected. When the
この第1の手順では、初期の罫線72とマスク73との間隔Dが最小であるため、文字認識領域71に形成されるマスク73の画像領域が最大面積となる。そのため、初期状態では、記入済帳票画像6に含まれる文字画像の損失量を少なくできるという利点がある。ところが、罫線72とマスク73との間隔Dが1画素程度であると、文字と罫線との分離幅(余白)も1画素程度の小さなものとなってしまうため、文字認識処理において1画素程度の小さな余白を無視した文字認識がなされると、文字認識エラーとなる可能性がある。そのため、第1の手順では、文字認識エラーが検出された場合に、所定間隔Dを少しずつ広げていくことにより、文字認識処理において無視されない余白を形成することができるようになる。
In this first procedure, since the distance D between the initial ruled
第2の手順は、文字認識エラーが検出される度に所定間隔Dを次第に小さくしていく手順である。マスク処理部31は、初めに罫線72に囲まれた文字認識領域71に対してマスク73を形成する際、図11(c)に示すように罫線72とマスク73との隙間となる所定間隔Dを3画素分の間隔に設定する。そして文字認識装置4から文字認識エラーを示す文字認識結果9を受信した場合、次にマスク処理部31は、図11(b)に示すように所定間隔Dを2画素分の間隔に変更し、前回よりも1画素分小さな間隔に設定する。その後更に文字認識装置4から文字認識エラーを示す文字認識結果9を受信した場合、マスク処理部31は、図11(a)に示すように所定間隔Dを1画素分の間隔に変更し、前回よりも更に1画素分小さな間隔に設定する。つまり、第2の手順では、図11において矢印F2で示すように文字認識エラーが検出される度に罫線72とマスク73との間隔Dが狭くなっていく。
The second procedure is a procedure in which the predetermined interval D is gradually reduced every time a character recognition error is detected. When the
この第2の手順では、初期の罫線72とマスク73との間隔Dが最大となっているため、文字認識処理において罫線と文字との間の余白は無視されず、罫線と文字とが別個のものとして扱われるようになるという利点がある。ところが、罫線72とマスク73との間隔Dが3画素程度の大きな間隔であると、文字認識領域71に形成されるマスク73の画像領域の面積が小さくなるため、初期状態では、記入済帳票画像6に含まれる文字画像の損失量が多く、適切な文字認識がなされずに文字認識エラーとなる可能性がある。そのため、第2の手順では、文字認識エラーが検出された場合に、所定間隔Dを少しずつ狭くしていくことにより、文字画像の損失量を次第に減少させて適切な文字認識がなされるようにマスク73を形成することができる。
In this second procedure, since the distance D between the initial ruled
上記第1及び第2の手順は、いずれを採用してもよい。すなわち、帳票識別装置10は、文字認識装置4において文字認識エラーが検出される度に、画像生成部30を再度機能させ、マスク処理部31においてマスク73を形成する際の所定間隔Dを順次変更していくことにより、文字認識エラーを解消することができる。
Any of the first and second procedures may be adopted. That is, the
次に帳票識別装置10における処理手順について説明する。図12及び図13は、帳票識別装置10による処理手順の一例を示すフローチャートである。この処理手順は、帳票識別装置10がプログラム16に基づいて実行する処理である。帳票識別装置10は、この処理を開始すると、まずオリジナル帳票画像7を記憶装置15に保存する(ステップS10)。尚、既にオリジナル帳票画像7が保存されている場合には、ステップS10の処理をスキップしても良い。
Next, a processing procedure in the
次に帳票識別装置10は、記入済帳票画像6を取得するまで待機し(ステップS11)、記入済帳票画像6を取得すると(ステップS11でYES)、記憶装置15からオリジナル帳票画像7を読み出す(ステップS12)。このとき、帳票識別装置10は、記入済帳票画像6の解像度に最も近い解像度のオリジナル帳票画像7を読み出す。そして帳票識別装置10は、記憶装置15から読み出したオリジナル帳票画像7の解像度と、記入済帳票画像6の解像度とが一致するか否かを判断し(ステップS13)、解像度が一致していない場合には(ステップS13でNO)、両者の解像度を一致させる解像度変換処理を行う(ステップS14)。その後、帳票識別装置10は、記入済帳票画像6に対する画像調整処理を行ってから(ステップS15)、画像生成処理を行う(ステップS16)。この画像生成処理(ステップS16)の詳細については後述する。
Next, the
そして帳票識別装置10は、画像生成処理(ステップS16)で生成された文字認識用画像8を文字認識装置4へ出力する(ステップS17)。その後、帳票識別装置10は、文字認識装置4から文字認識結果9を受信するまで待機し(ステップS18)、文字認識結果9を受信すると(ステップS18でYES)、文字認識エラーが検出されているか否かを判断する(ステップS19)。そして文字認識エラーが検出されていない場合(ステップS19でNO)、この処理は終了する。これに対し、文字認識エラーが検出されている場合(ステップS19でYES)、帳票識別装置10は、マスク処理を行う際の罫線72からの間隔Dを前回とは異なる値に再設定し(ステップS20)、再び画像生成処理(ステップS16)を開始する。
Then, the
図13は、画像生成処理(ステップS16)の詳細な処理手順の一例を示すフローチャートである。帳票識別装置10は、画像生成処理を開始すると、まずマスク処理を行う際の罫線72からの間隔Dの設定値を読み出す(ステップS30)。このとき、予め設定されている初期値又はステップS20で設定された設定値が読み出される。そして帳票識別装置10は、ステップS30で読み出した間隔Dの設定値に基づいてマスク処理を行い、罫線72で囲まれた文字認識領域71に対してマスク73を形成する(ステップS31)。そして帳票識別装置10は、記入済帳票画像6に対する処理位置とオリジナル帳票画像7に対する処理位置とを互いに一致させる位置調整処理を行い(ステップS32)、記入済帳票画像6及びオリジナル帳票画像7の画素に対する現在の処理位置を初期値である処理開始位置に設定する(ステップS33)。
FIG. 13 is a flowchart illustrating an example of a detailed processing procedure of the image generation process (step S16). When starting the image generation process, the
そして帳票識別装置10は、現在の処理位置を確認し(ステップS34)、現時の処理位置が罫線72上の位置であるか否かを判断する(ステップS35)。現在の処理位置が罫線72上の位置である場合(ステップS35でYES)、帳票識別装置10は、記入済帳票画像6の画素信号とオリジナル帳票画像7の画素信号との論理和演算を行い、記入済帳票画像6の罫線を復元する(ステップS36)。現在の処理位置が罫線72上の位置でなかった場合(ステップS35でNO)、帳票識別装置10は、現在の処理位置がマスク73の形成された画像領域に含まれない罫線72の近傍領域の位置であるか否かを判断する(ステップS37)。現在の処理位置が罫線72の近傍領域の位置であった場合(ステップS37でYES)、帳票識別装置10は、記入済帳票画像6の画素信号とオリジナル帳票画像7の画素信号との論理積演算を行い、記入済帳票画像6において罫線と文字とが重ならないように罫線を文字から分離させる(ステップS38)。一方、現在の処理位置が罫線72の近傍領域ではなく、マスク73の画像領域に含まれる場合(ステップS37でNO)、帳票識別装置10は、記入済帳票画像6の画素信号を、現在の処理位置の画素信号として出力する(ステップS39)。
The
そして帳票識別装置10は、ステップS36,S38又はS39から出力される画素信号を文字認識用画像8における現在の処理位置の画素信号として記録していくことにより、記入済帳票画像6とオリジナル帳票画像7とを合成した文字認識用画像8を逐次生成していく(ステップS40)。その後、帳票識別装置10は、全ての画素に対する処理が終了したか否かを判断し(ステップS41)、全ての画素に対する処理が終了していれば(ステップS41でYES)、画像生成処理(ステップS16)が終了する。これに対し、未処理の画素が存在する場合(ステップS41でNO)、帳票識別装置10は、現在の処理位置を所定のルールに従って1画素分移動させ(ステップS42)、上述したステップS34以降の処理を繰り返す。このような画像生成処理(ステップS16)により、図9に示した文字認識用画像8が生成される。
The
以上のようにして帳票識別装置10は、帳票5に含まれる罫線及び罫線の近傍領域の画像をオリジナル帳票画像7から抽出する共に、帳票5に含まれる罫線及び罫線の近傍領域を除く画像を記入済帳票画像6から抽出して文字認識用画像8を生成することができる。したがって、帳票識別装置10は、記入済帳票画像6に含まれる罫線が途中で切れた状態となっていたり、或いは、記入済帳票画像6に記入された文字が罫線と交わった状態となっていたりしても、途中で切れた罫線を復元することができると共に、罫線と文字とを互いに分離させることができる。それ故、文字認識装置4において文字認識処理が行われるときには、罫線を適切に検出することができるようになり、文字認識率を向上させることが可能である。
As described above, the
また本実施形態の帳票識別装置10は、オリジナル帳票画像7及び記入済帳票画像6に対する処理位置が罫線72の位置に一致するときに、オリジナル帳票画像7の画素信号と記入済帳票画像6の画素信号との論理和演算を行うことによって途切れた罫線を復元し、オリジナル帳票画像7及び記入済帳票画像6に対する処理位置が罫線72の近傍領域の位置に一致するときに、オリジナル帳票画像7の画素信号と記入済帳票画像6の画素信号との論理積演算を行うことによって罫線と文字とを分離させる構成である。このような構成は、ハードウェア及びソフトウェアのいずれで実現する場合であっても比較的簡単に実現できるという利点がある。
In addition, the
尚、上記においては、マスク処理部31が文字認識領域71に対してマスク73を形成するマスク処理を行う場合を例示したが、本実施形態では、マスク処理部31によるマスク処理は必ずしも必須のものではない。すなわち、本実施形態では、罫線72の近傍領域において罫線と文字とを分離させるための論理積演算35aを行う領域を特定することができればよいので、マスク73を形成する方法とは異なる方法でそのような領域を定義する構成を採用することも可能である。
In the above description, the case where the
(第2実施形態)
次に本発明の第2実施形態について説明する。上記第1実施形態では、論理和演算及び論理積演算を行うことにより、罫線の復元、及び、罫線と文字との分離を行う形態について説明した。本実施形態では、現在の処理位置がマスク73の画像領域であるか否かに応じて記入済帳票画像6の画素信号とオリジナル帳票画像7の画素信号とを切り替えて選択することにより、罫線の復元、及び、罫線と文字との分離を行う形態について説明する。
(Second Embodiment)
Next, a second embodiment of the present invention will be described. In the first embodiment, the mode in which the ruled line is restored and the ruled line and the character are separated by performing the logical sum operation and the logical product operation has been described. In the present embodiment, by selecting the pixel signal of the completed
図14は、本実施形態における画像生成部30の詳細な構成例を示す図である。図14に示すように、本実施形態の画像生成部30は、マスク処理部31と、位置調整部32と、画素信号抽出部33と、罫線分離復元部38と、文字抽出部39と、画像合成部36とを備える。このうち、マスク処理部31、位置調整部32、画素信号抽出部33及び画像合成部36は、第1実施形態で説明したものと同様である。
FIG. 14 is a diagram illustrating a detailed configuration example of the
図15は、罫線分離復元部38及び文字抽出部39の構成概念を示す図である。まず罫線分離復元部38は、記入済帳票画像6の罫線が途切れた部分61の罫線を復元すると共に、罫線と文字とが重なった部分62の罫線を文字から分離する処理部である。この罫線分離復元部38は、画素に対する処理位置がマスク処理部31によってマスク73が形成された画像領域に含まれないときに機能する。そして罫線分離復元部38は、図15(a)に示すように、オリジナル帳票画像7の画素信号S2をそのまま文字認識用画像8を構成する画素信号Sdとして出力する。これにより、マスク73の外側の領域では、オリジナル帳票画像7の画素信号S2が文字認識用画像8を構成する画素信号Sdとして出力されるため、記入済帳票画像6の途切れた罫線が復元されると共に、罫線と文字とが重なっているときに罫線と文字とを分離することができる。
FIG. 15 is a diagram showing a configuration concept of the ruled line separation /
次に文字抽出部39は、記入済帳票画像6において記載されている文字部分を抽出する処理部である。この文字抽出部39は、画素に対する処理位置がマスク処理部31によってマスク73が形成された画像領域に含まれるときに機能する。そして文字抽出部39は、図15(b)に示すように、記入済帳票画像6の画素信号S1をそのまま文字認識用画像8を構成する画素信号Scとして出力する。これにより、マスク73の内側の領域では、記入済帳票画像6の画素信号S1が文字認識用画像8を構成する画素信号Scとして出力されるため、記入済帳票画像6において記載されている文字画像を抽出することができる。
Next, the
罫線分離復元部38及び文字抽出部39のそれぞれは、上記のような処理をオリジナル帳票画像7に予め設定されている文字認識領域71の全てに対して実行する。そして画像合成部36は、罫線分離復元部38から出力される画像(画素信号Sd群)と、文字抽出部39から出力される画像(画素信号Sc群)とを合成して文字認識用画像8を生成する。
Each of the ruled line separation /
図16は、罫線分離復元部38、文字抽出部39及び画像合成部36による処理概念を示す図である。画像合成部36は、画素に対する処理位置がマスク73の画像領域に含まれないときには、罫線分離復元部38から出力される画素信号Sdを文字認識用画像8の画素信号に採用し、画素に対する処理位置がマスク73の画像領域に含まれるときには、文字抽出部39から出力される画素信号Scを文字認識用画像8の画素信号に採用して文字認識用画像8を生成する。その結果、画像合成部36で生成される文字認識用画像8は、図16に示すように、記入済帳票画像6において途切れていた罫線が復元された状態になり、且つ、記入済帳票画像6において文字と重なっていた罫線が文字と分離された状態となる。したがって、文字認識装置4が、図15に示すような文字認識用画像8に基づいて文字認識処理を行う場合、第1実施形態と同様に、文字認識用画像8に含まれる罫線を適切に検出することができるようになり、文字認識率を向上させることができる。
FIG. 16 is a diagram illustrating a processing concept by the ruled line separation /
次に図17は、本実施形態における画像生成処理(図12のステップS16)の詳細な処理手順の一例を示すフローチャートである。尚、図17のフローチャートにおいて、ステップS50〜S54の処理は、図13に示したステップS30〜S34の処理と同様である。ステップS50〜S54の処理を行った後、帳票識別装置10は、現時の処理位置が文字認識領域71のうちのマスク73の内側の画像領域に含まれるか否かを判断する(ステップS55)。現在の処理位置がマスク73内の画像領域である場合(ステップS55でYES)、帳票識別装置10は、記入済帳票画像6の画素信号を出力する(ステップS56)。これに対し、現在の処理位置がマスク73内の画像領域ではなく、文字認識領域71のうちのマスク73の外側の領域である場合(ステップS55でNO)、帳票識別装置10は、オリジナル帳票画像7の画素信号を出力する(ステップS57)。
Next, FIG. 17 is a flowchart illustrating an example of a detailed processing procedure of the image generation processing (step S16 in FIG. 12) in the present embodiment. In the flowchart of FIG. 17, the processes of steps S50 to S54 are the same as the processes of steps S30 to S34 shown in FIG. After performing the processing of steps S50 to S54, the
そして帳票識別装置10は、ステップS56又はS57から出力される画素信号を文字認識用画像8における現在の処理位置の画素信号として記録していくことにより、記入済帳票画像6とオリジナル帳票画像7とを合成した文字認識用画像8を逐次生成していく(ステップS58)。その後、帳票識別装置10は、全ての画素に対する処理が終了したか否かを判断し(ステップS59)、全ての画素に対する処理が終了していれば(ステップS59でYES)、画像生成処理(ステップS16)が終了する。これに対し、未処理の画素が存在する場合(ステップS59でNO)、帳票識別装置10は、現在の処理位置を所定のルールに従って1画素分移動させ(ステップS60)、ステップS54以降の処理を繰り返す。このような画像生成処理(ステップS16)により、図16に示した文字認識用画像8が生成される。
Then, the
以上のように、本実施形態の帳票識別装置10は、帳票5に含まれる罫線及び罫線の近傍領域の画像をオリジナル帳票画像7から抽出する共に、帳票5に含まれる罫線及び罫線の近傍領域を除く画像を記入済帳票画像6から抽出して文字認識用画像8を生成する。したがって、帳票識別装置10は、記入済帳票画像6に含まれる罫線が途中で切れた状態となっていたり、或いは、記入済帳票画像6に記入された文字が罫線と交わった状態となっていたりしても、途中で切れた罫線を復元することができると共に、罫線と文字とを互いに分離させることができる。それ故、文字認識装置4において文字認識処理が行われるときには、罫線を適切に検出することができるようになり、文字認識率を向上させることが可能である。
As described above, the
尚、本実施形態において上記に説明した点以外については、第1実施形態で説明したものと同様である。 The points other than those described above in the present embodiment are the same as those described in the first embodiment.
(変形例)
以上、本発明に関する一実施形態について説明したが、本発明は、上記実施形態において説明した内容のものに限られるものではなく、種々の変形例が適用可能である。
(Modification)
Although one embodiment related to the present invention has been described above, the present invention is not limited to the contents described in the above embodiment, and various modifications can be applied.
例えば上記実施形態では、帳票5が注文書である場合を例示したが、帳票5は注文書に限られるものではない。すなわち、帳票5は、罫線を含むものであれば、どのようなものであっても構わない。
For example, although the case where the
また上記実施形態では、文字認識領域71が上下左右の4箇所を縦方向及び横方向の罫線で囲まれる場合を例示した。しかし、これに限られるものでもなく、例えば縦方向の2つの罫線によって挟まれた領域に対して文字認識領域71が設定されるものであっても良いし、また横方向の2つの罫線によって挟まれた領域に文字認識領域71が設定されるものであっても良い。
Moreover, in the said embodiment, the character recognition area |
3 コンピュータ
5 帳票
6 記入済帳票画像
7 オリジナル帳票画像
10 帳票識別装置
15 記憶装置(記憶手段)
21 オリジナル画像登録部(オリジナル画像登録手段)
22 記入済画像取得部(画像取得手段)
25 解像度変換部(解像度変換手段)
30 画像生成部(画像生成手段)
31 マスク処理部(マスク処理手段)
32 位置調整部(位置調整手段)
33 画素信号抽出部
34 罫線復元部(罫線復元手段)
35 罫線分離部(罫線分離手段)
36 画像合成部(画像合成手段)
38 罫線分離復元部(罫線分離復元手段)
39 文字抽出部(文字抽出手段)
3
21 Original image registration section (original image registration means)
22 Completed image acquisition unit (image acquisition means)
25 Resolution converter (resolution converter)
30 Image generation unit (image generation means)
31 Mask processing unit (mask processing means)
32 Position adjustment unit (position adjustment means)
33 Pixel
35 Ruled line separator (ruled line separating means)
36 Image composition section (image composition means)
38 Ruled line separation restoration unit (ruled line separation restoration means)
39 Character extraction part (character extraction means)
Claims (16)
前記帳票のオリジナル帳票画像を記憶する記憶手段と、
前記帳票に文字が記載された記入済帳票画像を取得する画像取得手段と、
前記帳票に含まれる罫線及び罫線の近傍領域の画像を前記オリジナル帳票画像から抽出する共に、前記帳票に含まれる罫線及び罫線の近傍領域を除く画像を前記記入済帳票画像から抽出して文字認識用画像を生成する画像生成手段と、
を備えることを特徴とする帳票識別装置。 A form identification device for identifying a form in order to recognize characters written in a form including ruled lines,
Storage means for storing an original form image of the form;
Image acquisition means for acquiring a completed form image in which characters are written in the form;
An image of the ruled line included in the form and the area near the ruled line is extracted from the original form image, and an image excluding the ruled line included in the form and the area near the ruled line is extracted from the completed form image for character recognition. Image generating means for generating an image;
A form identification apparatus comprising:
前記オリジナル帳票画像に対する処理位置と、前記記入済帳票画像に対する処理位置とを一致させる位置調整手段と、
前記位置調整手段による位置調整が行われた後、前記オリジナル帳票画像及び前記記入済帳票画像に対する処理位置が前記帳票に含まれる罫線の位置に一致するとき、前記オリジナル帳票画像の画素信号と前記記入済帳票画像の画素信号との論理和演算を行う罫線復元手段と、
前記位置調整手段による位置調整が行われた後、前記オリジナル帳票画像及び前記記入済帳票画像に対する処理位置が前記帳票に含まれる罫線の近傍領域の位置に一致するとき、前記オリジナル帳票画像の画素信号と前記記入済帳票画像の画素信号との論理積演算を行う罫線分離手段と、
前記罫線復元手段から出力される画像と、前記罫線分離手段から出力される画像とを合成して前記文字認識用画像を生成する画像合成手段と、
を備えることを特徴とする請求項1に記載の帳票識別装置。 The image generating means includes
Position adjusting means for matching a processing position for the original form image and a processing position for the completed form image;
After the position adjustment by the position adjustment means, when the processing position for the original form image and the completed form image matches the position of the ruled line included in the form, the pixel signal of the original form image and the entry Ruled line restoration means for performing a logical OR operation with the pixel signal of the completed form image,
After the position adjustment by the position adjustment unit, when the processing position for the original form image and the completed form image coincides with the position of the area near the ruled line included in the form, the pixel signal of the original form image And ruled line separating means for performing a logical product operation of the pixel signal of the completed form image,
Image combining means for generating the character recognition image by combining the image output from the ruled line restoration means and the image output from the ruled line separation means;
The form identifying apparatus according to claim 1, further comprising:
前記オリジナル帳票画像の罫線及び罫線の近傍領域を除く画像領域を塗り潰してマスクするマスク処理手段と、
前記マスク処理手段によってマスクされた前記オリジナル帳票画像に対する処理位置と、前記記入済帳票画像に対する処理位置とを一致させる位置調整手段と、
前記位置調整手段による位置調整が行われた後、前記オリジナル帳票画像及び前記記入済帳票画像に対する処理位置が前記マスク処理手段によってマスクされた画像領域に含まれないとき、前記オリジナル帳票画像の画素信号を選択して出力する罫線分離復元手段と、
前記位置調整手段による位置調整が行われた後、前記オリジナル帳票画像及び前記記入済帳票画像に対する処理位置が前記マスク処理手段によってマスクされた画像領域に含まれるとき、前記記入済帳票画像の画素信号を選択して出力する文字抽出手段と、
前記罫線分離復元手段から出力される画像と、前記文字抽出手段から出力される画像とを合成して前記文字認識用画像を生成する画像合成手段と、
を備えることを特徴とする請求項1に記載の帳票識別装置。 The image generating means includes
Mask processing means for painting and masking the image area excluding the ruled line of the original form image and the area near the ruled line;
Position adjusting means for matching the processing position for the original form image masked by the mask processing means with the processing position for the completed form image;
After the position adjustment by the position adjustment means, when the processing position for the original form image and the completed form image is not included in the image area masked by the mask processing means, the pixel signal of the original form image A ruled line separation and restoration means for selecting and outputting,
After the position adjustment by the position adjustment means, when the processing position for the original form image and the completed form image is included in the image area masked by the mask processing means, the pixel signal of the completed form image Character extraction means for selecting and outputting,
Image combining means for generating the character recognition image by combining the image output from the ruled line separation and restoration means and the image output from the character extraction means;
The form identifying apparatus according to claim 1, further comprising:
前記画像生成手段は、前記解像度変換手段による解像度変換が行われた後に、前記文字認識用画像を生成する処理を開始することを特徴とする請求項1乃至6のいずれかに記載の帳票識別装置。 When the resolution of the completed form image acquired by the image acquisition unit is different from the resolution of the original form image, the resolution of one of the completed form image and the original form image is converted to obtain the mutual resolution. And further comprising a resolution converting means for matching,
The form identification device according to claim 1, wherein the image generation unit starts a process of generating the character recognition image after the resolution conversion is performed by the resolution conversion unit. .
前記画像生成手段は、前記記入済帳票画像の解像度に一致する解像度の前記オリジナル帳票画像を選択して前記文字認識用画像を生成する処理を行うことを特徴とする請求項1乃至7のいずれかに記載の帳票識別装置。 The storage means stores a plurality of the original form images having different resolutions,
The said image generation means performs the process which selects the said original form image of the resolution which corresponds to the resolution of the said completed form image, and produces | generates the said image for character recognition. Form identification device described in 1.
前記帳票のオリジナル帳票画像を所定の記憶手段に記憶させるオリジナル画像登録手段、
前記帳票に文字が記載された記入済帳票画像を取得する画像取得手段、及び、
前記帳票に含まれる罫線及び罫線の近傍領域の画像を前記オリジナル帳票画像から抽出する共に、前記帳票に含まれる罫線及び罫線の近傍領域を除く画像を前記記入済帳票画像から抽出して文字認識用画像を生成する画像生成手段、
として機能させることを特徴とするプログラム。 A program for causing a computer to perform a form identification process for recognizing characters written on a form including ruled lines, the computer comprising:
Original image registration means for storing the original form image of the form in a predetermined storage means;
Image acquisition means for acquiring a completed form image in which characters are written in the form; and
An image of the ruled line included in the form and the area near the ruled line is extracted from the original form image, and an image excluding the ruled line included in the form and the area near the ruled line is extracted from the completed form image for character recognition. Image generation means for generating an image;
A program characterized by functioning as
前記オリジナル帳票画像に対する処理位置と、前記記入済帳票画像に対する処理位置とを一致させる位置調整手段、
前記位置調整手段による位置調整が行われた後、前記オリジナル帳票画像及び前記記入済帳票画像に対する処理位置が前記帳票に含まれる罫線の位置に一致するとき、前記オリジナル帳票画像の画素信号と前記記入済帳票画像の画素信号との論理和演算を行う罫線復元手段、
前記位置調整手段による位置調整が行われた後、前記オリジナル帳票画像及び前記記入済帳票画像に対する処理位置が前記帳票に含まれる罫線の近傍領域の位置に一致するとき、前記オリジナル帳票画像の画素信号と前記記入済帳票画像の画素信号との論理積演算を行う罫線分離手段、及び、
前記罫線復元手段から出力される画像と、前記罫線分離手段から出力される画像とを合成して前記文字認識用画像を生成する画像合成手段、
として機能することを特徴とする請求項9に記載のプログラム。 The image generating means includes
Position adjusting means for matching a processing position for the original form image and a processing position for the completed form image;
After the position adjustment by the position adjustment means, when the processing position for the original form image and the completed form image matches the position of the ruled line included in the form, the pixel signal of the original form image and the entry Ruled line restoration means for performing a logical OR operation with pixel signals of completed form images,
After the position adjustment by the position adjustment unit, when the processing position for the original form image and the completed form image coincides with the position of the area near the ruled line included in the form, the pixel signal of the original form image And ruled line separating means for performing a logical product operation of the pixel signal of the completed form image, and
Image combining means for generating the character recognition image by combining the image output from the ruled line restoring means and the image output from the ruled line separating means;
The program according to claim 9, which functions as:
前記オリジナル帳票画像の罫線及び罫線の近傍領域を除く画像領域を塗り潰してマスクするマスク処理手段、
前記マスク処理手段によってマスクされた前記オリジナル帳票画像に対する処理位置と、前記記入済帳票画像に対する処理位置とを一致させる位置調整手段、
前記位置調整手段による位置調整が行われた後、前記オリジナル帳票画像及び前記記入済帳票画像に対する処理位置が前記マスク処理手段によってマスクされた画像領域に含まれないとき、前記オリジナル帳票画像の画素信号を選択して出力する罫線分離復元手段、
前記位置調整手段による位置調整が行われた後、前記オリジナル帳票画像及び前記記入済帳票画像に対する処理位置が前記マスク処理手段によってマスクされた画像領域に含まれるとき、前記記入済帳票画像の画素信号を選択して出力する文字抽出手段、及び、
前記罫線分離復元手段から出力される画像と、前記文字抽出手段から出力される画像とを合成して前記文字認識用画像を生成する画像合成手段、
として機能することを特徴とする請求項9に記載のプログラム。 The image generating means includes
Mask processing means for painting and masking the image area excluding the ruled line of the original form image and the area near the ruled line;
Position adjusting means for matching the processing position for the original form image masked by the mask processing means with the processing position for the completed form image;
After the position adjustment by the position adjustment means, when the processing position for the original form image and the completed form image is not included in the image area masked by the mask processing means, the pixel signal of the original form image Ruled line separation restoration means to select and output,
After the position adjustment by the position adjustment means, when the processing position for the original form image and the completed form image is included in the image area masked by the mask processing means, the pixel signal of the completed form image Character extraction means for selecting and outputting, and
Image combining means for generating the character recognition image by combining the image output from the ruled line separation and restoration means and the image output from the character extraction means;
The program according to claim 9, which functions as:
前記画像取得手段によって取得される前記記入済帳票画像の解像度が前記オリジナル帳票画像の解像度と異なるとき、前記記入済帳票画像及び前記オリジナル帳票画像のいずれか一方の解像度を変換して互いの解像度を一致させる解像度変換手段として更に機能させ、
前記画像生成手段は、前記解像度変換手段による解像度変換が行われた後に、前記文字認識用画像を生成する処理を開始することを特徴とする請求項9乃至14のいずれかに記載のプログラム。 The computer,
When the resolution of the completed form image acquired by the image acquisition unit is different from the resolution of the original form image, the resolution of one of the completed form image and the original form image is converted to obtain the mutual resolution. Further function as a resolution conversion means to match,
15. The program according to claim 9, wherein the image generation unit starts processing to generate the character recognition image after the resolution conversion by the resolution conversion unit is performed.
前記画像生成手段は、前記記入済帳票画像の解像度に一致する解像度の前記オリジナル帳票画像を選択して前記文字認識用画像を生成する処理を行うことを特徴とする請求項9乃至15のいずれかに記載のプログラム。 The original image registration means stores a plurality of the original form images having different resolutions in the storage means,
The said image generation means performs the process which selects the said original form image of the resolution which corresponds to the resolution of the said completed form image, and produces | generates the said image for character recognition. The program described in.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015001314A JP6657561B2 (en) | 2015-01-07 | 2015-01-07 | Form identification device and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015001314A JP6657561B2 (en) | 2015-01-07 | 2015-01-07 | Form identification device and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2016126636A true JP2016126636A (en) | 2016-07-11 |
JP6657561B2 JP6657561B2 (en) | 2020-03-04 |
Family
ID=56359441
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015001314A Active JP6657561B2 (en) | 2015-01-07 | 2015-01-07 | Form identification device and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6657561B2 (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1027208A (en) * | 1996-07-10 | 1998-01-27 | N T T Data Tsushin Kk | Method and device for collating document |
JP2000082110A (en) * | 1998-07-02 | 2000-03-21 | Ricoh Co Ltd | Ruled line deletion device, character picture extraction device, ruled line deletion method, character picture extraction method and storage medium |
JP2001126010A (en) * | 1999-11-01 | 2001-05-11 | Ricoh Co Ltd | Document processor, document definition generation method and area extraction method and storage medium |
JP2001157019A (en) * | 1999-11-22 | 2001-06-08 | Sharp Corp | Reader and data processing system |
JP2007133907A (en) * | 2007-02-08 | 2007-05-31 | Ricoh Co Ltd | Document identification method and recording medium |
-
2015
- 2015-01-07 JP JP2015001314A patent/JP6657561B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1027208A (en) * | 1996-07-10 | 1998-01-27 | N T T Data Tsushin Kk | Method and device for collating document |
JP2000082110A (en) * | 1998-07-02 | 2000-03-21 | Ricoh Co Ltd | Ruled line deletion device, character picture extraction device, ruled line deletion method, character picture extraction method and storage medium |
JP2001126010A (en) * | 1999-11-01 | 2001-05-11 | Ricoh Co Ltd | Document processor, document definition generation method and area extraction method and storage medium |
JP2001157019A (en) * | 1999-11-22 | 2001-06-08 | Sharp Corp | Reader and data processing system |
JP2007133907A (en) * | 2007-02-08 | 2007-05-31 | Ricoh Co Ltd | Document identification method and recording medium |
Also Published As
Publication number | Publication date |
---|---|
JP6657561B2 (en) | 2020-03-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4189506B2 (en) | Apparatus, method and recording medium for image processing | |
JP4947136B2 (en) | Image processing apparatus, image processing method, and program | |
JP6840884B2 (en) | Image processing system and image processing method | |
US8768051B2 (en) | Image processing method, image processing apparatus, and computer-readable medium | |
EP3422690B1 (en) | Information processing apparatus, control method thereof, and program | |
US8553985B2 (en) | Image processing apparatus, image processing method and computer-readable medium | |
US8229214B2 (en) | Image processing apparatus and image processing method | |
US20130314444A1 (en) | Image data transmitting device, image data receiving device, image data transmitting system, image data transmitting method, image data receiving method, transmission image data, and computer product | |
KR102357562B1 (en) | Image forming apparatus capable of undergoing remote image diagnosis, control method therefor, and storage medium storing control program therefor | |
JP6657561B2 (en) | Form identification device and program | |
JP5819378B2 (en) | Image determination apparatus, image processing system, program, and recording medium | |
JP2007019673A (en) | Image processing apparatus, image compression method, image compression program, and data structure of compressed image | |
US9886648B2 (en) | Image processing device generating arranged image data representing arranged image in which images are arranged according to determined relative position | |
JP2008206073A (en) | Image processing apparatus, control method, program, and storage medium | |
KR101565926B1 (en) | Method for compensating image for low vision person and apparatus for the same | |
JP3058489B2 (en) | String extraction method | |
JP6055952B1 (en) | Image inspection apparatus, image inspection method, and program | |
JP6157234B2 (en) | Image processing apparatus, image processing method, and program | |
US20090323090A1 (en) | Image forming apparatus and image forming method | |
JP7003342B2 (en) | Video separator, program and video separation method | |
JP2006094237A (en) | Image processing device, image processing method and image processing program | |
WO2015049392A1 (en) | A method and system for improving the quality of colour images | |
JP6146220B2 (en) | Method, apparatus and system | |
JP2000148908A (en) | Method and device for processing document picture and recording medium | |
JP2011146031A (en) | Information processing apparatus, information processing method, computer program and recording medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20171215 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20181211 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20181218 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190205 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20190709 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190821 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20200107 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200120 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6657561 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |