JP5807464B2 - Image identification apparatus and image identification method - Google Patents
Image identification apparatus and image identification method Download PDFInfo
- 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.)
- Expired - Fee Related
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,
そこで、特許文献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は、本発明の第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
また、画像識別装置は、データを一時的に保存するマスター画像バッファ111とデータ画像バッファ112とアフィン変換係数バッファ113とマスク領域バッファ114と一時画像バッファA115と一時画像バッファB116とを備えている。
The image identification apparatus also includes a
図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
また、マスター画像上で文字が記入され得る矩形領域であるマスク領域の組は、各矩形の始点座標と終点座標からなるデータ列としてマスク領域入力部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
つづいて、画像整合部103にて、バッファ上のマスター画像とデータ画像を互いに整合させるためのアフィン変換を求める(ステップS204)。本実施形態では、データ画像平面をマスター画像平面へ写像するアフィン変換のみを求め、その逆変換を求めることはしない。このアフィン変換を求める処理については公知の方法を用いることとし、ここでは説明を省略する。もし、マスター画像とデータ画像の差異があまりに大きい等の理由により、適切なアフィン変換を求めることができなかった場合は(ステップS204、No)、この時点で、データ画像をリジェクトする(ステップS205)。
Subsequently, the
適切なアフィン変換が求まるとき(ステップ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
つづいて、図3に示すように、差分抽出部105にて、入力マスター画像に対し、マスク領域のいずれかに含まれるすべての画素値を、前景である黒に置き換えた画像データを一時画像バッファA115に作成する(ステップS206)。これは白画素=0・黒画素=1で表現される二値画像の場合、マスク領域内部の画素値をすべて1に置き換えることに相当する。視覚的には、マスター画像上で文字が記入され得る領域を黒く塗りつぶしたことになる。
Subsequently, as shown in FIG. 3, the
つづいて、データ画像座標(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
図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
[式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
[式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-
検査の判定結果は、メモリ404に保存され、必要に応じてハードディスク403に書き出されたり、ディスプレイ406に出力されたり、通信装置407を介してネットワーク上へ送出されたり、あるいは図示しないプリンターを通じて紙上に印字される。
The determination result of the inspection is stored in the
101 マスター画像入力部
102 データ画像入力部
103 画像整合部
104 マスク領域入力部
105 差分抽出部
106 相違度出力部
DESCRIPTION OF
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の相違度と前記第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.
前記アフィン変換、またはその逆変換後の画像上の該画素について、該画素を中心とする所定の領域の画素の画素値を該画素の画素値に合わせて変更するステップと、
を含むことを特徴とする、請求項4記載の画像識別方法。 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:
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 Expired - Fee Related 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)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2002218233A (en) * | 2001-01-22 | 2002-08-02 | Canon Inc | Image processing apparatus and image processing method |
| JP2002312346A (en) * | 2001-04-18 | 2002-10-25 | Sharp Corp | Print data input creation 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 |
-
2011
- 2011-09-13 JP JP2011199273A patent/JP5807464B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2013061764A (en) | 2013-04-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7965894B2 (en) | Method for detecting alterations in printed document using image comparison analyses | |
| US7965892B2 (en) | Image processing apparatus, control method thereof, and program | |
| 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 | |
| US7796817B2 (en) | Character recognition method, character recognition device, and computer product | |
| JP4539756B2 (en) | Image processing apparatus and image processing program | |
| JP4275973B2 (en) | Retouched image extraction apparatus, program, storage medium, and retouched image extraction method | |
| JP6780271B2 (en) | Image processing equipment and image processing program | |
| JP2010074342A (en) | Image processing apparatus, image forming apparatus, and program | |
| JP3989733B2 (en) | Correction of distortion in form processing | |
| KR20150099116A (en) | Method for recognizing a color character using optical character recognition and apparatus thereof | |
| JP2009223477A (en) | Information processor and information processing program | |
| US11570331B2 (en) | Image processing apparatus, image processing method, and storage medium | |
| CN100530219C (en) | Image processing apparatus | |
| JP2010079507A (en) | Image processor and image processing program | |
| JP4420440B2 (en) | Image processing apparatus, image processing method, character recognition apparatus, program, and recording medium | |
| JP5807464B2 (en) | Image identification apparatus and image identification method | |
| JP4565396B2 (en) | Image processing apparatus and image processing program | |
| US20220343666A1 (en) | Image processing apparatus, image processing method, and storage medium | |
| JP2002342710A (en) | Character segmenting device and character segmenting method used for the same device and its program | |
| JP5146199B2 (en) | Difference extraction apparatus and difference extraction program | |
| CN102194116B (en) | Document image processing system and document image processing method | |
| JP5262778B2 (en) | Image processing apparatus and image processing program | |
| JP5923981B2 (en) | Image processing apparatus and image processing program | |
| US20250131575A1 (en) | Image processing apparatus and control method for image processing apparatus |
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 | Request for written amendment filed |
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 |
|
| LAPS | Cancellation because of no payment of annual fees |