JPH0973516A - Slip type identification method - Google Patents

Slip type identification method

Info

Publication number
JPH0973516A
JPH0973516A JP7225649A JP22564995A JPH0973516A JP H0973516 A JPH0973516 A JP H0973516A JP 7225649 A JP7225649 A JP 7225649A JP 22564995 A JP22564995 A JP 22564995A JP H0973516 A JPH0973516 A JP H0973516A
Authority
JP
Japan
Prior art keywords
format
rectangular block
template data
image
generated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP7225649A
Other languages
Japanese (ja)
Inventor
Hiroyuki Arai
啓之 新井
Kazumi Odaka
和巳 小高
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP7225649A priority Critical patent/JPH0973516A/en
Publication of JPH0973516A publication Critical patent/JPH0973516A/en
Pending legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a slip type identification method by which a type can stably be identified even in the case of the overlap of line noise and the cut of a segment through the use of an existed slip as it is and the initial registration of a format is easy. SOLUTION: A slip type identification part corrects the inclination of the input picture of a scanner and the like by a first means and a second means roughly meshes an input means on an unknown format slip. A third means integrates the extracts a background area becoming a closed area and a fourth means generates the circumscribing rectangle of the background area. A fifth means integrates the overlapped circumscribing rectangles. A sixth means checks the geometric relation of the respective circumscribing rectangles, groups them and generates a rectangle block. An eighth means calculates an adaptability with format template data which is read by a seventh means with the rectangle block as a unit and the pertinent format is decided from the adaptability. A format initial registration part executes a processing by the first to sixth means on an unfilled format slip and a ninth means sets obtained rectangle block data to be format template data.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、帳票などの定型書
式のデータ入力を効率的に行うコンピュータシステム等
において、帳票などの枠線で囲まれた書式の種類を、ラ
インノイズが重畳している場合や線分に掠れや切断があ
るような場合においても、安定的に識別する帳票種類識
別方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a computer system or the like for efficiently inputting data in a fixed format such as a form, in which line noise is superimposed on the type of the form surrounded by a frame line such as the form. The present invention relates to a form type identification method for stable identification even when there is blurring or cutting in a line segment.

【0002】[0002]

【従来の技術】従来の帳票種類識別方法には、大きく分
けて2つの方法があった。
2. Description of the Related Art There are roughly two types of conventional form type identification methods.

【0003】一つ目は、帳票の種類を示す専用のマーク
(記号、バーコード等)を用いたものである。この方法
の場合、書式の登録作業は、これらのマークと帳票種類
の対応を登録するだけで良いので簡単である。また、ラ
インノイズの重畳や掠れに対しても比較的安定である。
The first is to use a special mark (symbol, bar code, etc.) that indicates the type of form. In the case of this method, the work of registering the format is easy because it is only necessary to register the correspondence between these marks and the form types. In addition, it is relatively stable against line noise superimposition and blurring.

【0004】二つ目は、書式を形成する枠線を抽出し、
枠線の構造を調べることにより帳票種類を識別する方法
である。この方法は、既存の帳票をそのまま使えるとい
うメリットがあり、需要も大きい。
The second is to extract the frame lines that form the format,
This is a method of identifying the form type by checking the structure of the frame line. This method has the advantage that existing forms can be used as is, and there is great demand.

【0005】[0005]

【発明が解決しようとする課題】上記従来の帳票種類識
別方法のうち、帳票の種類を示す専用のマーク(記号、
バーコード等)を用いる一つ目の方法では、専用のマー
クを用いるために既存の帳票をそのまま使うことができ
ず、マーク付きの書式に印刷し直さなければならないた
め、帳票の種類、枚数が多い場合に手間、コストが大き
くなってしまうという問題点があった。
Among the above-mentioned conventional form type identification methods, a dedicated mark (symbol,
With the first method using a barcode, etc., the existing form cannot be used as it is because the dedicated mark is used, and it is necessary to reprint the form with the mark. When there are many, there was a problem that labor and cost would increase.

【0006】また、書式を形成する枠線を抽出し、枠線
の構造を調べることにより帳票種類を識別する二つ目の
方法では、ラインノイズが重畳した場合や、線分に切断
のある場合には枠線の構造が大きく変化してしまい、識
別が不安定になるという問題点があった。また、枠線の
構造を正確に登録するためには、書式の初期登録の際に
CAD等を用いた登録作業(描画)が必要となり、書式
の種類が多い場合には作業者の負担が大きくなってしま
うなど、書式の識別を行うために必要な書式の初期登録
が煩雑であるという問題点があった。
The second method for identifying the form type by extracting the frame lines forming the format and examining the structure of the frame lines is the case where line noise is superimposed or line segments are cut. Had a problem that the structure of the frame line changed greatly and the identification became unstable. Further, in order to accurately register the structure of the frame line, registration work (drawing) using CAD or the like is required at the time of initial registration of the form, and when there are many types of forms, the burden on the operator is large. However, there is a problem that the initial registration of the format necessary for identifying the format is complicated.

【0007】本発明は以上のような問題点に対し、専用
マークを用いないで既存の帳票をそのまま使うことがで
き、ラインノイズの重畳や線分の掠れ、切断がある場合
に対しても安定的な帳票種類識別を可能にし、および書
式の初期登録を簡易なものにする帳票種類識別方法を提
供することを目的とする。
In order to solve the above problems, the present invention can use an existing form as it is without using a dedicated mark, and is stable even in the case where line noise is superposed, line segments are blown, or cut. It is an object of the present invention to provide a form type identification method that enables automatic form type identification and facilitates initial registration of forms.

【0008】[0008]

【課題を解決するための手段】上記の目的を達成するた
めの、本発明による第1の発明は、イメージ入力手段に
より入力された未知書式の帳票画像から該入力された帳
票の書式の種類を識別する方法であって、前記入力され
た未知書式の帳票画像に粗くメッシュをかけ、該メッシ
ュをかけた画像から閉領域となる全ての背景領域を抽出
し、該抽出された各背景領域の外接矩形を生成し、該生
成された外接矩形の大きさと幾何学的な相対関係の一方
または双方を調べ類似した外接矩形をグルーピングして
矩形ブロックを生成する未知書式の矩形ブロック生成段
階と、前記生成された矩形ブロックデータを単位とし
て、予め生成し保存しておいた書式テンプレートデータ
との適合度を算出し、適合度の高い場合に該当書式であ
ると判定する書式判定段階と、を有することを特徴とす
る帳票種類識別方法である。
In order to achieve the above-mentioned object, the first invention according to the present invention is to determine the form type of the input form from the form image of the unknown form input by the image input means. A method for identification, in which a rough mesh is applied to the input form image of the unknown format, all background areas that are closed areas are extracted from the image applied with the mesh, and the circumscribing of each extracted background area is performed. A rectangular block generation step of unknown format, which generates a rectangle, examines one or both of the size and geometrical relation of the generated circumscribed rectangle and groups similar circumscribed rectangles to generate a rectangular block; Calculates the conformity with the previously created and saved format template data using the rectangular block data as a unit, and determines the format as the corresponding format when the conformity is high. A document type identification method characterized by comprising the steps, a.

【0009】同じく本発明による第2の発明は、上記の
帳票種類識別方法において、イメージ入力手段により未
記入書式の帳票画像を入力する段階と、前記入力された
未記入書式の帳票画像に粗くメッシュをかけ、該メッシ
ュをかけた画像から閉領域となる全ての背景領域を抽出
し、該抽出された各背景領域の外接矩形を生成し、該生
成された外接矩形の大きさと幾何学的な相対関係の一方
または双方を調べ類似した外接矩形をグルーピングして
矩形ブロックを生成する未記入書式の矩形ブロック生成
段階と、前記生成された矩形ブロック単位に当該書式の
特徴を記述した書式テンプレートデータを生成し保存す
る書式初期登録段階と、を有することを特徴とする。
Similarly, in the second aspect of the present invention, in the above-described form type identification method, a step of inputting a blank form image by image input means and a coarse mesh on the input blank form image. , All background areas that are closed areas are extracted from the image to which the mesh is applied, circumscribed rectangles of the extracted background areas are generated, and the size and geometrical relative of the generated circumscribed rectangles are generated. A blank block generation step of generating rectangular blocks by grouping similar circumscribing rectangles by examining one or both of the relationships, and generating format template data that describes the characteristics of the format in the generated rectangular block units. And a format initial registration step of saving and storing the format.

【0010】同じく本発明による第3の発明は、以上の
帳票種類識別方法において、書式判定段階は、未知書式
の矩形ブロックデータと書式テンプレートデータを空間
的に重ね合わせ、該未知書式のある矩形ブロックの代表
点が、該書式テンプレートデータ中のある矩形ブロック
の範囲内にある場合、それらの矩形ブロック同士が対応
関係にあるとし、該対応関係にある全ての矩形ブロック
同士の重畳する面積を求め、該求めた面積の値を用いて
前記未知書式の矩形ブロックデータと前記書式テンプレ
ートデータとの適合度を算出する適合度算出過程を有す
ることを特徴とする。
According to a third aspect of the present invention, in the form type identification method described above, in the format determining step, rectangular block data of unknown format and format template data are spatially superposed, and a rectangular block with the unknown format is obtained. When the representative point of is within the range of a certain rectangular block in the format template data, it is assumed that those rectangular blocks have a corresponding relationship, and the overlapping area of all the rectangular blocks having the corresponding relationship is obtained, The present invention is characterized by including a compatibility calculation step of calculating a compatibility between the rectangular block data of the unknown format and the format template data using the value of the obtained area.

【0011】第1の発明による帳票種類識別方法では、
帳票種類の識別を書式テンプレートデータとのマッチン
グにより行い、専用マークを用いないで行うことによ
り、既存の帳票をそのまま使うことができるようにす
る。また、細かな枠線で囲まれた書式の構造を矩形ブロ
ックという大きな単位で自動的に記述して、その単位で
書式テンプレートデータとのマッチングにより帳票種類
の識別を行うことにより、オペレータの作業負担を大幅
に軽減する。また、ラインノイズの重畳に関して、ライ
ンノイズのために矩形ブロックが分断されたとしても、
ブロックという大きな単位でおおまかなマッチングを行
うことにより、分断されたブロックが書式テンプレート
データの同じブロックに対応づけられて、適合度の値が
ラインノイズのない場合とほとんど同じ値になるように
し、ラインノイズの重畳に対し安定的な識別を実現す
る。さらに、線分の切断に関して、小さいな切断につい
ては粗くメッシュをかけることにより解消し、やや大き
い局所的な線分の切断については、細かな書式の構造は
記述せずにブロックという大きな単位でおおまかなマッ
チングを行うことにより、その線分の切断の影響が全体
に波及しにくいようにして、線分の切断や掠れに対し安
定的な識別を実現する。
In the form type identification method according to the first invention,
The existing form can be used as it is by identifying the form type by matching it with the format template data and without using the dedicated mark. Also, the work load on the operator can be improved by automatically describing the structure of the format surrounded by the fine frame in a large unit called a rectangular block and identifying the form type by matching with the format template data in that unit. Greatly reduce. Also, regarding the superposition of line noise, even if the rectangular block is divided due to line noise,
By performing rough matching in large units called blocks, the divided blocks are associated with the same blocks in the format template data so that the goodness of fit value is almost the same as when there is no line noise. Achieves stable discrimination against noise superposition. Furthermore, regarding the cutting of line segments, small cutting is solved by coarsely meshing, and for locally large line cutting, the structure of a fine format is not described, but it is roughly divided into large units called blocks. Such matching makes it difficult for the influence of the cutting of the line segment to spread to the whole, and realizes stable identification against the cutting or blurring of the line segment.

【0012】第2の発明による帳票種類識別方法では、
細かな枠線で囲まれた書式の構造を矩形ブロックという
大きな単位で自動的に記述して、簡易に初期書式登録す
ることにより、書式初期登録時のオペレータの作業負担
を大幅に軽減する。
In the form type identification method according to the second invention,
By automatically describing the structure of a format enclosed by a fine frame in a large unit called a rectangular block and easily registering the initial format, the work load on the operator at the initial registration of the format is greatly reduced.

【0013】第3の発明による帳票種類識別方法では、
矩形ブロック単位の書式テンプレートととのマッチング
において、ラインノイズの重畳により未知書式帳票の矩
形ブロックが分断されても、ブロック同士の対応関係は
未知書式の矩形ブロックの代表点が含まれる書式テンプ
レートデータのブロックが対応関係にあるとすることに
より、分断されたブロックが、書式テンプレートデータ
の同じブロックに対応づけられるようにし、そして重畳
部分の面積を用いて適合度を算出することにより、適合
度の値がラインノイズのない場合とある場合とではほと
んど同じ値になるようにして、ラインノイズの重畳に対
し、より一層安定した識別を実現する。
In the form type identification method according to the third invention,
In matching with the format template of rectangular block unit, even if the rectangular block of the unknown format form is divided due to the superposition of line noise, the correspondence between the blocks is the format template data including the representative points of the rectangular block of unknown format. By assuming that the blocks have a correspondence relationship, the divided blocks are made to correspond to the same block of the format template data, and the fitness value is calculated by using the area of the overlapping portion to calculate the fitness value. Is set to have almost the same value in the case where there is no line noise and the case where there is line noise, thereby realizing more stable discrimination against the superposition of line noise.

【0014】[0014]

【発明の実施の形態】以下、説明の簡単化のために図を
用いて本発明の実施の形態を説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings for simplification of description.

【0015】図1は、本発明の一実施の形態例を示す処
理の流れ図である。本実施の形態例は、帳票種類識別部
(図1(a))と書式初期登録部(図1(b))の2つ
からなる。
FIG. 1 is a flow chart of processing showing an embodiment of the present invention. The example of the present embodiment includes two forms, a form type identification unit (FIG. 1A) and a format initial registration unit (FIG. 1B).

【0016】帳票種類識別部(図1(a))は、未知の
書式の帳票について、まず、第1の手段1によりスキャ
ナーやファクシミリ(以下、FAX)から入力された画
像の傾きを補正し、次に、第2の手段2により入力画像
に粗くメッシュをかけ、次に、第3の手段3により閉領
域となる背景領域を抽出し、次に、第4の手段4により
背景領域の外接矩形を生成し、次に、第5の手段5によ
り重畳する外接矩形同士を統合し、次に、第6の手段6
によりそれぞれの外接矩形の大きさや幾何学的関係を調
べ並列関係にある類似矩形をグルーピングして矩形ブロ
ックを生成し、次に、第7の手段7により予め獲得して
おいた書式テンプレートデータをファイルから読み込
み、次に、第8の手段8により全ての書式テンプレート
データとの適合度を矩形ブロックを単位として算出し、
最後に適合度が高さから該当書式を決定する。
The form type identification unit (FIG. 1A) first corrects the inclination of an image input from a scanner or a facsimile (hereinafter, FAX) by the first means 1 for a form of an unknown format. Next, the second means 2 coarsely meshes the input image, then the third means 3 extracts a background area which is a closed area, and then the fourth means 4 extracts a circumscribed rectangle of the background area. And then integrate the circumscribed rectangles by the fifth means 5 and then the sixth means 6
The size and geometrical relationship of the respective circumscribing rectangles are checked to group similar rectangles having a parallel relationship to generate a rectangular block, and then the format template data previously acquired by the seventh means 7 is filed. Then, the compatibility with all the format template data is calculated by the eighth means 8 in units of rectangular blocks,
Finally, the applicable format is determined from the high degree of conformity.

【0017】一方、書式初期登録部(図1(b))は、
未記入の書式の帳票について、上記第1〜第6の手段に
よる処理を実行して矩形ブロックを生成し、得られた矩
形ブロックデータを書式テンプレートデータとして第9
の手段9によりファイルに保存する。
On the other hand, the format initial registration unit (FIG. 1B) is
With respect to the blank form, the processes of the first to sixth means are executed to generate a rectangular block, and the obtained rectangular block data is used as the form template data to form a ninth block.
It is saved in the file by means 9 of.

【0018】以下に、上記したそれぞれの処理につい
て、詳述する。
Each of the above processes will be described in detail below.

【0019】まず、帳票種類識別部(図1(a))と書
式初期登録部(図1(b))に共通な部分(第1〜第6
の手段)について説明する。
First, the portions (first to sixth) common to the form type identification unit (FIG. 1A) and the format initial registration unit (FIG. 1B).
Means) will be described.

【0020】はじめに帳票をスキャナーまたはFAXで
読み込む。この時点では、読み込み時の紙送りの不安定
さのために入力画像には多少の傾きがある。この傾きの
角度は、帳票の外枠から算出する方法や、ヒストグラム
をとって算出する方法などが既に知られており、それら
を用いればよいので、ここでは詳述しない。算出された
角度をもとに画像全体を回転させて傾きを補正する。次
に、小さな掠れや切断の影響を取り除くために、入力画
像に粗いメッシュをかける。メッシュが粗ければ粗いほ
ど線分の切断の影響は小さくなるが、本手法では背景領
域の情報を利用し書式の種類を識別するので、背景領域
が抽出される範囲でメッシュの粗さを設定しなければな
らない。
First, the form is read by a scanner or FAX. At this point, the input image has some inclination due to instability of the paper feed at the time of reading. The method of calculating the angle of inclination from the outer frame of the form, the method of calculating using a histogram, and the like are already known, and since they can be used, they will not be described in detail here. The entire image is rotated based on the calculated angle to correct the tilt. Next, a coarse mesh is applied to the input image to remove the effects of small blurring and cutting. The rougher the mesh, the less the influence of cutting line segments, but this method uses the information of the background area to identify the type of format, so set the roughness of the mesh within the range in which the background area is extracted. Must.

【0021】ここで、図2(a)はメッシュが細かすぎ
て線分の切断の影響を排除できていない例、図2(b)
はメッシュの粗さが適切であり、切断の影響を排除し、
かつ背景領域(記入枠に対応)も現れている例、図2
(c)はメッシュが粗すぎて背景領域がつぶれてしまっ
ている例を示している。メッシュの粗さは経験的に設定
しておく。このように適切な粗さのメッシュをかけるこ
とで小さな切断の影響を排除することができる。大きな
切断の影響は後述するブロック単位のマッチングで吸収
することができる。
Here, FIG. 2A shows an example in which the mesh is too fine to eliminate the influence of cutting the line segment, and FIG. 2B.
Has an appropriate mesh roughness, eliminating the effects of cutting,
An example in which the background area (corresponding to the entry frame) also appears, Fig. 2
(C) shows an example in which the mesh is too coarse and the background area is crushed. The roughness of the mesh is set empirically. In this way, the effect of small cutting can be eliminated by applying a mesh having an appropriate roughness. The influence of large cutting can be absorbed by the block-based matching described later.

【0022】次に、図2(b)のように適切な粗さのメ
ッシュかけた画像(図3(a))から閉領域となる全て
の背景領域を抽出する(図3(b))。背景領域の抽出
は、白画素の外縁を追跡することにより実現できる。次
に、抽出されたそれぞれの背景領域の外接矩形を生成す
る(図3(c))。
Next, as shown in FIG. 2 (b), all the background areas which are closed areas are extracted from the image (FIG. 3 (a)) in which the mesh having an appropriate roughness is applied (FIG. 3 (b)). The extraction of the background area can be realized by tracking the outer edge of the white pixel. Next, a circumscribed rectangle of each of the extracted background areas is generated (FIG. 3 (c)).

【0023】次に、これらの外接矩形の間で、一定の条
件を満たす重畳関係にある外接矩形を統合する。図4に
外接矩形の統合の様子を示す。この外接矩形の統合の処
理は、図4(a)のようにメッシュをかけた画像におい
て文字と枠線が接触しているために、一つの記入枠内の
背景領域が分断されて抽出されてしまった場合(図4
(b))に対処するためのものである。このような場合
には、分断された2つの背景領域の外接矩形が重畳する
関係になる(図4(c))。そこで、外接矩形が重畳関
係にある場合で、それぞれの縦方向の範囲がほぼ一致す
る場合に、外接矩形の統合を行う(図4(d))。
Next, the circumscribing rectangles having a superimposing relationship satisfying a certain condition are integrated among these circumscribing rectangles. FIG. 4 shows how the circumscribed rectangles are integrated. In this circumscribing rectangle integration processing, since the character and the frame line are in contact with each other in the meshed image as shown in FIG. 4A, the background region in one entry frame is divided and extracted. If it happens (Fig. 4
This is to deal with (b)). In such a case, the circumscribed rectangles of the two divided background areas overlap each other (FIG. 4C). Therefore, when the circumscribing rectangles have a superimposing relationship and the respective vertical ranges substantially match, the circumscribing rectangles are integrated (FIG. 4D).

【0024】次に、サイズが同じ程度で縦方向に並んで
いる(横方向の範囲がほぼ同じ)複数の外接矩形をグル
ーピングして一つのブロックにまとめる。図3(d)は
並列類似矩形をグルーピングした結果得られたブロック
の様子を示している。
Next, a plurality of circumscribing rectangles having the same size and arranged in the vertical direction (having substantially the same horizontal range) are grouped into one block. FIG. 3D shows a state of blocks obtained as a result of grouping parallel similar rectangles.

【0025】以上が、帳票種類識別部と書式初期登録部
に共通な部分(第1〜第6の手段)についての説明であ
る。以下、(1)書式初期登録部、(2)帳票種類識別
部の順番で説明する。
The above is a description of the portions (first to sixth means) common to the form type identification unit and the format initial registration unit. Hereinafter, description will be made in the order of (1) format initial registration unit and (2) form type identification unit.

【0026】(1)書式初期登録部 以上の処理を空の書式(未記入の書式)に対して適用し
た結果を図5に示す。図5(a)は空の書式の例であ
り、図5(b)は背景画像を抽出した例であり、図5
(c)はその背景画像の外接矩形の生成例であり、図5
(d)は矩形ブロックの生成例である。ここで、オペレ
ータはその矩形ブロックの生成結果を確認するととも
に、書式のID(識別番号等)を付与し、その矩形ブロ
ックデータを書式テンプレートデータとして保存する。
このファイルは1種類の書式に対して1つ作成する。
(1) Format Initial Registration Section FIG. 5 shows the result of applying the above processing to an empty format (blank format). 5A is an example of an empty format, and FIG. 5B is an example of extracting a background image.
FIG. 5C is an example of generating a circumscribed rectangle of the background image.
(D) is an example of generation of a rectangular block. Here, the operator confirms the generation result of the rectangular block, assigns the ID (identification number, etc.) of the format, and saves the rectangular block data as format template data.
Create one for each format.

【0027】(2)帳票種類識別部 帳票種類識別部では、入力された未知書式の帳票画像の
矩形ブロックと初期登録された書式テンプレートデータ
を矩形ブロック単位でマッチングを取る。図6にその様
子を示す。すなわち、帳票種類識別部では、未知の書式
の帳票の入力画像から外接矩形を抽出して得られた矩形
ブロックデータと、既に空の書式の帳票の入力画像によ
り初期登録されている書式テンプレートデータとの間の
適合度を矩形ブロック単位で算出して、最も適合度が高
い書式を該当書式とする。適合度の算出方法としては、
ブロックの幾何学的な相対関係を記述して論理的なマッ
チングを行う方法や、ブロックの形状、大きさを比較す
る方法等、様々な方法で実現できるが、ここでは、ブロ
ックの重畳部分の面積を用いた方法について述べる。
(2) Form Type Identification Unit The form type identification unit matches the rectangular block of the input unknown form document image with the initially registered format template data in units of rectangular blocks. This is shown in FIG. That is, in the form type identification unit, the rectangular block data obtained by extracting the circumscribing rectangle from the input image of the form in the unknown format, and the format template data initially registered by the input image of the form in the empty format The matching degree between the two is calculated in units of rectangular blocks, and the format with the highest matching degree is set as the relevant format. As a method of calculating the goodness of fit,
It can be realized by various methods such as a method of describing the geometrical relative relationship of blocks to perform logical matching, a method of comparing the shapes and sizes of blocks, but here, the area of the overlapping part of blocks is The method using is described.

【0028】まず、入力された未知の書式の帳票画像か
ら得られた矩形ブロックと、書式テンプレートデータの
矩形ブロックとの対応関係を調べる。図7にその矩形ブ
ロックの対応付けの様子を示す。その対応関係は、基準
点(左上座標等)に対してそれぞれを重ね合わせ、未知
の書式の矩形ブロックの代表点(代表点は矩形ブロック
を代表する1つの点であり、重心などを用いれば良い)
が含まれる書式テンプレートデータの矩形ブロックが対
応関係にあるとする。(ここで、ブロック間の対応は
(未知書式→書式テンプレート)になっていることに注
意)。
First, the correspondence between the rectangular block obtained from the input form image of the unknown format and the rectangular block of the format template data is examined. FIG. 7 shows how the rectangular blocks are associated. The correspondence is such that the reference points (upper left coordinates, etc.) are overlapped with each other, and a representative point of a rectangular block in an unknown format (a representative point is one point representing the rectangular block, and the center of gravity or the like may be used. )
It is assumed that the rectangular blocks of the format template data including the are in correspondence. (Here, note that the correspondence between blocks is (unknown format → format template)).

【0029】それぞれのブロックの対応がとれたら、図
8に示すように、以下の面積を算出する。
When the correspondence of each block is obtained, the following areas are calculated as shown in FIG.

【0030】Su:未知書式中のブロック面積の総和、 St:書式テンプレートデータ中のブロック面積の総
和、 So:対応するブロックの重畳する部分の面積の総和。
Su: total sum of block areas in unknown format, St: total sum of block areas in format template data, So: total sum of area of corresponding portions where the corresponding blocks overlap.

【0031】適合度はこれらの面積の関数として定義さ
れる(適合度 F=F(Su、St、So))。具体的
な例としては、F=(So/Su)*(So/St)等
を用いて適合度を算出できる。
The goodness of fit is defined as a function of these areas (goodness of fit F = F (Su, St, So)). As a specific example, the goodness of fit can be calculated using F = (So / Su) * (So / St) or the like.

【0032】ところで、FAXやスキャナーから入力す
る際の入力方向が0、90、180、270度の4方向
にずれてしまうことが考えられるので、適合度の算出の
際、ブロックデータをそれぞれ4つの方向に回転させて
適合度を算出し、最も適合度の高い方向を採用すれもの
とすればよい。
By the way, since it is possible that the input direction when inputting from a FAX or a scanner is deviated to four directions of 0, 90, 180, and 270 degrees, when calculating the compatibility, each block data is divided into four directions. It suffices to rotate the direction to calculate the fitness and adopt the direction with the highest fitness.

【0033】さらに、ノイズの重畳や、掠れ等の影響に
より基準点(上記説明では左上の点)が安定でなくなる
場合が考えられる。これに対処するために、基準点は左
上、左下、右上、右下の4点についてマッチングを行
い、最も適合度の高いものを採用すればよい。
Furthermore, it is conceivable that the reference point (the upper left point in the above description) may become unstable due to the effects of noise superimposition, blurring, and the like. In order to deal with this, the reference points may be matched with respect to the four points of upper left, lower left, upper right and lower right, and the one having the highest degree of matching may be adopted.

【0034】以上が帳票種類識別処理である。The above is the form type identification process.

【0035】最後に、本発明の帳票種類識別方法がライ
ンノイズの重畳および線分の切断に対して安定である理
由について述べる。
Finally, the reason why the form type identification method of the present invention is stable against superposition of line noise and cutting of line segments will be described.

【0036】まず、ラインノイズの重畳に対して安定で
ある理由について図9を用いて簡単に説明する。図9
(a)が書式テンプレートデータの生成、図9(b)が
ラインノイズのない場合の矩形ブロックの生成、図9
(c)がラインノイズが重畳した場合の矩形ブロックの
生成である。図9(c)では、ラインノイズの重畳によ
り矩形ブロックが分断されているが、ブロック同士の対
応関係は、未知書式のブロックの代表点が含まれる書式
テンプレートデータのブロックが対応関係にあるとする
ので、分断されたブロックは、書式テンプレートデータ
の同じブロックに対応づけられることになる。そして重
畳部分の面積を用いて算出した適合度の値は、ラインノ
イズのない場合とある場合とではほとんど同じ値にな
る。これが本方法がラインノイズの重畳に対して安定な
理由である。
First, the reason why the line noise is stable against superposition will be briefly described with reference to FIG. FIG.
9A shows generation of format template data, FIG. 9B shows generation of a rectangular block in the absence of line noise, and FIG.
(C) is generation of a rectangular block when line noise is superimposed. In FIG. 9C, the rectangular blocks are divided by the superposition of line noise, but the correspondence between the blocks is assumed to be the block of the format template data including the representative point of the block of the unknown format. Therefore, the divided blocks are associated with the same block of the format template data. The value of the goodness of fit calculated using the area of the overlapping portion is almost the same in the case where there is no line noise and the case where there is no line noise. This is the reason why the method is stable against the superposition of line noise.

【0037】また、線分の切断に関して、小さいな切断
については粗くメッシュをかけることにより解消され
る。さらに、本方法では、細かな書式の構造は記述せ
ず、ブロックという大きな単位でおおまかなマッチング
を行っているため、局所的な線分の破れの影響は全体に
波及しにくい。従って、線分の掠れや切断に対しても安
定である。
Regarding the cutting of the line segment, the small cutting can be solved by coarsely meshing. Furthermore, in this method, since the structure of a detailed format is not described and rough matching is performed in a large unit called a block, the influence of local line segment breakage is unlikely to spread to the whole. Therefore, it is stable against blurring and cutting of line segments.

【0038】[0038]

【発明の効果】以上の説明で明らかなように、本発明に
よれば、帳票などの枠線で囲まれた書式の種類を、簡易
な初期書式登録によって、ラインノイズが重畳している
場合や線分に掠れや切断があるような場合において、安
定的に識別することができるようになり、書式初期登録
時および帳票処理時のオペレータの作業負担を大幅に軽
減することが可能になる。
As is apparent from the above description, according to the present invention, the type of a format such as a form surrounded by a frame line is overlapped with line noise by a simple initial format registration. When the line segment is blurred or cut, it is possible to stably identify the line segment, and it is possible to significantly reduce the work load on the operator at the time of initial registration of the form and the processing of the form.

【図面の簡単な説明】[Brief description of drawings]

【図1】(a),(b)は、本発明の実施の形態例を示
す処理の流れ図である。
1A and 1B are flow charts of processing showing an embodiment of the present invention.

【図2】(a),(b),(c)は、上記実施の形態例
におけるメッシュをかけた画像の様子を示す図である。
2A, 2B, and 2C are diagrams showing a state of an image to which a mesh is applied in the above-described embodiment.

【図3】(a),(b),(c),(d)は、上記実施
の形態例における背景領域抽出、外接矩形生成、矩形ブ
ロック生成の様子を示す図である。
3 (a), (b), (c), and (d) are diagrams showing a background area extraction, a circumscribed rectangle generation, and a rectangular block generation in the above-described embodiment.

【図4】(a),(b),(c),(d)は、上記実施
の形態例における重畳した外接矩形の統合の様子を示す
図である。
4 (a), (b), (c), and (d) are diagrams showing a state in which overlapping circumscribed rectangles are integrated in the above-described embodiment.

【図5】(a),(b),(c),(d)は、上記実施
の形態例の書式初期登録時における空の書式におけるブ
ロックデータ生成までの様子を示す図である。
5 (a), (b), (c), and (d) are diagrams showing a state up to block data generation in an empty format at the time of format initial registration in the above-described embodiment.

【図6】上記実施の形態例の帳票種類識別時におけるブ
ロック単位のマッチングの様子を示す図である。
FIG. 6 is a diagram showing a state of matching in block units at the time of identifying a form type according to the above-described embodiment.

【図7】上記実施の形態例の帳票種類識別時におけるブ
ロックの対応付けの様子を示す図である。
FIG. 7 is a diagram showing how blocks are associated with each other when the form type is identified in the above embodiment.

【図8】上記実施の形態例の帳票種類識別時における適
合度算出時の面積の算出の様子を示す図である。
FIG. 8 is a diagram showing how the area is calculated when the degree of conformance is calculated when the form type is identified in the above embodiment.

【図9】上記実施の形態例の帳票種類識別時におけるラ
インノイズが重畳した場合の様子を示す図である。
FIG. 9 is a diagram showing a state in which line noise is superimposed at the time of identifying a form type according to the above embodiment.

【符号の説明】[Explanation of symbols]

1…入力画像の傾きを補正する第1の手段 2…粗いメッシュをかける第2の手段 3…背景領域を抽出する第3の手段 4…外接矩形を生成する第4の手段 5…重畳する外接矩形を統合する第5の手段 6…外接矩形をグリーピングし、ブロックを生成する第
6の手段 7…帳票特徴データファイルを読み込む第7の手段 8…適合度を算出する第8の手段 9…矩形ブロックデータを書式テンプレートデータとし
てファイルに保存する第9の手段
DESCRIPTION OF SYMBOLS 1 ... 1st means which corrects the inclination of an input image 2 ... 2nd means which applies a coarse mesh 3 ... 3rd means which extracts a background area 4 ... 4th means which produces | generates a circumscribed rectangle 5 ... Superimposed circumscribing Fifth means for integrating rectangles 6 ... Sixth means for grouping circumscribed rectangles to generate blocks 7 ... Seventh means for reading a form feature data file 8 ... Eighth means for calculating conformance 9 ... Ninth means for saving rectangular block data in a file as format template data

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 イメージ入力手段により入力された未知
書式の帳票画像から該入力された帳票の書式の種類を識
別する方法であって、 前記入力された未知書式の帳票画像に粗くメッシュをか
け、該メッシュをかけた画像から閉領域となる全ての背
景領域を抽出し、該抽出された各背景領域の外接矩形を
生成し、該生成された外接矩形の大きさと幾何学的な相
対関係の一方または双方を調べ類似した外接矩形をグル
ーピングして矩形ブロックを生成する未知書式の矩形ブ
ロック生成段階と、 前記生成された矩形ブロックデータを単位として、予め
生成し保存しておいた書式テンプレートデータとの適合
度を算出し、適合度の高い場合に該当書式であると判定
する書式判定段階と、 を有することを特徴とする帳票種類識別方法。
1. A method of identifying the type of format of the input form from the form image of the unknown format input by the image input means, wherein the input form image of the unknown format is roughly meshed. All background areas that are closed areas are extracted from the image on which the mesh is applied, and a circumscribed rectangle of each of the extracted background areas is generated. One of the size of the generated circumscribed rectangle and a geometrical relative relationship is generated. Alternatively, a rectangular block generation step of unknown format in which both are examined to group similar circumscribed rectangles to generate a rectangular block, and the format template data generated and saved in advance with the generated rectangular block data as a unit A form type identifying method comprising: a format determination step of calculating a goodness of fit and determining that the format is a relevant format when the goodness of fit is high.
【請求項2】 イメージ入力手段により未記入書式の帳
票画像を入力する段階と、 前記入力された未記入書式の帳票画像に粗くメッシュを
かけ、該メッシュをかけた画像から閉領域となる全ての
背景領域を抽出し、該抽出された各背景領域の外接矩形
を生成し、該生成された外接矩形の大きさと幾何学的な
相対関係の一方または双方を調べ類似した外接矩形をグ
ルーピングして矩形ブロックを生成する未記入書式の矩
形ブロック生成段階と、 前記生成された矩形ブロック単位に当該書式の特徴を記
述した書式テンプレートデータを生成し保存する書式初
期登録段階と、 を有することを特徴とする請求項1記載の帳票種類識別
方法。
2. A step of inputting a form image in a blank form by an image inputting means, and a step of coarsely meshing the input form image of the blank form, and forming all closed areas from the meshed image. A background area is extracted, a circumscribed rectangle of each of the extracted background areas is generated, and one or both of the size of the generated circumscribed rectangle and the geometrical relative relationship is examined, and similar circumscribed rectangles are grouped into rectangles. And a step of generating a rectangular block of an unfilled format for generating a block, and a step of initial registration of a format for generating and storing format template data describing the characteristics of the format in units of the generated rectangular blocks. The form type identification method according to claim 1.
【請求項3】 書式判定段階は、未知書式の矩形ブロッ
クデータと書式テンプレートデータを空間的に重ね合わ
せ、該未知書式のある矩形ブロックの代表点が、該書式
テンプレートデータ中のある矩形ブロックの範囲内にあ
る場合、それらの矩形ブロック同士が対応関係にあると
し、該対応関係にある全ての矩形ブロック同士の重畳す
る面積を求め、該求めた面積の値を用いて前記未知書式
の矩形ブロックデータと前記書式テンプレートデータと
の適合度を算出する適合度算出過程を有することを特徴
とする請求項1または請求項2記載の帳票種類識別方
法。
3. The format determining step spatially superimposes rectangular block data of unknown format and format template data, and a representative point of the rectangular block having the unknown format is a range of a rectangular block in the format template data. If the rectangular blocks correspond to each other, the rectangular block data of the unknown format is obtained by calculating the overlapping area of all the rectangular blocks having the corresponding relationship and using the value of the calculated area. 3. The form type identification method according to claim 1 or 2, further comprising a matching degree calculating process for calculating a matching degree between the format template data and the format template data.
JP7225649A 1995-09-04 1995-09-04 Slip type identification method Pending JPH0973516A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7225649A JPH0973516A (en) 1995-09-04 1995-09-04 Slip type identification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7225649A JPH0973516A (en) 1995-09-04 1995-09-04 Slip type identification method

Publications (1)

Publication Number Publication Date
JPH0973516A true JPH0973516A (en) 1997-03-18

Family

ID=16832613

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7225649A Pending JPH0973516A (en) 1995-09-04 1995-09-04 Slip type identification method

Country Status (1)

Country Link
JP (1) JPH0973516A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136544A (en) * 2011-11-30 2013-06-05 夏普株式会社 Image judging device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136544A (en) * 2011-11-30 2013-06-05 夏普株式会社 Image judging device
JP2013114678A (en) * 2011-11-30 2013-06-10 Sharp Corp Image determination device and program

Similar Documents

Publication Publication Date Title
EP0738987B1 (en) Processing machine readable forms
US5721940A (en) Form identification and processing system using hierarchical form profiles
JP2930612B2 (en) Image forming device
JP2812982B2 (en) Table recognition method
GB2244886A (en) Apparatus for extracting a text region in a document image
JP6620038B2 (en) Image processing apparatus and image processing program
EP1005220B1 (en) Image processing method and apparatus
US5649028A (en) Connect-the-dots drawing production device
JPH0973516A (en) Slip type identification method
JP2007174615A (en) Image processor, image processing method, program, storage medium
JP4281236B2 (en) Image recognition apparatus, image recognition method, and computer-readable recording medium storing image recognition program
JP2000187705A (en) Document reader, document reading method and storage medium
JP2021034772A (en) Image processing device, image processing method, program for image processing device, and document management system
JP2945601B2 (en) Interactive drawing input method
JPH1166225A (en) Device and method for table information extraction and record medium
JPH03160582A (en) Method for separating ruled line and character in document picture data
JPH08321942A (en) Image processing unit and method for linking image of split pattern
JPH05242297A (en) Character segmenting method
JP2000182056A (en) Picture processor
JP4079229B2 (en) Conduit image processing method and apparatus
JP2004240500A (en) Device and program for processing image, and storing medium
JPS6199461A (en) Processing method of image data
JPH0735509A (en) Postage stamp detecting device
JPH05274472A (en) Image recognizing device
JPH08286357A (en) Magnification angle measuring method and device thereof