JPH0310107A - Inspecting method utilizing gradation pattern matching - Google Patents

Inspecting method utilizing gradation pattern matching

Info

Publication number
JPH0310107A
JPH0310107A JP1145710A JP14571089A JPH0310107A JP H0310107 A JPH0310107 A JP H0310107A JP 1145710 A JP1145710 A JP 1145710A JP 14571089 A JP14571089 A JP 14571089A JP H0310107 A JPH0310107 A JP H0310107A
Authority
JP
Japan
Prior art keywords
image
correlation coefficient
reference image
images
degree
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP1145710A
Other languages
Japanese (ja)
Inventor
Masao Ikeda
池田 正男
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.)
Murata Manufacturing Co Ltd
Original Assignee
Murata Manufacturing 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 Murata Manufacturing Co Ltd filed Critical Murata Manufacturing Co Ltd
Priority to JP1145710A priority Critical patent/JPH0310107A/en
Publication of JPH0310107A publication Critical patent/JPH0310107A/en
Pending legal-status Critical Current

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Analysis (AREA)

Abstract

PURPOSE:To facilitate high speed processing which can cope with the correction and change for the contents of inspection readily and to make it possible to perform accu rate judgment even if the density difference is not clear by judging the shape of an object by comparing correlation coefficient with a lower limit value. CONSTITUTION:At first, the density images of a good object and an object under inspection are picked up with a camera 2. The density values of many picture elements constituting the images are detected and written into memories 3a and 3b. One or more reference images are determined in the gradation images of the good object. The object image corresponding to the reference image is determined in the gradation images of the object under inspection 1. Then, a correlation coefficient is obtained from the density values of the corresponding picture elements in the object image and the reference image with a controller 3. The degree of agreement is judged based on the correlation coefficient. At this time, the degree of agreement is judged not simply the number of picture element of the object image and the reference image from, but from the correlation of the density values of the picture elements. Therefore, said degree of agreement represents the degree of agreement of the shapes. When the judgment is performed in this way, the correction and the change in contents of inspection can be readily processed.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は画像処理により製品の外観検査等を行うための
濃淡パターンマツチングによる検査方法に関するもので
ある。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an inspection method using gray pattern matching for inspecting the appearance of a product by image processing.

〔従来技術とその課題〕[Conventional technology and its issues]

従来、画像処理により製品の外観検査を行う場合、特徴
抽出法が一般に用いられている。この方法は、部分的な
特徴をとらえて認識する方法であるが、外観検査項目ご
とに判別アルゴリズムを決定する必要があるため、アル
ゴリズムの決定作業に多大の時間がかかり、また検査内
容の変更にも対応しにくい欠点がある。
Conventionally, a feature extraction method is generally used when performing an external appearance inspection of a product using image processing. This method captures and recognizes partial characteristics, but since it is necessary to decide on a discrimination algorithm for each visual inspection item, it takes a lot of time to decide on the algorithm, and it is difficult to change the inspection contents. There are also drawbacks that are difficult to address.

また、二値化画像処理によるパターンマツチング方法が
知られている。この方法は、二値化対象画像をnxm個
の二値化基準画像によってパターンマッチングする方法
であるが、対象画像内を基準画像と同し範囲の画素群を
1画素ずつずらせながら−成度を検出しなければならな
いため、処理に時間がかかり、また画像の濃度差が明瞭
でない場合には一致度にバラツキが発生するという問題
がある。
Furthermore, a pattern matching method using binarized image processing is known. In this method, pattern matching is performed on a binarized target image using nxm binarized reference images. Since it has to be detected, it takes time to process, and if the difference in density between images is not clear, there is a problem that the degree of matching will vary.

他の二値化画像処理方法による検査方法として、小領域
面積判定方式もある。この方式は、対象とする濃淡画像
に複数個の方形の対象画像を定めるとともに、この対象
画像の画素数の基(1λ範囲を設定しておき、対象画像
の占めるa淡いずれかの画素数の数値が基準範囲内であ
るか否かにより良否を判定する方式である。この場合に
は、判定が簡単であるという利点はあるが、単なる面積
判定であるため、形状に凹凸があって面積に差がない場
合には誤判定を起こし易い。また、画像の濃度差が明瞭
でない場合には、面積差が大きく出過ぎるといった不具
合もある。
There is also a small area area determination method as an inspection method using another binarized image processing method. In this method, a plurality of rectangular target images are defined in the target gray image, and a base (1λ range) of the number of pixels of the target image is set, and the number of pixels of either a or light that the target image occupies is This method judges pass/fail based on whether the numerical value is within the standard range.In this case, the advantage is that the judgment is easy, but since it is a simple area judgment, the area may be affected by unevenness in the shape. If there is no difference, erroneous determination is likely to occur.Furthermore, if the density difference in the image is not clear, there is also a problem that the area difference appears too large.

上記のように二値化画像処理方法による検査方法は、4
淡二種類の判別であるから、微小な欠陥は判別しにくく
、外観検査用としては不満足なものであった。
As mentioned above, the inspection method using the binarized image processing method has four
Since only two types of discrimination are possible, it is difficult to distinguish minute defects, and it is unsatisfactory for visual inspection.

そこで、本発明の目的は、検査内容の修正や変更に容易
に対応でき、高速処理が容易で、しかも濃度差が明瞭で
なくても正確な判定が可能なa淡パターンマツチングに
よる検査方法を提供することにある。
Therefore, an object of the present invention is to provide an inspection method using a-light pattern matching that can easily accommodate corrections and changes in inspection contents, facilitates high-speed processing, and allows accurate judgment even when density differences are not clear. It is about providing.

〔課題を解決するための手段〕[Means to solve the problem]

」−記目的を達成するために、本発明方法は、良品であ
る対象物の濃淡画像を多数の画素に分け、各画素の濃度
値を検出する工程と、検査すべき対象物のa像画像を上
記良品対象物のa像画像と同数の画素に分け、各画素の
濃度値を検出する工程と、良品対象物の46画像中に1
箇所以上の方形の基準画像範囲を定める工程と、検査対
象物の濃淡画像中に、個々の基準画像と対応しかつ基り
暫画像と同一範囲の方形の対象画像範囲を定める一L程
と、個々の基イV画像と対象画像との対応する各画素の
濃度値による相関係数を91算する工程と、個々の画像
範囲ごとに相関係数の下限値を設定する工程と、計算さ
れた相関係数と下限値との比較により個々の基準画像と
対象画像との一致度を1′11定する工程と、を含むも
のである。
” - In order to achieve the above object, the method of the present invention includes the steps of dividing a grayscale image of a good object into a large number of pixels and detecting the density value of each pixel, and is divided into the same number of pixels as the a-image of the non-defective object, and the density value of each pixel is detected.
a step of determining a rectangular reference image range of more than 100 points, and a step of determining a rectangular target image range of approximately 1L in the grayscale image of the inspection object, which corresponds to each reference image and has the same range as the temporary reference image; The process of calculating the correlation coefficient based on the density value of each pixel corresponding to each base image and the target image, and the process of setting the lower limit value of the correlation coefficient for each image range. This method includes the step of determining the degree of coincidence between each reference image and the target image by 1'11 by comparing the correlation coefficient with a lower limit value.

(作用] 即ち、本発明は/!:4i43パターンマツチング方弐
と小領域面積判定方式とを組み合わせることにより、上
記の目的を達成するものである。
(Operation) That is, the present invention achieves the above object by combining the /!:4i43 pattern matching method and the small area area determination method.

まず、良品対象物および検査対象物の濃淡画像をカメラ
等で撮影し、これら4淡画像を構成する多数の画素の濃
度値を検出してメモリ等に書き込む。次に、良品対象物
のく・*像画像中に1箇所以上の基準画像を定めるとと
もに、検査対象物のtP5淡画像画像中基準画像と対応
する対象画像を定める。
First, gray scale images of the non-defective object and the inspection target are photographed using a camera or the like, and the density values of a large number of pixels constituting these four gray scale images are detected and written into a memory or the like. Next, one or more reference images are determined in the black/* image of the non-defective object, and a target image corresponding to the reference image in the tP5 light image of the inspection object is determined.

そして、対象画像と基(1東画像の対応する各画素同士
の濃度値から相関係数を求め、相関係数により一致度を
判定する。ここで、従来の小領域面積判定方式と異なる
のは、単に対象画像と基(2画像との濃淡画素数によっ
て−・政変を同定するのではなく、各画素の濃度値の相
関関係により一致度を判定していることである。したが
って、この−成度はa像画像の面積の一致度ではなく、
形状の一致度を表すことになる。
Then, a correlation coefficient is determined from the density value of each corresponding pixel of the target image and the base (1 East image), and the degree of matching is determined based on the correlation coefficient. Here, the difference from the conventional small area area determination method is Rather than simply identifying political changes based on the number of gray pixels between the target image and the base image, the degree of coincidence is determined based on the correlation between the density values of each pixel. The degree is not the degree of coincidence of the areas of the a-image images,
It represents the degree of conformity of shapes.

このように判定すれば、?jHffiなアルゴリズムを
対象物ごとに決定する必要がなく、検査内容の修正や変
更にも容易に対応できる。また、画素同士の一致度を逐
一判定する必要がないので、高速処理が容易である。さ
らに、画像の濃度差が明瞭でなくても、濃度値の相関関
係により判定するので、微小な欠陥でも精密に判定でき
る。
If you judge it like this? There is no need to determine a specific algorithm for each object, and it is possible to easily modify or change the inspection contents. Furthermore, since there is no need to determine the degree of coincidence between pixels one by one, high-speed processing is facilitated. Furthermore, even if the difference in density between images is not clear, it is determined based on the correlation of density values, so even minute defects can be determined precisely.

〔実施例〕〔Example〕

図面は本発明にかかる検査方法を製品の外観検査に適用
した具体例を示す。
The drawings show a specific example in which the inspection method according to the present invention is applied to the appearance inspection of a product.

第1図において、lは電子部品等の対象物であり、この
対象物1を撮影するCCDカメラ等の撮像器2が設置さ
れている。撮像器2の内部にはレンズ2aと1最像素子
2bとが内蔵されており、対象物1の反射光がレンズ2
aで集光され、撮像素子2bで結像される。撮像素子2
bは例えば30万個のマトリックス状素子で構成され、
各素子は受光した光量に応しまた電気信号を出力し、こ
の電気信号がコントローラ3に入力される。コントロー
ラ3は例えばマイクロコンピュータ、バードロノック回
路等よりなり、メモリ3a、3bを内蔵している。コン
トローラ3には入力袋W4とモニタ5とが接続されてお
り、入力装置4からのスタート信号により撮像器2から
の信号を読み込み、この信号を濃度値に変換して所定の
メモリ3a、3bに書き込む。また、人力装置4は画像
範囲指定信号も出力できるようになっており、操作者は
モニタ5で画像を見ながら対象物1の濃淡画像中に基準
画像範囲または対象画像範囲を任意に指定できる。コン
トローラ3は、人力装置4にて指定された基準画像の濃
度値と対象画像の濃度値とを比較・演算し、検査すべき
対象物が、良品であるか否かの良否判定信号を出力する
In FIG. 1, l represents an object such as an electronic component, and an imager 2 such as a CCD camera is installed to photograph this object 1. A lens 2a and an image element 2b are built inside the imager 2, and the reflected light from the object 1 is reflected by the lens 2.
The light is focused at point a and imaged by image sensor 2b. Image sensor 2
For example, b is composed of 300,000 matrix elements,
Each element also outputs an electrical signal depending on the amount of light it receives, and this electrical signal is input to the controller 3. The controller 3 is made up of, for example, a microcomputer, a Birdronok circuit, etc., and has built-in memories 3a and 3b. An input bag W4 and a monitor 5 are connected to the controller 3, which reads a signal from the imager 2 in response to a start signal from the input device 4, converts this signal into a density value, and stores it in a predetermined memory 3a, 3b. Write. The human-powered device 4 is also capable of outputting an image range designation signal, and the operator can arbitrarily designate a reference image range or a target image range in the grayscale image of the object 1 while viewing the image on the monitor 5. The controller 3 compares and calculates the density value of the reference image specified by the human-powered device 4 and the density value of the target image, and outputs a quality determination signal indicating whether the target object to be inspected is a good product. .

次に、上記構成の外観検査装置の動作を第2図にしたが
って説明する。
Next, the operation of the visual inspection apparatus having the above configuration will be explained with reference to FIG.

まず、最初に良品である対象物を撮影する(ステップ1
0)。第3図は撮像器2にて撮像された良品の対象物の
濃淡画像の一例である。撮像器2より入力された画像信
号は濃度値に変換され、各画素に対応した濃度値が基準
画像用メモリ3aに書き込まれる(ステップ11)。
First, photograph a good object (Step 1)
0). FIG. 3 is an example of a grayscale image of a good object taken by the imager 2. The image signal input from the imager 2 is converted into a density value, and the density value corresponding to each pixel is written into the reference image memory 3a (step 11).

続いて、検査すべき対象物が撮影され(ステップ!2)
、その濃淡画像(第4図参照)の各画素の濃度値が対象
画像用メモリ3bに書き込まれる(ステップ13)。な
お、第4図は検査すべき対象物の右上角部が欠落してい
る例を示す。
Next, the object to be inspected is photographed (Step! 2)
, the density value of each pixel of the grayscale image (see FIG. 4) is written into the target image memory 3b (step 13). Note that FIG. 4 shows an example in which the upper right corner of the object to be inspected is missing.

次に、良品の対象物の濃淡画像の特徴的な部分に、1箇
所以上の方形の基準画像範囲A−Dを指定する(ステッ
プ14)。この基準画像A−Dは4箇所に限らず、大き
さが相違していても、あるいは互いの画像どうしが重な
っていてもよい。第5図は指定された基準画像A−Dの
うち、右角部の画像Aの拡大図であり、実際の対象物の
濃淡画像は暗部AIと明部A2とで明確に区分されてお
らず、暗部A1と明部Atとの境界部には中間的な明る
さの部分A3が存在している。第6図は第5図に示され
る基準画像Aの各画素の濃度値の一例を示したもので、
説明上5×4個の画素で構成したが、実際にはこれより
多くの画素で構成されている。各画素のうち、暗部A、
の濃度値が50、明部A2の濃度値が150、中間部A
、の濃度値が100としである。
Next, one or more rectangular reference image ranges A-D are specified in characteristic parts of the grayscale image of the non-defective object (step 14). The reference images A to D are not limited to four locations, and may have different sizes or may overlap each other. FIG. 5 is an enlarged view of image A at the right corner of the specified reference images A-D, and the actual grayscale image of the object is not clearly divided into dark area AI and bright area A2. A portion A3 of intermediate brightness exists at the boundary between the dark area A1 and the bright area At. FIG. 6 shows an example of the density value of each pixel of the reference image A shown in FIG.
Although it is made up of 5×4 pixels for the sake of explanation, it is actually made up of more pixels than this. Among each pixel, dark area A,
The density value of bright area A2 is 50, the density value of bright area A2 is 150, and the density value of intermediate area A is 50.
The density value of , is 100.

次に、検査すべき対象物の濃淡画像中に、上記基準画像
A−Dと対応する対象画像範囲a % dを指定する(
ステップ15)。第7図は指定された対象画像a −d
のうち欠陥の存在する対象画像aの拡大図であり、暗部
a1と明部a2と中間的な明るさの部分a、とが存在し
ている。第8図は第7図に示される対象画像aの各画素
の濃度値の一例を示したものであり、基準画像Aと同じ
<5×4個の画素で構成されている。
Next, specify the target image range a%d corresponding to the reference image A-D in the gray scale image of the target to be inspected (
Step 15). Figure 7 shows designated target images a - d.
This is an enlarged view of a target image a in which a defect exists, and includes a dark part a1, a bright part a2, and a part a of intermediate brightness. FIG. 8 shows an example of the density value of each pixel of the target image a shown in FIG. 7, which is composed of the same <5×4 pixels as the reference image A.

次に、基準画像Aの各画素の濃度値と、対象画像aの各
画素の濃度値との相関係数rを次式によって計算する(
ステップ16)。
Next, the correlation coefficient r between the density value of each pixel of the reference image A and the density value of each pixel of the target image a is calculated using the following formula (
Step 16).

上式において、T (xa 、y−)は基準画像の濃度
値、T’ Cx、 、y、 )は対象画像の濃度値、T
は基準画像の平均濃度、T゛は対象画像の平均濃度であ
り、TとT゛は下記式により求めることができ〒=ΣT
 (x、 、y、 ) / N        ・・・
(2)T゛ −ΣT   (x、、y、、)/N   
    −(3)(但し、N一対象画素数) 相関係数rは一1≦r≦1の範囲をとり、r=1は対象
画像と基準画像の完全一致を示し、rが小さくなるほど
一致度が低いことを示す。
In the above equation, T (xa, y-) is the density value of the reference image, T' Cx, , y, ) is the density value of the target image, T
is the average density of the reference image, T is the average density of the target image, and T and T can be calculated using the following formula: 〒=ΣT
(x, , y, ) / N...
(2) T゛ −ΣT (x,,y,,)/N
-(3) (However, N - number of target pixels) The correlation coefficient r takes a range of -1≦r≦1, where r=1 indicates a complete match between the target image and the reference image, and the smaller r is, the better the match is. indicates that the value is low.

一方、検査すべき対象物の良否判定のための相関係数下
限値r aimを予めメモリに設定しておき、(1)式
によって計算された相関係数rと下限値r+ai1とを
比較する(ステップ17)。この下限値rat、は画像
の画素数、画像の範囲、検出精度等に応じて適宜設定す
ることができる。r≧raillの場合には対象画像と
基準画像の一致度が高いので、検査対象物が良品である
としてrOKJ信号を出力しくステップ18) 、r 
<r aimの場合には対象画像と基準画像の一致度が
低いので、検査対象物が不良品であるとしてrNGJ信
号を出力する(ステップ19)。
On the other hand, a correlation coefficient lower limit value r aim for determining the quality of the object to be inspected is set in advance in the memory, and the correlation coefficient r calculated by equation (1) and the lower limit value r + ai1 are compared ( Step 17). This lower limit value rat can be set as appropriate depending on the number of pixels of the image, the range of the image, the detection accuracy, etc. If r≧rail, the degree of coincidence between the target image and the reference image is high, so it is assumed that the object to be inspected is a good product and the rOKJ signal is output.Step 18), r
If <r aim, the degree of coincidence between the target image and the reference image is low, so the inspection target is determined to be a defective product and an rNGJ signal is output (step 19).

上記の場合には、複数箇所指定された基準画像A−Dお
よび対象画像a −dのうちの1箇所について一致度を
判別したが、同様に他の箇所の画像の一致度を判別すれ
ば、検査すべき対象物の欠陥の有無だけでなく、欠陥位
置も特定できるので望ましい。
In the above case, the degree of matching was determined for one location among the reference images A-D and target images a-d, which were specified at multiple locations, but if the degree of matching for images at other locations was determined in the same way, This is desirable because it allows not only the presence or absence of defects in the object to be inspected, but also the location of the defects.

また、上記説明では、対象画像と基準画像の個々の一致
度を判別するために(1)弐によって相関係数「を計算
したが、実際に相関係数rを計算すると多大な時間がか
かり、迅速に良否判別できない。
In addition, in the above explanation, in order to determine the degree of individual matching between the target image and the reference image, the correlation coefficient " was calculated by (1) 2, but actually calculating the correlation coefficient r would take a lot of time. It is not possible to quickly determine whether the product is good or bad.

そこで、次のような■〜■の方法を用いて処理を闇路化
することができる。
Therefore, the following methods 1 to 2 can be used to darken the process.

■相関計数の算出手順を簡略化し、偏差値の符号が一定
となる算出方法 (1)弐ではT(x、、、yn )とT’ (xa 、
y、 )とを取込みながら順次積和しておき、平均濃度
TとTを求めた後、再び偏差値の積和を行う必要がある
ので、手順が煩雑になり、しかも偏差値の符号が変化す
るため、ハード的に積和しようとすると回路が複雑にな
り、簡略化、高速化の妨げとなる。
■ Calculation method that simplifies the correlation coefficient calculation procedure and makes the sign of the deviation value constant (1) In 2, T (x, , yn ) and T' (xa ,
y, ), and after obtaining the average density T and T, it is necessary to perform the product sum of the deviation values again, which makes the procedure complicated, and furthermore, the sign of the deviation value changes. Therefore, if you try to perform product-sum using hardware, the circuit will become complicated, which will hinder simplification and speeding up.

そこで、(1)弐〜(3)式で相関計数「を算出するに
あたり、基準画像と対象画像の濃度値がら一定値む。を
fj、3EL、その結果が負の値をとらないように【。
Therefore, when calculating the correlation coefficient ``with equations (1) 2 to (3), the density values of the reference image and the target image have a constant value. .

を定めた場合のそれぞれの濃度値を次式のようにt(x
、 、y、 ) 、  t“ (Xa +V++ ) 
 とする。
When t(x
, , y, ), t" (Xa +V++)
shall be.

t(xll、y、1)=T(x、、y、) −to  
 ・=(41t’ (XM 、ys ) −T’ Cx
n 、y−)   L6 =(5)この1. 1  を
用いて(1)式を書き換えると、となり、この弐により
相間係数rが求まる。
t(xll, y, 1) = T(x,, y,) −to
・=(41t' (XM, ys) -T' Cx
n, y-) L6 = (5) This 1. When formula (1) is rewritten using 1, it becomes, and the correlation coefficient r can be found from this 2.

(6)式では、T(x−+4’a ) とT’ (X+
+ +yn ) とを取込みながら順次に偏差値の積和
ができ、符号も一定であるので、闇路化、高速処理が可
能となる。
In equation (6), T(x-+4'a) and T'(X+
Since the products and sums of deviation values can be sequentially performed while taking in + +yn ) and the sign is also constant, it is possible to perform dark processing and high-speed processing.

また、to及び基準画像は事前に決定しているから、Σ
t (x−+3’++ )及びΣ[1(X、 +7s 
) l ”は予め算出しておけるので、さらに都合が良
い、なお、(4)式、(5ン弐のように濃度(直t、t
+ とするのは、無効データを削減し、闇路化、高速化
に寄与させるためである。
Also, since to and the reference image are determined in advance, Σ
t (x-+3'++) and Σ[1(X, +7s
) l'' can be calculated in advance, which is even more convenient.
The reason for setting it to + is to reduce invalid data and contribute to the reduction of traffic congestion and speed-up.

■基準画像及び対象画像の濃淡階調を切り捨てることに
より、算出の簡略化を図る方法通常は画像階調を256
階調とし、最大濃度を256とする場合が多い。こうし
た256階調すなわち8ビツト演算を行う必要があり、
ソフト処理を行う場合は積和計算のデータ長が長くなり
、高速処理の障害となる。また、ハード処理を行う場合
は膨大なハード回路が必要となる。
■A method to simplify the calculation by cutting off the gray scale of the reference image and target image.Usually, the image gray scale is set to 256.
The maximum density is often set to 256 gradations. It is necessary to perform these 256 gradations, or 8-bit operations,
When software processing is performed, the data length for product-sum calculation becomes long, which becomes an obstacle to high-speed processing. Furthermore, when performing hardware processing, an enormous amount of hardware circuitry is required.

こうした問題を回避するために、基準画像と対象画像の
下位の濃度値を切り捨てて、IIl調値を減らすことに
より、高速処理を実現できる。
In order to avoid such problems, high-speed processing can be achieved by cutting off the lower density values of the reference image and the target image to reduce the IIl tone value.

まず、相関係数算出式(1)の平方根を求める作業を省
く。即ち、 N               N であるが、分母のfを開く処理は、ソフト処理及びハー
ド処理ともに?j!11な処理となるため、次式のよう
に分母分子を2乗する。つまり、(−Σt−t’−t−
t’ン2 N             N となり、rの値は−]≦r≦1であるがら、r2は0≦
r2≦1をとり、例えば相関係数r=0.7の場合には
、r’ =0.49となり、二次関数の値をとることを
念頭に置く必要がある。
First, the work of calculating the square root of correlation coefficient calculation formula (1) is omitted. In other words, N N , but is the process of opening the denominator f both software and hardware? j! 11 processing, the denominator and numerator are squared as shown in the following equation. In other words, (-Σt-t'-t-
t'n2 N N , and the value of r is -]≦r≦1, but r2 is 0≦
It is necessary to keep in mind that if r2≦1 and the correlation coefficient r=0.7, for example, then r'=0.49, which means that it takes the value of a quadratic function.

なお、(8)式では負の相関が不明となるが、分子(−
Σt−t’  −t ・L′ ) の符号が正であるか負であるがを見ることにより、相関
係数の符号が分かる。
Note that although the negative correlation is unclear in equation (8), the numerator (−
The sign of the correlation coefficient can be determined by checking whether the sign of Σt-t'-t·L') is positive or negative.

■各つィンドウごとに座標変換符号を指定できるように
することにより、標準パターンの設定を容易にする方法 第4図に示すように、矩形対象物の四隅の異常を発見し
ようとする時、対象画像のa % dにそれぞれ基準画
像A−Dを設ける必要がある。しがし、第3図の基準画
像Bと第4図の対象画像すとの相関を求める場合には、
基準画像A、Bが左右対象であるから、対象画像すのX
座標を変換すれば、基準画像へを共用できることになる
■ A method to facilitate the setting of standard patterns by specifying the coordinate transformation code for each window. It is necessary to provide reference images A to D at positions a% and d of the image, respectively. However, when determining the correlation between the reference image B in Fig. 3 and the target image S in Fig. 4,
Since the reference images A and B are left-right symmetrical, the target image
By converting the coordinates, the reference image can be shared.

前述の座標変換のパターンとして、下記のように4パタ
ーン用意すれば良い。
As the coordinate transformation patterns described above, it is sufficient to prepare four patterns as shown below.

X座標の入れ替え  仲モード■ X座標の入れ替え  仲モード■ x、X座標の入れ替え噂モード■ 無変換       →モード■ このように座標変換モードI〜■を付加すれば、非常に
処理効率が良い。
Swapping of X coordinates Naka mode ■ Swapping of X coordinates Naka mode ■ Swapping of x and X coordinates Rumor mode ■ No conversion → mode ■ Adding the coordinate transformation modes I to ■ in this way improves processing efficiency very much.

因みに1、相関係数rは(6)式の通りであり、座標変
換によって影響を受けるのはΣL (Xn +Vn )
L ’ (Xa +Va )のみであるから、他は座標
変換にかかわらず処理を変更する必要がなく、処理手順
は簡単である。
Incidentally, 1, the correlation coefficient r is as shown in equation (6), and what is affected by coordinate transformation is ΣL (Xn +Vn)
Since only L' (Xa +Va) is involved, there is no need to change the processing for the rest regardless of coordinate transformation, and the processing procedure is simple.

〔発明の効果〕〔Effect of the invention〕

以上の説明で明らかなように、本発明によれば、対象物
の形状を相関係数と下限値との比較により判別できるの
で、判別のための特別なアルゴリズムを必要とせず、検
査内容の変更も容易となる。
As is clear from the above explanation, according to the present invention, the shape of the object can be determined by comparing the correlation coefficient with the lower limit value, so there is no need for a special algorithm for the determination, and changes in the inspection content can be made. It also becomes easier.

また、本発明は基準画像と対象画像との単なる面積の一
致度ではなく、形状の一致度を判定しているので、凹凸
があって面積に差がない場合でも簡単に判別できる。そ
して、濃淡の微妙な差を濃度値によって判定するので、
画像のコントラストが明瞭でない場合でも、精密に良否
を判別できる。
Furthermore, since the present invention determines the degree of shape conformity between the reference image and the target image, rather than simply the degree of conformity in area, it is possible to easily determine even if there are irregularities but no difference in area. Then, since subtle differences in shading are determined by density values,
Even if the contrast of the image is not clear, it is possible to accurately determine whether the image is good or bad.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明にかかる検査方法を実施するための装置
の構成図、第2図はその動作を説明するフローチャート
図、第3図は良品である対象物の一例の濃淡画像図、第
4図は検査すべき対象物の一例の濃淡画像図、第5図は
基準画像の拡大図、第6図は基準画像の濃度値図、第7
図は対象画像の拡大図、第8図は対象画像の濃度値図で
ある。 l・・・対象物、2・・・カメラ、3・・・コントロー
ラ、4・・・入力装置、A・・・基準画像、a・・・対
象画像。
FIG. 1 is a block diagram of an apparatus for carrying out the inspection method according to the present invention, FIG. 2 is a flowchart explaining its operation, FIG. 3 is a grayscale image of an example of a non-defective object, and FIG. The figure is a grayscale image diagram of an example of the object to be inspected, Figure 5 is an enlarged view of the reference image, Figure 6 is a density value diagram of the reference image, and Figure 7 is a diagram of the density value of the reference image.
The figure is an enlarged view of the target image, and FIG. 8 is a density value diagram of the target image. l...Target, 2...Camera, 3...Controller, 4...Input device, A...Reference image, a...Target image.

Claims (1)

【特許請求の範囲】  良品である対象物の濃淡画像を多数の画素に分け、各
画素の濃度値を検出する工程と、 検査すべき対象物の濃淡画像を上記良品対象物の濃淡画
像と同数の画素に分け、各画素の濃度値を検出する工程
と、 良品対象物の濃淡画像中に1箇所以上の方形の基準画像
範囲を定める工程と、 検査対象物の濃淡画像中に、個々の基準画像と対応しか
つ基準画像と同一範囲の方形の対象画像範囲を定める工
程と、 個々の基準画像と対象画像との対応する各画素の濃度値
による相関係数を計算する工程と、個々の画像範囲ごと
に相関係数の下限値を設定する工程と、 計算された相関係数と下限値との比較により個々の基準
画像と対象画像との一致度を判定する工程と、 を含む濃淡パターンマッチングによる検査方法。
[Scope of Claims] A step of dividing a grayscale image of a non-defective object into a large number of pixels and detecting the density value of each pixel; a step of dividing the inspection target into pixels and detecting the density value of each pixel; a step of defining one or more rectangular reference image ranges in the grayscale image of the non-defective object; a step of determining a rectangular target image range that corresponds to the image and has the same range as the reference image; a step of calculating a correlation coefficient based on the density value of each corresponding pixel between each reference image and the target image; A step of setting a lower limit value of the correlation coefficient for each range, a step of determining the degree of matching between each reference image and the target image by comparing the calculated correlation coefficient and the lower limit value, and a grayscale pattern matching that includes the following steps. Inspection method by.
JP1145710A 1989-06-08 1989-06-08 Inspecting method utilizing gradation pattern matching Pending JPH0310107A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1145710A JPH0310107A (en) 1989-06-08 1989-06-08 Inspecting method utilizing gradation pattern matching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1145710A JPH0310107A (en) 1989-06-08 1989-06-08 Inspecting method utilizing gradation pattern matching

Publications (1)

Publication Number Publication Date
JPH0310107A true JPH0310107A (en) 1991-01-17

Family

ID=15391333

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1145710A Pending JPH0310107A (en) 1989-06-08 1989-06-08 Inspecting method utilizing gradation pattern matching

Country Status (1)

Country Link
JP (1) JPH0310107A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5872871A (en) * 1995-04-25 1999-02-16 Nippondenso Co., Ltd. Method and device for measuring the position of a pattern
JP2006163739A (en) * 2004-12-06 2006-06-22 Casio Comput Co Ltd Apparatus and method for detecting position of maximum correlation and program for processing of detecting position of maximum correlation
JP2006200945A (en) * 2005-01-18 2006-08-03 Satake Corp Device for discriminating grain grade
JP2011065664A (en) * 2010-10-29 2011-03-31 Casio Computer Co Ltd Apparatus and method for detecting maximum correlation position, maximum correlation position detection processing program, and apparatus, method and program for image collation
CN102901445A (en) * 2012-09-28 2013-01-30 华中科技大学 Device and method for detecting micro-electronic packaging process quality based on photo-thermal imaging

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5872871A (en) * 1995-04-25 1999-02-16 Nippondenso Co., Ltd. Method and device for measuring the position of a pattern
JP2006163739A (en) * 2004-12-06 2006-06-22 Casio Comput Co Ltd Apparatus and method for detecting position of maximum correlation and program for processing of detecting position of maximum correlation
JP2006200945A (en) * 2005-01-18 2006-08-03 Satake Corp Device for discriminating grain grade
JP4529700B2 (en) * 2005-01-18 2010-08-25 株式会社サタケ Grain quality discrimination device
JP2011065664A (en) * 2010-10-29 2011-03-31 Casio Computer Co Ltd Apparatus and method for detecting maximum correlation position, maximum correlation position detection processing program, and apparatus, method and program for image collation
CN102901445A (en) * 2012-09-28 2013-01-30 华中科技大学 Device and method for detecting micro-electronic packaging process quality based on photo-thermal imaging
WO2014048015A1 (en) * 2012-09-28 2014-04-03 华中科技大学 Device and method for detecting quality of microelectronic packaging technology based on photo-thermal imaging

Similar Documents

Publication Publication Date Title
JPS58215541A (en) Automatic optical inspection method
JP2760250B2 (en) Pinhole inspection equipment
JP2005121546A (en) Defect inspection method
JPH0591411A (en) Image processor
JP2002140693A (en) Image processing parameter determination device, its method and recording medium with recorded image processing parameter determination program
JP2002140694A (en) Image processor, its method and recording medium with recorded image processing program
JPH08292014A (en) Measuring method of pattern position and device thereof
JPH0310107A (en) Inspecting method utilizing gradation pattern matching
JP2003167529A (en) Method and device for picture defect detection, and program for picture defect detection
JP2710527B2 (en) Inspection equipment for periodic patterns
JP3127598B2 (en) Method for extracting density-varying constituent pixels in image and method for determining density-fluctuation block
EP0599335B1 (en) Cylindrical container inner surface tester
JPH11120362A (en) Processor and method for image processing and machine-readable recording medium where criterion setting program is recorded
JP2961140B2 (en) Image processing method
JP2003510568A (en) LCD inspection method and LCD inspection apparatus by pattern comparison
JP2638121B2 (en) Surface defect inspection equipment
JP3111434B2 (en) Image processing device
KR970012877A (en) Cathode ray tube screen inspection adjusting device and method
JP2000105167A (en) Address calibration method of image quality inspection device
JPH03160309A (en) Image quality testing apparatus
JPH03158710A (en) Image data generating device
JPH064670A (en) Pattern matching device for gradation picture
JPH10143673A (en) Picture processor
JP2003098117A (en) Apparatus for detecting defect of image and its defect detection method
JPH0682724B2 (en) Wafer defect inspection system