JP3714647B2 - Image position detection method - Google Patents

Image position detection method Download PDF

Info

Publication number
JP3714647B2
JP3714647B2 JP03973997A JP3973997A JP3714647B2 JP 3714647 B2 JP3714647 B2 JP 3714647B2 JP 03973997 A JP03973997 A JP 03973997A JP 3973997 A JP3973997 A JP 3973997A JP 3714647 B2 JP3714647 B2 JP 3714647B2
Authority
JP
Japan
Prior art keywords
image
binary
input
product
watermark
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
Application number
JP03973997A
Other languages
Japanese (ja)
Other versions
JPH10222677A (en
Inventor
澄 喜多野
Original Assignee
独立行政法人 国立印刷局
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 独立行政法人 国立印刷局 filed Critical 独立行政法人 国立印刷局
Priority to JP03973997A priority Critical patent/JP3714647B2/en
Publication of JPH10222677A publication Critical patent/JPH10222677A/en
Application granted granted Critical
Publication of JP3714647B2 publication Critical patent/JP3714647B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【産業上の利用分野】
本発明は、透過光を用いて入力した紙の透かし画像の位置を検出する方法に関する。
【0002】
【従来の技術】
従来、紙の透かし画像の位置検出は、人間の目視によって行われるものが主体であった。例えば、透かし画像を有する基準となる紙と、同じ透かし画像を有する紙とを透過光の下で重ね合わせて観察し、透かし画像の位置を確認していた。また、画像処理技術を用いて、自動的に透かし画像の位置の検出を行う方法として、2値画像のパターンマッチングを応用した方法も検討されてきた。
【0003】
【発明が解決しようとする課題】
目視による透かしの位置検出は、人間に対する作業負荷が非常に大きく、また、人間が行うため、個人差や見逃しが生じるという問題があった。また、2値画像のパターンマッチングを応用した方法においては、透かしの位置を一義的に求められない場合があり、位置の検出を精度よく行うことが困難であった。したがって、本発明の目的は、多値画像の積和演算を行うことによって、透かしの位置検出を精度よく行う方法を提供することである。
【0004】
【課題を解決するための手段】
上記目的は、下記の本発明によって達成される。すなわち、本発明は、基準となるパターンの2値画像を参照画像とし、透過光を用いて入力した紙の透かし画像を入力画像とし、該入力画像をある濃度閾値で2値化する過程と、前記参照画像と、前記入力画像を2値化した画像の両者に対して、それぞれ全ての画素値がゼロになるまで侵食処理を繰り返す過程と、前記参照画像と、前記入力画像を2値化した画像のそれぞれに対して、前記侵食処理を行った各回ごとの2値画像と侵食前の2値画像を加算して多値画像にする過程と、前記参照画像の多値画像を、前記入力画像を2値化した後の多値画像に対して、1画素ずつラスタ状に走査させることによって位置をずらし、多値画像同士を積和演算することを指定回数繰り返す過程と、前記積和演算値が最大となる位置のデータから、前記参照画像に対する前記入力画像の相対位置を求める過程とを含むことを特徴とする画像の位置検出方法である。
【0005】
【発明の実施の形態】
本発明の位置検出方法においては、参照画像と、入力画像を2値化した画像の両者に対して複数回侵食処理を行う時、侵食処理後の2値画像を加算して得られた両者の多値画像の位置を、一方を固定し他方を1画素ずつラスタ状に走査させることによってずらしながら、多値画像同士の積和演算を行うことを指定回数繰り返すことにより、積和演算値が最大となる位置のデータから参照画像に対する入力画像の相対位置を求めることを特徴としている。透過光を用いて紙の透かしを画像入力する場合、透かし部分と背景との境界部の濃度勾配が参照画像のそれに比べて緩やかになる傾向がある。したがって、入力画像を2値化する際、濃度閾値によって2値画像の大きさや形状が変化する。この場合、参照画像(2値)を、入力画像を2値化した画像に対して、1画素ずつラスタ状に走査させることによって位置をずらし、2値画像同士の積和演算を行うことを指定回数繰り返すと、積和演算値が最大となる位置が複数存在することがあるため、参照画像に対する入力画像の位置を精度良く求められないケースが生じる。本発明の位置検出方法においては、2値画像同士の積和演算ではなく、多値画像同士の積和演算を行うため、積和演算値が最大となる位置を1点に絞り込むことができ、紙の透かし画像の位置を高い精度で検出することができる。
【0006】
【実施例】
以下、本発明の一実施例について、図面を参照して説明する。図1は、本発明の位置検出方法におけるデータ処理の流れを示すフローチャートである。図1において、S1では、基準となるパターンの2値画像を参照画像として用意しておく。S2では、透過光を用いて入力した紙の透かし画像を入力画像とする。S3では、S2の入力画像をある濃度閾値で2値化する。S4及びS5では、それぞれS1の参照画像(2値)及びS3で2値化した画像に対して、後述の侵食処理を行う。S6及びS7では、それぞれS4及びS5の侵食処理によって侵食された2値画像の全ての画素値がゼロであるかどうかを判別し、結果がゼロになるまで侵食処理を繰り返す。S8及びS9では、それぞれS4及びS5の侵食処理を複数回行った時、各回ごとの侵食された2値画像と、侵食前の2値画像を加算して多値画像にする。S10では、S8で得られた参照画像の多値画像を、S9で得られた入力画像を2値化した後の多値画像に対して、図2に示すように1画素ずつラスタ状に走査させることによって位置をずらす。S11では、S10で位置をずらした多値画像同士を積和演算する。S12では、多値画像の位置ずらしを図2に示すように指定回数行ったかどうかを判別し、結果が指定回数になるまでS10及びS11の処理を繰り返す。S13では、多値画像同士の積和演算を複数回行った結果から、積和演算値が最大となる位置を選択する。その位置が、参照画像に対する入力画像の相対位置となる。
【0007】
図2は、図1のS10において、多値画像の位置を相対的にずらす方法を示す図である。図中、101は参照画像の多値画像(位置ずらしを開始する前)、102は入力画像を2値化した後の多値画像(位置は固定)、103は参照画像の多値画像(位置ずらしを終了後)である。ここで、102の画像の左上端のxy座標を(x0,y0)と仮定するとき、101の画像を、その左上端の座標が(x0-a,y0-b)の位置から(x0+a,y0+b)の位置まで1画素ずつラスタ状に走査させることによって位置ずらしを行う。但し、x0,y0,a,bは0または正の整数値である。また、図1のS12で述べた指定回数とは、101の画像をラスタ状に走査させて位置ずらしを行う回数のことで、合計(2a+1)×(2b+1)回になる。
【0008】
図3は、本発明の位置検出を行う装置の構成を示したものである。図中、1は高周波蛍光灯照明装置、2は用紙、3は透かし、4はイメージセンサカメラ、5は画像解析装置、6はパーソナルコンピュータ、7はCRTディスプレイである。まず、用紙2を高周波蛍光灯照明装置1の定められた位置にセットし、照明装置1を点灯する。この時、透かし部3の紙厚は、用紙2の背景部の紙厚と異なるため、用紙2を透過する光量は紙厚によって変調され、透かし部3のパターンがイメージセンサカメラ4の受光素子に光学的に結合される。そして、受光素子に入射する光の強弱を電気信号に変換し、この信号を画像解析装置5に送る。画像解析装置5では、電気信号をアナログデータからディジタルデータに変換し、パーソナルコンピュータ6から送られる制御命令に従って各種画像処理を行う。CRTディスプレイ7は、プログラムの開発や画像の表示、演算結果の表示等に用いる。
【0009】
図4は、参照画像と、入力画像を2値化した画像との積和演算の方法を示す図である。図中、8は参照画像で、これは基準となるパターンの2値画像に相当する。9は、イメージセンサカメラ4で入力した紙の透かし画像をある濃度閾値で2値化した画像である。8と9の画像は、それぞれ横(X)方向にm画素、縦(y)方向にn画素の大きさをもつ。10は、参照画像の座標(i,j)における画素値aij、11は、入力画像を2値化した画像の座標(i,j)における画素値bijである。また、12は、透かし部分を示している。ここで、参照画像8と入力画像を2値化した画像9の積和演算を数式で表すと、数1のようになる。
【0010】
【数1】

Figure 0003714647
但し、Cは、積和演算値である。
【0011】
図5は、イメージセンサカメラ4で入力した濃淡画像を、濃度閾値thがth<thoなる条件で2値化した画像と、参照画像とを積和演算した時に、前記数1の積和演算値Cが最大となる位置の分布を(x,y)座標上に示したものである。図5(a)は、基準となるパターンの2値画像に相当する参照画像、図5(b)は、イメージセンサカメラ4で入力した濃淡画像である。また、図5(c)は、図5(a)の参照画像において、x方向の濃度断面を示したものである。ここで、x方向の透かしの画線幅wは、w=woであると仮定する。また、濃度は、2値画像であるため、0または1の値をとる。図5(d)は、図5(b)の入力画像において、x方向の濃度断面を示したものである。ここで、入力画像は濃淡画像であるため、濃度は0から255までの整数値となる。また、th、thoは2値化する濃度閾値、w、woは透かしの画線幅を示している。一般に、透過光を用いて紙の透かしを画像入力する時、透かし部分と背景との境界における濃度勾配は、図5(c)の参照画像のそれに比べ、緩やかになる傾向をもつ。これは、2値化する濃度閾値thが変化すると、透かしの画線幅wが変化することを意味する。透かしの位置検出を自動化しようとする場合、通常濃度閾値thの値は一定にするが、検査する用紙の紙厚や透かし部の紙厚がばらつくため、同じ濃度閾値で2値化しても、透かしの画線幅wが用紙ごとに少しずつ変化する。図5(d)は、このような状況を説明するため、濃度閾値thの方を変化させて透かしの画線幅wを変化させたものである。また、図5(d)では、透かしの画線幅wの値が図5(c)の参照画像における透かしの画線幅woと同幅になる濃度閾値の値をth=thoと仮定している。図5(e)は、図5(a)の参照画像を、図5(b)の入力画像を濃度閾値thがth<thoなる条件で2値化した画像に対して、図2のように位置をずらし、両者の積和演算を行うことを指定回数繰り返した時、積和演算値Cが最大となる位置の分布を(x,y)座標上にプロットしたものである。但し、この場合、2値画像同士の積和演算であるので、図2の101と103を参照画像(2値)、102を入力画像を2値化した画像に置き換えて考えるものとする。図5(e)の結果は、Cが最大となる位置が複数存在するため、図5(a)の参照画像に対する図5(b)の入力画像の位置を一義的に求められないという問題が生じていることを示している。本発明では、このような問題点を解決するために、2値画像同士の積和演算の代わりに、多値画像同士の積和演算を行うことにした。以下、多値画像の作成方法について説明する。
【0012】
図6は、侵食処理の方法を示す図である。図中、P0とそれに隣接するP1,P2,・・・,P8は0または1の値をもつ画素であると仮定する。侵食処理は、P0を中心として、P0に隣接する8つの画素の値とP0の画素値を全て掛け合わせた値をMとする時、Mの値が0ならばP0=0、Mの値が1ならばP0=1となるようにP0の値を置き換える処理である。それを数式で表すと、以下の数2から数4のようになる。
【数2】
Figure 0003714647
【数3】
Figure 0003714647
【数4】
Figure 0003714647
【0013】
図7は、前記数2から数4の式を用いて、図5(a)の参照画像、または図5(b)の入力画像をある濃度閾値で2値化した画像に対して、複数回侵食処理を行う時、侵食された2値画像の形状変化を示したものである。図中、13は、侵食前の2値画像I0、14は、i回侵食した時の2値画像Ii、15は、n回侵食した時の2値画像Inである。但し、iの値は、0≦i≦nなる整数である。また、n+1回侵食した時の2値画像In+1の画素値は全て0であると仮定する。ここで、本発明で用いる多値画像IMについては、次の数5の式で定義する。
【0014】
【数5】
Figure 0003714647
また、数5の式において、多値画像IMの濃度の最大値はn+1となる。
【0015】
図8は、図5(a)の参照画像と、図5(b)の入力画像を2値化した画像の両者を前記数5の式で多値画像にした後、図4の8、9に示す2値画像を多値画像に置き換えて、前記数1の式で多値画像同士の積和演算を行った時、積和演算値Cが最大となる位置の分布が2値画像同士の積和演算を行った場合と異なることを説明するために用意した、サンプル画像とそのx方向の濃度断面を示したものである。図8(a)は、コンピュータで人工的に作成したサンプル画像で、0から255までの濃度値をもつ濃淡画像である。このサンプル画像を図1のS2の入力画像に相当するものとして、以下の説明を行う。図8(b)は、図8(a)のサンプル画像のx方向の濃度断面である。図8(b)の濃度プロフィールは台形状になっているが、これは図5(b)の入力画像のx方向の濃度断面をシミュレートしたものである。ここで、図8(b)中のthは濃度閾値、wはサンプル画像における透かしの画線幅を示している。また、woは図5(c)に示すように、参照画像のx方向濃度断面における透かしの画線幅であり、thoはサンプル画像の透かしの画線幅wが参照画像の透かしの画線幅woと等しくなる場合、つまりw=woとなる時の濃度閾値である。
【0016】
図9は、図8(a)のサンプル画像において、2値化する濃度閾値を変化させた時の2値画像を示したものである。図9(a)は、図5(a)と同じ参照画像である。図9(b)、(c)、(d)は、それぞれ図8(a)のサンプル画像において、2値化する濃度閾値thの条件をth<tho、th=tho、th>thoとした時の2値画像である

【0017】
図10(a)、(b)、(c)、(d)は、それぞれ図9(a)、(b)、(c)、(d)の2値画像を前記数5に示す式で多値化した画像である。
【0018】
図11は、図9(a)の参照画像(2値)を、図9(b)、(c)、(d)の各2値画像に対して、図2に示すように、1画素ずつ位置をずらしながら、前記数1の式で両者の積和演算を行うことを指定回数繰り返した時、積和演算値Cが最大となる位置の分布を(x,y)座標上にプロットしたものである。但し、この場合、2値画像同士の積和演算であるので、図2の101と103を参照画像(2値)、102を入力画像を2値化した画像に置き換えて考えるものとする。図11(a)、(b)、(c)は、サンプル画像を2値化する濃度閾値の条件を、それぞれth=tho、th<tho、th>thoとした時のCの最大値の分布を示しているが、th<thoとth>thoの場合、Cが最大となる位置が複数存在している。したがって、2値画像同士の積和演算では、参照画像に対するサンプル画像の位置を一義的に求めることは困難であることがわかる。
【0019】
図12は、図10(a)の参照画像の多値画像を、図10(b)、(c)、(d)の各多値画像に対して、図2に示すように、1画素ずつ位置をずらしながら、前記数1の式で両者の積和演算を行うことを指定回数繰り返した時に、積和演算値Cが最大となる位置の分布を(x,y)座標上にプロットしたものである。図12(a)、(b)、(c)は、それぞれサンプル画像を2値化する濃度閾値の条件をth=tho、th<tho、th>thoとした時のCの最大値の分布を示しているが、濃度閾値thの値によらず常にCが最大となる位置は1点になっている。したがって、多値画像同士の積和演算を行うと、参照画像に対するサンプル画像の位置を一義的に求めることができる。また、サンプル画像の位置のデータから、参照画像に対するサンプル画像の位置ずれ量を計算すれば、透かしの位置合わせの自動化等に応用することが可能となる。
【0020】
【発明の効果】
本発明の位置検出方法によれば、透かしの位置検出を自動化しようとする場合、検査する用紙の紙厚や透かし部の紙厚のばらつきにより、イメージセンサカメラに入力した画像の透かし部の画線幅が用紙ごとに変化しても、透かしの位置を高い精度で検出することができるため、透かしを精密に位置合わせすることが可能となる。
【図面の簡単な説明】
【図1】本発明の位置検出方法におけるデータ処理の流れを示すフローチャート。
【図2】多値画像の位置を相対的にずらす方法を示す図。
【図3】本発明の装置構成の概要を示す図。
【図4】参照画像と入力画像との積和演算の方法を示す図。
【図5】参照画像(2値)と、入力画像を2値化した画像とを積和演算する時、積和演算値Cが最大となる位置の分布を示す図。
【図6】侵食処理の方法を示す図。
【図7】複数回の侵食処理を行う時、侵食された2値画像の形状変化を示す図。
【図8】サンプル画像のx方向の濃度断面を示す図。
【図9】サンプル画像の2値画像を示す図。
【図10】サンプル画像の2値画像を多値化した画像を示す図。
【図11】参照画像(2値)と、サンプル画像の2値画像とを積和演算する時、積和演算値Cが最大となる位置の分布を示す図。
【図12】参照画像の多値画像とサンプル画像の多値画像とを積和演算する時、積和演算値Cが最大となる位置の分布を示す図。
【符号の説明】
1 高周波蛍光灯照明装置
2 用紙
3 透かし
4 イメージセンサカメラ
5 画像解析装置
6 パーソナルコンピュータ
7 CRTディスプレイ
8 参照画像
9 イメージセンサカメラで入力した紙の透かし画像
10 参照画像の座標(i,j)における画素値aij
11 入力画像の座標(i,j)における画素値bij
12 透かし
13 侵食前の2値画像I0
14 i回侵食した時の2値画像Ii
(但し、iの値は、0≦i≦nなる整数)
15 n回侵食した時の2値画像In
16 透かし
101 参照画像の多値画像(位置ずらしを開始する前)
102 入力画像を2値化した後の多値画像(位置は固定)
103 参照画像の多値画像(位置ずらしを終了後)[0001]
[Industrial application fields]
The present invention relates to a method for detecting the position of a watermark image of paper input using transmitted light.
[0002]
[Prior art]
Conventionally, the detection of the position of a paper watermark image has been mainly performed by human eyes. For example, a reference paper having a watermark image and a paper having the same watermark image are superposed and observed under transmitted light to confirm the position of the watermark image. As a method for automatically detecting the position of a watermark image using an image processing technique, a method using pattern matching of a binary image has been studied.
[0003]
[Problems to be solved by the invention]
The detection of the watermark position by visual inspection has a very large work load on human beings, and human beings have a problem that individual differences and oversight occur. Also, in a method using binary image pattern matching, the watermark position may not be uniquely determined, and it is difficult to accurately detect the position. Accordingly, an object of the present invention is to provide a method for accurately detecting the position of a watermark by performing a product-sum operation on multi-valued images.
[0004]
[Means for Solving the Problems]
The above object is achieved by the present invention described below. That is, the present invention uses a binary image of a standard pattern as a reference image, a paper watermark image input using transmitted light as an input image, and binarizes the input image with a certain density threshold; The process of repeating the erosion process for both the reference image and the binarized image of the input image until all the pixel values become zero, and binarizing the reference image and the input image For each of the images, a process of adding the binary image each time the erosion process is performed and a binary image before erosion to form a multi-valued image, and the multi-valued image of the reference image as the input image A process of repeating a specified number of times by multiplying a multi-valued image obtained by binarizing the multi-valued image by shifting the position by scanning each pixel in a raster pattern and performing a product-sum operation between the multi-valued images, and the product-sum operation value From the data at the position where the A position detecting method of an image which comprises a step of determining the relative positions of the input image with respect to the irradiation image.
[0005]
DETAILED DESCRIPTION OF THE INVENTION
In the position detection method of the present invention, when the erosion processing is performed a plurality of times on both the reference image and the image obtained by binarizing the input image, both of the two images obtained by adding the binary images after the erosion processing are added. The product-sum operation value is maximized by repeating the product-sum operation between the multi-valued images a specified number of times while shifting the position of the multi-valued image by fixing one and scanning the other pixel by pixel. The relative position of the input image with respect to the reference image is obtained from the position data. When a paper watermark is input using transmitted light, the density gradient at the boundary between the watermark and the background tends to be gentler than that of the reference image. Accordingly, when the input image is binarized, the size and shape of the binary image change depending on the density threshold. In this case, it is specified that the position of the reference image (binary) is shifted by rastering pixel by pixel with respect to the image obtained by binarizing the input image, and the product-sum operation between the binary images is performed. If the operation is repeated a number of times, there may be a plurality of positions where the product-sum operation value is maximized, so that the position of the input image with respect to the reference image cannot be obtained with high accuracy. In the position detection method of the present invention, since the product-sum operation between multi-value images is performed instead of the product-sum operation between binary images, the position where the product-sum operation value is maximum can be narrowed down to one point. The position of the paper watermark image can be detected with high accuracy.
[0006]
【Example】
An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a flowchart showing the flow of data processing in the position detection method of the present invention. In FIG. 1, in S1, a binary image having a reference pattern is prepared as a reference image. In S2, a paper watermark image input using transmitted light is used as an input image. In S3, the input image in S2 is binarized with a certain density threshold. In S4 and S5, an erosion process described later is performed on the reference image (binary) in S1 and the image binarized in S3, respectively. In S6 and S7, it is determined whether or not all pixel values of the binary image eroded by the erosion processes in S4 and S5 are zero, and the erosion process is repeated until the result becomes zero. In S8 and S9, when the erosion processing of S4 and S5 is performed a plurality of times, the eroded binary image and the binary image before erosion are added each time to form a multi-value image. In S10, the multi-valued image of the reference image obtained in S8 is scanned in a raster pattern pixel by pixel as shown in FIG. 2 with respect to the multi-valued image obtained by binarizing the input image obtained in S9. To shift the position. In S11, the product-sum operation is performed on the multi-valued images whose positions are shifted in S10. In S12, it is determined whether the multi-valued image has been shifted a specified number of times as shown in FIG. 2, and the processes in S10 and S11 are repeated until the result reaches the specified number of times. In S13, the position where the product-sum operation value is maximized is selected from the result of performing the product-sum operation between the multi-valued images a plurality of times. That position is the relative position of the input image with respect to the reference image.
[0007]
FIG. 2 is a diagram showing a method of relatively shifting the position of the multi-valued image in S10 of FIG. In the figure, 101 is a multi-valued image of a reference image (before starting position shifting), 102 is a multi-valued image after binarizing the input image (position is fixed), 103 is a multi-valued image of the reference image (position After finishing the shift). Here, assuming that the xy coordinate of the upper left corner of the 102 image is (x 0 , y 0 ), the 101 image is moved from the position where the upper left coordinate is (x 0 -a, y 0 -b). The position is shifted by scanning pixel by pixel up to the position (x 0 + a, y 0 + b). However, x 0 , y 0 , a, b are 0 or a positive integer value. Further, the designated number of times described in S12 in FIG. 1 is the number of times that 101 images are scanned in a raster shape and the position is shifted, and is a total of (2a + 1) × (2b + 1) times.
[0008]
FIG. 3 shows the configuration of an apparatus for performing position detection according to the present invention. In the figure, 1 is a high-frequency fluorescent lamp illumination device, 2 is paper, 3 is a watermark, 4 is an image sensor camera, 5 is an image analysis device, 6 is a personal computer, and 7 is a CRT display. First, the paper 2 is set at a predetermined position of the high frequency fluorescent lamp illumination device 1, and the illumination device 1 is turned on. At this time, since the paper thickness of the watermark portion 3 is different from the paper thickness of the background portion of the paper 2, the amount of light transmitted through the paper 2 is modulated by the paper thickness, and the pattern of the watermark portion 3 is applied to the light receiving element of the image sensor camera 4. Optically coupled. Then, the intensity of light incident on the light receiving element is converted into an electric signal, and this signal is sent to the image analysis device 5. In the image analysis device 5, the electrical signal is converted from analog data to digital data, and various image processing is performed in accordance with control commands sent from the personal computer 6. The CRT display 7 is used for program development, image display, calculation result display, and the like.
[0009]
FIG. 4 is a diagram illustrating a method of product-sum operation between a reference image and an image obtained by binarizing an input image. In the figure, reference numeral 8 denotes a reference image, which corresponds to a binary image having a standard pattern. Reference numeral 9 denotes an image obtained by binarizing a paper watermark image input by the image sensor camera 4 with a certain density threshold. The images 8 and 9 have a size of m pixels in the horizontal (X) direction and n pixels in the vertical (y) direction, respectively. 10 is the pixel value a ij at the coordinates (i, j) of the reference image, and 11 is the pixel value b ij at the coordinates (i, j) of the image obtained by binarizing the input image. Reference numeral 12 denotes a watermark portion. Here, the product-sum operation of the reference image 8 and the image 9 obtained by binarizing the input image is expressed by Equation 1.
[0010]
[Expression 1]
Figure 0003714647
However, C is a product-sum operation value.
[0011]
FIG. 5 shows the product-sum operation of Equation 1 when a gray-scale image input by the image sensor camera 4 is subjected to a product-sum operation on an image obtained by binarizing the density threshold th under the condition that th <th o and a reference image. The distribution of the position where the value C is maximum is shown on the (x, y) coordinates. FIG. 5A is a reference image corresponding to a binary image of a reference pattern, and FIG. 5B is a grayscale image input by the image sensor camera 4. FIG. 5C shows a density cross section in the x direction in the reference image of FIG. Here, it is assumed that the image line width w of the x-direction of the watermark is w = w o. Further, since the density is a binary image, it takes a value of 0 or 1. FIG. 5D shows a density cross section in the x direction in the input image of FIG. 5B. Here, since the input image is a grayscale image, the density is an integer value from 0 to 255. Further, th and th o indicate binarized density thresholds, and w and w o indicate the image line width of the watermark. In general, when a paper watermark is input using transmitted light, the density gradient at the boundary between the watermark portion and the background tends to be gentler than that of the reference image in FIG. This means that when the density threshold th to be binarized changes, the image line width w of the watermark changes. When attempting to automate the watermark position detection, the value of the normal density threshold th is fixed, but the paper thickness of the paper to be inspected and the paper thickness of the watermark portion vary. The image line width w changes slightly for each sheet. FIG. 5 (d) shows the image line width w of the watermark changed by changing the density threshold th in order to explain such a situation. Further, in FIG. 5 (d), the value of the image line width w of the watermark values of image line width w o and density threshold to be the same width of the watermark in the reference image FIG. 5 (c) and th = th o assumption are doing. FIG. 5 (e) shows the reference image of FIG. 5 (a) as an image obtained by binarizing the input image of FIG. 5 (b) under the condition that the density threshold th is th <th o as shown in FIG. The position distribution where the product-sum operation value C is maximized is plotted on the (x, y) coordinates when the position is shifted to and the product-sum operation of both is repeated a specified number of times. However, in this case, since it is a product-sum operation between binary images, it is assumed that 101 and 103 in FIG. 2 are replaced with a reference image (binary) and 102 is replaced with an image obtained by binarizing the input image. The result of FIG. 5 (e) has a problem that the position of the input image of FIG. 5 (b) with respect to the reference image of FIG. 5 (a) cannot be uniquely determined because there are a plurality of positions where C is maximum. It shows that it has occurred. In the present invention, in order to solve such a problem, a product-sum operation between multi-valued images is performed instead of a product-sum operation between binary images. Hereinafter, a method for creating a multi-valued image will be described.
[0012]
FIG. 6 is a diagram illustrating a method of erosion processing. In the figure, it is assumed that P 0 and adjacent P 1 , P 2 ,..., P 8 are pixels having a value of 0 or 1. Erosion process, around the P 0, when eight pixels values and all multiplied value was a pixel value of P 0 adjacent to P 0 and M, the value of M is 0, P 0 = 0, the value of M is the process of replacing the values of P 0 to be 1 if P 0 = 1. This can be expressed by mathematical formulas 2 to 4 below.
[Expression 2]
Figure 0003714647
[Equation 3]
Figure 0003714647
[Expression 4]
Figure 0003714647
[0013]
FIG. 7 shows a plurality of times for the reference image of FIG. 5A or the image obtained by binarizing the input image of FIG. 5B with a certain density threshold using the equations 2 to 4. When the erosion processing is performed, the shape change of the eroded binary image is shown. In the figure, 13 is a binary image I 0 before erosion, 14 is a binary image I i when eroded i times, and 15 is a binary image I n when eroded n times. However, the value of i is an integer satisfying 0 ≦ i ≦ n. It is assumed that the pixel values of the binary image I n + 1 when eroded n + 1 times are all 0. Here, the multi-valued image I M used in the present invention is defined by the following equation (5).
[0014]
[Equation 5]
Figure 0003714647
In the equation (5), the maximum density value of the multi-valued image I M is n + 1.
[0015]
FIG. 8 illustrates a case where both the reference image in FIG. 5A and the image obtained by binarizing the input image in FIG. When the binary image shown in FIG. 5 is replaced with a multi-valued image, and the product-sum operation between the multi-valued images is performed using the equation (1), the distribution of the position where the product-sum operation value C is the maximum is between the binary images. It shows a sample image and a density cross section in the x direction prepared for explaining the difference from the case where the product-sum operation is performed. FIG. 8A is a sample image artificially created by a computer and is a grayscale image having density values from 0 to 255. The following description will be given assuming that this sample image corresponds to the input image in S2 of FIG. FIG. 8B is a density cross section in the x direction of the sample image in FIG. The density profile in FIG. 8B has a trapezoidal shape, which is a simulation of the density cross section in the x direction of the input image in FIG. 5B. Here, th in FIG. 8B indicates a density threshold, and w indicates a line width of a watermark in the sample image. Further, as shown in FIG. 5C, w o is the watermark line width in the x-direction density section of the reference image, and th o is the watermark width w of the sample image and the watermark image of the reference image. This is the density threshold when the line width is equal to w o , that is, when w = w o .
[0016]
FIG. 9 shows a binary image when the density threshold value to be binarized is changed in the sample image of FIG. FIG. 9A is the same reference image as FIG. FIGS. 9B, 9C, and 9D show the density threshold th condition for binarization in the sample image of FIG. 8A, respectively, th <th o , th = th o , th> th o. Is a binary image.
[0017]
FIGS. 10 (a), (b), (c), and (d) are obtained by multiplying the binary images of FIGS. 9 (a), (b), (c), and (d) by the equation shown in the equation (5). It is a valued image.
[0018]
FIG. 11 shows the reference image (binary) of FIG. 9 (a) for each binary image of FIG. 9 (b), (c), and (d), as shown in FIG. The distribution of the position where the product-sum operation value C is maximized is plotted on the (x, y) coordinates when the product-sum operation of the two equations is repeated a specified number of times while shifting the position. It is. However, in this case, since it is a product-sum operation between binary images, it is assumed that 101 and 103 in FIG. 2 are replaced with a reference image (binary) and 102 is replaced with an image obtained by binarizing the input image. 11 (a), 11 (b), and 11 (c) show the maximum C when the density threshold conditions for binarizing the sample image are th = th o , th <th o , and th> th o , respectively. Although the distribution of values is shown, when th <th o and th> th o , there are a plurality of positions where C is maximum. Therefore, it can be seen that it is difficult to uniquely determine the position of the sample image with respect to the reference image in the product-sum operation between the binary images.
[0019]
FIG. 12 shows the multi-valued image of the reference image shown in FIG. 10 (a) for each multi-valued image shown in FIGS. 10 (b), 10 (c), and 10 (d), as shown in FIG. The distribution of the position where the product-sum operation value C is maximized is plotted on the (x, y) coordinates when the product-sum operation of the equation 1 is repeated a specified number of times while shifting the position. It is. 12 (a), 12 (b), and 12 (c) show the maximum values of C when the density threshold conditions for binarizing the sample image are th = th o , th <th o , and th> th o , respectively. However, regardless of the value of the density threshold value th, the position where C is always the maximum is one point. Therefore, when the product-sum operation between multi-valued images is performed, the position of the sample image with respect to the reference image can be uniquely determined. Further, if the amount of positional deviation of the sample image with respect to the reference image is calculated from the data of the position of the sample image, it can be applied to automation of watermark alignment.
[0020]
【The invention's effect】
According to the position detection method of the present invention, when the watermark position detection is to be automated, the image line of the watermark portion of the image input to the image sensor camera due to variations in the paper thickness of the paper to be inspected and the paper thickness of the watermark portion. Even if the width changes for each sheet, the watermark position can be detected with high accuracy, so that the watermark can be precisely aligned.
[Brief description of the drawings]
FIG. 1 is a flowchart showing a flow of data processing in a position detection method of the present invention.
FIG. 2 is a diagram illustrating a method for relatively shifting the position of a multi-valued image.
FIG. 3 is a diagram showing an outline of a device configuration of the present invention.
FIG. 4 is a diagram showing a method of product-sum operation between a reference image and an input image.
FIG. 5 is a diagram illustrating a distribution of positions at which a product-sum operation value C is maximum when a product-sum operation is performed on a reference image (binary) and an image obtained by binarizing an input image.
FIG. 6 is a diagram showing a method of erosion treatment.
FIG. 7 is a diagram illustrating a shape change of an eroded binary image when performing erosion processing a plurality of times.
FIG. 8 is a diagram showing a density cross section in the x direction of a sample image.
FIG. 9 is a diagram showing a binary image of a sample image.
FIG. 10 is a diagram illustrating an image obtained by converting a binary image of a sample image into a multivalued image.
FIG. 11 is a diagram illustrating a distribution of positions at which a product-sum operation value C becomes maximum when performing a product-sum operation on a reference image (binary) and a binary image of a sample image.
FIG. 12 is a diagram illustrating a distribution of positions at which a product-sum operation value C is maximum when performing a product-sum operation on a multi-value image of a reference image and a multi-value image of a sample image.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 High frequency fluorescent lamp illumination device 2 Paper 3 Watermark 4 Image sensor camera 5 Image analysis device 6 Personal computer 7 CRT display 8 Reference image 9 Watermark image of paper input by image sensor camera
10 Pixel value a ij at coordinates (i, j) of the reference image
11 Pixel value b ij at coordinates (i, j) of the input image
12 Watermark
13 Binary image before erosion I 0
14 Binary image I i eroded i times
(However, the value of i is an integer satisfying 0 ≦ i ≦ n)
15 Binary image I n eroded n times
16 Watermark
101 Multi-valued image of reference image (before starting shifting)
102 Multi-valued image after binarizing the input image (fixed position)
103 Multi-valued image of reference image (after position shifting is completed)

Claims (1)

基準となるパターンの2値画像を参照画像とし、透過光を用いて入力した紙の透かし画像を入力画像とし、該入力画像をある濃度閾値で2値化する過程と、前記参照画像と、前記入力画像を2値化した画像の両者に対して、それぞれ全ての画素値がゼロになるまで侵食処理を繰り返す過程と、前記参照画像と、前記入力画像を2値化した画像のそれぞれに対して、前記侵食処理を行った各回ごとの2値画像と侵食前の2値画像を加算して多値画像にする過程と、前記参照画像の多値画像を、前記入力画像を2値化した後の多値画像に対して、1画素ずつラスタ状に走査させることによって位置をずらし、多値画像同士を積和演算することを指定回数繰り返す過程と、前記積和演算値が最大となる位置のデータから、前記参照画像に対する前記入力画像の相対位置を求める過程とを含むことを特徴とする画像の位置検出方法。A binary image of a reference pattern is set as a reference image, a paper watermark image input using transmitted light is set as an input image, the input image is binarized with a certain density threshold, the reference image, The process of repeating the erosion process for both the binarized images of the input image until all the pixel values become zero, the reference image, and the binarized image of the input image, respectively , The process of adding the binary image for each time subjected to the erosion process and the binary image before erosion to make a multi-value image, and the multi-value image of the reference image after binarizing the input image The multi-valued image is scanned in a raster pattern one pixel at a time and the position is shifted, and the product-sum operation of the multi-valued images is repeated a specified number of times, and the position where the product-sum operation value is maximized. From the data, the reference image Position detecting method of an image which comprises a step of determining the relative position of the force image.
JP03973997A 1997-02-10 1997-02-10 Image position detection method Expired - Fee Related JP3714647B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP03973997A JP3714647B2 (en) 1997-02-10 1997-02-10 Image position detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03973997A JP3714647B2 (en) 1997-02-10 1997-02-10 Image position detection method

Publications (2)

Publication Number Publication Date
JPH10222677A JPH10222677A (en) 1998-08-21
JP3714647B2 true JP3714647B2 (en) 2005-11-09

Family

ID=12561344

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03973997A Expired - Fee Related JP3714647B2 (en) 1997-02-10 1997-02-10 Image position detection method

Country Status (1)

Country Link
JP (1) JP3714647B2 (en)

Also Published As

Publication number Publication date
JPH10222677A (en) 1998-08-21

Similar Documents

Publication Publication Date Title
KR100730051B1 (en) Defect detection apparatus and defect detection method
US6539106B1 (en) Feature-based defect detection
JP6620477B2 (en) Method and program for detecting cracks in concrete
Hocenski et al. Improved canny edge detector in ceramic tiles defect detection
CN109472271B (en) Printed circuit board image contour extraction method and device
JPH06314339A (en) Image rectilinear component extracting device
KR20090066212A (en) Defect detection method and defect detection apparatus
JP2012002531A (en) Crack detection method
Rivera et al. Automated detection and measurement of cracks in reinforced concrete components
JP4230880B2 (en) Defect inspection method
JP2008267943A (en) Crack detecting method
JP2005165387A (en) Method and device for detecting stripe defective of picture and display device
JP2006138708A (en) Image flaw inspection method, image flaw inspecting device and visual inspection device
JP3714647B2 (en) Image position detection method
JP2710527B2 (en) Inspection equipment for periodic patterns
JP5157575B2 (en) Defect detection method
JPH0624014B2 (en) Gray image processing method
JP4560969B2 (en) Defect inspection method
JP2010044010A (en) Method for detecting defect of mesh- or wire-embedded glass
JPH06174652A (en) Method and device for comparative inspection of pattern
JP2008185510A (en) Crack detection method
JPH10208066A (en) Method for extracting edge line of check object and appearance check method using this method
JP3555407B2 (en) Edge detection method and apparatus therefor
JP3598196B2 (en) Periodic pattern defect inspection equipment
JPH02252392A (en) Picture quality evaluating method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050606

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

R155 Notification before disposition of declining of application

Free format text: JAPANESE INTERMEDIATE CODE: R155

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050822

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees