JP7458600B2 - Information processing device and program - Google Patents

Information processing device and program Download PDF

Info

Publication number
JP7458600B2
JP7458600B2 JP2022207647A JP2022207647A JP7458600B2 JP 7458600 B2 JP7458600 B2 JP 7458600B2 JP 2022207647 A JP2022207647 A JP 2022207647A JP 2022207647 A JP2022207647 A JP 2022207647A JP 7458600 B2 JP7458600 B2 JP 7458600B2
Authority
JP
Japan
Prior art keywords
rectangle
circumscribed
subgroup
rectangular
image data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2022207647A
Other languages
Japanese (ja)
Other versions
JP2023036833A (en
JP2023036833A5 (en
Inventor
一也 谷川
順 太田
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.)
Milabo Co Ltd
Original Assignee
Milabo Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Milabo Co Ltd filed Critical Milabo Co Ltd
Priority to JP2022207647A priority Critical patent/JP7458600B2/en
Publication of JP2023036833A publication Critical patent/JP2023036833A/en
Publication of JP2023036833A5 publication Critical patent/JP2023036833A5/ja
Application granted granted Critical
Publication of JP7458600B2 publication Critical patent/JP7458600B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、帳票の画像を処理する情報処理装置及びプログラムに関する。 The present invention relates to an information processing device and a program for processing an image of a form.

情報の記入枠を複数含む帳票から、各記入枠に記入された情報を読み取る技術が実用化されている。この技術では、予め帳票の種類ごとに、記入枠の領域を特定する座標情報と、当該座標情報で特定される領域がどのような情報を記入する記入枠に対応するかを表す情報とを、関連付けて領域情報として記憶しておく。 2. Description of the Related Art A technology has been put into practical use that reads information written in each entry box from a form that includes a plurality of information entry boxes. In this technology, for each type of form, coordinate information that specifies the area of the entry frame and information that indicates what kind of information the area specified by the coordinate information corresponds to the entry frame are stored in advance. It is associated and stored as area information.

情報の読み取りの際には、帳票の種類を特定し、当該特定した種類の帳票に関して記憶している、上記領域情報を参照し、当該帳票上の情報記入枠内の情報を読み取ることとしている。 When reading information, the type of form is specified, the area information stored for the specified type of form is referred to, and the information within the information entry frame on the form is read.

特開平2011-169451号公報Japanese Patent Application Publication No. 2011-169451

しかしながら、上記領域情報は、必ずしも用意されているとは限らない。例えば新規の帳票や、類似する帳票であっても記入枠の位置が変更されている場合もあり得る。このような場合に、読み取った帳票上の記入枠の領域を、人為的操作なく認識することで、領域情報の生成を簡便にすることなどが望まれている。 However, the above area information is not necessarily prepared. For example, even in a new form or a similar form, the position of the entry frame may have been changed. In such cases, it is desired to simplify the generation of area information by recognizing the area of the entry frame on the read form without any manual operation.

本発明は上記実情に鑑みて為されたもので、光学的に読み取られた帳票の記入枠の領域を、人為的操作なく認識できる情報処理装置、及びプログラムを提供することを、その目的の一つとする。 The present invention has been made in consideration of the above-mentioned circumstances, and one of its objectives is to provide an information processing device and program that can recognize the area of the entry frame of an optically read document without manual operation.

なお、光学的文字認識を行うため、ノイズが重畳していないと判定される文字の領域を行方向または列方向に延伸して文字が含まれると想定される領域を見出す技術が特許文献1に開示されている。しかしながらこの特許文献1に開示の技術では、記入枠の領域を認識することはできない。 In addition, in order to perform optical character recognition, Patent Document 1 discloses a technique for finding an area that is assumed to contain characters by stretching the area of characters that is determined not to have superimposed noise in the row or column direction. Disclosed. However, the technique disclosed in Patent Document 1 cannot recognize the area of the entry frame.

上記従来例の問題点を解決する本発明の一態様は、情報処理装置であって、帳票の画像データを受け入れる手段と、前記受け入れた帳票の画像データから、帳票上の記入枠の候補の外接矩形を抽出する手段と、前記帳票の画像データの第1の軸方向に配列された、複数の前記外接矩形を含む第1矩形サブグループを少なくとも一つ認識する第1認識手段と、前記第1認識手段が認識した第1矩形サブグループごとに、当該第1矩形サブグループに含まれる複数の外接矩形にさらに外接する第1グループ矩形を設定する第1グループ化手段と、前記帳票の画像データの、前記第1の軸方向に交差する第2の軸方向に配列された、複数の前記外接矩形を含む第2矩形サブグループを少なくとも一つ認識する第2認識手段と、前記第2認識手段が認識した前記第2矩形サブグループごとに、当該第2矩形サブグループに含まれる複数の外接矩形にさらに外接する第2グループ矩形を設定する第2グループ化手段と、前記第1グループ矩形と、前記第2グループ矩形との交差範囲を、記入枠として認識し、当該認識した記入枠内の画像データを抽出して所定の処理に供する手段と、を有することとしたものである。 One aspect of the present invention that solves the problems of the above-mentioned conventional examples is an information processing device, comprising: a means for receiving image data of a form; a means for extracting circumscribing rectangles of candidates for entry frames on the form from the received image data of the form; a first recognition means for recognizing at least one first rectangle subgroup including a plurality of the circumscribing rectangles arranged in a first axis direction of the image data of the form; a first grouping means for setting, for each first rectangle subgroup recognized by the first recognition means, a first group rectangle that further circumscribs the plurality of circumscribing rectangles included in the first rectangle subgroup; The image data includes a second recognition means for recognizing at least one second rectangular subgroup including a plurality of the circumscribing rectangles arranged in a second axis direction intersecting the first axis direction, a second grouping means for setting a second group rectangle that further circumscribing the plurality of circumscribing rectangles included in the second rectangular subgroup for each of the second rectangular subgroups recognized by the second recognition means, and a means for recognizing the intersection range between the first group rectangle and the second group rectangle as an entry frame, extracting image data within the recognized entry frame, and providing the image data for predetermined processing.

本発明によると、光学的に読み取られた帳票の記入枠の領域を、人為的操作なく認識できる。 According to the present invention, it is possible to recognize the entry frame area of an optically read form without any manual operation.

本発明の実施の形態に係る情報処理装置の構成例を表すブロック図である。1 is a block diagram illustrating a configuration example of an information processing device according to an embodiment of the present invention. FIG. 本発明の実施の形態に係る情報処理装置が処理の対象とする帳票の例を表す説明図である。FIG. 2 is an explanatory diagram illustrating an example of a form to be processed by the information processing apparatus according to the embodiment of the present invention. 本発明の実施の形態に係る情報処理装置の例を表す機能ブロック図である。FIG. 1 is a functional block diagram illustrating an example of an information processing device according to an embodiment of the present invention. 本発明の実施の形態に係る情報処理装置による記入枠の候補の検出処理の例を表す説明図である。FIG. 3 is an explanatory diagram illustrating an example of processing for detecting fill-in box candidates by the information processing device according to the embodiment of the present invention. 本発明の実施の形態に係る情報処理装置によるグループ化の処理の例を表す説明図である。FIG. 2 is an explanatory diagram illustrating an example of grouping processing performed by the information processing apparatus according to the embodiment of the present invention. 本発明の実施の形態に係る情報処理装置による記入枠の認識処理の例を表す説明図である。FIG. 3 is an explanatory diagram illustrating an example of recognition processing of a fill-in frame by the information processing device according to the embodiment of the present invention. 本発明の実施の形態に係る情報処理装置が処理の対象とする帳票に含まれる、表組の別の例を表す説明図である。FIG. 7 is an explanatory diagram showing another example of a table format included in a form to be processed by the information processing apparatus according to the embodiment of the present invention.

本発明の実施の形態について図面を参照しながら説明する。本発明の実施の形態に係る情報処理装置1は、図1に例示するように、制御部11と、記憶部12と、操作部13と、表示部14と、インタフェース部15とを含んで構成される一般的なコンピュータ装置であり、スキャナ2等のデバイスに接続されている。 Embodiments of the present invention will be described with reference to the drawings. As illustrated in FIG. 1, the information processing device 1 according to the embodiment of the present invention includes a control section 11, a storage section 12, an operation section 13, a display section 14, and an interface section 15. This is a general computer device connected to a device such as a scanner 2.

制御部11は、プロセッサ等の制御デバイスであり、記憶部12に格納されたプログラムに従って動作する。本実施の形態では、この制御部11は、例えばスキャナ2が光学的に読み取って得た帳票の画像データを受け入れる。本実施の形態の例では、ここで読み取られる帳票は、図2に例示するように、情報を記入するための枠(記入枠)が複数、行方向及び列方向に整列して配された表組(T)を含むものであるとする。 The control unit 11 is a control device such as a processor, and operates according to a program stored in the memory unit 12. In this embodiment, the control unit 11 receives image data of a form obtained by optically reading the form using the scanner 2, for example. In this embodiment, the form read here includes a table (T) in which multiple frames (writing frames) for writing information are aligned in the row and column directions, as shown in FIG. 2.

制御部11は、帳票の画像データを受け入れると、当該受け入れた画像データから、帳票上の記入枠の候補を認識し、当該記入枠の候補に外接矩形を抽出する。制御部11は、帳票の画像データの第1の軸方向に配列された、上記抽出した複数の外接矩形を含む第1矩形サブグループを少なくとも一つ認識し、さらに、認識した第1矩形サブグループごとに、当該第1矩形サブグループに含まれる複数の上記外接矩形にさらに外接する第1グループ矩形を設定する。 When the control unit 11 receives the image data of the form, it recognizes a candidate for an entry frame on the form from the received image data, and extracts a circumscribed rectangle for the candidate for the entry frame. The control unit 11 recognizes at least one first rectangular subgroup that is arranged in the first axis direction of the image data of the form and includes the plurality of circumscribed rectangles extracted above, and further recognizes the first rectangular subgroup that is arranged in the first axis direction of the image data of the form. For each, a first group rectangle that further circumscribes the plurality of circumscribed rectangles included in the first rectangle subgroup is set.

また制御部11は、帳票の画像データの、第2の軸方向に配列された、上記複数の外接矩形を含む第2矩形サブグループを少なくとも一つ認識し、当該認識した第2矩形サブグループごとに、当該第2矩形サブグループに含まれる上記複数の外接矩形にさらに外接する第2グループ矩形を設定する。ここで第1の軸方向と第2の軸方向とは互いに交差する(非平行である)ものとする。 The control unit 11 also recognizes at least one second rectangular subgroup of the image data of the form that is arranged in the second axis direction and includes the plurality of circumscribed rectangles, and for each of the recognized second rectangular subgroups. Then, a second group rectangle that further circumscribes the plurality of circumscribed rectangles included in the second rectangle subgroup is set. Here, it is assumed that the first axial direction and the second axial direction intersect with each other (are non-parallel).

制御部11は、ここで設定した第1グループ矩形と第2グループ矩形との交差範囲を、記入枠として認識し、当該認識した記入枠内の画像データを抽出して所定の処理に供する。この制御部11の詳しい動作については後に述べる。 The control unit 11 recognizes the intersection range of the first group rectangle and the second group rectangle set here as a writing frame, extracts image data within the recognized writing frame, and subjects it to predetermined processing. The detailed operation of this control section 11 will be described later.

記憶部12は、ディスクデバイスやメモリデバイス等であり、制御部11によって実行されるプログラムを保持する。このプログラムは、コンピュータ可読かつ非一時的な記録媒体に格納されて提供され、この記憶部12に格納されたものであってもよい。また、この記憶部12は、制御部11のワークメモリとしても動作する。 The storage unit 12 is a disk device, a memory device, or the like, and holds programs executed by the control unit 11. This program may be provided by being stored in a computer-readable, non-transitory recording medium, and may be stored in this storage unit 12. Further, this storage section 12 also operates as a work memory for the control section 11.

操作部13は、キーボード等であり、ユーザの操作を受け入れて、当該操作の内容を制御部11に出力する。表示部14は、ディスプレイ等であり、制御部11から入力される指示に従って情報を表示出力する。 The operation unit 13 is a keyboard or the like, and accepts a user's operation and outputs the content of the operation to the control unit 11. The display unit 14 is a display or the like, and displays and outputs information according to instructions input from the control unit 11.

インタフェース部15は、例えばUSBインタフェース等を含む。本実施の形態の一例では、スキャナ2等のデバイスは、このインタフェース部15を介して情報処理装置1に接続される。 The interface unit 15 includes, for example, a USB interface. In one example of the present embodiment, a device such as the scanner 2 is connected to the information processing device 1 via this interface unit 15.

また本実施の形態の情報処理装置1に接続されるスキャナ2は、光学的に紙媒体上に形成された文字や図形を読み取り、画像データとして出力するものである。 The scanner 2 connected to the information processing device 1 of this embodiment optically reads characters and figures formed on a paper medium and outputs them as image data.

次に、制御部11の処理例について説明する。本実施の形態では、この制御部11は、図3に例示するように、受入部21と、記入枠候補抽出部22と、第1認識部23と、第1グループ化部24と、第2認識部25と、第2グループ化部26と、記入枠認識部27と、情報出力部28とを含んで構成されている。 Next, a processing example of the control unit 11 will be described. In the present embodiment, the control unit 11 includes, as illustrated in FIG. It is configured to include a recognition section 25, a second grouping section 26, a frame recognition section 27, and an information output section 28.

受入部21は、インタフェース部15を介してスキャナ2から、スキャナ2が読み取った帳票の画像データを受け入れる。この画像データは、いわゆるビットマップ画像データである。 The receiving unit 21 receives image data of a form read by the scanner 2 from the scanner 2 via the interface unit 15 . This image data is so-called bitmap image data.

また、上述したように本実施の形態の情報処理装置1が処理の対象とする帳票の例は、図2に例示したように、情報を記入するための枠(記入枠)が複数、行方向及び列方向に整列して配された表組(T)を含むものである。図2の例では、表組(T)は、時間帯ごとの担当者の氏名を記入するための記入枠Aが行方向に整列して複数配され、列方向には担当場所ごとの担当者の氏名を記入するための記入枠Aが整列して配されているものとしている。つまり、この表組(T)では、各担当場所ごと、各時間帯ごとに、担当者の氏名が記入された状態となっているものとする。またこの表組(T)において、第1行目は時間帯を識別する情報が記入される記入枠(D)を配列したものとし、第1列目は担当場所を識別する情報が記入される記入枠(P)が配列されているものとする。 Further, as described above, an example of a form that is a target of processing by the information processing device 1 of the present embodiment has multiple frames for entering information (input frames) in the row direction, as illustrated in FIG. and tables (T) arranged in the column direction. In the example in Figure 2, the table (T) has a plurality of entry frames A arranged in the row direction for entering the name of the person in charge for each time period, and the column direction for writing the name of the person in charge for each time zone. It is assumed that the entry boxes A for entering the names of the persons are arranged in a line. In other words, in this table (T), the name of the person in charge is entered for each location and each time period. In addition, in this table (T), the first row is an arrangement of entry frames (D) in which information identifying the time zone is written, and the first column is filled with information identifying the place in charge. It is assumed that the entry frames (P) are arranged.

また本実施の形態の情報処理装置1は、受け入れた帳票の画像データに対して第1の軸方向と、第1の軸方向に交差する第2の軸方向とを設定する。ここで第1、第2の軸方向は互いに直交した方向としてよい。以下の例では、第1の軸方向を行方向(スキャナ2の副走査方向)、第2の軸方向を列方向(スキャナ2の主走査方向)とする。 Further, the information processing device 1 of the present embodiment sets a first axis direction and a second axis direction intersecting the first axis direction for the image data of the received form. Here, the first and second axial directions may be orthogonal to each other. In the following example, the first axial direction is the row direction (the sub-scanning direction of the scanner 2), and the second axial direction is the column direction (the main scanning direction of the scanner 2).

記入枠候補抽出部22は、受入部21が受け入れた帳票の画像データから、帳票上の記入枠の候補を認識し、当該認識した記入枠の候補の領域に外接する外接矩形を抽出する。具体的な例として、本実施の形態では、記入枠候補抽出部22は、記入枠が矩形状の図形により表されているため、ハフ変換により直線の方向が行方向または列方向に整列するよう、受入部21が受け入れた帳票の画像データを回転処理する。 The entry box candidate extraction unit 22 recognizes entry box candidates on the form from the image data of the form accepted by the acceptance unit 21, and extracts a circumscribing rectangle that circumscribes the area of the recognized entry box candidate. As a specific example, in this embodiment, since the entry boxes are represented by rectangular figures, the entry box candidate extraction unit 22 rotates the image data of the form accepted by the acceptance unit 21 so that the direction of straight lines is aligned in the row direction or column direction by the Hough transform.

そして記入枠候補抽出部22は、行ごと及び列ごとに、有意画素(例えば輝度が所定のしきい値を下回る画素を黒とし、そうでない画素を白とする処理(二値化処理)をして黒色となる画素)の数をカウントし、有意画素が所定の方法で定めたカウントしきい値より多い行または列を見出す。記入枠候補抽出部22は、当該見出した行または列に含まれ、有意画素が連続する範囲を抽出し、当該範囲の大きさが予め定めた連続しきい値より大きい場合に、当該連続した範囲を、記入枠を区切る罫線であると認識する。 Then, the frame candidate extracting unit 22 performs a process (binarization process) in which significant pixels (for example, pixels whose luminance is below a predetermined threshold value are set as black, and pixels that are not otherwise set as white) for each row and each column. The number of significant pixels (pixels that turn black) is counted, and rows or columns in which the number of significant pixels is greater than a count threshold determined by a predetermined method are found. The frame candidate extraction unit 22 extracts a range in which significant pixels are included in the found row or column, and if the size of the range is larger than a predetermined continuity threshold, the continuous range is extracted. is recognized as a ruled line that separates entry frames.

記入枠候補抽出部22は、行方向に互いに隣接する一対の罫線の間の矩形であって、列方向に互いに隣接する一対の罫線で仕切られる矩形部分を、記入枠の候補の領域として認識する。記入枠候補抽出部22は、当該認識した各記入枠の候補の領域に外接する矩形を表す情報を、外接矩形を表す情報として出力する。 The writing frame candidate extracting unit 22 recognizes a rectangular portion between a pair of ruled lines adjacent to each other in the row direction and partitioned by a pair of ruled lines adjacent to each other in the column direction as a candidate area for a writing frame. . The entry frame candidate extracting unit 22 outputs information representing a rectangle circumscribing the area of each recognized entry frame candidate as information representing a circumscribing rectangle.

この例では、図4(a)に例示するように、互いに隣接する記入枠の候補は、一つの罫線を共有する。すなわち記入枠A1の右辺の罫線は、記入枠A2の左辺の罫線でもあり、記入枠A1の下辺の罫線は、記入枠A3の上辺の罫線でもある。 In this example, as illustrated in FIG. 4(a), candidates for entry frames that are adjacent to each other share one ruled line. That is, the ruled line on the right side of entry frame A1 is also the ruled line on the left side of entry frame A2, and the ruled line on the lower side of entry frame A1 is also the ruled line on the upper side of entry frame A3.

また、別の方法では、記入枠候補抽出部22は、帳票の画像データ内の有意画素塊(文字)に外接する矩形(文字矩形)を認識する。ここで文字を構成する有意画素に外接する文字矩形を認識する処理については広く知られた方法を採用できるので、ここでの詳しい説明を省略する。 In another method, the entry frame candidate extracting unit 22 recognizes a rectangle (character rectangle) that circumscribes a significant pixel block (character) in the image data of the form. Here, since a widely known method can be adopted for the process of recognizing character rectangles circumscribing significant pixels constituting a character, a detailed explanation will be omitted here.

記入枠候補抽出部22は、認識した複数の文字矩形を所定の文字グループ化条件に基づいてグループ化する。ここで文字グループ化条件は、例えば互いに隣接する文字矩形までの距離が所定の文字間隔しきい値を下回るとの条件でよい。また罫線が別途認識できる場合は、上記文字間隔しきい値に係る条件を満足し、かつ、認識した罫線で分断されないとの条件などとしておく。 The entry frame candidate extraction unit 22 groups the plurality of recognized character rectangles based on predetermined character grouping conditions. Here, the character grouping condition may be, for example, that the distance between adjacent character rectangles is less than a predetermined character spacing threshold. If a ruled line can be separately recognized, the conditions are set such that the above-mentioned character spacing threshold value is satisfied and the character is not divided by the recognized ruled line.

この場合、記入枠候補抽出部22は、文字グループ化条件によりグループ化された複数の文字矩形にさらに外接する文字列外接矩形を生成し、この生成した文字列外接矩形内の領域を、記入枠の候補の領域とする。 In this case, the entry box candidate extraction unit 22 generates a character string circumscribing rectangle that further circumscribing the multiple character rectangles grouped according to the character grouping conditions, and the area within this generated character string circumscribing rectangle is set as the area of the entry box candidate.

この例では、図4(b)に例示するように、記入枠の候補の領域A′1,A′2,A′3は、罫線で仕切られる領域に内包される。またこの例では、記入枠の候補の領域に外接する矩形(外接矩形)は、文字列外接矩形そのものを用いてよい。 In this example, as illustrated in FIG. 4B, candidate areas A'1, A'2, and A'3 for the entry frame are included in an area partitioned by ruled lines. In this example, the rectangle (circumscribed rectangle) circumscribing the candidate region of the entry frame may be the character string circumscribing rectangle itself.

第1認識部23は、記入枠候補抽出部22が抽出した複数の外接矩形のいずれか一つを選択して、当該選択した外接矩形に対して、帳票の画像データの行方向(第1の軸方向に相当する)に存在する他の外接矩形を検出する。 The first recognition unit 23 selects any one of the plurality of circumscribed rectangles extracted by the entry frame candidate extraction unit 22, and selects one of the plurality of circumscribed rectangles extracted by the entry frame candidate extraction unit 22, and performs a process in the row direction (first direction) of the image data of the form with respect to the selected circumscribed rectangle. Detect other circumscribed rectangles that exist in the axial direction).

第1認識部23は、選択した外接矩形と、検出した他の外接矩形とを含む第1矩形サブグループを設定する。 The first recognition unit 23 sets a first rectangle subgroup including the selected circumscribed rectangle and other detected circumscribed rectangles.

第1認識部23は、いずれの第1矩形サブグループに属していない外接矩形(かつ、後で説明する第1孤立矩形として設定されていない外接矩形)があれば、当該外接矩形の一つをさらに選択して上記の処理を繰り返す。なお、選択した外接矩形に対して、帳票の画像データの行方向(第1の軸方向に相当する)に存在する他の外接矩形が存在しない場合、第1認識部23は、選択した外接矩形を、第1孤立矩形として設定する。 If there is a circumscribed rectangle that does not belong to any first rectangle subgroup (and a circumscribed rectangle that is not set as a first isolated rectangle, which will be explained later), the first recognition unit 23 selects one of the circumscribed rectangles. Select more and repeat the above process. Note that when there is no other circumscribed rectangle existing in the row direction (corresponding to the first axis direction) of the image data of the form with respect to the selected circumscribed rectangle, the first recognition unit 23 recognizes the selected circumscribed rectangle. is set as the first isolated rectangle.

一例として、この第1認識部23は、図5に例示するように、外接矩形Aを選択した場合、この外接矩形Aの上辺,下辺をそれぞれ延長した線分AH,ABを仮想的に設定し、この範囲に重なる、外接矩形Aとは異なる外接矩形(他の外接矩形)B,C,D…を見出す。第1認識部23は、見出した他の外接矩形のそれぞれについて、線分AH,ABの間にある面積RINと、線分AH,ABの外にある部分の面積ROUTとを比較し、条件:
RIN>ROUT、かつ、
ROUT<Rrow_th
を満足するか否かを調べる。ここでRrow_thは、経験的に定められるしきい値であり、線分AH,ABの外にある部分の面積がどの程度であれば、選択した外接矩形Aが属する第1矩形サブグループに含めるかを定めるものである。
5, when the first recognition unit 23 selects a circumscribing rectangle A, it virtually sets line segments AH, AB extending the top and bottom sides of the circumscribing rectangle A, and finds other circumscribing rectangles B, C, D, etc. that overlap this range and are different from the circumscribing rectangle A (other circumscribing rectangles). For each of the other circumscribing rectangles it finds, the first recognition unit 23 compares the area RIN between the line segments AH, AB with the area ROUT of the portion outside the line segments AH, AB, and determines whether the area satisfies the condition:
RIN>ROUT, and
ROUT < Rrow_th
Here, Rrow_th is an empirically determined threshold value that determines the extent of the area of the portion outside the line segments AH and AB that is to be included in the first rectangle subgroup to which the selected circumscribing rectangle A belongs.

そして第1認識部23は、上記条件を満足すると判断される外接矩形と、外接矩形Aとをグループ化して、一つの第1矩形サブグループとする。図5の例では、外接矩形A,B,Cが一つの第1矩形サブグループに属するものとされ、外接矩形Dは、RIN>ROUTでないために、外接矩形Aが属する第1矩形サブグループにはグループ化されない。 The first recognition unit 23 then groups the circumscribed rectangles that are determined to satisfy the above conditions and the circumscribed rectangle A into one first rectangle subgroup. In the example of FIG. 5, circumscribed rectangles A, B, and C belong to one first rectangle subgroup, and since RIN>ROUT does not hold, circumscribed rectangle D belongs to the first rectangle subgroup to which circumscribed rectangle A belongs. are not grouped.

第1グループ化部24は、第1認識部23が設定した少なくとも一つの第1矩形サブグループごとに、当該第1矩形サブグループに含まれる複数の外接矩形にさらに外接する第1グループ矩形を設定する。 For at least one first rectangle subgroup set by the first recognition unit 23, the first grouping unit 24 sets a first group rectangle that further circumscribes the multiple circumscribed rectangles included in the first rectangle subgroup.

第2認識部25は、記入枠候補抽出部22が抽出した複数の外接矩形のいずれか一つを選択して、当該選択した外接矩形に対して、帳票の画像データの列方向(第2の軸方向に相当する)に存在する他の外接矩形を検出する。 The second recognition unit 25 selects any one of the plurality of circumscribed rectangles extracted by the entry frame candidate extraction unit 22, and applies the column direction (second direction) of the image data of the form to the selected circumscribed rectangle. Detect other circumscribed rectangles that exist in the axial direction).

第2認識部25は、選択した外接矩形と、検出した他の外接矩形とを含む第2矩形サブグループを設定する。 The second recognition unit 25 sets a second rectangle subgroup including the selected circumscribed rectangle and other detected circumscribed rectangles.

第2認識部25は、いずれの第2矩形サブグループに属していない外接矩形(かつ、後で説明する第2孤立矩形として設定されていない外接矩形)があれば、当該外接矩形の一つをさらに選択して上記の処理を繰り返す。なお、選択した外接矩形に対して、帳票の画像データの列方向(第2の軸方向に相当する)に存在する他の外接矩形が存在しない場合、第2認識部25は、選択した外接矩形を、第2孤立矩形として設定する。 If there is a circumscribed rectangle that does not belong to any second rectangle subgroup (and a circumscribed rectangle that is not set as a second isolated rectangle to be described later), the second recognition unit 25 selects one of the circumscribed rectangles. Select more and repeat the above process. Note that when there is no other circumscribed rectangle existing in the column direction (corresponding to the second axis direction) of the image data of the form with respect to the selected circumscribed rectangle, the second recognition unit 25 recognizes the selected circumscribed rectangle. is set as the second isolated rectangle.

一例として、この第2認識部25が、図5に例示する外接矩形Aを選択した場合、この外接矩形Aの左辺,右辺をそれぞれ延長した線分AL,ARを仮想的に設定し、この範囲に重なる、外接矩形Aとは異なる外接矩形(他の外接矩形)E,F,G…を見出す。第2認識部25は、見出した他の外接矩形のそれぞれについて、線分AL,ARの間にある面積RINと、線分AL,ARの外にある部分の面積ROUTとを比較し、条件:
RIN>ROUT、かつ、
ROUT<Rcolumn_th
を満足するか否かを調べる。ここでRcolumn_thは、経験的に定められるしきい値であり、線分AL,ARの外にある部分の面積がどの程度であれば、選択した外接矩形Aが属する第2矩形サブグループに含めるかを定めるものである。
As an example, when the second recognition unit 25 selects the circumscribed rectangle A illustrated in FIG. Find circumscribed rectangles (other circumscribed rectangles) E, F, G, etc. that overlap with the circumscribed rectangle A and are different from the circumscribed rectangle A. For each of the other circumscribed rectangles found, the second recognition unit 25 compares the area RIN between the line segments AL and AR with the area ROUT of the portion outside the line segments AL and AR, and calculates the following conditions:
RIN>ROUT, and
ROUT<Rcolumn_th
Check whether it is satisfied or not. Here, Rcolumn_th is a threshold determined empirically, and to what extent the area outside the line segments AL and AR should be included in the second rectangle subgroup to which the selected circumscribed rectangle A belongs. This is to establish the following.

そして第2認識部25は、上記条件を満足すると判断される外接矩形と、外接矩形Aとをグループ化して、一つの第2矩形サブグループとする。図5の例では、外接矩形A,E,Fが一つの第2矩形サブグループに属するものとされ、外接矩形Gは、RIN>ROUTでないために、外接矩形Aが属する第2矩形サブグループにはグループ化されない。 The second recognition unit 25 then groups the circumscribed rectangles that are determined to satisfy the above conditions and the circumscribed rectangle A into one second rectangle subgroup. In the example of FIG. 5, circumscribed rectangles A, E, and F belong to one second rectangle subgroup, and since RIN>ROUT does not hold, circumscribed rectangle G belongs to the second rectangle subgroup to which circumscribed rectangle A belongs. are not grouped.

第2グループ化部26は、第2認識部25が設定した少なくとも一つの第2矩形サブグループごとに、当該第2矩形サブグループに含まれる複数の外接矩形にさらに外接する第2グループ矩形を設定する。 The second grouping unit 26 sets, for each at least one second rectangle subgroup set by the second recognition unit 25, a second group rectangle that further circumscribes the plurality of circumscribed rectangles included in the second rectangle subgroup. do.

記入枠認識部27は、第1グループ化部24が設定した第1グループ矩形と、第2グループ化部26が設定した第2グループ矩形との交差範囲を、記入枠として認識する。本実施の形態の例では、第1グループ化部24は一般に複数n個の第1グループ矩形を設定する。この第1グループ矩形は、行方向に延びる矩形であり、列方向に配列されている。また、第2グループ化部26は一般に複数m個の第2グループ矩形を設定する。この第2グループ矩形は、列方向に延びる矩形であり、行方向に配列されている。 The entry box recognition unit 27 recognizes the intersection range of the first group rectangle set by the first grouping unit 24 and the second group rectangle set by the second grouping unit 26 as an entry box. In this embodiment, the first grouping unit 24 generally sets a plurality of n first group rectangles. These first group rectangles are rectangles that extend in the row direction and are arranged in the column direction. The second grouping unit 26 generally sets a plurality of m second group rectangles. These second group rectangles are rectangles that extend in the column direction and are arranged in the row direction.

そこでこの記入枠認識部27が認識する第1グループ矩形と第2グループ矩形との交差範囲は、n×m個あり、記入枠認識部27は、n×m個の記入枠を認識する。記入枠認識部27は、認識した記入枠のそれぞれに固有の識別子を発行し、また当該記入枠のそれぞれに外接する矩形を特定する座標情報(当該矩形の左上及び右下の座標でよい)を得て、対応する識別子に関連付けて、記入枠データベースとして記憶部12に格納する。 Therefore, there are n×m intersection ranges between the first group rectangle and the second group rectangle recognized by the fill-in frame recognition unit 27, and the fill-in frame recognition unit 27 recognizes n×m write frames. The entry frame recognition unit 27 issues a unique identifier to each recognized entry frame, and also provides coordinate information (the coordinates of the upper left and lower right of the rectangle) specifying the rectangle circumscribing each of the entry frames. The information is obtained and stored in the storage unit 12 as a fill-in frame database in association with the corresponding identifier.

情報出力部28は、記憶部12に格納された記入枠データベースを参照し、固有の識別子及びそれに関連付けられた座標情報が表す、帳票の画像データ上の領域内の画像データ(各記入枠内の画像データ)を、所定の処理に供する。ここで所定の処理は、例えば、各記入枠内の画像データに基づく文字認識処理でよい。情報出力部28は、当該所定の処理の結果を、出力する。 The information output unit 28 refers to the entry box database stored in the memory unit 12, and subjects the image data within the area on the image data of the form represented by the unique identifier and the coordinate information associated therewith (the image data within each entry box) to a predetermined process. Here, the predetermined process may be, for example, character recognition processing based on the image data within each entry box. The information output unit 28 outputs the results of the predetermined process.

[動作]
本実施の形態の情報処理装置1は、以上の構成を備えており、次のように動作する。以下の例では、スキャナ2が読み取る帳票には、図6(a)に例示するように、記入枠(A,B,C,D,E,Fで示される部分)がそれぞれ所定の間隔をおいて、マトリクス状に(行方向及び列方向に)配列され、それぞれ文字列AAA,BB,CC,DDD,EE,FFF(それぞれ文字数は互いに異なってよい)が記入されているものとする。また、図6(a)の例では、罫線はないものとしている。
[motion]
The information processing device 1 of this embodiment has the above configuration and operates as follows. In the example below, the form read by the scanner 2 has entry frames (portions indicated by A, B, C, D, E, and F) spaced at predetermined intervals, as illustrated in FIG. 6(a). It is assumed that the characters are arranged in a matrix (in the row and column directions), and character strings AAA, BB, CC, DDD, EE, and FFF (the number of characters may be different from each other) are written in each. Furthermore, in the example of FIG. 6(a), it is assumed that there are no ruled lines.

情報処理装置1の制御部11がインタフェース部15を介してスキャナ2から、スキャナ2が読み取った上記図6(a)の表組を含む帳票の画像データを受け入れると、制御部11は、受け入れた帳票の画像データに対して第1の軸方向としての行方向と、第1の軸方向に交差する第2の軸方向としての列方向とを設定する。 When the control unit 11 of the information processing device 1 receives image data of a form including the table format shown in FIG. 6(a) from the scanner 2 via the interface unit 15, the control unit 11 sets a row direction as a first axis direction and a column direction as a second axis direction intersecting the first axis direction for the received image data of the form.

制御部11は、この帳票の画像データから、記入枠を区切る罫線の認識を試みてもよいが、罫線は認識できないため、罫線を用いない方法、例えば文字の領域を認識する方法を用いることとする。具体的に制御部11は、受け入れた帳票の画像データから、有意画素塊(文字)に外接する矩形(文字矩形)を認識する。また制御部11は、認識した文字矩形を、互いに隣接する文字矩形までの距離が所定の文字間隔しきい値を下回るとの文字グループ化条件でグループ化する。この処理により、文字列AAA,BB,CC,DDD,EE,FFFがそれぞれ互いに異なるグループとしてグループ化される。 The control unit 11 may attempt to recognize the ruled lines that separate the entry frames from the image data of this form, but since the ruled lines cannot be recognized, a method that does not use ruled lines, such as a method that recognizes character areas, may be used. do. Specifically, the control unit 11 recognizes a rectangle (character rectangle) circumscribing a significant pixel block (character) from the image data of the received form. Further, the control unit 11 groups the recognized character rectangles under the character grouping condition that the distance to mutually adjacent character rectangles is less than a predetermined character interval threshold. Through this process, the character strings AAA, BB, CC, DDD, EE, and FFF are grouped into different groups.

そして制御部11は、文字グループ化条件によりグループ化された複数の文字矩形にさらに外接する文字列外接矩形を生成し(図6(a)のA,B,C,D,E,F)、この生成した文字列外接矩形内の領域を、記入枠の候補の領域とする。 Then, the control unit 11 generates a character string circumscribing rectangle that further circumscribes the plurality of character rectangles grouped according to the character grouping condition (A, B, C, D, E, F in FIG. 6(a)), The area within the generated character string circumscribing rectangle is set as a candidate area for the entry frame.

次に制御部11は、記入枠の候補の領域のそれぞれに外接する複数の外接矩形のいずれか一つを選択する。例えば制御部11が文字列AAAに外接する外接矩形を選択したとする。制御部11は、当該選択した外接矩形に対して、帳票の画像データの行方向に存在する他の外接矩形を検出する。ここでは文字列AAAに外接する外接矩形に対し、帳票の画像データの行方向には、文字列BBに外接する外接矩形が存在する。そこで制御部11は、選択した外接矩形(文字列AAAの外接矩形)と、検出した他の外接矩形(文字列BBの外接矩形)とを含む第1矩形サブグループを設定し、図6(b)に例示するように、その第1矩形サブグループに含まれる外接矩形に外接する第1グループ矩形X1を設定する。 Next, the control unit 11 selects one of the plurality of circumscribed rectangles circumscribing each of the candidate regions of the entry frame. For example, assume that the control unit 11 selects a circumscribing rectangle that circumscribes the character string AAA. The control unit 11 detects other circumscribed rectangles existing in the row direction of the image data of the form with respect to the selected circumscribed rectangle. Here, in contrast to the circumscribed rectangle that circumscribes the character string AAA, there is a circumscribed rectangle that circumscribes the character string BB in the row direction of the image data of the form. Therefore, the control unit 11 sets a first rectangle subgroup including the selected circumscribed rectangle (the circumscribed rectangle of the character string AAA) and the other detected circumscribed rectangle (the circumscribed rectangle of the character string BB). ), a first group rectangle X1 is set that circumscribes the circumscribed rectangle included in the first rectangle subgroup.

また制御部11は、いずれの第1矩形サブグループに属していない外接矩形の一つ、例えば文字列CCに外接する外接矩形を選択し、当該選択した外接矩形に対して、帳票の画像データの行方向に存在する他の外接矩形を検出する。ここでは文字列CCに外接する外接矩形に対し、帳票の画像データの行方向には、文字列DDDに外接する外接矩形が存在する。そこで制御部11は、選択した外接矩形(文字列CCの外接矩形)と、検出した他の外接矩形(文字列DDDの外接矩形)とを含む第1矩形サブグループを設定し、その第1矩形サブグループに含まれる外接矩形に外接する第1グループ矩形X2を設定する。 The control unit 11 also selects one of the circumscribed rectangles that does not belong to any of the first rectangle subgroups, for example, the circumscribed rectangle that circumscribes the character string CC, and sets the image data of the form to the selected circumscribed rectangle. Detect other circumscribed rectangles that exist in the row direction. Here, in contrast to the circumscribed rectangle that circumscribes the character string CC, there is a circumscribed rectangle that circumscribes the character string DDD in the row direction of the image data of the form. Therefore, the control unit 11 sets a first rectangle subgroup that includes the selected circumscribed rectangle (the circumscribed rectangle of the character string CC) and the other detected circumscribed rectangle (the circumscribed rectangle of the character string DDD), and A first group rectangle X2 that circumscribes the circumscribed rectangle included in the subgroup is set.

同様にして制御部11は、文字列EEの外接矩形と、文字列FFFの外接矩形とを含む第1矩形サブグループを設定し、その第1矩形サブグループに含まれる外接矩形に外接する第1グループ矩形X3を設定する(図6(b))。 Similarly, the control unit 11 sets a first rectangle subgroup including a circumscribed rectangle of the character string EE and a circumscribed rectangle of the character string FFF, and sets a first rectangle subgroup that circumscribes the circumscribed rectangle included in the first rectangle subgroup. A group rectangle X3 is set (FIG. 6(b)).

また制御部11は、第1グループ矩形を設定した処理とは別に、記入枠の候補の領域のそれぞれに外接する複数の外接矩形のいずれか一つを選択する。例えばここで制御部11が文字列AAAに外接する外接矩形を選択したとする。制御部11は、当該選択した外接矩形に対して、帳票の画像データの列方向に存在する他の外接矩形を検出する。ここでは文字列AAAに外接する外接矩形に対し、帳票の画像データの行方向には、文字列CCに外接する外接矩形、及び文字列EEに外接する外接矩形が存在する。そこで制御部11は、選択した外接矩形(文字列AAAの外接矩形)と、検出した他の外接矩形(文字列BBの外接矩形及び文字列EEの外接矩形)とを含む第2矩形サブグループを設定し、図6(c)に例示するように、その第2矩形サブグループに含まれる外接矩形に外接する第2グループ矩形Y1を設定する。 In addition to the process of setting the first group rectangle, the control unit 11 selects one of the multiple circumscribing rectangles that circumscribing each of the candidate regions for the entry frame. For example, assume that the control unit 11 selects a circumscribing rectangle that circumscribing the character string AAA. The control unit 11 detects other circumscribing rectangles that exist in the column direction of the image data of the form for the selected circumscribing rectangle. In this case, for the circumscribing rectangle that circumscribing the character string AAA, there are a circumscribing rectangle that circumscribing the character string CC and a circumscribing rectangle that circumscribing the character string EE in the row direction of the image data of the form. Therefore, the control unit 11 sets a second rectangle subgroup that includes the selected circumscribing rectangle (the circumscribing rectangle of the character string AAA) and the other detected circumscribing rectangles (the circumscribing rectangle of the character string BB and the circumscribing rectangle of the character string EE), and sets a second group rectangle Y1 that circumscribs the circumscribing rectangle included in the second rectangle subgroup, as illustrated in FIG. 6C.

以下、制御部11は、いずれの第2矩形サブグループに属していない外接矩形の一つを選択して上記処理を繰り返す。ここでは、例えば制御部11は、文字列BBに外接する外接矩形を選択し、当該選択した外接矩形に対して、帳票の画像データの列方向に存在する他の外接矩形として、文字列DDDに外接する外接矩形及び文字列FFFに外接する外接矩形を検出する。制御部11は、選択した外接矩形(文字列CCの外接矩形)と、検出した他の外接矩形(文字列DDDの外接矩形及び文字列FFFの外接矩形)とを含む第2矩形サブグループを設定し、その第2矩形サブグループに含まれる外接矩形に外接する第2グループ矩形Y2を設定する。 The control unit 11 then selects one of the circumscribing rectangles that does not belong to any of the second rectangle subgroups and repeats the above process. Here, for example, the control unit 11 selects a circumscribing rectangle that circumscribing character string BB, and detects, for the selected circumscribing rectangle, a circumscribing rectangle that circumscribing character string DDD and a circumscribing rectangle that circumscribing character string FFF as other circumscribing rectangles that exist in the column direction of the image data of the form. The control unit 11 sets a second rectangle subgroup that includes the selected circumscribing rectangle (the circumscribing rectangle of character string CC) and the other detected circumscribing rectangles (the circumscribing rectangle of character string DDD and the circumscribing rectangle of character string FFF), and sets a second group rectangle Y2 that circumscribs the circumscribing rectangle included in the second rectangle subgroup.

制御部11は、第1グループ矩形X1,X2,X3と、第2グループ矩形Y1,Y2の交差範囲RA,RB,RC,RD,RE,RF(図6(d))を、記入枠として認識し、これら交差範囲に外接する外接矩形を表す情報を、各記入枠を特定する外接矩形の情報として記録する。 The control unit 11 recognizes the intersection ranges RA, RB, RC, RD, RE, RF (FIG. 6(d)) of the first group rectangles X1, X2, X3 and the second group rectangles Y1, Y2 as entry frames. Then, information representing a circumscribed rectangle that circumscribes these intersecting ranges is recorded as information on a circumscribed rectangle that specifies each entry frame.

制御部11は、この記録を用いて、当該記録に含まれる情報で特定される各外接矩形内の画像データが、各記入枠内の画像データであるとして、例えば各記入枠内の画像データに基づく文字認識処理を行い、記入枠ごとの文字認識処理の結果を出力する。 Using this record, the control unit 11 assumes that the image data within each circumscribed rectangle specified by the information included in the record is the image data within each entry frame, and, for example, sets the image data within each entry frame. Performs character recognition processing based on the text and outputs the result of character recognition processing for each entry frame.

[外接矩形の選択基準]
なお、ここまでの説明において、制御部11は、第1認識部23としての処理において、外接矩形の一つを選択し、当該選択した外接矩形に対して、帳票の画像データの行方向(または列方向)に存在する他の外接矩形を検出してグループ化するものとした。この際、選択した外接矩形を行方向(または列方向)に延長した領域に重なりあう他の外接矩形であって、当該重なりあう範囲の面積が当該他の外接矩形全体の面積に対して所定の比より大きい場合にグループ化する、といった条件としていたが当該グループ化の条件はこれに限られない。
[Circumscribing rectangle selection criteria]
In the explanation up to this point, the control unit 11 selects one of the circumscribed rectangles in the processing as the first recognition unit 23, and performs the line direction (or The other circumscribed rectangles existing in the column direction) are detected and grouped. In this case, other circumscribed rectangles that overlap the area obtained by extending the selected circumscribed rectangle in the row direction (or column direction), and the area of the overlapping range is a predetermined area with respect to the area of the entire other circumscribed rectangle. Although the condition is that the grouping is performed when the ratio is larger than the ratio, the grouping conditions are not limited to this.

例えば制御部11は、ここでグループ化する条件として、複数の外接矩形に含まれる一対の外接矩形間の距離に基づく基準、または複数の外接矩形の形状に基づく基準を用いた条件を採用してもよい。 For example, the control unit 11 employs a criterion based on the distance between a pair of circumscribed rectangles included in a plurality of circumscribed rectangles or a criterion based on the shape of a plurality of circumscribed rectangles as a condition for grouping. Good too.

ここで複数の外接矩形に含まれる一対の外接矩形間の距離に基づく基準は、例えば選択した外接矩形に対して、帳票の画像データの行方向(または列方向)に存在する他の外接矩形であって、選択した外接矩形との距離(最短距離)が予め定めたグループ化しきい値を下回るか、または選択した外接矩形と同じ第1矩形サブグループ(または第2矩形サブグループ)に属するいずれかの外接矩形との距離(最短距離)が予め定めたグループ化しきい値を下回る、との条件とすることができる。 Here, the criterion based on the distance between a pair of circumscribed rectangles included in a plurality of circumscribed rectangles is, for example, based on the distance between a selected circumscribed rectangle and another circumscribed rectangle that exists in the row direction (or column direction) of the image data of the form. and the distance (shortest distance) to the selected circumscribed rectangle is less than a predetermined grouping threshold, or belongs to the same first rectangle subgroup (or second rectangle subgroup) as the selected circumscribed rectangle. The condition may be that the distance (shortest distance) from the circumscribed rectangle is less than a predetermined grouping threshold.

この例では、制御部11は、当初は選択した外接矩形に対して帳票の画像データの行方向に存在し、かつ、選択した外接矩形との距離(最短距離)が予め定めたグループ化しきい値を下回る他の外接矩形を見出すと、当該他の外接矩形と、選択した外接矩形とが属する第1矩形サブグループを設定する。そして制御部11は、選択した外接矩形に対して帳票の画像データの行方向に存在する他の外接矩形であって、選択した外接矩形が属する第1矩形サブグループに属するいずれかの外接矩形との距離(最短距離)が予め定めたグループ化しきい値を下回る他の外接矩形を見出すごとに、当該見出した他の外接矩形を、選択した外接矩形が属する第1矩形サブグループに追加する処理を繰り返す。 In this example, the control unit 11 initially exists in the row direction of the image data of the form with respect to the selected circumscribed rectangle, and the distance (shortest distance) to the selected circumscribed rectangle is a predetermined grouping threshold. When finding another circumscribed rectangle that is less than , a first rectangle subgroup to which the other circumscribed rectangle and the selected circumscribed rectangle belong is set. The control unit 11 then selects one of the other circumscribed rectangles that exist in the row direction of the image data of the form with respect to the selected circumscribed rectangle and that belongs to the first rectangle subgroup to which the selected circumscribed rectangle belongs. Each time another circumscribed rectangle whose distance (shortest distance) is less than a predetermined grouping threshold is found, the other circumscribed rectangle found is added to the first rectangle subgroup to which the selected circumscribed rectangle belongs. repeat.

これにより、2つの表組が2つ以上、第1の軸方向に連続して配されているときに、当該表組間の距離を下回り、各表組内の記入枠化の距離を上回る距離を上記グループ化しきい値として設定すれば、各表組の各記入枠がそれぞれ別々に識別されることとなる。なお制御部11は、列方向についても同様の処理を行うこととしてもよい。この場合、2つの表組が2つ以上、第2の軸方向に連続して配されているときに、当該表組間の距離を下回り、各表組内の記入枠化の距離を上回る距離を上記グループ化しきい値として設定すれば、各表組の各記入枠がそれぞれ別々に識別されることとなる。 As a result, when two or more tables are arranged consecutively in the first axis direction, the distance is less than the distance between the tables and exceeds the distance of the entry frame within each table. If this is set as the grouping threshold, each entry frame in each table will be identified separately. Note that the control unit 11 may perform similar processing in the column direction as well. In this case, when two or more tables are arranged consecutively in the second axis direction, the distance is less than the distance between the tables and exceeds the distance of the entry frame within each table. If this is set as the grouping threshold, each entry frame in each table will be identified separately.

また制御部11は、グループ化する条件として外接矩形の形状に基づく基準を用いることとしてもよい。この場合制御部11は、記入枠候補抽出部22が得た外接矩形を、その大きさ(幅及び高さ)並びに、幅と高さとの比(アスペクト)を用いて、クラスタリングする。このクラスタリングの方法は、k-means法など広く知られた方法を採用できるので、詳しい説明は省略する。 Further, the control unit 11 may use a criterion based on the shape of a circumscribed rectangle as a condition for grouping. In this case, the control unit 11 clusters the circumscribed rectangles obtained by the entry frame candidate extraction unit 22 using the size (width and height) and the ratio of width to height (aspect). As this clustering method, a widely known method such as the k-means method can be used, so a detailed explanation will be omitted.

制御部11は、クラスタリングにより得られたクラスタごとに、当該クラスタに属する外接矩形の一つを選択し、当該選択した外接矩形に対して、帳票の画像データの行方向(第1の軸方向に相当する)に存在する他の外接矩形であって、選択した外接矩形と同じクラスタに属するもの(さらに既に述べた条件を加重してもよい)を検出してグループ化し、第1矩形サブグループを設定することとしてもよい。 For each cluster obtained by clustering, the control unit 11 selects one of the circumscribed rectangles belonging to the cluster, and moves the selected circumscribed rectangle in the row direction (first axis direction) of the image data of the form. Detect and group other circumscribed rectangles existing in the same cluster as the selected circumscribed rectangle (which may also be weighted according to the conditions already described), and form the first rectangle subgroup. It may also be set.

この例では、図7に例示する表組Tを次のように処理する。ここで図7の表組Tは、列方向の項目名の記入枠をN個(Nは1以上の整数)含む列ヘッダHCと、行方向の項目名の記入枠をM個(Mは1以上の整数)含む行ヘッダHRと、記入枠をN×M個含む、表組の本体部TBとに区分されるものとする。また、列ヘッダHCに含まれる記入枠は、それぞれ幅CW,高さCHであり、本体部TBの記入枠はそれぞれ幅CW,高さRHであり、行ヘッダHRに含まれる記入枠がそれぞれ幅RW,高さRHであるとする。 In this example, the table set T illustrated in FIG. 7 is processed as follows. Here, the table T in FIG. 7 has a column header HC that includes N entries for item names in the column direction (N is an integer of 1 or more), and M entries for item names in the row direction (M is 1 It is assumed that the table format is divided into a row header HR, which includes (an integer greater than or equal to)), and a table main body TB, which includes N×M entry frames. Further, the entry frames included in the column header HC each have a width CW and the height CH, the entry frames in the main body TB each have a width CW and a height RH, and the entry frames included in the row header HR each have a width CW and a height CH. Suppose that the height is RW and the height is RH.

さらにここで、RH<CHであり、RW>CWであるとする。つまり、列方向の項目名の記入枠の高さCHは、本体部TB内の記入枠の高さRHより大きく、行方向の項目名の記入枠の幅RWは、本体部TB内の記入枠の幅CWより大きい。 Furthermore, it is assumed here that RH<CH and RW>CW. In other words, the height CH of the entry frame for the item name in the column direction is greater than the height RH of the entry frame in the main body TB, and the width RW of the entry frame for the item name in the row direction is the entry frame in the main body TB. is larger than the width CW of.

制御部11は、記入枠の候補の領域に外接する外接矩形をそれぞれ抽出し、抽出した外接矩形を、その幅,高さ,幅と高さとの比(アスペクト)との3次元のベクトル情報に基づいてクラスタリングする。このクラスタリングの結果、図7の例の表組Tでは、抽出した外接矩形が、列方向の項目名の記入枠の外接矩形のクラスタ(クラスタI)と、行方向の項目名の記入枠の外接矩形のクラスタ(クラスタII)と、本体部TB内の記入枠の外接矩形のクラスタ(クラスタIII)とに分類される。 The control unit 11 extracts each circumscribed rectangle that circumscribes the candidate area of the entry frame, and converts the extracted circumscribed rectangle into three-dimensional vector information of its width, height, and width-to-height ratio (aspect). Clustering based on. As a result of this clustering, in the table set T in the example of FIG. It is classified into a rectangular cluster (cluster II) and a rectangular cluster circumscribing the entry frame in the main body part TB (cluster III).

制御部11は、クラスタごとに、当該クラスタに属する外接矩形の一つを選択し、当該選択した外接矩形に対して、帳票の画像データの行方向に存在する他の外接矩形であって、選択した外接矩形と同じクラスタに属するもの(さらに既に述べた条件を加重してもよい)を検出してグループ化し、第1矩形サブグループを設定する。 For each cluster, the control unit 11 selects one of the circumscribed rectangles belonging to the cluster, and selects another circumscribed rectangle existing in the row direction of the image data of the form with respect to the selected circumscribed rectangle. Those belonging to the same cluster as the circumscribed rectangle (which may also be weighted according to the conditions already described) are detected and grouped, and a first rectangle subgroup is set.

これにより、クラスタI内の外接矩形と、クラスタII内の外接矩形と、クラスタIII内の外接矩形とがそれぞれ互いに異なる第1矩形サブグループに属することとなる。 As a result, the circumscribed rectangle in cluster I, the circumscribed rectangle in cluster II, and the circumscribed rectangle in cluster III each belong to different first rectangle subgroups.

また制御部11は、行方向と同様に、クラスタごとに、当該クラスタに属する外接矩形の一つを選択し、当該選択した外接矩形に対して、帳票の画像データの列方向に存在する他の外接矩形であって、選択した外接矩形と同じクラスタに属するもの(さらに既に述べた条件を加重してもよい)を検出してグループ化し、第2矩形サブグループを設定する。 In addition, as in the row direction, the control unit 11 selects one of the circumscribed rectangles belonging to the cluster for each cluster, and selects one of the circumscribed rectangles belonging to the cluster, and selects one of the circumscribed rectangles belonging to the cluster, and other Circumscribed rectangles that belong to the same cluster as the selected circumscribed rectangle (furthermore, the conditions described above may be weighted) are detected and grouped, and a second rectangle subgroup is set.

これにより、クラスタI内の外接矩形と、クラスタII内の外接矩形と、クラスタIII内の外接矩形とがそれぞれ互いに異なる第2矩形サブグループに属することとなる。 As a result, the circumscribed rectangle in cluster I, the circumscribed rectangle in cluster II, and the circumscribed rectangle in cluster III each belong to different second rectangle subgroups.

さらに制御部11は、クラスタを順次選択しつつ、選択したクラスタの外接矩形が属する第1矩形サブグループと、当該選択したクラスタの第2矩形サブグループとの交差範囲をそれぞれ記入枠として認識する。 Further, while sequentially selecting clusters, the control unit 11 recognizes the intersecting ranges of the first rectangular subgroup to which the circumscribed rectangle of the selected cluster belongs and the second rectangular subgroup of the selected cluster as respective entry frames.

図7の例では、列方向の項目名の記入枠の外接矩形が属するクラスタIを選択したときには、制御部11は、列方向の項目名の記入枠の外接矩形のすべてが含まれる第1グループ矩形と、列方向の項目名の記入枠の外接矩形がそれぞれ1つずつ含まれる第2グループ矩形との交差範囲である、列方向の項目名の記入枠を、それぞれ記入枠として認識することとなる。 In the example of FIG. 7, when selecting cluster I to which the circumscribed rectangle of the column-direction item name entry frame belongs, the control unit 11 selects the first group that includes all the circumscribed rectangles of the column-direction item name entry frames. Recognizing each column-direction item name entry frame as an entry frame, which is the intersection range of the rectangle and the second group rectangle that includes one circumscribing rectangle for each of the column-direction item name entry frames. Become.

同様に、行方向の項目名の記入枠の外接矩形が属するクラスタIIを選択したときには、制御部11は、行方向の項目名の記入枠の外接矩形がそれぞれ1つずつ含まれる第1グループ矩形と、行方向の項目名の記入枠の外接矩形がすべて含まれる第2グループ矩形との交差範囲である、行方向の項目名の記入枠を、それぞれ記入枠として認識することとなる。 Similarly, when selecting cluster II to which the circumscribed rectangle of the entry frame for the item name in the row direction belongs, the control unit 11 selects a first group rectangle that includes one circumscribing rectangle for each entry frame for the item name in the row direction. The entry frame for the item name in the row direction, which is the intersecting range of the second group rectangle that includes all the circumscribed rectangles of the entry frame for the item name in the row direction, is recognized as the entry frame.

さらに制御部11は、クラスタIIIを選択したときには、クラスタIIIの外接矩形がそれぞれ含まれる第1グループ矩形と第2グループ矩形との交差範囲を、それぞれ記入枠として認識する。 Further, when cluster III is selected, the control unit 11 recognizes the intersecting ranges of the first group rectangle and the second group rectangle, each of which includes the circumscribed rectangle of cluster III, as a writing frame.

[変形例]
また本実施の形態の別の例では、制御部11は、次のようにして表を認識してもよい。制御部11は、二値化処理や階調反転、輪郭線抽出等の処理を用いて、スキャナ2等から受け入れた帳票の画像データから矩形状の領域を認識し、認識した矩形状の領域の各々について固有の識別情報を発行する。
[Modified example]
In another example of this embodiment, the control unit 11 may recognize the table as follows. The control unit 11 recognizes a rectangular area from the image data of the form received from the scanner 2 etc. using processing such as binarization processing, gradation inversion, and outline extraction, and extracts the rectangular area from the recognized rectangular area. Issue unique identification information for each.

制御部11は、認識した個々の矩形状領域の高さ(スキャナ2の主走査方向H)、幅(スキャナ2の副走査方向W)、及び位置を表す座標情報(例えば矩形状領域の左上の頂点座標でよい)を、対応する矩形状領域の識別情報に関連付けて記憶部12に格納する。 The control unit 11 controls the height (main scanning direction H of the scanner 2), width (sub scanning direction W of the scanner 2), and coordinate information representing the position (for example, the upper left corner of the rectangular area) of each recognized rectangular area. (which may be vertex coordinates) are stored in the storage unit 12 in association with the identification information of the corresponding rectangular area.

制御部11は、記憶部12に格納した矩形状領域の情報を参照して、その高さと幅の情報により、認識した矩形状領域をクラスタに分類して、その分類の結果を得る。この分類結果により、高さ・幅が実質的に同じ矩形状領域がそれぞれクラスタとして分類され、クラスタごとに、当該クラスタに属する矩形状領域の識別情報のリストが得られる。このクラスタ分類の方法は、K平均法など広く知られた方法を用いることができる。 The control unit 11 refers to the information on the rectangular area stored in the storage unit 12, classifies the recognized rectangular area into clusters based on the height and width information, and obtains the classification result. Based on this classification result, rectangular areas having substantially the same height and width are classified as clusters, and a list of identification information of rectangular areas belonging to the cluster is obtained for each cluster. As this cluster classification method, a widely known method such as the K-means method can be used.

制御部11は、分類の結果となったクラスタを順次選択して、選択したクラスタに複数の矩形状領域が分類されているときには、当該選択したクラスタに分類されている各矩形状領域の識別情報を得て、当該識別情報の一つを選択する。そして制御部11は、選択した識別情報で特定される矩形状領域の座標情報を取得する。 The control unit 11 sequentially selects the clusters resulting from the classification, and when a plurality of rectangular regions are classified into the selected cluster, the control unit 11 selects identification information of each rectangular region classified into the selected cluster. and select one of the identification information. Then, the control unit 11 acquires coordinate information of the rectangular area specified by the selected identification information.

制御部11は、取得した座標情報が表す点の幅方向(X軸方向とする)に存在する、上記選択したクラスタに分類される(上記選択した識別情報を含む)識別情報で特定される矩形状領域を見出す。この処理は例えば、取得した座標情報の高さ方向(Y軸方向とする)の値との差が予め定めたしきい値を下回る座標情報に関連付けられた識別情報を検索することで行われる。 The control unit 11 selects a rectangle specified by the identification information (including the selected identification information) classified into the selected cluster, which exists in the width direction (assumed to be the X-axis direction) of the point represented by the acquired coordinate information. Find the shape region. This processing is performed, for example, by searching for identification information associated with coordinate information whose difference from the value of the acquired coordinate information in the height direction (assumed to be the Y-axis direction) is less than a predetermined threshold.

また制御部11は、この処理で見出された矩形状領域(つまり、X軸方向に一列に配列されている矩形状領域)の各々について、当該矩形状領域の座標情報が表す点の高さ方向(Y軸方向)に存在する、上記選択したクラスタに分類される識別情報で特定される矩形状領域を見出す。この処理は例えば、座標情報の高さ方向(X軸方向)の値との差が予め定めたしきい値を下回る座標情報に関連付けられた識別情報を検索することで行われる。 The control unit 11 also controls, for each of the rectangular areas (that is, rectangular areas arranged in a line in the X-axis direction) found in this process, the height of the point represented by the coordinate information of the rectangular area. A rectangular area specified by the identification information classified into the selected cluster that exists in the direction (Y-axis direction) is found. This process is performed, for example, by searching for identification information associated with coordinate information whose difference from the value of the coordinate information in the height direction (X-axis direction) is less than a predetermined threshold.

制御部11は、この処理により、X軸方向に一列に配列されている矩形状領域のそれぞれについて、Y軸方向に一列に配列されている矩形状領域を見出す。そして制御部11は、当該見出した、Y軸方向に一列に配列されている矩形状領域の座標情報のY座標の値を、降順あるいは昇順に並べ替え、並べ替えて得たY座標の値のリストで互いに隣接する2つのY座標の値が、予め定めたしきい値を下回るか否かを調べる。このしきい値は、例えば選択しているクラスタに属する矩形状領域の高さに予め定めた方法で決められる値(例えば定数、あるいは高さに所定の実数係数を乗じた値)とする。 Through this process, the control unit 11 finds rectangular regions arranged in a row in the Y-axis direction for each of the rectangular regions arranged in a row in the X-axis direction. Then, the control unit 11 sorts the found Y coordinate values of the coordinate information of the rectangular areas arranged in a line in the Y-axis direction in descending order or ascending order, and arranges the Y coordinate values obtained by sorting. It is checked whether the values of two Y coordinates adjacent to each other in the list are less than a predetermined threshold. This threshold value is, for example, a value determined by a predetermined method on the height of the rectangular area belonging to the selected cluster (for example, a constant, or a value obtained by multiplying the height by a predetermined real number coefficient).

そして、互いに隣接する2つのY座標の値が、予め定めたしきい値を下回らないと判断される位置で、Y座標の値のリストを分割する。 Then, the list of Y coordinate values is divided at a position where it is determined that the values of two adjacent Y coordinates are not below a predetermined threshold value.

制御部11は、分割して得られた各Y座標の値のリスト(あるいは分割されなかった場合は一つのY座標の値のリスト)に含まれるY座標の値に係る座標情報に対応する矩形状領域をグループとし、そのグループに属する矩形状領域の座標情報のうち、Y座標の値がもっとも小さい座標情報を、グループの座標情報とする。 The control unit 11 generates a rectangle corresponding to the coordinate information related to the Y coordinate value included in the list of Y coordinate values obtained by dividing (or one list of Y coordinate values if not divided). Shape regions are grouped, and among the coordinate information of rectangular regions belonging to the group, the coordinate information with the smallest Y coordinate value is set as the coordinate information of the group.

制御部11は、X軸方向に一列に配列されている矩形状領域のそれぞれについて、上記グループを得て、互いに対応するグループ(グループの座標情報のY座標の値の差が予め定めたしきい値を下回るグループ)を一つのグループにまとめる。 The control unit 11 obtains the above-mentioned groups for each of the rectangular regions arranged in a line in the X-axis direction, and determines the groups corresponding to each other (the difference in Y coordinate values of the coordinate information of the groups is a predetermined threshold). (groups below the value) are combined into one group.

これにより制御部11は、X軸方向に一列に配列され、また高さ方向に距離をおかずに配列されている矩形状領域の群(グループ)を見出す。そして制御部11は、当該矩形状領域を、表の各セルとして認識し、見出した矩形状領域の群を表の範囲として認識する。 The control unit 11 then finds a group of rectangular areas that are aligned in a line in the X-axis direction and arranged with no space between them in the vertical direction. The control unit 11 then recognizes these rectangular areas as the cells of a table, and recognizes the group of rectangular areas that it has found as the range of the table.

なお、制御部11は、X軸方向に配列されている矩形状領域についても、X軸方向に一列に配列されている当該矩形状領域の座標情報のX座標の値を、降順あるいは昇順に並べ替え、並べ替えて得たX座標の値のリストで互いに隣接する2つのX座標の値が、予め定めたしきい値を上回る位置でグループ(以下区別のため幅方向グループと呼ぶ)に分割することとしてもよい。この場合のしきい値は、例えば選択しているクラスタに属する矩形状領域の幅に予め定めた方法で決められる値(例えば定数、あるいは幅に所定の実数係数を乗じた値)とすれよい。また、この場合は、当該分割した幅方向グループごとに、一つの幅方向グループに属する矩形状領域のそれぞれについて、Y軸方向に一列に配列されている矩形状領域を見出し、グループに分割することとしてもよい。 Note that the control unit 11 also arranges the X coordinate values of the coordinate information of the rectangular areas arranged in a row in the X-axis direction in descending order or ascending order. The list of X coordinate values obtained by rearranging and rearranging is divided into groups (hereinafter referred to as width direction groups for differentiation) at positions where two adjacent X coordinate values exceed a predetermined threshold. It may also be a thing. In this case, the threshold value may be, for example, a value determined by a predetermined method for the width of the rectangular region belonging to the selected cluster (for example, a constant, or a value obtained by multiplying the width by a predetermined real number coefficient). In this case, for each divided width direction group, for each of the rectangular regions belonging to one width direction group, rectangular regions arranged in a line in the Y-axis direction are found and divided into groups. You can also use it as

なお、一つの表に属するすべてのセルの幅と高さが必ずしも一定でない(例えばあるカラムは幅が広い、などがある)ことを考慮して、幅または高さごとにクラスタを生成してもよい。 Note that the width and height of all cells in a table are not necessarily uniform (for example, some columns may be wider), so clusters may be generated by width or height.

この例では、制御部11は、記憶部12に格納した矩形状領域の情報を参照して、その高さの情報により、認識した矩形状領域をクラスタに分類し、その分類の結果を、第1の分類結果として記憶部12に格納する。また制御部11は、記憶部12に格納した矩形状領域の情報を参照して、その幅の情報により、認識した矩形状領域をクラスタに分類し、その分類の結果を、第2の分類結果として記憶部12に格納する。 In this example, the control unit 11 refers to the information on the rectangular area stored in the storage unit 12, classifies the recognized rectangular area into clusters based on the height information, and uses the results of the classification as clusters. 1 is stored in the storage unit 12 as the classification result. The control unit 11 also refers to the information on the rectangular area stored in the storage unit 12, classifies the recognized rectangular area into clusters based on the width information, and uses the classification result as the second classification result. It is stored in the storage unit 12 as .

そして制御部11は、第1の分類結果を参照し、同じ分類に属する矩形状領域(実質的に共通の高さの矩形状領域)が、矩形状領域の幅方向、つまりスキャナ2の副走査方向に複数配列されているか否かを判断する。すなわち制御部11は、分類の結果となった第2の分類結果のクラスタを順次選択して、選択したクラスタに複数の矩形状領域が分類されているときには、当該選択した第2の分類結果のクラスタに分類されている各矩形状領域の識別情報を得て、当該識別情報の一つを選択する。そして制御部11は、選択した識別情報で特定される矩形状領域の座標情報を取得する。 Then, the control unit 11 refers to the first classification result and determines whether the rectangular areas belonging to the same classification (rectangular areas having substantially the same height) are in the width direction of the rectangular area, that is, in the sub-scanning direction of the scanner 2. Determine whether or not there are multiple arrays in the direction. That is, the control unit 11 sequentially selects the clusters of the second classification results that are the classification results, and when a plurality of rectangular regions are classified into the selected clusters, the control unit 11 selects the clusters of the second classification results that are the classification results. The identification information of each rectangular area classified into clusters is obtained, and one of the pieces of identification information is selected. Then, the control unit 11 acquires coordinate information of the rectangular area specified by the selected identification information.

制御部11は、取得した座標情報が表す点の幅方向(X軸方向とする)に存在する、上記選択した第2の分類結果のクラスタに分類される(上記選択した識別情報を含む)識別情報で特定される矩形状領域を見出す。 The control unit 11 controls the identification information (including the identification information selected above) that is classified into the cluster of the selected second classification result that exists in the width direction (assumed to be the X-axis direction) of the point represented by the acquired coordinate information. Find a rectangular area specified by the information.

また制御部11は、この処理で見出された矩形状領域(つまり、X軸方向に一列に配列されている矩形状領域)を順次選択し、選択した矩形状領域の座標情報が表す点の高さ方向(Y軸方向)に存在し、かつ、選択した矩形状領域と同じ第1の分類結果のクラスタに属する矩形状領域を見出す。 The control unit 11 also sequentially selects rectangular areas found in this process (i.e., rectangular areas arranged in a row in the X-axis direction) and finds rectangular areas that exist in the height direction (Y-axis direction) of the point represented by the coordinate information of the selected rectangular area and that belong to the same cluster of the first classification result as the selected rectangular area.

制御部11は、この処理により、X軸方向に一列に配列されている、高さが実質的に共通している矩形状領域のそれぞれについて、Y軸方向に一列に配列されている、幅が実質的に共通している矩形状領域を見出す。そして制御部11は、当該見出した、Y軸方向に一列に配列されている矩形状領域の座標情報のY座標の値を、降順あるいは昇順に並べ替え、並べ替えて得たY座標の値のリストで互いに隣接する2つのY座標の値が、予め定めたしきい値を下回るか否かを調べる。このしきい値は、例えば選択しているクラスタに属する矩形状領域の高さに予め定めた方法で決められる値(例えば定数)とする。 Through this process, the control unit 11 controls the rectangular regions arranged in a row in the X-axis direction and having substantially the same height to each other, and in the Y-axis direction in a row in the Y-axis direction. Find substantially common rectangular areas. Then, the control unit 11 sorts the found Y coordinate values of the coordinate information of the rectangular areas arranged in a line in the Y-axis direction in descending order or ascending order, and arranges the Y coordinate values obtained by sorting. It is checked whether the values of two Y coordinates adjacent to each other in the list are less than a predetermined threshold. This threshold value is, for example, a value (for example, a constant) determined by a predetermined method based on the height of a rectangular area belonging to the selected cluster.

そして、互いに隣接する2つのY座標の値が、予め定めたしきい値を下回らないと判断される位置で、Y座標の値のリストを分割する。 Then, the list of Y coordinate values is divided at positions where it is determined that two Y coordinate values adjacent to each other do not fall below a predetermined threshold.

制御部11は、分割して得られた各Y座標の値のリスト(あるいは分割されなかった場合は一つのY座標の値のリスト)に含まれるY座標の値に係る座標情報に対応する矩形状領域をグループとし、そのグループに属する矩形状領域の座標情報のうち、Y座標の値がもっとも小さい座標情報を、グループの座標情報とする。 The control unit 11 generates a rectangle corresponding to the coordinate information related to the Y coordinate value included in the list of Y coordinate values obtained by dividing (or one list of Y coordinate values if not divided). Shape regions are grouped, and among the coordinate information of rectangular regions belonging to the group, the coordinate information with the smallest Y coordinate value is set as the coordinate information of the group.

制御部11は、X軸方向に一列に配列されている矩形状領域のそれぞれについて、上記グループを得て、互いに対応するグループ(グループの座標情報のY座標の値の差が予め定めたしきい値を下回るグループ)を一つのグループにまとめる。 The control unit 11 obtains the above-mentioned groups for each of the rectangular regions arranged in a line in the X-axis direction, and determines the groups corresponding to each other (the difference in Y coordinate values of the coordinate information of the groups is a predetermined threshold). (groups below the value) are combined into one group.

これにより制御部11は、X軸方向に一列に配列され、また高さ方向に距離をおかずに配列されている矩形状領域の群(グループ)を見出す。そして制御部11は、当該矩形状領域を、表の各セルとして認識し、見出した矩形状領域の群を表の範囲として認識する。 Thereby, the control unit 11 finds a group of rectangular areas arranged in a line in the X-axis direction and without any distance in the height direction. The control unit 11 then recognizes the rectangular area as each cell of the table, and recognizes the found group of rectangular areas as the range of the table.

ここでも制御部11は、X軸方向についてもグループに分割する処理を行ってもよい。この処理は、既に述べた処理と同様であり、繰り返しての説明となるので省略する。 Here too, the control unit 11 may perform a process of dividing into groups in the X-axis direction as well. This process is similar to the process already described, and the explanation will be repeated, so the explanation will be omitted.

制御部11は、この処理により、高さや幅が共通している矩形状領域が格子状に続いて(間隔を置かずに)配列されている部分を見出して表として認識し、また、当該格子状に配列された矩形状領域を表のセルとして認識する。 Through this processing, the control unit 11 finds a part in which rectangular areas having a common height and width are arranged consecutively in a grid pattern (without any spacing), recognizes it as a table, and also recognizes it as a table. The rectangular areas arranged in a shape are recognized as table cells.

あるいは制御部11は、高さが共通している矩形状領域がX軸方向に続いて(間隔を置かずに)配列されている部分を見出し、当該見出した配列に含まれる矩形状領域の各々について、幅が共通している矩形状領域がY軸方向に続いて(間隔を置かずに)配列されている部分を見出して、当該見出した部分を一つの表として認識する。また、当該表として認識された部分に含まれる矩形状領域を当該表のセルとして認識する。 Alternatively, the control unit 11 finds a part where rectangular regions having a common height are arranged consecutively (without any interval) in the X-axis direction, and each of the rectangular regions included in the found arrangement , a portion where rectangular regions having a common width are arranged consecutively (without any interval) in the Y-axis direction is found, and the found portion is recognized as one table. Further, a rectangular area included in the portion recognized as the table is recognized as a cell of the table.

この方法によっても、光学的に読み取られた帳票の記入枠の領域を、人為的操作なく、比較的処理負荷の低い方法で認識できる。 With this method as well, the area of the entry frame of the optically read form can be recognized without any manual operation and with a relatively low processing load.

[実施形態の効果]
本実施の形態によると、光学的に読み取られた帳票の記入枠の領域を、罫線の有無に関わらず、人為的操作なく認識できる。また、表組の項目名と本体とを区別して、記入枠の領域を、認識できる。
[Effects of embodiment]
According to this embodiment, the area of the entry frame of the optically read form can be recognized without any manual operation, regardless of the presence or absence of ruled lines. Furthermore, the area of the entry frame can be recognized by distinguishing between the item name and the main body of the table.

1 情報処理装置、2 スキャナ、11 制御部、12 記憶部、13 操作部、14 表示部、15 インタフェース部、21 受入部、22 記入枠候補抽出部、23 第1認識部、24 第1グループ化部、25 第2認識部、26 第2グループ化部、27 記入枠認識部、28 情報出力部。

1 Information processing device, 2 Scanner, 11 Control unit, 12 Storage unit, 13 Operation unit, 14 Display unit, 15 Interface unit, 21 Acceptance unit, 22 Entry frame candidate extraction unit, 23 First recognition unit, 24 First grouping section, 25 second recognition section, 26 second grouping section, 27 entry frame recognition section, 28 information output section.

Claims (4)

帳票の画像データを受け入れる手段と、
前記受け入れた帳票の画像データから、帳票上の記入枠の候補の外接矩形を抽出する手段と、
前記帳票の画像データの第1の軸方向に配列された、複数の前記記入枠の候補の外接矩形であって、所定の基準を満足する複数の前記記入枠の候補の外接矩形を含む第1矩形サブグループを少なくとも一つ認識する第1認識手段と、
前記第1認識手段が認識した第1矩形サブグループごとに、当該第1矩形サブグループに含まれる複数の記入枠の候補の外接矩形にさらに外接する第1グループ矩形を設定する第1グループ化手段と、
前記帳票の画像データの、前記第1の軸方向に交差する第2の軸方向に配列された、複数の前記記入枠の候補の外接矩形であって、所定の基準を満足する複数の前記記入枠の候補の外接矩形を含む第2矩形サブグループを少なくとも一つ認識する第2認識手段と、
前記第2認識手段が認識した前記第2矩形サブグループごとに、当該第2矩形サブグループに含まれる複数の記入枠の候補の外接矩形にさらに外接する第2グループ矩形を設定する第2グループ化手段と、
前記第1グループ矩形と、前記第2グループ矩形との交差範囲を、記入枠として認識し、当該認識した記入枠内の画像データを抽出して所定の処理に供する手段と、を有し、
前記第1認識手段または第2認識手段が利用する前記所定の基準は、前記複数の外接矩形の形状に基づく基準を含む情報処理装置。
means for accepting image data of a form;
means for extracting a circumscribed rectangle of a candidate entry frame on the form from the image data of the accepted form;
A first circumscribing rectangle of a plurality of candidates for the entry frame arranged in the first axis direction of the image data of the form, the first circumscribing rectangle including a circumscribing rectangle of the plurality of candidates for the entry frame that satisfies a predetermined criterion. first recognition means for recognizing at least one rectangular subgroup;
a first grouping means for setting, for each first rectangular subgroup recognized by the first rectangular subgroup, a first group rectangle that further circumscribes a circumscribed rectangle of a plurality of entry frame candidates included in the first rectangular subgroup; and,
A plurality of circumscribed rectangles of candidates for the plurality of entry frames arranged in a second axis direction intersecting the first axis direction of the image data of the form, the plurality of entries satisfying a predetermined criterion. a second recognition means for recognizing at least one second rectangle subgroup including the circumscribed rectangle of the frame candidate ;
For each of the second rectangle subgroups recognized by the second rectangle subgroup, a second grouping rectangle is set that further circumscribes the circumscribed rectangles of the plurality of entry frame candidates included in the second rectangle subgroup. means and
Recognizing the intersecting range of the first group rectangle and the second group rectangle as a writing frame, extracting image data within the recognized writing frame and subjecting it to predetermined processing;
The information processing device wherein the predetermined criteria used by the first recognition unit or the second recognition unit include criteria based on the shapes of the plurality of circumscribed rectangles.
請求項に記載の情報処理装置であって、
前記第1認識手段または第2認識手段が利用する前記所定の基準が、さらに、複数の前記記入枠の候補の外接矩形に含まれる一対の外接矩形間の距離に基づく基準、または複数の前記記入枠の候補の外接矩形の形状に基づく基準、
の少なくとも一方を含む基準である情報処理装置。
The information processing device according to claim 1 ,
The predetermined criterion used by the first recognition means or the second recognition means may further be a criterion based on a distance between a pair of circumscribed rectangles included in the circumscribed rectangles of the plurality of entry frame candidates , or Criteria based on the shape of the circumscribed rectangle of the frame candidate ,
An information processing device that is a standard that includes at least one of the following.
請求項1または2に記載の情報処理装置であって、
前記所定の処理は、前記記入枠に含まれる画像データに基づく文字認識処理を含む情報処理装置。
3. The information processing device according to claim 1 ,
The predetermined processing includes character recognition processing based on image data included in the entry box.
コンピュータを、
帳票の画像データを受け入れる手段と、
前記受け入れた帳票の画像データから、帳票上の記入枠の候補の外接矩形を抽出する手段と、
前記帳票の画像データの第1の軸方向に配列された、複数の前記記入枠の候補の外接矩形であって、所定の基準を満足する複数の前記記入枠の候補の外接矩形を含む第1矩形サブグループを少なくとも一つ認識する第1認識手段と、
前記第1認識手段が認識した第1矩形サブグループごとに、当該第1矩形サブグループに含まれる複数の記入枠の候補の外接矩形にさらに外接する第1グループ矩形を設定する第1グループ化手段と、
前記帳票の画像データの、前記第1の軸方向に交差する第2の軸方向に配列された、複数の前記記入枠の候補の外接矩形であって、所定の基準を満足する複数の前記記入枠の候補の外接矩形を含む第2矩形サブグループを少なくとも一つ認識する第2認識手段と、
前記第2認識手段が認識した前記第2矩形サブグループごとに、当該第2矩形サブグループに含まれる複数の記入枠の候補の外接矩形にさらに外接する第2グループ矩形を設定する第2グループ化手段と、
前記第1グループ矩形と、前記第2グループ矩形との交差範囲を、記入枠として認識し、当該認識した記入枠内の画像データを抽出して所定の処理に供する手段と、
として機能させ、
前記第1認識手段または第2認識手段が利用する前記所定の基準は、前記複数の外接矩形の形状に基づく基準を含むプログラム。
computer,
means for accepting image data of a form;
means for extracting a circumscribed rectangle of a candidate entry frame on the form from the image data of the accepted form;
A first circumscribing rectangle of a plurality of candidates for the entry frame arranged in the first axis direction of the image data of the form, the first circumscribing rectangle including a circumscribing rectangle of the plurality of candidates for the entry frame that satisfies a predetermined criterion. first recognition means for recognizing at least one rectangular subgroup;
A first grouping means for setting, for each first rectangular subgroup recognized by the first rectangular subgroup, a first group rectangle that further circumscribes a circumscribed rectangle of a plurality of entry frame candidates included in the first rectangular subgroup. and,
A plurality of circumscribed rectangles of candidates for the plurality of entry frames arranged in a second axis direction intersecting the first axis direction of the image data of the form, the plurality of entries satisfying a predetermined criterion. a second recognition means for recognizing at least one second rectangle subgroup including the circumscribed rectangle of the frame candidate ;
For each of the second rectangular subgroups recognized by the second rectangular recognition means, a second grouping is performed in which a second group rectangle is further circumscribed to a circumscribed rectangle of a plurality of entry frame candidates included in the second rectangular subgroup. means and
means for recognizing the intersecting range of the first group rectangle and the second group rectangle as a writing frame, extracting image data within the recognized writing frame and subjecting it to predetermined processing;
function as
The predetermined standard used by the first recognition means or the second recognition means includes a standard based on shapes of the plurality of circumscribed rectangles.
JP2022207647A 2020-05-12 2022-12-23 Information processing device and program Active JP7458600B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022207647A JP7458600B2 (en) 2020-05-12 2022-12-23 Information processing device and program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2020084128A JP7283756B2 (en) 2020-05-12 2020-05-12 Information processing device and program
JP2022207647A JP7458600B2 (en) 2020-05-12 2022-12-23 Information processing device and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2020084128A Division JP7283756B2 (en) 2020-05-12 2020-05-12 Information processing device and program

Publications (3)

Publication Number Publication Date
JP2023036833A JP2023036833A (en) 2023-03-14
JP2023036833A5 JP2023036833A5 (en) 2023-03-22
JP7458600B2 true JP7458600B2 (en) 2024-04-01

Family

ID=78511627

Family Applications (2)

Application Number Title Priority Date Filing Date
JP2020084128A Active JP7283756B2 (en) 2020-05-12 2020-05-12 Information processing device and program
JP2022207647A Active JP7458600B2 (en) 2020-05-12 2022-12-23 Information processing device and program

Family Applications Before (1)

Application Number Title Priority Date Filing Date
JP2020084128A Active JP7283756B2 (en) 2020-05-12 2020-05-12 Information processing device and program

Country Status (1)

Country Link
JP (2) JP7283756B2 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000155795A (en) 1989-07-10 2000-06-06 Hitachi Ltd Method and device for document recognition
JP2005078306A (en) 2003-08-29 2005-03-24 Toshiba Corp Image processor and image processing program
JP2007241428A (en) 2006-03-06 2007-09-20 Fuji Xerox Co Ltd Image processor and program
JP2009211432A (en) 2008-03-04 2009-09-17 Fujitsu Ltd Document recognition program, document recognition device and document recognition method
JP2010061693A (en) 2009-12-15 2010-03-18 Fujitsu Ltd Slip recognition method and slip recognition apparatus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3415342B2 (en) * 1995-09-13 2003-06-09 富士通株式会社 Character cutout method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000155795A (en) 1989-07-10 2000-06-06 Hitachi Ltd Method and device for document recognition
JP2005078306A (en) 2003-08-29 2005-03-24 Toshiba Corp Image processor and image processing program
JP2007241428A (en) 2006-03-06 2007-09-20 Fuji Xerox Co Ltd Image processor and program
JP2009211432A (en) 2008-03-04 2009-09-17 Fujitsu Ltd Document recognition program, document recognition device and document recognition method
JP2010061693A (en) 2009-12-15 2010-03-18 Fujitsu Ltd Slip recognition method and slip recognition apparatus

Also Published As

Publication number Publication date
JP2023036833A (en) 2023-03-14
JP7283756B2 (en) 2023-05-30
JP2021179743A (en) 2021-11-18

Similar Documents

Publication Publication Date Title
US5889886A (en) Method and apparatus for detecting running text in an image
US6009196A (en) Method for classifying non-running text in an image
US7558426B2 (en) Device for outputting character recognition results, character recognition device, and program therefor
US4903312A (en) Character recognition with variable subdivisions of a character region
CN102509383B (en) Feature detection and template matching-based mixed number identification method
US6574375B1 (en) Method for detecting inverted text images on a digital scanning device
US5757957A (en) Apparatus and method for area separation for image, having improved separation accuracy
CN102782702B (en) Paragraph recognition in an optical character recognition (OCR) process
WO2011142977A2 (en) Segmentation of a word bitmap into individual characters or glyphs during an ocr process
JP6353893B2 (en) Method, program, and apparatus for scraping articles from paper image taken by camera of portable terminal device
EP0750415B1 (en) Image processing method and apparatus
JP3851742B2 (en) Form processing method and apparatus
JP3411472B2 (en) Pattern extraction device
CN112241730A (en) Form extraction method and system based on machine learning
KR101937398B1 (en) System and method for extracting character in image data of old document
JP3837193B2 (en) Character line extraction method and apparatus
JP7458600B2 (en) Information processing device and program
JP3607753B2 (en) Document image region dividing method and apparatus, and column type discrimination method and apparatus
CN1983302A (en) Program, method and device for determining line direction
JP4810853B2 (en) Character image cutting device, character image cutting method and program
JP3476595B2 (en) Image area division method and image binarization method
JP3100825B2 (en) Line recognition method
JP2003271973A (en) Method and program for image processing
JPH03268181A (en) Document reader
JP2571826B2 (en) String pattern extraction device

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230310

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230310

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20240125

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20240213

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240308

R150 Certificate of patent or registration of utility model

Ref document number: 7458600

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150