JP5807464B2 - Image identification apparatus and image identification method - Google Patents

Image identification apparatus and image identification method Download PDF

Info

Publication number
JP5807464B2
JP5807464B2 JP2011199273A JP2011199273A JP5807464B2 JP 5807464 B2 JP5807464 B2 JP 5807464B2 JP 2011199273 A JP2011199273 A JP 2011199273A JP 2011199273 A JP2011199273 A JP 2011199273A JP 5807464 B2 JP5807464 B2 JP 5807464B2
Authority
JP
Japan
Prior art keywords
image
master
difference
data
master image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2011199273A
Other languages
Japanese (ja)
Other versions
JP2013061764A (en
Inventor
山合 敏文
敏文 山合
長谷川 史裕
史裕 長谷川
幸央 内山
幸央 内山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2011199273A priority Critical patent/JP5807464B2/en
Publication of JP2013061764A publication Critical patent/JP2013061764A/en
Application granted granted Critical
Publication of JP5807464B2 publication Critical patent/JP5807464B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Description

本発明は、識別対象であるデータ画像が、リファレンスであるマスター画像と同種のものか別種のものかを判定する画像識別装置および画像識別方法に関し、特にデータ画像とマスター画像を定型帳票画像とする帳票種識別の分野に関する。   The present invention relates to an image identification apparatus and an image identification method for determining whether a data image to be identified is of the same type or a different type from a master image that is a reference. It relates to the field of form type identification.

定型帳票のデータ処理システムにおいては通常、帳票上に記入された文字の自動読み取り(OCR)を実行する際、各文字の記入位置情報等の帳票定義データをあわせて必要とする。したがって、複数種類の定型帳票を対象とする場合、帳票定義データが帳票種毎に異なるため、OCRに先立って、入力された画像の帳票種を識別する必要がある。   In a standard form data processing system, normally, when performing automatic reading (OCR) of characters entered on a form, form definition data such as entry position information of each character is also required. Therefore, when a plurality of types of standard forms are targeted, since the form definition data differs for each form type, it is necessary to identify the form type of the input image prior to OCR.

従来は、各帳票種毎に特有のマークや記号を帳票上に印刷しておき、その有無を認識して帳票種を識別する方法が一般的であったが、専用の帳票設計が必要で、既存業務のシステム化に際して帳票の切り替えに伴う手間とコストがかかってしまうこと、マークや記号上にノイズ・つぶれ・かすれが発生すると識別できないこと、が問題となっていた。   In the past, it was common to print a unique mark or symbol for each form type on the form and identify the form type by recognizing its presence, but a dedicated form design is required. The problem is that it takes time and cost to switch forms when systematizing existing business, and it cannot be identified if noise, collapse, or blur occurs on marks or symbols.

この問題を解決するため、例えば特許文献1では、罫線情報の照合にもとづいて帳票種識別を行う方法が示されている。この方法は、特有のマークや記号を必要とせず、罫線全体の情報を総合的に用いるので、入力画像の一部にノイズ・つぶれ・かすれがあっても識別が可能となるものの、罫線のない帳票には適用することができない。   In order to solve this problem, for example, Patent Document 1 discloses a method for identifying a form type based on collation of ruled line information. This method does not require any special marks or symbols, and comprehensively uses the information of the entire ruled line, so it can be identified even if there is noise, collapse, or blur in part of the input image, but there is no ruled line It cannot be applied to forms.

そこで、特許文献2に示された方法では、罫線に限らず、プレ印刷文字等を含めた複数の対応点を入力画像(データ画像)とリファレンス画像(マスター画像)との間で見い出し、対応点間の座標変換を求め、当該変換係数にもとづいて算出される相違度、あるいは係数と閾値との比較をもって、帳票種識別を行っている。   Therefore, in the method disclosed in Patent Document 2, a plurality of corresponding points including not only ruled lines but also pre-printed characters are found between the input image (data image) and the reference image (master image), and corresponding points are obtained. A coordinate conversion is obtained, and form type identification is performed by comparing the degree of difference calculated based on the conversion coefficient or the coefficient with a threshold value.

しかしながら、上記した方法では、デザイン・レイアウトの差異が小さい類似帳票種同士を正しく識別することが難しい。座標変換がもたらす幾何的なずれ作用・歪み作用の中には、異なる帳票種間で生じる「帳票デザイン・レイアウトの差異」による本質要因と、帳票種の同異を問わず生じる「帳票原稿上の文字記入・押印・汚れ」「画像データ上のノイズ・つぶれ・かすれ・傾き」による揺らぎ要因とが混在している。通常は、本質要因の及ぼす影響がずっと大きいので、十分に正しい識別を行うことができる。   However, with the method described above, it is difficult to correctly identify similar form types with small differences in design and layout. Among the geometrical displacement and distortion effects brought about by coordinate transformation, there are essential factors due to “form design / layout differences” that occur between different form types, and “on-form manuscripts” that occur regardless of the form type. Fluctuation factors due to text entry / stamping / dirt ”and“ noise, crushing, blurring, and tilt on image data ”are mixed. Usually, the influence of essential factors is much greater, so that a sufficiently correct identification can be made.

しかし、類似帳票種同士では本質要因の及ぼす影響が小さく、揺らぎ要因と同程度になってしまうことが多いため、結果的に識別を誤る可能性が高くなる。   However, since the effect of the essential factor is small between similar form types and is often the same as the fluctuation factor, the possibility of erroneous identification as a result increases.

本発明は、上記課題を鑑みてなされたものであり、その目的とするところは、専用の帳票を必要とせず、罫線のない帳票にも適用可能で、しかも類似帳票を正しく識別することができる画像識別装置および画像識別方法を提供することにある。   The present invention has been made in view of the above problems, and the object of the present invention is not to require a dedicated form, can be applied to a form without a ruled line, and can correctly identify a similar form. An object of the present invention is to provide an image identification device and an image identification method.

かかる目的を達成するために、本発明は、以下の特徴を有することとする。   In order to achieve this object, the present invention has the following features.

本発明に係る画像識別装置は、複数のマスター画像を入力するマスター画像入力手段と、ータ画像を入力するデータ画像入力手段と、マスター画像に対して指定されるマスク領域の組を入力するマスク領域入力手段と、マスター画像とデータ画像とを整合させる画像整合手段と、整合されたマスター画像とデータ画像との間で、マスク領域を除いた差分を抽出する差分抽出手段と、抽出された差分の大きさにもとづいてマスター画像とデータ画像との相違度を出力する相違度出力部と、を備え、差分抽出手段は、マスター画像上のマスク領域内の画素に前景属性を付与してデータ画像からマスター画像を減算した差分を抽出するマスター画像減算処理と、マスター画像上のマスク領域内の画素に背景属性を付与してマスター画像からデータ画像を減算した差分を抽出するデータ画像減算処理と、を行い、相違度出力部は、マスター画像減算処理により抽出された差分から第1の相違度と、データ画像減算処理により抽出された差分から第2の相違度と、を出力し、第1の相違度と第2の相違度を加算し、複数のマスター画像のうち、加算結果の最も小さいマスター画像がデータ画像と同種であると識別する、ことを特徴とする。
Image identification apparatus according to the present invention, the input and the master image input means for inputting a plurality of master images, a data image input means for inputting data image, a set of mask area designated for the master image A mask area input means, an image matching means for matching the master image and the data image, a difference extraction means for extracting the difference excluding the mask area between the matched master image and the data image, and extracted A difference output unit that outputs a difference between the master image and the data image based on the magnitude of the difference, and the difference extraction means assigns the foreground attribute to the pixels in the mask area on the master image and Master image subtraction processing to extract the difference obtained by subtracting the master image from the image, and data from the master image by adding background attributes to the pixels in the mask area on the master image A data image subtraction process for extracting a difference obtained by subtracting the image, and the difference output unit from the difference extracted by the master image subtraction process and the difference extracted by the data image subtraction process. The second difference degree is output, the first difference degree and the second difference degree are added, and the master image having the smallest addition result among the plurality of master images is identified as the same type as the data image. , characterized in that.

本発明によれば、特有のマークや記号、また罫線のない帳票を含めた、多種多様な定型帳票を対象に、類似帳票種の識別を正しく行うことができる。   According to the present invention, it is possible to correctly identify similar form types for a wide variety of standard forms including forms with no special marks, symbols, and ruled lines.

本発明の第1の実施形態による画像識別装置の構成図である。1 is a configuration diagram of an image identification device according to a first embodiment of the present invention. 本発明の第1の実施形態によるフローチャートを示す図である。It is a figure which shows the flowchart by the 1st Embodiment of this invention. 本発明の前景マスク処理を示す図である。It is a figure which shows the foreground mask process of this invention. 本発明の整合変形を示す図である。It is a figure which shows the alignment deformation | transformation of this invention. 本発明の太め処理を示す図である。It is a figure which shows the thickening process of this invention. 本発明の減算処理を示す図である。It is a figure which shows the subtraction process of this invention. 本発明のマスター画像減算結果を示す図である。It is a figure which shows the master image subtraction result of this invention. 本発明の第2の実施形態によるフローチャートを示す図である。It is a figure which shows the flowchart by the 2nd Embodiment of this invention. 本発明のデータ画像減算結果を示す図である。It is a figure which shows the data image subtraction result of this invention. 本発明の第3の実施形態によるマージン処理を示す図である。It is a figure which shows the margin process by the 3rd Embodiment of this invention. 本発明の第4の実施形態によるコンピュータを示す構成図である。It is a block diagram which shows the computer by the 4th Embodiment of this invention.

(第1の実施形態)
以下、発明の実施の形態について図面により詳細に説明する。図1は、本発明の第1の実施形態による画像識別装置の構成図である。
(First embodiment)
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a configuration diagram of an image identification device according to a first embodiment of the present invention.

画像識別装置は、マスター画像を入力するマスター画像入力部101と、データ画像を入力するデータ画像入力部102と、マスター画像とデータ画像とを整合させる画像整合部103と、マスター画像に対して指定されるマスク領域の組を入力するマスク領域入力部104と、整合されたマスター画像とデータ画像との間で、マスク領域を除いた差分を抽出する差分抽出部105と、抽出された差分の大きさに基づいてマスター画像とデータ画像との相違度を出力する相違度出力部106とを備えている。   The image identification device includes a master image input unit 101 for inputting a master image, a data image input unit 102 for inputting a data image, an image matching unit 103 for aligning the master image and the data image, and designation for the master image. A mask area input unit 104 that inputs a set of mask areas to be performed, a difference extraction unit 105 that extracts a difference excluding the mask area between the matched master image and the data image, and a size of the extracted difference And a difference output unit 106 that outputs a difference between the master image and the data image.

また、画像識別装置は、データを一時的に保存するマスター画像バッファ111とデータ画像バッファ112とアフィン変換係数バッファ113とマスク領域バッファ114と一時画像バッファA115と一時画像バッファB116とを備えている。   The image identification apparatus also includes a master image buffer 111 for temporarily storing data, a data image buffer 112, an affine transformation coefficient buffer 113, a mask area buffer 114, a temporary image buffer A115, and a temporary image buffer B116.

図2は、本発明の第1の実施形態によるフローチャートを示す図である。以下、図2のフローチャートを参照しながら本発明の処理動作を説明する。   FIG. 2 is a diagram showing a flowchart according to the first embodiment of the present invention. The processing operation of the present invention will be described below with reference to the flowchart of FIG.

まず、ある未記入帳票のマスター画像は、スキャナー等により構成されるマスター画像入力部101へ入力され(ステップS201)、白黒二値のデジタル画像データとしてマスター画像バッファ111へ保存される。同様に、何らかの記入済み帳票にあたるデータ画像は、スキャナー等により構成されるデータ画像入力部102へ入力され(ステップS202)、白黒二値のデジタル画像データとしてデータ画像バッファ112へ保存される。   First, a master image of a certain blank form is input to the master image input unit 101 configured by a scanner or the like (step S201), and is stored in the master image buffer 111 as black and white binary digital image data. Similarly, a data image corresponding to some completed form is input to the data image input unit 102 configured by a scanner or the like (step S202), and is stored in the data image buffer 112 as monochrome binary digital image data.

また、マスター画像上で文字が記入され得る矩形領域であるマスク領域の組は、各矩形の始点座標と終点座標からなるデータ列としてマスク領域入力部104に入力され(ステップS203)、マスク領域バッファ114へ保存される。   A set of mask areas, which are rectangular areas in which characters can be entered on the master image, is input to the mask area input unit 104 as a data string composed of the start point coordinates and end point coordinates of each rectangle (step S203), and the mask area buffer. 114 is stored.

つづいて、画像整合部103にて、バッファ上のマスター画像とデータ画像を互いに整合させるためのアフィン変換を求める(ステップS204)。本実施形態では、データ画像平面をマスター画像平面へ写像するアフィン変換のみを求め、その逆変換を求めることはしない。このアフィン変換を求める処理については公知の方法を用いることとし、ここでは説明を省略する。もし、マスター画像とデータ画像の差異があまりに大きい等の理由により、適切なアフィン変換を求めることができなかった場合は(ステップS204、No)、この時点で、データ画像をリジェクトする(ステップS205)。   Subsequently, the image matching unit 103 obtains affine transformation for matching the master image and the data image on the buffer with each other (step S204). In this embodiment, only the affine transformation that maps the data image plane to the master image plane is obtained, and the inverse transformation is not obtained. A known method is used for the process for obtaining the affine transformation, and the description is omitted here. If an appropriate affine transformation cannot be obtained because the difference between the master image and the data image is too large (step S204, No), the data image is rejected at this point (step S205). .

適切なアフィン変換が求まるとき(ステップS204、Yes)、その変換式は次のようなものである。   When an appropriate affine transformation is found (step S204, Yes), the transformation formula is as follows.

[式1]
X=a*x+b*y+e
Y=c*x+d*y+f
(x,y):データ画像上の座標
(X,Y):対応するマスター画像上の座標
a,b,c,d,e,f:アフィン変換係数
[Formula 1]
X = a * x + b * y + e
Y = c * x + d * y + f
(X, y): coordinates (X, Y) on the data image: coordinates a, b, c, d, e, f on the corresponding master image: affine transformation coefficients

式中の係数a〜fは、アフィン変換係数バッファ113へ保存される。   The coefficients a to f in the formula are stored in the affine transformation coefficient buffer 113.

つづいて、図3に示すように、差分抽出部105にて、入力マスター画像に対し、マスク領域のいずれかに含まれるすべての画素値を、前景である黒に置き換えた画像データを一時画像バッファA115に作成する(ステップS206)。これは白画素=0・黒画素=1で表現される二値画像の場合、マスク領域内部の画素値をすべて1に置き換えることに相当する。視覚的には、マスター画像上で文字が記入され得る領域を黒く塗りつぶしたことになる。   Subsequently, as shown in FIG. 3, the difference extraction unit 105 converts the image data in which all pixel values included in any of the mask areas are replaced with black as the foreground with respect to the input master image by the temporary image buffer. A115 is created (step S206). This is equivalent to replacing all pixel values in the mask area with 1 in the case of a binary image expressed by white pixels = 0 and black pixels = 1. Visually, the area where characters can be written on the master image is blacked out.

つづいて、データ画像座標(x,y)から、式1によって対応させられる一時画像バッファAの座標(X,Y)の画素値を各々並べた画像データを、一時画像バッファB116に作成する。この際、式1から求まる座標(X,Y)は小数点以下四捨五入するものとし、これがもしマスター画像の範囲をはみ出すような場合には、画素値=白とみなす。   Subsequently, image data in which the pixel values of the coordinates (X, Y) of the temporary image buffer A corresponding to Equation 1 are arranged from the data image coordinates (x, y) is created in the temporary image buffer B116. At this time, the coordinates (X, Y) obtained from Equation 1 are rounded off after the decimal point. If this is beyond the range of the master image, the pixel value is regarded as white.

図4に示すように、一時画像バッファB上の画像データは、データ画像と同じ幅・高さを持つ画像データであり、アフィン変換にもとづいてマスター画像をデータ画像に整合するよう変形させた結果とみなすことができる(ステップS207)。   As shown in FIG. 4, the image data on the temporary image buffer B is image data having the same width and height as the data image, and the result of deforming the master image to match the data image based on the affine transformation. (Step S207).

つづいて、一時画像バッファB上の、前景マスク+整合変形されたマスター画像に対し、太め処理を行う。ここでは例として、図5に示すように、バッファ上の各黒画素について、当画素を中心とする3×3画素をすべて黒にする(ステップS208)。太め処理は、後段の減算処理において、アフィン変換が有する整合誤差を吸収するために行われる。太め処理された結果画像データは、一時画像バッファAに、既存内容を破棄して上書きされる。   Subsequently, a thickening process is performed on the foreground mask + aligned master image on the temporary image buffer B. Here, as an example, as shown in FIG. 5, for each black pixel on the buffer, all 3 × 3 pixels centering on this pixel are made black (step S208). The thickening process is performed in order to absorb the matching error of the affine transformation in the subsequent subtraction process. The thickened result image data is overwritten in the temporary image buffer A by discarding the existing contents.

つづいて、データ画像から、前景マスク+整合変形+太め処理されたマスター画像を減算する(ステップS209)。画像の減算とは、データ画像バッファのある座標(x,y)の画素値をCd、一時画像バッファAの同座標の画素値をCmとしたとき、同座標における減算結果の画素値Csを、
・Cd=黒、Cm=黒ならばCs=白
・Cd=白、Cm=黒ならばCs=白
・Cd=黒、Cm=白ならばCs=黒
・Cd=白、Cm=白ならばCs=白
により決定する演算である(図6)。
Subsequently, the master image subjected to the foreground mask + alignment deformation + thickening process is subtracted from the data image (step S209). Image subtraction means that the pixel value Cs of the coordinate (x, y) in the data image buffer is Cd, and the pixel value of the same coordinate in the temporary image buffer A is Cm.
Cs = white if Cd = black, Cm = black Cs = white if Cd = white, Cs = white if Cm = black Cs = black if Cd = black, Cm = white Cs = black if Cd = white, Cm = white = Calculation determined by white (FIG. 6).

減算結果は、データ画像と同じ幅・高さを持つ画像データであり、帳票のプレ印刷部分、および予め文字が記入され得るとわかっているマスク領域を除いて、「未記入帳票には存在せず、記入済み帳票のみに存在する」差分が、黒画素として残っていると考えられる。前述の太め処理によって、マスター画像側の黒画素部分をやや広げてあるので、アフィン変換係数の推定誤差や座標値の四捨五入に起因する若干の整合誤差は、広げた黒画素範囲に吸収される。こうして得られた減算結果は、一時画像バッファBに、既存内容を破棄して上書きされる。   The result of subtraction is image data with the same width and height as the data image. Except for the pre-printed part of the form and the mask area where it is known that characters can be entered in advance, “ It is considered that the difference that exists only in the completed form remains as a black pixel. Since the black pixel portion on the master image side is slightly widened by the thickening process described above, a slight matching error caused by the estimation error of the affine transformation coefficient and the rounding off of the coordinate value is absorbed in the widened black pixel range. The subtraction result obtained in this way is overwritten in the temporary image buffer B by discarding the existing contents.

つづいて、相違度出力部106にて、一時画像バッファB上の黒画素数をカウントし(ステップS210)、結果に対する画像サイズの影響を抑えるため、データ画像の面積で正規化した値を、相違度として出力する(ステップS211)。すなわち、   Subsequently, the dissimilarity output unit 106 counts the number of black pixels on the temporary image buffer B (step S210), and in order to suppress the influence of the image size on the result, the value normalized by the area of the data image is changed. It outputs as a degree (step S211). That is,

[式2]
S=N/(W*H)
S:相違度
N:一時画像バッファB上の黒画素数
W:データ画像の幅
H:データ画像の高さ
[Formula 2]
S = N / (W * H)
S: degree of difference N: number of black pixels on temporary image buffer B W: width of data image H: height of data image

こうしてデータ画像と1つのマスター画像との相違度Sが得られる。データ画像が当該マスター画像と同じ帳票種であれば、減算結果画像は真っ白に近いはずなので、Sは低くなる。一方、データ画像が当該マスター画像とデザイン・レイアウトが異なる帳票種であれば、たとえ類似帳票同士であったとしても、減算結果画像には目視ではっきり確認できる大きさの黒画素塊が相当数残存するはずなので、Sは高くなる(図7)。   In this way, the degree of difference S between the data image and one master image is obtained. If the data image is the same form type as the master image, the subtraction result image should be nearly white, so S is low. On the other hand, if the data image has a form type that is different in design and layout from the master image, a considerable number of black pixel blocks of a size that can be clearly confirmed visually remain in the subtraction result image even if they are similar forms. Since S should be done, S becomes high (FIG. 7).

すべてのマスター画像について、上記の方法を適用して相違度を取得した後、最も相違度の低いマスター画像の帳票種を、当該データ画像の帳票種であると判定することにより、画像識別(帳票種識別)が実現される。   After obtaining the degree of difference for all master images by applying the above method, the image type (form) is determined by determining that the form type of the master image having the lowest degree of difference is the form type of the data image. Species identification) is realized.

(第2の実施形態)
処理の前半は、先の第1の実施形態と同じであるから説明を省略する。第1の実施形態との違いは、差分抽出処理部にて、第1の実施形態で求めた相違度Sと異なる第2の相違度Tを算出し、画像識別に用いることである。
(Second Embodiment)
Since the first half of the process is the same as that of the first embodiment, the description thereof is omitted. The difference from the first embodiment is that the difference extraction processing unit calculates a second difference T that is different from the difference S obtained in the first embodiment and uses it for image identification.

図8は、本発明の第2の実施形態によるフローチャートを示す図である。以下、図8のフローチャートを参照しながら本発明の処理動作を説明する。   FIG. 8 is a diagram showing a flowchart according to the second embodiment of the present invention. The processing operation of the present invention will be described below with reference to the flowchart of FIG.

ここではまず、第1の実施形態に従って、第1の相違度Sを算出する。続いて、差分抽出部にて、入力マスター画像に対し、マスク領域のいずれかに含まれるすべての画素値を、背景である白に置き換えた画像データを一時画像バッファAに、既存内容を破棄して上書きする(ステップS301)。これは白画素=0・黒画素=1で表現される二値画像の場合、マスク領域内部の画素値をすべて0に置き換えることに相当する。視覚的には、マスター画像上で文字が記入され得る領域を白く塗り潰したことになる。   Here, first, the first difference S is calculated according to the first embodiment. Subsequently, the difference extraction unit discards the existing contents in the temporary image buffer A with the image data in which all the pixel values included in any of the mask areas are replaced with white as the background for the input master image. Overwriting (step S301). This is equivalent to replacing all pixel values in the mask area with 0 in the case of a binary image represented by white pixels = 0 and black pixels = 1. Visually, an area where characters can be written on the master image is painted white.

つづいて、第1の実施形態と同様に、アフィン変換に基づいてマスター画像をデータ画像に整合するよう変形させた画像データを、一時画像バッファBに、既存内容を破棄して上書きする(ステップS302)。   Subsequently, as in the first embodiment, image data obtained by deforming the master image to match the data image based on the affine transformation is overwritten in the temporary image buffer B by discarding the existing contents (step S302). ).

つづいて、データ画像バッファ上のデータ画像に対し、第1の実施形態と同じ太め処理を行う(ステップS303)。太め処理された結果画像データは、一時画像バッファAに、既存内容を破棄して上書きされる。   Subsequently, the same thickening process as in the first embodiment is performed on the data image in the data image buffer (step S303). The thickened result image data is overwritten in the temporary image buffer A by discarding the existing contents.

つづいて、背景マスク+整合変形処理されたマスター画像から、太め処理されたデータ画像を減算する(ステップS304)。この減算も第1の実施形態と同様、一時画像バッファBのある座標(x,y)の画素値をCm、一時画像バッファAの同座標の画素値をCdとしたとき、同座標における減算結果の画素値Csを、
・Cm=黒、Cd=黒ならばCs=白
・Cm=白、Cd=黒ならばCs=白
・Cm=黒、Cd=白ならばCs=黒
・Cm=白、Cd=白ならばCs=白
により決定する演算である。
Subsequently, the data image subjected to the thickening process is subtracted from the master image subjected to the background mask + alignment deformation process (step S304). Similarly to the first embodiment, this subtraction is also the result of subtraction at the same coordinates when the pixel value at a certain coordinate (x, y) in the temporary image buffer B is Cm and the pixel value at the same coordinate in the temporary image buffer A is Cd. Pixel value Cs of
Cs = white if Cm = black, Cd = black Cs = white if Cm = white, Cd = black Cs = black if Cm = black, Cd = white Cs = black if Cm = white, Cd = white = Operation determined by white.

減算結果は、データ画像と同じ幅・高さを持つ画像データであり、「未記入帳票に存在していたのが、記入済み帳票では存在しない」差分が、黒画素として残っていると考えられる。前述の太め処理によってデータ画像側の黒画素部分をやや広げてあるので、アフィン変換係数の推定誤差や座標値の四捨五入に起因する若干の整合誤差は、広げた黒画素範囲に吸収される。こうして得られた減算結果は、一時画像バッファBに、既存内容を破棄して上書きされる。   The subtraction result is image data with the same width and height as the data image, and it is considered that the difference that “existed in the unfilled form but not in the filled form” remains as a black pixel. . Since the black pixel portion on the data image side is slightly widened by the above-described thickening process, a slight matching error due to the estimation error of the affine transformation coefficient and the rounding off of the coordinate value is absorbed in the widened black pixel range. The subtraction result obtained in this way is overwritten in the temporary image buffer B by discarding the existing contents.

つづいて、相違度出力部にて、一時画像バッファB上の黒画素数をカウントし(ステップS305)、結果に対する画像サイズの影響を抑えるため、データ画像の面積で正規化した値を、第2の相違度として出力する(ステップS306)。すなわち、   Subsequently, the difference output unit counts the number of black pixels on the temporary image buffer B (step S305). In order to suppress the influence of the image size on the result, the value normalized by the area of the data image is set to the second value. Is output as the difference degree (step S306). That is,

[式3]
T=K/(W*H)
T:第2相違度
K:一時画像バッファB上の黒画素数
W:データ画像の幅
H:データ画像の高さ
[Formula 3]
T = K / (W * H)
T: Second degree of difference K: Number of black pixels on temporary image buffer B W: Width of data image H: Height of data image

こうしてデータ画像と1つのマスター画像との第2相違度Tが得られる。データ画像が当該マスター画像と同じ帳票種であれば、減算結果画像は真っ白に近いはずなので、Tは低くなる。一方、データ画像が当該マスター画像とデザイン・レイアウトが異なる帳票種であれば、たとえ類似帳票同士であったとしても、減算結果画像には目視ではっきり確認できる大きさの黒画素塊が相当数残存するはずなので、Tは高くなる(図9)。   In this way, the second difference T between the data image and one master image is obtained. If the data image is the same form type as that of the master image, the subtraction result image should be nearly white, so T is low. On the other hand, if the data image has a form type that is different in design and layout from the master image, a considerable number of black pixel blocks of a size that can be clearly confirmed visually remain in the subtraction result image even if they are similar forms. T should be high (FIG. 9).

すべてのマスター画像について、上記の方法を適用して相違度S、Tを取得した後、両者の和(S+T)が最も低いマスター画像の帳票種を、当該データ画像の帳票種であると判定することにより、画像識別(帳票種識別)が実現される。   After obtaining the dissimilarities S and T by applying the above method for all master images, the form type of the master image having the lowest sum (S + T) is determined to be the form type of the data image. Thus, image identification (form type identification) is realized.

(第3の実施形態)
マスター画像やデータ画像の原稿をスキャナー等で読み取る際には、紙のゆがみ・パンチ穴・スキャナー台への原稿の置き方・その他の要因により、画像の端に近い箇所に大きな影が写り込む場合がある。また、原稿がFAX受信文書である場合、上端や下端付近に受信日時や発信元が印字されてしまうことがある。これらはいずれも、差分にもとづく画像識別をかく乱する揺らぎ要因となり得る。
(Third embodiment)
When scanning a master image or data image document with a scanner, etc., large shadows appear near the edges of the image due to paper distortion, punch holes, how to place the document on the scanner table, and other factors. There is. If the document is a FAX reception document, the reception date and time and the sender may be printed near the top and bottom. Any of these can be fluctuation factors that disturb image identification based on the difference.

第3の実施形態は、そのような揺らぎ要因を排除するためのものである。処理のほとんどは、先の第1または第2の実施形態と同じであるから説明を省略する。第1または第2の実施形態との違いは、差分抽出部の最初に、マスター画像およびデータ画像の端から所定幅のマージン部分を、白画素に置き換える処理を実行することである。   The third embodiment is for eliminating such a fluctuation factor. Since most of the processing is the same as in the first or second embodiment, description thereof is omitted. The difference from the first or second embodiment is that, at the beginning of the difference extraction unit, a process of replacing a margin part having a predetermined width from the ends of the master image and the data image with a white pixel is executed.

具体的には、式1のアフィン変換が求まった後に続く処理として行う。本実施形態では、マージン幅を15ミリメートルとし、横解像度Hx(dpi)と縦解像度Hy(dpi)は、データ画像とマスター画像の間で一致しているものとする。すると、ミリメートルをピクセルに変換した横マージン画素幅Mx・縦マージン画素幅Myは、次のようになる。   Specifically, it is performed as a subsequent process after the affine transformation of Expression 1 is obtained. In this embodiment, it is assumed that the margin width is 15 millimeters, and the horizontal resolution Hx (dpi) and the vertical resolution Hy (dpi) match between the data image and the master image. Then, the horizontal margin pixel width Mx and the vertical margin pixel width My obtained by converting millimeters into pixels are as follows.

[式4]
Mx=Hx*15/25.4 (小数点以下切捨て)
My=Hy*15/25.4 (小数点以下切捨て)
[Formula 4]
Mx = Hx * 15 / 25.4 (rounded down)
My = Hy * 15 / 25.4 (rounded down)

そして、マスター画像バッファ、およびデータ画像バッファ上の画像データに対し、図10に例示した点線から外側の領域に含まれるすべての画素値を白に置き換える。以降は第1または第2の実施形態に従う。   Then, for the image data on the master image buffer and the data image buffer, all pixel values included in the area outside the dotted line illustrated in FIG. 10 are replaced with white. Thereafter, the process follows the first or second embodiment.

(第4の実施形態)
本発明は、コンピュータ上のプログラムに実行させることもできる。図11は、本発明の第4の実施形態によるコンピュータを示す構成図である。
(Fourth embodiment)
The present invention can also be executed by a program on a computer. FIG. 11 is a block diagram showing a computer according to the fourth embodiment of the present invention.

CD−ROM401等の記録媒体に記録された本発明に関わるプログラムは、図のCD−ROMドライブ402を通じて(一旦ハードディスク403に蓄えられることもある)、実行時にはメモリ404上にロードされ、CPU405からの指令によってプログラムの処理ステップが順次実行される。マスター画像およびデータ画像に相当するデジタル画像データは、あらかじめハードディスク403上に蓄えられるか、または実行時に図示しないスキャナーを通じて取り込まれた後、メモリ404上にロードされて参照される。   A program related to the present invention recorded on a recording medium such as a CD-ROM 401 is loaded onto the memory 404 at the time of execution through the CD-ROM drive 402 shown in FIG. The processing steps of the program are sequentially executed according to the command. Digital image data corresponding to a master image and a data image is stored in advance on the hard disk 403, or taken in through a scanner (not shown) at the time of execution, and then loaded on the memory 404 for reference.

検査の判定結果は、メモリ404に保存され、必要に応じてハードディスク403に書き出されたり、ディスプレイ406に出力されたり、通信装置407を介してネットワーク上へ送出されたり、あるいは図示しないプリンターを通じて紙上に印字される。   The determination result of the inspection is stored in the memory 404, written to the hard disk 403 as necessary, output to the display 406, sent to the network via the communication device 407, or on paper via a printer (not shown). Is printed.

101 マスター画像入力部
102 データ画像入力部
103 画像整合部
104 マスク領域入力部
105 差分抽出部
106 相違度出力部
DESCRIPTION OF SYMBOLS 101 Master image input part 102 Data image input part 103 Image matching part 104 Mask area | region input part 105 Difference extraction part 106 Difference output part

特開2003−109007号公報JP 2003-109007 A 特許第3932201号公報Japanese Patent No. 3932201

Claims (8)

複数のマスター画像を入力するマスター画像入力手段と、
ータ画像を入力するデータ画像入力手段と、
前記マスター画像に対して指定されるマスク領域の組を入力するマスク領域入力手段と、
前記マスター画像と前記データ画像とを整合させる画像整合手段と、
前記整合されたマスター画像とデータ画像との間で、前記マスク領域を除いた差分を抽出する差分抽出手段と、
抽出された差分の大きさに基づいて前記マスター画像と前記データ画像との相違度を出力する相違度出力部と、
を備え
前記差分抽出手段は、前記マスター画像上の前記マスク領域内の画素に前景属性を付与して前記データ画像から前記マスター画像を減算した差分を抽出するマスター画像減算処理と、前記マスター画像上の前記マスク領域内の画素に背景属性を付与して前記マスター画像から前記データ画像を減算した差分を抽出するデータ画像減算処理と、を行い、
前記相違度出力部は、前記マスター画像減算処理により抽出された差分から第1の相違度と、前記データ画像減算処理により抽出された差分から第2の相違度と、を出力し、
前記第1の相違度と前記第2の相違度を加算し、前記複数のマスター画像のうち、加算結果の最も小さいマスター画像が前記データ画像と同種であると識別する、
ことを特徴とする画像識別装置。
Master image input means for inputting a plurality of master images;
And a data image input means for inputting the data image,
Mask area input means for inputting a set of mask areas designated for the master image;
Image alignment means for aligning the master image and the data image;
A difference extracting means for extracting a difference excluding the mask region between the matched master image and the data image;
A difference output unit that outputs a difference between the master image and the data image based on the size of the extracted difference;
Equipped with a,
The difference extraction means includes a master image subtraction process for extracting a difference obtained by subtracting the master image from the data image by assigning a foreground attribute to pixels in the mask region on the master image, and the master image on the master image. A data image subtraction process for extracting a difference obtained by subtracting the data image from the master image by adding a background attribute to the pixels in the mask region, and
The difference output unit outputs a first difference from a difference extracted by the master image subtraction process and a second difference from a difference extracted by the data image subtraction process,
Adding the first dissimilarity and the second dissimilarity and identifying that the master image having the smallest addition result among the plurality of master images is the same type as the data image;
An image identification apparatus characterized by the above.
前記画像整合手段において、データ画像平面をマスター画像平面へ写像するアフィン変換、またはその逆変換を求め
前記アフィン変換、またはその逆変換後の画像上の該画素について、該画素を中心とする所定の領域の画素の画素値を該画素の画素値に合わせて変更する、
ことを特徴とする請求項1記載の画像識別装置。
In the image matching means, the affine transformation for mapping the data image plane to the master image plane, or the inverse transformation thereof , is obtained .
For the pixel on the image after the affine transformation or its inverse transformation, the pixel value of a pixel in a predetermined region centered on the pixel is changed according to the pixel value of the pixel.
The image identification apparatus according to claim 1.
前記差分抽出手段において、前記マスター画像および前記データ画像の端から一定の、または都度動的に決定される幅のマージンに含まれる画素に背景属性を付与するマージン処理を行うことを特徴とする、請求項1、または2のいずれか1項に記載の画像識別装置。 In the difference extraction means, margin processing is performed for adding a background attribute to pixels included in a margin of a width that is constant or dynamically determined from the edges of the master image and the data image. The image identification device according to claim 1 . 複数のマスター画像、ータ画像、および前記マスター画像に対して指定されるマスク領域の組を入力するステップと、
前記マスター画像と前記データ画像とを整合させるステップと、
前記マスター画像上の前記マスク領域内の画素に前景属性を付与して前記データ画像から前記マスター画像を減算した差分を抽出するマスター画像減算ステップと、
前記マスター画像上の前記マスク領域内の画素に背景属性を付与して前記マスター画像から前記データ画像を減算した差分を抽出するデータ画像減算ステップと、
前記マスター画像減算ステップにより抽出された差分から第1の相違度と、前記データ画像減算ステップにより抽出された差分から第2の相違度と、を出力するステップと、
前記第1の相違度と前記第2の相違度を加算し、前記複数のマスター画像のうち、加算結果の最も小さいマスター画像が前記データ画像と同種であると識別するステップと、からなることを特徴とする画像識別方法。
Inputting a plurality of master images, data image, and a set of mask area specified with respect to the master image,
Aligning the master image and the data image;
A master image subtraction step for extracting a difference obtained by subtracting the master image from the data image by assigning a foreground attribute to pixels in the mask region on the master image;
A data image subtraction step for extracting a difference obtained by subtracting the data image from the master image by giving a background attribute to the pixels in the mask area on the master image;
Outputting a first difference from the difference extracted by the master image subtraction step and a second difference from the difference extracted by the data image subtraction step;
Adding the first dissimilarity and the second dissimilarity, and identifying the master image having the smallest addition result among the plurality of master images as being of the same type as the data image. A feature of the image identification method.
前記マスター画像と前記データ画像とを整合させるステップは、データ画像平面をマスター画像平面へ写像するアフィン変換、またはその逆変換を求めるステップと、
前記アフィン変換、またはその逆変換後の画像上の該画素について、該画素を中心とする所定の領域の画素の画素値を該画素の画素値に合わせて変更するステップと、
を含むことを特徴とする、請求項記載の画像識別方法。
The step of aligning the master image and the data image includes obtaining an affine transformation for mapping a data image plane to a master image plane, or an inverse transformation thereof .
For the pixel on the image after the affine transformation or its inverse transformation, changing a pixel value of a pixel in a predetermined region centered on the pixel according to the pixel value of the pixel;
The image identification method according to claim 4 , further comprising:
前記整合されたマスター画像とデータ画像との間で、前記マスク領域を除いた差分を抽出するステップは、データ画像上で前景にあたり、かつ対応するマスター画像上の点が背景にあたり、かつ当該点が前記マスク領域のいずれにも包含されない点の集合を求めるステップを含むことを特徴とする、請求項4または5記載の画像識別方法。 The step of extracting the difference excluding the mask region between the matched master image and the data image is a foreground on the data image, a corresponding point on the master image is a background, and the point is 6. The image identification method according to claim 4 , further comprising a step of obtaining a set of points not included in any of the mask regions. 前記整合されたマスター画像とデータ画像との間で、前記マスク領域を除いた差分を抽出するステップは、前記データ画像上で背景にあたり、かつ対応する前記マスター画像上の点が前景にあたり、かつ当該点が前記マスク領域のいずれにも包含されない点の集合を求めるステップを含むことを特徴とする、請求項4〜6のいずれか1項に記載の画像識別方法。 The step of extracting the difference excluding the mask area between the matched master image and the data image is a background on the data image, and a corresponding point on the master image is a foreground, and The image identification method according to claim 4 , further comprising a step of obtaining a set of points whose points are not included in any of the mask regions. 前記整合されたマスター画像とデータ画像との間で、前記マスク領域を除いた差分を抽出するステップは、前記マスター画像および前記データ画像の端から一定の、または都度動的に決定される幅のマージンを除いて差分を抽出することを特徴とする、請求項4〜7のいずれか1項に記載の画像識別方法。 The step of extracting the difference excluding the mask area between the aligned master image and the data image has a width that is constant or dynamically determined from the edges of the master image and the data image. The image identification method according to claim 4 , wherein a difference is extracted except for a margin.
JP2011199273A 2011-09-13 2011-09-13 Image identification apparatus and image identification method Active JP5807464B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011199273A JP5807464B2 (en) 2011-09-13 2011-09-13 Image identification apparatus and image identification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011199273A JP5807464B2 (en) 2011-09-13 2011-09-13 Image identification apparatus and image identification method

Publications (2)

Publication Number Publication Date
JP2013061764A JP2013061764A (en) 2013-04-04
JP5807464B2 true JP5807464B2 (en) 2015-11-10

Family

ID=48186397

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011199273A Active JP5807464B2 (en) 2011-09-13 2011-09-13 Image identification apparatus and image identification method

Country Status (1)

Country Link
JP (1) JP5807464B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002218233A (en) * 2001-01-22 2002-08-02 Canon Inc Image processor and image processing method
JP2002312346A (en) * 2001-04-18 2002-10-25 Sharp Corp Print data input device and computer software
JP2003187217A (en) * 2001-12-20 2003-07-04 Nef:Kk Image retrieval system
JP2009252041A (en) * 2008-04-08 2009-10-29 Hitachi Ltd Business form image management system, method, and program
JP2010146208A (en) * 2008-12-17 2010-07-01 Fuji Xerox Co Ltd Information processing apparatus and program

Also Published As

Publication number Publication date
JP2013061764A (en) 2013-04-04

Similar Documents

Publication Publication Date Title
US7965892B2 (en) Image processing apparatus, control method thereof, and program
US7965894B2 (en) Method for detecting alterations in printed document using image comparison analyses
JP5934762B2 (en) Document modification detection method by character comparison using character shape characteristics, computer program, recording medium, and information processing apparatus
JP5669957B2 (en) Watermark image segmentation method and apparatus for Western language watermark processing
JP4539756B2 (en) Image processing apparatus and image processing program
US7796817B2 (en) Character recognition method, character recognition device, and computer product
KR101224936B1 (en) Image processing apparatus, image forming apparatus and computer readable medium
JP4565396B2 (en) Image processing apparatus and image processing program
JP4275973B2 (en) Retouched image extraction apparatus, program, storage medium, and retouched image extraction method
JP3989733B2 (en) Correction of distortion in form processing
JP2009223477A (en) Information processor and information processing program
JP6780271B2 (en) Image processing equipment and image processing program
KR20150099116A (en) Method for recognizing a color character using optical character recognition and apparatus thereof
JP2010079507A (en) Image processor and image processing program
JP5807464B2 (en) Image identification apparatus and image identification method
US6983071B2 (en) Character segmentation device, character segmentation method used thereby, and program therefor
JP4420440B2 (en) Image processing apparatus, image processing method, character recognition apparatus, program, and recording medium
US11570331B2 (en) Image processing apparatus, image processing method, and storage medium
CN104715248B (en) A kind of recognition methods to email advertisement picture
JP5146199B2 (en) Difference extraction apparatus and difference extraction program
JP5262778B2 (en) Image processing apparatus and image processing program
JP2012022413A (en) Image processing apparatus, image processing method and program
WO2017088478A1 (en) Number separating method and device
US11778122B2 (en) Apparatus, method, and storage medium for removing shading dots
JP4792117B2 (en) Document image processing apparatus, document image processing method, and document image processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140812

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150518

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150526

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150722

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20150811

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150824

R151 Written notification of patent or utility model registration

Ref document number: 5807464

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151