JPH0718811B2 - Defect inspection method - Google Patents

Defect inspection method

Info

Publication number
JPH0718811B2
JPH0718811B2 JP1063120A JP6312089A JPH0718811B2 JP H0718811 B2 JPH0718811 B2 JP H0718811B2 JP 1063120 A JP1063120 A JP 1063120A JP 6312089 A JP6312089 A JP 6312089A JP H0718811 B2 JPH0718811 B2 JP H0718811B2
Authority
JP
Japan
Prior art keywords
value
density
image
edge
pixel
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 - Lifetime
Application number
JP1063120A
Other languages
Japanese (ja)
Other versions
JPH02242382A (en
Inventor
敏範 井上
満 白沢
聰 山竹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works 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 Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP1063120A priority Critical patent/JPH0718811B2/en
Priority to US07/433,823 priority patent/US4974261A/en
Priority to DE3937950A priority patent/DE3937950A1/en
Publication of JPH02242382A publication Critical patent/JPH02242382A/en
Publication of JPH0718811B2 publication Critical patent/JPH0718811B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Processing (AREA)

Description

【発明の詳細な説明】Detailed Description of the Invention 【産業上の利用分野】[Industrial applications]

本発明は、検査対象物の表面の欠け、ひび、汚れ、異物
等の外観上の欠陥部を画像処理により検査する欠陥検査
方法に関するものである。
The present invention relates to a defect inspection method for inspecting a defective portion on the surface of an inspection object such as a chip, a crack, a stain, and a foreign object by image processing.

【従来の技術】[Prior art]

従来より検査対象物を含む空間領域をテレビカメラ等の
画像入力手段で撮像し、原画像の各画素の濃度を適宜し
きい値を用いて2値化し、この2値画像に基づいて欠陥
部を検出する方法が知られている(たとえば、特開昭62
−88946号公報参照)。すなわち、2値画像において検
査対象物とみなせる領域の内側に値の反転する部位が存
在すれば欠陥部とみなすようにしている。
Conventionally, a spatial region including an inspection object is imaged by an image input means such as a television camera, the density of each pixel of an original image is binarized by appropriately using a threshold value, and a defective portion is identified based on this binary image. A method for detecting is known (see, for example, Japanese Patent Laid-Open No. Sho 62-62
-88946 gazette). That is, in the binary image, if there is a portion where the value is inverted inside the area that can be regarded as the inspection object, it is regarded as a defective portion.

【発明が解決しようとする課題】[Problems to be Solved by the Invention]

上記従来方法では、2値画像に基づいて欠陥部を判定す
るから、欠陥部の濃度と欠陥部の周辺の濃度とがしきい
値に対して同じ領域に含まれていると(たとえば、どち
らの濃度もしきい値以上であると)、欠陥部の識別がで
きないという問題があった。 本発明は上記問題点の解決を目的とするものであり、欠
陥部のエッジ上の点とみなせるエッジフラグ点を検出
し、エッジフラグ点の近傍の濃度変化、もしくは欠陥部
の輪郭線上の各画素の近傍の濃度変化を検出することに
より、欠陥部の検出精度を向上させた欠陥検査方法を提
供しようとするものである。
In the above conventional method, since the defective portion is determined based on the binary image, the density of the defective portion and the density around the defective portion are included in the same region with respect to the threshold value (for example, If the density is also above the threshold value), there is a problem that the defective portion cannot be identified. The present invention is intended to solve the above problems, and detects an edge flag point that can be regarded as a point on the edge of a defective portion, and changes the density in the vicinity of the edge flag point or each pixel on the contour line of the defective portion. An object of the present invention is to provide a defect inspection method in which the accuracy of detecting a defective portion is improved by detecting the density change in the vicinity of.

【課題を解決するための手段】[Means for Solving the Problems]

本発明では、上記目的を達成するために、エッジ画像に
ついて検査対象物の輪郭線の内側に少なくとも1本の探
索ラインを設定し、探索ライン上で欠陥部のエッジとみ
なせるエッジフラグ点を検出すると、エッジフラグ点の
近傍での原画像についての濃度変化に基づいて欠陥部を
識別するようにしているのである。 また、エッジ画像について検査対象物の輪郭線の内側に
少なくとも1個の検査領域を設定し、検査領域の全領域
を走査しつつ探索することにより欠陥部のエッジとみな
せるエッジフラグ点を検出すると、エッジフラグ点を開
始点として欠陥部の輪郭線を追跡するとともに、輪郭線
上の各画素の近傍での原画像についての濃度変化に基づ
いて欠陥部を識別するようにしてもよい。
In the present invention, in order to achieve the above object, at least one search line is set inside the contour line of the inspection object for the edge image, and an edge flag point that can be regarded as an edge of a defective portion is detected on the search line. The defect portion is identified based on the change in density of the original image near the edge flag point. Further, when at least one inspection area is set inside the contour line of the inspection object for the edge image, and an edge flag point that can be regarded as the edge of the defect portion is detected by searching while scanning the entire inspection area, The contour line of the defective portion may be traced using the edge flag point as a starting point, and the defective portion may be identified based on the density change of the original image near each pixel on the contour line.

【作用】[Action]

上記第1の方法によれば、欠陥部のエッジ上の点とみな
せるエッジフラグ点を検出し、エッジフラグ点の近傍の
原画像についての濃度変化を検出するから、周囲とのコ
ントラストが比較的小さい欠陥部であっても検出するこ
とができ、欠陥部の検出精度が向上するのである。 また、上記第2の方法においても、欠陥部の輪郭線の近
傍の濃度変化を検出するから、コントラストが比較的小
さい欠陥部でも検出することができるのである。
According to the first method, the edge flag point that can be regarded as a point on the edge of the defective portion is detected, and the density change in the original image in the vicinity of the edge flag point is detected. Therefore, the contrast with the surroundings is relatively small. Even a defective portion can be detected, and the detection accuracy of the defective portion is improved. Also in the second method, since the density change in the vicinity of the contour line of the defective portion is detected, it is possible to detect the defective portion having a relatively small contrast.

【実施例1】 本発明では、第1図に示すように、検査対象物をテレビ
カメラ等の画像入力装置1により撮像し、各画素の濃度
をアナログ−デジタル変換部2においてデジタル信号に
変換した後、前処理部3において以下の前処理を行うこ
とにより、アナログ−デジタル変換部2より得られる原
画像のほかに、微分絶対値画像、微分方向値画像、エッ
ジ画像を得る。 すなわち、検査対象物を含む空間領域を撮像して得られ
る原画像P0は濃淡画像であって、第2図(a)に示すよ
うに、検査対象物O、欠陥X1、異物X2などを含む画像と
なっている。この濃淡画像から検査対象物Oの輪郭線等
のエッジを抽出する処理は、「エッジは濃度変化が大き
い部分に対応している」という考え方を基本にしてい
る。したがって、濃度を微分することによってエッジの
抽出を行なう。微分処理は、第3図に示すように、原画
像P0を3×3画素の局所並列ウインドウWに分割して行
なう。つまり、注目する画素Eと、その画素Eの周囲の
8画素(8近傍)A〜D,F〜Iとで局所並列ウインドウ
Wを形成し、局所並列ウインドウW内の画素A〜Iの濃
度の縦方向の濃度変化ΔVと横方向の濃度変化ΔHとを
次式によって求め、 ΔV=(A+B+C)−(G+H+I) ΔH=(A+D+G)−(C+F+I) さらに、微分絶対値|e|E値と微分方向値∠eEとを次式に
よって求めるのである。 |e|E=(ΔV2+ΔH21/2 ただし、A〜Iは対応する画素の濃度を示している。上
式から明らかなように、微分絶対値|e|Eは、原画像の注
目する画素の近傍領域における濃度の最大変化率を表
し、微分方向値∠eEは、同近傍領域における濃度の最大
変化の方向に直交する方向を表している。以上の演算を
原画像POの全画素について行なうことにより、検査対象
物Oの輪郭や欠陥X1、異物X2等が存在しているような濃
度変化が大きい部分と、その変化の方向とを抽出するこ
とができるのである。ここに、各画素の濃度を、微分絶
対値|e|Eで表現した画像を微分絶対値画像、微分方向値
∠eEで表現した画像を微分方向値画像と呼ぶ。 次に細線化処理が施される。細線化処理は、微分絶対値
が大きいほど濃度変化が大きいことを表わしている点に
着目して行なわれる。すなわち、各画素の微分絶対値を
周囲の画素の微分絶対値と比較し、周囲の画素よりも大
きくなるものを連結していくことにより、1画素の幅を
有したエッジを抽出するのである。第4図に示すよう
に、各画素の位置をX−Y座標で表わし、微分絶対値を
Z軸に取った微分絶対値画像P1を考えれば、細線化処理
は、この曲面における稜線を求めることに相当する。こ
こまでの処理により、微分絶対値の大小にかかわらず、
すべての稜線が抽出される。この段階で得られている稜
線には、ノイズ等による不要な小さな山も含まれている
から、第4図に示すように、適宜しきい値SLを設定し、
このしきい値SL以上の値のみを採用してノイズ成分を除
去する。この処理で得られた画像は、原画像のコントラ
ストが不十分であるときや、ノイズが多いようなときに
は、不連続線になりやすい。そこで、エッジ延長処理を
行なう。エッジ延長処理では、不連続線の端点から始め
て、注目する画素とその周囲の画素とを比較し、次式で
表わされる評価関数f(ej)がもっとも大きくなる方向
に線を延長し、他の線の端点に衝突するまでこれを続け
る。 ここに、e0は中心画素(局所並列ウインドウWのEに相
当する)の微分データであり、ejは隣接画素(局所並列
ウインドウWの8近傍に相当する)の微分データであ
り、j=1,2,……,8である。 以上の処理により、第2図(b)に示すように、原画像
において濃度変化が大きい部分をなぞるようなエッジ画
像P4が得られる。エッジ画像P4では、各線が検査対象物
O、欠陥X1、異物X2等の輪郭線l0〜l2を表すものとみな
せる。以上の前処理により、原画像、微分絶対値画像、
微分方向コード画像、エッジ画像の4種類の画像が得ら
れ、各画像はそれぞれ原画像メモリ4、微分絶対値画像
メモリ5、微分方向値画像メモリ6、エッジ画像メモリ
7に記憶される。以下の説明では、各画像の画素の位置
をX−Y座標で表現するものとし、各画像における画素
の濃度をそれぞれf1(x,y)、f2(x,y)、f3(x,y)、f
4(x,y)とする。 原画像は、濃淡画像であって、濃度は通常8ビットで表
されるから、各画素における濃度a(=f1(x,y))
は、0≦a≦255となる。また、微分絶対値画像の濃度
(すなわち、微分絶対値)b(=f2(x,y))は、たと
えば6ビットで表され、0≦b≦63となり、微分方向値
画像の濃度(すなわち、微分方向値)c(=f3(x,
y))は、たとえば16方向で表され、0≦c≦15とな
る。エッジ画像については、線の有無のみであるから、
線となる画素は“1"、それ以外の画素は“0"として表さ
れる。つまり、f4(x,y)の値域は{0,1}となる。な
お、以下の説明においては、濃度という用語は白の濃度
を表し、濃度値が大きいほど明るいものとする。 次に、探索処理部6では、第7図に示すように、エッジ
画像P4について輪郭線l0の内側に、探索ラインSを設定
する。探索ラインSは、第8図(a)〜(d)に示すよ
うに、閉ループ形状あれば任意に設定可能である。すな
わち、開始点と終了点とが一致する探索ラインSを設定
するのである。探索ラインSを設定した後、探索を開始
し、探索ラインS上においてf4(x,y)=1となる点が
見付かると、この点をエッジフラグ点とする。次に、ス
ティックマスク設定部9では、第9図に示すように、開
始点から始めて最初に見付かったエッジフラグ点Fの画
素を中心として、探索ラインS上でエッジフラグ点Fの
前後の複数画素(第9図中斜線で示す画素)を抽出して
スティックマスクMを設定する。スティックマスクM
は、幅1、長さ2n+1の領域であり、ここに、nは自然
数であり適宜設定される。いまエッジフラグ点Fの座標
を(xF,yF)とし、スティックマスクMにおける各画素
の座標をRn(xF+n,yF+n),……,R1(xF+1,yF+1),F
(xF,yF),S1(xF-1,yF-1),……,Sn(xF-n
yF-n)とすれば、濃度演算部10では、下式の演算を行っ
てスティックマスクM内でエッジフラグ点Fを挟んで対
称位置にある原画像P0上での画素の濃度の差の総和Dを
求める。 D=Σ|f1(xF+i,yF+i)−f1(xF-i,yF-i)|ただ
し、i=1,2,……,n、もしくは、i=m,m+1,……,n
(m≠1)とする。判定部11では、以上のようにして求
めた総和Dを所定のしきい値SL1と比較し、D>SL1であ
れば、探索ラインS上に欠けや異物等の欠陥部が存在し
ていると判断する。すなわち、エッジフラグ点Fが欠陥
部の輪郭線の上の点であれば、スティックマスクMは、
欠陥部と欠陥部ではない部分とに跨がることになるか
ら、エッジフラグ点Fを中心として対称位置に存在する
画素の濃度差を求めれば、エッジフラグ点Fの近傍での
コントラストが検出できるわけである。さらに、複数画
素について濃度差を検出しているから、コントラストが
強調され、検出精度を向上させることができる。D≦SL
1のときには、探索ラインS上での探索を継続し、エッ
ジフラグ点の有無を検出する。こうして、探索ラインS
の終点に到達した段階で、エッジフラグ点が検出されな
かったときには、欠陥部が存在しないものと判定するの
である。以上の処理の流れを第6図に示す。
First Embodiment In the present invention, as shown in FIG. 1, an inspection target is imaged by an image input device 1 such as a television camera, and the density of each pixel is converted into a digital signal in an analog-digital conversion unit 2. After that, by performing the following preprocessing in the preprocessing unit 3, a differential absolute value image, a differential direction value image, and an edge image are obtained in addition to the original image obtained by the analog-digital conversion unit 2. That is, the original image P 0 obtained by imaging the spatial region including the inspection object is a grayscale image, and as shown in FIG. 2A, the inspection object O, the defect X 1 , the foreign material X 2, etc. The image includes. The process of extracting an edge such as a contour line of the inspection object O from the grayscale image is based on the idea that “the edge corresponds to a portion where the density change is large”. Therefore, the edge is extracted by differentiating the density. The differentiation process is performed by dividing the original image P 0 into 3 × 3 pixel local parallel windows W, as shown in FIG. That is, a pixel E of interest and eight pixels (8 neighborhoods) A to D and F to I around the pixel E form a local parallel window W, and the density of the pixels A to I in the local parallel window W is The vertical density change ΔV and the horizontal density change ΔH are obtained by the following formula, and ΔV = (A + B + C) − (G + H + I) ΔH = (A + D + G) − (C + F + I) Further, the differential absolute value | e | E value and the differential The direction value ∠e E is calculated by the following equation. | e | E = (ΔV 2 + ΔH 2 ) 1/2 However, A to I indicate the densities of the corresponding pixels. As is clear from the above equation, the differential absolute value | e | E represents the maximum change rate of the density in the neighborhood area of the pixel of interest in the original image, and the differential direction value ∠e E is the maximum density in the neighborhood area. It represents the direction orthogonal to the direction of change. By performing the above calculation for all the pixels of the original image P O , the contour of the inspection object O, the defect X 1 , the foreign substance X 2 and the like where the density change is large and the direction of the change is large. Can be extracted. An image in which the density of each pixel is expressed by a differential absolute value | e | E is called a differential absolute value image, and an image in which the density is expressed by a differential direction value ∠e E is called a differential direction value image. Next, thinning processing is performed. The thinning process is performed by paying attention to the fact that the larger the differential absolute value, the larger the density change. That is, the differential absolute value of each pixel is compared with the differential absolute value of the surrounding pixels, and those having a larger value than the surrounding pixels are connected to extract an edge having a width of one pixel. As shown in FIG. 4, considering the differential absolute value image P 1 in which the position of each pixel is represented by XY coordinates and the differential absolute value is taken on the Z axis, the thinning process determines the ridgeline on this curved surface. Equivalent to that. By the processing so far, regardless of the magnitude of the differential absolute value,
All edges are extracted. Since the ridge line obtained at this stage includes unnecessary small peaks due to noise or the like, the threshold value SL is appropriately set as shown in FIG.
A noise component is removed by adopting only a value equal to or higher than the threshold value SL. The image obtained by this processing is likely to be a discontinuous line when the contrast of the original image is insufficient or when there is a lot of noise. Therefore, edge extension processing is performed. In the edge extension process, starting from the end point of the discontinuous line, the pixel of interest is compared with the surrounding pixels, and the line is extended in the direction in which the evaluation function f (e j ) expressed by Continue until you hit the end of the line. Here, e 0 is differential data of the central pixel (corresponding to E of the local parallel window W), e j is differential data of adjacent pixels (corresponding to 8 neighborhoods of the local parallel window W), and j = 1,2, ..., 8. As a result of the above processing, as shown in FIG. 2B, an edge image P 4 that traces a portion of the original image where the density change is large is obtained. In the edge image P 4, it can be regarded as what each line represents a test object O, defect X 1, outline l 0 to l 2 of foreign objects such as X 2. By the above pre-processing, the original image, differential absolute value image,
Four types of images, a differential direction code image and an edge image, are obtained, and each image is stored in the original image memory 4, the differential absolute value image memory 5, the differential direction value image memory 6, and the edge image memory 7. In the following description, it is assumed that the pixel position of each image is represented by XY coordinates, and the pixel densities in each image are f 1 (x, y), f 2 (x, y), and f 3 (x , y), f
4 (x, y). The original image is a grayscale image, and the density is usually represented by 8 bits, so the density a (= f 1 (x, y)) at each pixel
Is 0 ≦ a ≦ 255. Further, the density of the differential absolute value image (that is, the differential absolute value) b (= f 2 (x, y)) is represented by 6 bits, for example, 0 ≦ b ≦ 63, and the density of the differential direction value image (that is, , Differential direction value) c (= f 3 (x,
y)) is expressed in 16 directions, for example, and 0 ≦ c ≦ 15. For the edge image, only the presence or absence of lines,
Pixels forming lines are represented as "1" and other pixels are represented as "0". That is, the range of f 4 (x, y) is {0,1}. In the following description, the term density represents white density, and the larger the density value, the brighter. Next, in the search processing unit 6, as shown in FIG. 7, the search line S is set inside the contour line l 0 for the edge image P 4 . As shown in FIGS. 8A to 8D, the search line S can be arbitrarily set as long as it has a closed loop shape. That is, the search line S in which the start point and the end point match is set. After setting the search line S, the search is started, and when a point where f 4 (x, y) = 1 is found on the search line S, this point is set as an edge flag point. Next, in the stick mask setting unit 9, as shown in FIG. 9, a plurality of pixels before and after the edge flag point F on the search line S are centered on the pixel of the edge flag point F found first from the start point. (Pixels indicated by diagonal lines in FIG. 9) are extracted and the stick mask M is set. Stick mask M
Is a region having a width of 1 and a length of 2n + 1, where n is a natural number and is appropriately set. Now, the coordinates of the edge flag point F are (x F , y F ), and the coordinates of each pixel in the stick mask M are R n (x F + n , y F + n ), ..., R 1 (x F + 1 , Y F + 1 ), F
(X F , y F ), S 1 (x F-1 , y F-1 ), ..., S n (x Fn ,
y Fn ), the density calculation unit 10 calculates the sum of the differences in the pixel densities on the original image P 0 at symmetrical positions in the stick mask M with the edge flag point F sandwiched between them. Find D. D = Σ | f 1 (x F + i , y F + i ) −f 1 (x Fi , y Fi ) | However, i = 1,2, ..., n, or i = m, m + 1, ... …, N
(M ≠ 1). The determination unit 11 compares the total sum D obtained as described above with a predetermined threshold value SL1. If D> SL1, it means that there is a defective portion such as a chip or a foreign substance on the search line S. to decide. That is, if the edge flag point F is a point on the outline of the defective portion, the stick mask M is
Since the defect portion and the portion which is not the defect portion are straddled, the contrast in the vicinity of the edge flag point F can be detected by obtaining the density difference of the pixels existing symmetrically with respect to the edge flag point F. That is why. Further, since the density difference is detected for a plurality of pixels, the contrast is emphasized and the detection accuracy can be improved. D ≦ SL
When it is 1, the search on the search line S is continued and the presence or absence of the edge flag point is detected. Thus, the search line S
When the edge flag point is not detected at the stage when the end point is reached, it is determined that there is no defective portion. The flow of the above processing is shown in FIG.

【実施例2】 上記実施例では、探索ラインSを閉ループとなる形状に
形成していたが、本実施例では、第11図に示すように、
探索ラインSの開始点と終了点とを異なる位置としてい
る。ここに、探索ラインSは、検査対称物の輪郭線の内
側であれば、直線、曲線、折線等、形状は任意に設定可
能であり、また、方向も任意に設定可能である。 処理の流れを示すと、第10図に示す通りであって、探索
ラインSを設定した後、実施例1と同様にしてエッジフ
ラグ点Fを検出し、エッジフラグ点Fに対して実施例1
と同様の手法でスティックマスクMを設定し、スティッ
クマスクM上での対称位置に存在する画素の濃度差の総
和Dを求める。この総和Dが所定のしきい値SL1に対し
て、D>SL1を満たせば、このエッジフラグ点Fを欠陥
候補点とする。ただし、本実施例では、エッジフラグ点
FがD>SL1を満たしてもただちに欠陥部であると判定
するのではなく、探索ラインS上においてこのような欠
陥候補点の総数Kを求めた後、欠陥候補点の総数Kを所
定のしきい値SL2と比較し、K>SL2であるときに、欠陥
部が存在するものと判定する。すなわち、欠陥部が存在
するかどうかの判定条件を実施例1よりも厳密にしてお
り、検出精度を一層高めることができるのである。
Second Embodiment In the above-described embodiment, the search line S is formed in a closed loop shape, but in the present embodiment, as shown in FIG.
The start point and the end point of the search line S are set to different positions. Here, the search line S can have any shape such as a straight line, a curved line, and a polygonal line as long as it is inside the contour line of the inspection object, and the direction can also be set arbitrarily. The processing flow is as shown in FIG. 10. After setting the search line S, the edge flag point F is detected in the same manner as in the first embodiment, and the edge flag point F is used in the first embodiment.
The stick mask M is set by a method similar to the above, and the total sum D of the density differences of pixels existing at symmetrical positions on the stick mask M is obtained. If this total D satisfies D> SL1 with respect to a predetermined threshold value SL1, then this edge flag point F is made a defect candidate point. However, in the present embodiment, even if the edge flag point F satisfies D> SL1, it is not immediately determined to be a defective portion, but after the total number K of such defect candidate points on the search line S is obtained, The total number K of defect candidate points is compared with a predetermined threshold value SL2, and when K> SL2, it is determined that a defective portion exists. That is, the condition for determining whether or not a defective portion exists is stricter than that in the first embodiment, and the detection accuracy can be further improved.

【実施例3】 本実施例では、第13図に示すように、同形状の複数本の
探索ラインS1〜Snを設定する。この場合、第14図に示す
ように、欠陥部X1が存在していれば、欠陥部X1は複数本
の探索ラインについて連続して見つかるから、欠陥部X1
を見つけた探索ラインを欠陥候補ラインとし、隣接する
複数本の探索ラインが欠陥候補ラインとなり、かつ欠陥
候補ラインの総本数Lを所定のしきい値SL3と比較して
L>SL3となっているときには、欠陥部X1が存在するも
のと判定する。ここに、1本の探索ライン上に欠陥部X1
が存在するかどうかの判定は、実施例1または実施例2
のいずれか方法によればよい。本実施例の処理の流れは
第12図に示す通りであって、同図中に破線で示した部分
を除けば欠陥部X1を実施例1の方法で検出したことによ
り、破線で示した部分を入れると実施例2の方法で検出
したことになる。
Third Embodiment In this embodiment, as shown in FIG. 13, a plurality of search lines S 1 to S n having the same shape are set. In this case, as shown in FIG. 14, if there is defective portion X 1, since the defect portion X 1 is found in succession for a plurality of search line, defect X 1
The search line that has found is a defect candidate line, a plurality of adjacent search lines are defect candidate lines, and the total number L of defect candidate lines is compared with a predetermined threshold value SL3 so that L> SL3. Sometimes, it is determined that the defective portion X 1 exists. Here, the defect X 1 on one search line
Whether or not is present is determined in Example 1 or Example 2.
Either method may be used. The processing flow of this embodiment is as shown in FIG. 12, and is indicated by the broken line by detecting the defective portion X 1 by the method of the first embodiment except for the portion indicated by the broken line in FIG. If a portion is included, it will be detected by the method of Example 2.

【実施例4】 上記各実施例では、検査対象物の輪郭線の内部に探索ラ
インを設定したが、本実施例では、第16図に示すよう
に、検査対象物の輪郭線l0の内部に基準濃度設定領域DM
1と検査領域DM2とを設定している。処理の流れは、第15
図に示す通りであって、以下に説明する。 基準濃度設定領域DM1は、基準濃度設定領域DM1内の全画
素の濃度の平均値である基準濃度SDを原画像から求め
る。次に、検査領域DM2について、第17図に矢印で示す
ように、ラスタ走査を行い、f4(x,y)=1なるエッジ
フラグ点を求める。ラスタ走査により最初に見付かった
エッジフラグ点F0の座標を(x0,y0)とし、このエッジ
フラグ点F0を開始点とし、第18図に示すように、エッジ
フラグ点F0(x0,y0)に順次連なる各エッジフラグ点Fn
について以下の処理を行う。以下の説明では、各エッジ
フラグ点Fkの座標をそれぞれ(xk,yk)とする。ただ
し、n=1,2,…である。 いま、エッジフラグ点F1について処理を行っていると仮
定する。注目しているエッジフラグ点F1(xi,yi)につ
いて、微分方向値画像から微分方向値b1を求め、微分方
向値b1が示す向きに対して直交する方向(法線方向)に
スティックマスクMを設定する。スティックマスクM
は、第19図に示すように、エッジフラグ点F1を中心とし
て対称な形状に設定されるが、スティックマスクM内の
画素は接触していなくてもよい。ここではエッジフラグ
点F1(x1,y1)からn画素離れた画素と、m画素離れた
画素とをスティックマスクM内の画素としている。ステ
ィックマスクMの各点の座標を(xi+m,yi+m)、
(xi+n,yi+n)、(xi-n,yi-n)、(xi-m,yi-m)とし
て、各点の濃度値を原画像上で求め、 f1(xi+m,yi+m)=d1 f1(xi+n,yi+n)=d2 f1(xi-n,yi-n)=d3 f1(xi-m,yi-m)=d4 とする。次に、検査領域DM2内に存在する欠陥部X1が、
非欠陥部に比較して明るい欠陥(本実施例では、以下、
白欠陥部と呼称する)であるか、非欠陥部に比較して暗
い欠陥(本実施例では、以下、黒欠陥部と呼称する)で
あるかを判別するために、スティックマスクM内の濃度
値d1〜d4と基準濃度SDとを比較する。ここにおいて、
d1,d2,d3,d4>SD(d1〜d4のすべてがSDより大)とい
う条件を満足すれば、以後の処理において、白しきい値
WSLを用い、条件が満足されなければ、黒しきい値BSLを
用いる。白しきい値WSLおよび黒しきい値BSLについて
は、欠陥部X1のコントラストに応じて適宜設定すればよ
い。 すなわち、白しきい値WSLを用いる条件が満足されてい
る場合には、スティックマスクM内の対称点の濃度差に
ついて、|d1−d4|>WSL、|d2−d3|>WSLの各条件が
満足されるかどうかを調べ、いずれか一方でも満足され
れば、条件を満足している濃度差を白加算値とする。ま
た、黒しきい値BSLを用いる条件が満足されている場合
には、同様に、|d1−d4|>BSL、|d2−d3|>BSLの各
条件が満足されるかどうかを調べ、いずれかの条件が満
足されると、条件を満足している濃度差を黒加算値とす
る。 以上のようにして白加算値と黒加算値とを求めた後、エ
ッジフラグ点FKから右回りに隣接するエッジフラグ点の
有無を調べる。隣接するエッジフラグ点が存在すれば、
上記処理を行い、さらに、隣接するエッジフラグ点の有
無を調べて追跡を行う。追跡を行っている間、白加算値
と黒加算値とについて、それぞれ総和を求める。この追
跡は次のいずれかの停止条件を満たすと終了する。 追跡する画素の数が、あらかじめ設定された最大追
跡数Tmを越えた場合 隣接するエッジフラグ点が検査領域DM2から出た場
合 隣接するエッジフラグ点がなくなった場合追跡を終
了した後に、白加算値の総和TWと黒加算値の総和TBと
を、それぞれあらかじめ設定された白欠陥部用のしきい
値W1と黒欠陥部用のしきい値B1と比較し、TW>W1を満た
しているときには、検査領域DM2内に白欠陥部が存在
し、TB>B1を満たしているときには、検査領域DM2内に
黒欠陥部が存在していると判定する。また、いずれの条
件も満たされないときには、検査領域DM2内に欠陥部は
存在しないものと判定する。 各しきい値WSL,BSL,W1,B1、最大追跡数Tmは、欠陥部の
大きさやコントラストにより適宜設定すればよい。
Fourth Embodiment In each of the above embodiments, the search line is set inside the contour line of the inspection object, but in the present embodiment, as shown in FIG. 16, the inside of the contour line l 0 of the inspection object is set. Standard concentration setting area DM
1 and inspection area DM 2 are set. The flow of processing is 15th
As shown in the figure, it will be described below. In the reference density setting area DM 1 , the reference density SD, which is the average value of the densities of all the pixels in the reference density setting area DM 1 , is obtained from the original image. Next, for the inspection area DM 2 , as shown by the arrow in FIG. 17, raster scanning is performed to obtain edge flag points where f 4 (x, y) = 1. The coordinates of the edge flag point F 0 found first by raster scanning are set to (x 0 , y 0 ), and this edge flag point F 0 is used as the starting point. As shown in FIG. 18, the edge flag point F 0 (x 0 , y 0 ) each edge flag point F n that continues in sequence
The following processing is performed for. In the following description, the coordinates of each edge flag point F k are respectively (x k , y k ). However, n = 1, 2, ... Now, it is assumed that processing is performed on the edge flag point F 1 . For the edge flag point F 1 (x i , y i ) of interest, the differential direction value b 1 is obtained from the differential direction value image, and the direction orthogonal to the direction indicated by the differential direction value b 1 (normal direction) Set the stick mask M to. Stick mask M
As shown in FIG. 19, the shape is set to be symmetrical about the edge flag point F 1 , but the pixels in the stick mask M do not have to be in contact with each other. Here, pixels in the stick mask M are n pixels away from the edge flag point F 1 (x 1 , y 1 ) and m pixels away. The coordinates of each point of the stick mask M are (x i + m , y i + m ),
As (x i + n , y i + n ), (x in , y in ), (x im , y im ), the density value of each point is obtained on the original image, and f 1 (x i + m , y i + m) = d 1 f 1 (x i + n, y i + n) = d 2 f 1 (x in, y in) = d 3 f 1 (x im, and y im) = d 4. Next, the defective portion X 1 existing in the inspection area DM 2 is
A defect that is brighter than the non-defective portion (in the present embodiment,
In order to determine whether the defect is a white defect portion) or a dark defect (hereinafter, referred to as a black defect portion in this embodiment) as compared with a non-defect portion, the density in the stick mask M is increased. The values d 1 to d 4 are compared with the reference concentration SD. put it here,
d 1, is satisfied d 2, d 3, d 4 > condition that SD (all d 1 to d 4 is greater than SD), in subsequent processing, white threshold
WSL is used, and if the condition is not satisfied, black threshold BSL is used. The white threshold value WSL and the black threshold value BSL may be appropriately set according to the contrast of the defective portion X 1 . That is, when the condition of using the white threshold value WSL is satisfied, the density difference of the symmetric points in the stick mask M is | d 1 −d 4 |> WSL, | d 2 −d 3 |> WSL. It is checked whether or not each of the conditions is satisfied, and if either one of them is satisfied, the density difference satisfying the condition is set as the white addition value. If the condition of using the black threshold value BSL is satisfied, whether or not the conditions of | d 1 −d 4 |> BSL and | d 2 −d 3 |> BSL are similarly satisfied. If any of the conditions is satisfied, the density difference satisfying the condition is set as the black addition value. After the white added value and the black added value are obtained as described above, the presence or absence of the edge flag point that is adjacent to the edge flag point F K in the clockwise direction is checked. If there are adjacent edge flag points,
The above process is performed, and the presence or absence of adjacent edge flag points is checked to perform tracking. While the tracking is being performed, the total sum of the white added value and the black added value is obtained. This tracking ends when one of the following stop conditions is met. When the number of pixels to be traced exceeds the preset maximum number of traces Tm When an adjacent edge flag point goes out of the inspection area DM 2 When there is no adjacent edge flag point When the tracking ends, white addition is performed The total sum TW of the values and the total sum TB of the black addition values are respectively compared with the preset threshold value W 1 for the white defect portion and the threshold value B 1 for the black defect portion, and TW> W 1 is satisfied. When there is a white defect in the inspection area DM 2 , and when TB> B 1 is satisfied, it is determined that a black defect exists in the inspection area DM 2 . Further, when none of the conditions is satisfied, it is determined that there is no defective portion in the inspection area DM 2 . The threshold values WSL, BSL, W 1 and B 1 and the maximum number of traces Tm may be appropriately set depending on the size of the defect portion and the contrast.

【実施例5】 本実施例では、第21図に示すように、検査対称物の輪郭
線内に検査領域DMのみを設定し、この検査領域DM内でラ
スタ走査を行い、追跡の開始点となるエッジフラグ点を
検出する。処理手順は第20図に示す通りであって、実施
例4と同様に、スティックマスクMを設定し、スティッ
クマスクM内に各画素の濃度d1〜d4を求める。さらにス
ティックマスクMでの対称点の濃度差を求め、所定のし
きい値SL1と比較する。すなわち、 |d1−d4|>SL1 |d2−d3|>SL1 のうちの少なくとも一方の条件が満たされるかどうかを
調べながら、エッジフラグ点の追跡を行う。ここに、追
跡中には条件を満たしたエッジフラグ点の数を計数す
る。また、追跡されたエッジフラグ点について微分絶対
値画像に基づいて微分絶対値を求め、微分絶対値を逐次
加算する。エッジフラグ点の追跡に関する停止条件は実
施例4と同じである。追跡が終了した時点で、上記条件
を満たしたエッジフラグ点の総和Kと、エッジフラグ点
についての微分絶対値の総和Lが求められるから、それ
ぞれあらかじめ設定されたしきい値SL2,SL3と比較し、 K>SL2 L>SL3 の少なくとも一方の条件が満足されると検査領域DM2
に欠陥部が存在すると判定する。欠陥部が発見されない
ときには、検査領域DM内でラスタ走査を行っていない部
分について上述の処理を施し、エッジフラグ点が見付か
らないとき、もしくは、しきい値SL2,SL3に対する条件
が両方とも満たされないときには、検査領域DM内には欠
陥部は存在しないものと判断する。
Fifth Embodiment In this embodiment, as shown in FIG. 21, only the inspection area DM is set within the contour line of the inspection symmetry object, and raster scanning is performed in this inspection area DM to determine the starting point of tracking. The edge flag point is detected. The processing procedure is as shown in FIG. 20, and similarly to the fourth embodiment, the stick mask M is set and the densities d 1 to d 4 of each pixel are obtained in the stick mask M. Further, the density difference at the symmetrical point on the stick mask M is obtained and compared with a predetermined threshold value SL 1 . That is, the edge flag point is traced while checking whether or not at least one of the condition of | d 1 −d 4 |> SL 1 | d 2 −d 3 |> SL 1 is satisfied. Here, the number of edge flag points satisfying the condition is counted during the tracking. Further, the differential absolute value is obtained for the traced edge flag points based on the differential absolute value image, and the differential absolute values are sequentially added. The stop condition for tracking the edge flag point is the same as that in the fourth embodiment. At the time when the tracking is completed, the sum K of the edge flag points satisfying the above conditions and the sum L of the differential absolute values of the edge flag points are obtained. Therefore, the preset threshold values SL 2 and SL 3 are obtained. In comparison, if at least one of the conditions of K> SL 2 L> SL 3 is satisfied, it is determined that there is a defective portion in the inspection region DM 2 . When no defective portion is found, the above-mentioned processing is performed on the portion of the inspection area DM which is not raster-scanned, and when the edge flag point is not found, or the conditions for the threshold values SL 2 and SL 3 are both satisfied. If not, it is determined that there is no defective portion in the inspection area DM.

【実施例6】 本実施例では実施例4と同様に基準濃度設定領域DM1
検査領域DM2とを設定し、基準濃度設定領域DM1内の濃度
の平均値を基準濃度SDとする。以下の処理は第22図の通
りであり、この基準濃度SDよりも明るい濃度値をもつ欠
陥部(本実施例では、以下、白色欠陥部と呼称する)、
および暗い濃度値をもつ欠陥部(本実施例では、以下、
黒欠陥部と呼称する)を検出するために、白欠陥部検出
用の白しきい値WSLと、黒欠陥部検出用の黒しきい値BSL
とを設定する。すなわち、第23図に示すように、基準濃
度SDに対して明暗のオフセット値LT,DKをそれぞれ設定
し、次式のように白しきい値WSLと黒しきい値BSLとを設
定する。 WSL=SD+LT BSL=SD−DK このようにして、白しきい値WSLと黒しきい値BSLとを設
定した後、実施例4と同様にして検査領域DM2内をラス
タ走査し、追跡の開始点となるエッジフラグ点を検出す
る。エッジフラグ点FMを検出すると、第24図に示すよう
に、その位置の微分方向値に対して直交する方向におい
て、エッジフラグ点を挟んで対称となる位置に濃度測定
点PR,PLを設定する。ここに、濃度測定点PR,PLはエッ
ジフラグ点FMに対してn画素分離れた位置に設定されて
いる。微分方向値は、定義から明らかなように、原画像
上では、微分方向値で示す向きの左側が暗く右側が明る
いという性質があるから、微分方向値で示す向きの右側
の濃度測定点PRの原画像における濃度uを白しきい値WS
Lと比較し,左側の濃度測定点PLの原画像における濃度
vを黒しきい値BSLと比較する。ここで、u>WSLという
条件を満たせば、そのエッジフラグ点を白欠陥候補点と
する。また、v<BSLを満たせば、そのエッジフラグ点
を黒欠陥候補点とする。一連につながるエッジフラグ点
について追跡しながら、この処理を繰り返し、白欠陥候
補点みなされたエッジフラグ点と、黒欠陥候補点とみな
されたエッジフラグ点とのそれぞれの総数を求める。エ
ッジフラグ点の追跡の停止条件については実施例4と同
じである。追跡を終了した時点での白欠陥候補点の総数
をSW、黒欠陥候補点の総数をSBとし、あらかじめ設定さ
れているしきい値SL3,SL4と比較する。すなわち、 SW>SL3 SB>SL4 の少なくとも一方の条件を満たせば、検査領域DM2内に
欠陥部が存在すると判定し、いずれも満たされない場合
には、検査領域DM2内で、まだラスタ走査を行っていな
い部分についてラスタ走査を行い同様の手順で欠陥部を
検査する。 検査領域DM2内の全域についてラスタ走査を終了した時
点で、エッジフラグ点が存在しないか、あるいはしきい
値SL3,SL4に関する条件が両方とも満たされないときに
は、検査領域DM2内には欠陥部が存在しないものと判断
する。
Sixth Embodiment In this embodiment, similarly to the fourth embodiment, the reference density setting area DM 1 and the inspection area DM 2 are set, and the average value of the densities in the reference density setting area DM 1 is set as the reference density SD. The following processing is as shown in FIG. 22, and a defect portion having a density value brighter than the reference density SD (hereinafter, referred to as a white defect portion in this embodiment),
And a defect portion having a dark density value (in the present embodiment,
In order to detect a black defect portion), a white threshold value WSL for detecting a white defect portion and a black threshold value BSL for detecting a black defect portion are detected.
And. That is, as shown in FIG. 23, the light and dark offset values LT and DK are set with respect to the reference density SD, and the white threshold value WSL and the black threshold value BSL are set according to the following equations. WSL = SD + LT BSL = SD-DK In this way, after setting the white threshold value WSL and the black threshold value BSL, the inspection area DM 2 is raster-scanned in the same manner as in Example 4, and tracking is started. The edge flag point which becomes a point is detected. When the edge flag point F M is detected, as shown in FIG. 24, the density measurement points P R and P L are located symmetrically across the edge flag point in the direction orthogonal to the differential direction value of the position. To set. Here, the density measurement points P R and P L are set at positions separated by n pixels from the edge flag point F M. As is clear from the definition, the differential direction value has the property that the left side of the direction indicated by the differential direction value is dark and the right side is bright on the original image, so the density measurement point P R on the right side of the direction indicated by the differential direction value Density u in the original image of
The density v in the original image at the density measurement point P L on the left side is compared with L and the black threshold value B SL is compared. Here, if the condition of u> WSL is satisfied, the edge flag point is set as a white defect candidate point. If v <BSL is satisfied, the edge flag point is set as a black defect candidate point. This process is repeated while tracking the edge flag points connected in series, and the total number of each of the edge flag points regarded as the white defect candidate points and the edge flag points regarded as the black defect candidate points is obtained. The conditions for stopping the tracking of edge flag points are the same as in the fourth embodiment. Let SW be the total number of white defect candidate points and SB be the total number of black defect candidate points at the time when the tracking is completed, and compare them with preset thresholds SL 3 and SL 4 . In other words, satisfy at least one condition of SW> SL 3 SB> SL 4 , it determines that the defect portion is present in the inspection area DM 2, when neither satisfied, in the examination region DM 2, still raster Raster scanning is performed on the non-scanned portion and the defective portion is inspected by the same procedure. At the time when the raster scan is completed for the entire area of the inspection area DM 2 , if there is no edge flag point or both the conditions regarding the threshold values SL 3 and SL 4 are not satisfied, the inspection area DM 2 has a defect. Judge that the department does not exist.

【発明の効果】【The invention's effect】

本発明は上述のように、エッジ画像について検査対象物
の輪郭線の内側に少なくとも1本の探索ラインを設定
し、探索ライン上で欠陥部のエッジとみなせるエッジフ
ラグ点を検出すると、エッジフラグ点の近傍での原画像
についての濃度変化に基づいて欠陥部を識別するように
しているものであり、欠陥部のエッジ上の点とみなせる
エッジフラグ点を検出し、エッジフラグ点の近傍の原画
像についての濃度変化を検出するから、周囲とのコント
ラストが比較的小さい欠陥部であっても検出することが
でき、欠陥部の検出精度が向上するという利点がある。 また、エッジ画像について検査対象物の輪郭線の内側に
少なくとも1個の検査領域を設定し、検査領域の全領域
を走査しつつ探索することにより欠陥部のエッジとみな
せるエッジフラグ点を検出すると、エッジフラグ点を開
始点として欠陥部の輪郭線を追跡するとともに、輪郭線
上の各画素の近傍での原画像についての濃度変化に基づ
いて欠陥部を識別するようにすれば、欠陥部の輪郭線の
近傍の濃度変化を検出するから、コントラストが比較的
小さい欠陥部でも検出することができるのである。
As described above, the present invention sets at least one search line inside the contour line of the inspection object for the edge image, and detects the edge flag point that can be regarded as the edge of the defect portion on the search line. The defect portion is identified based on the density change of the original image in the vicinity of, and the edge flag point that can be regarded as a point on the edge of the defect portion is detected, and the original image in the vicinity of the edge flag point is detected. Since the change in density is detected, even a defective portion having a relatively small contrast with the surroundings can be detected, and there is an advantage that the detection accuracy of the defective portion is improved. Further, when at least one inspection area is set inside the contour line of the inspection object for the edge image, and an edge flag point that can be regarded as the edge of the defect portion is detected by searching while scanning the entire inspection area, If the contour line of the defect portion is traced with the edge flag point as the starting point and the defect portion is identified based on the density change of the original image near each pixel on the contour line, the contour line of the defect portion Since the density change in the vicinity of is detected, it is possible to detect even a defective portion having a relatively small contrast.

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

第1図は本発明の実施例1の方法に対応する処理回路の
ブロック図、第2図(a)(b)はそれぞれ本発明にお
ける原画像、エッジ画像の一例を示す説明図、第3図は
同上における局所並列ウインドウを示す説明図、第4図
は同上における微分絶対値画像を示す説明図、第5図は
同上において微分絶対値画像からエッジ画像を得る段階
でのノイズ除去を行う処理の説明図、第6図は同上の処
理手順を示す動作説明図、第7図は同上のエッジ画像に
対する探索ラインの設定状態を示す動作説明図、第8図
(a)〜(d)はそれぞれ同上の探索ラインの形態を示
す説明図、第9図は同上におけるエッジフラグ点の概念
を示す動作説明図、第10図は本発明の実施例2における
処理手順を示す動作説明図、第11図(a)〜(d)はそ
れぞれ同上における探索ラインの形態を示す説明図、第
12図は本発明の実施例3における処理手順を示す動作説
明図、第13図は同上における探索ラインの形態を示す説
明図、第14図は同上の動作説明図、第15図は本発明の実
施例4における処理手順を示す動作説明図、第16図は同
上の動作説明図、第17図は同上におけるラスタ走査の動
作説明図、第18図は同上におけるスティックマスクの設
定状態を示す動作説明図、第19図は同上におけるスティ
ックマスクの一例を示す動作説明図、第20図は本発明の
実施例5における処理手順を示す動作説明図、第21図は
同上の検査領域を示す動作説明図、第22図は本発明の実
施例6における処理手順を示す動作説明図、第23図は同
上における白しきい値および黒しきい値とオフセット値
との関係を示す動作説明図、第24図は同上における濃度
測定点を示す動作説明図である。 l0〜l2…輪郭線、O…検査対象物、X1…欠陥、X2…異
物。
FIG. 1 is a block diagram of a processing circuit corresponding to the method of the first embodiment of the present invention, FIGS. 2 (a) and 2 (b) are explanatory views showing examples of an original image and an edge image in the present invention, and FIG. Is an explanatory view showing a local parallel window in the same as above, FIG. 4 is an explanatory view showing a differential absolute value image in the same as above, and FIG. 5 is a noise removing process at the stage of obtaining an edge image from the differential absolute value image in the same as above. Explanatory diagram, FIG. 6 is an operational explanatory diagram showing the processing procedure of the above, FIG. 7 is an operational explanatory diagram showing the setting state of the search line for the edge image of the above, and FIG. 8 (a) to (d) are the same as above. 9 is an explanatory view showing the form of a search line, FIG. 9 is an operation explanatory view showing the concept of edge flag points in the same as above, FIG. 10 is an operation explanatory view showing a processing procedure in the second embodiment of the present invention, and FIG. a) to (d) are the same as above. Explanatory diagram showing the form of the search line,
FIG. 12 is an operation explanatory view showing a processing procedure in Embodiment 3 of the present invention, FIG. 13 is an explanatory view showing a form of a search line in the same as above, FIG. 14 is an operation explanatory view in the same as above, and FIG. FIG. 16 is an operation explanatory diagram showing a processing procedure in the fourth embodiment, FIG. 16 is an operation explanatory diagram of the same as above, FIG. 17 is an operation explanatory diagram of raster scanning in the same as above, and FIG. 18 is an operation explanation showing a stick mask setting state in the same as above. FIG. 19 is an operation explanatory view showing an example of the stick mask in the above, FIG. 20 is an operation explanatory view showing a processing procedure in the fifth embodiment of the present invention, and FIG. 21 is an operation explanatory view showing an inspection area in the same. FIG. 22 is an operation explanatory view showing a processing procedure in the sixth embodiment of the present invention, FIG. 23 is an operation explanatory view showing a relationship between a white threshold value and a black threshold value and an offset value in the same as above, FIG. Is an operation explanatory diagram showing the concentration measurement points in the same as above. That. l 0 to l 2 ... contour line, O ... inspection object, X 1 ... defect, X 2 ... foreign matter.

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】画像入力手段により検査対象物を含む空間
領域を撮像した後、画像入力手段により得られた原画像
の各画素の濃度に基づいて検査対象物の輪郭線を含むエ
ッジ画像に変換し、原画像とエッジ画像とに基づいて検
査対象物の輪郭線の内側に存在する欠け、ひび、汚れ等
の欠陥部を検査する欠陥検査方法において、エッジ画像
に基づいて検査対象物の輪郭線の内側に少なくとも1本
の探索ラインを設定し、探索ライン上で欠陥部のエッジ
とみなせるエッジフラグ点を検出すると、原画像につい
てエッジフラグ点の近傍での濃度変化に基づいて欠陥部
を識別することを特徴とする欠陥検査方法。
1. An image input means captures an image of a spatial region including an inspection target, and then converts the image into an edge image including an outline of the inspection target based on the density of each pixel of the original image obtained by the image input means. Then, in the defect inspection method for inspecting a defective portion such as a chip, a crack or a stain existing inside the contour line of the inspection object based on the original image and the edge image, the contour line of the inspection object based on the edge image When at least one search line is set on the inside of the line, and an edge flag point that can be regarded as an edge of the defect portion is detected on the search line, the defect portion is identified based on the density change in the vicinity of the edge flag point in the original image. A defect inspection method characterized by the above.
【請求項2】上記エッジ画像は、原画像の各画素の近傍
領域内の濃度値の最大変化率を表す微分絶対値を各画素
に対応させた微分絶対値画像に基づく細線化処理により
得られ、エッジ画像に基づいて、検査対象物の輪郭線内
に設定された探索ライン上でエッジフラグ点を検出する
と、探索ライン上にエッジフラグ点を中心とする複数画
素よりなるスティックマスクを設定し、原画像に基づい
て、スティックマスク内の対称位置の画素の濃度差の総
和を求め、その総和が所定値を越えると欠陥部が存在す
ると判断することを特徴とする請求項1記載の欠陥検査
方法。
2. The edge image is obtained by a thinning process based on a differential absolute value image in which each pixel is associated with a differential absolute value representing the maximum change rate of the density value in the neighborhood area of each pixel of the original image. , When an edge flag point is detected on the search line set in the contour line of the inspection object based on the edge image, a stick mask composed of a plurality of pixels centered on the edge flag point is set on the search line, 2. The defect inspection method according to claim 1, wherein the sum of the density differences of the pixels at symmetrical positions in the stick mask is calculated based on the original image, and if the sum exceeds a predetermined value, it is judged that there is a defective portion. .
【請求項3】上記エッジ画像は、原画像の各画素の近傍
領域内の濃度値の最大変化率を表す微分絶対値を各画素
に対応させた微分絶対値画像に基づく細線化処理により
得られ、エッジ画像に基づいて、検査対象物の輪郭線内
に設定された探索ライン上でエッジフラグ点を検出する
と、探索ライン上にエッジフラグ点を中心とする複数画
素よりなるスティックマスクを設定し、原画像に基づい
て、スティックマスク内の対称位置の画素の濃度差の総
和を求め、その総和が所定値を越えるとそのエッジフラ
グ点を欠陥候補点とし、探索ライン上の欠陥候補点の総
数が所定値を越えると欠陥部が存在すると判断すること
を特徴とする請求項1記載の欠陥検査方法。
3. The edge image is obtained by a thinning process based on a differential absolute value image in which each pixel is associated with a differential absolute value representing the maximum change rate of the density value in the neighborhood area of each pixel of the original image. , When an edge flag point is detected on the search line set in the contour line of the inspection object based on the edge image, a stick mask composed of a plurality of pixels centered on the edge flag point is set on the search line, Based on the original image, the sum of the density differences of the pixels at symmetrical positions in the stick mask is obtained, and when the sum exceeds a predetermined value, the edge flag point is set as a defect candidate point, and the total number of defect candidate points on the search line is The defect inspection method according to claim 1, wherein it is determined that a defective portion is present when a predetermined value is exceeded.
【請求項4】エッジ画像に対して、検査対象物の輪郭線
内に複数本の並行する探索ラインを設定するとともに、
各探索ラインについて請求項2または請求項3の欠陥検
査方法により欠陥部が存在すると判定されると、その探
索ラインを欠陥候補ラインとし、隣接する複数本の探索
ラインが連続して欠陥候補ラインとなるとともに、欠陥
候補ラインの総数が所定値を越えると欠陥部が存在する
と判断することを特徴とする欠陥検査方法。
4. A plurality of parallel search lines are set within the contour line of the inspection object for the edge image, and
When it is determined that there is a defective portion for each search line by the defect inspection method according to claim 2 or 3, the search line is set as a defect candidate line, and a plurality of adjacent search lines are continuously defined as defect candidate lines. In addition, the defect inspection method is characterized in that when the total number of defect candidate lines exceeds a predetermined value, it is judged that there is a defective portion.
【請求項5】画像入力手段により検査対象物を含む空間
領域を撮像した後、画像入力手段により得られた原画像
の各画素の濃度に基づいて検査対象物の輪郭線を含むエ
ッジ画像に変換し、原画像とエッジ画像とに基づいて検
査対象物の輪郭線の内側に存在する欠け、ひび、汚れ等
の欠陥部を検査する欠陥検査方法において、エッジ画像
について検査対象物の輪郭線の内側に少なくとも1個の
検査領域を設定し、検査領域の全領域を走査しつつ探索
することにより欠陥部のエッジとみなせるエッジフラグ
点を検出すると、エッジフラグ点を開始点として欠陥部
の輪郭線を追跡するとともに、輪郭線上の各画素の近傍
での濃度変化に基づいて欠陥部を識別することを特徴と
する欠陥検査方法。
5. The image inputting means captures an image of a spatial region containing the inspection object, and then converts it into an edge image containing the contour line of the inspection object based on the density of each pixel of the original image obtained by the image inputting means. Then, in the defect inspection method for inspecting a defective portion such as a chip, a crack, and a stain existing inside the contour line of the inspection object based on the original image and the edge image, in the edge image, the inside of the contour line of the inspection object If an edge flag point that can be regarded as an edge of a defective portion is detected by setting at least one inspection area in the scanning area and searching the entire scanning area while scanning, the contour line of the defective portion is determined using the edge flag point as a starting point. A defect inspection method characterized in that a defect portion is identified based on a density change in the vicinity of each pixel on a contour line while tracking.
【請求項6】上記エッジ画像は、原画像の各画素の近傍
領域内の濃度値の最大変化率を表す微分絶対値を各画素
に対応させた微分絶対値画像に基づく細線化処理により
得られ、検査対称物の輪郭線の内部に基準濃度設定領域
と検査領域とを設定し、原画像について基準濃度設定領
域内の画素の濃度の平均値を求めて基準濃度とし、検査
領域内の走査中にエッジフラグ点を検出すると、原画像
の各画素の近傍領域内の濃度値の最大変化の方向を反映
する微分方向値を各画素に対応させた微分方向値画像に
基づいて、濃度値の上記最大変化の方向でエッジフラグ
点を中心とする複数画素よりなるスティックマスクを設
定し、原画像についてスティックマスク内のすべての画
素の濃度が上記基準濃度を越えるとともに、スティック
マスク内の対称位置の画素の濃度差が所定の白しきい値
を越えると、その濃度差を白加算値とし、原画像につい
てスティックマスク内の少なくも1つの画素の濃度が上
記基準濃度以下であるとともに、スティックマスク内の
対称位置の画素の濃度差が所定の黒しきい値を越える
と、その濃度差を黒加算値とし、隣接するすべてのエッ
ジフラグ点を追跡し各エッジフラグ点について白加算値
と黒加算値とを検出した後、白加算値と黒加算値との少
なくとも一方がそれぞれに対応して設定された所定値を
越えると欠陥部が存在すると判断することを特徴とする
請求項5記載の欠陥検査方法。
6. The edge image is obtained by a thinning process based on a differential absolute value image in which each pixel is associated with a differential absolute value representing the maximum change rate of the density value in the neighborhood area of each pixel of the original image. , The reference density setting area and the inspection area are set inside the contour line of the inspection object, and the average value of the densities of the pixels in the reference density setting area of the original image is calculated as the reference density, and the scanning is performed in the inspection area. When an edge flag point is detected in the pixel, the differential direction value image in which the differential direction value that reflects the direction of the maximum change in the density value in the vicinity region of each pixel of the original image is associated with each pixel A stick mask consisting of multiple pixels centered on the edge flag point is set in the direction of maximum change, and the densities of all the pixels in the stick mask for the original image exceed the above-mentioned reference densities, and If the density difference of the pixels of the pixel exceeds a predetermined white threshold value, the density difference is set as the white addition value, and the density of at least one pixel in the stick mask of the original image is equal to or lower than the reference density, and the stick mask When the density difference of pixels at symmetrical positions exceeds the specified black threshold value, the density difference is set as the black addition value, all adjacent edge flag points are tracked, and the white addition value and black addition are performed for each edge flag point. 6. The defect according to claim 5, wherein after detecting the value, if at least one of the white added value and the black added value exceeds a predetermined value set corresponding to each of them, it is judged that a defective portion exists. Inspection method.
【請求項7】上記エッジ画像は、原画像の各画素の近傍
領域内の濃度値の最大変化率を表す微分絶対値を各画素
に対応させた微分絶対値画像に基づく細線化処理により
得られ、検査対称物の輪郭線の内部に検査領域を設定
し、検査領域内の走査中にエッジフラグ点を検出する
と、原画像の各画素の近傍領域内の濃度値の最大変化の
方向を反映する微分方向値を各画素に対応させた微分方
向値画像に基づいて、濃度値の上記最大変化の方向でエ
ッジフラグ点を中心とする複数画素よりなるスティック
マスクを設定し、原画像についてスティックマスク内の
対称位置の画素の濃度差が所定値を越えると、そのエッ
ジフラグ点を欠陥候補点とし、隣接するすべてのエッジ
フラグ点を追跡した後、欠陥候補点の総数とすべての欠
陥候補点の微分絶対値の総和との少なくとも一方がそれ
ぞれに対応して設定された所定値を越えると欠陥部が存
在すると判断することを特徴とする請求項5記載の欠陥
検査方法。
7. The edge image is obtained by a thinning process based on a differential absolute value image in which each pixel is associated with a differential absolute value representing the maximum change rate of the density value in the neighborhood area of each pixel of the original image. , If the inspection area is set inside the contour line of the inspection object and an edge flag point is detected during scanning in the inspection area, the direction of the maximum change of the density value in the vicinity area of each pixel of the original image is reflected. Based on the differential direction value image in which the differential direction value is associated with each pixel, a stick mask consisting of a plurality of pixels centered on the edge flag point is set in the direction of the maximum change in the density value, and the original image When the density difference of pixels at symmetrical positions exceeds a predetermined value, the edge flag point is set as a defect candidate point, all the adjacent edge flag points are traced, and then the total number of defect candidate points and the differentiation of all defect candidate points are detected. Absolute value Defect inspection method according to claim 5, characterized in that it is determined that at least one of the sum is defective unit exceeds a predetermined value set in correspondence with each occurrence.
【請求項8】上記エッジ画像は、原画像の各画素の近傍
領域内の濃度値の最大変化率を表す微分絶対値を各画素
に対応させた微分絶対値画像に基づく細線化処理により
得られ、検査対称物の輪郭線の内部に基準濃度設定領域
と検査領域とを設定し、原画像より求めた基準濃度設定
領域内の画素の濃度の平均値より大きい白しきい値と上
記平均値より小さい黒しきい値とを設定し、検査領域内
の走査中にエッジフラグ点を検出すると、原画像の各画
素の近傍領域内の濃度値の最大変化の方向を反映する微
分方向値を各画素に対応させた微分方向値画像に基づい
て、濃度値の上記最大変化の方向でエッジフラグ点を中
心とする対称位置にエッジフラグ点から離れた一対の濃
度測定点を設定し、原画像について濃度値が大きいほう
の濃度測定点の濃度値が白しきい値を越えると白欠陥候
補点とし、濃度値が小さいほうの濃度測定点の濃度値が
黒しきい値より小さいと黒欠陥候補点とし、隣接するす
べてのエッジフラグ点を追跡し各エッジフラグ点につい
て白欠陥候補点と黒欠陥候補点とを検出した後、白欠陥
候補点の総数と黒欠陥候補点の総数との少なくとも一方
がそれぞれに対応して設定された所定値を越えると欠陥
部が存在すると判断することを特徴とする請求項5記載
の欠陥検査方法。
8. The edge image is obtained by a thinning process based on a differential absolute value image in which each pixel is associated with a differential absolute value representing the maximum change rate of the density value in the neighborhood area of each pixel of the original image. , A reference density setting area and an inspection area are set inside the contour line of the inspection object, and a white threshold value larger than the average value of the density of the pixels in the reference density setting area obtained from the original image and the above average value. When a small black threshold value is set and an edge flag point is detected during scanning in the inspection area, the differential direction value that reflects the direction of maximum change in density value in the vicinity area of each pixel of the original image is set to each pixel. Based on the differential direction value image corresponding to, the pair of density measurement points apart from the edge flag point are set at symmetrical positions around the edge flag point in the direction of the maximum change of the density value, and the density of the original image is changed. The density of the density measurement point with the larger value If the value exceeds the white threshold value, it is regarded as a white defect candidate point, and if the density value of the density measurement point with the smaller density value is smaller than the black threshold value, it is regarded as a black defect candidate point, and all adjacent edge flag points are traced. After detecting the white defect candidate points and the black defect candidate points for each edge flag point, at least one of the total number of white defect candidate points and the total number of black defect candidate points is set to a predetermined value corresponding to each. The defect inspection method according to claim 5, wherein it is determined that a defective portion is present when the number exceeds the limit.
JP1063120A 1988-11-15 1989-03-15 Defect inspection method Expired - Lifetime JPH0718811B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP1063120A JPH0718811B2 (en) 1989-03-15 1989-03-15 Defect inspection method
US07/433,823 US4974261A (en) 1988-11-15 1989-11-09 Optical surface inspection method
DE3937950A DE3937950A1 (en) 1988-11-15 1989-11-15 METHOD FOR CHECKING OPTICAL SURFACES

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1063120A JPH0718811B2 (en) 1989-03-15 1989-03-15 Defect inspection method

Publications (2)

Publication Number Publication Date
JPH02242382A JPH02242382A (en) 1990-09-26
JPH0718811B2 true JPH0718811B2 (en) 1995-03-06

Family

ID=13220108

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1063120A Expired - Lifetime JPH0718811B2 (en) 1988-11-15 1989-03-15 Defect inspection method

Country Status (1)

Country Link
JP (1) JPH0718811B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003242482A (en) * 2002-02-14 2003-08-29 Hitachi High-Technologies Corp Inspection method and inspection device for circuit pattern
JP4742832B2 (en) * 2005-11-25 2011-08-10 パナソニック電工株式会社 Appearance inspection method, appearance inspection apparatus, program
JP5033077B2 (en) * 2008-07-28 2012-09-26 パナソニック株式会社 Method and apparatus for inspecting appearance of molded product
JP5033076B2 (en) * 2008-07-28 2012-09-26 パナソニック株式会社 Appearance inspection method and apparatus
WO2010044433A1 (en) * 2008-10-14 2010-04-22 芝浦メカトロニクス株式会社 Image processing method, image processing device, and surface inspection device using the image processing device
JP5389456B2 (en) * 2009-01-13 2014-01-15 株式会社東芝 Defect inspection apparatus and defect inspection method
JP7157380B2 (en) * 2018-11-06 2022-10-20 Tdk株式会社 Appearance inspection method and electronic component manufacturing method

Also Published As

Publication number Publication date
JPH02242382A (en) 1990-09-26

Similar Documents

Publication Publication Date Title
JP2007147407A (en) Visual examination method
KR102242996B1 (en) Method for atypical defects detect in automobile injection products
JP2000028541A (en) Crack detection method for concrete surface
Mir et al. Machine learning-based evaluation of the damage caused by cracks on concrete structures
JPH0718811B2 (en) Defect inspection method
JP3890844B2 (en) Appearance inspection method
JPH06103275B2 (en) Defect extraction method by visual inspection
JP3508518B2 (en) Appearance inspection method
JP2647502B2 (en) Pattern comparison inspection method and apparatus
JP2686053B2 (en) Defect inspection method by visual inspection
JPH07333197A (en) Automatic surface flaw detector
JP2758823B2 (en) Weld appearance inspection method
JP5346304B2 (en) Appearance inspection apparatus, appearance inspection system, and appearance inspection method
JP4956077B2 (en) Defect inspection apparatus and defect inspection method
JPH0718812B2 (en) Foreign object detection method
JP3119581B2 (en) Defect inspection device and defect inspection method
JP2000321038A (en) Method for detecting fault of pattern
JPH10208066A (en) Method for extracting edge line of check object and appearance check method using this method
JP2710685B2 (en) Defect detection method by visual inspection
JPH0772909B2 (en) Welding condition judgment method by visual inspection
JPH0827841B2 (en) Appearance inspection method
JPH0797410B2 (en) Image processing method
JP2514727B2 (en) Defect inspection method by visual inspection
JPH1114317A (en) Appearance inspection method and device
JP2005128635A (en) Image processing apparatus

Legal Events

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

Free format text: PAYMENT UNTIL: 20080306

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20090306

Year of fee payment: 14

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

Free format text: PAYMENT UNTIL: 20090306

Year of fee payment: 14

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20090306

Year of fee payment: 14

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20100306

Year of fee payment: 15

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100306

Year of fee payment: 15