JP2021099688A - Image processor, image processing method, and program - Google Patents

Image processor, image processing method, and program Download PDF

Info

Publication number
JP2021099688A
JP2021099688A JP2019231387A JP2019231387A JP2021099688A JP 2021099688 A JP2021099688 A JP 2021099688A JP 2019231387 A JP2019231387 A JP 2019231387A JP 2019231387 A JP2019231387 A JP 2019231387A JP 2021099688 A JP2021099688 A JP 2021099688A
Authority
JP
Japan
Prior art keywords
item
character string
item name
item value
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2019231387A
Other languages
Japanese (ja)
Inventor
茂雄 福岡
Shigeo Fukuoka
茂雄 福岡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2019231387A priority Critical patent/JP2021099688A/en
Publication of JP2021099688A publication Critical patent/JP2021099688A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Character Input (AREA)

Abstract

To provide an image processor that selects a target with an item name and an item value for which a combination is to be regenerated.SOLUTION: An image processor 100 includes: an area analysis unit 202 that identifies a character string area included in a scan image; a character recognition unit 203 that recognizes a character string in the character string area; an item name extraction unit 205 and an item value extraction unit 207 that extract an item value and an item name from the recognized character string; a combination generation unit 208 that determines the extracted item value associated with the extracted item name based on at least a positional relationship between the item value and the item name, and generates a combination of one item name and one or more item values so that the determined item value is not associated with a plurality of item names; and a target selection unit 209 that selects, based on the positional relationship, a target including an item name and an item value for which the combination is to be regenerated.SELECTED DRAWING: Figure 2

Description

本開示は、スキャン画像に含まれる項目名と項目値との組み合わせを生成する技術に関する。 The present disclosure relates to a technique for generating a combination of an item name and an item value included in a scanned image.

帳票等をスキャンして得られたスキャン画像からスキャン画像に含まれる特定の情報を抽出する方法がある。 There is a method of extracting specific information contained in a scanned image from a scanned image obtained by scanning a form or the like.

特許文献1には、帳票画像内から認識された文字列のうち、項目名と判定された文字列とデータ文字列との位置関係から、データ文字列(項目値)と項目名とを対応付けて、データ文字列の属性を判定する方法が記載されている。 In Patent Document 1, among the character strings recognized from the form image, the data character string (item value) and the item name are associated with each other based on the positional relationship between the character string determined to be the item name and the data character string. The method for determining the attribute of the data character string is described.

特開2008−204226号公報Japanese Unexamined Patent Publication No. 2008-204226

帳票をスキャンして得られたスキャン画像から文字認識処理をする場合、帳票の汚れや掠れなどによるスキャン画像の劣化によって、文字の誤認識が発生することがある。誤認識された文字列が含まれる文字認識処理の結果に対して、位置関係に基づき項目名とその項目名に対応する項目値との組み合わせを生成する処理を行うと、誤った組み合わせが生成されることがある。このため、誤った組み合わせが出力されないように、誤って生成された組み合わせの候補に対しては組み合わせの再生成を行うことが求められる。しかしながら、誤って生成された組み合わせの候補を選択するのは手間を要する。 When character recognition processing is performed from a scanned image obtained by scanning a form, erroneous recognition of characters may occur due to deterioration of the scanned image due to dirt or blurring of the form. When the result of the character recognition process including the erroneously recognized character string is processed to generate the combination of the item name and the item value corresponding to the item name based on the positional relationship, the erroneous combination is generated. There are times. Therefore, it is required to regenerate the combinations for the candidates of the erroneously generated combinations so that the erroneous combinations are not output. However, it is troublesome to select a candidate for an erroneously generated combination.

本開示は、項目名と項目値との組み合わせの生成をやり直す対象を選択することを目的とする。 An object of the present disclosure is to select an object for regenerating a combination of an item name and an item value.

本開示の画像処理装置は、スキャン画像に含まれる項目名と項目値とを抽出して、1つの項目名と1または複数の項目値との組み合わせを生成する画像処理装置であって、前記スキャン画像に含まれる文字列領域を特定する特定手段と、前記文字列領域の文字列を認識する文字認識手段と、前記認識された文字列から項目値および項目名を抽出する抽出手段と、前記抽出された項目名に対応付けられる前記抽出された項目値を、少なくとも項目値と項目名との位置関係に基づき決定する決定手段と、前記決定された項目値が、複数の項目名に対応付けられないように前記組み合わせを生成する生成手段と、前記位置関係を用いて、前記生成をやり直す項目名と項目値とを含む対象を選択する選択手段と、を有することを特徴とする。 The image processing device of the present disclosure is an image processing device that extracts an item name and an item value included in a scanned image and generates a combination of one item name and one or a plurality of item values. A specific means for specifying a character string area included in an image, a character recognition means for recognizing a character string in the character string area, an extraction means for extracting an item value and an item name from the recognized character string, and the extraction. A determination means for determining the extracted item value associated with the item name based on at least the positional relationship between the item value and the item name, and the determined item value are associated with a plurality of item names. It is characterized by having a generation means for generating the combination so as not to be present, and a selection means for selecting an object including an item name and an item value for which the generation is redone by using the positional relationship.

本開示の技術によれば、項目名と項目値との組み合わせの生成をやり直す対象を選択することができる。 According to the technique of the present disclosure, it is possible to select a target for regenerating the combination of the item name and the item value.

画像処理装置のハードウェア構成を示す図。The figure which shows the hardware configuration of an image processing apparatus. 画像処理装置の機能構成を示す図。The figure which shows the functional structure of an image processing apparatus. 項目名および項目値の抽出処理を説明するための図。The figure for demonstrating the extraction process of item name and item value. 項目名に項目値を対応付ける処理を説明するための図。The figure for demonstrating the process of associating an item value with an item name. 複数の項目名に対応付けられた項目値を絞り込む処理を説明するための図。The figure for demonstrating the process of narrowing down the item values associated with a plurality of item names. 複数の項目名に対応付けられた項目値を絞り込む処理を説明するための図。The figure for demonstrating the process of narrowing down the item values associated with a plurality of item names. 生成された項目名と項目値との組み合わせを示す図。The figure which shows the combination of the generated item name and the item value. 項目名および項目値の抽出処理を説明するための図。The figure for demonstrating the extraction process of item name and item value. 項目名に項目値を対応付ける処理を説明するための図。The figure for demonstrating the process of associating an item value with an item name. 生成された項目名と項目値との組み合わせを示す図。The figure which shows the combination of the generated item name and the item value. スキャン画像から組み合わせを生成する処理を示すフローチャート。A flowchart showing a process of generating a combination from a scanned image. 再判定の対象を選択する処理を説明するための図。The figure for demonstrating the process of selecting the target of re-judgment. 項目名および項目値の抽出処理を説明するための図。The figure for demonstrating the extraction process of item name and item value. 生成された項目名と項目値との組み合わせを示す図。The figure which shows the combination of the generated item name and the item value. 再判定の対象を選択する処理を説明するための図。The figure for demonstrating the process of selecting the target of re-judgment. 再判定の対象を選択する処理を説明するための図。The figure for demonstrating the process of selecting the target of re-judgment. 再判定の対象を選択する処理を説明するための図。The figure for demonstrating the process of selecting the target of re-judgment.

以下、添付の図面を参照して、実施形態に基づいて詳細を説明する。なお、以下の実施形態において示す構成は一例に過ぎず、本発明は図示された構成に限定されるものではない。 Hereinafter, details will be described based on the embodiments with reference to the accompanying drawings. The configuration shown in the following embodiments is only an example, and the present invention is not limited to the illustrated configuration.

<実施形態1>
[ハードウェア構成]
図1は、本実施形態の画像処理装置100のハードウェア構成を示す図である。画像処理装置100は、CPU101、ROM102、RAM103、補助記憶装置104、表示部105、操作部106、通信I/F107、スキャナ109、及びバス108を有する。
<Embodiment 1>
[Hardware configuration]
FIG. 1 is a diagram showing a hardware configuration of the image processing device 100 of the present embodiment. The image processing device 100 includes a CPU 101, a ROM 102, a RAM 103, an auxiliary storage device 104, a display unit 105, an operation unit 106, a communication I / F 107, a scanner 109, and a bus 108.

CPU101は、ROM102やRAM103に格納されているコンピュータプログラムやデータを用いて画像処理装置100の全体を制御することで、後述する画像処理装置100の各機能を実現する。なお、画像処理装置100がCPU101とは異なる1又は複数の専用のハードウェアを有し、CPU101による処理の少なくとも一部を専用のハードウェアが実行してもよい。専用のハードウェアの例としては、ASIC(特定用途向け集積回路)、FPGA(フィールドプログラマブルゲートアレイ)、およびDSP(デジタルシグナルプロセッサ)などがある。ROM102は、変更を必要としないプログラムなどを格納する。RAM103は、補助記憶装置104から供給されるプログラムやデータ、及び通信I/F107を介して外部から供給されるデータなどを一時記憶する。補助記憶装置104は、例えばハードディスクドライブ等で構成され、スキャン画像の画像データなどの種々のデータを記憶する。 The CPU 101 realizes each function of the image processing device 100, which will be described later, by controlling the entire image processing device 100 by using computer programs and data stored in the ROM 102 and the RAM 103. The image processing device 100 may have one or more dedicated hardware different from the CPU 101, and the dedicated hardware may execute at least a part of the processing by the CPU 101. Examples of dedicated hardware include ASICs (application specific integrated circuits), FPGAs (field programmable gate arrays), and DSPs (digital signal processors). The ROM 102 stores a program or the like that does not need to be changed. The RAM 103 temporarily stores programs and data supplied from the auxiliary storage device 104, data supplied from the outside via the communication I / F 107, and the like. The auxiliary storage device 104 is composed of, for example, a hard disk drive or the like, and stores various data such as image data of a scanned image.

スキャナ109は、原稿を読取りスキャン画像の画像データを生成する画像読取部であり、例えば、オーバーヘッド型のスキャナである。スキャナ109は画像処理装置100とは別の装置として構成されてもよく、その場合、スキャナ109は、通信I/F107の通信機能を介して接続されてもよい。 The scanner 109 is an image scanning unit that reads a document and generates image data of a scanned image, and is, for example, an overhead scanner. The scanner 109 may be configured as a device separate from the image processing device 100, in which case the scanner 109 may be connected via the communication function of the communication I / F 107.

表示部105は、例えば液晶ディスプレイやLED等で構成され、ユーザが画像処理装置100を操作するためのGUI(Graphical User Interface)などを表示する。操作部106は、例えばキーボードやマウス、タッチパネル等で構成され、ユーザによる操作を受けて各種の指示をCPU101に入力する。CPU101は、表示部105を制御する表示制御部、及び操作部106を制御する操作制御部として動作する。 The display unit 105 is composed of, for example, a liquid crystal display, an LED, or the like, and displays a GUI (Graphical User Interface) for the user to operate the image processing device 100. The operation unit 106 is composed of, for example, a keyboard, a mouse, a touch panel, or the like, and inputs various instructions to the CPU 101 in response to an operation by the user. The CPU 101 operates as a display control unit that controls the display unit 105 and an operation control unit that controls the operation unit 106.

通信I/F107は、画像処理装置100の外部の装置との通信に用いられる。例えば、画像処理装置100が外部の装置と有線で接続される場合には、通信用のケーブルが通信I/F107に接続される。画像処理装置100が外部の装置と無線通信する機能を有する場合には、通信I/F107はアンテナを備える。バス108は、画像処理装置100の各部をつないで情報を伝達する。 The communication I / F 107 is used for communication with an external device of the image processing device 100. For example, when the image processing device 100 is connected to an external device by wire, a communication cable is connected to the communication I / F 107. When the image processing device 100 has a function of wirelessly communicating with an external device, the communication I / F 107 includes an antenna. The bus 108 connects each part of the image processing device 100 to transmit information.

本実施形態では表示部105と操作部106とが画像処理装置100の内部に存在するものとするが、表示部105と操作部106との少なくとも一方が画像処理装置100の外部に別の装置として存在していてもよい。 In the present embodiment, it is assumed that the display unit 105 and the operation unit 106 exist inside the image processing device 100, but at least one of the display unit 105 and the operation unit 106 is used as another device outside the image processing device 100. It may exist.

本実施形態の画像処理装置100は、例えば、スキャナ機能を有するMFP等の装置に含まれる画像処理装置として実現される。または、本実施形態の画像処理装置は、スキャナ部を有する装置からスキャン画像を取得して画像処理するサーバ等によって実現されてもよい。 The image processing device 100 of the present embodiment is realized as, for example, an image processing device included in a device such as an MFP having a scanner function. Alternatively, the image processing device of the present embodiment may be realized by a server or the like that acquires a scanned image from a device having a scanner unit and performs image processing.

[機能構成]
本実施形態の画像処理装置100は、スキャナ109が原稿をスキャンすることによって得られたスキャン画像から文字列を認識する装置である。また、画像処理装置100は、レシートのような原稿をスキャンして得られたスキャン画像に対して文字認識した結果から、例えば合計金額のような情報を抽出する機能も有する。
[Functional configuration]
The image processing device 100 of the present embodiment is a device that recognizes a character string from a scanned image obtained by scanning a document by a scanner 109. The image processing device 100 also has a function of extracting information such as a total amount of money from the result of character recognition of a scanned image obtained by scanning a document such as a receipt.

図2は本実施形態の画像処理装置100の機能構成を示すブロック図である。画像処理装置100は、画像処理部201、領域解析部202、文字認識部203、項目名抽出部205、項目値抽出部207、組み合わせ生成部208、対象選択部209、再生成部210、出力部211を有する。 FIG. 2 is a block diagram showing a functional configuration of the image processing device 100 of the present embodiment. The image processing device 100 includes an image processing unit 201, an area analysis unit 202, a character recognition unit 203, an item name extraction unit 205, an item value extraction unit 207, a combination generation unit 208, a target selection unit 209, a regeneration unit 210, and an output unit. It has 211.

画像処理部201は、スキャナが原稿を読み取ることによって得られたスキャン画像に対して、二値化、ノイズ除去、および罫線除去等の画像処理を行う。領域解析部202は、画像処理部201によって処理されたスキャン画像を解析して、スキャン画像に含まれる文字列領域、画像領域等の領域を特定する。 The image processing unit 201 performs image processing such as binarization, noise removal, and ruled line removal on the scanned image obtained by scanning the original by the scanner. The area analysis unit 202 analyzes the scanned image processed by the image processing unit 201 to specify an area such as a character string area or an image area included in the scanned image.

文字認識部203は、画像処理されたスキャン画像と特定された文字列領域の情報を用いてスキャン画像の文字列領域に対して文字認識処理(OCR処理)を行う。文字認識部203が処理した結果得られる文字認識結果には、認識された文字列と、各認識された文字列ごとの、文字列全体の位置と、文字列全体の幅および高さを示すサイズと、が含まれる。なお、文字列は、1文字でもよく、または複数の文字から構成されていてもよい。 The character recognition unit 203 performs character recognition processing (OCR processing) on the character string area of the scanned image using the information of the image-processed scanned image and the specified character string area. The character recognition result obtained as a result of processing by the character recognition unit 203 includes the recognized character string, the position of the entire character string for each recognized character string, and the size indicating the width and height of the entire character string. And are included. The character string may be one character or may be composed of a plurality of characters.

文字列を構成する文字の位置と、その文字の幅および高さを示すサイズと、第一位候補から下位候補の文字コードと、尤度(一致度)と、についても文字認識結果に含まれる。
このスキャン画像内の座標は例えば、原点が左上で、縦方向が下方向、横方向が右方向に延びる座標系が用いられる。文字列または文字列を構成する文字の位置は、例えば、左上座標値が夫々の位置として保持される。
The character recognition result also includes the position of the characters that make up the character string, the size indicating the width and height of the character, the character code of the first to lower candidates, and the likelihood (matching degree). ..
For the coordinates in this scanned image, for example, a coordinate system is used in which the origin is at the upper left, the vertical direction is downward, and the horizontal direction is right. As for the position of the character string or the character constituting the character string, for example, the upper left coordinate value is held as each position.

項目名抽出部205は、文字認識結果から、項目名辞書204を用いて項目名である文字列を抽出する。項目名辞書204には項目名として抽出する単語が登録されており、項目名抽出部205は、文字認識結果から項目名辞書204に登録されている単語との一致度が高い第一候補だけではなく下位候補を含めた文字列を検索して項目名を抽出する。 The item name extraction unit 205 extracts a character string which is an item name from the character recognition result by using the item name dictionary 204. Words to be extracted as item names are registered in the item name dictionary 204, and the item name extraction unit 205 can use only the first candidate having a high degree of matching with the words registered in the item name dictionary 204 from the character recognition result. The item name is extracted by searching the character string including the subordinate candidates.

項目値抽出部207は、正規表現ルール206を用いて項目値である文字列を抽出する。正規表現ルール206には、金額や特定可能なパターンで記述された文字列を抽出するための正規表現が登録されている。例えば、「¥」の後に数字が1個以上連続する文字パターンが金額を意味する項目値、即ち、属性が金額である項目値として抽出されるように、正規表現が登録されている。 The item value extraction unit 207 extracts a character string which is an item value by using the regular expression rule 206. In the regular expression rule 206, a regular expression for extracting a character string described by an amount or a identifiable pattern is registered. For example, a regular expression is registered so that a character pattern in which one or more consecutive numbers follow "\" is extracted as an item value meaning an amount of money, that is, an item value whose attribute is an amount of money.

組み合わせ生成部208は、項目名と項目値との位置関係および項目値の属性に基づき項目名と項目値の組み合わせ(combination)を生成する。組み合わせ生成部208は、はじめに、所定の定義に基づき項目名に対応付ける項目値を決定する。例えば、組み合わせ生成部208は、属性が金額である項目値のうち、項目名「合計」との位置関係が、「左−右」「上−下」「左上−右下」などあらかじめ定義された位置関係に基づき、項目名「合計」に対応付けられる項目値を決定する。また所定の定義は、例えば予めROM102に記憶されており、組み合わせ生成部208は、所定の定義を読み出して項目名に対応付ける項目値を決定する。 The combination generation unit 208 generates a combination of the item name and the item value based on the positional relationship between the item name and the item value and the attribute of the item value. First, the combination generation unit 208 determines the item value associated with the item name based on a predetermined definition. For example, in the combination generation unit 208, among the item values whose attribute is the amount of money, the positional relationship with the item name "total" is defined in advance such as "left-right", "top-bottom", "upper left-lower right". Determine the item value associated with the item name "total" based on the positional relationship. Further, the predetermined definition is stored in the ROM 102 in advance, for example, and the combination generation unit 208 reads the predetermined definition and determines the item value associated with the item name.

そして、組み合わせ生成部208は、複数の項目名に対応付けられた項目値がある場合、その項目値が1つの項目名に対応付けられるように絞り込み処理を行うことにより、項目値と項目名との組み合わせを生成する。言い換えれば、項目値が複数の項目名に対応付けられないように、項目値と項目名との組み合わせを生成する。詳細は後述する。 Then, when there is an item value associated with a plurality of item names, the combination generation unit 208 performs a narrowing process so that the item value is associated with one item name, thereby causing the item value and the item name. Generate a combination of. In other words, the combination of the item value and the item name is generated so that the item value is not associated with a plurality of item names. Details will be described later.

ある1つの項目名に対応付ける項目値は1つ(「1:1」とも記す)に限られず、1つの項目名に対して複数の項目値が対応付けられる(「1:n」とも記す)ように組み合わせが生成されることもある。 The item value associated with a certain item name is not limited to one (also referred to as "1: 1"), and a plurality of item values are associated with one item name (also referred to as "1: n"). Combinations may be generated.

対象選択部209は、組み合わせが生成された結果、誤って別の項目名との組み合わせとなった項目値とその項目名を、組み合わせの生成をやり直す対象として選択する。詳細は後述する。 The target selection unit 209 selects an item value and the item name that are erroneously combined with another item name as a result of generating the combination as a target for redoing the generation of the combination. Details will be described later.

再生成部210は、対象選択部209が選択した項目値と項目名との対応付けが、誤っている場合はその対応付けを取り消して、項目名と項目値との組み合わせの再生成を行う。出力部211は、再生成部210による再判定の結果が反映された項目名と項目値との組み合わせを出力する。 If the association between the item value and the item name selected by the target selection unit 209 is incorrect, the regeneration unit 210 cancels the association and regenerates the combination of the item name and the item value. The output unit 211 outputs a combination of the item name and the item value in which the result of the re-determination by the regeneration unit 210 is reflected.

図2の各部の機能は、画像処理装置100のCPUがROMに記憶されているプログラムコードをRAMに展開し実行することにより実現される。または、図2の各部の一部または全部の機能をASICや電子回路等のハードウェアで実現してもよい。 The functions of each part of FIG. 2 are realized by the CPU of the image processing device 100 expanding the program code stored in the ROM into the RAM and executing it. Alternatively, some or all the functions of each part of FIG. 2 may be realized by hardware such as an ASIC or an electronic circuit.

[項目名と項目値の組み合わせ決定処理について]
ここで図を用いて、スキャン画像を文字認識処理した結果から、スキャン画像に含まれる項目名と項目値を抽出して、項目名と項目値との組み合わせを生成する処理について説明する。本実施形態の画像処理装置は、ある項目値が複数の項目名に対応付けられないように、項目値と項目名との組み合わせを生成する。なお本実施形態では、スキャン画像から、スキャン画像に含まれる合計金額の値と、スキャン画像に含まれる小計金額の内訳の夫々の金額の値を抽出するために、項目名と項目値との組み合わせを生成するものとして説明する。
[Regarding the process of determining the combination of item name and item value]
Here, a process of extracting an item name and an item value included in the scanned image from the result of character recognition processing of the scanned image and generating a combination of the item name and the item value will be described with reference to the figure. The image processing apparatus of the present embodiment generates a combination of an item value and an item name so that a certain item value is not associated with a plurality of item names. In the present embodiment, in order to extract the value of the total amount of money included in the scanned image and the value of each amount of the subtotal amount included in the scanned image from the scanned image, a combination of the item name and the item value is used. Will be described as generating.

図3(a)は、スキャン画像を文字認識した結果得られた文字認識結果の一例を示す図である。図3(a)では、認識された文字列を、文字列の位置座標が示す位置に配置して文字認識結果を表している。図3(a)の文字認識結果はスキャン画像に含まれる文字列が正しく認識されている例である。この文字認識結果に対して、所定の情報を抽出するために、それぞれの項目名に対応付けられる項目値が決定される。 FIG. 3A is a diagram showing an example of a character recognition result obtained as a result of character recognition of a scanned image. In FIG. 3A, the recognized character string is arranged at the position indicated by the position coordinates of the character string to represent the character recognition result. The character recognition result of FIG. 3A is an example in which the character string included in the scanned image is correctly recognized. In order to extract predetermined information from this character recognition result, the item value associated with each item name is determined.

図3(b)は、文字認識結果から項目名辞書に含まれる「合計」を項目名として抽出した結果を示す図である。文字列の外側に描かれた矩形は、文字列領域を示す矩形であり、文字列領域の横に表示されている数値は、単語辞書との一致度を表している。文字認識結果の「合計」は項目名辞書の単語「合計」の全文字が一致するため、項目名辞書の単語との一致度は「100」となる。また、文字認識結果「小計」は項目名辞書の単語「合計」の「計」のみが一致するため、項目名辞書の単語との一致度は「50」として表されている。このように項目名辞書の単語に完全に一致しない場合でも一致度が所定の値以上であれば項目名辞書の単語の文字列として抽出される。例えば、本実施形態では一致度が50以上であれば、項目名辞書の単語の文字列として抽出される。 FIG. 3B is a diagram showing the result of extracting the "total" included in the item name dictionary as the item name from the character recognition result. The rectangle drawn on the outside of the character string is a rectangle indicating the character string area, and the numerical value displayed next to the character string area indicates the degree of agreement with the word dictionary. Since all the characters of the word "total" in the item name dictionary match in the "total" of the character recognition result, the degree of matching with the word in the item name dictionary is "100". Further, since only the "total" of the word "total" in the item name dictionary matches the character recognition result "subtotal", the degree of matching with the word in the item name dictionary is expressed as "50". Even if the word does not completely match the word in the item name dictionary, if the degree of match is equal to or higher than a predetermined value, the word is extracted as the character string of the word in the item name dictionary. For example, in the present embodiment, if the degree of matching is 50 or more, it is extracted as a character string of a word in the item name dictionary.

図3(c)は、項目名辞書の単語の「小計」を項目名として抽出した結果を示す図である。図3(d)は、項目名辞書の単語の「消費税」を項目名として抽出した結果を示す図である。 FIG. 3C is a diagram showing the result of extracting the word “subtotal” of the item name dictionary as the item name. FIG. 3D is a diagram showing the result of extracting the word “consumption tax” in the item name dictionary as the item name.

図3(e)は、図3(a)の文字認識結果から、金額を示す正規表現パターンに基づき属性が金額である項目値を抽出した結果を示す図である。項目値を抽出する場合は、正規表現パターンと一致する場合のみその項目値が抽出されるため一致度は表示されていない。 FIG. 3E is a diagram showing a result of extracting an item value whose attribute is an amount of money from the character recognition result of FIG. 3A based on a regular expression pattern indicating an amount of money. When extracting an item value, the degree of match is not displayed because the item value is extracted only when it matches the regular expression pattern.

図4は、所定の定義に基づき、項目名に対応付けられる項目値を決定する処理を説明するための図である。 FIG. 4 is a diagram for explaining a process of determining an item value associated with an item name based on a predetermined definition.

図4(a)は、スキャン画像に含まれる合計金額の情報を抽出するための項目名に対応付けられる項目値を決定する処理について説明する図である。合計金額の情報を抽出するための項目名「合計」と対応付けられるべき項目値の属性は金額と定義されている。また、項目名と項目値との位置関係は、「項目名(左)−項目値(右)」、「項目名(上)−項目値(下)」、「項目名(左上)−項目値(右下)」のいずれかと定義されている。また、項目名に対応付ける項目値は1つである(「1:1」の関係にある)ものとして定義されている。この所定の定義に従って図3(b)において抽出された「合計」に対応付ける項目値が決定される。その結果、図4(a)に示すとおり、文字列領域401の「¥1,000」、「¥6,000」、および「¥6,600」が「合計」に対応付けられる項目値として決定される。 FIG. 4A is a diagram illustrating a process of determining an item value associated with an item name for extracting information on the total amount of money included in the scanned image. The attribute of the item value that should be associated with the item name "total" for extracting the information of the total amount is defined as the amount. The positional relationship between the item name and the item value is "item name (left) -item value (right)", "item name (top) -item value (bottom)", "item name (upper left) -item value. (Lower right) ”is defined as one of. Further, the item value associated with the item name is defined as one (in a "1: 1" relationship). The item value corresponding to the "total" extracted in FIG. 3B is determined according to this predetermined definition. As a result, as shown in FIG. 4A, "¥ 1,000", "¥ 6,000", and "¥ 6,600" of the character string area 401 are determined as item values associated with "total". Will be done.

図4(b)は、小計金額の内訳金額を抽出するための行アイテム金額を出力するために、項目名に対応付けられる項目値を決定する処理を説明するための図である。小計の内訳金額を抽出するために、項目名辞書の単語が「合計」または「金額」として抽出された項目名に対応付ける項目値を決定する。ただし、図4(a)と異なり、項目名と対応付けられるべき項目値との位置関係は、「項目名(上)−項目値(下)」のみと定義されており、かつ、項目名に対応付けられる項目値は複数である(「1:n」の関係にある)ものとして定義されている。この定義に従って「合計」の項目名と対応付けられる項目値が決定される。その結果、図4(b)に示す通り、文字列領域401の「¥1,000」、文字列領域402の「¥2,000」、文字列領域403の「¥3,000」、「¥6,000」、「¥600」、および「¥6,600」が対応付けられる項目値として決定される。 FIG. 4B is a diagram for explaining a process of determining an item value associated with an item name in order to output a line item amount for extracting a breakdown amount of the subtotal amount. In order to extract the subtotal breakdown amount, the item value corresponding to the item name extracted by the word in the item name dictionary as "total" or "amount" is determined. However, unlike FIG. 4A, the positional relationship between the item name and the item value to be associated is defined as only "item name (top) -item value (bottom)", and the item name The associated item values are defined as being plural (having a "1: n" relationship). According to this definition, the item value associated with the item name of "total" is determined. As a result, as shown in FIG. 4B, the character string area 401 is "¥ 1,000", the character string area 402 is "¥ 2,000", and the character string area 403 is "¥ 3,000", "¥ 3,000". "6,000", "¥ 600", and "¥ 6,600" are determined as associated item values.

図4(c)は、項目名辞書の単語が「小計」または「消費税」として抽出された項目名に対応付けられる項目値を決定する処理を説明する図である。具体的には、項目名と対応付けられるべき項目値の位置関係は、「項目名(左)−項目値(右)」のみと定義されている。また項目名に対応付ける項目値は1つである(「1:1」の関係にある)ものとして定義されている。この定義に従って項目名に対応付けられる項目値を決定すると、図4(c)のように「¥6,000」「¥600」「¥6,600」が「小計」または「消費税」の項目名に対応付けられる項目値として決定される。 FIG. 4C is a diagram illustrating a process of determining an item value associated with an item name in which a word in the item name dictionary is extracted as “subtotal” or “consumption tax”. Specifically, the positional relationship of the item value to be associated with the item name is defined as only "item name (left) -item value (right)". Further, the item value associated with the item name is defined as one (in a "1: 1" relationship). When the item value associated with the item name is determined according to this definition, "¥ 6,000", "¥ 600", and "¥ 6,600" are the items of "subtotal" or "consumption tax" as shown in Fig. 4 (c). Determined as the item value associated with the name.

本実施形態では、小計および消費税の項目名に対応付けられた項目値は、除外項目の項目値として利用される。つまり、本実施形態において出力される抽出対象の情報は、合計金額の値と、小計内訳の夫々の金額の値のみである。よって、小計および消費税の金額の値は抽出対象の情報ではないから、小計および消費税の項目名に対応付けられた項目値は、抽出対象の情報として抽出されないようにするために、除外項目の値として用いられる。 In the present embodiment, the item values associated with the item names of the subtotal and the consumption tax are used as the item values of the excluded items. That is, the information to be extracted that is output in this embodiment is only the value of the total amount and the value of each amount in the subtotal breakdown. Therefore, since the values of the subtotal and consumption tax amounts are not the information to be extracted, the item values associated with the item names of the subtotal and consumption tax are excluded items so that they are not extracted as the information to be extracted. Is used as the value of.

次に、図4(a)~(c)を比べると、「¥6,000」、「¥6,600」、「600」については、複数の項目名に対応付けられるように決定されている。また、文字列領域401の「¥1,000」は、図4(a)では合計金額を抽出するための項目名である「合計」に対応付けられており、また図4(b)では小計金額の内訳を抽出するための項目名である「合計」にも対応付けられている。また、図4(a)では、合計金額を抽出するための項目値が複数決定されている。 Next, comparing FIGS. 4A to 4C, it is determined that "¥ 6,000", "¥ 6,600", and "600" can be associated with a plurality of item names. .. Further, "¥ 1,000" in the character string area 401 is associated with "total", which is an item name for extracting the total amount in FIG. 4A, and is a subtotal in FIG. 4B. It is also associated with "total", which is the item name for extracting the breakdown of the amount. Further, in FIG. 4A, a plurality of item values for extracting the total amount of money are determined.

このため、次の処理として、これらの項目値がいずれか1つの項目名のみ対応付くようにするための絞り込み処理が行われる。また、図4(a)のように、情報を抽出するための項目名として、複数の項目名が抽出されている場合は、その情報を抽出するための1つの項目名に絞り込むための処理が行われる。絞り込み処理が行われることで、情報を抽出するための項目名と、その項目名に対応付けられる項目値との組み合わせが生成される。 Therefore, as the next process, a narrowing process is performed so that only one of these item values corresponds to the item name. Further, as shown in FIG. 4A, when a plurality of item names are extracted as item names for extracting information, a process for narrowing down to one item name for extracting the information is performed. Will be done. By performing the narrowing process, a combination of the item name for extracting the information and the item value associated with the item name is generated.

絞り込み処理は、項目名辞書の単語との一致度、抽出対象の優先度(合計金額>小計内訳金額)、位置関係の優先度(左右>上下)等の所定のルールに従って行われる。所定のルールについては、所定の定義と同様に、ROM102に予め記憶されている。 The narrowing process is performed according to predetermined rules such as the degree of matching with words in the item name dictionary, the priority of the extraction target (total amount> subtotal breakdown amount), and the priority of the positional relationship (left / right> top / bottom). The predetermined rule is stored in the ROM 102 in advance in the same manner as the predetermined definition.

図5〜6は絞り込み処理の一例を説明するための図である。図5は、合計金額を抽出するための項目名として1つの項目名が絞り込まれた後の状態を示す図である。図6は、除外項目の項目値を除外するかを判定する処理の前の状態を示す図である。 5 to 6 are diagrams for explaining an example of the narrowing down process. FIG. 5 is a diagram showing a state after one item name is narrowed down as an item name for extracting the total amount. FIG. 6 is a diagram showing a state before the process of determining whether to exclude the item value of the exclusion item.

はじめに、抽出の優先度が一番高い合計金額を抽出するための項目名「合計」と対応付ける1つの項目値を決定する。図4(a)に示すとおり、「¥6,000」は対応付けられている項目名の一致度が、他の項目名に比べて小さい。このため、「¥6000」は「合計」に対応付けられる項目値から取り消される。次に、位置関係優先度が左右>上下のため、図4(a)に示すとおり、項目名の下に位置する「¥1,000」は「合計」に対応付けられる項目値から取り消される。結果として、図5(a)が示すように、「¥6,600」が合計金額を抽出するための項目名「合計」に対応付けられる1つの項目値として定まる。 First, one item value associated with the item name "total" for extracting the total amount having the highest extraction priority is determined. As shown in FIG. 4A, the degree of matching of the associated item names in "¥ 6,000" is smaller than that of other item names. Therefore, "¥ 6000" is canceled from the item value associated with "total". Next, since the positional relationship priority is left / right> up / down, as shown in FIG. 4A, "¥ 1,000" located under the item name is canceled from the item value associated with "total". As a result, as shown in FIG. 5A, "¥ 6,600" is determined as one item value associated with the item name "total" for extracting the total amount.

このとき、図5(b)、(c)に示すとおり、小計金額内訳の抽出するための項目名に対応付けられた項目値、および除外項目の項目名に対応付けられた項目値については、図4(b)、(c)の状態から変化はない。 At this time, as shown in FIGS. 5 (b) and 5 (c), the item values associated with the item names for extracting the subtotal amount breakdown and the item values associated with the item names of the excluded items are There is no change from the states shown in FIGS. 4 (b) and 4 (c).

次に、小計内訳金額を抽出するための項目名から、除外する項目値を決める。優先度が、合計金額>小計内訳金額のため、図5(b)の小計内訳金額の項目値のうち、図5(a)で合計金額を示す項目値として決定された「¥6,600」が対応付けられる項目値から取り消される。優先度の低い項目値が外された結果は図6(b)のようになる。 Next, the item values to be excluded are determined from the item names for extracting the subtotal breakdown amount. Since the priority is total amount> subtotal breakdown amount, among the item values of the subtotal breakdown amount in FIG. 5 (b), "¥ 6,600" determined as the item value indicating the total amount in FIG. 5 (a). Is canceled from the associated item value. The result of removing the item value having a low priority is as shown in FIG. 6 (b).

最後に、図6(c)の除外項目候補と、図6(a)および(b)における項目名対応付けられた項目値とを比較して、除外項目の項目値と同じ項目値に対して、項目名との対応付けを取り消すかを判定する処理が行われる。 Finally, the exclusion item candidates in FIG. 6 (c) are compared with the item values associated with the item names in FIGS. 6 (a) and 6 (b), and the same item values as the item values of the exclusion items are compared. , A process of determining whether to cancel the association with the item name is performed.

図6(a)および(b)の情報を抽出するために抽出された項目名に対応付けられた項目値のうち、図6(c)の除外項目の項目値と同じ値の項目値については、夫々の項目値に対応付けられた項目名の一致度を比較する。そして一致度が同じまたは除外項目として抽出された項目名の一致度の方が大きい場合、その項目値については、情報抽出するために抽出された項目名との対応付けが取り消される。 Of the item values associated with the item names extracted to extract the information in FIGS. 6 (a) and 6 (b), the item values having the same values as the item values of the excluded items in FIG. 6 (c) , Compare the degree of matching of the item names associated with each item value. If the matching degree is the same or the matching degree of the item name extracted as the excluded item is larger, the association with the item name extracted for information extraction is canceled for the item value.

図を用いて具体例を説明すると、まず、図6(a)と図6(c)とを比較すると、図6(c)の除外項目候補には「¥6,600」があるため、「¥6,600」を図6(a)の合計金額を示す項目名の項目値から外すか判定される。「¥6,600」に対応付けられた項目名の一致度を図6(a)と図6(c)とで比較すると、図6(a)の一致度が大きい。このため、図6(a)の「¥6,600」は合計金額として抽出された項目名に対応付けられた項目値からは外されない(取り消されない)と決定される。 Explaining a specific example using a figure, first, when comparing FIG. 6 (a) and FIG. 6 (c), since there is "¥ 6,600" as an exclusion item candidate in FIG. 6 (c), " It is determined whether to exclude "¥ 6,600" from the item value of the item name indicating the total amount in FIG. 6 (a). Comparing the degree of matching of the item names associated with "¥ 6,600" between FIGS. 6 (a) and 6 (c), the degree of matching of FIG. 6 (a) is large. Therefore, it is determined that "¥ 6,600" in FIG. 6A is not excluded (cannot be canceled) from the item value associated with the item name extracted as the total amount.

次に、図6(b)と図6(c)とを比較すると、図6(c)の除外項目候補には「¥6,000」と「¥600」とがあるため、図6(b)の「¥6,000」と「¥600」とを小計金額の内訳金額の項目名に対応付けられた項目値から外すか判定される。「¥6,000」と「¥600」とに対応付けられた項目名の一致度は、図6(b)と図6(c)とで比較すると同じである。項目名の一致度が同じ場合は、除外の対象とされる。このため、図6(b)の小計金額の内訳金額の項目名に対応付けられた項目値のうち、「¥6,000」と「¥600」とは、対応付けが取り消される。 Next, when FIG. 6 (b) and FIG. 6 (c) are compared, since there are "6,000 yen" and "600 yen" as exclusion item candidates in FIG. 6 (c), FIG. 6 (b) ) "¥ 6,000" and "¥ 600" are determined to be excluded from the item values associated with the item names of the subtotal amount breakdown amount. The degree of matching of the item names associated with "¥ 6,000" and "¥ 600" is the same when compared with FIGS. 6 (b) and 6 (c). If the item names have the same degree of matching, they are excluded. Therefore, among the item values associated with the item names of the subtotal amount breakdown amounts in FIG. 6B, the association between "¥ 6,000" and "¥ 600" is canceled.

図7(a)〜(c)は、絞り込み処理が行われた結果である。このように、合計金額を抽出するための項目名「合計」とその項目値「¥6,600」との組み合わせが生成される。また、小計内訳金額の内訳を抽出するための項目名「合計」とその項目値「¥1,000」「¥2,000」「¥3,000」との組み合わせが生成される。 7 (a) to 7 (c) are the results of the narrowing down process. In this way, a combination of the item name "total" for extracting the total amount and the item value "¥ 6,600" is generated. In addition, a combination of the item name "total" for extracting the breakdown of the subtotal breakdown amount and the item values "¥ 1,000", "¥ 2,000", and "¥ 3,000" is generated.

なお、位置関係が「項目名(上)−項目値(下)」の定義に基づき対応付けられた、「合計」の項目値のうち、図4(a)、(b)における文字列領域401の「¥1,000」のように、どちらの「合計」にも対応付けられている項目値が存在することがある。この場合は、小計内訳金額を抽出するための項目名「合計」に対応する項目値を優先するルールが用いられてもよい。つまり、図4(a)および図4(b)の状態において、まず、図4(a)の項目値「¥1,000」における項目名「合計」への対応付けが取り消されてから、以降の処理が行われてもよい。 Of the "total" item values whose positional relationship is associated based on the definition of "item name (top) -item value (bottom)", the character string area 401 in FIGS. 4 (a) and 4 (b). There may be an item value associated with both "totals", such as "¥ 1,000" in. In this case, a rule that gives priority to the item value corresponding to the item name "total" for extracting the subtotal breakdown amount may be used. That is, in the states of FIGS. 4 (a) and 4 (b), first, the association with the item name "total" in the item value "¥ 1,000" of FIG. 4 (a) is canceled, and then thereafter. May be processed.

[文字列の誤認識があった場合について]
帳票をスキャンして得られたスキャン画像から文字認識処理をする場合、帳票の汚れや掠れなどによるスキャン画像の劣化によって、文字認識処理の誤認識が発生することがある。誤認識された文字認識処理の結果から項目名と項目値との組み合わせを生成する処理が行われると、項目名に対応付けられる項目値が正しく決定されない場合が発生する。例えば、ある項目名との組み合わせとなるべき項目値が、別の項目名との組み合わせとなるように生成されてしまうことがある。
[When there is a misrecognition of a character string]
When character recognition processing is performed from a scanned image obtained by scanning a form, erroneous recognition of the character recognition processing may occur due to deterioration of the scanned image due to dirt or blurring of the form. When the process of generating the combination of the item name and the item value is performed from the result of the erroneously recognized character recognition process, the item value associated with the item name may not be determined correctly. For example, an item value that should be combined with a certain item name may be generated so as to be a combination with another item name.

文字認識結果に誤認識された文字列が含まれている場合について図8〜図10を用いて説明する。図8(a)は、スキャン画像を文字認識した結果得られた文字認識結果の一例を示す図である。図8(a)の文字認識結果は、図3(a)の文字認識結果と同じ結果となるべきであるが、図8(a)中の「■■■」が示すように「消費税」と認識されるべき文字列領域に対して誤認識が生じている。このような場合でも、図8(b)および図8(c)に示すように項目名「合計」および「小計」については、図3(b)および図3(c)と同様に正しく項目名が抽出される。また項目値についても、図8(e)が示すとおり図3(e)と同様に正しく抽出される。しかしながら、図8(d)に示すように下位候補にある文字候補を使っても項目名辞書の単語「消費税」には1文字も一致しないため、「消費税」の項目名は抽出されないことになる。 The case where the character recognition result includes the erroneously recognized character string will be described with reference to FIGS. 8 to 10. FIG. 8A is a diagram showing an example of the character recognition result obtained as a result of character recognition of the scanned image. The character recognition result of FIG. 8 (a) should be the same as the character recognition result of FIG. 3 (a), but as shown by "■■■" in FIG. 8 (a), "consumption tax" There is a misrecognition for the character string area that should be recognized as. Even in such a case, as shown in FIGS. 8 (b) and 8 (c), the item names “total” and “subtotal” are correctly selected as in FIGS. 3 (b) and 3 (c). Is extracted. Further, the item values are also correctly extracted as in FIG. 3 (e) as shown in FIG. 8 (e). However, as shown in FIG. 8D, even if the character candidates in the lower candidates are used, even one character does not match the word "consumption tax" in the item name dictionary, so the item name of "consumption tax" is not extracted. become.

図9は、図8において抽出された項目名と項目値とから、所定の定義に従い、項目名に対応付ける項目値が決定された結果を示す図である。図9(c)が示すように、項目名「消費税」が抽出されていないので、図4(c)と異なり、「¥600」が除外項目である「消費税」に対応付けられる項目値として決定されない。 FIG. 9 is a diagram showing the result of determining the item value associated with the item name from the item name and the item value extracted in FIG. 8 according to a predetermined definition. As shown in FIG. 9 (c), since the item name "consumption tax" is not extracted, unlike FIG. 4 (c), the item value associated with "consumption tax" in which "¥ 600" is an excluded item. Not determined as.

図10は、図9に示す項目名に対応付ける項目値を決定する処理の結果から、絞り込み処理を行った結果を示す図である。絞り込み処理の方法は、図5〜図6を用いて説明した方法と同一である。図10(b)に示すように「消費税」が認識できなかった結果、小計内訳金額を抽出するための項目名「合計」との組み合わせとなる項目値として「¥600」が誤って含まれたままとなっている。このように、文字の誤認識が発生すると、項目名と項目値との組み合わせが誤って生成されてしまうことがある。このため、小計の内訳金額の情報が誤って抽出されたまま出力されてしまう。 FIG. 10 is a diagram showing the result of performing the narrowing down process from the result of the process of determining the item value associated with the item name shown in FIG. The method of narrowing down processing is the same as the method described with reference to FIGS. 5 to 6. As shown in FIG. 10 (b), as a result of not being able to recognize the "consumption tax", "¥ 600" is erroneously included as an item value to be combined with the item name "total" for extracting the subtotal breakdown amount. It remains as it is. In this way, when a character is erroneously recognized, a combination of an item name and an item value may be erroneously generated. Therefore, the information on the subtotal breakdown amount is output as it is erroneously extracted.

そこで本実施形態では、複数の項目名に対応付けられているように決定された項目値および、その項目値の周囲の項目値については、組み合わせ生成をやり直す候補の対象として選択する方法を説明する。 Therefore, in the present embodiment, a method of selecting an item value determined to be associated with a plurality of item names and an item value around the item value as a candidate for re-combination generation will be described. ..

[項目名と項目値との組み合わせの生成処理について]
図11は、本実施形態の画像処理を示すフローチャートである。図11のフローチャートで示される一連の処理は、画像処理装置100のCPUがROMに記憶されているプログラムコードをRAMに展開し実行することにより行われる。また、図11におけるステップの一部または全部の機能をASICや電子回路等のハードウェアで実現してもよい。なお、各処理の説明における記号「S」は、当該フローチャートにおけるステップであることを意味する。
[About the generation process of the combination of the item name and the item value]
FIG. 11 is a flowchart showing the image processing of the present embodiment. The series of processes shown in the flowchart of FIG. 11 is performed by the CPU of the image processing device 100 expanding the program code stored in the ROM into the RAM and executing it. Further, some or all the functions of the steps in FIG. 11 may be realized by hardware such as an ASIC or an electronic circuit. The symbol "S" in the description of each process means a step in the flowchart.

S1101において画像処理部201は、スキャナ109によって原稿をスキャンして得られたスキャン画像を取得する。スキャン画像は、RAMまたはROM等の記憶部に保存される。 In S1101, the image processing unit 201 acquires a scanned image obtained by scanning the document with the scanner 109. The scanned image is stored in a storage unit such as RAM or ROM.

S1102において画像処理部201は、記憶部に保存されたスキャン画像を読み出し、スキャン画像に対して画像処理を行う。画像処理の例として、ノイズ除去、罫線除去、二値化などがある。また、スキャン画像が複数レシートの小紙面領域を含む場合においては、画像処理部201は、それらを分離する処理を行い、分離された画像毎に画像処理を行う。 In S1102, the image processing unit 201 reads out the scanned image stored in the storage unit and performs image processing on the scanned image. Examples of image processing include noise removal, ruled line removal, and binarization. When the scanned image includes a small page area of a plurality of receipts, the image processing unit 201 performs a process of separating them, and performs image processing for each separated image.

S1103において領域解析部202は、S1102において画像処理されたスキャン画像の領域解析を行う。領域解析部202は、スキャン画像にある文字、表、画像、線画、線、などの属性を持った領域に分割する。表の内部に存在する文字や画像の領域についても分割して、分割された領域を、属性情報を有する矩形領域として出力する。そして、文字列が含まれる領域については文字列領域として特定されて出力される。 In S1103, the area analysis unit 202 performs area analysis of the scanned image image-processed in S1102. The area analysis unit 202 divides the scanned image into areas having attributes such as characters, tables, images, line drawings, and lines. The area of characters and images existing inside the table is also divided, and the divided area is output as a rectangular area having attribute information. Then, the area including the character string is specified as the character string area and output.

S1104において文字認識部203は、画像処理されたスキャン画像と、S1103の領領域解析結果とを用いて、スキャン画像に含まれる文字の認識を行い、その結果を文字認識結果として出力する。文字認識結果には、1文字毎の文字矩形(画像中の左上座標、幅および高さ)、候補文字の文字コード、および尤度の組み合わせが第一候補から複数の下位候補まで順位付けされている。なお、文字認識処理で使用される画像は、S1103で使用される領域解析用の画像と異なっていてもよい。例えば、画像処理部201は、領域解析用とは異なる文字認識用の閾値でスキャン画像を二値化画像にし、文字認識部203は、その文字認識用の二値化画像に対して文字認識処理を実行してもよい。 In S1104, the character recognition unit 203 recognizes the characters included in the scanned image using the image-processed scanned image and the area analysis result of S1103, and outputs the result as the character recognition result. In the character recognition result, the combination of the character rectangle (upper left coordinate, width and height in the image) of each character, the character code of the candidate character, and the likelihood is ranked from the first candidate to a plurality of lower candidates. There is. The image used in the character recognition process may be different from the image for area analysis used in S1103. For example, the image processing unit 201 converts the scanned image into a binarized image with a threshold value for character recognition different from that for area analysis, and the character recognition unit 203 performs character recognition processing on the binarized image for character recognition. May be executed.

S1105において項目名抽出部205は、項目名辞書204にある単語を文字認識結果から検索することで、項目名を抽出する。項目名辞書204にある単語と完全に一致していなくても、一致度が所定の値以上であれば、その文字認識結果の文字列を項目名として抽出される。項目名抽出部205は、例えば、文字認識結果の第一候補から生成された文字列に対して、下位候補、文字認識の誤認識パターン、および類似文字パターンに基づき置換することによって文字列を生成する。そしてその文字列が項目名を示す文字列と一致度が所定の値以上である場合、項目名抽出部205はその文字列に対応する文字列領域が、検索対象の項目名が含まれる文字列領域であるものとして項目名を抽出する。 In S1105, the item name extraction unit 205 extracts the item name by searching the word in the item name dictionary 204 from the character recognition result. Even if the word does not completely match the word in the item name dictionary 204, if the degree of matching is equal to or higher than a predetermined value, the character string of the character recognition result is extracted as the item name. The item name extraction unit 205 generates a character string by, for example, replacing the character string generated from the first candidate of the character recognition result based on the lower candidate, the misrecognition pattern of character recognition, and the similar character pattern. To do. When the character string matches the character string indicating the item name and the degree of coincidence is equal to or more than a predetermined value, the item name extraction unit 205 sets the character string area corresponding to the character string to a character string including the item name to be searched. Extract the item name as an area.

抽出された結果は、項目名として抽出された文字列、項目名辞書の単語との一致度、文字列領域を示す情報(画像中の左上座標、幅および高さ)が含まれる。また、抽出された結果には各文字の文字認識結果への参照が含まれる。 The extracted result includes the character string extracted as the item name, the degree of matching with the word in the item name dictionary, and the information indicating the character string area (upper left coordinate in the image, width and height). In addition, the extracted result includes a reference to the character recognition result of each character.

S1106において項目値抽出部207は、正規表現ルール206に記憶されている正規表現を用いて、正規表現を検索することで文字認識結果から項目値を抽出する。項目値抽出部207は、例えば、文字認識結果の第一候補から生成された文字列に対して、下位候補、文字認識の誤認識パターン、および類似文字パターンに基づき置換することによって文字列を生成する。そして、その文字列が正規表現に一致した場合、項目値抽出部207はその文字列に対応する文字列領域が検索対象の項目値が含まれる文字列領域であるものとして項目値を抽出する。 In S1106, the item value extraction unit 207 extracts the item value from the character recognition result by searching the regular expression using the regular expression stored in the regular expression rule 206. The item value extraction unit 207 generates a character string by, for example, replacing the character string generated from the first candidate of the character recognition result based on the lower candidate, the misrecognition pattern of character recognition, and the similar character pattern. To do. Then, when the character string matches the regular expression, the item value extraction unit 207 extracts the item value assuming that the character string area corresponding to the character string is the character string area including the item value to be searched.

抽出される結果は、項目値として抽出された文字列、文字列領域を示す情報(画像中の左上座標、幅および高さ)が含まれる。また、抽出される結果には各文字の文字認識結果への参照が含まれる。 The extracted result includes the character string extracted as the item value and the information indicating the character string area (upper left coordinate, width and height in the image). In addition, the extracted result includes a reference to the character recognition result of each character.

S1107において組み合わせ生成部208は、抽出された項目名と抽出された項目値との位置関係等の所定の定義に基づきそれぞれの項目名に対応付けられる項目値を決定する。本ステップの処理は、図4を用いて説明した処理である。また、図8(a)の文字認識結果に対して、本ステップまでの処理が行われた結果は、図9に示すとおりとなる。 In S1107, the combination generation unit 208 determines the item value associated with each item name based on a predetermined definition such as the positional relationship between the extracted item name and the extracted item value. The process of this step is the process described with reference to FIG. Further, the result of processing up to this step on the character recognition result of FIG. 8A is as shown in FIG.

S1108において組み合わせ生成部208は、所定のルールに従い、S1107で生成された項目名と対応付けられた項目値に対して絞り込み処理を行い、項目値が複数の項目名に対応付けられないように、項目名と項目値との組み合わせを生成する。絞り込み処理の詳細は、図5〜図6を用いて説明した通りである。図8(a)の文字認識結果に対して、本ステップまでの処理が行われた結果は図10に示す状態となる。 In S1108, the combination generation unit 208 narrows down the item values associated with the item names generated in S1107 according to a predetermined rule so that the item values are not associated with a plurality of item names. Generate a combination of item name and item value. The details of the narrowing-down process are as described with reference to FIGS. 5 to 6. The result of processing up to this step with respect to the character recognition result of FIG. 8A is in the state shown in FIG.

S1108の処理の結果生成された項目名と項目値との組み合わせは、誤って生成されていることがある。例えば、図10(b)では、「¥600」が「合計」との組み合わせとなる項目値の一部となるように組み合わせが生成されている。このため、本実施形態では、S1109において対象選択部209は、誤って別の項目名との組み合わせとして、項目名に対応付けられた可能性のある項目値を特定して、組み合わせの生成のやり直しを行う対象である項目値と項目名とを選択する処理を行う。 The combination of the item name and the item value generated as a result of the processing of S1108 may be generated erroneously. For example, in FIG. 10B, the combination is generated so that "¥ 600" becomes a part of the item value that is the combination with the "total". Therefore, in the present embodiment, in S1109, the target selection unit 209 specifies an item value that may be associated with the item name as a combination with another item name by mistake, and regenerates the combination. Performs the process of selecting the item value and item name to be performed.

図12(a)は、S1109における処理を説明するための、S1107の決定処理の結果である図9(a)〜(c)を重畳した図である。本ステップでは、はじめに、対象選択部209は、S1107の処理の結果、複数の項目名に対応付けられるように決定された項目値を特定する。 FIG. 12 (a) is a diagram in which FIGS. 9 (a) to 9 (c), which are the results of the determination process of S1107, are superimposed for explaining the process in S1109. In this step, first, the target selection unit 209 specifies an item value determined to be associated with a plurality of item names as a result of the processing of S1107.

例えば、図12(a)に示すとおり、「¥6,000」は「合計」の項目名と、「小計」の項目名の両方に対応付けられている。このため、「6,000」が複数の項目名に対応付けられている項目値として特定される。同様に、「¥6,600」も複数の項目名に対応付けられている項目値として特定される。対象選択部209は、特定された複数の項目名に対応付けられている項目値とその項目値に対応付けられている項目名とを、組み合わせの生成をやり直す対象(再判定対象)として選択する。 For example, as shown in FIG. 12A, "¥ 6,000" is associated with both the item name of "total" and the item name of "subtotal". Therefore, "6,000" is specified as an item value associated with a plurality of item names. Similarly, "¥ 6,600" is also specified as an item value associated with a plurality of item names. The target selection unit 209 selects the item value associated with the specified plurality of item names and the item name associated with the item value as a target (re-judgment target) for redoing the generation of the combination. ..

次に、対象選択部209は、特定された複数の項目名に対応付けられている項目値の周囲(近傍)にある項目値についても再判定対象の項目値として選択する。例えば、項目名に対応付けられる項目値は、項目名の右側または項目名の下側にあることが多い。このため、図12(b)に示すように、対象選択部209は、特定された複数の項目名に対応付けられている「¥6,000」および「¥6,600」の項目値のそれぞれの位置から下方向または右方向にある項目値を再判定対象である項目値として選択する。 Next, the target selection unit 209 also selects the item values around (neighboring) the item values associated with the specified plurality of item names as the item values to be redetermined. For example, the item value associated with the item name is often to the right of the item name or below the item name. Therefore, as shown in FIG. 12B, the target selection unit 209 has the item values of "¥ 6,000" and "¥ 6,600" associated with the specified plurality of item names, respectively. The item value in the downward or right direction from the position of is selected as the item value to be re-judged.

この結果、図12(c)に示すように「¥600」とその項目名ついても再判定対象として選択される。対象選択部209は、本ステップ処理の結果、「¥6,000」「¥600」「¥6,600」の項目値と項目値に対応付けられている項目名とを再判定対象として選択することができる。 As a result, as shown in FIG. 12 (c), "¥ 600" and its item name are also selected as re-judgment targets. As a result of this step processing, the target selection unit 209 selects the item values of "¥ 6,000", "¥ 600", and "¥ 6,600" and the item names associated with the item values as re-judgment targets. be able to.

なお、対象選択部209は、特定された複数の項目名に対応付けられている項目値のそれぞれの位置から下方向または右方向にある項目値のみを再判定対象である項目値として選択してもよい。 In addition, the target selection unit 209 selects only the item values in the downward direction or the right direction from the respective positions of the item values associated with the specified plurality of item names as the item values to be re-determined. May be good.

または、S1107で項目名に対応付けられる項目値を決定する際に用いられた所定の定義に含まれる位置関係に基づき再判定対象が選択されてもよい。例えば、項目名と項目値の位置関係が「項目名(左)−項目値(右)」、「項目名(上)−項目値(下)」、「項目名(左上)−項目値(右下)」の場合に、項目値が項目名に対応付けるように決定されたとする。この場合、特定された複数の項目名に対応付けられている項目値の位置から下方向、右方向、または右下の方向にある項目値が再判定対象に含まれる項目値として選択されてもよい。 Alternatively, the re-judgment target may be selected based on the positional relationship included in the predetermined definition used when determining the item value associated with the item name in S1107. For example, the positional relationship between the item name and the item value is "item name (left) -item value (right)", "item name (top) -item value (bottom)", "item name (upper left) -item value (right). In the case of "below)", it is assumed that the item value is determined to be associated with the item name. In this case, even if the item value in the downward, right, or lower right direction from the position of the item value associated with the specified plurality of item names is selected as the item value included in the re-judgment target. Good.

S1110において再生成部210は、S1108の処理の結果、再判定対象が選択されたかを判定する。再判定対象が選択されていればS1111へ進む。 In S1110, the regeneration unit 210 determines whether the re-determination target has been selected as a result of the processing of S1108. If the re-judgment target is selected, the process proceeds to S1111.

S1111において再生成部210は、選択された再判定対象に対して、項目名と項目値との組み合わせの生成のやり直し(再生成処理)を行う。項目名と項目値との組み合わせの生成のやり直しの方法は限定しない。 In S1111, the regeneration unit 210 regenerates (regenerates) the combination of the item name and the item value for the selected redetermination target. The method of regenerating the combination of the item name and the item value is not limited.

例えば、再生成部210は、再判定対象として選択された項目値が、実際に誤って項目名に対応付けられているか判定を行い、誤っていると判定された項目値については、対応付けられている項目名との対応付けを取り消す処理を行う。例えば、特定された複数の項目名に対応付けられている項目値を基準として判定する。 For example, the regeneration unit 210 determines whether the item value selected as the re-judgment target is actually associated with the item name by mistake, and the item value determined to be incorrect is associated with the item value. Performs the process of canceling the association with the item name. For example, the item value associated with the specified plurality of item names is used as a reference for determination.

例えば、項目名とその項目名に対応付けられた項目値との間に、別の項目名に対応付けられた項目値がある場合、どちらかの項目値のついては誤って項目名に対応付けられたまま組み合わせが生成されている判定する。この方法では、項目値に対応付けられている項目名の一致度等に基づき、どちらかの項目値を再判定対象から削除する。 For example, if there is an item value associated with another item name between the item name and the item value associated with that item name, either item value is incorrectly associated with the item name. Judge that the combination is generated as it is. In this method, one of the item values is deleted from the re-judgment target based on the degree of matching of the item names associated with the item values.

または、図12(c)に示すように複数の項目名に対応付けられている項目値「¥6,000」に着目すると、再判定対象「¥600」とその対応付けられた「合計」は、「¥6,000」をまたぐように対応付けされている。項目名の一致が同じ場合、このように複数の項目名に対応付けられている項目値をまたぐように決定された、項目名と項目名の対応付けは誤っていると判定する方法がある。図12(c)の例では、「合計」と「¥600」との対応付けは誤っていると判定される。このため再生成部210は、「¥600」の「合計」に対応付けを取り消して組み合わせの再生成を行う。 Alternatively, focusing on the item value "¥ 6,000" associated with a plurality of item names as shown in FIG. 12 (c), the re-judgment target "¥ 600" and the associated "total" are , It is associated so as to straddle "6,000 yen". When the matching of the item names is the same, there is a method of determining that the correspondence between the item names and the item names, which is determined so as to straddle the item values associated with the plurality of item names in this way, is incorrect. In the example of FIG. 12C, it is determined that the association between "total" and "¥ 600" is incorrect. Therefore, the regeneration unit 210 cancels the association with the "total" of "¥ 600" and regenerates the combination.

他にも、項目名と項目値との組み合わせの生成のやり直しの方法として、誤って別の項目名に対応付けられたままの項目値をユーザに指示させてもよい。例えば、生成された組み合わせのうち、再判定対象が含まれる組み合わせと再判定対象とを表示部105に表示させて、誤って別の項目名に対応付けられたままの項目値をユーザに指示させる。そして、その指示を再生成部210が取得して、ユーザの指示に基づき再判定対象の項目値が正しい項目名に対応付けるように組み合わせを再生成してもよい。この場合、ユーザは全ての組み合わせの中から再生成すべき組み合わせ選ぶ必要はないための、ユーザの手間は軽減される。 Alternatively, as a method of redoing the generation of the combination of the item name and the item value, the user may be instructed to instruct the item value that is erroneously associated with another item name. For example, among the generated combinations, the combination including the re-judgment target and the re-judgment target are displayed on the display unit 105, and the user is instructed to instruct the item value that is erroneously associated with another item name. .. Then, the regenerating unit 210 may acquire the instruction and regenerate the combination so that the item value to be redetermined is associated with the correct item name based on the user's instruction. In this case, the user does not have to select the combination to be regenerated from all the combinations, which reduces the user's trouble.

このように本実施形態では、S1108において組み合わせが生成された後にS1109で再判定対象が選択される。このため、再判定対象が含まれる組み合わせに対してのみ、再生成処理が行われるようにすることができる。 As described above, in the present embodiment, the re-judgment target is selected in S1109 after the combination is generated in S1108. Therefore, the regeneration process can be performed only for the combination including the re-determination target.

本ステップの処理の結果、合計金額を抽出するための組み合わせは図12(d)のようになる。また、小計金額内訳を抽出するための組み合わせは図12(e)のようになる。これは先に、正しい状態として説明した図7(a)および(b)と同じ状態である。このように再判定対象が選択された結果、誤って生成された組み合わせがそのまま出力されることを抑制することができる。 As a result of the processing of this step, the combination for extracting the total amount is as shown in FIG. 12 (d). Further, the combination for extracting the subtotal amount breakdown is as shown in FIG. 12 (e). This is the same state as in FIGS. 7A and 7B described above as the correct state. As a result of selecting the re-judgment target in this way, it is possible to prevent the erroneously generated combination from being output as it is.

S1111の処理が終了した場合、または、S1110において再判定対象が選択されない場合、S1112へ進む。S1112において出力部211は生成された項目名と項目値との組み合わせを、ROM等の記憶部、表示部、または他の装置等に出力する。 When the process of S1111 is completed, or when the re-judgment target is not selected in S1110, the process proceeds to S1112. In S1112, the output unit 211 outputs the combination of the generated item name and the item value to a storage unit such as a ROM, a display unit, or another device.

以上説明したように本実施形態によれば、項目名と項目値との組み合わせの生成をやり直す対象を選択することができる。このため、誤った項目名と項目値との組み合わせが出力されることを抑制することができる。 As described above, according to the present embodiment, it is possible to select a target for regenerating the combination of the item name and the item value. Therefore, it is possible to suppress the output of an incorrect combination of the item name and the item value.

<実施形態2>
実施形態1では、複数の項目名に対応付けられた項目値に基づき、再判定対象を選択する方法を説明した。しかし、例えば、金額および日付が含まれるスキャン画像のように複数の属性の項目値が含まれているスキャン画像の場合、スキャン画像に誤認識が生じていても、項目値は複数の項目名に対応付けられるように決定されないことがある。そこで、本実施形態ではこのような場合でも、再判定対象を選択できるようにする方法を説明する。
<Embodiment 2>
In the first embodiment, a method of selecting a re-judgment target based on the item values associated with a plurality of item names has been described. However, in the case of a scanned image that includes item values of multiple attributes, such as a scanned image that includes the amount and date, even if the scanned image is erroneously recognized, the item values will be in multiple item names. It may not be determined to be associated. Therefore, in the present embodiment, a method of enabling the re-judgment target to be selected even in such a case will be described.

本実施形態については、実施形態1からの差分を中心に説明する。特に明記しない部分については実施形態1と同じ構成および処理である。 The present embodiment will be described mainly on the differences from the first embodiment. The parts not specified in particular have the same configuration and processing as in the first embodiment.

図13(a)は、図3(a)とは異なるスキャン画像の文字認識結果の文字列を座標上に表した図である。図13(a)の文字認識結果はスキャン画像に含まれる文字列が正しく認識されている例を示している。 FIG. 13A is a diagram showing the character strings of the character recognition result of the scanned image, which is different from that of FIG. 3A, on the coordinates. The character recognition result of FIG. 13A shows an example in which the character string included in the scanned image is correctly recognized.

図13(b)は、文字認識結果から項目名辞書の単語である「料金」が項目名として抽出された結果を示す図である。文字認識結果の文字列「料金」は項目名辞書の単語「料金」と全文字が一致するため、一致度は「100」となる。また、文字認識結果の文字列「金沢」は項目名辞書の単語「料金」と「金」のみが一致するため、一致度は「50」として表されている。項目名辞書の単語に完全に一致しない場合でも一致度が所定の値以上であれば項目名として抽出される。 FIG. 13B is a diagram showing the result of extracting the word “charge” of the item name dictionary as the item name from the character recognition result. Since all the characters of the character string "charge" of the character recognition result match the word "charge" in the item name dictionary, the degree of matching is "100". Further, since only the words "charge" and "gold" in the item name dictionary match in the character string "Kanazawa" of the character recognition result, the degree of matching is expressed as "50". Even if the word does not exactly match the word in the item name dictionary, it is extracted as the item name if the degree of match is equal to or greater than a predetermined value.

図13(c)は、項目名辞書の単語の「日付」が項目名として抽出された結果を示す図である。図13(d)は、図13(a)の文字認識結果から、金額を示す正規表現パターンに基づき属性が金額の項目値が抽出された結果を示す図である。図13(e)は、図13(a)の文字認識結果から、日付を示す正規表現パターンに基づき属性が日付の項目値が抽出された結果を示す図である。 FIG. 13C is a diagram showing the result of extracting the word “date” of the item name dictionary as the item name. FIG. 13D is a diagram showing the result of extracting the item value of the amount of money as the attribute from the character recognition result of FIG. 13A based on the regular expression pattern indicating the amount of money. FIG. 13 (e) is a diagram showing a result of extracting an item value whose attribute is a date from the character recognition result of FIG. 13 (a) based on a regular expression pattern indicating a date.

図14(a)および(b)は、項目名と項目値との組み合わせの生成処理を説明するための図である。図14(a)は、スキャン画像に含まれる料金の項目値を抽出するための項目名「料金」と項目値との組み合わせを生成する処理について説明する図である。 14 (a) and 14 (b) are diagrams for explaining the generation process of the combination of the item name and the item value. FIG. 14A is a diagram illustrating a process of generating a combination of the item name “charge” and the item value for extracting the item value of the charge included in the scanned image.

「料金」の項目名と対応付けられるべき項目値の属性は、金額の属性であると定義されている。また、「料金」の項目名と対応付けられるべき項目値の位置関係は、「項目名(左)−項目値(右)」、「項目名(上)−項目値(下)」、のいずれかと定義されている。また項目名に対応付ける項目値は1つである(「1:1」の関係にある)ものとして定義されている。この定義に従って「料金」の項目名に対応付けられる項目値が決定される。そして、図14(a)のように、項目名「料金」と金額を示す項目値「¥14,320」との組み合わせが生成される。項目名「金沢」よりも項目名「料金」方が、一致度が大きいため、絞り込み処理の結果、「¥14,320」が「料金」に対応付けられるように組み合わせが生成されている。 The attribute of the item value that should be associated with the item name of "charge" is defined as the attribute of the amount. In addition, the positional relationship of the item value to be associated with the item name of "charge" is either "item name (left) -item value (right)" or "item name (top) -item value (bottom)". Is defined as. Further, the item value associated with the item name is defined as one (in a "1: 1" relationship). According to this definition, the item value associated with the item name of "charge" is determined. Then, as shown in FIG. 14A, a combination of the item name “charge” and the item value “¥ 14,320” indicating the amount of money is generated. Since the item name "charge" has a higher degree of matching than the item name "Kanazawa", as a result of the narrowing down process, a combination is generated so that "¥ 14,320" can be associated with the "charge".

図14(b)は、スキャン画像に含まれる日付の項目値を抽出するための、項目名「日付」と項目値との組み合わせを生成する処理について説明する図である。「日付」の項目名と対応付けられるべき項目値の属性は、日付の属性であると定義されている。また、「日付」の項目名と対応付けられるべき項目値の位置関係は、「項目名(左)−項目値(右)」、「項目名(上)−項目値(下)」、のいずれかと定義されている。また項目名に対応付ける項目値は1つである(「1:1」の関係にある)ものとして定義されている。この定義に従って「日付」の項目名に対応付けられる項目値が決定される。その結果、項目名「日付」に日付と項目値「2019年1月1日」との組み合わせが生成される。 FIG. 14B is a diagram illustrating a process of generating a combination of the item name “date” and the item value for extracting the item value of the date included in the scanned image. The item value attribute that should be associated with the "date" item name is defined as the date attribute. In addition, the positional relationship of the item value to be associated with the item name of "date" is either "item name (left) -item value (right)" or "item name (top) -item value (bottom)". Is defined as. Further, the item value associated with the item name is defined as one (in a "1: 1" relationship). According to this definition, the item value associated with the item name of "date" is determined. As a result, a combination of the date and the item value "January 1, 2019" is generated in the item name "date".

このように、スキャン画像に金額と日付のように異なる属性の項目値が含まれている場合であっても、項目名に対応する項目値を対応付けて、項目名と項目値との組み合わせを生成することができる。 In this way, even if the scanned image contains item values with different attributes such as amount and date, the item values corresponding to the item names are associated with each other, and the combination of the item names and the item values can be obtained. Can be generated.

次に、文字認識結果に誤認識された結果が含まれている場合について説明する。図15(a)は、スキャン画像を文字認識した結果得られた文字認識結果の一例を示す図である。図15(a)の文字認識結果は、図13(a)の文字認識結果と同じ結果となるべきであるが、図15(a)中の「■■」が示すように「料金」と認識されるべき文字列領域に対して誤認識が生じている。また「金沢」は「金■」として誤認識されている。このような場合でも、「金■」には、項目名辞書「料金」のうち「金」が含まれているため、項目名「料金」の文字列として抽出される。一方、「■■」については下位候補にある文字候補を使っても「料金」に対して1文字も一致しないため、「料金」の項目名としては抽出されないことになる。 Next, a case where the character recognition result includes a result of erroneous recognition will be described. FIG. 15A is a diagram showing an example of the character recognition result obtained as a result of character recognition of the scanned image. The character recognition result of FIG. 15 (a) should be the same as the character recognition result of FIG. 13 (a), but it is recognized as a "charge" as shown by "■■" in FIG. 15 (a). There is a misrecognition of the character string area to be done. In addition, "Kanazawa" is misrecognized as "Kin ■". Even in such a case, since "gold" is included in the item name dictionary "charge", it is extracted as a character string of the item name "charge". On the other hand, for "■■", even if the character candidates in the lower candidates are used, even one character does not match with "charge", so that it is not extracted as the item name of "charge".

図15(b)は、図15(a)の文字認識結果において抽出された項目名に項目値を対応付けることにより生成された項目名と項目値との組み合わせを示す図である。このように項目値「¥14,320」は誤って「金■」に対応付けられて組み合わせが生成される。 FIG. 15B is a diagram showing a combination of the item name and the item value generated by associating the item name with the item name extracted in the character recognition result of FIG. 15A. In this way, the item value "¥ 14,320" is erroneously associated with "gold ■" to generate a combination.

そこで本実施形態では、図15(b)から再判定対象を選択するために、項目名と項目値を結ぶ線分を設定され、その線分に基づき再判定対象を選択する方法を説明する。 Therefore, in the present embodiment, in order to select the re-judgment target from FIG. 15B, a line segment connecting the item name and the item value is set, and a method of selecting the re-judgment target based on the line segment will be described.

具体的には、項目名が含まれる文字列領域内の点と、その項目名に対応付けられた項目値が含まれる文字列領域内の点とを結ぶ線分を、項目値とその項目値が対応付けられている項目名とについて設定する。そして、設定された線分のうち、互いに交差する線分がある場合、その交差しているそれぞれの線分の端点に位置する文字列領域における項目名と項目値の組み合わせが再判定対象として選択される。 Specifically, the line segment connecting the point in the character string area containing the item name and the point in the character string area including the item value associated with the item name is the item value and the item value. Set for the item name associated with. Then, if there are line segments that intersect each other among the set line segments, the combination of the item name and the item value in the character string area located at the end point of each intersecting line segment is selected as the re-judgment target. Will be done.

図15(c)を用いて説明すると、項目名として抽出された「金■」と「金■」に対応付けられた「¥14,320」とのそれぞれの文字列領域を結ぶ線分1501が設定される。次に、項目名として抽出された「日付」と「日付」に対応付けられた「2019年1月1日」とのそれぞれの文字列領域を結ぶ線分1502が設定される。図15(c)では、線分1501と線分1502は交差しているため交差している線分があると判定される。そして、交差している一方の線分1501の端部にある「¥14,320」とその項目名は再判定対象として選択され、同様に、交差している他方の線分1502の端部にある「日付」とその項目名とは再判定対象として選択される。 Explaining with reference to FIG. 15 (c), a line segment 1501 connecting the character string areas of "gold ■" extracted as the item name and "¥ 14,320" associated with "gold ■" is Set. Next, a line segment 1502 connecting the "date" extracted as the item name and the "January 1, 2019" associated with the "date" is set. In FIG. 15C, since the line segment 1501 and the line segment 1502 intersect, it is determined that there is an intersecting line segment. Then, "¥ 14,320" at the end of one intersecting line segment 1501 and its item name are selected as re-judgment targets, and similarly, at the end of the other intersecting line segment 1502. A certain "date" and its item name are selected as re-judgment targets.

線分は例えば、項目名の文字列領域のいずれかの角と項目値の文字列領域のいずれかの角とを結ぶ線分であり、図15(c)に示すように線分の長さが最も長くなるような点を決定して線分が設定される。例えば、項目名の文字列領域と項目値の文字列領域との位置関係が上下の場合、上にある文字列領域の上側にある角と、下にある文字列領域の下側にある角とを結ぶ線分が設定される。また、項目名の文字列領域と項目値の文字列領域との位置関係が左右の場合、左にある文字列領域の左側にある角と、右にある文字列領域の右側にある角とを結ぶ線分が設定される。 The line segment is, for example, a line segment connecting any corner of the character string area of the item name and any corner of the character string area of the item value, and is the length of the line segment as shown in FIG. 15 (c). The line segment is set by determining the point where is the longest. For example, if the positional relationship between the character string area of the item name and the character string area of the item value is up and down, the upper corner of the upper character string area and the lower corner of the lower character string area The line connecting the lines is set. Also, when the positional relationship between the character string area of the item name and the character string area of the item value is left and right, the corner on the left side of the character string area on the left and the corner on the right side of the character string area on the right are The connecting line is set.

本実施形態による再判定対象の選択方法は、単一の属性の項目値のみが含まれる文字認識結果についても適用可能である。 The method of selecting the re-judgment target according to the present embodiment is also applicable to the character recognition result including only the item value of a single attribute.

図16(a)は、S1108において組み合わせ生成部208によって生成された組み合わせの結果を示す図10(a)〜(b)の処理結果が重畳された図である。図16(b)は、それぞれの組み合わせの項目値とその項目値が対応付けられている項目名とを結ぶ線分を示す図である。小計内訳金額を抽出するための項目名「合計」は、対応付けられた項目値「¥1,000」「¥2,000」「¥3,000」「¥600」の夫々と結ばれる線分1601a〜dが設定される。 FIG. 16A is a diagram in which the processing results of FIGS. 10A to 10B showing the results of the combinations generated by the combination generation unit 208 in S1108 are superimposed. FIG. 16B is a diagram showing a line segment connecting the item value of each combination and the item name to which the item value is associated. The item name "total" for extracting the subtotal breakdown amount is a line segment connected to each of the associated item values "¥ 1,000", "¥ 2,000", "¥ 3,000", and "¥ 600". 1601a to d are set.

同様に、項目名として抽出された「小計」と「小計」に対応付けられた「¥6,000」とを結ぶ線分1602が設定される。また、合計金額を抽出するための項目名として抽出された「合計」とその「合計」に対応付けられた「¥6,600」とを結ぶ線分1603とが設定される。線分1601dと線分1602は交差しているため、交差する線分があると判定される。 Similarly, a line segment 1602 connecting the “subtotal” extracted as the item name and the “¥ 6,000” associated with the “subtotal” is set. Further, a line segment 1603 connecting the extracted "total" and the "¥ 6,600" associated with the "total" is set as the item name for extracting the total amount. Since the line segment 1601d and the line segment 1602 intersect, it is determined that there is an intersecting line segment.

このため、図16(c)に示すように、線分1601dの端部にある「¥600」とその項目名は再判定対象として選択される。また、線分1602の端部にある「¥6,000」とその項目名は再判定対象として選択される。このように本実施形態の方法によっても、再判定対象の項目値として、「¥600」を含めて選択することができる。 Therefore, as shown in FIG. 16C, "¥ 600" at the end of the line segment 1601d and its item name are selected as re-judgment targets. Further, "¥ 6,000" at the end of the line segment 1602 and its item name are selected as re-judgment targets. As described above, also by the method of the present embodiment, it is possible to select the item value to be re-determined including "¥ 600".

以上説明したように本実施形態によれば、複数の異なる属性の項目値が文字認識結果に含まれている場合であっても、再判定対象を選択することができる。 As described above, according to the present embodiment, it is possible to select the re-judgment target even when the character recognition result includes item values of a plurality of different attributes.

<実施形態3>
実施形態2では、項目名と項目値との間に線分を設定することで再判定対象を選択する方法を説明した。しかし、文字列領域が正しく特定されなかった場合、本来であれば交差すべき線分が交差しない場合がある。本実施形態では文字列領域が正しく特定されなかった場合でも、再判定対象が選択できるようにする方法を説明する。
<Embodiment 3>
In the second embodiment, a method of selecting a re-judgment target by setting a line segment between the item name and the item value has been described. However, if the character string area is not specified correctly, the line segments that should normally intersect may not intersect. In the present embodiment, a method of enabling the re-judgment target to be selected even when the character string area is not correctly specified will be described.

本実施形態については、実施形態2からの差分を中心に説明する。特に明記しない部分については実施形態2と同じ構成および処理である。 The present embodiment will be described mainly on the differences from the second embodiment. The parts not specified in particular have the same configuration and processing as in the second embodiment.

図17(a)は、本来であれば図3(a)に示す文字認識結果となるべき文字認識結果に基づく図である。図17(a)は、実施形態2の方法により再判定対象の選択をするために線分が設定された後の状態を示している。ただし、図17(a)における、「小計」に対応付けられている「¥6,0」は、文字列領域が正しく特定されていないため誤認識された文字列であり、本来は、図3(a)に示すように「¥6,000」として認識されるべき文字列であるものとする。項目名「小計」と「小計」に対応付けられている「¥6,0」との文字列領域を結んだ線分が線分1701である。図17(a)では、図16(c)とは異なり、線分1701と線分1601dとは交差しない。このため、項目値「¥600」または「¥6,0」が再判定対象として選択されないことがある。 FIG. 17A is a diagram based on the character recognition result which should be the character recognition result shown in FIG. 3A. FIG. 17A shows a state after the line segment is set in order to select the re-judgment target by the method of the second embodiment. However, in FIG. 17A, “¥ 6,0” associated with the “subtotal” is a character string that is erroneously recognized because the character string area is not correctly specified, and is originally shown in FIG. As shown in (a), it is assumed that the character string should be recognized as "¥ 6,000". The line segment 1701 connects the character string areas of the item name "subtotal" and "¥ 6,0" associated with the item name "subtotal". In FIG. 17A, unlike FIG. 16C, the line segment 1701 and the line segment 1601d do not intersect. Therefore, the item value "¥ 600" or "¥ 6,0" may not be selected as the re-judgment target.

このため本実施形態では、文字列領域が正しく特定されていないために文字の誤認識が発生している場合においても線分が交差するようにする。具体的には、対象選択部209は、線分の端部となる処理対象の文字列領域に対して、上下に存在する文字列領域の右端の座標値の横方向の成分値が同じかを判定する。同じと判定できる場合、対象選択部209は、処理対象の文字列領域の右端位置については、上下の何れかの文字列の右端の座標値の横方向の成分値に基づき線分を設定する。例えば、対象選択部209は、処理対象の文字列領域の右端が上下の文字列領域と同じになるように処理対象の文字列領域のサイズを修正して線分を設定する。なお、同じとは全く同じものでなくてもよく、例えば、差が所定の範囲内であれば同じとしてもよい。 Therefore, in the present embodiment, the line segments are made to intersect even when the erroneous recognition of the character occurs because the character string area is not correctly specified. Specifically, the target selection unit 209 determines whether the lateral component values of the coordinate values at the right ends of the character string areas existing above and below the character string area to be processed, which is the end of the line segment, are the same. judge. If it can be determined that they are the same, the target selection unit 209 sets a line segment for the right end position of the character string area to be processed based on the lateral component value of the right end coordinate value of any of the upper and lower character strings. For example, the target selection unit 209 modifies the size of the character string area to be processed so that the right end of the character string area to be processed is the same as the upper and lower character string areas, and sets the line segment. It should be noted that the same does not have to be exactly the same, and for example, it may be the same as long as the difference is within a predetermined range.

図17(b)は、処理対象の文字列領域である「6,0」の項目値が含まれる文字列領域の右端位置を修正してから設定された線分1702を示す図である。このように処理対象の文字列領域の右端位置を修正することにより、線分1702と線分1601dとは交差する。このため、項目値「¥6,0」および「¥600」を再判定対象として選択することができる。 FIG. 17B is a diagram showing a line segment 1702 set after correcting the right end position of the character string area including the item value of “6,0” which is the character string area to be processed. By correcting the right end position of the character string area to be processed in this way, the line segment 1702 and the line segment 1601d intersect. Therefore, the item values "¥ 6.0" and "¥ 600" can be selected as re-judgment targets.

なお、対象選択部209は、処理対象の文字列領域に対して上下に存在する文字列領域の左端の座標値の横方向の成分値が同じであるか判定する。そして、同じと判定できる場合、対象選択部209は、処理対象の文字列領域の左端位置については、上下の何れかの文字列の左端に合わせて線分を設定してもよい。 The target selection unit 209 determines whether the lateral component values of the leftmost coordinate values of the character string areas existing above and below the character string area to be processed are the same. Then, when it can be determined that they are the same, the target selection unit 209 may set a line segment for the left end position of the character string area to be processed according to the left end of any of the upper and lower character strings.

また、これまでの説明では、左上から右下の方向に描かれるように設定された線分を図示して説明していたが、右上から左下の方向に描かれるように線分が設定されてもよい。 Also, in the explanation so far, the line segment set to be drawn from the upper left to the lower right has been illustrated and explained, but the line segment is set to be drawn from the upper right to the lower left. May be good.

図17(c)では、項目名と項目値との位置関係が上下の関係の場合、上側にある文字列領域の右上と、下側にある文字列領域の左下と、を結ぶ線分1703が設定されている。図17(c)に示すとおり、線分1703を設定することにより、文字列領域が正しく特定されていない場合であっても、線分1703と線分1701は交差する。このため、項目値「¥6,0」と「¥600」とを再判定対象として選択することができる。このように、再判定対象が選択されない場合は、右上から左下の方向に描かれるような線分を設定した場合に交差する線分があるか判定して、再判定対象が選択されてもよい。 In FIG. 17C, when the positional relationship between the item name and the item value is vertically related, the line segment 1703 connecting the upper right of the character string area on the upper side and the lower left of the character string area on the lower side is It is set. As shown in FIG. 17C, by setting the line segment 1703, the line segment 1703 and the line segment 1701 intersect even when the character string area is not correctly specified. Therefore, the item values "¥ 6.0" and "¥ 600" can be selected as re-judgment targets. In this way, when the re-judgment target is not selected, it may be determined whether there is an intersecting line segment when a line segment drawn from the upper right to the lower left is set, and the re-judgment target may be selected. ..

または、対象選択部209は、項目名と、その項目名に対応付けられている全ての項目値ついて、左上から右下の方向の線分を設定した場合と、右上から左下への線分を設定した場合のような複数パターンの線分を設定する。そして、対象選択部209は、複数パターンのうち、線分が交差するパターンがあるか判定し、線分が交差するパターンがあれば、その交差する夫々の線分の端にある文字列領域に基づき、再判定対象が選択されてもよい。 Alternatively, the target selection unit 209 sets a line segment in the direction from the upper left to the lower right and a line segment from the upper right to the lower left for the item name and all the item values associated with the item name. Set multiple patterns of line segments as if they were set. Then, the target selection unit 209 determines whether there is a pattern in which the line segments intersect among the plurality of patterns, and if there is a pattern in which the line segments intersect, in the character string area at the end of each intersecting line segment. Based on this, the re-judgment target may be selected.

以上説明したように本実施形態によれば、文字列領域が正しく特定されない場合であっても、再判定対象を選択することができる。 As described above, according to the present embodiment, the re-judgment target can be selected even when the character string area is not correctly specified.

<その他の実施形態>
上述の実施形態においては、税額である消費税額と、合計金額から消費税額を減算した額の項目である小計と、は除外項目であるものとして説明した。他にも小計および消費税額の項目値は、合計金額として抽出された金額の数値の確からしさを得るために用いられてもよい。
<Other Embodiments>
In the above-described embodiment, the consumption tax amount, which is the tax amount, and the subtotal, which is the item obtained by subtracting the consumption tax amount from the total amount, are described as excluded items. In addition, the item values of the subtotal and the consumption tax amount may be used to obtain the certainty of the numerical value of the amount extracted as the total amount.

図11のフローチャートにおけるS1111の再生成処理の結果、図12(f)では、「小計」に対応付けられている項目値として「¥6,000」が決定されているが、「消費税額」の項目値は決定されていない。図12(d)では、合計金額は「¥6,600」と決定されているため、外部情報として消費税率は10%であることを取得することにより、項目値「¥600」は、消費税額に等しいことが判断できる。同様に、小計「6,000」と消費税率からも、項目値「¥600」は、消費税額に等しいことが判断できる。 As a result of the regeneration process of S1111 in the flowchart of FIG. 11, in FIG. 12 (f), "¥ 6,000" is determined as the item value associated with the "subtotal", but the "consumption tax amount" The item value has not been determined. In FIG. 12 (d), since the total amount is determined to be "¥ 6,600", the item value "¥ 600" is the consumption tax amount by acquiring that the consumption tax rate is 10% as external information. Can be determined to be equal to. Similarly, from the subtotal "6,000" and the consumption tax rate, it can be determined that the item value "¥ 600" is equal to the consumption tax amount.

このため、合計金額として抽出された「¥6,600」または小計の項目値である「¥6,000」に基づき消費税額の項目値が導出されてもよい。または、消費税、小計金額、および合計金額のいずれかが抽出されなかった場合も同様に、消費税率と抽出された項目値から、抽出されなかった項目値が導出されてもよい。 Therefore, the item value of the consumption tax amount may be derived based on "¥ 6,600" extracted as the total amount or "¥ 6,000" which is the item value of the subtotal. Alternatively, when any of the consumption tax, the subtotal amount, and the total amount is not extracted, the unextracted item value may be derived from the consumption tax rate and the extracted item value.

つまり、合計金額、消費税額、小計金額の項目名のうち、項目値との組み合わせが生成できない場合がある。この場合、組み合わせ生成部208によって生成された、合計金額、消費税額、および小計金額のいずれかの項目名の組み合わせに基づき、組み合わせが生成されなかった項目名の項目値が導出されてもよい。 That is, it may not be possible to generate a combination with the item value among the item names of the total amount, the consumption tax amount, and the subtotal amount. In this case, the item value of the item name for which the combination was not generated may be derived based on the combination of the item names of the total amount, the consumption tax amount, and the subtotal amount generated by the combination generation unit 208.

また、消費税額が決定できれば、小計「¥6,000」+消費税額「¥600」=合計金額「¥6,600」であることが検算できる。このため、合計「¥6,600」は正確に抽出できていると判断することができる。このように、出力対象が正しいことを示すためにも、抽出対象以外のものを抽出することは重要となる場合がある。このため、除外項目として抽出された項目値は、生成された組み合わせの精度を確かめるために用いられてもよい。つまり、画像処理装置は、合計金額、消費税額、小計金額を示す項目値に基づき、合計金額、消費税額、小計金額を示す項目値を検算する検算部を有していてもよい。 If the consumption tax amount can be determined, it can be verified that the subtotal "¥ 6,000" + the consumption tax amount "¥ 600" = the total amount "¥ 6,600". Therefore, it can be determined that the total "¥ 6,600" can be accurately extracted. In this way, it may be important to extract something other than the extraction target in order to show that the output target is correct. Therefore, the item value extracted as the exclusion item may be used to confirm the accuracy of the generated combination. That is, the image processing device may have a checking unit that checks the item values indicating the total amount, the consumption tax amount, and the subtotal amount based on the item values indicating the total amount, the consumption tax amount, and the subtotal amount.

本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by the processing to be performed. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

100 画像処理装置
203 文字認識部
205 項目名抽出部
207 項目値抽出部
208 組み合わせ生成部
209 対象選択部
100 Image processing device 203 Character recognition unit 205 Item name extraction unit 207 Item value extraction unit 208 Combination generation unit 209 Target selection unit

Claims (17)

スキャン画像に含まれる項目名と項目値とを抽出して、1つの項目名と1または複数の項目値との組み合わせを生成する画像処理装置であって、
前記スキャン画像に含まれる文字列領域を特定する特定手段と、
前記文字列領域の文字列を認識する文字認識手段と、
前記認識された文字列から項目値および項目名を抽出する抽出手段と、
前記抽出された項目名に対応付けられる前記抽出された項目値を、少なくとも項目値と項目名との位置関係に基づき決定する決定手段と、
前記決定された項目値が、複数の項目名に対応付けられないように前記組み合わせを生成する生成手段と、
前記位置関係を用いて、前記生成をやり直す項目名と項目値とを含む対象を選択する選択手段と、
を有することを特徴とする画像処理装置。
An image processing device that extracts item names and item values included in a scanned image and generates a combination of one item name and one or more item values.
Specific means for identifying the character string area included in the scanned image, and
A character recognition means for recognizing a character string in the character string area and
An extraction means for extracting an item value and an item name from the recognized character string, and
A determination means for determining the extracted item value associated with the extracted item name based on at least the positional relationship between the item value and the item name.
A generation means for generating the combination so that the determined item value is not associated with a plurality of item names.
A selection means for selecting an object including an item name and an item value for which the generation is redone using the positional relationship, and
An image processing device characterized by having.
前記選択手段は、
複数の項目名と対応付けられるように前記決定手段によって決定された項目値を特定し、前記特定された項目値の下方向または右方向の前記スキャン画像の位置に存在する項目値を、少なくとも前記対象に含まれる項目値として選択する
ことを特徴とする請求項1に記載の画像処理装置。
The selection means
The item value determined by the determination means is specified so as to be associated with a plurality of item names, and the item value existing at the position of the scanned image in the downward direction or the right direction of the specified item value is at least said. The image processing apparatus according to claim 1, wherein the image processing apparatus is selected as an item value included in the target.
前記選択手段は、
項目名が認識された文字列領域内の点と、該項目名と対応付けられた前記項目値が認識された文字列領域内の点とを結ぶ線分を設定し、前記設定された線分のうち他の線分と交差する線分がある場合、前記交差する線分の端にある文字列領域に基づき、前記対象を選択する
ことを特徴とする請求項1に記載の画像処理装置。
The selection means
A line segment connecting a point in the character string area in which the item name is recognized and a point in the character string area in which the item value associated with the item name is recognized is set, and the set line segment is set. The image processing apparatus according to claim 1, wherein when there is a line segment that intersects with another line segment, the target is selected based on the character string area at the end of the intersecting line segment.
前記選択手段は、
前記交差する線分のうち、第1の線分の端にある文字列領域から認識された項目値と、前記第1の線分と交差する第2の線分の端にある文字列領域から認識された項目値と、を前記対象に含まれる項目値として選択する
ことを特徴とする請求項3に記載の画像処理装置。
The selection means
Of the intersecting line segments, from the item value recognized from the character string area at the end of the first line segment and the character string area at the end of the second line segment intersecting with the first line segment. The image processing apparatus according to claim 3, wherein the recognized item value and the recognized item value are selected as the item value included in the target.
前記選択手段は、
前記文字列領域内の点として、前記線分が他の点を結ぶ線分よりも長くなる点を設定する
ことを特徴とする請求項3または4に記載の画像処理装置。
The selection means
The image processing apparatus according to claim 3 or 4, wherein as a point in the character string region, a point at which the line segment is longer than a line segment connecting other points is set.
前記文字列領域は矩形であり、前記文字列領域内の点は、前記文字列領域のいずれかの角にある
ことを特徴とする請求項3または4に記載の画像処理装置。
The image processing apparatus according to claim 3 or 4, wherein the character string area is rectangular, and points in the character string area are located at any corner of the character string area.
前記選択手段は、
前記抽出された項目名の文字列領域と該項目名に対応付けられた項目値の文字列領域との位置が上下の場合、上にある前記文字列領域の上側にある角と、下にある前記文字列領域の下側にある角とを結ぶ線分を設定し、前記位置が左右の場合、左にある前記文字列領域の左側にある角と、右にある前記文字列領域の右側にある角とを結ぶ線分を設定する
ことを特徴とする請求項6に記載の画像処理装置。
The selection means
When the positions of the character string area of the extracted item name and the character string area of the item value associated with the item name are up and down, the upper corner and the lower corner of the upper character string area are located. A line segment connecting the lower corners of the character string area is set, and when the positions are left and right, the corners on the left side of the character string area on the left and the right side of the character string area on the right are set. The image processing apparatus according to claim 6, wherein a line segment connecting a certain corner is set.
前記選択手段は、
前記抽出された項目名の文字列領域と該項目名に対応付けられた項目値の文字列領域とを結ぶ、複数パターンの線分を設定し、前記複数パターンのうち、前記線分が交差するパターンがある場合は、前記交差する夫々の線分の端にある文字列領域に基づき、前記対象を選択する
ことを特徴とする請求項3から7のいずれか1項に記載の画像処理装置。
The selection means
A line segment of a plurality of patterns connecting the character string area of the extracted item name and the character string area of the item value associated with the item name is set, and the line segments of the plurality of patterns intersect. The image processing apparatus according to any one of claims 3 to 7, wherein when there is a pattern, the target is selected based on the character string area at the end of each intersecting line segment.
前記選択手段は、
前記生成手段によって生成された前記組み合わせに含まれる項目名と該項目名と対応付けられた前記項目値に対して前記線分を設定する
ことを特徴とする請求項3から8のいずれか1項に記載の画像処理装置。
The selection means
Any one of claims 3 to 8, wherein the line segment is set for the item name included in the combination generated by the generation means and the item value associated with the item name. The image processing apparatus according to.
処理対象の文字列領域の上に位置する文字列領域と、前記処理対象の前記文字列領域の下に位置する文字列領域と、に基づき、前記線分を設定するための前記処理対象の文字列領域のサイズを修正する修正手段をさらに有する
ことを特徴とする請求項3から9のいずれか1項に記載の画像処理装置。
The character to be processed for setting the line segment based on the character string area located above the character string area to be processed and the character string area located below the character string area to be processed. The image processing apparatus according to any one of claims 3 to 9, further comprising a correction means for correcting the size of the column region.
前記修正手段は、
前記処理対象の文字列領域の上下の文字列領域における右端の座標の横方向の成分値が同じである場合、前記上下の文字列領域の右端位置に合わせるように前記サイズを修正する
ことを特徴とする請求項10に記載の画像処理装置。
The correction means
When the lateral component values of the rightmost coordinates in the upper and lower character string areas of the character string area to be processed are the same, the size is modified so as to match the right end position of the upper and lower character string areas. The image processing apparatus according to claim 10.
前記修正手段は、
前記処理対象の文字列領域の上下の文字列領域における左端の座標の横方向の成分値が同じである場合、前記上下の文字列領域の左端位置に合わせるように前記サイズを修正する
ことを特徴とする請求項10または11に記載の画像処理装置。
The correction means
When the lateral component values of the leftmost coordinates in the upper and lower character string areas of the character string area to be processed are the same, the size is modified so as to match the left end position of the upper and lower character string areas. The image processing apparatus according to claim 10 or 11.
前記スキャン画像は、合計金額と、合計金額に含まれる税額と、合計金額から前記税額を減算した額である小計金額と、が含まれる原稿をスキャンした画像であり、
前記合計金額、前記税額、前記小計金額を抽出するための項目名のうち、項目値との組み合わせが生成されない項目名がある場合、前記合計金額、前記税額、または前記小計金額を示す項目名と対応付けられた項目値に基づき、前記組み合わせが生成されなかった項目名の項目値を導出する導出手段をさらに有する
ことを特徴とする請求項1から12のいずれか1項に記載の画像処理装置。
The scanned image is an image obtained by scanning a manuscript containing the total amount, the tax amount included in the total amount, and the subtotal amount which is the amount obtained by subtracting the tax amount from the total amount.
Among the item names for extracting the total amount, the tax amount, and the subtotal amount, if there is an item name for which a combination with the item value is not generated, the item name indicating the total amount, the tax amount, or the subtotal amount is used. The image processing apparatus according to any one of claims 1 to 12, further comprising a derivation means for deriving the item value of the item name for which the combination was not generated based on the associated item value. ..
前記抽出手段は、
認識された文字列のうち項目名を示す単語との一致度が所定の値以上であれば、前記認識された文字列を項目名として抽出する
ことを特徴とする請求項1から13のいずれか1項に記載の画像処理装置。
The extraction means
Any of claims 1 to 13, characterized in that the recognized character string is extracted as the item name if the degree of matching with the word indicating the item name among the recognized character strings is equal to or more than a predetermined value. The image processing apparatus according to item 1.
前記選択手段が選択した前記対象の項目値と項目名との対応付けが誤っているか判定し、誤っていると判定された前記対象の項目値と項目名との対応付けを取り消すことにより、前記組み合わせの生成をやり直す第2生成手段をさらに有する
ことを特徴とする請求項1から14のいずれか1項に記載の画像処理装置。
By determining whether the association between the item value of the target selected by the selection means and the item name is incorrect, and canceling the association between the item value of the target and the item name determined to be incorrect, the above. The image processing apparatus according to any one of claims 1 to 14, further comprising a second generation means for regenerating the combination.
スキャン画像に含まれる項目名と項目値とを抽出して、1つの項目名と1または複数の項目値との組み合わせを生成する画像処理方法であって、
前記スキャン画像に含まれる文字列領域を特定する特定ステップと、
前記文字列領域の文字列を認識する文字認識ステップと、
前記認識された文字列から項目値および項目名を抽出する抽出ステップと、
前記抽出された項目名に対応付けられる前記抽出された項目値を、少なくとも項目値と項目名との位置関係に基づき決定する決定ステップと、
前記決定された項目値が、複数の項目名に対応付けられないように前記組み合わせを生成する生成ステップと、
前記位置関係を用いて、前記生成をやり直す項目名と項目値とを含む対象を選択する選択ステップと、
を有することを特徴とする画像処理方法。
An image processing method that extracts item names and item values included in a scanned image and generates a combination of one item name and one or more item values.
A specific step for identifying the character string area included in the scanned image, and
A character recognition step for recognizing a character string in the character string area, and
An extraction step for extracting an item value and an item name from the recognized character string, and
A determination step of determining the extracted item value associated with the extracted item name based on at least the positional relationship between the item value and the item name.
A generation step of generating the combination so that the determined item value is not associated with a plurality of item names, and
A selection step of selecting an object including an item name and an item value for which the generation is redone using the positional relationship, and
An image processing method characterized by having.
コンピュータを、請求項1から15のいずれか1項に記載の画像処理装置の各手段として機能させるためのプログラム。 A program for causing a computer to function as each means of the image processing apparatus according to any one of claims 1 to 15.
JP2019231387A 2019-12-23 2019-12-23 Image processor, image processing method, and program Pending JP2021099688A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019231387A JP2021099688A (en) 2019-12-23 2019-12-23 Image processor, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019231387A JP2021099688A (en) 2019-12-23 2019-12-23 Image processor, image processing method, and program

Publications (1)

Publication Number Publication Date
JP2021099688A true JP2021099688A (en) 2021-07-01

Family

ID=76542046

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019231387A Pending JP2021099688A (en) 2019-12-23 2019-12-23 Image processor, image processing method, and program

Country Status (1)

Country Link
JP (1) JP2021099688A (en)

Similar Documents

Publication Publication Date Title
JP6900164B2 (en) Information processing equipment, information processing methods and programs
JP6878034B2 (en) Information processing equipment, control methods, and programs
US9613299B2 (en) Method of identifying pattern training need during verification of recognized text
JP6119952B2 (en) Image processing apparatus and image processing program
US10062007B2 (en) Apparatus and method for creating an image recognizing program having high positional recognition accuracy
US11475688B2 (en) Information processing apparatus and information processing method for extracting information from document image
US9519404B2 (en) Image segmentation for data verification
JP2010250425A (en) Underline removal apparatus
KR20210038384A (en) Apparatus, method, and storage medium for supporting data entry
JP2021043775A (en) Information processing device and program
CN113378839A (en) Information processing apparatus, information processing method, and computer readable medium
EP3193279A1 (en) Information processing apparatus, control method of information processing apparatus, and storage medium
US10509934B1 (en) Methods and apparatus for improving QR code locator detectability and/or finding the corners of a locator pattern
JP5623574B2 (en) Form identification device and form identification method
JP2010061471A (en) Character recognition device and program
US20180189562A1 (en) Character recognition apparatus, character recognition method, and computer program product
JP2018055256A (en) Information processing apparatus, information processing method, and program
JP7082073B2 (en) Computer, learning data generation method, and computer system
JP2015135576A (en) Document item recognition method, device and program
JP2021099688A (en) Image processor, image processing method, and program
US11588945B2 (en) Data input support apparatus that displays a window with an item value display area, an overview image display area, and an enlarged image display area
JP6700705B2 (en) Distribution system, information processing method, and program
JP4651876B2 (en) PATTERN IDENTIFICATION DEVICE, PATTERN IDENTIFICATION METHOD, AND PATTERN IDENTIFICATION PROGRAM
US10049107B2 (en) Non-transitory computer readable medium and information processing apparatus and method
JP2021196686A (en) Information processing device and information processing method