JP7283756B2 - Information processing device and program - Google Patents

Information processing device and program Download PDF

Info

Publication number
JP7283756B2
JP7283756B2 JP2020084128A JP2020084128A JP7283756B2 JP 7283756 B2 JP7283756 B2 JP 7283756B2 JP 2020084128 A JP2020084128 A JP 2020084128A JP 2020084128 A JP2020084128 A JP 2020084128A JP 7283756 B2 JP7283756 B2 JP 7283756B2
Authority
JP
Japan
Prior art keywords
rectangle
circumscribing
rectangles
subgroup
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
JP2020084128A
Other languages
Japanese (ja)
Other versions
JP2021179743A (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 JP2020084128A priority Critical patent/JP7283756B2/en
Publication of JP2021179743A publication Critical patent/JP2021179743A/en
Priority to JP2022207647A priority patent/JP7458600B2/en
Application granted granted Critical
Publication of JP7283756B2 publication Critical patent/JP7283756B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Character Input (AREA)

Description

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

情報の記入枠を複数含む帳票から、各記入枠に記入された情報を読み取る技術が実用化されている。この技術では、予め帳票の種類ごとに、記入枠の領域を特定する座標情報と、当該座標情報で特定される領域がどのような情報を記入する記入枠に対応するかを表す情報とを、関連付けて領域情報として記憶しておく。 A technique for reading information entered in each entry box from a form containing a plurality of information entry boxes has been put into practical use. In this technology, for each type of form, coordinate information specifying the area of the entry box and information indicating what kind of information the area specified by the coordinate information corresponds to the entry box, 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 referenced, and the information in the information entry frame on the form is read.

特開平2011-169451号公報JP-A-2011-169451

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

本発明は上記実情に鑑みて為されたもので、光学的に読み取られた帳票の記入枠の領域を、人為的操作なく認識できる情報処理装置、及びプログラムを提供することを、その目的の一つとする。 SUMMARY OF THE INVENTION It is an object of the present invention to provide an information processing apparatus and a program capable of recognizing the area of the entry frame of an optically read form without manual operation. one.

なお、光学的文字認識を行うため、ノイズが重畳していないと判定される文字の領域を行方向または列方向に延伸して文字が含まれると想定される領域を見出す技術が特許文献1に開示されている。しかしながらこの特許文献1に開示の技術では、記入枠の領域を認識することはできない。 In order to perform optical character recognition, Patent Document 1 discloses a technique for finding an area that is assumed to contain a character by extending a character area that is determined not to be superimposed with noise in the row direction or the column direction. disclosed. However, the technology 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 for solving the above-described conventional problems is an information processing apparatus comprising: means for accepting image data of a form; means for extracting a rectangle; first recognition means for recognizing at least one first rectangle subgroup including the plurality of circumscribing rectangles arranged in the first axis direction of the image data of the form; first grouping means for setting a first group rectangle further circumscribing a plurality of circumscribing rectangles contained in the first rectangle subgroup for each first rectangle subgroup recognized by the recognition means; , second recognizing means for recognizing at least one second rectangular subgroup including a plurality of said circumscribing rectangles arranged in a second axial direction intersecting said first axial direction; second grouping means for setting, for each of the recognized second rectangle subgroups, a second group rectangle further circumscribing a plurality of circumscribing rectangles included in the second rectangle subgroup; the first group rectangle; and a means for recognizing a crossing range with the second group rectangle as an entry frame, extracting image data in the recognized entry frame, and subjecting it to predetermined processing.

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

本発明の実施の形態に係る情報処理装置の構成例を表すブロック図である。1 is a block diagram showing a configuration example of an information processing device according to an embodiment of the present invention; FIG. 本発明の実施の形態に係る情報処理装置が処理の対象とする帳票の例を表す説明図である。FIG. 4 is an explanatory diagram showing an example of a form to be processed by the information processing apparatus according to the embodiment of the present invention; 本発明の実施の形態に係る情報処理装置の例を表す機能ブロック図である。1 is a functional block diagram showing an example of an information processing device according to an embodiment of the present invention; FIG. 本発明の実施の形態に係る情報処理装置による記入枠の候補の検出処理の例を表す説明図である。FIG. 7 is an explanatory diagram showing an example of detection processing of entry frame candidates by the information processing apparatus according to the embodiment of the present invention; 本発明の実施の形態に係る情報処理装置によるグループ化の処理の例を表す説明図である。FIG. 4 is an explanatory diagram showing an example of grouping processing by the information processing apparatus according to the embodiment of the present invention; 本発明の実施の形態に係る情報処理装置による記入枠の認識処理の例を表す説明図である。FIG. 5 is an explanatory diagram showing an example of recognition processing of an entry frame by the information processing apparatus according to the embodiment of the present invention; 本発明の実施の形態に係る情報処理装置が処理の対象とする帳票に含まれる、表組の別の例を表す説明図である。FIG. 9 is an explanatory diagram showing another example of a table set 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等のデバイスに接続されている。 An embodiment of the present invention will be described with reference to the drawings. An information processing apparatus 1 according to an embodiment of the present invention includes a control unit 11, a storage unit 12, an operation unit 13, a display unit 14, and an interface unit 15, as illustrated in FIG. It is a general computer device that is connected to a device such as a scanner 2 or the like.

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

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

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

制御部11は、ここで設定した第1グループ矩形と第2グループ矩形との交差範囲を、記入枠として認識し、当該認識した記入枠内の画像データを抽出して所定の処理に供する。この制御部11の詳しい動作については後に述べる。 The control unit 11 recognizes the intersecting range of the first group rectangle and the second group rectangle set here as an entry frame, extracts the image data in the recognized entry frame, and applies 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-temporary recording medium and stored in the storage unit 12 . The storage unit 12 also operates as a work memory for the control unit 11 .

操作部13は、キーボード等であり、ユーザの操作を受け入れて、当該操作の内容を制御部11に出力する。表示部14は、ディスプレイ等であり、制御部11から入力される指示に従って情報を表示出力する。 The operation unit 13 is a keyboard or the like, receives user operations, and outputs the content of the operations 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, devices such as the scanner 2 are connected to the information processing apparatus 1 via the interface section 15 .

また本実施の形態の情報処理装置1に接続されるスキャナ2は、光学的に紙媒体上に形成された文字や図形を読み取り、画像データとして出力するものである。 A scanner 2 connected to the information processing apparatus 1 of the present 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 this embodiment, as illustrated in FIG. 3, the control unit 11 includes a receiving unit 21, an entry frame candidate extraction unit 22, a first recognition unit 23, a first grouping unit 24, a second It includes a recognition section 25 , a second grouping section 26 , an entry frame recognition section 27 and an information output section 28 .

受入部21は、インタフェース部15を介してスキャナ2から、スキャナ2が読み取った帳票の画像データを受け入れる。この画像データは、いわゆるビットマップ画像データである。 The receiving unit 21 receives the image data of the 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)が配列されているものとする。 As described above, an example of a form to be processed by the information processing apparatus 1 according to the present embodiment has a plurality of frames (entry frames) for entering information, as shown in FIG. and a table set (T) aligned in the column direction. In the example of FIG. 2, in the table (T), a plurality of entry frames A for entering the name of the person in charge for each time zone are aligned in the row direction, and the person in charge for each place in charge is arranged in the column direction. It is assumed that the entry frames A for entering the names of the persons are arranged in line. That is, in this table (T), the name of the person in charge is entered for each place in charge and each time period. In this table (T), the first row is an array of entry frames (D) in which information identifying the time period is entered, and the first column is the information identifying the place of responsibility. It is assumed that entry frames (P) are arranged.

また本実施の形態の情報処理装置1は、受け入れた帳票の画像データに対して第1の軸方向と、第1の軸方向に交差する第2の軸方向とを設定する。ここで第1、第2の軸方向は互いに直交した方向としてよい。以下の例では、第1の軸方向を行方向(スキャナ2の副走査方向)、第2の軸方向を列方向(スキャナ2の主走査方向)とする。 Further, the information processing apparatus 1 of the present embodiment sets a first axial direction and a second axial direction that intersects the first axial direction for the image data of the received form. Here, the first and second axial directions may be directions perpendicular to each other. In the following example, the first axial direction is the row direction (sub-scanning direction of the scanner 2), and the second axial direction is the column direction (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 recognized entry-box candidate area. As a specific example, in the present embodiment, since the entry frame is represented by a rectangular figure, the entry frame candidate extraction unit 22 uses the Hough transform to align the straight lines in the row direction or the column direction. , rotates the image data of the form received by the receiving unit 21 .

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

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

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

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

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

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

この例では、図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 entry frames are included in areas partitioned by ruled lines. In this example, the character string circumscribing rectangle itself may be used as the rectangle (circumscribing rectangle) that circumscribes the area of the entry frame candidate.

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

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

第1認識部23は、いずれの第1矩形サブグループに属していない外接矩形(かつ、後で説明する第1孤立矩形として設定されていない外接矩形)があれば、当該外接矩形の一つをさらに選択して上記の処理を繰り返す。なお、選択した外接矩形に対して、帳票の画像データの行方向(第1の軸方向に相当する)に存在する他の外接矩形が存在しない場合、第1認識部23は、選択した外接矩形を、第1孤立矩形として設定する。 If there is a circumscribing rectangle that does not belong to any first rectangle subgroup (and a circumscribing rectangle that is not set as a first isolated rectangle to be described later), the first recognition unit 23 recognizes one of the circumscribing rectangles as Select more and repeat the above process. Note that if there is no other circumscribing rectangle existing in the line direction (corresponding to the first axis direction) of the image data of the form for the selected circumscribing rectangle, the first recognition unit 23 recognizes the selected circumscribing 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矩形サブグループに含めるかを定めるものである。
As an example, as illustrated in FIG. 5, when the enclosing rectangle A is selected, the first recognition unit 23 virtually sets line segments AH and AB by extending the upper side and the lower side of the enclosing rectangle A, respectively. , which are different from the enclosing rectangle A (other enclosing rectangles) B, C, D, . . . The first recognizing unit 23 compares the area RIN between the line segments AH and AB with the area ROUT of the portion outside the line segments AH and AB for each of the other circumscribing rectangles found, and satisfies the condition:
RIN>ROUT, and
ROUT<Rrow_th
is satisfied or not. Here, Rrow_th is an empirically determined threshold, and how much the area of the portion outside the line segments AH and AB is to be included in the first rectangle subgroup to which the selected circumscribing rectangle A belongs. is defined.

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

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

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

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

第2認識部25は、いずれの第2矩形サブグループに属していない外接矩形(かつ、後で説明する第2孤立矩形として設定されていない外接矩形)があれば、当該外接矩形の一つをさらに選択して上記の処理を繰り返す。なお、選択した外接矩形に対して、帳票の画像データの列方向(第2の軸方向に相当する)に存在する他の外接矩形が存在しない場合、第2認識部25は、選択した外接矩形を、第2孤立矩形として設定する。 If there is a circumscribing rectangle that does not belong to any second rectangle subgroup (and a circumscribing rectangle that is not set as a second isolated rectangle to be described later), the second recognition unit 25 recognizes one of the circumscribing rectangles. Select more and repeat the above process. Note that if there is no other circumscribing rectangle existing in the column direction (corresponding to the second axis direction) of the image data of the form for the selected circumscribing rectangle, the second recognition unit 25 recognizes the selected circumscribing 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 circumscribing rectangle A illustrated in FIG. Enclosing rectangles different from enclosing rectangle A (other enclosing rectangles) E, F, G, . . . 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 for each of the other circumscribing rectangles found, and satisfies the condition:
RIN>ROUT, and
ROUT < Rcolumn_th
is satisfied or not. Here, Rcolumn_th is an empirically determined threshold value, and how much the area of the portion outside the line segments AL and AR is to be included in the second rectangle subgroup to which the selected circumscribing rectangle A belongs. is defined.

そして第2認識部25は、上記条件を満足すると判断される外接矩形と、外接矩形Aとをグループ化して、一つの第2矩形サブグループとする。図5の例では、外接矩形A,E,Fが一つの第2矩形サブグループに属するものとされ、外接矩形Gは、RIN>ROUTでないために、外接矩形Aが属する第2矩形サブグループにはグループ化されない。 Then, the second recognition unit 25 groups the circumscribing rectangle determined to satisfy the above conditions and the circumscribing rectangle A into one second rectangle subgroup. In the example of FIG. 5, the enclosing rectangles A, E, and F belong to one second rectangle subgroup, and the enclosing rectangle G belongs to the second rectangle subgroup to which the enclosing rectangle A belongs because RIN>ROUT does not hold. 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 further circumscribing a plurality of circumscribing 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 frame recognition unit 27 recognizes the intersecting 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 frame. In the example of this embodiment, the first grouping unit 24 generally sets a plurality of n first group rectangles. The first group rectangles are rectangles extending in the row direction and arranged in the column direction. Also, the second grouping unit 26 generally sets a plurality of m second group rectangles. The second group rectangles are rectangles extending in the column direction and arranged in the row direction.

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

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

[動作]
本実施の形態の情報処理装置1は、以上の構成を備えており、次のように動作する。以下の例では、スキャナ2が読み取る帳票には、図6(a)に例示するように、記入枠(A,B,C,D,E,Fで示される部分)がそれぞれ所定の間隔をおいて、マトリクス状に(行方向及び列方向に)配列され、それぞれ文字列AAA,BB,CC,DDD,EE,FFF(それぞれ文字数は互いに異なってよい)が記入されているものとする。また、図6(a)の例では、罫線はないものとしている。
[motion]
The information processing apparatus 1 of the present embodiment has the above configuration and operates as follows. In the following example, the form read by the scanner 2 has entry frames (portions indicated by A, B, C, D, E, and F) at predetermined intervals, as shown in FIG. 6(a). are arranged in a matrix (row direction and column direction), and character strings AAA, BB, CC, DDD, EE, and FFF (the number of characters may differ from each other) are entered. Also, in the example of FIG. 6A, 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 apparatus 1 receives from the scanner 2 via the interface unit 15 the image data of the form including the table shown in FIG. A row direction as a first axial direction and a column direction as a second axial direction that intersects with the first axial direction are set for image data of a form.

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

そして制御部11は、文字グループ化条件によりグループ化された複数の文字矩形にさらに外接する文字列外接矩形を生成し(図6(a)のA,B,C,D,E,F)、この生成した文字列外接矩形内の領域を、記入枠の候補の領域とする。 Then, the control unit 11 generates character string circumscribing rectangles (A, B, C, D, E, and F in FIG. 6A) that further circumscribe the plurality of character rectangles grouped according to the character grouping condition, The area within the generated character string circumscribing rectangle is set as the 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 a plurality of circumscribing rectangles that circumscribe each of the entry frame candidate areas. For example, assume that the control unit 11 selects a circumscribing rectangle that circumscribes the character string AAA. The control unit 11 detects other circumscribing rectangles existing in the row direction of the image data of the form for the selected circumscribing rectangle. Here, a circumscribing rectangle circumscribing the character string BB exists in the row direction of the image data of the form with respect to the circumscribing rectangle circumscribing the character string AAA. Therefore, the control unit 11 sets a first rectangle subgroup including the selected circumscribing rectangle (the circumscribing rectangle of the character string AAA) and the other detected circumscribing rectangle (the circumscribing rectangle of the character string BB). ), a first group rectangle X1 that circumscribes the circumscribing rectangles included in the first rectangle subgroup is set.

また制御部11は、いずれの第1矩形サブグループに属していない外接矩形の一つ、例えば文字列CCに外接する外接矩形を選択し、当該選択した外接矩形に対して、帳票の画像データの行方向に存在する他の外接矩形を検出する。ここでは文字列CCに外接する外接矩形に対し、帳票の画像データの行方向には、文字列DDDに外接する外接矩形が存在する。そこで制御部11は、選択した外接矩形(文字列CCの外接矩形)と、検出した他の外接矩形(文字列DDDの外接矩形)とを含む第1矩形サブグループを設定し、その第1矩形サブグループに含まれる外接矩形に外接する第1グループ矩形X2を設定する。 The control unit 11 also selects one of the circumscribing rectangles that does not belong to any of the first rectangle subgroups, for example, the circumscribing rectangle that circumscribes the character string CC. Detect other circumscribing rectangles in the row direction. Here, in contrast to the circumscribing rectangle that circumscribes the character string CC, there is a circumscribing 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 including the selected circumscribing rectangle (the circumscribing rectangle of the character string CC) and the other detected circumscribing rectangle (the circumscribing rectangle of the character string DDD), and sets the first rectangle subgroup. A first group rectangle X2 that circumscribes the circumscribed rectangles 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 the circumscribing rectangle of the character string EE and the circumscribing rectangle of the character string FFF. 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 any one of a plurality of circumscribing rectangles that circumscribe each of the entry frame candidate regions. For example, it is assumed here that the control unit 11 selects a circumscribing rectangle that circumscribes the character string AAA. The control unit 11 detects other circumscribing rectangles existing in the column direction of the image data of the form with respect to the selected circumscribing rectangle. Here, with respect to a circumscribing rectangle that circumscribes the character string AAA, there are a circumscribing rectangle that circumscribes the character string CC and a circumscribing rectangle that circumscribes the character string EE in the row direction of the image data of the form. Therefore, the control unit 11 creates a second rectangle subgroup including the selected bounding rectangle (the bounding rectangle of the character string AAA) and the other detected bounding rectangles (the bounding rectangle of the character string BB and the bounding rectangle of the character string EE). Then, as illustrated in FIG. 6C, a second group rectangle Y1 that circumscribes the circumscribing rectangles included in the second rectangle subgroup is set.

以下、制御部11は、いずれの第2矩形サブグループに属していない外接矩形の一つを選択して上記処理を繰り返す。ここでは、例えば制御部11は、文字列BBに外接する外接矩形を選択し、当該選択した外接矩形に対して、帳票の画像データの列方向に存在する他の外接矩形として、文字列DDDに外接する外接矩形及び文字列FFFに外接する外接矩形を検出する。制御部11は、選択した外接矩形(文字列CCの外接矩形)と、検出した他の外接矩形(文字列DDDの外接矩形及び文字列FFFの外接矩形)とを含む第2矩形サブグループを設定し、その第2矩形サブグループに含まれる外接矩形に外接する第2グループ矩形Y2を設定する。 After that, the control unit 11 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 circumscribes the character string BB, and assigns the selected circumscribing rectangle to the character string DDD as another circumscribing rectangle existing in the column direction of the image data of the form. A circumscribing rectangle that circumscribes and a circumscribing rectangle that circumscribes the character string FFF is detected. The control unit 11 sets a second rectangle subgroup including the selected bounding rectangle (the bounding rectangle of the character string CC) and the other detected bounding rectangles (the bounding rectangle of the character string DDD and the bounding rectangle of the character string FFF). Then, a second group rectangle Y2 circumscribing the circumscribing rectangles included in the second rectangle subgroup is set.

制御部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, and RF (FIG. 6(d)) of the first group rectangles X1, X2, and X3 and the second group rectangles Y1, Y2 as entry boxes. Then, information representing a circumscribing rectangle that circumscribes these intersecting ranges is recorded as information of a circumscribing rectangle that specifies each entry box.

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

[外接矩形の選択基準]
なお、ここまでの説明において、制御部11は、第1認識部23としての処理において、外接矩形の一つを選択し、当該選択した外接矩形に対して、帳票の画像データの行方向(または列方向)に存在する他の外接矩形を検出してグループ化するものとした。この際、選択した外接矩形を行方向(または列方向)に延長した領域に重なりあう他の外接矩形であって、当該重なりあう範囲の面積が当該他の外接矩形全体の面積に対して所定の比より大きい場合にグループ化する、といった条件としていたが当該グループ化の条件はこれに限られない。
[Selection Criteria for Bounding Rectangle]
In the description so far, the control unit 11 selects one of the circumscribing rectangles in the processing as the first recognition unit 23, and aligns the selected circumscribing rectangle with the row direction (or In the column direction), other circumscribing rectangles are detected and grouped. At this time, another circumscribing rectangle that overlaps the area obtained by extending the selected circumscribing 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 other circumscribing rectangle as a whole. Although the condition is such that the values are grouped when the ratio is larger, the condition for grouping is not limited to this.

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

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

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

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

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

制御部11は、クラスタリングにより得られたクラスタごとに、当該クラスタに属する外接矩形の一つを選択し、当該選択した外接矩形に対して、帳票の画像データの行方向(第1の軸方向に相当する)に存在する他の外接矩形であって、選択した外接矩形と同じクラスタに属するもの(さらに既に述べた条件を加重してもよい)を検出してグループ化し、第1矩形サブグループを設定することとしてもよい。 For each cluster obtained by clustering, the control unit 11 selects one of the circumscribing rectangles belonging to the cluster, and moves the selected circumscribing rectangle in the row direction (in the first axis direction) of the image data of the form. ) that belong to the same cluster as the selected circumscribing rectangle (and may be weighted by the conditions already described) and grouped to form the first subgroup of rectangles. It may 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 set T in FIG. 7 has a column header HC including N columns (N is an integer equal to or greater than 1) for item names in the column direction, and M columns for item names in the row direction (M is 1). (integers above) and a table body TB including N×M entry boxes. The entry frames included in the column headers HC each have a width CW and a height CH, the entry frames in the main body portion TB each have a width CW and a height RH, and the entry frames included in the row headers HR each have a width RW and height RH.

さらにここで、RH<CHであり、RW>CWであるとする。つまり、列方向の項目名の記入枠の高さCHは、本体部TB内の記入枠の高さRHより大きく、行方向の項目名の記入枠の幅RWは、本体部TB内の記入枠の幅CWより大きい。 Further, assume 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 in the main body TB is greater than the width RW of the entry frame in the main body TB. is greater than the width CW of

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

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

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

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

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

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

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

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

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

[変形例]
また本実施の形態の別の例では、制御部11は、次のようにして表を認識してもよい。制御部11は、二値化処理や階調反転、輪郭線抽出等の処理を用いて、スキャナ2等から受け入れた帳票の画像データから矩形状の領域を認識し、認識した矩形状の領域の各々について固有の識別情報を発行する。
[Modification]
In another example of the present embodiment, control section 11 may recognize a table as follows. The control unit 11 recognizes a rectangular area from the image data of the form received from the scanner 2 or the like using processing such as binarization processing, gradation inversion, and outline extraction, and converts the recognized rectangular region. 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 of each recognized rectangular region (for example, the upper left corner of the rectangular region). 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 rectangular area information stored in the storage unit 12, classifies the recognized rectangular areas into clusters based on the height and width information, and obtains the classification result. As a result of this classification, 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 provides identification information of each rectangular region classified into the selected cluster. and select one of the identification information. Then, the control unit 11 acquires the 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, existing in the width direction (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 in the height direction (assumed to be the Y-axis direction) of the acquired coordinate information is less than a predetermined threshold value.

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

制御部11は、この処理により、X軸方向に一列に配列されている矩形状領域のそれぞれについて、Y軸方向に一列に配列されている矩形状領域を見出す。そして制御部11は、当該見出した、Y軸方向に一列に配列されている矩形状領域の座標情報のY座標の値を、降順あるいは昇順に並べ替え、並べ替えて得たY座標の値のリストで互いに隣接する2つのY座標の値が、予め定めたしきい値を下回るか否かを調べる。このしきい値は、例えば選択しているクラスタに属する矩形状領域の高さに予め定めた方法で決められる値(例えば定数、あるいは高さに所定の実数係数を乗じた値)とする。 Through this processing, 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 Y-coordinate values of the coordinate information of the rectangular regions arranged in a row in the Y-axis direction in descending or ascending order, and sorts the Y-coordinate values obtained by sorting. Check if two Y-coordinate values adjacent to each other in the list are below a predetermined threshold. This threshold value is, for example, a value determined by a predetermined method for the height of the rectangular area belonging to the selected cluster (eg, a constant value, 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 positions where it is determined that two Y-coordinate values adjacent to each other do not fall below a predetermined threshold value.

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

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

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

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

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

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

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

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

制御部11は、この処理により、X軸方向に一列に配列されている、高さが実質的に共通している矩形状領域のそれぞれについて、Y軸方向に一列に配列されている、幅が実質的に共通している矩形状領域を見出す。そして制御部11は、当該見出した、Y軸方向に一列に配列されている矩形状領域の座標情報のY座標の値を、降順あるいは昇順に並べ替え、並べ替えて得たY座標の値のリストで互いに隣接する2つのY座標の値が、予め定めたしきい値を下回るか否かを調べる。このしきい値は、例えば選択しているクラスタに属する矩形状領域の高さに予め定めた方法で決められる値(例えば定数)とする。 By this processing, the control unit 11 determines, for each of the rectangular regions that are arranged in a row in the X-axis direction and have substantially the same height, the widths of the rectangular regions arranged in a row in the Y-axis direction. Find the substantially common rectangular regions. Then, the control unit 11 rearranges the Y-coordinate values of the coordinate information of the rectangular regions arranged in a row in the Y-axis direction in descending or ascending order, and sorts the Y-coordinate values obtained by rearranging. Check if two Y-coordinate values adjacent to each other in the list are below a predetermined threshold. This threshold value is, for example, a value (eg, constant) determined by a predetermined method for the height of the 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 value.

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

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

これにより制御部11は、X軸方向に一列に配列され、また高さ方向に距離をおかずに配列されている矩形状領域の群(グループ)を見出す。そして制御部11は、当該矩形状領域を、表の各セルとして認識し、見出した矩形状領域の群を表の範囲として認識する。 As a result, the control unit 11 finds a group of rectangular areas that are arranged in a line in the X-axis direction and are arranged in the height direction without being spaced apart from each other. Then, the control unit 11 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, the control unit 11 may also perform the process of dividing into groups in the X-axis direction as well. This processing is the same as the processing already described, and the description will be omitted since it will be repeated.

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

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

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

[実施形態の効果]
本実施の形態によると、光学的に読み取られた帳票の記入枠の領域を、罫線の有無に関わらず、人為的操作なく認識できる。また、表組の項目名と本体とを区別して、記入枠の領域を、認識できる。
[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. In addition, it is possible to recognize the area of the entry frame by distinguishing between the item name of the table and the main body.

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 reception unit, 22 entry frame candidate extraction unit, 23 first recognition unit, 24 first grouping 25 second recognition unit 26 second grouping unit 27 entry frame recognition unit 28 information output unit.

Claims (4)

帳票の画像データを受け入れる手段と、
前記受け入れた帳票の画像データから、帳票上の記入枠の候補の外接矩形を抽出する手段と、
前記帳票の画像データの第1の軸方向に配列された、複数の前記外接矩形であって、所定の基準を満足する複数の前記外接矩形を含む第1矩形サブグループを少なくとも一つ認識する第1認識手段と、
前記第1認識手段が認識した第1矩形サブグループごとに、当該第1矩形サブグループに含まれる複数の外接矩形にさらに外接する第1グループ矩形を設定する第1グループ化手段と、
前記帳票の画像データの、前記第1の軸方向に交差する第2の軸方向に配列された、複数の前記外接矩形であって、所定の基準を満足する複数の前記外接矩形を含む第2矩形サブグループを少なくとも一つ認識する第2認識手段と、
前記第2認識手段が認識した前記第2矩形サブグループごとに、当該第2矩形サブグループに含まれる複数の外接矩形にさらに外接する第2グループ矩形を設定する第2グループ化手段と、
前記第1グループ矩形と、前記第2グループ矩形との交差範囲を、記入枠として認識し、当該認識した記入枠内の画像データを抽出して所定の処理に供する手段と、
を有し、
前記第1認識手段または第2認識手段が利用する前記所定の基準は、前記複数の外接矩形の形状に基づく基準を含み、
当該複数の外接矩形の形状に基づく基準が、前記複数の外接矩形を、それぞれの大きさ、並びにアスペクトでクラスタリングして得られたクラスタであり、当該クラスタごとに、前記第1矩形サブグループまたは前記第2矩形サブグループが認識される情報処理装置。
means for accepting image data of a form;
means for extracting circumscribing rectangles of candidates for entry boxes on the form from the received image data of the form;
recognizing at least one first rectangle subgroup including a plurality of the circumscribing rectangles arranged in the first axis direction of the image data of the form, the circumscribing rectangles satisfying a predetermined criterion; 1 recognition means;
a first grouping means for setting, for each first rectangle subgroup recognized by the first recognition means, a first group rectangle further circumscribing a plurality of circumscribing rectangles included in the first rectangle subgroup;
a plurality of said circumscribing rectangles arranged in a second axis direction that intersects said first axis direction of the image data of said form, said second including a plurality of said circumscribing rectangles satisfying a predetermined criterion; second recognition means for recognizing at least one rectangular subgroup;
a second grouping means for setting, for each of the second rectangle subgroups recognized by the second recognition means, a second group rectangle further circumscribing a plurality of circumscribing rectangles included in the second rectangle subgroup;
means for recognizing the intersecting range of the first group rectangle and the second group rectangle as an entry frame, extracting image data in the recognized entry frame, and subjecting it to predetermined processing;
has
the predetermined criteria used by the first recognition means or the second recognition means include criteria based on the shapes of the plurality of circumscribed rectangles;
The reference based on the shapes of the plurality of bounding rectangles is a cluster obtained by clustering the plurality of bounding rectangles according to their respective sizes and aspects, and each cluster is divided into the first rectangular subgroup or the An information processing device in which a second rectangular subgroup is recognized .
請求項に記載の情報処理装置であって、
前記第1認識手段または第2認識手段が利用する前記所定の基準が、さらに、
複数の前記外接矩形に含まれる一対の外接矩形間の距離に基づく基準、及び、
複数の前記外接矩形の形状に基づく基準、
を含む基準である情報処理装置。
The information processing device according to claim 1 ,
The predetermined criterion used by the first recognition means or the second recognition means further comprises
a criterion based on a distance between a pair of bounding rectangles included in the plurality of bounding rectangles ; and
criteria based on the shape of a plurality of said bounding rectangles;
Information processing equipment that is a standard that includes
請求項1または2に記載の情報処理装置であって、
前記所定の処理は、前記記入枠に含まれる画像データに基づく文字認識処理を含む情報処理装置。
The information processing device according to claim 1 or 2 ,
The information processing apparatus, wherein the predetermined processing includes character recognition processing based on image data included in the entry frame.
コンピュータを、
帳票の画像データを受け入れる手段と、
前記受け入れた帳票の画像データから、帳票上の記入枠の候補の外接矩形を抽出する手段と、
前記帳票の画像データの第1の軸方向に配列された、複数の前記外接矩形であって、所定の基準を満足する複数の前記外接矩形を含む第1矩形サブグループを少なくとも一つ認識する第1認識手段と、
前記第1認識手段が認識した第1矩形サブグループごとに、当該第1矩形サブグループに含まれる複数の外接矩形にさらに外接する第1グループ矩形を設定する第1グループ化手段と、
前記帳票の画像データの、前記第1の軸方向に交差する第2の軸方向に配列された、複数の前記外接矩形であって、所定の基準を満足する複数の前記外接矩形を含む第2矩形サブグループを少なくとも一つ認識する第2認識手段と、
前記第2認識手段が認識した前記第2矩形サブグループごとに、当該第2矩形サブグループに含まれる複数の外接矩形にさらに外接する第2グループ矩形を設定する第2グループ化手段と、
前記第1グループ矩形と、前記第2グループ矩形との交差範囲を、記入枠として認識し、当該認識した記入枠内の画像データを抽出して所定の処理に供する手段と、
として機能させ、
前記第1認識手段または第2認識手段が利用する前記所定の基準は、前記複数の外接矩形の形状に基づく基準を含み、当該複数の外接矩形の形状に基づく基準が、前記複数の外接矩形を、それぞれの大きさ、並びにアスペクトでクラスタリングして得られたクラスタであり、当該クラスタごとに、前記第1矩形サブグループまたは前記第2矩形サブグループが認識されるようコンピュータを機能させるプログラム。
the computer,
means for accepting image data of a form;
means for extracting circumscribing rectangles of candidates for entry boxes on the form from the received image data of the form;
recognizing at least one first rectangle subgroup including a plurality of the circumscribing rectangles arranged in the first axis direction of the image data of the form, the circumscribing rectangles satisfying a predetermined criterion; 1 recognition means;
a first grouping means for setting, for each first rectangle subgroup recognized by the first recognition means, a first group rectangle further circumscribing a plurality of circumscribing rectangles included in the first rectangle subgroup;
a plurality of said circumscribing rectangles arranged in a second axis direction that intersects said first axis direction of the image data of said form, said second including a plurality of said circumscribing rectangles satisfying a predetermined criterion; second recognition means for recognizing at least one rectangular subgroup;
a second grouping means for setting, for each of the second rectangle subgroups recognized by the second recognition means, a second group rectangle further circumscribing a plurality of circumscribing rectangles included in the second rectangle subgroup;
means for recognizing the intersecting range of the first group rectangle and the second group rectangle as an entry frame, extracting image data in the recognized entry frame, and subjecting it to predetermined processing;
function as
The predetermined criteria used by the first recognition means or the second recognition means include criteria based on the shapes of the plurality of circumscribing rectangles, and the criteria based on the shapes of the plurality of circumscribing rectangles determine the plurality of circumscribing rectangles. , each size and aspect, and a program for causing a computer to recognize the first rectangular subgroup or the second rectangular subgroup for each cluster.
JP2020084128A 2020-05-12 2020-05-12 Information processing device and program Active JP7283756B2 (en)

Priority Applications (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

Applications Claiming Priority (1)

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

Related Child Applications (1)

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

Publications (2)

Publication Number Publication Date
JP2021179743A JP2021179743A (en) 2021-11-18
JP7283756B2 true JP7283756B2 (en) 2023-05-30

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 After (1)

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

Country Status (1)

Country Link
JP (2) JP7283756B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0407935B1 (en) 1989-07-10 1999-10-06 Hitachi, Ltd. Document data processing apparatus using image data
JP3415342B2 (en) * 1995-09-13 2003-06-09 富士通株式会社 Character cutout method
JP4856235B2 (en) 2009-12-15 2012-01-18 富士通株式会社 Form recognition method and form recognition apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
JP2021179743A (en) 2021-11-18
JP7458600B2 (en) 2024-04-01
JP2023036833A (en) 2023-03-14

Similar Documents

Publication Publication Date Title
US4903312A (en) Character recognition with variable subdivisions of a character region
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
US5889886A (en) Method and apparatus for detecting running text in an image
CN104516891B (en) A kind of printed page analysis method and system
US5325447A (en) Handwritten digit normalization method
EP0654751B1 (en) Method of analyzing data defining an image
US5046114A (en) Method and structure for separating joined patterns for use in pattern and character recognition system
EP1017011A2 (en) Block selection of table features
CN114004204A (en) Table structure reconstruction and character extraction method and system based on computer vision
US20170161580A1 (en) Method and system for text-image orientation
JP3837193B2 (en) Character line extraction method and apparatus
JP7283756B2 (en) Information processing device and program
JP2926066B2 (en) Table recognition device
US5369715A (en) Optical character recognition system
JPH08320914A (en) Table recognition method and device
JP2004282701A (en) Segmenting composite image by minimum areas
JP3607753B2 (en) Document image region dividing method and apparatus, and column type discrimination method and apparatus
JPH0449148B2 (en)
JPH0697470B2 (en) Character string extractor
JP2918363B2 (en) Character classification method and character recognition device
JPH0262682A (en) Method for recognizing character
JP3104355B2 (en) Feature extraction device
JP2571826B2 (en) String pattern extraction device
JPH06131496A (en) Pattern normalization processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210430

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220412

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220426

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220623

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20221025

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20221223

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: 20230418

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230511

R150 Certificate of patent or registration of utility model

Ref document number: 7283756

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150