JPH1040312A - Device for preparing slip picture - Google Patents

Device for preparing slip picture

Info

Publication number
JPH1040312A
JPH1040312A JP8190436A JP19043696A JPH1040312A JP H1040312 A JPH1040312 A JP H1040312A JP 8190436 A JP8190436 A JP 8190436A JP 19043696 A JP19043696 A JP 19043696A JP H1040312 A JPH1040312 A JP H1040312A
Authority
JP
Japan
Prior art keywords
image
rectangle
images
alignment
filled
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.)
Granted
Application number
JP8190436A
Other languages
Japanese (ja)
Other versions
JP3378439B2 (en
Inventor
Hideaki Yamagata
秀明 山形
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP19043696A priority Critical patent/JP3378439B2/en
Publication of JPH1040312A publication Critical patent/JPH1040312A/en
Application granted granted Critical
Publication of JP3378439B2 publication Critical patent/JP3378439B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

PROBLEM TO BE SOLVED: To automatically prepare an image of a slip not filled in yet from a filled slip. SOLUTION: An image of a plurality of filled slips in the same format are inputted (100), those input images are positioned (101), and the AND image is prepared (102). A rectangle surrounding black run linking components is extracted from each image (103), the rectangle of the input image is made to be correlated with the rectangle of the AND image, and an unnecessary image area in the AND image is specified by comparison between the mutual corresponding rectangles, and deleted (104). The AND image after the unnecessary image is deleted is outputted as an unfilled slip image (105).

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する分野】本発明は、画像処理に係り、特
に、記入済み帳票より未記入の帳票の画像を自動的に作
成する技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to image processing, and more particularly to a technique for automatically creating an image of an unfilled form from a completed form.

【0002】[0002]

【従来の技術】オフィスには多くの帳票類があり、時に
記入済み帳票と同じフォーマットの帳票を作成する必要
に迫られる場合がある。しかし、記入済みの帳票から未
記入の帳票を自動的に作成する手段は存在しなかったた
め、それらの帳票が電子化されていないと、フードプロ
セッサで同じフォーマットの帳票を再度作成しなければ
ならないことがあった。帳票のフォーマットが複雑であ
ると、その作業量は非常に大きい。そのような不都合を
回避するために、記入済みの帳票から未記入状態の帳票
を自動的に作成する手段の実現が望まれる。
2. Description of the Related Art There are many forms in an office, and sometimes it is necessary to create a form in the same format as a completed form. However, there was no means to automatically create an unfilled form from a completed form, so if those forms were not digitized, the food processor would have to create a form in the same format again. was there. If the format of the form is complicated, the amount of work is very large. In order to avoid such inconveniences, it is desired to realize a means for automatically creating an unfilled form from a completed form.

【0003】なお、本発明に関連する画像の位置合わせ
に関しては次のような従来技術が知られている。 (a)画像上の代表点において、少しずつ画像をずらし
てパターンマッチングを行い、類似度の関数を重み係数
として用いて位置ずれを検出する方法(特開昭63−3
388号)。 (b)X方向Y方向の積算射影が最もよく一致するずれ
量を算出し、それを入力画像間の画像のずれ量とする方
法(特開平2−54495号)。 (c)マウス又は所定マークを形状認識により抽出する
ことにより、画像のずれを検出して補正する方法(特開
平4−261259号)。 (d)ウインドウ領域内でテンプレート画像を動かしな
がら、最もよくマッチングのとれた位置を探し、それを
真の対応点として画像の位置合わせを行う方法(特開平
4−336677号)。
[0003] The following prior arts are known for image registration related to the present invention. (A) At a representative point on an image, pattern matching is performed by shifting the image little by little, and a position shift is detected by using a function of similarity as a weighting coefficient (Japanese Patent Application Laid-Open No. Sho 63-3).
388). (B) A method of calculating a shift amount at which the integrated projections in the X direction and the Y direction best match, and using the calculated shift amount as an image shift amount between input images (Japanese Patent Laid-Open No. 2-54495). (C) A method of detecting and correcting an image shift by extracting a mouse or a predetermined mark by shape recognition (Japanese Patent Laid-Open No. Hei 4-261259). (D) A method of searching for the best matching position while moving the template image in the window area and performing image positioning using the position as a true corresponding point (Japanese Patent Laid-Open No. 4-336677).

【0004】[0004]

【発明が解決しようとする課題】本発明の目的は、記入
済みの帳票から未記入状態の帳票の画像を自動的に作成
する装置を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide an apparatus for automatically creating an image of an unfilled form from a completed form.

【0005】[0005]

【課題を解決するための手段】請求項1乃至12の各項
の発明によれば、記入済みの帳票から未記入の帳票の画
像を作成する帳票画像作成装置が提供される。
According to the first to twelfth aspects of the present invention, there is provided a form image creating apparatus for creating an image of an unfilled form from a completed form.

【0006】請求項1の発明による帳票画像作成装置
は、複数の同一形式の記入済みの帳票の画像を入力する
手段と、入力された複数の記入済み帳票画像の位置合わ
せをする手段と、位置合わせ後の複数の記入済み帳票画
像のAND画像を作成する手段とを有する。このAND
画像は、複数の記入済み帳票画像に共通する画像、つま
り帳票に予め印刷されるような固定情報の画像が大部分
であり、場合によっては、そのまま未記入状態の帳票の
画像として利用することも可能である。しかし、このA
ND画像には、未記入状態の帳票には本来存在しない不
要画像が若干含まれることが多い。請求項2乃至7の各
項の発明による帳票画像作成装置は、AND画像から、
そのような不要画像を削除することによって、より精度
のよい未記入帳票画像を作成するように構成される。
According to the first aspect of the present invention, there is provided a form image creating apparatus for inputting a plurality of filled-in form images in the same format, aligning the entered plurality of filled-out form images, Means for creating an AND image of the plurality of completed form images after the combination. This AND
Most of the images are images common to a plurality of filled-out form images, that is, images of fixed information which are pre-printed on the form, and in some cases, may be used as is as an image of an unfilled form as it is. It is possible. But this A
The ND image often includes some unnecessary images that do not originally exist in the blank form. The form image creation device according to the invention of each of claims 2 to 7 is configured to convert an AND image
By deleting such unnecessary images, a more accurate blank form image is created.

【0007】すなわち、請求項2の発明による帳票画像
作成装置は、位置合わせ後の記入済み帳票画像とAND
画像を比較することにより、AND画像の削除すべき不
要部分を特定し、その不要部分をAND画像より削除す
る手段をさらに有する。
In other words, the form image creating apparatus according to the second aspect of the present invention is capable of performing
There is further provided a means for specifying an unnecessary portion of the AND image to be deleted by comparing the images, and deleting the unnecessary portion from the AND image.

【0008】請求項3の発明による帳票画像作成装置
は、位置合わせ後の複数の記入済み帳票画像及びAND
画像より黒ラン連結成分を囲む矩形を抽出する手段と、
位置合わせ後の記入済み帳票画像より抽出された矩形と
AND画像より抽出された矩形との対応付けをし、対応
した矩形相互の関係からAND画像の削除すべき不要部
分を特定し、その不要部分をAND画像より削除する手
段とをさらに有する。
According to a third aspect of the present invention, there is provided a form image creating apparatus comprising: a plurality of filled form images after alignment;
Means for extracting a rectangle surrounding the black run connected component from the image;
A rectangle extracted from the filled-out form image after the alignment is associated with a rectangle extracted from the AND image, and an unnecessary portion of the AND image to be deleted is specified from a relationship between the corresponding rectangles. From the AND image.

【0009】請求項4の発明による票画像作成装置は、
位置合わせ後の複数の記入済み帳票画像及びAND画像
より黒ラン連結成分を囲む矩形を抽出する手段と、位置
合わせ後の記入済み帳票画像より抽出された矩形と、そ
れに包含される位置関係にあるAND画像から抽出され
た矩形とを対応付け、対応した矩形相互の関係からAN
D画像の削除すべき不要部分を特定し、その不要部分を
AND画像より削除する手段とをさらに有する。
A vote image creating apparatus according to the invention of claim 4 is
Means for extracting a rectangle surrounding the black run connected component from the plurality of filled-out form images and the AND image after the alignment, and a rectangle extracted from the filled-out form image after the alignment, and a positional relationship included therein. The rectangles extracted from the AND image are associated with each other.
Means for identifying an unnecessary portion of the D image to be deleted and deleting the unnecessary portion from the AND image.

【0010】請求項5の発明による帳票像作成装置は、
位置合わせ後の複数の記入済み帳票画像及びAND画像
より黒ラン連結成分を囲む矩形を抽出する手段と、位置
合わせ後の記入済み帳票画像より抽出された矩形とAN
D画像から抽出された矩形との対応付けをし、対応した
矩形相互の大きさを比較することによりAND画像の削
除すべき不要部分を特定し、その不要部分をAND画像
より削除する手段とをさらに有する。
According to a fifth aspect of the present invention, there is provided a form image creating apparatus.
Means for extracting a rectangle surrounding the black run connected component from the plurality of filled-out form images and the AND image after the alignment, and a rectangle extracted from the filled-out form image after the alignment and the AND
Means for associating with the rectangles extracted from the D image, identifying the unnecessary portion of the AND image to be deleted by comparing the sizes of the corresponding rectangles, and deleting the unnecessary portion from the AND image. Have more.

【0011】請求項6の発明による帳票画像作成装置
は、位置合わせ後の複数の記入済み帳票画像及びAND
画像より黒ラン連結成分を囲む矩形を抽出する手段と、
位置合わせ後の記入済み帳票画像より抽出された矩形と
AND画像から抽出された矩形との対応付けをし、位置
合わせ後の記入済み帳票画像より抽出された各矩形の黒
画素数とそれに対応したAND画像より抽出された矩形
の黒画素数とを比較することによりAND画像の削除す
べき不要部分を特定し、その不要部分をAND画像より
削除する手段とをさらに有する。
According to a sixth aspect of the present invention, there is provided a form image creating apparatus, comprising: a plurality of filled form images after alignment;
Means for extracting a rectangle surrounding the black run connected component from the image;
The rectangle extracted from the filled-in form image after the alignment is associated with the rectangle extracted from the AND image, and the number of black pixels of each rectangle extracted from the filled-in form image after the alignment and the corresponding number of black pixels Means for identifying an unnecessary portion of the AND image to be deleted by comparing the number of rectangular black pixels extracted from the AND image and deleting the unnecessary portion from the AND image.

【0012】請求項7の発明による帳票画像作成装置
は、位置合わせ後の複数の記入済み帳票画像及びAND
画像より黒ラン連結成分を囲む矩形を抽出する手段と、
位置合わせ後の記入済み帳票画像より抽出された矩形と
AND画像から抽出された矩形との対応付けをし、位置
合わせ後の記入済み帳票画像より抽出された各矩形に対
応したAND画像より抽出された矩形の個数によって、
AND画像の削除すべき不要部分を特定し、その不要部
分をAND画像より削除する手段とをさらに有する。
According to a seventh aspect of the present invention, there is provided a form image creating apparatus, comprising: a plurality of filled form images after alignment;
Means for extracting a rectangle surrounding the black run connected component from the image;
The rectangle extracted from the filled-in form image after the alignment is associated with the rectangle extracted from the AND image, and extracted from the AND image corresponding to each rectangle extracted from the filled-in form image after the alignment. Depending on the number of rectangles
Means for identifying an unnecessary portion of the AND image to be deleted and deleting the unnecessary portion from the AND image.

【0013】一般的に、帳票に予め印刷される文字等
(削除してはいけない画像)は、枠線に近い位置に配置
される。このことに着目して、請求項11の発明による
帳票画像装置は、位置合わせ後の記入済み帳票画像上の
罫線若しくは枠線に相当する線分を抽出する手段をさら
に有し、不要部分を削除する手段は、位置合わせ後の記
入済み帳票画像より抽出された矩形の、抽出された線分
からの距離に応じて、当該矩形に関連する部分を削除す
べきか判断するための閾値を調整する。
In general, characters and the like (images that must not be deleted) to be printed on a form in advance are arranged at positions near the frame lines. Paying attention to this, the form image apparatus according to the invention of claim 11 further has means for extracting a line segment corresponding to a ruled line or a frame line on the filled-in form image after the alignment, and deletes unnecessary portions. The means for adjusting adjusts a threshold value for determining whether to delete a portion related to the rectangle extracted from the filled-out form image after the alignment, from the extracted line segment, in accordance with the distance.

【0014】また、未記入の帳票には存在しないはずの
画像は、大きな矩形が抽出される場合が多い。このこと
に着目し、請求項12による帳票画像作成装置において
は、不要部分を削除する手段は、位置合わせ後の記入済
み帳票画像より抽出された矩形の大きさに応じて、当該
矩形に関連する部分を削除すべきか判断するための閾値
を調整する。
In addition, a large rectangle is often extracted from an image that should not exist in a blank form. Focusing on this, in the form image creating apparatus according to the twelfth aspect, the means for deleting the unnecessary part is related to the rectangle according to the size of the rectangle extracted from the filled-in form image after the alignment. Adjust the threshold for determining whether to delete the part.

【0015】請求項2乃至7の各項の発明による帳票画
像作成装置によれば、不要画像を削除したAND画像が
得られ、これは未記入状態の帳票の画像として十分な品
質を持っている。しかし、AND画像のベースになって
いる記入済み帳票画像中に文字等の「かすれ」や「欠
け」があると、それがAND画像にも現れてしまう。
According to the form image creating apparatus according to the second to seventh aspects of the present invention, an AND image from which unnecessary images have been deleted can be obtained, which has a sufficient quality as an image of an unfilled form. . However, if there is a "blurred" or "missing" of a character or the like in the filled-out form image serving as the base of the AND image, it also appears in the AND image.

【0016】このような「かすれ」や「欠け」のない、
より高品質の未記入帳票画像を得るため、請求項8の発
明による帳票画像作成装置は、不要部分の削除後のAN
D画像に対し、位置合わせ後の記入済み帳票画像を参照
して画像補正を行う手段をさらに有する。請求項9の発
明によれば、この画像補正の手段は、AND画像中の削
除されなかった部分の画像を、位置合わせ後の複数の記
入済み帳票画像中の対応部分のOR画像で置き換えるこ
とにより画像補正を行う。請求項10の発明によれば、
画像補正の手段は、AND画像中の削除されなかった部
分の画像を、位置合わせ後の複数の記入済み帳票画像の
対応部分の画像を平均化した画像で置き換えることによ
り画像補正を行う。
There are no such "faints" or "chips"
In order to obtain a higher quality blank form image, the form image creating apparatus according to the invention of claim 8 uses the AN after deleting unnecessary portions.
The image processing apparatus further includes means for performing image correction on the D image with reference to the filled-out form image after the alignment. According to the ninth aspect of the present invention, the image correcting means replaces the image of the part which has not been deleted in the AND image with the OR image of the corresponding part in the plurality of filled-out form images after the alignment. Perform image correction. According to the tenth aspect,
The image correction means performs the image correction by replacing the image of the portion that has not been deleted in the AND image with an image obtained by averaging the images of the corresponding portions of the plurality of filled-out form images after the alignment.

【0017】[0017]

【発明の実施の形態】以下、図面を参照し、本発明の実
施例を説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0018】[実施例1]本実施例の装置構成は図1の
ように表すことができる。図2は本実施例の処理フロー
を示す。図3及び図4は処理内容を説明するための図で
ある。以下、これら各図を適宜参照して本実施例を説明
する。なお、図2の処理フローでは、分かりやすいよう
にAND画像バッファ107を分けて示したが、これら
は同じものである。これは後述の他の実施例でも同様で
ある。
[Embodiment 1] The apparatus configuration of this embodiment can be represented as shown in FIG. FIG. 2 shows a processing flow of the present embodiment. 3 and 4 are diagrams for explaining the processing contents. Hereinafter, the present embodiment will be described with reference to these drawings as appropriate. In the processing flow of FIG. 2, the AND image buffer 107 is shown separately for easy understanding, but these are the same. This is the same in other embodiments described later.

【0019】図1の画像入力部100において、スキャ
ナやファクス等の画像入力機器を用い、複数の同じ形式
の記入済み帳票の画像を入力し、入力画像バッファに格
納する(図2のステップ110)。画像の位置合わせ部
101において、例えば前記従来技術のような手法を用
いて、入力画像中の1枚の画像を基準として入力画像同
士の位置合わせを行い、基準とした入力画像以外の入力
画像を、基準とした入力画像と位置が合うように画像変
換し、それらの変換後の画像及び基準とした入力画像を
入力画像バッファ106に格納する(図2のステップ1
11)。以下、特に断らない限り、入力画像といえば、
この位置合わせ処理後の入力画像のことである。
The image input unit 100 shown in FIG. 1 uses a plurality of image input devices, such as a scanner and a facsimile, to input a plurality of filled-out forms in the same format and stores them in an input image buffer (step 110 in FIG. 2). . In the image registration unit 101, for example, by using a method such as the above-described conventional technology, the input images are aligned with respect to one image in the input image as a reference, and input images other than the reference input image are determined. , And converts the converted image and the reference input image into the input image buffer 106 (step 1 in FIG. 2).
11). Hereinafter, unless otherwise specified, the input image is:
This is the input image after the alignment processing.

【0020】AND画像作成部102において、入力画
像バッファ106内の複数の入力画像に対して画素毎に
AND(論理積)演算を施し、得られた結果画像(AN
D画像)をAND画像バッファ107に格納する(図2
のステップ112)。具体的には、AND画像上の各画
素を、全ての入力画像上の対応画素が黒画素ならば、黒
画素とし、少なくとも1つの入力画像上の対応画素が白
画素ならば、白画素とする。次に、矩形抽出部103に
おいて、全ての入力画像及びそのAND画像に対して、
黒ランの連結成分を抽出し、連結成分を囲む矩形の座標
(例えば対向する2コーナーの座標)を矩形座標バッフ
ァ108に格納する(図2のステップ113)。
The AND image creating unit 102 performs an AND operation on a plurality of input images in the input image buffer 106 for each pixel, and obtains an obtained result image (AN
D image) is stored in the AND image buffer 107 (FIG. 2).
Step 112). Specifically, each pixel on the AND image is a black pixel if the corresponding pixels on all input images are black pixels, and a white pixel if the corresponding pixels on at least one input image are white pixels. . Next, in the rectangle extracting unit 103, for all input images and their AND images,
The connected components of the black run are extracted, and the coordinates of the rectangle surrounding the connected components (for example, the coordinates of two opposing corners) are stored in the rectangular coordinate buffer 108 (step 113 in FIG. 2).

【0021】上に述べたAND画像の作成及び矩形抽出
の例が図3に模式的に示されている。図3において、1
30と131は記入済み帳票の入力画像(位置合わせ
後)である。ここでは入力画像は2枚であるが、それは
一例であって、3枚以上でもよいことは勿論である。1
32は入力画像130,131のANDをとることによ
り得られるAND画像である。140,141及び14
2はそれぞれ入力画像130,131及びAND画像1
32に、それより抽出された矩形の領域を矩形枠として
重ねて示したものである。
FIG. 3 schematically shows an example of the above-mentioned creation of an AND image and extraction of a rectangle. In FIG. 3, 1
Reference numerals 30 and 131 denote input images of the completed form (after position adjustment). Here, the number of input images is two, but this is merely an example, and it goes without saying that three or more input images may be used. 1
An AND image 32 is obtained by ANDing the input images 130 and 131. 140, 141 and 14
2 are input images 130 and 131 and AND image 1 respectively
32, a rectangular region extracted therefrom is superimposed as a rectangular frame.

【0022】このAND画像132の例から理解される
ように、この段階のAND画像でも予め帳票に印刷され
た文字等の固定画像以外の記入情報の大半は除去されて
いるので、場合によっては、このAND画像を未記入の
帳票の画像として利用することも可能である。しかしな
がら、AND合成の段階ではある程度の不要画像の残存
は避けられないことが多いため、その不要画像の除去処
理を行うのが実際的である。
As can be understood from the example of the AND image 132, most of the entry information other than the fixed image such as the character or the like previously printed on the form has been removed from the AND image at this stage. This AND image can be used as an image of a blank form. However, it is often unavoidable that a certain amount of unnecessary image remains at the stage of AND composition, and it is practical to remove the unnecessary image.

【0023】図1において、不要画像削除部103は、
矩形座標バッファ108に保存された矩形座標を参照
し、AND画像バッファ107内のAND画像上の不要
と判断される矩形領域の画像を削除する(矩形領域内の
全画素を白画素にする)処理を行う。図2のステップ1
14〜121の処理ループが、この不要画像削除処理を
行う部分である。
In FIG. 1, the unnecessary image deleting unit 103
A process of referring to the rectangular coordinates stored in the rectangular coordinate buffer 108 and deleting an image of a rectangular area determined to be unnecessary on the AND image in the AND image buffer 107 (making all pixels in the rectangular area white pixels) I do. Step 1 of FIG.
Processing loops 14 to 121 are parts for performing the unnecessary image deletion processing.

【0024】すなわち、まず、入力画像バッファ106
に保存されている複数の入力画像(位置合わせ後)から
1枚の入力画像を選び(ステップ114)、その入力画
像より抽出された1つの矩形を矩形Aとして選び(ステ
ップ115)、変数Sをゼロクリアする(ステップ11
6)。そして、AND画像より抽出された1つの矩形を
矩形Bとして選ぶ(ステップ117)。矩形Aと矩形B
の座標(矩形座標バッファ108に保存されている)を
比較し、矩形Aに矩形Bが含まれているか調べる(ステ
ップ118)。含まれていなければステップ117に戻
り、AND画像の別の矩形を矩形Bとして選び直す。矩
形Aに矩形Bが含まれているならば、矩形Bの面積を計
算し、その面積を変数Sの値と加算し、その結果を変数
Sの値とし(ステップ119)、ステップ117に戻り
別の矩形Bを選ぶ。
That is, first, the input image buffer 106
One input image is selected from the plurality of input images (after the alignment) stored in the input image (step 114), and one rectangle extracted from the input image is selected as a rectangle A (step 115), and the variable S is set. Clear to zero (Step 11
6). Then, one rectangle extracted from the AND image is selected as a rectangle B (step 117). Rectangle A and rectangle B
Are compared (stored in the rectangle coordinate buffer 108), and it is checked whether the rectangle A includes the rectangle B (step 118). If not included, the process returns to step 117, and another rectangle of the AND image is selected again as rectangle B. If the rectangle A includes the rectangle B, the area of the rectangle B is calculated, the area is added to the value of the variable S, and the result is set to the value of the variable S (step 119), and the process returns to step 117 and returns to step 117. Select rectangle B.

【0025】このようにして、入力画像上のある矩形A
に含まれるAND画像の矩形が全て見つけられ、その合
計面積が変数Sとして得られると、S値と矩形Aの面積
との差の絶対値を計算し、それがある閾値Thより小さ
くないならば、矩形Aに対応するAND画像上の領域は
削除すべきと判断し(ステップ120)、その領域の画
像を削除し(ステップ121)、ステップ117に戻り
別の矩形Aを選択するが、削除すべきでないと判断した
ならば、ステップ121に進まずにステップ117に進
む。矩形Aとして選ぶべき矩形が残っている間、ステッ
プ115からステップ121までのループが繰り返され
る。
Thus, a rectangle A on the input image
Are found and the total area is obtained as a variable S, the absolute value of the difference between the S value and the area of the rectangle A is calculated, and if it is not smaller than a certain threshold Th, It is determined that the area on the AND image corresponding to the rectangle A should be deleted (step 120), the image in that area is deleted (step 121), and the process returns to step 117 to select another rectangle A, but deletes it. If it is determined that it should not be performed, the process proceeds to step 117 without proceeding to step 121. While a rectangle to be selected as rectangle A remains, the loop from step 115 to step 121 is repeated.

【0026】このようにして、ある入力画像に注目して
AND画像の不要画像削除がなされる。注目した入力画
像よの抽出された全ての矩形が矩形Aとして選ばれて処
理がなされると、当該処理ループを抜けだし、ステップ
114に戻り、次の入力画像が選ばれ、ステップ115
からステップ121までの処理が繰り返される。最後の
入力画像に関する処理が終わると、AND画像バッファ
107内に、AND画像から不要画像が削除された画像
(目的としている未記入の帳票の画像)が得られる。こ
の画像は帳票画像出力部105によって外部へ出力され
る(ステップ122)。
In this way, the unnecessary image of the AND image is deleted by paying attention to a certain input image. When all the rectangles extracted from the input image of interest are selected as the rectangle A and processed, the process exits the processing loop, returns to step 114, selects the next input image, and returns to step 115.
From step to step 121 are repeated. When the processing relating to the last input image is completed, an image in which unnecessary images have been deleted from the AND image (the intended blank image of the form) is obtained in the AND image buffer 107. This image is output to the outside by the form image output unit 105 (step 122).

【0027】図4は、ある入力画像に関連したAND画
像の不要領域の判定及び削除の説明図である。図4にお
いて、150はある入力画像に、その矩形領域を矩形枠
として重ねて表したものであり、151はAND画像
に、その矩形領域を矩形枠として重ねて表したものであ
る。入力画像の矩形152(矩形A)にはAND画像の
矩形153,154,156(矩形B)が含まれ、矩形
152の面積b1と矩形153,154,155の合計
面積b2(変数Sの値)の差の絶対値が閾値Thより小
さくないので、矩形152に対応するAND画像の領域
の画像を不要と判断し(帳票の記入情報であると判断
し)、それを削除する。他方、入力画像の矩形160に
含まれるAND画像の矩形が矩形161だけであり、そ
れぞれの面積a1,a2の差の絶対値は閾値Thより小
さいので、矩形160に対応するAND画像の領域の画
像は不要とは判断されず、したがって削除されない。同
様の処理を2枚以上の入力画像とAND画像との間で行
うことにより、記入情報が削除されたAND画像、つま
り未記入の帳票の画像163が得られる。
FIG. 4 is an explanatory diagram of determination and deletion of an unnecessary area of an AND image related to a certain input image. In FIG. 4, reference numeral 150 denotes a certain input image in which a rectangular area is superimposed as a rectangular frame, and 151 denotes an AND image in which the rectangular area is superimposed as a rectangular frame. The rectangle 152 (rectangle A) of the input image includes the rectangles 153, 154, 156 (rectangle B) of the AND image, and the area b1 of the rectangle 152 and the total area b2 of the rectangles 153, 154, 155 (the value of the variable S) Since the absolute value of the difference is not smaller than the threshold Th, the image in the area of the AND image corresponding to the rectangle 152 is determined to be unnecessary (determined to be the entry information of the form), and is deleted. On the other hand, since the rectangle of the AND image included in the rectangle 160 of the input image is only the rectangle 161 and the absolute value of the difference between the areas a1 and a2 is smaller than the threshold Th, the image of the area of the AND image corresponding to the rectangle 160 Is not determined to be unnecessary and is therefore not deleted. By performing the same processing between two or more input images and the AND image, an AND image from which entry information has been deleted, that is, an image 163 of a blank form can be obtained.

【0028】一般に、不要画像削除処理に使う入力画像
の枚数が多いほど、AND画像からの記入情報の削除漏
れの可能性が少なくなり、得られる未記入帳票画像の精
度が向上する。しかし、ある枚数を超えると、処理量が
増大する割りに精度はそれほど向上しなくなるので、期
待する処理精度と処理量との兼ね合いで適切な枚数を適
宜決めるとよい。
In general, as the number of input images used for the unnecessary image deletion processing increases, the possibility of missing entry information from the AND image decreases, and the accuracy of the obtained blank form image improves. However, if the number exceeds a certain number, the accuracy does not improve so much in spite of the increase in the processing amount. Therefore, an appropriate number may be appropriately determined in consideration of the expected processing accuracy and the processing amount.

【0029】[実施例2]本実施例の装置構成は前記実
施例1と同様、図1のように表すことができる。図5は
本実施例の処理フローを示す。
[Embodiment 2] The apparatus configuration of this embodiment can be represented as shown in FIG. FIG. 5 shows a processing flow of the present embodiment.

【0030】画像入力部100、画像の位置合わせ部1
01、AND画像作成部102、矩形抽出部103及び
帳票画像出力部105による処理は前記実施例1の場合
と全く同じである。不要画像削除部104の処理内容が
部分的に前記実施例1の場合と異なる。
Image input unit 100, image alignment unit 1
01, the processing by the AND image creation unit 102, the rectangle extraction unit 103, and the form image output unit 105 are exactly the same as in the first embodiment. The processing content of the unnecessary image deletion unit 104 is partially different from that of the first embodiment.

【0031】図5の処理フローで述べれば、複数枚の記
入済みの同一形式帳票画像の入力、AND画像の作成、
矩形抽出までの処理部分であるステップ210〜213
と、帳票画像出力ステップ222は、前記実施例のステ
ップ110〜113及びステップ122と同じである。
Referring to the processing flow of FIG. 5, input of a plurality of filled-out form images, creation of AND images,
Steps 210 to 213 which are processing parts up to rectangle extraction
And the form image output step 222 are the same as steps 110 to 113 and step 122 of the above embodiment.

【0032】AND画像の不要画像を削除するための処
理部分であるステップ214〜221のループは、基本
的には前記実施例1のステップ114〜121のループ
と同様であるが、不要画像判定のためのステップ21
9,220の内容だけは前記実施例1と異なる。すなわ
ち、本実施例においては、入力画像の矩形Aに含まれる
AND画像の矩形B内の黒画素数の合計を変数Sとして
求め(ステップ219)、矩形A内の黒画素数と、矩形
Aに含まれる矩形B内の黒画素数の合計との差の絶対値
を閾値Thと比較し、その差の絶対値がThより小さい
ならば、矩形A領域を削除すべきでないと判断し、Th
以上ならば削除すべきと判断する(ステップ220)。
The loop of steps 214 to 221 which is a processing part for deleting unnecessary images of an AND image is basically the same as the loop of steps 114 to 121 of the first embodiment. Step 21 for
Only the contents of 9, 220 differ from the first embodiment. That is, in the present embodiment, the sum of the number of black pixels in the rectangle B of the AND image included in the rectangle A of the input image is determined as a variable S (step 219). The absolute value of the difference from the total number of black pixels in the included rectangle B is compared with a threshold Th, and if the absolute value of the difference is smaller than Th, it is determined that the rectangle A area should not be deleted, and Th
If so, it is determined that it should be deleted (step 220).

【0033】図6は、このような不要画像の削除判定及
び削除の処理の説明図である。図6において、250は
ある入力画像に、その矩形領域を矩形枠として重ねて表
したものであり、251はAND画像に、その矩形領域
を矩形枠として重ねて表したものである。入力画像の矩
形252(矩形A)には、AND画像の矩形253,2
54,256(矩形B)が含まれ、矩形252内の黒画
素数b1と矩形253,254,255内の黒画素数の
合計b2(変数Sの値)の差の絶対値が閾値Thより小
さくないので、矩形252に対応するAND画像の領域
の画像を不要と判断し(帳票の記入情報であると判断
し)、それを削除する。他方、入力画像の矩形260に
含まれるAND画像の矩形は矩形261だけであり、そ
れぞれの内部の黒画素数a1,a2の差の絶対値は閾値
Thより小さいので、矩形260に対応するAND画像
の領域の画像は不要とは判断されず、削除されない。同
様の処理を2枚以上の入力画像とAND画像との間で行
うことにより、記入情報が削除されたAND画像、つま
り未記入の帳票の画像263が得られる。
FIG. 6 is an explanatory diagram of such an unnecessary image deletion determination and deletion process. In FIG. 6, reference numeral 250 denotes an input image in which a rectangular area is superimposed as a rectangular frame, and reference numeral 251 denotes an AND image in which the rectangular area is superimposed as a rectangular frame. The rectangles 253, 2 of the AND image are included in the rectangle 252 (rectangle A) of the input image.
54, 256 (rectangle B), and the absolute value of the difference between the number b1 of black pixels in the rectangle 252 and the total number b2 of black pixels in the rectangles 253, 254, 255 (value of the variable S) is smaller than the threshold Th. Since there is no image, the image in the area of the AND image corresponding to the rectangle 252 is determined to be unnecessary (it is determined to be the entry information of the form), and is deleted. On the other hand, the rectangle of the AND image included in the rectangle 260 of the input image is only the rectangle 261, and the absolute value of the difference between the numbers of black pixels a1 and a2 inside each is smaller than the threshold Th, so that the AND image corresponding to the rectangle 260 The image in the area is not determined to be unnecessary and is not deleted. By performing the same processing between two or more input images and the AND image, an AND image from which entry information has been deleted, that is, an image 263 of a blank form can be obtained.

【0034】このように、本実施例は矩形内の黒画素数
に着目するため、矩形面積を用いる前記実施例1に比べ
処理量は増加するが、不要画像の検出精度の向上を期待
できる。
As described above, the present embodiment focuses on the number of black pixels in a rectangle, so that the processing amount is increased as compared with the first embodiment using a rectangular area, but an improvement in the detection accuracy of unnecessary images can be expected.

【0035】[実施例3]本実施例の装置構成は前記実
施例1と同様、図1のように表すことができる。図7は
本実施例の処理フローを示す。
[Embodiment 3] The apparatus configuration of this embodiment can be represented as shown in FIG. FIG. 7 shows a processing flow of the present embodiment.

【0036】画像入力部100、画像の位置合わせ部1
01、AND画像作成部102、矩形抽出部103及び
帳票画像出力部105による処理は前記実施例1の場合
と全く同じである。不要画像削除部104の処理内容が
部分的に前記実施例1の場合と異なる。
Image input unit 100, image alignment unit 1
01, the processing by the AND image creation unit 102, the rectangle extraction unit 103, and the form image output unit 105 are exactly the same as in the first embodiment. The processing content of the unnecessary image deletion unit 104 is partially different from that of the first embodiment.

【0037】図7の処理フローで述べれば、複数枚の記
入済みの同一形式帳票画像の入力、AND画像の作成、
矩形抽出までの処理部分であるステップ310〜313
と、帳票画像出力ステップ322は、前記実施例のステ
ップ110〜113及びステップ122と同じである。
Referring to the processing flow of FIG. 7, input of a plurality of filled-out form images, creation of an AND image,
Steps 310 to 313 which are processing parts up to rectangle extraction
And the form image output step 322 are the same as steps 110 to 113 and step 122 of the above embodiment.

【0038】AND画像の不要画像を削除するための処
理部分であるステップ314〜321のループは、基本
的には前記実施例1のステップ114〜121のループ
と同様であるが、不要画像判定のためのステップ31
9,320の内容だけは前記実施例1と異なる。すなわ
ち、本実施例においては、入力画像の矩形Aに含まれる
AND画像の矩形Bが見つかるたびに変数Sを1だけイ
ンクリメントし(ステップ319)、矩形Aに含まれる
AND画像の矩形の個数(対応矩形数)を変数S値とし
て求める。そして、求められた対応矩形数を閾値Thと
比較し、対応矩形数がThより小さいならば矩形Aの領
域を削除すべきでないと判断し、Th以上ならば削除す
べきと判断する(ステップ320)。削除すべきと判断
した場合、矩形Aに対応するAND画像の領域の画像を
削除する(ステップ321)。
The loop of steps 314 to 321 which is a processing part for deleting unnecessary images of an AND image is basically the same as the loop of steps 114 to 121 of the first embodiment, Step 31 for
Only the contents of 9,320 are different from those of the first embodiment. That is, in the present embodiment, the variable S is incremented by 1 each time a rectangle B of the AND image included in the rectangle A of the input image is found (step 319), and the number of rectangles of the AND image included in the rectangle A (corresponding to (The number of rectangles) is obtained as a variable S value. Then, the obtained number of corresponding rectangles is compared with a threshold Th, and if the number of corresponding rectangles is smaller than Th, it is determined that the area of the rectangle A should not be deleted, and if it is not less than Th, it is determined that the area should be deleted (step 320). ). If it is determined that the image should be deleted, the image in the area of the AND image corresponding to the rectangle A is deleted (step 321).

【0039】図8は、このような不要画像の判定及び削
除の処理の説明図である。図8において、350はある
入力画像に、その矩形領域を矩形枠として重ねて表した
ものであり、351はAND画像に、その矩形領域を矩
形枠として重ねて表したものである。入力画像の矩形3
52(矩形A)にはAND画像の3個の矩形353,3
54,356(矩形B)が含まれ、対応矩形数は3であ
り、これは閾値Th以上であるので、矩形352に対応
するAND画像の領域の画像を不要と判断し(帳票の記
入情報であると判断し)、それを削除する。他方、入力
画像の矩形360に含まれるAND画像の矩形は矩形3
61だけで対応矩形数はThより小さいので、矩形36
0に対応するAND画像の領域の画像は不要とは判断さ
れず、したがって削除されない。同様の処理を2枚以上
の入力画像とAND画像との間で行うことにより、記入
情報が削除されたAND画像、つまり未記入の帳票の画
像363が得られる。
FIG. 8 is an explanatory diagram of such an unnecessary image judging and deleting process. In FIG. 8, reference numeral 350 denotes a certain input image in which a rectangular region is superimposed as a rectangular frame, and reference numeral 351 denotes an AND image in which the rectangular region is superimposed as a rectangular frame. Rectangle 3 of input image
52 (rectangle A) includes three rectangles 353, 3 of the AND image.
54, 356 (rectangle B) are included, and the number of corresponding rectangles is three, which is equal to or greater than the threshold value Th. Therefore, it is determined that an image in the area of the AND image corresponding to the rectangle 352 is unnecessary (in the form entry information). Judge that there is) and delete it. On the other hand, the rectangle of the AND image included in the rectangle 360 of the input image is the rectangle 3
Since only 61 and the corresponding rectangle number are smaller than Th, the rectangle 36
The image in the area of the AND image corresponding to 0 is not determined to be unnecessary and is not deleted. By performing the same processing between two or more input images and the AND image, an AND image from which entry information has been deleted, that is, an image 363 of a blank form is obtained.

【0040】なお、このような本実施例の不要画像判定
方法と前記実施例1の不要画像判定方法を、処理する画
像の品質に応じて使い分け、あるいは両方の方法の判定
条件を同時に適用してもよく、より高い精度の不要画像
削除が可能になる。
It is to be noted that the unnecessary image determination method of the present embodiment and the unnecessary image determination method of the first embodiment are selectively used depending on the quality of the image to be processed, or the determination conditions of both methods are applied simultaneously. This makes it possible to delete unnecessary images with higher accuracy.

【0041】[実施例4]本実施例の装置構成は図9の
ように表すことができる。図9において、画像入力部4
00、画像の位置合わせ部401、AND画像作成部4
02、矩形抽出部403、不要画像削除部404、入力
画像バッファ406、AND画像バッファ407及び矩
形座標バッファ408は、前記実施例1乃至前記実施例
3に関わる図1の画像入力部100、画像の位置合わせ
部101、AND画像作成部102、矩形抽出部10
3、不要画像削除部104、入力画像バッファ106、
AND画像バッファ107及び矩形座標バッファ108
と対応する部分であって、その働きも同じである。な
お、不要画像削除部104における不要画像の判定方法
は、前記実施例1、前記実施例2又は前記実施例3と同
じ方法でよく、あるいは、それら方法を組合せた方法で
もよい。
[Embodiment 4] The apparatus configuration of this embodiment can be represented as shown in FIG. In FIG. 9, the image input unit 4
00, image alignment unit 401, AND image creation unit 4
02, the rectangle extracting unit 403, the unnecessary image deleting unit 404, the input image buffer 406, the AND image buffer 407, and the rectangular coordinate buffer 408 are the image input unit 100 of FIG. Positioning unit 101, AND image creation unit 102, rectangle extraction unit 10
3, unnecessary image deletion unit 104, input image buffer 106,
AND image buffer 107 and rectangular coordinate buffer 108
And the function is the same. The method of determining an unnecessary image in the unnecessary image deletion unit 104 may be the same method as in the first, second, or third embodiment, or may be a combination of these methods.

【0042】本実施例の前記各実施例との装置構成上の
相違点は、不要画像削除部404により不要画像を削除
された後のAND画像(AND画像バッファ107内に
ある)に対し画像整形を施す帳票画像整形部409、及
び、この画像整形に関連したOR画像/多値画像バッフ
ァ410が追加されていることと、帳票画像出力部40
5が最終的な帳票画像をOR画像/多値画像バッファ4
10より取り込んで外部へ出力することである。
The difference of this embodiment from the above embodiments in the apparatus configuration is that image shaping is performed on the AND image (in the AND image buffer 107) after the unnecessary image has been deleted by the unnecessary image deletion unit 404. And an OR image / multi-valued image buffer 410 related to the image shaping, and the form image output unit 40
5 is an OR image / multi-value image buffer 4 for the final form image
10 and output to the outside.

【0043】図10は本実施例の処理フローを示す。図
10において、記入済み帳票の画像を入力し(ステップ
420)、不要画像削除済みのAND画像を作成する
(ステップ421)。ここまでは、前記実施例1、実施
例2又は実施例3の画像出力の手前までの処理内容と同
一である。この後のステップ422〜ステップ424が
帳票画像整形処理の部分である。
FIG. 10 shows a processing flow of this embodiment. In FIG. 10, an image of a completed form is input (step 420), and an AND image from which unnecessary images have been deleted is created (step 421). The processing up to this point is the same as the processing up to the point before the image output in the first, second or third embodiment. Subsequent steps 422 to 424 are part of the form image shaping process.

【0044】まず準備作業として、ステップ422でO
R画像/多値画像バッファ410を初期化する。そし
て、ステップ423において、入力画像バッファ406
内の複数の入力画像(位置合わせ済み画像)より1つの
入力画像Aを選び、ステップ424において、OR画像
/多値画像バッファ410内の画像と入力画像AをOR
合成した画像を再びOR画像/多値画像バッファ410
に保存する。全ての入力画像について同様のOR合成を
行う。これを終了すると、ステップ425において、A
ND画像の削除されずに残っている矩形に対応する領域
のOR画像をOR画像/多値画像バッファ410より抽
出して外部へ出力する。すなわち、実質的には、AND
画像の削除されずに残った矩形に対応する領域に関す
る、複数の入力画像のOR画像を作成することになる。
First, as a preparation work, at step 422, O
Initialize the R image / multi-valued image buffer 410. Then, in step 423, the input image buffer 406
, One input image A is selected from a plurality of input images (aligned images), and in step 424, the image in the OR image / multi-valued image buffer 410 and the input image A are ORed.
The combined image is again converted into an OR image / multi-valued image buffer 410.
To save. Similar OR synthesis is performed for all input images. When this is completed, in step 425, A
An OR image of an area corresponding to a rectangle remaining without deletion of the ND image is extracted from the OR image / multi-value image buffer 410 and output to the outside. That is, substantially, AND
An OR image of a plurality of input images is created for an area corresponding to a rectangle remaining without being deleted from the image.

【0045】したがって、ステップ424において、A
ND画像の削除されずに残った矩形の領域についてのみ
入力画像のOR合成を行い、同矩形の領域外はすべて白
画素とした帳票画像を直接的にOR画像/多値画像バッ
フア410に作成するようにしてもよく、この場合、ス
テップ425では領域を意識せず、OR画像/多値画像
バッファ410に作成された帳票画像を単純に出力する
だけでよくなる。
Therefore, in step 424, A
OR synthesis of the input image is performed only on the rectangular area remaining without deleting the ND image, and a form image in which all pixels outside the rectangular area are white pixels is directly created in the OR image / multi-valued image buffer 410. In this case, in this case, it is sufficient to simply output the form image created in the OR image / multi-valued image buffer 410 without being aware of the area in step 425.

【0046】図11は、上に述べた帳票画像整形の説明
図である。図11において、430はAND画像に、そ
の削除されずに残った(不要画像部分とは判断されなか
った)矩形領域を矩形枠として重ねて示したものであ
る。431と432はそれぞれ入力画像(1),(2)
に、その矩形領域を矩形枠として重ねて示したものであ
る。AND画像の矩形435は文字「文」の画像領域で
あるが、画像の乱れ(かすれ、欠け)が認められる。こ
のような「かすれ」等は、帳票上の文字そのものに「か
すれ」等が存在する場合に発生するだけでなく、帳票の
読み取り誤差や入力画像の位置合わせの誤差等によって
も発生することがある。436,437は、矩形435
に対応する入力画像(1),(2)の領域の画像であ
る。これら画像436,437には、「かすれ」もしく
は「欠け」が見られるが、そのOR画像438では、そ
のような「かすれ」等が修復される。そして、このOR
画像438が矩形435の画像の代わりに出力画像とし
て採用されるため、「かすれ」等が修復された未記入帳
票画像439を出力することができる。
FIG. 11 is an explanatory diagram of the form image shaping described above. In FIG. 11, reference numeral 430 denotes an AND image, in which the rectangular area remaining without being deleted (not determined as an unnecessary image part) is overlapped as a rectangular frame. 431 and 432 are input images (1) and (2), respectively.
2 shows the rectangular area superimposed as a rectangular frame. The rectangle 435 of the AND image is the image area of the character “sentence”, but the image is disturbed (blurred or missing). Such “fading” or the like may occur not only when “fading” or the like exists in the character itself on the form, but also due to an error in reading the form, an error in positioning the input image, or the like. . 436 and 437 are rectangles 435
Are the images of the areas of the input images (1) and (2) corresponding to. In these images 436 and 437, “blurring” or “missing” is seen. In the OR image 438, such “blurring” or the like is restored. And this OR
Since the image 438 is employed as an output image instead of the image of the rectangle 435, it is possible to output the blank form image 439 in which “blurring” or the like has been restored.

【0047】[実施例5]本実施例の装置構成は前記実
施例4と同様、図9のように表すことができる。図12
は本実施例の処理フローを示す。
[Embodiment 5] The apparatus configuration of this embodiment can be represented as shown in FIG. FIG.
Shows the processing flow of this embodiment.

【0048】本実施例は、帳票画像整形部409の処理
内容以外は前記実施例4と同じである。図12の処理フ
ローで述べれば、画像入力のステップ520及び不要画
像削除済みAND画像作成のステップ521はそれぞ
れ、前記実施例4のステップ420及び421と同じで
ある。帳票画像整形のためのステップ522〜524の
内容が相違する。
This embodiment is the same as Embodiment 4 except for the processing contents of the form image shaping unit 409. 12, the step 520 of inputting an image and the step 521 of creating an AND image with unnecessary image deleted are the same as steps 420 and 421 of the fourth embodiment, respectively. The contents of steps 522 to 524 for shaping the form image are different.

【0049】すなわち、まず準備作業として、ステップ
522でOR画像/多値画像バッファ410を初期化す
る。そして、ステップ523において、入力画像バッフ
ァ406内の複数の入力画像(位置合わせ済み画像)よ
り1つの入力画像Aを選び、ステップ524において、
入力画像Aの黒画素に対応するOR画像/多値画像バッ
ファ410内の画素値を1だインクリメントする。全て
の入力画像について同様の操作を行い、複数の入力画像
の各画素位置の黒画素数を画素値とした多値画像をOR
画像/多値画像バッファ410に作成する。これを終了
すると、ステップ525において、AND画像の削除さ
れずに残っている(不要画像部分とは判断されなかっ
た)矩形に対応する多値画像の領域を抽出し、その領域
の画素値を閾値Thにより2値化し(典型的には画素値
が入力画像枚数の過半数であれば黒画素、そうでなけれ
ば白画素とする)出力画像として出力する。同矩形領域
以外は白画素とされることは当然である。
That is, as a preparatory operation, the OR image / multi-value image buffer 410 is initialized in step 522. Then, in step 523, one input image A is selected from a plurality of input images (aligned images) in the input image buffer 406, and in step 524,
The pixel value in the OR image / multi-value image buffer 410 corresponding to the black pixel of the input image A is incremented by one. The same operation is performed for all input images, and a multi-valued image in which the number of black pixels at each pixel position of a plurality of input images is set to a pixel value is ORed.
It is created in the image / multi-value image buffer 410. When this is completed, in step 525, a region of the multi-valued image corresponding to the rectangle remaining without being deleted from the AND image (not determined to be an unnecessary image portion) is extracted, and the pixel value of the region is set to a threshold value. The image is binarized by Th (typically, if the pixel value is a majority of the number of input images, the pixel is a black pixel; otherwise, the pixel is a white pixel) and output as an output image. Naturally, the pixels other than the rectangular area are white pixels.

【0050】すなわち、実質的には、AND画像の削除
されずに残った矩形に対応する領域について、Th枚数
以上の入力画像で黒画素である画素位置は黒画素とし、
それ以外の画素は白画素とし、他の領域は全画素を白画
素とした出力画像を作成している。したがって、ステッ
プ524において、AND画像の削除されずに残った矩
形の領域についてのみ、画素の白/黒判定と画素値のイ
ンクリメントを行ってもよく、この場合、ステップ52
5では領域を意識せずに、OR画像/多値画像バッファ
410に作成された多値画像を単純に2値化し帳票画像
として出力するだけでよい。なお、ここまでの説明から
明らかなように、本実施例の画像整形の方法は、AND
画像中の削除されない矩形領域の画像を、複数の入力画
像の対応領域の画像を平均化した画像で置換する方法と
言うこともできる。
That is, in the region corresponding to the rectangle remaining without being deleted from the AND image, the pixel position that is a black pixel in the input image of Th number or more is a black pixel,
The other pixels are white pixels, and the other regions create output images in which all pixels are white pixels. Therefore, in step 524, the white / black determination of the pixel and the increment of the pixel value may be performed only for the rectangular area remaining without being deleted from the AND image. In this case, step 52 is performed.
In 5, the multivalued image created in the OR image / multivalued image buffer 410 may be simply binarized and output as a form image without regard to the area. As is apparent from the above description, the image shaping method according to the present embodiment uses AND
It can also be said that a method of replacing an image of a rectangular region that is not deleted in the image with an image obtained by averaging the images of the regions corresponding to the plurality of input images.

【0051】図13は、上に述べた帳票画像整形の説明
図である。図13において、530はAND画像に、そ
の削除されずに残った(不要画像部分とは判断されなか
った)矩形領域を矩形枠として重ねて示したものであ
る。531,532,533はそれぞれ入力画像
(1),(2),(3)に、その矩形領域を矩形枠とし
て重ねて示したものである。AND画像の矩形535は
文字「文」の画像領域であるが、画像の乱れ(かすれ、
欠け)が認められる。536,537,538は、矩形
535に対応する入力画像(1),(2),(3)の領
域の画像である。これら画像536,537,538の
各画素位置毎に黒画素数をカウントして多値画像を作成
し、それを2値化する(具体的には画素値が2以上なら
黒、2未満なら白とする)ことにより、出力画像539
を作成する。この出力画像539は、画像536,53
7,539の平均化画像としての性格を持つため、それ
ら画像に見られた「かすれ」「欠け」「汚れ」等が修復
される。そして、他の矩形領域についても同様の修復が
なされるため、「かすれ」等のない未記入帳票画像54
0を得られる。
FIG. 13 is an explanatory diagram of the above-described form image shaping. In FIG. 13, reference numeral 530 denotes a rectangular area that remains on the AND image without being deleted (not determined as an unnecessary image part) as a rectangular frame. Reference numerals 531, 532, and 533 denote input images (1), (2), and (3), respectively, in which rectangular regions are superimposed as rectangular frames. The rectangle 535 of the AND image is an image area of the character “sentence”.
Chipping) is recognized. Reference numerals 536, 537, and 538 are images of the areas of the input images (1), (2), and (3) corresponding to the rectangle 535. The number of black pixels is counted for each pixel position of these images 536, 537, and 538 to create a multivalued image and binarize it (specifically, black if the pixel value is 2 or more, white if less than 2). Output image 539
Create This output image 539 is composed of images 536 and 53
Since the image has the characteristics of 7,539 averaged images, "faint", "missing", "dirt", and the like seen in those images are restored. Then, the same restoration is performed for the other rectangular areas.
0 is obtained.

【0052】本実施例は、黒画素数カウントと2値化処
理を行うため、前記実施例4に比べ処理量は増加する
が、より高い精度で未記入帳票画像を復元できる。
In the present embodiment, since the number of black pixels is counted and the binarization process is performed, the processing amount is increased as compared with the fourth embodiment, but a blank form image can be restored with higher accuracy.

【0053】[実施例6]本実施例の装置構成は図14
のように示すことができる。図15は本実施例の処理フ
ローを示す。
[Embodiment 6] FIG.
It can be shown as follows. FIG. 15 shows a processing flow of this embodiment.

【0054】図14において、画像入力部600、画像
の位置合わせ部601、AND画像作成部602、矩形
抽出部603、不要画像削除部604、帳票画像出力部
605、入力画像バッファ606、AND画像バッファ
607、矩形座標バッファ608は、図1に示した同じ
名称の部分に対応する部分であり、それらの機能も不要
画像削除部604を除けば同一である。線分抽出部60
9は新たに追加された部分であり、入力画像から長い黒
ランを検出し、ある閾値より長い黒ランを線分として抽
出する。ここで抽出される線分は、具体的には帳票上の
罫線もしくは枠線である。不要画像削除部604は、基
本的には前記実施例1における不要画像削除部104と
同様の機能を有するが、矩形領域を削除するか否かの判
定のための閾値を、線分抽出部609により抽出された
線分と矩形との距離に応じて変化させる点が前記実施例
1とは異なる。この相違点を図15の処理フローにおい
てさらに説明する。
In FIG. 14, an image input unit 600, an image alignment unit 601, an AND image creation unit 602, a rectangle extraction unit 603, an unnecessary image deletion unit 604, a form image output unit 605, an input image buffer 606, and an AND image buffer 607 and a rectangular coordinate buffer 608 are parts corresponding to the parts of the same name shown in FIG. 1, and their functions are the same except for the unnecessary image deletion unit 604. Line segment extraction unit 60
Reference numeral 9 denotes a newly added portion, which detects a long black run from the input image and extracts a black run longer than a certain threshold as a line segment. The line segment extracted here is, specifically, a ruled line or a frame line on a form. The unnecessary image deletion unit 604 basically has the same function as the unnecessary image deletion unit 104 in the first embodiment, but sets a threshold value for determining whether to delete a rectangular area by using a line segment extraction unit 609. This embodiment is different from the first embodiment in that the distance is changed according to the distance between the line segment extracted from the rectangle and the rectangle. This difference will be further described in the processing flow of FIG.

【0055】図15の処理フローと前記実施例1に関す
る図2の処理フローとを対比すれば、処理内容が基本的
には同じであることは明白である。すなわち、ステップ
620〜623は図2のステップ110〜113に対応
し、ステップ624〜632の処理ループは図2のステ
ップ114〜121の処理ループに対応することは明白
である。ただし、図2の処理フローと違って、ステップ
624〜632の処理ループにおいては、線分検出のス
テップ625が追加されていること、ステップ627で
変数Sが初期化されるだけでなく変数eに「線分からの
距離」が代入されること、ステップ631で、矩形Aに
含まれる矩形Bの合計面積Sと矩形Aの面積との差の絶
対値と比較される閾値として、固定値Thを変数e(線
分からの距離)で除した値が用いられる。この相違点に
ついて、図16により具体的に説明する。
When the processing flow of FIG. 15 is compared with the processing flow of FIG. 2 relating to the first embodiment, it is apparent that the processing contents are basically the same. That is, it is obvious that steps 620 to 623 correspond to steps 110 to 113 in FIG. 2 and that the processing loop of steps 624 to 632 corresponds to the processing loop of steps 114 to 121 in FIG. However, unlike the processing flow of FIG. 2, in the processing loop of steps 624 to 632, the step 625 of line segment detection is added, and not only the variable S is initialized in step 627 but also the variable e The “distance from the line segment” is substituted. In step 631, the fixed value Th is set as a variable as a threshold value to be compared with the absolute value of the difference between the total area S of the rectangle B included in the rectangle A and the area of the rectangle A. The value divided by e (distance from the line segment) is used. This difference will be specifically described with reference to FIG.

【0056】図16において、650はある入力画像
に、その矩形領域を矩形枠として重ねて表したものであ
り、653は入力帳票上の枠を表しており、その枠線は
線分抽出部609によって入力画像より抽出される。6
51はAND画像に、その矩形領域を矩形枠として重ね
て表したものである。
In FIG. 16, reference numeral 650 denotes an input image in which a rectangular area is superimposed as a rectangular frame, 653 denotes a frame on the input form, and the frame line is a line segment extraction unit 609. Is extracted from the input image. 6
Reference numeral 51 denotes an AND image in which the rectangular area is superimposed as a rectangular frame.

【0057】入力画像の矩形654が矩形Aとして選ば
れた場合、この矩形AにはAND画像の矩形656,6
57,658(矩形B)が含まれ、その合計面積がb2
(変数Sの値)、矩形654の面積がb1であるとする
と、前記実施例1では|b1−b2|が固定閾値以上な
らは矩形654の領域を不要画像と判断した。しかし、
本実施例においては、矩形Aの線分からの距離を検出す
る(これがステップ627で変数eに設定される)。こ
こで検出される距離とは、行方向(縦/横のうち幅の広
いほう)における最も小さい距離である。つまり、矩形
654の場合、枠線655の行方向の距離e1が検出さ
れる。そして、この距離e1で固定値Thを除した値を
判定閾値として用いる。つまり、|b1−b2|≧Th
/e1ならば、矩形654は不要画像と判断される。
When the rectangle 654 of the input image is selected as the rectangle A, the rectangle A is the rectangle 656, 6 of the AND image.
57,658 (rectangle B), and the total area is b2
(Value of the variable S), assuming that the area of the rectangle 654 is b1, in the first embodiment, if | b1-b2 | is equal to or larger than the fixed threshold, the area of the rectangle 654 is determined to be an unnecessary image. But,
In this embodiment, the distance from the line segment of the rectangle A is detected (this is set as a variable e in step 627). The distance detected here is the shortest distance in the row direction (wider one of the vertical and horizontal directions). That is, in the case of the rectangle 654, the distance e1 in the row direction of the frame line 655 is detected. Then, a value obtained by dividing the fixed value Th by the distance e1 is used as a determination threshold. That is, | b1−b2 | ≧ Th
If / e1, the rectangle 654 is determined to be an unnecessary image.

【0058】入力画像の矩形660が矩形Aとして選ば
れた場合、この矩形に含まれるAND画像の矩形は矩形
662だけであり、それぞれの面積はa1,a2であ
り、矩形660の枠線661からの距離はd1であると
する。そして、|a1−a2|<Th/d1ならば、矩
形660の領域は不要画像と判断される。
When the rectangle 660 of the input image is selected as the rectangle A, the rectangle of the AND image included in the rectangle is only the rectangle 662, and their areas are a1 and a2. Is d1. If | a1−a2 | <Th / d1, the area of the rectangle 660 is determined to be an unnecessary image.

【0059】同様の処理を2枚以上の入力画像とAND
画像との間で行い、AND画像の不要画像と判断された
領域の画像を削除することにより、記入情報が削除され
たAND画像、つまり未記入の帳票の画像665が得ら
れ、これが帳票画像出力部605により出力される(ス
テップ633)。
The same processing is performed by ANDing two or more input images.
By deleting the image in the area determined to be an unnecessary image of the AND image, the AND image from which the entry information is deleted, that is, the blank image 665 of the form is obtained. Output by the unit 605 (step 633).

【0060】一般的に、未記入の帳票に予め印刷されて
いる項目の文字等(削除してはいけない画像)は、枠線
の近くに配置されることが多い。図16で扱った帳票の
「1」「2」「3」の文字は、そのような例(恐らく項
目番号)である。一方、任意に記入される情報の記入枠
は、行方向にある程度の余裕をみておくことが多く、行
方向の記入文字と枠線との距離は、予め記入される項目
の文字より大きくなる傾向がある。この点に着目し、本
実施例では、文字と記入枠との距離に反比例させるよう
に不要画像判定の閾値を変化させることにより、不要画
像削除の精度を高めようとするものである。なお、本実
施例では単純に閾値を距離に反比例させたが、他の適当
な距離の関数を用いて閾値を距離に応じて変化させても
よい。
In general, the characters and the like (images that should not be deleted) of the items printed in advance on the blank form are often arranged near the frame lines. The letters “1”, “2”, and “3” in the form handled in FIG. 16 are such examples (probably item numbers). On the other hand, the entry frame of information to be arbitrarily entered often has a certain margin in the line direction, and the distance between the entry character and the frame line in the line direction tends to be larger than the character of the item to be entered in advance. There is. Focusing on this point, in the present embodiment, the accuracy of the unnecessary image deletion is improved by changing the threshold value of the unnecessary image determination so as to be in inverse proportion to the distance between the character and the entry frame. In the present embodiment, the threshold value is simply set to be inversely proportional to the distance. However, the threshold value may be changed according to the distance by using another appropriate distance function.

【0061】[実施例7]本実施例の装置構成は、前記
実施例6と同様、図14のように表すことができる。ま
た、処理フローは、図15に示した前記実施例6の処理
フローとほぼ同様に表すことができるので、図15を援
用して前記実施例6と本実施例の処理内容の相違点だけ
を説明する。
[Embodiment 7] The device configuration of this embodiment can be represented as shown in FIG. Further, the processing flow can be represented in substantially the same manner as the processing flow of the sixth embodiment shown in FIG. 15, and only the differences between the processing contents of the sixth embodiment and the present embodiment will be described with reference to FIG. explain.

【0062】本実施例では、ステップ628〜630の
ループにおいて、前記実施例6と同様に、入力画像の矩
形Aに含まれるAND画像の矩形Bを見つけるが、矩形
Bの合計面積ではなく、前記実施例2のように矩形B内
の黒画素の合計数を変数S値として求める。そして、ス
テップ631において、S値と矩形A内の黒画素の数と
の差の絶対値と、固定値Thを矩形Aの枠線との距離e
で除した値Th/eとの比較判定により、矩形Aの領域
を不要画像であるか否か判断する。すなわち、本実施例
は、前記実施例2と同様の不要画像判定方法を採用し、
その判定閾値を、前記実施例6と同様の方法で制御する
ようにしたものである。
In the present embodiment, in the loop of steps 628 to 630, the rectangle B of the AND image included in the rectangle A of the input image is found in the same manner as in the sixth embodiment. As in the second embodiment, the total number of black pixels in the rectangle B is obtained as a variable S value. Then, in step 631, the absolute value of the difference between the S value and the number of black pixels in the rectangle A and the fixed value Th are set to the distance e from the frame line of the rectangle A.
It is determined whether or not the area of the rectangle A is an unnecessary image by comparing with the value Th / e divided by the following equation. That is, this embodiment employs the same unnecessary image determination method as that of the second embodiment,
The determination threshold is controlled in the same manner as in the sixth embodiment.

【0063】[実施例8]本実施例の装置構成は、前記
実施例6と同様、図14のように表すことができる。ま
た、処理フローは、図15に示した前記実施例6の処理
フローとほぼ同様に表すことができるので、図15を援
用して前記実施例6と本実施例の処理内容の相違点だけ
を説明する。
[Embodiment 8] The apparatus configuration of this embodiment can be represented as shown in FIG. Further, the processing flow can be represented in substantially the same manner as the processing flow of the sixth embodiment shown in FIG. 15, and only the differences between the processing contents of the sixth embodiment and the present embodiment will be described with reference to FIG. explain.

【0064】本実施例では、ステップ628〜630の
ループにおいて、前記実施例6と同様に、入力画像の矩
形Aに含まれるAND画像の矩形Bを見つけるが、矩形
Bの合計面積ではなく、前記実施例3と同様に矩形Bの
個数を変数S値として求める。そして、ステップ631
において、固定値Thを矩形Aの枠線との距離eで除し
た値Th/eを判定閾値として用いて、S値との比較判
定を行うことにより、矩形Aの領域を不要画像であるか
否か判断する。すなわち、本実施例は、前記実施例3と
同様の不要画像判定方法を採用し、その判定閾値を、前
記実施例6と同様の方法で制御するようにしたものであ
る。
In the present embodiment, in the loop of steps 628 to 630, the rectangle B of the AND image included in the rectangle A of the input image is found in the same manner as in the sixth embodiment. As in the third embodiment, the number of rectangles B is obtained as a variable S value. Then, step 631
, The value Th / e obtained by dividing the fixed value Th by the distance e from the frame line of the rectangle A is used as a determination threshold, and a comparison with the S value is performed to determine whether the area of the rectangle A is an unnecessary image. Determine whether or not. That is, the present embodiment employs the same unnecessary image determination method as in the third embodiment, and controls the determination threshold in the same manner as in the sixth embodiment.

【0065】なお、前記実施例4又は実施例5におい
て、判定閾値を本実施例と同様の方法で制御してもよい
ことは当然である。
In the fourth embodiment or the fifth embodiment, it is obvious that the determination threshold value may be controlled in the same manner as in the present embodiment.

【0066】[実施例9]未記入の帳票上の文字以外の
画像は大きな矩形として抽出される場合が多い。このこ
とに注目して、本実施例は、矩形の大きさに応じて、不
要画像判定の閾値を変更する。具体的には、帳票全体を
囲む矩形のような大きな矩形については削除されにくい
ように閾値を調整する。
[Embodiment 9] Images other than characters on an unfilled form are often extracted as large rectangles. Focusing on this, the present embodiment changes the threshold value for the unnecessary image determination according to the size of the rectangle. Specifically, the threshold is adjusted so that a large rectangle such as a rectangle surrounding the entire form is not easily deleted.

【0067】本実施例の装置構成は、前記実施例1と同
様、図1のように表すことができる。ただし、不要画像
削除部104による不要画像判定の内容が若干、前記実
施例1の場合と異なる。この相違点について、図17に
示す本実施例の処理フローによる説明する。
The device configuration of this embodiment can be represented as shown in FIG. 1 as in the first embodiment. However, the content of the unnecessary image determination by the unnecessary image deletion unit 104 is slightly different from the case of the first embodiment. This difference will be described with reference to the processing flow of the present embodiment shown in FIG.

【0068】図17の処理フローと前記実施例1に関す
る図2の処理フローとを対比すれば、処理内容が基本的
には同じであることは明白である。すなわち、ステップ
920〜923は図2のステップ110〜113に対応
し、ステップ924〜931の処理ループは図2のステ
ップ114〜121の処理ループに対応することは明白
である。ただし、図2の処理フローと違って、ステップ
924〜931の処理ループにおいては、ステップ62
7で変数Sが初期化されるだけでなく、変数qに「矩形
Aの面積」が代入され、ステップ930で、矩形Aに含
まれる矩形Bの合計面積Sと矩形Aの面積との差の絶対
値と比較される閾値として、固定値Thを変数q(矩形
Aの面積)で除した値が用いられる。この相違点につい
て、図18により具体的に説明する。
When the processing flow of FIG. 17 is compared with the processing flow of FIG. 2 relating to the first embodiment, it is clear that the processing contents are basically the same. That is, it is apparent that steps 920 to 923 correspond to steps 110 to 113 in FIG. 2, and the processing loop of steps 924 to 931 corresponds to the processing loop of steps 114 to 121 in FIG. However, unlike the processing flow of FIG. 2, in the processing loop of steps 924 to 931, step 62
7, not only the variable S is initialized, but also the “area of the rectangle A” is substituted for the variable q, and in step 930, the difference between the total area S of the rectangle B included in the rectangle A and the area of the rectangle A is calculated. As the threshold value to be compared with the absolute value, a value obtained by dividing the fixed value Th by a variable q (the area of the rectangle A) is used. This difference will be specifically described with reference to FIG.

【0069】図18において、950はある入力画像
に、その矩形領域を矩形枠として重ねて表したものであ
り、951はAND画像に、その矩形領域を矩形枠とし
て重ねて表したものである。未記入帳票に予め印刷され
た数字の矩形954が矩形Aとして選ばれた場合、この
矩形954にはAND画像の矩形955(矩形B)だけ
が含まれ、それぞれの面積がa1,a2であり、|a1
−a2|<Th/a1であると、矩形954の領域は不
要画像でないと判断される。一方、任意に記入された文
字の比較的大きな矩形956が矩形Aとして選ばれた場
合、不要画像判定のための閾値は、固定値Thを矩形9
56の面積b1で除した値が用いられ、これはb1>a
1であるから、矩形954に用いられた判定閾値より小
さな値になる。そして、矩形956にAND画像の矩形
957,958,959が含まれ、それらの合計面積が
b2であるとき、|b1−b2|≧Th/b1ならば、
矩形956の領域は不要画像と判断され削除される。
In FIG. 18, reference numeral 950 denotes an input image in which a rectangular area is superimposed as a rectangular frame, and 951 denotes an AND image in which the rectangular area is superimposed as a rectangular frame. When a rectangle 954 of a number printed in advance on an unfilled form is selected as the rectangle A, this rectangle 954 includes only the rectangle 955 (rectangle B) of the AND image, and their areas are a1 and a2. | A1
If −a2 | <Th / a1, it is determined that the area of the rectangle 954 is not an unnecessary image. On the other hand, when the relatively large rectangle 956 of the arbitrarily entered character is selected as the rectangle A, the threshold value for the unnecessary image determination is a fixed value Th of the rectangle 9
The value divided by the area b1 of 56 is used, which is b1> a
Since it is 1, the value is smaller than the determination threshold value used for the rectangle 954. Then, when the rectangle 957 includes rectangles 957, 958, and 959 of the AND image, and their total area is b2, if | b1−b2 | ≧ Th / b1,
The area of the rectangle 956 is determined to be an unnecessary image and is deleted.

【0070】同様の処理を2枚以上の入力画像とAND
画像との間で行い、AND画像の不要画像と判断された
領域の画像を削除することにより、記入情報が削除され
たAND画像、つまり未記入の帳票の画像960が得ら
れ、外部に出力される(ステップ932)。
The same processing is performed by ANDing two or more input images.
By deleting the image of the area determined to be an unnecessary image of the AND image, the AND image from which the entry information is deleted, that is, the blank image 960 of the form is obtained and output to the outside. (Step 932).

【0071】なお、本実施例では不要画像判定のための
閾値を単純に矩形Aの面積に反比例させたが、削除対象
の画像の大きさがある程度分かっている場合には、他の
適当関数(矩形Aの面積が削除対象の大きさに相当する
場合に判定閾値が最小になるような関数)を利用すれ
ば、より良い精度の不要画像判定が可能になる。
In the present embodiment, the threshold value for the unnecessary image determination is simply inversely proportional to the area of the rectangle A. However, if the size of the image to be deleted is known to some extent, another suitable function ( If a function that minimizes the determination threshold when the area of the rectangle A corresponds to the size of the deletion target is used, unnecessary image determination with higher accuracy can be performed.

【0072】[実施例10]本実施例の装置構成は、前
記実施例9と同様、図1のように表すことができる。ま
た、処理フローは、図17に示した前記実施例9の処理
フローとほぼ同様に表すことができるので、図17を援
用して前記実施例9と本実施例の処理内容の相違点だけ
を説明する。
[Embodiment 10] The apparatus configuration of this embodiment can be represented as shown in FIG. Further, since the processing flow can be represented in substantially the same manner as the processing flow of the ninth embodiment shown in FIG. 17, only the differences between the processing contents of the ninth embodiment and the present embodiment will be described with reference to FIG. explain.

【0073】本実施例では、ステップ927〜929の
ループにおいて、前記実施例9と同様に、入力画像の矩
形Aに含まれるAND画像の矩形Bを見つけるが、矩形
Bの合計面積ではなく、前記実施例2と同様に矩形B内
の黒画素の合計数を変数S値として求める。そして、ス
テップ930において、S値と矩形A内の黒画素の数と
の差の絶対値と、固定値Thを矩形Aの面積qで除した
値Th/qとの比較判定により、矩形Aの領域を不要画
像であるか否か判断する。すなわち、本実施例は、前記
実施例2と同様の不要画像判定方法を採用し、その判定
閾値を、前記実施例9と同様の方法で制御するようにし
たものである。
In the present embodiment, in the loop of steps 927 to 929, the rectangle B of the AND image included in the rectangle A of the input image is found as in the ninth embodiment. As in the second embodiment, the total number of black pixels in the rectangle B is obtained as a variable S value. Then, in step 930, the absolute value of the difference between the S value and the number of black pixels in the rectangle A is compared with the value Th / q obtained by dividing the fixed value Th by the area q of the rectangle A, and the rectangle A is determined. It is determined whether the area is an unnecessary image. That is, the present embodiment employs the same unnecessary image determination method as that of the second embodiment, and controls the determination threshold value in the same manner as that of the ninth embodiment.

【0074】[実施例11]本実施例の装置構成は、前
記実施例9と同様、図1のように表すことができる。ま
た、処理フローは、図17に示した前記実施例9の処理
フローとほぼ同様に表すことができるので、図17を援
用して前記実施例9と本実施例の処理内容の相違点だけ
を説明する。
[Embodiment 11] The apparatus configuration of this embodiment can be represented as shown in FIG. Further, since the processing flow can be represented in substantially the same manner as the processing flow of the ninth embodiment shown in FIG. 17, only the differences between the processing contents of the ninth embodiment and the present embodiment will be described with reference to FIG. explain.

【0075】本実施例では、ステップ927〜929の
ループにおいて、前記実施例9と同様に入力画像の矩形
Aに含まれるAND画像の矩形Bを見つけるが、矩形B
の合計面積ではなく、前記実施例3と同様に矩形Bの個
数を変数S値として求める。そして、ステップ930に
おいて、S値と、固定値Thを矩形Aの面積qで除した
値Th/qとの比較判定により、矩形Aの領域を不要画
像であるか否か判断する。すなわち、本実施例は、前記
実施例3と同様の不要画像判定方法を採用し、その判定
閾値を、前記実施例9と同様の方法で制御するようにし
たものである。
In the present embodiment, in the loop of steps 927 to 929, the rectangle B of the AND image included in the rectangle A of the input image is found in the same manner as in the ninth embodiment.
, The number of rectangles B is determined as the variable S value in the same manner as in the third embodiment. Then, in step 930, it is determined whether or not the area of the rectangle A is an unnecessary image by comparing and determining the S value and a value Th / q obtained by dividing the fixed value Th by the area q of the rectangle A. That is, the present embodiment employs the same unnecessary image determination method as in the third embodiment, and controls the determination threshold value in the same manner as in the ninth embodiment.

【0076】なお、前記実施例4又は実施例5におい
て、判定閾値を本実施例と同様の方法で制御してもよい
ことは当然である。
In the fourth embodiment or the fifth embodiment, it is obvious that the determination threshold value may be controlled in the same manner as in the present embodiment.

【0077】[0077]

【発明の効果】以上の詳細な説明から明らかな如く、請
求項1乃至12の各項の発明によれば、記入済み帳票が
存在すれば、それをもとに未記入状態の帳票の画像を自
動的に作成することができるため、未記入の帳票が必要
となった場合にワープロ等で帳票を作成し直すような不
経済な作業が不要になる。請求項2乃至7の各項記載の
発明、請求項11記載の発明又は請求項12記載の発明
によれば、不要画像を含まない高品質の未記入帳票の画
像を自動的に作成することができる。請求項8、9又は
10記載の発明によれば、文字等の「かすれ」や「欠
け」のない、より高品質な未記入帳票画像を自動的に作
成することができる。
As is apparent from the above detailed description, according to the invention of each of the first to twelfth aspects, if there is a filled-out form, the image of the form in an unfilled state is created based on the form. Since it can be created automatically, there is no need for uneconomic work such as re-creating a form using a word processor when a blank form is required. According to the invention described in each of claims 2 to 7, the invention described in claim 11, or the invention described in claim 12, it is possible to automatically create a high-quality blank form image that does not include an unnecessary image. it can. According to the eighth, ninth, or tenth aspect of the invention, it is possible to automatically create a higher-quality non-filled form image without “blurring” or “missing” of characters and the like.

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

【図1】本発明の装置構成の一例を示すブロック図であ
る。
FIG. 1 is a block diagram showing an example of a device configuration of the present invention.

【図2】本発明の実施例1の処理フローを示すフローチ
ャートである。
FIG. 2 is a flowchart illustrating a processing flow according to the first exemplary embodiment of the present invention.

【図3】入力画像及びAND画像の矩形抽出の例を示す
図である。
FIG. 3 is a diagram illustrating an example of rectangle extraction of an input image and an AND image.

【図4】本発明の実施例1における不要画像判定を説明
するための図である。
FIG. 4 is a diagram for explaining an unnecessary image determination according to the first embodiment of the present invention.

【図5】本発明の実施例2の処理フローを示すフローチ
ャートである。
FIG. 5 is a flowchart illustrating a processing flow according to a second embodiment of the present invention.

【図6】本発明の実施例2における不要画像判定を説明
するための図である。
FIG. 6 is a diagram for explaining an unnecessary image determination in Embodiment 2 of the present invention.

【図7】本発明の実施例3の処理フローを示すフローチ
ャートである。
FIG. 7 is a flowchart illustrating a processing flow according to a third embodiment of the present invention.

【図8】本発明の実施例3における不要画像判定を説明
するための図である。
FIG. 8 is a diagram for explaining an unnecessary image determination in Embodiment 3 of the present invention.

【図9】本発明の装置構成の他の例を示すブロック図で
ある。
FIG. 9 is a block diagram showing another example of the device configuration of the present invention.

【図10】本発明の実施例4の処理フローを示すフロー
チャートである。
FIG. 10 is a flowchart illustrating a processing flow according to a fourth embodiment of the present invention.

【図11】本発明の実施例4における不要画像判定を説
明するための図である。
FIG. 11 is a diagram for explaining an unnecessary image determination in Embodiment 4 of the present invention.

【図12】本発明の実施例5の処理フローを示すフロー
チャートである。
FIG. 12 is a flowchart illustrating a processing flow according to a fifth embodiment of the present invention.

【図13】本発明の実施例5における不要画像判定を説
明するための図である。
FIG. 13 is a diagram for explaining an unnecessary image determination in Embodiment 5 of the present invention.

【図14】本発明の装置構成の他の例を示すブロック図
である。
FIG. 14 is a block diagram showing another example of the device configuration of the present invention.

【図15】本発明の実施例6の処理フローを示すフロー
チャートである。
FIG. 15 is a flowchart illustrating a processing flow according to a sixth embodiment of the present invention.

【図16】本発明の実施例6における不要画像判定を説
明するための図である。
FIG. 16 is a diagram for explaining an unnecessary image determination in Embodiment 6 of the present invention.

【図17】本発明の実施例9の処理フローを示すフロー
チャートである。
FIG. 17 is a flowchart illustrating a processing flow according to a ninth embodiment of the present invention.

【図18】本発明の実施例9における不要画像判定を説
明するための図である。
FIG. 18 is a diagram for explaining an unnecessary image determination in Embodiment 9 of the present invention.

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

100,400,600 画像入力部 101,401,601 画像の位置合わせ部 102,402,602 AND画像作成部 103,403,603 矩形抽出部 104,404,604 不要画像削除部 105,405,605 帳票画像出力部 106,406,606 入力画像バッファ 107,407,607 AND画像バッファ 108,408,608 矩形座標バッファ 409 帳票画像整形部 410 OR画像/多値画像バッファ 609 線分抽出部 100, 400, 600 Image input unit 101, 401, 601 Image alignment unit 102, 402, 602 AND image creation unit 103, 403, 603 Rectangle extraction unit 104, 404, 604 Unnecessary image deletion unit 105, 405, 605 Form Image output unit 106, 406, 606 Input image buffer 107, 407, 607 AND image buffer 108, 408, 608 Rectangular coordinate buffer 409 Form image shaping unit 410 OR image / multi-valued image buffer 609 Line segment extraction unit

Claims (12)

【特許請求の範囲】[Claims] 【請求項1】 記入済みの帳票から未記入の帳票の画像
を作成する帳票画像作成装置であって、複数の同一形式
の記入済みの帳票の画像を入力する手段と、入力された
複数の記入済み帳票画像の位置合わせをする手段と、位
置合わせ後の複数の記入済み帳票画像のAND画像を作
成する手段とを具備する帳票画像作成装置。
1. A form image creating apparatus for creating an image of an unfilled form from a completed form, comprising: means for inputting a plurality of filled-out form images in the same format; A form image creating apparatus comprising: means for aligning a completed form image; and means for creating an AND image of a plurality of filled form images after the alignment.
【請求項2】 記入済みの帳票から未記入の帳票の画像
を作成する帳票画像作成装置であって、複数の同一形式
の記入済みの帳票の画像を入力する手段と、入力された
複数の記入済み帳票画像の位置合わせをする手段と、位
置合わせ後の複数の記入済み帳票画像のAND画像を作
成する手段と、位置合わせ後の記入済み帳票画像とAN
D画像を比較することによりAND画像の削除すべき不
要部分を特定し、その不要部分をAND画像より削除す
る手段とを具備する帳票画像作成装置。
2. A form image creating apparatus for creating an image of an unfilled form from a completed form, comprising: means for inputting a plurality of filled-out form images in the same format; Means for aligning the completed form image, means for creating an AND image of the plurality of completed form images after the alignment,
A form image creating apparatus comprising: means for identifying an unnecessary portion of the AND image to be deleted by comparing the D images and deleting the unnecessary portion from the AND image.
【請求項3】 記入済みの帳票から未記入の帳票の画像
を作成する帳票画像作成装置であって、複数の同一形式
の記入済みの帳票の画像を入力する手段と、入力された
複数の記入済み帳票画像の位置合わせをする手段と、位
置合わせ後の複数の記入済み帳票画像のAND画像を作
成する手段と、位置合わせ後の複数の記入済み帳票画像
及びAND画像より黒ラン連結成分を囲む矩形を抽出す
る手段と、位置合わせ後の記入済み帳票画像より抽出さ
れた矩形とAND画像より抽出された矩形との対応付け
をし、対応した矩形相互の関係からAND画像の削除す
べき不要部分を特定し、その不要部分をAND画像より
削除する手段とを具備する帳票画像作成装置。
3. A form image creating apparatus for creating an image of an unfilled form from a completed form, comprising: means for inputting a plurality of filled-out form images in the same format; Means for aligning the completed form images, means for creating an AND image of the plurality of completed form images after the alignment, and surrounding the black run connected component by the plurality of completed form images and the AND images after the alignment. Means for extracting a rectangle, and associating the rectangle extracted from the filled-in form image after the alignment with the rectangle extracted from the AND image, and removing an unnecessary portion of the AND image to be deleted from the relationship between the corresponding rectangles. And a means for deleting unnecessary portions from the AND image.
【請求項4】 記入済みの帳票から未記入の帳票の画像
を作成する帳票画像作成装置であって、複数の同一形式
の記入済みの帳票の画像を入力する手段と、入力された
複数の記入済み帳票画像の位置合わせをする手段と、位
置合わせ後の複数の記入済み帳票画像のAND画像を作
成する手段と、位置合わせ後の複数の記入済み帳票画像
及びAND画像より黒ラン連結成分を囲む矩形を抽出す
る手段と、位置合わせ後の記入済み帳票画像より抽出さ
れた矩形と、それに包含される位置関係にあるAND画
像から抽出された矩形とを対応付け、対応した矩形相互
の関係からAND画像の削除すべき不要部分を特定し、
その不要部分をAND画像より削除する手段とを具備す
る帳票画像作成装置。
4. A form image creating apparatus for creating an image of an unfilled form from a filled-out form, comprising: means for inputting a plurality of filled-out form images in the same format; Means for aligning the completed form images, means for creating an AND image of the plurality of completed form images after the alignment, and surrounding the black run connected component by the plurality of completed form images and the AND images after the alignment. A means for extracting a rectangle is associated with a rectangle extracted from a filled-out form image after alignment, and a rectangle extracted from an AND image having a positional relationship included in the extracted form image. Identify unwanted parts of the image that need to be removed,
Means for deleting the unnecessary part from the AND image.
【請求項5】 記入済みの帳票から未記入の帳票の画像
を作成する帳票画像作成装置であって、複数の同一形式
の記入済みの帳票の画像を入力する手段と、入力された
複数の記入済み帳票画像の位置合わせをする手段と、位
置合わせ後の複数の記入済み帳票画像のAND画像を作
成する手段と、位置合わせ後の複数の記入済み帳票画像
及びAND画像より黒ラン連結成分を囲む矩形を抽出す
る手段と、位置合わせ後の記入済み帳票画像より抽出さ
れた矩形とAND画像から抽出された矩形との対応付け
をし、対応した矩形相互の大きさを比較することにより
AND画像の削除すべき不要部分を特定し、その不要部
分をAND画像より削除する手段とを具備する帳票画像
作成装置。
5. A form image creating apparatus for creating an image of an unfilled form from a completed form, comprising: means for inputting a plurality of filled-out form images in the same format; Means for aligning the completed form images, means for creating an AND image of the plurality of completed form images after the alignment, and surrounding the black run connected component by the plurality of completed form images and the AND images after the alignment. Means for extracting a rectangle, and associating the rectangle extracted from the filled-in form image after the alignment with the rectangle extracted from the AND image, and comparing the sizes of the corresponding rectangles to each other, A form image creating apparatus comprising: means for specifying an unnecessary portion to be deleted and deleting the unnecessary portion from the AND image.
【請求項6】 記入済みの帳票から未記入の帳票の画像
を作成する帳票画像作成装置であって、複数の同一形式
の記入済みの帳票の画像を入力する手段と、入力された
複数の記入済み帳票画像の位置合わせをする手段と、位
置合わせ後の複数の記入済み帳票画像のAND画像を作
成する手段と、位置合わせ後の複数の記入済み帳票画像
及びAND画像より黒ラン連結成分を囲む矩形を抽出す
る手段と、位置合わせ後の記入済み帳票画像より抽出さ
れた矩形とAND画像から抽出された矩形との対応付け
をし、位置合わせ後の記入済み帳票画像より抽出された
各矩形の黒画素数とそれに対応したAND画像より抽出
された矩形の黒画素数とを比較することによりAND画
像の削除すべき不要部分を特定し、その不要部分をAN
D画像より削除する手段とを具備する帳票画像作成装
置。
6. A form image creating apparatus for creating an image of an unfilled form from a completed form, comprising: means for inputting a plurality of filled-out form images of the same format; Means for aligning the completed form images, means for creating an AND image of the plurality of completed form images after the alignment, and surrounding the black run connected component by the plurality of completed form images and the AND images after the alignment. Means for extracting a rectangle, and associating the rectangle extracted from the filled-in form image after the alignment with the rectangle extracted from the AND image, and determining each rectangle extracted from the filled-in form image after the alignment. By comparing the number of black pixels with the number of rectangular black pixels extracted from the corresponding AND image, an unnecessary portion of the AND image to be deleted is specified, and the unnecessary portion is identified by AN.
A form image creating apparatus comprising: means for deleting from a D image.
【請求項7】 記入済みの帳票から未記入の帳票の画像
を作成する帳票画像作成装置であって、複数の同一形式
の記入済みの帳票の画像を入力する手段と、入力された
複数の記入済み帳票画像の位置合わせをする手段と、位
置合わせ後の複数の記入済み帳票画像のAND画像を作
成する手段と、位置合わせ後の複数の記入済み帳票画像
及びAND画像より黒ラン連結成分を囲む矩形を抽出す
る手段と、位置合わせ後の記入済み帳票画像より抽出さ
れた矩形とAND画像から抽出された矩形との対応付け
をし、位置合わせ後の記入済み帳票画像より抽出された
各矩形に対応したAND画像より抽出された矩形の個数
によってAND画像の削除すべき不要部分を特定し、そ
の不要部分をAND画像より削除する手段とを具備する
帳票画像作成装置。
7. A form image creating apparatus for creating an image of an unfilled form from a filled-out form, comprising: means for inputting a plurality of filled-out form images in the same format; Means for aligning the completed form images, means for creating an AND image of the plurality of completed form images after the alignment, and surrounding the black run connected component by the plurality of completed form images and the AND images after the alignment. Means for extracting a rectangle, and associating the rectangle extracted from the filled-in form image after the alignment with the rectangle extracted from the AND image, to each rectangle extracted from the filled-in form image after the alignment. A form image creating apparatus comprising: means for identifying an unnecessary portion of the AND image to be deleted based on the number of rectangles extracted from the corresponding AND image, and deleting the unnecessary portion from the AND image.
【請求項8】 不要部分の削除後のAND画像に対し、
位置合わせ後の記入済み帳票画像を参照して画像補正を
行う手段を有することを特徴とする請求項2乃至7のい
ずれか1項に記載の帳票画像作成装置。
8. An AND image from which an unnecessary portion has been deleted,
The form image creating apparatus according to any one of claims 2 to 7, further comprising means for performing image correction by referring to the filled form image after the alignment.
【請求項9】 請求項8記載の帳票画像作成装置におい
て、画像補正の手段は、AND画像中の削除されなかっ
た部分の画像を、位置合わせ後の複数の記入済み帳票画
像中の対応部分のOR画像で置き換えることにより画像
補正を行うことを特徴とする帳票画像作成装置。
9. The form image creating apparatus according to claim 8, wherein the image correcting means replaces an image of a part which has not been deleted in the AND image with a corresponding part in the plurality of filled form images after the alignment. A form image creating apparatus for performing image correction by replacing with an OR image.
【請求項10】 請求項8記載の帳票画像作成装置にお
いて、画像補正の手段は、AND画像中の削除されなか
った部分の画像を、位置合わせ後の複数の記入済み帳票
画像の対応部分の画像を平均化した画像で置き換えるこ
とにより画像補正を行うことを特徴とする帳票画像作成
装置。
10. The form image creating apparatus according to claim 8, wherein the image correcting means converts an image of a part of the AND image that has not been deleted into a corresponding part of a plurality of filled form images after alignment. A form image creating apparatus for performing image correction by replacing the image with an averaged image.
【請求項11】 位置合わせ後の記入済み帳票画像上の
罫線若しくは枠線に相当する線分を抽出する手段を有
し、不要部分を削除する手段は、位置合わせ後の記入済
み帳票画像より抽出された矩形の、抽出された線分から
の距離に応じて、当該矩形に関連する部分を削除すべき
か判断するための閾値を調整することを特徴とする請求
項5、6又は7記載の帳票画像作成装置。
11. A means for extracting a line segment corresponding to a ruled line or a frame line on a filled-in form image after alignment, and a means for deleting an unnecessary portion is extracted from the filled-in form image after alignment. 8. The form image according to claim 5, 6 or 7, wherein a threshold value for judging whether or not a portion related to the rectangle should be deleted is adjusted according to a distance of the extracted rectangle from the extracted line segment. Creating device.
【請求項12】 請求項5、6又は7記載の帳票画像作
成装置において、不要部分を削除する手段は、位置合わ
せ後の記入済み帳票画像より抽出された矩形の大きさに
応じて、当該矩形に関連する部分を削除すべきか判断す
るための閾値を調整することを特徴とする帳票画像作成
装置。
12. The form image creating apparatus according to claim 5, wherein the means for deleting an unnecessary portion is provided in accordance with the size of the rectangle extracted from the filled-in form image after alignment. A form image creating apparatus for adjusting a threshold value for determining whether to delete a portion related to a form.
JP19043696A 1996-07-19 1996-07-19 Form image creation device Expired - Fee Related JP3378439B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19043696A JP3378439B2 (en) 1996-07-19 1996-07-19 Form image creation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19043696A JP3378439B2 (en) 1996-07-19 1996-07-19 Form image creation device

Publications (2)

Publication Number Publication Date
JPH1040312A true JPH1040312A (en) 1998-02-13
JP3378439B2 JP3378439B2 (en) 2003-02-17

Family

ID=16258111

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19043696A Expired - Fee Related JP3378439B2 (en) 1996-07-19 1996-07-19 Form image creation device

Country Status (1)

Country Link
JP (1) JP3378439B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6614929B1 (en) 2000-02-28 2003-09-02 Kabushiki Kaisha Toshiba Apparatus and method of detecting character writing area in document, and document format generating apparatus
JP2008123266A (en) * 2006-11-13 2008-05-29 Nec Corp Label area detecting apparatus, label area detection method for use in the apparatus, and label area detection control program
JP2012043433A (en) * 2010-08-17 2012-03-01 Fujitsu Ltd Image processing method and apparatus
JP2013206323A (en) * 2012-03-29 2013-10-07 Fujitsu Ltd Document image management system, document image management method and program
JP2017016290A (en) * 2015-06-30 2017-01-19 富士ゼロックス株式会社 Image processing device and image processing program
JP2020140323A (en) * 2019-02-27 2020-09-03 京セラドキュメントソリューションズ株式会社 Form generation device, form generation method and form generation program
JP2020144653A (en) * 2019-03-07 2020-09-10 日本電気株式会社 Form processing device, form processing method, and program

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5146289B2 (en) * 2008-12-02 2013-02-20 株式会社リコー Information processing apparatus, information processing method, and information processing program

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6614929B1 (en) 2000-02-28 2003-09-02 Kabushiki Kaisha Toshiba Apparatus and method of detecting character writing area in document, and document format generating apparatus
JP2008123266A (en) * 2006-11-13 2008-05-29 Nec Corp Label area detecting apparatus, label area detection method for use in the apparatus, and label area detection control program
JP2012043433A (en) * 2010-08-17 2012-03-01 Fujitsu Ltd Image processing method and apparatus
JP2013206323A (en) * 2012-03-29 2013-10-07 Fujitsu Ltd Document image management system, document image management method and program
US9002135B2 (en) 2012-03-29 2015-04-07 Fujitsu Limited Form image management system and form image management method
JP2017016290A (en) * 2015-06-30 2017-01-19 富士ゼロックス株式会社 Image processing device and image processing program
JP2020140323A (en) * 2019-02-27 2020-09-03 京セラドキュメントソリューションズ株式会社 Form generation device, form generation method and form generation program
JP2020144653A (en) * 2019-03-07 2020-09-10 日本電気株式会社 Form processing device, form processing method, and program

Also Published As

Publication number Publication date
JP3378439B2 (en) 2003-02-17

Similar Documents

Publication Publication Date Title
US6453069B1 (en) Method of extracting image from input image using reference image
JP3768052B2 (en) Color image processing method, color image processing apparatus, and recording medium therefor
JP4261005B2 (en) Region-based image binarization system
US7965894B2 (en) Method for detecting alterations in printed document using image comparison analyses
WO1999067943A1 (en) Image processor, image processing method, and medium on which image processing program is recorded
US20060228044A1 (en) Method for automatically cropping image objects
US7746503B2 (en) Method of and device for image enhancement
JPH0957201A (en) Specific color region extracting system and specific color region removing system
JPH1040312A (en) Device for preparing slip picture
JP3814353B2 (en) Image segmentation method and image segmentation apparatus
JPH08320990A (en) Vehicle number reader
JP2010011450A (en) Image-forming device and image processing method
US6389178B1 (en) Method of downsampling documents
JP3830350B2 (en) Color image processing method, color image processing apparatus, program, and recording medium
JP5109548B2 (en) Image processing apparatus and program
JP3625245B2 (en) Image processing method and image processing apparatus
JP3046653B2 (en) How to correct the inclination of text documents
JPH0660220A (en) Area extracting method for document image
JP3260891B2 (en) Edge extraction method
KR100537829B1 (en) Method for segmenting Scan Image
JP5146199B2 (en) Difference extraction apparatus and difference extraction program
JP3485975B2 (en) Specific color area extraction method and specific color area removal method
JP3877535B2 (en) Color image processing method, color image processing apparatus, color image processing program, and recording medium
JPH03160582A (en) Method for separating ruled line and character in document picture data
JP3614252B2 (en) Information extraction method

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071206

Year of fee payment: 5

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081206

Year of fee payment: 6

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081206

Year of fee payment: 6

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091206

Year of fee payment: 7

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101206

Year of fee payment: 8

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101206

Year of fee payment: 8

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111206

Year of fee payment: 9

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111206

Year of fee payment: 9

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121206

Year of fee payment: 10

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131206

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees