JP2021149459A - Image processor, control method, and control program - Google Patents
Image processor, control method, and control program Download PDFInfo
- Publication number
- JP2021149459A JP2021149459A JP2020048290A JP2020048290A JP2021149459A JP 2021149459 A JP2021149459 A JP 2021149459A JP 2020048290 A JP2020048290 A JP 2020048290A JP 2020048290 A JP2020048290 A JP 2020048290A JP 2021149459 A JP2021149459 A JP 2021149459A
- Authority
- JP
- Japan
- Prior art keywords
- image
- partial image
- input
- type
- layout
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Character Input (AREA)
- Character Discrimination (AREA)
Abstract
Description
本発明は、画像処理装置、制御方法及び制御プログラムに関し、特に、入力帳票画像を処理する画像処理装置、制御方法及び制御プログラムに関する。 The present invention relates to an image processing device, a control method and a control program, and more particularly to an image processing device, a control method and a control program for processing an input form image.
請求書等の帳票を担当者が手作業によりデータ化している会社では、膨大な数の帳票のデータ化が必要である場合に担当者の業務負担が大きくなるため、帳票のデータ化作業の効率化に対する要望が高まっている。担当者の業務負担を軽減させるために、帳票のデータ化を行う画像処理装置では、入力帳票画像に記載されている文字情報を正しく出力することが望まれている。 In a company where the person in charge manually converts invoices and other forms into data, the work load of the person in charge becomes heavy when it is necessary to convert a huge number of forms into data, so the efficiency of the form data conversion work is efficient. There is a growing demand for conversion. In order to reduce the work load of the person in charge, it is desired that the image processing device that converts the form into data correctly outputs the character information described in the input form image.
画像データから検出した発注者のロゴやシンボルマーク等の模様が、予め定められた模様と類似する場合、画像データが、発注書のFAX画像のような特定の書類の画像データであると判断する情報処理装置が開示されている(特許文献1)。この情報処理装置は、画像データが特定の書類の画像データであると判断した場合、その予め定められた模様に対応付けられた会社名を会社マスタDBから特定する。 When the pattern such as the orderer's logo or symbol mark detected from the image data is similar to the predetermined pattern, it is determined that the image data is the image data of a specific document such as the FAX image of the purchase order. An information processing device is disclosed (Patent Document 1). When the information processing device determines that the image data is the image data of a specific document, the information processing device specifies the company name associated with the predetermined pattern from the company master DB.
画像処理装置では、入力帳票画像に記載されている文字情報をより正しく出力することが望まれている。 It is desired that the image processing apparatus output the character information described in the input form image more accurately.
本発明の目的は、入力帳票画像に記載されている文字情報をより正しく出力することが可能な画像処理装置、制御方法及び制御プログラムを提供することにある。 An object of the present invention is to provide an image processing device, a control method, and a control program capable of more accurately outputting character information described in an input form image.
本発明の一側面に係る画像処理装置は、過去に認識に失敗した部分画像又はその部分画像の特徴量、その部分画像の帳票内の位置情報、及び、その部分画像に対応する文字情報が、複数の帳票レイアウトの種類毎に記憶されている記憶部と、入力帳票画像を取得する取得部と、入力帳票画像に基づいて、帳票レイアウトの種類を検出するレイアウト検出部と、検出された帳票レイアウトの種類に対応して記憶部に記憶されている位置情報に基づいて、入力帳票画像から入力部分画像を抽出する抽出部と、入力部分画像と検出された帳票レイアウトの種類に対応して記憶部に記憶されている部分画像とが類似する場合、又は、入力部分画像の特徴量と検出された帳票レイアウトの種類に対応して記憶部に記憶されている部分画像の特徴量とが類似する場合、入力帳票画像には、検出された帳票レイアウトの種類に対応して記憶部に記憶されている文字情報が記載されているものとして、その文字情報を出力する出力部と、を有する。 In the image processing apparatus according to one aspect of the present invention, the partial image that has failed to be recognized in the past or the feature amount of the partial image, the position information of the partial image in the form, and the character information corresponding to the partial image are A storage unit that is stored for each of a plurality of form layout types, an acquisition unit that acquires an input form image, a layout detection unit that detects the type of form layout based on the input form image, and a detected form layout. An extraction unit that extracts an input partial image from an input form image based on the position information stored in the storage unit corresponding to the type of, and a storage unit corresponding to the type of the input partial image and the detected form layout. When the partial image stored in is similar, or when the feature amount of the input partial image is similar to the feature amount of the partial image stored in the storage unit corresponding to the type of the detected form layout. The input form image has an output unit that outputs the character information, assuming that the character information stored in the storage unit is described according to the type of the detected form layout.
本発明の一側面に係る制御方法は、記憶部と、出力部とを有する画像処理装置の制御方法であって、画像処理装置が、過去に認識に失敗した部分画像又はその部分画像の特徴量、その部分画像の帳票内の位置情報、及び、その部分画像に対応する文字情報を、複数の帳票レイアウトの種類毎に記憶部に記憶し、入力帳票画像を取得し、入力帳票画像に基づいて、帳票レイアウトの種類を検出し、検出された帳票レイアウトの種類に対応して記憶部に記憶されている位置情報に基づいて、入力帳票画像から入力部分画像を抽出し、入力部分画像と検出された帳票レイアウトの種類に対応して記憶部に記憶されている部分画像とが類似する場合、又は、入力部分画像の特徴量と検出された帳票レイアウトの種類に対応して記憶部に記憶されている部分画像の特徴量とが類似する場合、入力部分画像には、検出された帳票レイアウトの種類に対応して記憶部に記憶されている文字情報が記載されているものとして、その文字情報を出力部から出力する。 The control method according to one aspect of the present invention is a control method of an image processing device having a storage unit and an output unit, and is a partial image or a feature amount of the partial image that the image processing device has failed to recognize in the past. , The position information in the form of the partial image and the character information corresponding to the partial image are stored in the storage unit for each type of a plurality of form layouts, the input form image is acquired, and based on the input form image. , Detects the type of form layout, extracts the input partial image from the input form image based on the position information stored in the storage unit corresponding to the detected form layout type, and detects it as the input partial image. When the partial image stored in the storage unit corresponds to the type of form layout, or when the feature amount of the input partial image and the detected form layout type are stored in the storage unit. When the feature amount of the partial image is similar to that of the partial image, it is assumed that the input partial image contains the character information stored in the storage unit corresponding to the type of the detected form layout. Output from the output section.
本発明の一側面に係る制御プログラムは、記憶部と、出力部とを有するコンピュータの制御プログラムであって、過去に認識に失敗した部分画像又はその部分画像の特徴量、その部分画像の帳票内の位置情報、及び、その部分画像に対応する文字情報を、複数の帳票レイアウトの種類毎に記憶部に記憶し、入力帳票画像を取得し、入力帳票画像に基づいて、帳票レイアウトの種類を検出し、検出された帳票レイアウトの種類に対応して記憶部に記憶されている位置情報に基づいて、入力帳票画像から入力部分画像を抽出し、入力部分画像と検出された帳票レイアウトの種類に対応して記憶部に記憶されている部分画像とが類似する場合、又は、入力部分画像の特徴量と検出された帳票レイアウトの種類に対応して記憶部に記憶されている部分画像の特徴量とが類似する場合、入力部分画像には、検出された帳票レイアウトの種類に対応して記憶部に記憶されている文字情報が記載されているものとして、その文字情報を出力部から出力することをコンピュータに実行させる。 The control program according to one aspect of the present invention is a computer control program having a storage unit and an output unit, and is a partial image that has failed to be recognized in the past, a feature amount of the partial image, and a form of the partial image. The position information of the above and the character information corresponding to the partial image are stored in the storage unit for each of a plurality of form layout types, the input form image is acquired, and the type of the form layout is detected based on the input form image. Then, based on the position information stored in the storage unit corresponding to the detected form layout type, the input partial image is extracted from the input form image, and the input partial image and the detected form layout type are supported. When the partial image stored in the storage unit is similar, or the feature amount of the input partial image and the feature amount of the partial image stored in the storage unit corresponding to the detected form layout type. If they are similar, it is assumed that the input partial image contains the character information stored in the storage unit corresponding to the detected form layout type, and the character information is output from the output unit. Let the computer do it.
本発明によれば、画像処理装置、制御方法及び制御プログラムは、入力帳票画像に記載されている文字情報をより正しく出力することが可能となる。 According to the present invention, the image processing device, the control method, and the control program can more correctly output the character information described in the input form image.
以下、本発明の一側面に係る画像処理装置、制御方法及び制御プログラムについて図を参照しつつ説明する。但し、本発明の技術的範囲はそれらの実施の形態に限定されず、特許請求の範囲に記載された発明とその均等物に及ぶ点に留意されたい。 Hereinafter, the image processing apparatus, the control method, and the control program according to one aspect of the present invention will be described with reference to the drawings. However, it should be noted that the technical scope of the present invention is not limited to those embodiments, but extends to the inventions described in the claims and their equivalents.
図1は、実施形態に従った画像処理システム1の概略構成を示す図である。図1に示すように、画像処理システム1は、画像読取装置100と、情報処理装置200とを有する。
FIG. 1 is a diagram showing a schematic configuration of an
画像読取装置100は、例えばスキャナ装置等である。画像読取装置100は、情報処理装置200に接続されている。情報処理装置200は、画像処理装置の一例であり、例えばパーソナルコンピュータ等である。 The image reading device 100 is, for example, a scanner device or the like. The image reading device 100 is connected to the information processing device 200. The information processing device 200 is an example of an image processing device, such as a personal computer.
画像読取装置100は、第1インタフェース装置101と、撮像装置102と、第1記憶装置110と、第1処理回路120とを有する。
The image reading device 100 includes a
第1インタフェース装置101は、USB(Universal Serial Bus)等のシリアルバスに準じるインタフェース回路を有し、情報処理装置200と電気的に接続して画像データ及び各種の情報を送受信する。また、第1インタフェース装置101の代わりに、無線信号を送受信するアンテナと、所定の通信プロトコルに従って、無線通信回線を通じて信号の送受信を行うための無線通信インタフェース回路とを有する通信装置が用いられてもよい。所定の通信プロトコルは、例えば無線LAN(Local Area Network)である。
The
撮像装置102は、主走査方向に直線状に配列されたCCD(Charge Coupled Device)による撮像素子を備える縮小光学系タイプの撮像センサを有する。さらに、撮像装置102は、光を照射する光源と、撮像素子上に像を結ぶレンズと、撮像素子から出力された電気信号を増幅してアナログ/デジタル(A/D)変換するA/D変換器とを有する。撮像装置102において、撮像センサは、搬送される媒体を撮像してアナログの画像信号を生成して出力し、A/D変換器は、このアナログの画像信号をA/D変換してデジタルの入力帳票画像を生成して出力する。入力帳票画像は、各画素データが、例えばRGB各色毎に8bitで表される計24bitのR(赤色)値、G(緑色)値、B(青色)値からなるカラー多値画像である。なお、CCDの代わりにCMOS(Complementary Metal Oxide Semiconductor)による撮像素子を備える等倍光学系タイプのCIS(Contact Image Sensor)が用いられてもよい。
The
第1記憶装置110は、RAM(Random Access Memory)、ROM(Read Only Memory)等のメモリ装置、ハードディスク等の固定ディスク装置、又はフレキシブルディスク、光ディスク等の可搬用の記憶装置等を有する。また、第1記憶装置110には、画像読取装置100の各種処理に用いられるコンピュータプログラム、データベース、テーブル等が格納される。コンピュータプログラムは、コンピュータ読み取り可能な可搬型記録媒体から公知のセットアッププログラム等を用いて第1記憶装置110にインストールされてもよい。可搬型記録媒体は、例えばCD−ROM(compact disk read only memory)、DVD−ROM(digital versatile disk read only memory)等である。また、第1記憶装置110は、撮像装置102により生成された入力帳票画像等を記憶する。
The
第1処理回路120は、予め第1記憶装置110に記憶されているプログラムに基づいて動作する。第1処理回路120は、例えばCPU(Control Processing Unit)である。なお、第1処理回路120として、DSP(digital signal processor)、LSI(large scale integration)、ASIC(Application Specific Integrated Circuit)、FPGA(Field-Programming Gate Array)等が用いられてもよい。
The
第1処理回路120は、第1インタフェース装置101、撮像装置102及び第1記憶装置110等と接続され、これらの各部を制御する。第1処理回路120は、撮像装置102の媒体読取制御、第1インタフェース装置101を介した情報処理装置200とのデータ送受信制御等を行う。
The
情報処理装置200は、第2インタフェース装置201と、入力装置202と、表示装置203と、第2記憶装置210と、第2処理回路220とを有する。以下、情報処理装置200の各部について詳細に説明する。
The information processing device 200 includes a
第2インタフェース装置201は、画像読取装置100の第1インタフェース装置101と同様のインタフェース回路を有し、情報処理装置200と画像読取装置100とを接続する。また、第2インタフェース装置201の代わりに、無線信号を送受信するアンテナと、無線LAN等の所定の通信プロトコルに従って、無線通信回線を通じて信号の送受信を行うための無線通信インタフェース回路とを有する通信装置が用いられてもよい。
The
入力装置202は、キーボード、マウス等の入力装置及び入力装置から信号を取得するインタフェース回路を有し、利用者の操作に応じた信号を第2処理回路220に出力する。
The
表示装置203は、出力部の一例である。表示装置203は、液晶、有機EL(Electro-Luminescence)等から構成されるディスプレイ及びディスプレイに画像データを出力するインタフェース回路を有する。表示装置203は、第2処理回路220からの指示に従って、各種の情報をディスプレイに表示する。
The
第2記憶装置210は、記憶部の一例であり、画像読取装置100の第1記憶装置110と同様のメモリ装置、固定ディスク装置、可搬用の記憶装置等を有する。第2記憶装置210には、情報処理装置200の各種処理に用いられるコンピュータプログラム、データベース、テーブル等が格納される。コンピュータプログラムは、例えばCD−ROM、DVD−ROM等のコンピュータ読み取り可能な可搬型記録媒体から、公知のセットアッププログラム等を用いて第2記憶装置210にインストールされてもよい。
The
また、第2記憶装置210には、データとして、レイアウトテーブル及び辞書テーブル等が予め記憶される。各テーブルの詳細については後述する。
In addition, a layout table, a dictionary table, and the like are stored in advance as data in the
第2処理回路220は、予め第2記憶装置210に記憶されているプログラムに基づいて動作する。第2処理回路220は、例えばCPUである。なお、第2処理回路220として、DSP、LSI、ASIC、FPGA等が用いられてもよい。
The
第2処理回路220は、第2インタフェース装置201、入力装置202、表示装置203及び第2記憶装置210等と接続され、これらの各部を制御する。第2処理回路220は、第2インタフェース装置201を介した画像読取装置100とのデータ送受信制御、入力装置202の入力制御、表示装置203の表示制御等を行う。
The
図2は、レイアウトテーブルのデータ構造の一例を示す図である。 FIG. 2 is a diagram showing an example of the data structure of the layout table.
レイアウトテーブルには、複数の帳票レイアウトの種類毎に、各種類の識別情報(種類ID)、各種類に対応する罫線情報、色情報及びキーワード情報等が関連付けて記憶される。 In the layout table, identification information (type ID) of each type, ruled line information corresponding to each type, color information, keyword information, etc. are stored in association with each type of a plurality of form layouts.
罫線情報は、帳票が撮像された帳票画像に含まれる罫線で示される図形の画像パターン及びその図形の帳票画像内の位置を示す。例えば、罫線で示される図形は表であり、画像パターンとして表全体の画像パターンが設定される。なお、画像パターンとして表内の水平方向に延伸する直線と垂直方向に延伸する直線との各交点の画像パターンが設定されてもよい。また、図形の位置として、帳票画像内のその図形の外接矩形の左上角及び右下角の座標等が設定される。なお、罫線情報として、帳票画像内の水平又は垂直方向に延伸する各直線の位置が設定されてもよい。また、罫線情報として、複数の図形の画像パターン及び各図形の帳票画像内の位置が設定されてもよい。 The ruled line information indicates the image pattern of the figure indicated by the ruled line included in the form image in which the form is captured and the position of the figure in the form image. For example, the figure indicated by the ruled line is a table, and the image pattern of the entire table is set as the image pattern. As an image pattern, an image pattern at each intersection of a straight line extending in the horizontal direction and a straight line extending in the vertical direction in the table may be set. Further, as the position of the figure, the coordinates of the upper left corner and the lower right corner of the circumscribed rectangle of the figure in the form image are set. As the ruled line information, the position of each straight line extending in the horizontal or vertical direction in the form image may be set. Further, as the ruled line information, image patterns of a plurality of figures and positions in the form image of each figure may be set.
色情報は、帳票画像に含まれる色に関する情報を示す。例えば、色情報として、画像の二種類の色差(U、V)のそれぞれについて、各色差値(U値、V値)を階級とし、帳票画像内で各色差値を示す画素の数を度数としたヒストグラムが設定される。 The color information indicates information about the color included in the form image. For example, as color information, for each of the two types of color difference (U, V) in the image, each color difference value (U value, V value) is set as a class, and the number of pixels indicating each color difference value in the form image is set as a frequency. The histogram is set.
キーワード情報は、一又は複数の文字(キーワード)及び各文字の帳票画像内の位置を示す。文字(キーワード)は、例えば請求書、領収書、金額等の単語、特にタイトルに用いられる単語である。文字の位置として、帳票画像内のその文字の外接矩形の左上角及び右下角の座標等が設定される。 The keyword information indicates one or more characters (keywords) and the position of each character in the form image. Characters (keywords) are words such as invoices, receipts, and amounts, especially words used in titles. As the position of the character, the coordinates of the upper left corner and the lower right corner of the circumscribed rectangle of the character in the form image are set.
図3は、辞書テーブルのデータ構造の一例を示す図である。 FIG. 3 is a diagram showing an example of the data structure of the dictionary table.
辞書テーブルには、複数の帳票レイアウトの種類毎に、各種類の種類ID及び各種類に対応する一又は複数の辞書が関連付けて記憶される。辞書は、情報群の一例であり、それぞれ部分画像、特徴量、位置情報、文字情報及び優先順位等を含む。各辞書は、後述する登録処理において利用者により設定される。なお、各辞書の内の一部又は全部は、情報処理装置200の出荷時に事前に設定されてもよい。 In the dictionary table, each type ID and one or a plurality of dictionaries corresponding to each type are associated and stored for each type of a plurality of form layouts. The dictionary is an example of an information group, and each includes a partial image, a feature amount, a position information, character information, a priority order, and the like. Each dictionary is set by the user in the registration process described later. A part or all of each dictionary may be set in advance at the time of shipment of the information processing apparatus 200.
部分画像は、過去に検出対象である対象文字の認識に失敗した入力帳票画像内の一部の画像である。部分画像として、その入力帳票画像内で、その入力帳票画像の特徴、特にその対象文字に対応する特徴を含む領域の画像が設定される。例えば、部分画像として、対象文字が含まれる画像が設定される。なお、部分画像として、対象文字が含まれない画像が設定されてもよい。 The partial image is a part of the input form image in which the recognition of the target character to be detected has failed in the past. As a partial image, an image of an area including features of the input form image, particularly features corresponding to the target characters, is set in the input form image. For example, an image including a target character is set as a partial image. An image that does not include the target character may be set as the partial image.
特徴量は、対応する部分画像から算出される特徴量である。特徴量として、例えばA−KAZE特徴量又はORB(Oriented FAST and Rotated Binary Robust Independent Elementary Features)特徴量等が使用される。なお、特徴量として、ハールライク(Haar-Like)特徴量、HOG(Histograms of Oriented Gradients)特徴量等の他の特徴量が使用されてもよい。ハールライク特徴量は、画像領域中に任意に設定された複数の隣接矩形領域間の輝度値の差である。HOG特徴量は、画像領域内の局所領域(セル)の画素値の勾配方向毎の勾配強度のヒストグラムである。なお、特徴量として、複数の種類の特徴量が設定されてもよい。また、部分画像又は特徴量の内の何れか一方は省略されてもよい。 The feature amount is a feature amount calculated from the corresponding partial image. As the feature amount, for example, A-KAZE feature amount or ORB (Oriented FAST and Rotated Binary Robust Independent Elementary Features) feature amount or the like is used. As the feature amount, other feature amounts such as Haar-Like feature amount and HOG (Histograms of Oriented Gradients) feature amount may be used. The Haar-like feature amount is the difference in luminance value between a plurality of adjacent rectangular areas arbitrarily set in the image area. The HOG feature amount is a histogram of the gradient intensity for each gradient direction of the pixel values of the local region (cell) in the image region. As the feature amount, a plurality of types of feature amount may be set. Moreover, either one of the partial image and the feature amount may be omitted.
位置情報は、その部分画像の帳票内の位置を示す。位置情報として、例えば入力帳票画像内のその部分画像の左上角及び右下角の座標等が設定される。 The position information indicates the position of the partial image in the form. As the position information, for example, the coordinates of the upper left corner and the lower right corner of the partial image in the input form image are set.
文字情報は、その部分画像に対応する対象文字を示す。対象文字は、その部分画像を含む入力帳票画像における検出対象であり、過去に認識又は特定に失敗された文字(正解文字)である。例えば、文字情報は、その部分画像に記載されている実際の文字を示す。なお、文字情報は、入力帳票画像内で部分画像以外の領域に記載されている実際の文字を示してもよい。例えば、帳票が請求書である場合、対象文字として請求元の会社名等が設定される。また、帳票が領収書である場合、対象文字として発行元の会社名等が設定される。 The character information indicates a target character corresponding to the partial image. The target character is a character to be detected in the input form image including the partial image, and is a character (correct answer character) that has failed to be recognized or specified in the past. For example, the character information indicates the actual characters described in the partial image. The character information may indicate actual characters described in an area other than the partial image in the input form image. For example, when the form is an invoice, the company name of the billing source is set as the target character. If the form is a receipt, the issuer's company name or the like is set as the target character.
優先順位は、各辞書が参照される順序を示す。 The priority indicates the order in which each dictionary is referenced.
図4は、第2記憶装置210及び第2処理回路220の概略構成を示す図である。
FIG. 4 is a diagram showing a schematic configuration of the
図4に示すように第2記憶装置210には、取得プログラム211、レイアウト検出プログラム212、抽出プログラム213、文字特定プログラム214、文字認識プログラム215、出力制御プログラム216及び登録プログラム217等の各プログラムが記憶される。これらの各プログラムは、プロセッサ上で動作するソフトウェアにより実装される機能モジュールである。第2処理回路220は、第2記憶装置210に記憶された各プログラムを読み取り、読み取った各プログラムに従って動作する。これにより、第2処理回路220は、取得部221、レイアウト検出部222、抽出部223、文字特定部224、文字認識部225、出力制御部226及び登録部227として機能する。
As shown in FIG. 4, the
図5は、画像読取装置100による画像読取処理の動作の例を示すフローチャートである。以下、図5に示したフローチャートを参照しつつ、画像読取処理の動作を説明する。なお、以下に説明する動作のフローは、予め第1記憶装置110に記憶されているプログラムに基づき主に第1処理回路120により画像読取装置100の各要素と協働して実行される。
FIG. 5 is a flowchart showing an example of the operation of the image reading process by the image reading device 100. Hereinafter, the operation of the image reading process will be described with reference to the flowchart shown in FIG. The operation flow described below is mainly executed by the
最初に、撮像装置102は、原稿として請求書、通知書又は証明書等の帳票を撮像して入力帳票画像を生成し、第1記憶装置110に保存する(ステップS101)。
First, the
次に、第1処理回路120は、第1記憶装置110に保存された入力帳票画像を、第1インタフェース装置101を介して情報処理装置200に送信し(ステップS102)、一連のステップを終了する。
Next, the
図6は、情報処理装置200による認識処理の動作の例を示すフローチャートである。以下、図6に示したフローチャートを参照しつつ、認識処理の動作を説明する。なお、以下に説明する動作のフローは、予め第2記憶装置210に記憶されているプログラムに基づき主に第2処理回路220により情報処理装置200の各要素と協同して実行される。
FIG. 6 is a flowchart showing an example of the operation of the recognition process by the information processing apparatus 200. Hereinafter, the operation of the recognition process will be described with reference to the flowchart shown in FIG. The operation flow described below is mainly executed by the
最初に、取得部221は、入力帳票画像を、第2インタフェース装置201を介して画像読取装置100から取得し、第2記憶装置210に保存する(ステップS201)。
First, the
次に、レイアウト検出部222は、レイアウトテーブルを参照し、入力帳票画像に基づいて、帳票レイアウトの種類を検出する(ステップS202)。
Next, the
レイアウト検出部222は、まず、入力帳票画像から罫線を検出する。レイアウト検出部222は、入力帳票画像からエッジ画素を抽出し、入力帳票画像をエッジ画素と非エッジ画素に二値化したエッジ画像を生成する。レイアウト検出部222は、入力帳票画像内の画素の水平方向の両隣の画素の階調値の差の絶対値(以下、隣接差分値と称する)を算出し、隣接差分値が第1閾値を越える場合、その入力帳票画像上の画素をエッジ画素として抽出する。階調値は、輝度値又は色値(R値、G値又はB値)である。第1閾値は、例えば、人が画像上の輝度の違いを目視により判別可能な輝度値の差(例えば20)に設定することができる。レイアウト検出部222は、垂直方向についても隣接差分値を算出し、隣接差分値が第1閾値を越える場合、その入力帳票画像上の画素もエッジ画素として抽出する。一方、レイアウト検出部222は、エッジ画素として抽出されなかった画素を非エッジ画素として抽出する。
The
なお、レイアウト検出部222は、入力帳票画像内の画素から水平又は垂直方向に所定距離だけ離れた画素の階調値の差の絶対値を隣接差分値として算出してもよい。また、レイアウト検出部222は、特定の画素の階調値が第1閾値未満であり、その特定の画素に隣接する画素又はその特定の画素から所定距離だけ離れた画素の階調値が第1閾値以上である場合、その特定の画素をエッジ画素として抽出してもよい。
The
次に、レイアウト検出部222は、例えば、エッジ画像内でエッジ画素により非エッジ画素が囲まれた領域を、表のセルに対応するセル領域として検出する。レイアウト検出部222は、エッジ画像内で相互に隣接するエッジ画素で囲まれる第1連結領域をラベリングによりグループ化し、各第1連結領域の内、水平又は垂直方向のサイズが第1サイズ以上である第1連結領域を抽出する。第1サイズは、内部に文字を含むことが可能なサイズに設定され、例えば16ポイントに相当する画素数に設定される。レイアウト検出部222は、抽出した各第1連結領域内で、隣接する非エッジ画素で囲まれる第2連結領域をラベリングによりグループ化し、各第2連結領域の内、水平又は垂直方向の長さが第2サイズ以上である第2連結領域を抽出する。第2サイズは、文字の最低サイズに設定され、例えば8ポイントに相当する画素数に設定される。レイアウト検出部222は、抽出した第2連結領域に隣接し且つその第2連結領域を囲むエッジ画素で囲まれた領域(第2連結領域を除く領域)をセル領域として検出する。
Next, the
なお、レイアウト検出部222は、エッジ画像内でエッジ画素が連続する直線を抽出し、抽出した直線で囲まれる領域(その内側領域を除く領域)をセル領域として検出してもよい。その場合、レイアウト検出部222は、例えばモルフォロジー変換を用いて、直線を抽出する。レイアウト検出部222は、エッジ画像内で水平方向において非エッジ画素と隣接するエッジ画素を非エッジ画素に変換する収縮処理を所定回数(第1サイズ分)実行した後、エッジ画素と隣接する非エッジ画素をエッジ画素に変換する膨張処理を所定回数実行する。レイアウト検出部222は、残ったエッジ画素を水平方向に延伸する直線として抽出する。同様に、レイアウト検出部222は、エッジ画像内で、垂直方向において非エッジ画素と隣接するエッジ画素を非エッジ画素に変換する収縮処理を所定回数実行した後、エッジ画素と隣接する非エッジ画素をエッジ画素に変換する膨張処理を所定回数実行する。レイアウト検出部222は、残ったエッジ画素を垂直方向に延伸する直線として抽出する。
The
次に、レイアウト検出部222は、レイアウトテーブルに記憶されたレイアウトの種類毎に、対応する罫線情報に示される画像パターンと、エッジ画像から検出されたセル領域との罫線類似度を算出する。レイアウト検出部222は、エッジ画像から、各罫線情報に示される位置に対応し且つ画像パターンと同一の大きさを有する領域を、その位置をずらしながら切り出した切り出し画像と、画像パターンとの類似の程度を算出する。類似の程度は、例えば正規化相互相関値である。なお、類似の程度は、SSD(Sum of Squared Difference)の逆数又はSAD(Sum of Absolute Difference)の逆数でもよい。レイアウト検出部222は、各切り出し画像と画像パターンとの類似の程度の最大値をそのレイアウトの種類に対する罫線類似度として算出する。なお、罫線情報として複数の図形の画像パターンが設定されている場合、レイアウト検出部222は、複数の図形の画像パターン毎に算出した類似の程度の最大値の平均値、中央値、最小値又は最大値をその帳票データに対する罫線類似度として算出する。
Next, the
また、罫線情報として、画像内の水平又は垂直方向に延伸する各直線の位置が設定されている場合、レイアウト検出部222は、公知の画像処理技術を利用して、入力帳票画像から直線を検出する。レイアウト検出部222は、各レイアウトの種類に対する罫線情報において設定された直線の総数に対する、入力帳票画像の対応する位置から検出された直線の数の割合を、そのレイアウトの種類に対する罫線類似度として算出する。
Further, when the position of each straight line extending in the horizontal or vertical direction in the image is set as the ruled line information, the
また、レイアウト検出部222は、画像の二種類の色差のそれぞれについて、各色差値を階級とし、入力帳票画像内で各色差値を示す画素数を度数とするヒストグラムを生成する。次に、レイアウト検出部222は、レイアウトテーブルに記憶されたレイアウトの種類毎に、対応する色情報に示されるヒストグラムと、入力帳票画像から生成されたヒストグラムとの色類似度を算出する。レイアウト検出部222は、色情報に示される各ヒストグラムと、入力帳票画像から生成した各ヒストグラムとの類似の程度を算出し、算出した類似の程度の平均値又は合計値等を、各レイアウトの種類に対する色類似度として算出する。類似の程度は、例えば各ヒストグラムの各階級の度数を要素とする各ベクトルの内積値である。
Further, the
また、レイアウト検出部222は、レイアウトテーブルに記憶されたレイアウトの種類毎に、対応するキーワード情報に示される位置に対応する入力帳票画像内の位置から文字を検出する。レイアウト検出部222は、公知のOCR(Optical Character Recognition)技術を利用して、文字を検出する。レイアウト検出部222は、検出した文字がキーワード情報に示されるキーワードと一致するか否かを判定する。レイアウト検出部222は、キーワード情報において設定されたキーワードの総数に対する、入力帳票画像から検出した文字と一致したキーワードの数の割合を、各レイアウトの種類に対するキーワード類似度として算出する。
Further, the
レイアウト検出部222は、レイアウトテーブルに記憶されたレイアウトの種類毎に、算出した罫線類似度、色類似度及びキーワード類似度の平均値を、各レイアウトの種類に対する類似度として算出する。一般に、種類が異なるレイアウトでは、表または直線等の罫線の配置が異なっている可能性が高いが、色は類似している可能性が高い。そこで、レイアウト検出部222は、各レイアウトの種類に対するレイアウト類似度として、罫線類似度、キーワード類似度、色類似度の順に重みが大きくなるように罫線類似度、キーワード類似度及び色類似度の重み付け和を算出してもよい。なお、レイアウト検出部222は、罫線類似度、色類似度及びキーワード類似度の内の何れか一つ又は二つに基づいて類似度を算出してもよい。レイアウト検出部222は、レイアウトテーブルに記憶された帳票レイアウトの種類の内、類似度が最大である帳票レイアウトの種類を、入力帳票画像の帳票レイアウトの種類として検出する。
The
次に、抽出部223は、レイアウト検出部222により検出された帳票レイアウトの種類に対応する辞書が辞書テーブルに記憶されているか否かを判定する(ステップS203)。検出された帳票レイアウトの種類に対応する辞書が辞書テーブルに記憶されていない場合、抽出部223は、処理をステップS209へ移行する。
Next, the
一方、検出された帳票レイアウトの種類に対応する辞書が辞書テーブルに記憶されている場合、抽出部223は、検出された帳票レイアウトの種類に対応する辞書の中から特定の辞書を抽出する(ステップS204)。例えば、抽出部223は、各辞書に対応付けられた優先順位が高い順に、辞書を抽出する。
On the other hand, when the dictionary corresponding to the detected form layout type is stored in the dictionary table, the
次に、抽出部223は、抽出した辞書に記憶されている位置情報に基づいて、入力帳票画像から入力部分画像を抽出する(ステップS205)。抽出部223は、入力帳票画像内で、抽出した辞書に記憶されている位置情報に示される領域の画像を入力部分画像として抽出する。このように、抽出部223は、検出された帳票レイアウトの種類に対応して辞書テーブルに記憶されている位置情報に基づいて、入力帳票画像から入力部分画像を抽出する。
Next, the
次に、文字特定部224は、抽出された入力部分画像と、抽出された辞書に記憶されている部分画像とが類似するか否かを判定する(ステップS206)。文字特定部224は、入力部分画像と部分画像との類似の程度を算出し、算出した類似の程度が閾値以上であるか否かにより、入力部分画像と部分画像とが類似するか否かを判定する。類似の程度は、例えば正規化相互相関値である。なお、類似の程度は、SSDの逆数又はSADの逆数でもよい。このように、文字特定部224は、抽出された入力部分画像と、検出された帳票レイアウトの種類に対応して辞書テーブルに記憶されている部分画像とが類似するか否かを判定する。
Next, the
入力部分画像と部分画像が類似する場合、文字特定部224は、抽出された辞書に記憶されている文字情報に示される文字を、入力帳票画像から検出する対象文字として特定し(ステップS207)、処理をステップS210へ移行する。このように、文字特定部224は、入力部分画像と、検出された帳票レイアウトの種類に対応して記憶されている部分画像とが類似する場合、入力帳票画像に、その帳票レイアウトの種類に対応して記憶されている文字情報が記載されているものとする。
When the input partial image and the partial image are similar, the
一方、入力部分画像と部分画像が類似しない場合、文字特定部224は、検出された帳票レイアウトの種類に対応する辞書の内、まだ処理されていない辞書が存在するか否かを判定する(ステップS208)。
On the other hand, when the input partial image and the partial image are not similar, the
まだ処理されていない辞書が存在する場合、文字特定部224は、処理をステップS204へ戻し、ステップS204〜S208の処理を繰り返す。この場合、ステップS204において、抽出部223は、検出された帳票レイアウトの種類に対応し且つまだ処理されていない辞書の中で、優先順位が最も高い辞書を抽出する。ステップS205において、抽出部223は、新たに抽出された辞書に含まれる位置情報に基づいて、入力帳票画像から第2入力部分画像を抽出する。第2入力部分画像と新たに抽出された辞書に含まれる部分画像とが類似する場合、ステップS207において、文字特定部224は、新たに抽出された辞書に記憶されている文字情報に示される文字を、入力帳票画像から検出する対象文字として特定する。
If there is a dictionary that has not been processed yet, the
このように、入力部分画像と、検出された帳票レイアウトの種類に対応して辞書テーブルに記憶されている特定の辞書に含まれる部分画像とが類似しない場合、抽出部223は、その帳票レイアウトの種類に対応して記憶されている他の辞書を抽出する。そして、抽出部223は、抽出した他の辞書に含まれる位置情報に基づいて、入力帳票画像から第2入力部分画像を抽出する。文字特定部224は、第2入力部分画像とその他の辞書に含まれる部分画像とが類似する場合、入力帳票画像には、その他の辞書に含まれる文字情報が記載されているものとする。これにより、文字特定部224は、それぞれ別個の領域に対応する複数の辞書を用いて、検出対象の文字をより精度良く特定することができる。
In this way, when the input partial image and the partial image included in the specific dictionary stored in the dictionary table corresponding to the type of the detected form layout are not similar, the
一方、検出された帳票レイアウトの種類に対応する全ての辞書について既に処理された場合、文字認識部225は、入力帳票画像からOCRにより、対象文字を示す文字情報を認識する(ステップS209)。
On the other hand, when all the dictionaries corresponding to the detected form layout types have already been processed, the
例えば、文字認識部225は、公知のOCR技術を利用して、入力帳票画像から「会社名」等のキーワードを検出する。文字認識部225は、検出した文字列に対して所定の位置関係を有する文字を対象文字として検出する。所定の位置関係は、方向(例えば右側、下側、右下側)及び距離(例えば30mmに相当する画素内)を含み、事前に設定される。
For example, the
なお、文字認識部225は、入力帳票画像から「会社」等のキーワードを含む文字列を検出してもよい。文字認識部225は、所定の優先順位に従って、検出した文字列の中から対象文字を抽出する。所定の優先順位は、位置条件(例えば検出した文字列の内、最も右側又は最も下側に位置する文字列)等を含み、事前に設定される。例えば、帳票が請求書であり、対象文字が請求元の会社名である場合、請求書には、請求元の会社名と請求先の会社名が含まれる可能性が高い。一般に、請求先の会社名は左上側に記載され、請求元の会社名は右下側に記載される可能性が高い。そのため、文字認識部225は、検出した文字列の内、最も右側又は最も下側に位置する文字列を対象文字として検出することにより、請求元の会社名を精度良く検出することができる。
The
このように、文字認識部225は、入力部分画像が、検出された帳票レイアウトの種類に対応する全ての辞書に記憶された部分画像と類似しない場合、入力帳票画像からOCRにより文字情報を認識する。また、文字認識部225は、検出された帳票レイアウトの種類に対応する辞書が辞書テーブルに記憶されていない場合も、入力帳票画像からOCRにより文字情報を認識する。これにより、文字認識部225は、入力帳票画像に対応する辞書がまだ登録されていない場合でも、検出対象の文字を認識することができる。
As described above, when the input partial image is not similar to the partial image stored in all the dictionaries corresponding to the detected form layout type, the
次に、出力制御部226は、ステップS207で特定された文字情報又はステップS209で認識された文字情報を表示装置203に表示することにより出力する(ステップS210)。なお、出力制御部226は、ステップS207で特定された文字情報又はステップS209で認識された文字情報を、第2インタフェース装置201を介して他の情報処理装置に送信することにより出力してもよい。
Next, the
次に、登録部227は、利用者から入力装置202を用いて又は第2インタフェース装置201を介して、出力された文字情報が誤りであるか否かの指定を受け付ける(ステップS211)。
Next, the
次に、登録部227は、利用者により、出力された文字情報、即ちステップS207で特定された辞書テーブルに記憶されている文字情報又はステップS209で認識された文字情報が誤りであると判定されたか否かを判定する(ステップS212)。利用者により、出力された文字情報が誤りであると判定されなかった場合、登録部227は、一連のステップを終了する。
Next, the
一方、利用者により、出力された文字情報が誤りであると判定された場合、登録部227は、登録処理を実行し(ステップS213)、一連のステップを終了する。即ち、辞書テーブルに、検出された帳票レイアウトの種類に対応する辞書が記憶されておらず且つ認識された文字情報が誤りであった場合、登録部227は、登録処理を実行する。なお、登録部227は、検出された帳票レイアウトの種類に対応する辞書が記憶されていない場合、認識された文字情報が正しかったか誤りであったかに関わらず、登録処理を実行してもよい。登録処理の詳細については後述する。
On the other hand, when the user determines that the output character information is incorrect, the
なお、ステップS206において、文字特定部224は、画像が類似するか否かを判定する代わりに、特徴量が類似するか否かを判定してもよい。その場合、文字特定部224は、抽出された入力部分画像の特徴量を算出し、算出した特徴量と、抽出された辞書に記憶されている特徴量とが類似するか否かを判定する。文字特定部224が算出する特徴量は、辞書に記憶されている特徴量と同じ種類の特徴量である。文字特定部224は、入力部分画像の特徴量と辞書に記憶されている特徴量との類似の程度を算出する。文字特定部224は、算出した類似の程度が閾値以上であるか否かにより、入力部分画像の特徴量と辞書に記憶されている特徴量とが類似するか否かを判定する。類似の程度は、例えば各特徴量(特徴ベクトル)の内積値である。
In step S206, the
入力部分画像の特徴量と辞書に記憶されている特徴量とが類似する場合、ステップS207で、文字特定部224は、その辞書に記憶されている文字情報に示される文字を対象文字として特定する。また、入力部分画像の特徴量と辞書に記憶されている特徴量とが類似しない場合、ステップS204で、抽出部223は、検出された帳票レイアウトの種類に対応する他の辞書を新たに抽出する。そして、ステップS205で、抽出部223は、新たに抽出した辞書に含まれる位置情報に基づいて、入力帳票画像から第2入力部分画像を抽出する。第2入力部分画像の特徴量と新たに抽出された辞書に記憶されている特徴量とが類似する場合、ステップS207で、文字特定部224は、入力帳票画像には、新たに抽出された辞書に記憶されている文字情報に示される文字を対象文字として特定する。
When the feature amount of the input partial image and the feature amount stored in the dictionary are similar, in step S207, the
このように、文字特定部224は、入力部分画像の特徴量と、検出された帳票レイアウトの種類に対応して辞書テーブルに記憶されている部分画像の特徴量とが類似するか否かを判定する。文字特定部224は、入力部分画像の特徴量と、検出された帳票レイアウトの種類に対応して記憶されている部分画像の特徴量とが類似する場合、入力帳票画像には、その帳票レイアウトの種類に対応して記憶されている文字情報が記載されているものとする。また、入力部分画像の特徴量と、特定の辞書に含まれる特徴量とが類似しない場合、抽出部223は、検出された帳票レイアウトの種類に対応して辞書テーブルに記憶されている他の辞書を抽出する。そして、抽出部223は、抽出した他の辞書に含まれる位置情報に基づいて、入力帳票画像から第2入力部分画像を抽出する。文字特定部224は、第2入力部分画像の特徴量とその他の辞書に含まれる特徴量とが類似する場合、入力帳票画像には、その他の辞書に含まれる文字情報が記載されているものとする。
In this way, the
文字特定部224は、特徴量を用いることによって、より精度良く且つより高速に、入力部分画像と部分画像が類似しているか否かを判定することができる。
By using the feature amount, the
また、ステップS207において、文字特定部224は、入力部分画像と最も類似する部分画像が記憶された辞書を用いて対象文字を特定してもよい。その場合、文字特定部224は、検出された帳票レイアウトの種類に対応する全ての辞書について、各位置情報に対応する入力部分画像又はその特徴量と、各部分画像又はその特徴量との類似の程度を算出する。そして、文字特定部224は、類似の程度が最大である部分画像又は特徴量が記憶された辞書を用いて対象文字を特定する。これにより、文字特定部224は、より精度良く、検出対象の文字を特定することができる。
Further, in step S207, the
また、ステップS202において、レイアウト検出部222は、公知のOCR技術を利用して、入力帳票画像から文字情報を認識してもよい。その場合、レイアウトテーブルには、各帳票レイアウトの種類に関連付けて、検出対象の文字情報が記載される画像内の位置と、その文字情報のフォーマット(例えば「株式会社」又は「有限会社」を含む等)とが記憶される。レイアウト検出部222は、入力帳票画像内の、検出した帳票レイアウトの種類に関連付けられた位置から文字情報を認識する。認識した文字情報が、検出した帳票レイアウトの種類に関連付けられたフォーマットに対応する場合、第2処理回路220は、処理をステップS210へ移行し、認識された文字情報を出力する。一方、認識した文字情報が、検出した帳票レイアウトの種類に関連付けられたフォーマットに対応しない場合、第2処理回路220は、ステップS204〜S209の処理を実行し、辞書を用いて文字情報を特定する。
Further, in step S202, the
レイアウトテーブルは、帳票レイアウトの種類毎に、検出対象の文字情報を検出するための概略的な情報が記憶された全体辞書として機能する。一方、辞書テーブルに記憶される各辞書は、個別の局所領域毎に、検出対象の文字情報を特定するための詳細な情報が記憶された個別辞書として機能する。情報処理装置200は、全体辞書と個別辞書とを組合せて使用することにより、検出対象の文字情報を精度良く特定することができる。 The layout table functions as an overall dictionary in which general information for detecting character information to be detected is stored for each type of form layout. On the other hand, each dictionary stored in the dictionary table functions as an individual dictionary in which detailed information for specifying character information to be detected is stored for each individual local area. The information processing device 200 can accurately identify the character information to be detected by using the general dictionary and the individual dictionary in combination.
図7は、登録処理の動作の例を示すフローチャートである。図7に示す動作のフローは、図6に示すフローチャートのステップS213において実行される。 FIG. 7 is a flowchart showing an example of the operation of the registration process. The flow of the operation shown in FIG. 7 is executed in step S213 of the flowchart shown in FIG.
最初に、登録部227は、ステップS210で出力された文字情報が辞書を使用して特定された文字情報であるか否か、即ちステップS207で特定された文字情報であるか否かを判定する(ステップS301)。出力された文字情報が辞書を使用して特定された文字情報でない場合、即ち出力された文字情報がOCRで認識された文字情報である場合、登録部227は、処理をステップS303へ移行する。
First, the
一方、出力された文字情報が辞書を使用して特定された文字情報である場合、登録部227は、入力帳票画像内で、その辞書に含まれる位置情報に示される位置を表示装置203に表示して、利用者に通知する(ステップS302)。これにより、利用者は、誤って特定された文字情報が、入力帳票画像内のどの領域に基づいて特定されたかを認識することができ、新たに辞書として登録する領域を入力帳票画像内のどの領域に設定するかを適切に決定することができる。したがって、情報処理装置200は、新たに登録される辞書の品質を向上させることができる。
On the other hand, when the output character information is the character information specified by using the dictionary, the
なお、情報処理装置200は、辞書テーブルにおいて、各辞書に対応する入力帳票画像を記憶しておき、登録部227は、その辞書に対応する入力帳票画像を表示装置203に表示してもよい。これにより、利用者は、誤って特定された文字情報が、どのような入力帳票画像に基づいて特定されたかを認識することができ、新たに辞書として登録する領域を入力帳票画像内のどの領域に設定するかをより適切に決定することができる。
The information processing device 200 may store the input form image corresponding to each dictionary in the dictionary table, and the
次に、登録部227は、入力装置202を用いて利用者から、入力帳票画像内で領域及び対象文字の指定を受け付ける(ステップS303)。指定されるべき領域は、その入力帳票画像内で特徴的な画像を含む領域である。指定されるべき対象文字は、その入力帳票画像から検出されるべき文字である。利用者により、対象文字が含まれる領域が指定された場合、登録部227は、実際の文字情報が記載されている部分画像を辞書として登録することができ、文字特定部224は、検出対象の文字をより精度良く特定することができる。但し、指定される領域は、対象文字が含まれない領域でもよい。また、指定される領域は、既に辞書に登録されている領域と同一の領域又は重複する領域でもよい。
Next, the
次に、登録部227は、受け付けた領域及び対象文字に対応する辞書を辞書テーブルに登録し(ステップS304)、一連のステップを終了する。登録部227は、入力帳票画像から、受け付けた領域に対応する部分画像を切り出し、又は、その部分画像の特徴量を算出する。また、登録部227は、入力帳票画像における、受け付けた領域の位置情報を特定する。また、登録部227は、受け付けた対象文字を示す文字情報を生成する。そして、登録部227は、切り出した部分画像又は算出した特徴量、特定した位置情報、及び、生成した文字情報を含む辞書を生成する。登録部227は、新たに生成する辞書の優先順位として、既に存在する全ての辞書の優先順位より低い順位を設定する。なお、登録部227は、新たに生成する辞書の優先順位として、既に存在する全ての辞書の優先順位より高い順位を設定してもよい。登録部227は、生成した辞書を、レイアウト検出部222により検出された帳票レイアウトの種類に対応付けて辞書テーブルに登録する。
Next, the
情報処理装置200は、認識又は特定に失敗した入力帳票画像に基づいて新たに辞書を登録することにより、以降にその入力帳票画像と同一の帳票フォーマットを有する入力帳票画像を処理する際に、検出対象の文字を精度良く特定することができる。 The information processing device 200 detects when processing an input form image having the same form format as the input form image by registering a new dictionary based on the input form image that has failed to be recognized or specified. The target character can be specified with high accuracy.
なお、登録部227は、一つの対象文字に対して複数の領域を登録してもよい。その場合、ステップS303において、登録部227は、利用者から一つの対象文字と複数の領域の指定を受け付ける。ステップS304において、登録部227は、指定された複数の領域にそれぞれ対応する複数の部分画像、複数の特徴量及び複数の位置情報を、対象文字に対応する文字情報と関連付けた辞書を生成する。また、図6のステップS205において、抽出部223は、複数の入力部分画像を抽出する。ステップS206において、文字特定部224は、複数の入力部分画像又はその特徴量と、複数の部分画像又はその特徴量とが類似するか否かを判定する。文字特定部224は、各入力部分画像又はその特徴量と、対応する各部分画像又はその特徴量の類似の程度の平均値又は重み付け和が閾値以上であるか否かにより、複数の入力部分画像又はその特徴量と複数の部分画像又はその特徴量とが類似するか否かを判定する。
The
図8は、入力帳票画像800の一例を示す模式図である。
FIG. 8 is a schematic diagram showing an example of the
図8に示すように、入力帳票画像800は、請求書が撮像された画像である。入力帳票画像800には、請求元の会社名801及び請求先の会社名802が含まれている。入力帳票画像800では、請求元の会社名801が対象文字である。請求元の会社名801上には印鑑803が重畳されている。
As shown in FIG. 8, the
例えば、図6のステップS203で入力帳票画像800の帳票レイアウトの種類に対応する辞書が辞書テーブルに記憶されていなかった場合、ステップS209で文字情報が認識される。仮に、キーワード「会社」を含む請求元の会社名801と請求先の会社名802の二つの文字列が認識され、右側に位置する請求元の会社名801が対象文字として検出された場合、ステップS212で文字情報が正しいと判定され、認識処理は終了する。一方、請求元の会社名801上に印鑑803が重畳されていることにより、請求元の会社名801に含まれるキーワード「会社」が認識されなかった場合、請求先の会社名802が対象文字として検出される。その場合、登録処理が実行され、例えば、利用者により、請求元の会社名801を含む領域804と、請求元の会社名801を示す対象文字「XYZ開発株式会社」とが指定され、指定された領域及び対象文字に対応する辞書が辞書テーブルに登録される。
For example, if the dictionary corresponding to the type of the form layout of the
一方、ステップS203で入力帳票画像800の帳票レイアウトの種類に対応する辞書が辞書テーブルに記憶されていた場合、ステップS204で優先順位が最も高い辞書が抽出される。ステップS205でその辞書に含まれる位置情報に示される位置から入力部分画像が抽出され、ステップS206でその入力部分画像とその辞書に含まれる部分画像とが類似するか否かが判定される。仮に、その辞書に含まれる位置情報に示される位置が請求元の会社名801を含む領域804を示す場合、入力部分画像として請求元の会社名801を含む領域804が抽出される。その入力部分画像とその辞書に含まれる部分画像とが類似すると判定された場合、その辞書に含まれる文字情報「XYZ開発株式会社」が出力される。その場合、ステップS212で文字情報が正しいと判定され、認識処理は終了する。一方、請求元の会社名801上に重畳された印鑑803の位置と、その辞書に含まれる部分画像内の印鑑の位置とが異なることにより、入力部分画像と部分画像が類似しないと判定された場合、ステップS204で優先順位がより低い辞書が抽出される。
On the other hand, when the dictionary corresponding to the type of the form layout of the
仮に他の辞書が存在しない場合、ステップS209で文字情報が認識される。そして、文字情報の認識に失敗した場合、登録処理が実行される。なお、利用者は、印鑑803が重畳された請求元の会社名801でなく、例えば、振込先の口座番号を含む領域805のように他の特徴を含む領域と、請求元の会社名801を示す対象文字「XYZ開発株式会社」とを指定することができる。この場合も、利用者により指定された領域及び対象文字に対応する辞書が辞書テーブルに新たに登録される。
If no other dictionary exists, the character information is recognized in step S209. Then, when the recognition of the character information fails, the registration process is executed. In addition, the user does not have the
一方、他の辞書が存在する場合、ステップS205でその辞書に含まれる位置情報に示される位置から第2入力部分画像が抽出され、ステップS206で第2入力部分画像とその辞書に含まれる部分画像とが類似するか否かが判定される。仮に、その辞書に含まれる位置情報に示される位置が振込先の口座を含む領域805を示す場合、第2入力部分画像として振込先の口座番号を含む領域805が抽出される。第2入力部分画像とその辞書に含まれる部分画像とが類似すると判定された場合、その辞書に含まれる文字情報「XYZ開発株式会社」が出力される。その場合も、ステップS212で文字情報が正しいと判定され、認識処理は終了する。
On the other hand, when another dictionary exists, the second input partial image is extracted from the position indicated by the position information included in the dictionary in step S205, and the second input partial image and the partial image included in the dictionary are included in step S206. It is determined whether or not is similar to. If the position shown in the location information included in the dictionary indicates the
また仮に、登録された辞書を用いて特定された文字情報が誤っていた場合も、登録処理が実行される。その場合、ステップS302において、入力帳票画像内で、その辞書に含まれる位置情報で示される位置が表示されるため、利用者は、その位置を除く特徴的な領域を指定することができる。これにより、情報処理装置200は、より品質の高い辞書を登録することができる。 Further, even if the character information specified by using the registered dictionary is incorrect, the registration process is executed. In that case, in step S302, since the position indicated by the position information included in the dictionary is displayed in the input form image, the user can specify a characteristic area excluding the position. As a result, the information processing apparatus 200 can register a higher quality dictionary.
以上詳述したように、情報処理装置200は、入力帳票画像の帳票レイアウトの種類に対応する、過去に認識に失敗した部分画像、部分画像の位置情報及び部分画像に対応する文字情報を規定する個別辞書を用いて、対象文字を検出する。これにより、情報処理装置200は、入力帳票画像に記載されている文字情報をより正しく出力することが可能となった。 As described in detail above, the information processing apparatus 200 defines partial images that have failed to be recognized in the past, position information of the partial images, and character information corresponding to the partial images, which correspond to the type of form layout of the input form image. The target character is detected using an individual dictionary. As a result, the information processing apparatus 200 can more correctly output the character information described in the input form image.
その結果、情報処理装置200は、入力装置202を用いて利用者から検出対象の文字情報の修正を受け付ける回数が減少し、入力帳票画像を扱う処理におけるプロセッサの処理負荷を低減させることが可能となった。また情報処理装置200は、他の情報処理装置に検出対象の文字列に関する情報を送信する場合、他の情報処理装置から検出対象の文字列の修正要求を受信する回数が減少し、情報処理装置200と他の情報処理装置の間の通信量を低減させることが可能となった。
As a result, the information processing device 200 can reduce the number of times the
また、画像処理システム1は、OCR及びRPA(Robotic Process Automation)技術を利用して帳票入力業務を自動化する企業において、帳票入力業務の効率化を図り、担当者の業務負担を軽減させることが可能となった。特に、画像処理システム1は、請求書等の帳票を電子化して支払い依頼等の業務を自動化する場合、請求元の会社名を精度良く特定する必要がある。しかしながら、請求元の会社名には、一般的なフォントでなくデザイン性が高い特殊なフォントが使用されている場合や、社印等が重畳されている場合がある。そのような場合、OCRを利用して、請求元の会社名を正しく認識できない可能性がある。情報処理装置200は、過去に認識に失敗した部分画像を用いた個別辞書を利用することにより、請求元の会社名を精度良く特定することが可能となった。したがって、情報処理装置200は、請求元の会社名毎に、入力帳票画像を適切に分類して仕分けることが可能となった。
In addition, the
特に、請求書、領収書等の帳票における帳票レイアウトは会社毎に異なり、一つの会社の帳票は同一の帳票レイアウトに従って作成されている可能性が高い。情報処理装置200は、複数の辞書を帳票レイアウトの種類と対応付けて記憶しておき、入力帳票画像の帳票レイアウトに応じて、使用する辞書を変更する。これにより、情報処理装置200は、検出対象の会社名を精度良く検出することが可能となった。 In particular, the form layout of invoices, receipts, and other forms differs from company to company, and there is a high possibility that the forms of one company are created according to the same form layout. The information processing device 200 stores a plurality of dictionaries in association with the type of form layout, and changes the dictionary to be used according to the form layout of the input form image. As a result, the information processing apparatus 200 can accurately detect the company name to be detected.
また、情報処理装置200では、認識に失敗した入力帳票画像から、辞書として登録する部分画像を利用者が任意に選択することができる。これにより、利用者は、対象文字が含まれる画像、又は、銀行口座、住所、電話番号、FAX番号、ロゴ等のように対象文字に一意に対応する情報が含まれる画像を部分画像として選択することができる。したがって、情報処理装置200は、より品質の高い辞書を登録することが可能となった。 Further, in the information processing apparatus 200, the user can arbitrarily select a partial image to be registered as a dictionary from the input form image that has failed to be recognized. As a result, the user selects an image containing the target character or an image containing information uniquely corresponding to the target character such as a bank account, an address, a telephone number, a fax number, a logo, etc. as a partial image. be able to. Therefore, the information processing apparatus 200 can register a higher quality dictionary.
図9は、他の実施形態に係る情報処理装置における第2処理回路230の概略構成を示すブロック図である。
FIG. 9 is a block diagram showing a schematic configuration of the
第2処理回路230は、第2処理回路220の代わりに、認識処理を実行する。第2処理回路230は、取得回路231、レイアウト検出回路232、抽出回路233、文字特定回路234、文字認識回路235、出力制御回路236及び登録回路237等を有する。
The
取得回路231は、取得部の一例であり、取得部221と同様の機能を有する。取得回路231は、入力帳票画像を、第2インタフェース装置201を介して画像読取装置100から取得し、第2記憶装置210に保存する。
The
レイアウト検出回路232は、レイアウト検出部の一例であり、レイアウト検出部222と同様の機能を有する。レイアウト検出回路232は、第2記憶装置210からレイアウトテーブル及び入力帳票画像を読み出し、帳票レイアウトの種類を検出し、検出結果を第2記憶装置210に保存する。
The
抽出回路233は、抽出部の一例であり、抽出部223と同様の機能を有する。抽出回路233は、第2記憶装置210から辞書テーブル、入力帳票画像及び帳票レイアウトの種類の検出結果を読み出し、入力帳票画像から入力部分画像を抽出し、第2記憶装置210に保存する。
The
文字特定回路234は、文字特定部の一例であり、文字特定部224と同様の機能を有する。文字特定回路234は、第2記憶装置210から辞書テーブル、入力帳票画像及び入力部分画像を読み出し、入力部分画像と部分画像が類似するか否かに応じて文字情報を特定し、特定結果を第2記憶装置210に保存する。
The
文字認識回路235は、文字認識部の一例であり、文字認識部225と同様の機能を有する。文字認識回路235は、第2記憶装置210から入力帳票画像を読み出し、文字情報を認識し、認識結果を第2記憶装置210に保存する。
The
出力制御回路236は、出力制御部の一例であり、出力制御部226と同様の機能を有する。出力制御回路236は、第2記憶装置210から文字情報の特定結果及び認識結果を読み出し、文字情報を表示装置203に出力する。
The
登録回路237は、登録部の一例であり、登録部227と同様の機能を有する。登録回路237は、入力装置202から入力帳票画像内の領域及び対象文字の指定を受け付け、受け付けた各情報に対応する辞書を第2記憶装置210に登録する。
The
以上詳述したように、情報処理装置は、第2処理回路230を用いる場合も、入力帳票画像に記載されている文字情報をより正しく出力することが可能となった。
As described in detail above, the information processing apparatus can more accurately output the character information described in the input form image even when the
以上、好適な実施形態について説明してきたが、実施形態はこれらに限定されない。例えば、画像読取装置100と情報処理装置200の機能分担は、図1に示す画像処理システム1の例に限られず、画像読取装置100及び情報処理装置200の各部を画像読取装置100と情報処理装置200の何れに配置するかは適宜変更可能である。または、画像読取装置100と情報処理装置200を一つの装置で構成してもよい。
Although suitable embodiments have been described above, the embodiments are not limited thereto. For example, the division of functions between the image reading device 100 and the information processing device 200 is not limited to the example of the
例えば、画像読取装置100の第1記憶装置110が、情報処理装置200の第2記憶装置210に記憶された各プログラム及び各データを記憶してもよい。また、画像読取装置100の第1処理回路120が、情報処理装置200の第2処理回路220により実現される各部として動作してもよい。また、画像読取装置100が、情報処理装置200の第2処理回路230と同様の処理回路を有してもよい。
For example, the
その場合、画像読取装置100は、入力装置202と同様の入力装置及び表示装置203と同様の表示装置を有する。認識処理は画像読取装置100で実行されるため、ステップS102、S201の帳票画像の送受信処理は省略される。ステップS202〜S213の各処理は、画像読取装置100の第1処理回路120によって実行される。これらの処理の動作は、情報処理装置200の第2処理回路220又は第2処理回路230によって実行される場合と同様である。この場合、画像読取装置100が画像処理装置として動作する。
In that case, the image reading device 100 has an input device similar to the
また、画像処理システム1において、第1インタフェース装置101と第2インタフェース装置201は、インターネット、電話回線網(携帯端末回線網、一般電話回線網を含む)、イントラネット等のネットワークを介して接続してもよい。その場合、第1インタフェース装置101及び第2インタフェース装置201に、接続するネットワークの通信インタフェース回路を備える。また、その場合、クラウドコンピューティングの形態で画像処理のサービスを提供できるように、ネットワーク上に複数の情報処理装置を分散して配置し、各情報処理装置が協働して、認識処理等を分担するようにしてもよい。これにより、画像処理システム1は、複数の画像読取装置が読み取った帳票画像について、効率よく認識処理を実行できる。
Further, in the
200 情報処理装置
203 表示装置
210 第2記憶装置
221 取得部
222 レイアウト検出部
223 抽出部
225 文字認識部
227 登録部
200
Claims (8)
入力帳票画像を取得する取得部と、
前記入力帳票画像に基づいて、帳票レイアウトの種類を検出するレイアウト検出部と、
前記検出された帳票レイアウトの種類に対応して前記記憶部に記憶されている前記位置情報に基づいて、前記入力帳票画像から入力部分画像を抽出する抽出部と、
前記入力部分画像と前記検出された帳票レイアウトの種類に対応して前記記憶部に記憶されている前記部分画像とが類似する場合、又は、前記入力部分画像の特徴量と前記検出された帳票レイアウトの種類に対応して前記記憶部に記憶されている前記部分画像の特徴量とが類似する場合、前記入力帳票画像には、前記検出された帳票レイアウトの種類に対応して前記記憶部に記憶されている前記文字情報が記載されているものとして、当該文字情報を出力する出力部と、
を有することを特徴とする画像処理装置。 The partial image or the feature amount of the partial image that failed to be recognized in the past, the position information in the form of the partial image, and the character information corresponding to the partial image are stored for each type of a plurality of form layouts. Memory and
The acquisition unit that acquires the input form image and
A layout detection unit that detects the type of form layout based on the input form image, and
An extraction unit that extracts an input partial image from the input form image based on the position information stored in the storage unit according to the type of the detected form layout.
When the input partial image and the partial image stored in the storage unit corresponding to the type of the detected form layout are similar, or when the feature amount of the input partial image and the detected form layout are used. When the feature amount of the partial image stored in the storage unit is similar to the type of the input form image, the input form image is stored in the storage unit according to the type of the detected form layout. Assuming that the character information is described, an output unit that outputs the character information and
An image processing device characterized by having.
前記出力部は、前記認識された文字情報を出力し、
前記登録部は、利用者により前記認識された文字情報が誤りであると判定された場合に、前記入力帳票画像内で領域及び対象文字の指定を受け付ける、請求項3に記載の画像処理装置。 When the partial image or feature amount, position information, and character information corresponding to the detected form layout type are not stored in the storage unit, a character recognition unit that recognizes character information by OCR from the input form image is further added. Have and
The output unit outputs the recognized character information and outputs the recognized character information.
The image processing device according to claim 3, wherein the registration unit accepts designation of an area and a target character in the input form image when it is determined by the user that the recognized character information is incorrect.
前記入力部分画像と前記検出された帳票レイアウトの種類に対応して前記記憶部に記憶されている特定の情報群に含まれる前記部分画像とが類似しない場合、又は、前記入力部分画像の特徴量と前記特定の情報群に含まれる前記特徴量とが類似しない場合、
前記抽出部は、前記検出された帳票レイアウトの種類に対応して前記記憶部に記憶されている他の情報群に含まれる前記位置情報に基づいて、前記入力帳票画像から第2入力部分画像を抽出し、
前記出力部は、前記第2入力部分画像と前記他の情報群に含まれる前記部分画像とが類似する場合、又は、前記第2入力部分画像の特徴量と前記他の情報群に含まれる前記特徴量とが類似する場合、前記入力帳票画像には、前記他の情報群に含まれる前記文字情報が記載されているものとして、当該文字情報を出力する、請求項1〜5の何れか一項に記載の画像処理装置。 The storage unit contains a plurality of information groups including a partial image that has failed to be recognized in the past, a feature amount of the partial image, position information of the partial image in a form, and character information corresponding to the partial image. , Stored for each type of the plurality of form layouts
When the input partial image and the partial image included in the specific information group stored in the storage unit corresponding to the type of the detected form layout are not similar, or the feature amount of the input partial image. And the feature amount contained in the specific information group are not similar to each other.
The extraction unit obtains a second input partial image from the input form image based on the position information included in other information groups stored in the storage unit according to the type of the detected form layout. Extract and
When the second input partial image and the partial image included in the other information group are similar to each other, or the feature amount of the second input partial image and the partial image included in the other information group are included in the output unit. When the feature amount is similar, it is assumed that the character information included in the other information group is described in the input form image, and the character information is output. Any one of claims 1 to 5. The image processing apparatus according to the section.
過去に認識に失敗した部分画像又は当該部分画像の特徴量、当該部分画像の帳票内の位置情報、及び、当該部分画像に対応する文字情報を、複数の帳票レイアウトの種類毎に前記記憶部に記憶し、
入力帳票画像を取得し、
前記入力帳票画像に基づいて、帳票レイアウトの種類を検出し、
前記検出された帳票レイアウトの種類に対応して前記記憶部に記憶されている前記位置情報に基づいて、前記入力帳票画像から入力部分画像を抽出し、
前記入力部分画像と前記検出された帳票レイアウトの種類に対応して前記記憶部に記憶されている前記部分画像とが類似する場合、又は、前記入力部分画像の特徴量と前記検出された帳票レイアウトの種類に対応して前記記憶部に記憶されている前記部分画像の特徴量とが類似する場合、前記入力部分画像には、前記検出された帳票レイアウトの種類に対応して前記記憶部に記憶されている前記文字情報が記載されているものとして、当該文字情報を前記出力部から出力する、
ことを特徴とする制御方法。 A control method for an image processing device having a storage unit and an output unit, wherein the image processing device
The partial image or the feature amount of the partial image that failed to be recognized in the past, the position information in the form of the partial image, and the character information corresponding to the partial image are stored in the storage unit for each type of a plurality of form layouts. Remember,
Get the input form image and
Based on the input form image, the type of form layout is detected.
An input partial image is extracted from the input form image based on the position information stored in the storage unit corresponding to the type of the detected form layout.
When the input partial image and the partial image stored in the storage unit corresponding to the type of the detected form layout are similar, or when the feature amount of the input partial image and the detected form layout are used. When the feature amount of the partial image stored in the storage unit is similar to the type of the input partial image, the input partial image is stored in the storage unit according to the type of the detected form layout. Assuming that the character information is described, the character information is output from the output unit.
A control method characterized by that.
過去に認識に失敗した部分画像又は当該部分画像の特徴量、当該部分画像の帳票内の位置情報、及び、当該部分画像に対応する文字情報を、複数の帳票レイアウトの種類毎に前記記憶部に記憶し、
入力帳票画像を取得し、
前記入力帳票画像に基づいて、帳票レイアウトの種類を検出し、
前記検出された帳票レイアウトの種類に対応して前記記憶部に記憶されている前記位置情報に基づいて、前記入力帳票画像から入力部分画像を抽出し、
前記入力部分画像と前記検出された帳票レイアウトの種類に対応して前記記憶部に記憶されている前記部分画像とが類似する場合、又は、前記入力部分画像の特徴量と前記検出された帳票レイアウトの種類に対応して前記記憶部に記憶されている前記部分画像の特徴量とが類似する場合、前記入力部分画像には、前記検出された帳票レイアウトの種類に対応して前記記憶部に記憶されている前記文字情報が記載されているものとして、当該文字情報を前記出力部から出力する、
ことを前記コンピュータに実行させることを特徴とする制御プログラム。 A computer control program having a storage unit and an output unit.
The partial image or the feature amount of the partial image that failed to be recognized in the past, the position information in the form of the partial image, and the character information corresponding to the partial image are stored in the storage unit for each type of a plurality of form layouts. Remember,
Get the input form image and
Based on the input form image, the type of form layout is detected.
An input partial image is extracted from the input form image based on the position information stored in the storage unit corresponding to the type of the detected form layout.
When the input partial image and the partial image stored in the storage unit corresponding to the type of the detected form layout are similar, or when the feature amount of the input partial image and the detected form layout are used. When the feature amount of the partial image stored in the storage unit is similar to the type of the input partial image, the input partial image is stored in the storage unit according to the type of the detected form layout. Assuming that the character information is described, the character information is output from the output unit.
A control program characterized by causing the computer to execute such a thing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020048290A JP2021149459A (en) | 2020-03-18 | 2020-03-18 | Image processor, control method, and control program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020048290A JP2021149459A (en) | 2020-03-18 | 2020-03-18 | Image processor, control method, and control program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2021149459A true JP2021149459A (en) | 2021-09-27 |
Family
ID=77848927
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020048290A Pending JP2021149459A (en) | 2020-03-18 | 2020-03-18 | Image processor, control method, and control program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2021149459A (en) |
-
2020
- 2020-03-18 JP JP2020048290A patent/JP2021149459A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110046529B (en) | Two-dimensional code identification method, device and equipment | |
JP5701182B2 (en) | Image processing apparatus, image processing method, and computer program | |
JP6099457B2 (en) | Image processing apparatus, area determination method, and computer program | |
JP5826081B2 (en) | Image processing apparatus, character recognition method, and computer program | |
US10970579B2 (en) | Image processing apparatus for placing a character recognition target region at a position of a predetermined region in an image conforming to a predetermined format | |
JP6970835B2 (en) | Image processing device, control method and control program | |
US9171224B2 (en) | Method of improving contrast for text extraction and recognition applications | |
JP2005316755A (en) | Two-dimensional rectangular code symbol reader and two-dimensional rectangular code symbol reading method | |
US20100158375A1 (en) | Signal processing apparatus, signal processing method, computer-readable medium and computer data signal | |
CN105701489B (en) | Novel digital extraction and identification method and system | |
CN110807454B (en) | Text positioning method, device, equipment and storage medium based on image segmentation | |
JP2011008549A (en) | Image processor, image reader, multifunctional machine, image processing method, program, and recording medium | |
JP2014147046A (en) | Image processing apparatus, image processing method, and computer program | |
JP2021149452A (en) | Image processing device, control method and control program | |
JPWO2018167974A1 (en) | Image processing apparatus, control method and control program | |
JP2021149459A (en) | Image processor, control method, and control program | |
JP6970834B2 (en) | Image processing device, control method and control program | |
JP3268552B2 (en) | Area extraction method, destination area extraction method, destination area extraction apparatus, and image processing apparatus | |
CN114529922A (en) | Method for identifying table structure of wireless frame table image | |
JP7282257B2 (en) | Image processing device, control method and control program | |
JP7478628B2 (en) | Image processing device, control method, and control program | |
JP2010287178A (en) | Image processing device, image reading apparatus, multifunction machine, image processing method, program and recording medium | |
CN112825141B (en) | Method and device for recognizing text, recognition equipment and storage medium | |
WO2020157937A1 (en) | Image processing device, control method, and control program | |
JP2021176080A (en) | Image processing apparatus, image direction determining method, image processing system, region determining method, and program |