JP7088661B2 - Paper form data conversion system, OCR engine learning image generator and image analyzer - Google Patents
Paper form data conversion system, OCR engine learning image generator and image analyzer Download PDFInfo
- Publication number
- JP7088661B2 JP7088661B2 JP2017209322A JP2017209322A JP7088661B2 JP 7088661 B2 JP7088661 B2 JP 7088661B2 JP 2017209322 A JP2017209322 A JP 2017209322A JP 2017209322 A JP2017209322 A JP 2017209322A JP 7088661 B2 JP7088661 B2 JP 7088661B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- character
- unit
- characters
- form data
- 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.)
- Active
Links
Images
Landscapes
- Character Input (AREA)
- Character Discrimination (AREA)
Description
本発明は、帳票をスキャンした対象画像から文字情報を抽出して出力する紙帳票データ化システム、画像から文字情報を抽出するOCRエンジンに画像からの文字情報の抽出を学習させるOCRエンジン学習用画像生成装置および対象画像から文字情報を抽出する画像分析装置に関する。 The present invention is a paper form data conversion system that extracts and outputs character information from a target image obtained by scanning a form, and an OCR engine learning image that causes an OCR engine that extracts character information from an image to learn to extract character information from an image. The present invention relates to a generator and an image analyzer that extracts character information from a target image.
企業において取り扱う帳票は、多岐にわたる。このような帳票には、たとえば、他社が発行した請求書や、従業員の健康診断の結果、などがある。これらの帳票の内容は、文字情報の電子データが入手できない場合も多い。 The forms handled by companies are diverse. Such forms include, for example, invoices issued by other companies and the results of employee health examinations. As for the contents of these forms, electronic data of character information is often not available.
社内で作成した、あるいは、外部から受領したこのような紙の帳票から、必要な情報を電子データとしてコンピュータに入力し、各種企業活動に使用する場合がある。コンピュータへの入力の際には、帳票の画像をスキャナーで読み取ったうえで、OCRによって文字情報に変換することもある。 From such paper forms created in-house or received from outside, necessary information may be input to a computer as electronic data and used for various corporate activities. When inputting to a computer, the image of the form may be read by a scanner and then converted into text information by OCR.
請求書などの帳票の画像からOCRによって文字情報を抽出する精度は、近年、向上している。しかし、抽出した文字情報に誤りがある場合には、人手で一つ一つ修正をしなければならない。このため、文書画像からの文字情報の抽出の更なる精度向上が望まれる。 In recent years, the accuracy of extracting character information by OCR from images of forms such as invoices has improved. However, if there is an error in the extracted character information, it must be manually corrected one by one. Therefore, it is desired to further improve the accuracy of extracting character information from the document image.
そこで、本発明は、請求書などの帳票から文字情報を抽出する精度を向上させることを目的とする。 Therefore, an object of the present invention is to improve the accuracy of extracting character information from a form such as an invoice.
上述の目的を達成するため、本発明は、帳票をスキャンした対象画像から文字情報を抽出して外部のデータベースに出力する紙帳票データ化システムにおいて、OCRエンジンを用いて前記対象画像から文字情報を抽出するOCR部と、前記OCR部が抽出した文字情報をその文字情報の前記対象画像上の位置に基づいて構造化した構造化データを生成する構造解析部と、前記構造化データと前記データベースの構造との対応関係を示すマッピングテーブルを用いて前記構造化データを前記データベースに入力するマッピング部と、を有することを特徴とする。 In order to achieve the above object, the present invention uses an OCR engine to obtain character information from the target image in a paper form data conversion system that extracts character information from the target image obtained by scanning the form and outputs it to an external database. The OCR unit to be extracted, the structural analysis unit that generates structured data in which the character information extracted by the OCR unit is structured based on the position of the character information on the target image, the structured data, and the database. It is characterized by having a mapping unit for inputting the structured data into the database using a mapping table showing a correspondence relationship with the structure.
また、本発明は、画像から文字情報を抽出するOCRエンジンに画像からの文字情報の抽出を学習させるOCRエンジン学習用画像生成装置において、特定のフォントの文字に前記学習用画像変換を施して学習用画像を生成する学習用画像生成器と、認識済み文字を含む第1画像とその認識済み文字を前記特定のフォントで表した第2画像との組を用いて第2画像を第1画像へ変換する学習用画像変換を学習用画像生成器に学習させる学習用画像生成学習部と、を有することを特徴とする。 Further, according to the present invention, in an image generation device for learning an OCR engine that causes an OCR engine that extracts character information from an image to learn the extraction of character information from an image, the present invention applies the learning image conversion to characters of a specific font for learning. A second image is converted to a first image by using a pair of a learning image generator that generates an image for use, a first image including recognized characters, and a second image in which the recognized characters are represented by the specific font. It is characterized by having a learning image generation learning unit that causes a learning image generator to learn the learning image conversion to be converted.
また、本発明は、対象画像から文字情報を抽出する画像分析装置において、特定のフォントの文字に前記学習用画像変換を施して学習用画像を生成する学習用画像生成器と、認識済み文字を含む第1画像とその認識済み文字を前記特定のフォントで表した第2画像との組を用いて第2画像を第1画像へ変換する学習用画像変換を学習用画像生成器に学習させる学習用画像生成学習部と、前記学習用画像生成器が生成した前記学習用画像とその学習用画像に対応する文字との組を用いて画像から文字の抽出を学習させる文字認識学習部と、を備えたOCRエンジン学習装置によって学習したOCRエンジンと、前記OCRエンジンを用いて前記対象画像から文字情報を抽出するOCR部と、を有することを特徴とする。 Further, according to the present invention, in an image analyzer that extracts character information from a target image, a learning image generator that generates a learning image by performing the learning image conversion on characters of a specific font and recognized characters are used. Learning to make a learning image generator learn image conversion for learning to convert a second image to a first image using a pair of a first image including the first image and a second image expressing the recognized characters in the specific font. The image generation learning unit for learning and the character recognition learning unit for learning the extraction of characters from the image using the pair of the learning image generated by the learning image generator and the characters corresponding to the learning image. It is characterized by having an OCR engine learned by an OCR engine learning device provided, and an OCR unit that extracts character information from the target image using the OCR engine.
また、本発明は、対象画像から文字情報を抽出する画像分析装置において、文字および文字以外の画像が混在した第1処理前画像とその第1処理前画像の文字以外の画像を除去した第1処理後画像との組を用いて文字および文字以外の画像が混在した画像から文字以外の画像を除去する第1変換を第1機械学習器に学習させる第1学習装置と、前記第1変換を含む前処理を前記対象画像に施す前処理部と、前記対象画像から文字情報を抽出するOCR部と、を有することを特徴とする。 Further, according to the present invention, in an image analyzer that extracts character information from a target image, a first pre-process image in which characters and non-character images are mixed and an image other than the characters in the first pre-process image are removed. The first learning device that causes the first machine learner to learn the first conversion for removing the non-character image from the image in which the character and the non-character image are mixed by using the pair with the processed image, and the first conversion. It is characterized by having a preprocessing unit that applies preprocessing including the target image to the target image, and an OCR unit that extracts character information from the target image.
また、本発明は、対象画像から文字情報を抽出する画像分析装置において、罫線で表組された文字群を含む第2処理後画像とその第2処理後画像の罫線を除去した第2処理前画像との組を用いて罫線を使わないで表組された文字群の画像を罫線で表組された文字群の画像へ変換する第2変換を第2機械学習器に学習させる第2学習装置と、前記第2変換を含む前処理を前記対象画像に施す前処理部と、前記対象画像から文字情報を抽出するOCR部と、を有することを特徴とする。 Further, according to the present invention, in an image analyzer that extracts character information from a target image, a second processed image including a character group represented by a ruled line and a pre-processed image in which the ruled line of the second processed image is removed. A second learning device that causes a second machine learner to learn a second conversion that converts an image of a character group that is represented by a set with an image without using a ruled line into an image of a character group that is represented by a ruled line. It is characterized by having a preprocessing unit that performs preprocessing including the second conversion on the target image, and an OCR unit that extracts character information from the target image.
また、本発明は、対象画像から文字情報を抽出する画像分析装置において、文字群を含む第3処理前画像とその第3処理前画像に含まれるそれぞれの文字に互いに重ならない枠を形成した第3処理後画像との組を用いて文字群を含む画像に含まれるそれぞれの文字に互いに重ならない枠を形成する第3変換を第3機械学習器に学習させる第3学習装置と、前記第3変換を含む前処理を前記対象画像に施す前処理部と、前記対象画像から文字情報を抽出するOCR部と、を有することを特徴とする。 Further, in the image analyzer for extracting character information from a target image, the present invention forms a frame that does not overlap with each other in a third pre-process image including a character group and each character included in the third pre-process image. A third learning device that causes a third machine learner to learn a third conversion that forms a frame that does not overlap each other in each character included in an image including a character group by using a set with the image after processing, and the third. It is characterized by having a preprocessing unit that performs preprocessing including conversion on the target image, and an OCR unit that extracts character information from the target image.
本発明によれば、請求書などの帳票から文字情報を抽出する精度を向上させることができる。 According to the present invention, it is possible to improve the accuracy of extracting character information from a form such as an invoice.
本発明に係る画像分析装置の一実施の形態を、図面を参照して説明する。なお、この実施の形態は単なる例示であり、本発明はこれに限定されない。同一または類似の構成には同一の符号を付し、重複する説明は省略する。 An embodiment of the image analyzer according to the present invention will be described with reference to the drawings. It should be noted that this embodiment is merely an example, and the present invention is not limited thereto. The same or similar configurations are designated by the same reference numerals, and duplicate description will be omitted.
図1は、本発明に係る紙帳票データ化システムの一実施の形態におけるブロック図である。 FIG. 1 is a block diagram of an embodiment of a paper form data conversion system according to the present invention.
本実施の形態の紙帳票データ化システム10は、たとえば紙に印刷された帳票などの非定型文書から文字情報を抽出して、文書上の構造に応じて構造化した文字情報を出力する画像分析装置である。また、紙帳票データ化システム10は、構造化した文字情報をデータベースに入力する。
The paper form
本実施の形態の紙帳票データ化システム10は、画像記憶部20と画像解析前処理部21と前処理済画像記憶部22とOCR部23と画像解析後処理部24と構造解析部25とマッピング部26と抽出文字列記憶部29と辞書30とOCRエンジン学習装置70とスキャナー12とディスプレイ13とキーボード14とマウス15とを有している。紙帳票データ化システム10は、たとえば1台のコンピュータ上に構成される。紙帳票データ化システム10の一部、たとえば画像記憶部20、画像解析前処理部21、前処理済画像記憶部22、OCR部23、画像解析後処理部24、構造解析部25、マッピング部26、抽出文字列記憶部29、および、辞書30の一部または全部は、ネットワークで互いに接続された複数のコンピュータ上に分散して配置されていてもよい。画像記憶部20と画像解析前処理部21と前処理済画像記憶部22とOCR部23と画像解析後処理部24と構造解析部25とマッピング部26と抽出文字列記憶部29と辞書30とOCRエンジン学習装置70とは、コンピュータにそれぞれの機能を持たせるプログラムによって実現される。
The paper form
画像解析前処理部21は、第1学習装置51と第2学習装置52と第3学習装置53とを有している。第1学習装置51は、第1機械学習器61を含む。第2学習装置52は、第2機械学習器62を含む。第3学習装置53は、第3機械学習器63を含む。第1機械学習器61、第2機械学習器62、および、第3機械学習器63は、いずれもGAN(Generative Adversarial Networks:敵対的生成ネットワーク)を含む機械学習器である。
The image
OCRエンジン学習装置70は、学習用画像生成学習部71と学習用画像生成器72と文字認識学習部73とを有している。
The OCR
図2は、本実施の形態の帳票データ電子化システムの分析対象の帳票の平面図である。 FIG. 2 is a plan view of a form to be analyzed by the form data digitization system of the present embodiment.
本実施の形態の紙帳票データ化システム10は、たとえば紙に印刷された一月の請求額をまとめた帳票の画像(文書画像90)を分析する。また、紙に印刷されたものだけではなく、スマートフォンやコンピュータのディスプレイに表示された内容を分析することもできる。
The paper form
次に、本実施の形態の紙帳票データ化システム10を用いた文書画像90の分析処理の流れを説明する。
Next, the flow of the analysis process of the
図3は、本実施の形態の画像分析装置の分析の流れを示すフローチャートである。 FIG. 3 is a flowchart showing the flow of analysis of the image analyzer of the present embodiment.
文書画像90は、たとえばスキャナー12でスキャンされて紙帳票データ化システム10の画像記憶部20に記憶される(S1)。スキャナー12の代わりに、スマートフォンなどのカメラで撮像してもよい。カメラで撮像する場合には、画像に台形補正や水平補正を施すなどしてもよい。文書画像90は、たとえばグレースケールに変換される。
The
次に、画像解析前処理部21は、画像記憶部20に記憶された文書画像90に対して前処理を施す(S2)。
Next, the image
文字以外にハッチングや網掛けなどが含まれる画像から文字を抽出すると、抽出精度が低くなる傾向にある。そこで、文字の抽出の前に、画像解析前処理部21は、対象画像から文字以外の画像を除去する。つまり、画像解析前処理部21は、ある画像中の文字以外の部分を除去、すなわち、たとえば白などの紙面の色に変更する。
Extracting characters from an image that includes hatching or shading in addition to the characters tends to reduce the extraction accuracy. Therefore, before extracting the characters, the image
図4は、本実施の形態における前処理済画像の平面図である。 FIG. 4 is a plan view of the preprocessed image in the present embodiment.
画像解析前処理部21は、事前に、図2に示すようなハッチングや網掛けなどが含まれる第1処理前画像(文書画像90)から、図4に示すようなハッチングや網掛けなどの文字以外の部分を除去した第1処理後画像54を生成する第1変換を学習している。文字以外の部分を除去した第1処理後画像54は、画像レタッチソフトウェアなどを用いて、たとえば手動で、文字以外が含まれる文書画像90から文字以外の部分を除去することにより生成することができる。このようなハッチングや網掛けなどが含まれる文書画像90とハッチングや網掛けなどの文字以外の部分を除去した第1処理後画像54との組を複数作成し、第1学習装置51は、これらの組を用いて文字および文字以外の画像が混在した画像から文字以外の画像を除去する第1変換を第1機械学習器61に学習させる。画像解析前処理部21は、第1機械学習器61を用いて文書画像90に第1変換を施すことにより、対象画像から文字以外の画像を除去することができるようになる。
The image
このような第1機械学習器61を用いることにより、文書画像90から網掛けなどのノイズを除去することができる。網掛けやハッチング以外でも、文字認識の精度を低下させるノイズがわかっている場合には、そのようなノイズを除去する画像変換を第1機械学習器61に学習させることにより、文書画像90からノイズを除去することができる。つまり、第1機械学習器61を用いた画像解析前処理部21は、人工知能を用いたノイズ除去エンジン(AI-ノイズ除去エンジン)として機能している。
By using such a first
図5は、本実施の形態における罫線を使わないで表組された文字群の平面図の例である。図6は、本実施の形態における罫線で表組された文字群の平面図の例である。 FIG. 5 is an example of a plan view of a character group arranged in a table without using a ruled line in the present embodiment. FIG. 6 is an example of a plan view of a character group represented by a ruled line in the present embodiment.
また、画像解析前処理部21は、事前に、図5に示すような罫線を使わないで表組された文字群の画像を、図6に示すような罫線で表組された文字組された文字群の画像へ変換する第2変換を学習している。図6に示すような罫線で表組された文字群を含む第2処理後画像56は、画像レタッチソフトウェアなどを用いて、たとえば手動で、図5に示すような第2処理前画像55に罫線を付加することによって生成することができる。あるいは、画像レタッチソフトウェアなどを用いて、たとえば手動で、第2処理後画像56から罫線を除去することによって第2処理前画像55を生成することもできる。第2学習装置52は、第2処理前画像55から、第2処理後画像56を生成する第2変換を第2機械学習器62に学習させる。罫線を使わないで表組された文字群の第2処理前画像55と罫線で表組された第2処理後画像56との組を複数作成し、第2学習装置52は、これらの組を用いて、罫線を使わないで表組された文字群の画像を罫線を用いて表組した画像へ変換する第2変換を第2機械学習器62に学習させる。画像解析前処理部21は、第2機械学習器62を用いて文書画像90に第2変換を施すことにより、対象画像の罫線を用いない表組を罫線を用いた表組の画像へ変換することができるようになる。ここで、表組に用いる罫線は、文書画像90中の文字の色とは異なる色(たとえば青)であることが好ましい。
Further, the image
このような第2機械学習器62を用いることにより、非定型の文書に含まれる表組部分を罫線がない場合であっても、表組としてとらえることができる。その結果、文書の構造化が容易になる。
By using such a second
図7は、本実施の形態における文字群の平面図の例である。図8は、本実施の形態における1文字ずつ枠で囲まれた平面図の例である。 FIG. 7 is an example of a plan view of a character group in the present embodiment. FIG. 8 is an example of a plan view surrounded by a frame character by character in the present embodiment.
また、画像解析前処理部21は、事前に、図7に示すような文字群の画像(第3処理前画像57)を、図8に示すような1文字ずつが互いに重ならない枠で囲まれた画像(第3処理後画像58)へ変換する第3変換を学習している。図8に示すような、画像中の文字群のそれぞの文字が互いに重ならない枠で囲まれた第3処理後画像58は、画像レタッチソフトウェアなどを用いて、たとえば手動で、図7に示すような第3処理前画像57に枠を付加することによって生成することができる。第3学習装置53は、第3処理前画像57から、第3処理後画像58を生成する第3変換を第3機械学習器63に学習させる。文字群を含む第3処理前画像57とその文字群のそれぞれの文字を枠で囲んだ第3処理後画像58との組を複数作成し、第3学習装置53は、これらの組を用いて、文字群を含む画像をそれぞれの文字を枠で囲んだ画像へ変換する第3変換を第3機械学習器63に学習させる。画像解析前処理部21は、第3機械学習器63を用いて文書画像90に第3変換を施すことにより、対象画像に含まれるそれぞれの文字を枠で囲んだ画像へ変換することができるようになる。ここで、文字を囲む枠は、文書画像90中の文字の色とは異なる色(たとえば赤)であることが好ましい。
Further, the image
このようにして画像解析前処理部21は、画像記憶部20に記憶された文書画像90に前処理を施す。文書画像90に第1変換、第2変換および第3変換を施した前処理済画像は、前処理済画像記憶部22に記憶される。第1変換、第2変換および第3変換は、たとえばこの順番に行われる。また、白抜き文字など、他の部分と文字と地の色が逆になっている反転文字が形成されている領域は、色を反転する前処理を施してもよい。第2変換および第3変換で付加される罫線や枠は文書画像90とは別のレイヤーに配置してもよい。画像ファイルのフォーマットが多層構造を持てる場合には、実際の文書画像90以外の層(レイヤー)を作成し罫線や枠を配置する。画像ファイルのフォーマットが多層構造を持てない場合には、実際の文書画像90以外の層(レイヤー)とは別の画像ファイルを作成し罫線や枠を配置する。
In this way, the image
次に、OCR部23は、前処理済画像93を画像処理して、文字情報を抽出する(S3)。OCR部23は、OCR(光学式文字認識:Optical Character Recognition)エンジンを用いる。OCRエンジンは、学習によって精度が向上する機械学習器を用いる。OCRエンジンとしては、たとえば畳み込みニューラルネットワーク(Convolutional Neural Network:CNN)を少なくとも一部に含むものを用いる。OCRエンジンは、画像を文字に変換する対応関係を用いて対象画像から文字情報を抽出する。画像解析前処理部21が文字以外の部分を除去しておくことにより文字認識の精度が向上する。OCRエンジンには、以下の方法で文字認識を学習させる。OCRエンジンの学習は、OCRエンジン学習装置70が行う。
Next, the
まず、特定の文字として正しく認識された画像を複数用意する。次に、その特定の文字を特定のフォントを用いて表現した画像を形成する。 First, prepare a plurality of images that are correctly recognized as specific characters. Next, an image in which the specific character is expressed using a specific font is formed.
図9は、本実施の形態における特定の文字として正しく認識された画像とその文字を特定のフォントを用いて表現した画像である。 FIG. 9 is an image correctly recognized as a specific character in the present embodiment and an image expressing the character using a specific font.
図9において、特定の文字として正しく認識された画像(第1画像)とは右側の画像であり、その文字を特定のフォントを用いて表現した画像(第2画像)とは左側の画像である。 In FIG. 9, the image correctly recognized as a specific character (first image) is the image on the right side, and the image expressing the character using a specific font (second image) is the image on the left side. ..
学習用画像生成学習部71は、特定の文字を特定のフォントを用いて表現した画像(第2画像)から、その特定の文字を認識した元の画像(第1画像)への変換(学習用画像変換)を学習用画像生成器72に学習させる。学習用画像生成器72は、特定のフォントに含まれる一部またはすべての文字の画像に学習用画像変換を施して学習用画像を生成する。これにより、特定の文字として正しく認識された画像と同じような特徴、たとえば滲み方など、を有する学習用画像を生成することができる。
Image generation for learning The
図10は、本実施の形態における学習用画像である。 FIG. 10 is a learning image in the present embodiment.
図10において、左側は特定のフォントで表現した文字の画像であり、右側は学習用画像変換を用いて左側の画像を変換した画像である。 In FIG. 10, the left side is an image of characters expressed in a specific font, and the right side is an image obtained by converting the image on the left side using a learning image conversion.
このように学習用画像変換と、特定のフォントに含まれる文字画像とを用いることにより、画像データが存在しない文字についても、学習用のデータ(画像)を生成することができる。文字認識学習部73は、この学習用のデータを用いて、画像を文字に変換する対応関係をさらにOCRエンジンに学習させることにより、文字認識の精度が向上する。
By using the learning image conversion and the character image included in the specific font in this way, it is possible to generate learning data (image) even for characters for which no image data exists. The character
OCR部23による文字抽出の際、第2機械学習器62によって付加された罫線、および、第3機械学習器63によって付加された枠は、画像中の文字と異なる色としておくことにより、文字認識の精度を低下させるおそれは小さい。さらに、第3機械学習器63がそれぞれの文字に枠を付加していることにより、隣り合う文字の一部または全部が一つの文字として認識される可能性が極めて低下する。このため文字認識の精度が向上する。
When the characters are extracted by the
なお、罫線および枠が文字認識の精度を低下させる場合などには、特定の色を削除することなどによって罫線および枠を削除して文字認識してもよい。このとき、罫線および枠で区切られた領域を仮想的に一つのブロックとして文字認識することにより、文字認識の精度を向上させることができる。 If the ruled line and the frame reduce the accuracy of character recognition, the ruled line and the frame may be deleted and the character may be recognized by deleting a specific color or the like. At this time, the accuracy of character recognition can be improved by virtually recognizing the area delimited by the ruled line and the frame as one block.
第2機械学習器62を用いることにより、非定型の文書に含まれる表組部分を罫線がない場合であっても、表組としてとらえることができる。その結果、文書の構造化が容易になる。つまり、第2機械学習器62を用いた画像解析前処理部21およびOCR部23は、人工知能を用いた自然言語解析・構造化エンジンとして機能している。
By using the second
第3機械学習器63を用いることにより、文書画像90中に含まれる文字を1文字ずつ把握することができるため、文字認識の精度が向上する。つまり、第3機械学習器63を用いた画像解析前処理部21およびOCRエンジンは、人工知能を用いたOCR文字認識エンジン(AI-OCR文字認識エンジン)として機能している。
By using the third
OCR部23が抽出した文字情報は、その文字情報の文書画像90上の位置とともに、抽出文字列記憶部29に記憶される。
The character information extracted by the
次に、画像解析後処理部24は、抽出した文字情報に対して後処理を施す(S4)。後処理では、たとえば抽出した文字情報の認識の正誤を辞書30を用いてチェックする。
Next, the image
図11は、本実施の形態における文書画像の一部分の例である。 FIG. 11 is an example of a part of a document image in the present embodiment.
たとえば図11に示される画像をOCRした結果、「入院拾付金日額」と認識した場合について考える。「入院拾付金日額」と同じ7文字の単語を辞書30から抽出し、それぞれと排他的論理和(XOR)をとる。より具体的には、「入院拾付金日額」のそれぞれの文字を2進数で表したものの列と、辞書30に含まれる同じ長さの単語のそれぞれの文字を2進数で表したものの列とのXORを計算する。このXORの計算結果が7つすべてが0の列となれば、抽出した文字列が辞書30に含まれていることとなる。
For example, consider a case where the image shown in FIG. 11 is recognized as "daily hospitalization fee" as a result of OCR. The same 7-letter words as the "daily amount of hospitalization fee" are extracted from the
一方、たとえば辞書30に含まれる7文字の単語として「成人病入院特約」が存在した場合、「入院拾付金日額」とXORをとると、計算結果は7つすべて1の列となる。このように、XORの計算結果に1が含まれている場合には、抽出した文字列は辞書30に含まれていないことになる。
On the other hand, for example, when "adult illness hospitalization special contract" exists as a 7-character word included in the
XORの計算結果がすべて0の列の単語が辞書30に現れるまで、同じ長さの文字列についてXORの計算を繰り返す。XORの計算結果がすべて0の列の単語が辞書30に存在する場合には、抽出した文字列は正しいと判定する。XORの計算結果がすべて0の列の単語が辞書30に存在しない場合には、抽出した文字列は誤っている可能性があると判定する。
The XOR calculation is repeated for the character strings of the same length until the words in the column whose XOR calculation result is all 0 appear in the
抽出した文字列が誤っている可能性があると判定し、かつ、XORの計算結果に1つだけ1が存在する単語がある場合には、その単語と1文字だけ誤った画像認識をした可能性が高い。そこで、その単語を正しいものとして抽出した文字列を修正する。 If it is determined that the extracted character string may be incorrect and there is a word in which only one 1 exists in the XOR calculation result, it is possible that the word and only one character were incorrectly recognized as an image. Highly sex. Therefore, the character string extracted with the word as correct is corrected.
このようにして、文字情報の認識精度が向上する。ここで、単語の長さが短い場合には、1文字だけ異なる単語が複数存在する可能性が高いので、正誤の判定が困難である。そこで、たとえば単語の長さとして5文字以上のものだけについてチェックをするようにしてもよい。 In this way, the recognition accuracy of the character information is improved. Here, when the length of the word is short, there is a high possibility that there are a plurality of words that differ by only one character, so that it is difficult to determine the correctness. Therefore, for example, a check may be made only for words having a length of 5 characters or more.
また、後処理において、抽出した文字情報の形態素解析を行ってもよい。形態素解析によって、抽出した文字情報に含まれる文字列の品詞を分析することができる。分析した結果は、文字列とともに記憶しておく。品詞だけではなく、固有名詞に該当するか否か、日付に該当するか否か、数量に該当するか否かなどを分析してもよい。 Further, in the post-processing, the morphological analysis of the extracted character information may be performed. By morphological analysis, it is possible to analyze the part of speech of the character string included in the extracted character information. The analysis result is stored together with the character string. Not only the part of speech, but also whether or not it corresponds to a proper noun, whether or not it corresponds to a date, whether or not it corresponds to a quantity, and the like may be analyzed.
次に、構造解析部25は、OCR部23が抽出し、必要に応じて画像解析後処理部24が修正した文字情報を構造化する(S5)。ここで構造化とは、文字情報を一群の情報ごとにまとめ、さらにそれらの情報の階層関係を特定し、表現することである。たとえば、構造化された文字情報には、最上位の階層に帳票のタイトルがあり、その下層に文書作成者、文書作成日、および、メインの内容がある。それぞれの階層の項目は、複数の階層を含んでいてもよい。たとえば帳票のタイトルが請求書である場合、メインの内容は、請求項目と、合計が含まれていて、それぞれの請求項目には、品番、単価、数量、請求額が含まれている。
Next, the
階層化に際しては、キーとバリューとを特定してもよい。項目名となりうる文字列を記憶したデータベースに対象とする文字列が含まれるか否かを検索することにより、キーを特定することができる。キーとバリューの紐づけには、それぞれの文字列の相対的な位置関係を用いる。それぞれの文字列に対して、その文字列の右側(right)、左側(left)、上(above)、および、下(below)に位置する文字列をネイバー(neighbor)として記憶する。ネイバーの文字列のいずれかをバリューとする。 When layering, the key and value may be specified. The key can be specified by searching whether or not the target character string is included in the database that stores the character string that can be the item name. The relative positional relationship of each character string is used for associating the key and the value. For each character string, the character strings located on the right side (right), left side (left), upper (above), and lower (below) of the character string are stored as neighbors (neighbor). The value is one of the character strings of the neighbor.
また、項目名が記載されていないバリューの候補リストを、「商品名」などの記載されない項目名とともに、予め記憶しておいてもよい。抽出した文字情報が、この候補リストの中の一つに該当する場合には、その抽出した文字情報をバリューとし、対応する項目名をキーとして記憶してもよい。 Further, the value candidate list in which the item name is not described may be stored in advance together with the item name in which the item name is not described, such as "product name". When the extracted character information corresponds to one of the candidate lists, the extracted character information may be used as a value and the corresponding item name may be stored as a key.
後処理(S4)において形態素解析などを行っていた場合には、品詞などの文字列の特徴を紐づけに用いてもよい。たとえば、特定のキーに対するバリューとしては数量しか対応しないなどのルールを用いて紐づけすることもできる。 When morphological analysis or the like is performed in the post-processing (S4), the characteristics of the character string such as the part of speech may be used for the association. For example, it is possible to link using a rule that only the quantity corresponds to the value for a specific key.
キーとバリューとは、単純な一対一の関係でなくてもよい。たとえば、一つのキーに対して複数のバリューを組み合わせてもよい。キーは、メインキーにサブキーを従属させたような階層構造(ツリー構造)になっていてもよい。この場合、階層は3以上であってもよい。 Keys and values do not have to be a simple one-to-one relationship. For example, a plurality of values may be combined for one key. The key may have a hierarchical structure (tree structure) in which a subkey is subordinated to the main key. In this case, the number of layers may be 3 or more.
第2機械学習器62が付加した罫線は、文書の構造化に用いることができる。したがって、罫線が付加されていない表組の文書であっても、抽出した文字情報を容易に構造化することができる。
The ruled line added by the second
次に、マッピング部26は、元の文書画像90上に抽出した文字列をデータベースにマッピングする(S6)。
Next, the
図12は、本実施の形態の画像分析装置におけるマッピング画面である。 FIG. 12 is a mapping screen in the image analyzer of the present embodiment.
マッピング画面40は、ディスプレイ13に表示される。マッピング画面40は、画像表示部41と対応表示部42とを備えている。画像表示部41には、文書画像90が表示される。対応表示部42には、構造化された文字情報が表示される。
The
抽出した文字列は、構造化された文字情報(構造化データ)として表示される。マッピング部26は、さらに、構造解析部25が組み合わせたキーおよびバリューの対応関係の確認をユーザーに促し、誤りがある場合には修正できるようにする。
The extracted character string is displayed as structured character information (structured data). The
具体的には、まず、たとえば文書画像90および抽出した文字情報をディスプレイ13の画像表示部41に表示する。抽出した文字情報は、たとえば文書画像90の左側の対応表示部42に、構造化された文字情報として表示される。
Specifically, first, for example, the
また、文字情報を抽出した部分に色付けをする。色付けされた部分にマウスの操作などでポインターを移動させてクリックした場合には、キーおよびバリューの組が表示された部分においてその部分に該当するキーまたはバリューの文字情報が他と区別できるように、たとえば色を変化させることにより表示される。この際、文書画像90上では、選択された部分に対応するキーまたはバリューと紐づけられている文字情報が読み取られた部分が他と区別できるように、たとえば色を変化させることにより表示される。ユーザーは、この対応関係に間違いがない場合には、放置し、あるいは、間違いがないことを入力する。この対応関係に間違いがある場合には、キーおよびバリューの組が表示された部分において、キーまたはバリューの値を修正する。
In addition, the part where the character information is extracted is colored. When the pointer is moved to the colored part by operating the mouse and clicked, the character information of the key or value corresponding to that part can be distinguished from others in the part where the key and value pair is displayed. , For example, displayed by changing the color. At this time, on the
修正に際しては、文字認識の誤りであれば、キーボードなどから入力する。対応付け(紐づけ)に誤りがある場合には、対応するキーまたはバリューが記されている部分を文書画像90上でクリックするなどして、対応関係を修正してもよい。
When correcting, if there is an error in character recognition, input it from the keyboard or the like. If there is an error in the correspondence (association), the correspondence may be corrected by clicking on the part where the corresponding key or value is written on the
文字認識の結果は、たとえば、複数の候補と、それぞれの候補の確からしさとして得られる。つまり、ある文字画像を認識した結果、候補1の文字の確からしさは90%、候補2の文字の確からしさは10%などと表現される。文書画像90および抽出した文字情報をディスプレイ13の画像表示部41に表示する際、文字認識の確からしさで文字を色分けしてもよい。たとえば、確からしさが90%などの所定の閾値未満であれば、赤い文字で表すなどとしてもよい。このように表示することにより、文字認識の確認者(ヴェリファイヤ)が文字認識をチェックしやすくなる。色分けは、文字単位で行ってもよいし、抽出した単語ごとでもよい。あるいは、文書全体として、所定の閾値未満の確からしさの文字の割合に応じて、色分けしてもよい。この場合、文字認識の確からしさが低い文字の割合が多い文書では、このシステムによる文字認識の結果を用いずに、作業者が手入力した方が早い場合もある。
The result of character recognition is obtained, for example, as a plurality of candidates and the certainty of each candidate. That is, as a result of recognizing a certain character image, the certainty of the character of the
さらに、マッピング部26は、必要に応じて修正された構造化データをマッピングテーブルを用いて、データベースに入力する。ここで、マッピングテーブルとは、文書の論理構造とデータベースの構造との対応を表すテーブル(表)である。文書の論理構造は、構造化データの構造として表現されているため、マッピングテーブルを用いることにより、容易に文字情報をデータベースに流し込むことができる。
Further, the
このように、本実施の形態では、文字認識の結果をユーザーが修正することにより、誤りを低減することができる。 As described above, in the present embodiment, the error can be reduced by the user correcting the result of character recognition.
本実施の形態の帳票データ電子化システムは、OCRエンジンおよび前処理部にディープラーニング可能な機械学習器を備えている。このため、学習を進めることにより、文字認識の精度を向上させることができる。 The form data digitization system of the present embodiment includes an OCR engine and a machine learning device capable of deep learning in the preprocessing unit. Therefore, the accuracy of character recognition can be improved by advancing the learning.
さらに、ユーザーによる修正を学習することにより、文字認識の精度およびマッピング(紐づけ)の精度を向上させることができる。たとえば、特定の文字を他の文字と誤認識していて、それをユーザーが修正する回数が増えていくことにより、その特定の文字を正しく認識させるようにすることができる。また、マッピングが誤っていた場合は、ユーザーが紐づけを修正することにより、正しくキーとバリューを組み合わせられるようになっていく。 Further, by learning the correction by the user, the accuracy of character recognition and the accuracy of mapping (association) can be improved. For example, if a specific character is mistakenly recognized as another character and the user corrects it more often, the specific character can be correctly recognized. In addition, if the mapping is incorrect, the user can correct the key and value by correcting the association.
このように本実施の形態の紙帳票データ化システム10は、文字情報の文書画像90中の位置に基づいてその文字情報と対をなす文字情報とを紐づけする構造解析部25を有している。このため、分析対象画像である文書画像90で表される文書の構造、すなわち、項目名とそれに対応する値との対応関係を把握することができる。その結果、項目名とそれに対応する値との対応関係に基づいて、文字情報の認識精度を向上させることができる。
As described above, the paper form
さらに、本実施の形態において、マッピング部26は、構造解析部25が紐づけした文字情報の組を文書画像90と対応付けて表示し、文字情報の組の組み合わせに誤りがある場合にユーザーによる修正の入力を受け付ける。このため、項目名とそれに対応する値との対応関係をより正確に把握することができる。さらに、ユーザーによる修正の履歴を学習していくことにより、項目名とそれに対応する値との対応関係の把握の精度を向上させることができる。
Further, in the present embodiment, the
10…紙帳票データ化システム、12…スキャナー、13…ディスプレイ、14…キーボード、15…マウス、20…画像記憶部、21…画像解析前処理部、22…前処理済画像記憶部、23…OCR部、24…画像解析後処理部、25…構造解析部、26…マッピング部、29…抽出文字列記憶部、30…辞書、40…マッピング画面、41…画像表示部、42…対応表示部、51…第1学習装置、52…第2学習装置、53…第3学習装置、54…第1処理後画像、55…第2処理前画像、56…第2処理後画像、57…第3処理前画像、58…第3処理後画像、61…第1機械学習器、62…第2機械学習器、63…第3機械学習器、70…OCRエンジン学習装置、71…学習用画像生成学習部、72…学習用画像生成器、73…文字認識学習部、90…文書画像、93…前処理済画像
10 ... Paper form data conversion system, 12 ... Scanner, 13 ... Display, 14 ... Keyboard, 15 ... Mouse, 20 ... Image storage unit, 21 ... Image analysis preprocessing unit, 22 ... Preprocessed image storage unit, 23 ... OCR Unit, 24 ... Image analysis post-processing unit, 25 ... Structural analysis unit, 26 ... Mapping unit, 29 ... Extracted character string storage unit, 30 ... Dictionary, 40 ... Mapping screen, 41 ... Image display unit, 42 ... Corresponding display unit, 51 ... 1st learning device, 52 ... 2nd learning device, 53 ... 3rd learning device, 54 ... 1st processed image, 55 ... 2nd pre-processed image, 56 ... 2nd processed image, 57 ... 3rd processing Pre-image, 58 ... 3rd processed image, 61 ... 1st machine learning device, 62 ... 2nd machine learning device, 63 ... 3rd machine learning device, 70 ... OCR engine learning device, 71 ... Image generation learning unit for learning , 72 ... Image generator for learning, 73 ... Character recognition learning unit, 90 ... Document image, 93 ... Preprocessed image
Claims (5)
OCRエンジンを用いて前記対象画像から文字情報を抽出するOCR部と、
前記OCR部が抽出した文字情報をその文字情報の前記対象画像上の位置に基づいて構造化した構造化データを生成する構造解析部と、
前記構造化データと前記データベースの構造との対応関係を示すマッピングテーブルを用いて前記構造化データを前記データベースに入力するマッピング部と、
を有することを特徴とする紙帳票データ化システム。 In a paper form data conversion system that extracts character information from a scanned target image and outputs it to an external database.
An OCR unit that extracts character information from the target image using the OCR engine,
A structural analysis unit that generates structured data in which the character information extracted by the OCR unit is structured based on the position of the character information on the target image.
A mapping unit that inputs the structured data to the database using a mapping table showing the correspondence between the structured data and the structure of the database, and
A paper form data conversion system characterized by having.
を有し、
前記前処理は前記第1変換を含む、
ことを特徴とする請求項1に記載の紙帳票データ化システム。 An image in which characters and non-character images are mixed using a pair of a first pre-process image in which characters and non-character images are mixed and a first post-process image in which images other than characters in the first pre-process image are removed. A first learning device that causes a first machine learning device to learn a first conversion that removes images other than characters from
Have,
The pretreatment includes the first conversion.
The paper form data conversion system according to claim 1, characterized in that.
を有し、
前記前処理は前記第2変換を含む、
ことを特徴とする請求項1または請求項2に記載の帳票データ電子化システム。 A character group that is tabulated without using a ruled line using a set of a second post-processed image that includes a character group that is tabulated by a ruled line and a second pre-processed image that has the ruled line of the second post-processed image removed. A second learning device that causes a second machine learner to learn a second conversion that converts an image into an image of a character group represented by ruled lines.
Have,
The pretreatment comprises the second transformation.
The form data digitization system according to claim 1 or 2, characterized in that.
を有し、
前記前処理は前記第3変換を含む、
ことを特徴とする請求項1ないし請求項3のいずれか1項に記載の紙帳票データ化システム。 Each of the images including the character group is included in the image including the character group by using the pair of the third pre-process image including the character group and the third post-process image in which the frames not overlapping each other are formed in the respective characters included in the third pre-process image. A third learning device that causes a third machine learning device to learn a third transformation that forms a frame that does not overlap with each other.
Have,
The pretreatment includes the third transformation.
The paper form data conversion system according to any one of claims 1 to 3, wherein the paper form data conversion system is characterized.
前記単語のそれぞれの文字を2進数で表した第1データと前記OCR部が抽出した前記文字情報のそれぞれの文字を2進数で表した第2データとの排他的論理和を求め、その排他的論理和のすべてが0のときに前記OCR部が抽出した文字情報が正しいと判定し、その排他的論理和の1つが1で他が0のときに前記文字情報をその単語に修正する画像解析後処理部と、
を有することを特徴とする請求項1ないし請求項4のいずれか1項に記載の紙帳票データ化システム。
A word database that stores words and
The exclusive logical sum of the first data in which each character of the word is expressed in binary and the second data in which each character of the character information extracted by the OCR unit is expressed in binary is obtained, and the exclusive sum is obtained. Image analysis that determines that the character information extracted by the OCR unit is correct when all of the logical sums are 0, and corrects the character information to the word when one of the exclusive logical sums is 1 and the other is 0. Post-processing unit and
The paper form data conversion system according to any one of claims 1 to 4, wherein the system is characterized by having.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017209322A JP7088661B2 (en) | 2017-10-30 | 2017-10-30 | Paper form data conversion system, OCR engine learning image generator and image analyzer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017209322A JP7088661B2 (en) | 2017-10-30 | 2017-10-30 | Paper form data conversion system, OCR engine learning image generator and image analyzer |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019082814A JP2019082814A (en) | 2019-05-30 |
JP7088661B2 true JP7088661B2 (en) | 2022-06-21 |
Family
ID=66670462
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017209322A Active JP7088661B2 (en) | 2017-10-30 | 2017-10-30 | Paper form data conversion system, OCR engine learning image generator and image analyzer |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7088661B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112116968A (en) * | 2019-06-21 | 2020-12-22 | 上海交通大学医学院附属瑞金医院 | Medical examination report recognition method, device, equipment and storage medium |
CN110502969A (en) * | 2019-07-03 | 2019-11-26 | 国网江西省电力有限公司检修分公司 | A kind of paper material key message extraction method |
JP7447614B2 (en) | 2020-03-27 | 2024-03-12 | 富士フイルムビジネスイノベーション株式会社 | information processing equipment |
KR102575085B1 (en) * | 2021-11-19 | 2023-09-06 | 조남제 | Document analyzing system |
JP7393509B2 (en) | 2021-11-29 | 2023-12-06 | ネイバー コーポレーション | Deep learning-based method and system for extracting structured information from atypical documents |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000003403A (en) | 1998-06-16 | 2000-01-07 | Hitachi Ltd | Method for supporting slip input |
JP2003067738A (en) | 2001-08-23 | 2003-03-07 | Fujitsu Ltd | Method and system for removing net point |
JP2008108114A (en) | 2006-10-26 | 2008-05-08 | Just Syst Corp | Document processor and document processing method |
JP2011008802A (en) | 2004-05-20 | 2011-01-13 | Microsoft Corp | Low resolution ocr for camera obtained document |
JP2013073439A (en) | 2011-09-28 | 2013-04-22 | Hitachi Computer Peripherals Co Ltd | Character recognition device and character recognition method |
-
2017
- 2017-10-30 JP JP2017209322A patent/JP7088661B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000003403A (en) | 1998-06-16 | 2000-01-07 | Hitachi Ltd | Method for supporting slip input |
JP2003067738A (en) | 2001-08-23 | 2003-03-07 | Fujitsu Ltd | Method and system for removing net point |
JP2011008802A (en) | 2004-05-20 | 2011-01-13 | Microsoft Corp | Low resolution ocr for camera obtained document |
JP2008108114A (en) | 2006-10-26 | 2008-05-08 | Just Syst Corp | Document processor and document processing method |
JP2013073439A (en) | 2011-09-28 | 2013-04-22 | Hitachi Computer Peripherals Co Ltd | Character recognition device and character recognition method |
Also Published As
Publication number | Publication date |
---|---|
JP2019082814A (en) | 2019-05-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7088661B2 (en) | Paper form data conversion system, OCR engine learning image generator and image analyzer | |
CN111160343B (en) | Off-line mathematical formula symbol identification method based on Self-Attention | |
US20200302208A1 (en) | Recognizing typewritten and handwritten characters using end-to-end deep learning | |
US10915788B2 (en) | Optical character recognition using end-to-end deep learning | |
Charles et al. | A review on the various techniques used for optical character recognition | |
AU2010311067B2 (en) | System and method for increasing the accuracy of optical character recognition (OCR) | |
US7633512B2 (en) | Information processing apparatus, information processing method and program | |
CN110114776A (en) | Use the system and method for the character recognition of full convolutional neural networks | |
RU2643465C2 (en) | Devices and methods using a hierarchially ordered data structure containing unparametric symbols for converting document images to electronic documents | |
WO2022051838A1 (en) | Method and system for identifying citations within regulatory content | |
US11120256B2 (en) | Method of meta-data extraction from semi-structured documents | |
US20140334731A1 (en) | Methods and systems for evaluating handwritten documents | |
CN112434690A (en) | Method, system and storage medium for automatically capturing and understanding elements of dynamically analyzing text image characteristic phenomena | |
CN111581367A (en) | Method and system for inputting questions | |
Tariq et al. | Softconverter: A novel approach to construct OCR for printed Urdu isolated characters | |
Bhattacharya et al. | Understanding contents of filled-in Bangla form images | |
US9208381B1 (en) | Processing digital images including character recognition using ontological rules | |
Al Ghamdi | A novel approach to printed Arabic optical character recognition | |
Chakraborty et al. | An open source tesseract based tool for extracting text from images with application in braille translation for the visually impaired | |
Kumar et al. | Survey paper of script identification of Telugu language using OCR | |
Velpuru et al. | Comprehensive study of Deep learning based Telugu OCR | |
Shafait | Document image analysis with OCRopus | |
JP2019074807A (en) | Information processing device and program | |
JP2018092459A (en) | Image analyzing device, image analyzing method, and image analyzing program | |
RU2625020C1 (en) | Devices and methods, which prepare parametered symbols for transforming images of documents into electronic documents |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200819 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20211026 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20211222 |
|
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: 20220524 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220609 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7088661 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |