JPH02242382A - Defect checking method - Google Patents

Defect checking method

Info

Publication number
JPH02242382A
JPH02242382A JP6312089A JP6312089A JPH02242382A JP H02242382 A JPH02242382 A JP H02242382A JP 6312089 A JP6312089 A JP 6312089A JP 6312089 A JP6312089 A JP 6312089A JP H02242382 A JPH02242382 A JP H02242382A
Authority
JP
Japan
Prior art keywords
density
value
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.)
Granted
Application number
JP6312089A
Other languages
Japanese (ja)
Other versions
JPH0718811B2 (en
Inventor
Toshinori Inoue
敏範 井上
Mitsuru Shirasawa
白沢 満
Satoshi Yamatake
聰 山竹
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

Abstract

PURPOSE:To easily detect a defective part regardless of a low contrast by detecting an edge flag point which can be regarded as a point on the edge of the defective part and detecting the change of density of an original picture around the edge flag point. CONSTITUTION:The image of a check object is picked up by a picture input device 1 like a television camera, and the density of each picture element is converted to a digital signal by an A/D converting part 2 and is subjected to preprocessing in a preprocessing part 3 to obtain a differential absolute value picture, a differential direction value picture, and an edge picture besides the original picture obtained from the converting part 2. Points indicating that a larger differential absolute value corresponds to a larger density change are noticed to perform the line narrowing processing. That is the differential absolute value of each picture element is compared with those of nearby picture elements to extract an edge having the width corresponding to one picture element.

Description

【発明の詳細な説明】[Detailed description of the invention] 【産業上の利用分野】[Industrial application field]

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

【従来の技術】[Conventional technology]

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

【発明が解決しようとする課M】[Problem M that the invention attempts to solve]

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

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

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

【作用】[Effect]

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

【実施例1】 本発明では、第1図に示すように、検査対象物をテレビ
カメラ等の画像入力装置1により撮像し、各画素の濃度
をアナログ−デジタル変換部2においてデジタル信号に
変換した後、前処理部3において以下の前処理を行うこ
とにより、アナログ−デジタル変換部2より得られる原
画像のほかに、微分絶対値画像、微分方向値画像、エツ
ジ画像を得る。 すなわち、検査対象物を含む空間領域を撮像して得られ
る原画像P0は濃淡画像であって、第2図(a)に示す
ように、検査対象物0、欠陥X1、異物X2などを含む
画像となっている。この濃淡画像から検査対象物0の輪
郭線等のエツジを抽出する処理は、[エツジは濃度変化
が大きい部分に対応している」という考え方を基本にし
ている。したがって、濃度を微分することによってエツ
ジの抽出を行なう、微分処理は、第3図に示すように、
原画像P0を3×3画素の局所並列ウィンドウWに分割
して行なう、つまり、注目する画素Eと、その画素Eの
周囲の8画素(8近傍)A−D、F〜工とで局所並列ウ
ィンドウWを形成し、局所並列ウィンドウW内の画素A
〜■の濃度の縦方向の濃度変化へVと横方向の濃度変化
ΔHとを次式によって求め、 ΔV=(A+B十〇)−(G+H+I)ΔH=(A+D
+G)−(C+F+I)さらに、微分絶対値1e11と
微分方向値l e tとを次式によって求めるのである
。 el−=(ムV2+ΔH2)I/2 1 e g = ta□−・αヤヱ ΔHま ただし、A〜工は対応する画素の濃度を示している。上
式から明らかなように、微分絶対値1eは、原画像の注
目する画素の近傍領域における濃度の最大変化率を表し
、微分方向値l e tは、同近傍領域における濃度の
最大変化の方向に直交する方向を表している0以上の演
算を原画像P0の全画素について行なうことにより、検
査対象物0の輪郭や欠陥xI、異物X2等が存在してい
るような濃度変化が大きい部分と、その変化の方向とを
抽出することができるのである。ここに、各画素の濃度
を、微分絶対値letよで表現した画像を微分絶対値画
像、微分方向値l e tで表現した画像を微分方向値
画像と呼ぶ。 次に細線化処理が施される。細線化処理は、微分絶対値
が大きいほど濃度変化が大きいことを表わtている点に
着目して行なわれる。すなわち、各画素の微分絶対値を
周囲の画素の微分絶対値と比較し、周囲の画素よりも大
きくなるものを連結していくことにより、1画素の幅を
有したエツジを抽出するのである。第4図に示すように
、各画素の位置をX−Y座標で表わし、微分絶対値をZ
軸に取った微分絶対値画像P1を考えれば、細線化処理
は、この曲面における稜線を求めることに相当する。こ
こまでの処理により、微分絶対値の大小にかかわらず、
すべての稜線が抽出される。 この段階で得られている稜線には、ノイズ等による不要
な小さな山も含まれているから、第4図に示すように、
適宜しきい値SLを設定し、このしきい値SL以上の値
のみを採用してノイズ成分を除去する。この処理で得ら
れた画像は、原画像のコントラストが不十分であるとき
や、ノイズが多いようなときには、不連続線になりやす
い、そこで、エツジ延長処理を行なう、エツジ延長処理
では、不連続線の端点から始めて、注目する画素とその
周囲の画素とを比較し、次式で表わされる評価関数f(
ea)がもっとも大きくなる方向に線を延長し、他の線
の端点に衝突するまでこれを続ける。 f(e4)= 3二に、eoは中心画素(局所並列ウィンドウWのEに
相当する)の微分データであり、e、は隣接画素(局所
並列ウィンドウWの8近傍に相当する)の微分データで
あり、j=1.2.・・・・・・、8である。 以上の処理により、第2図(b)に示すように、原画像
において濃度変化が大きい部分をなぞるようなエツジ画
像P、が得られる。エツジ画像P4では、各線が検査対
象物0、欠陥X1、異物X2等の輪郭線ム〜12を表す
ものとみなせる0以上の前処理により、原画像、微分絶
対値画像、微分方向コード画像、エツジ画像の4種類の
画像が得られ、各画像はそれぞれ原画像メモリ4、微分
絶対値画像メモリ5、微分方向値画像メモリ6、エツジ
画像メモリ7に記憶される。以下の説明では、各画像の
画素の位置をX−Y座標で表現するものとし。 各画像における画素の濃度をそれぞれf+(x、y>、
f2(x、y)、f3(x、y)、f4(x、y)とす
る。 原画像は、濃淡画像であって、濃度は通常8ビットで表
されるから、各画素における濃度a(=f(x、y))
は、0≦a≦255となる。また、微分絶対値画像の濃
度(すなわち、微分絶対値)b(=fz(x、y))は
、たとえば6ビツトで表され、0≦b≦63となり、微
分方向値画像の濃度(すなわち、微分方向値)c (=
 f 3(X 、 y ))は、たとえば16方向で表
され、0≦C≦15となる。エツジ画像については、線
の有無のみであるから、線となる画素は“1n、それ以
外の画素は゛0″として表される。つまり、fn(x、
y)の値域は(0,1)となる、なお、以下の説明にお
いては、濃度という用語は白の濃度を表し、濃度値が大
きいほど明るいものとする。 次に、探索処理部6では、第7図に示すように、エツジ
画像P4について輪郭線もの内側に、探索ラインSを設
定する。探索ラインSは、第8図(a)〜(d)に示す
ように、閉ループ形状あれば任意に設定可能である。す
なわち、開始点と終了点とが一致する探索ラインSを設
定するのである。探索ラインSを設定した後、探索を開
始し、探索ラインS上においてf4(x、y)=lとな
る点が見;1かると、この点をエツジフラグ点とする0
次に、スティックマスク設定部9では、第9図に示すよ
うに、開始点から始めて最初に見付かったエツジフラグ
点Fの画素を中心として、探索ラインS上でエツジフラ
グ点Fの前後の複数画素(第8図中斜線で示す画素)を
抽出してスティックマスクMを設定する。スティックマ
スクMは、幅1、長さ2n+1の領域であり、ここに、
nは自然数であり適宜設定される。いまエツジフラグ点
Fの座標を(xr、yy)とし、スティックマスクMに
おける各画素の座標をRjXr+n+3’ r+n)+
””・・+R+(Xr+++3/ Fl)、 F (X
 r、3’ F)、S I(X F−1、’/ r−+
)、’・”・’ 、S h(X F−n + yF−n
>とすれば、濃度演算部10では、下式の演算を行って
スティックマスクM内でエツジフラグ点Fを挟んで対称
位置にある原画像P0上での画素の濃度の差の総和りを
求める。 D=ΣIf 1(XF+l、yF−1)  f +(X
r−+、3’r−+)ただし、i=1.2.・・・・・
・、n、もしくは、i=m。 m+1.・・−・・・、n(m≠1)とする。判定部1
1では、以上のようにして求めた総和りを所定のしきい
値SL1と比較し、D>SLIであれば、探索ラインS
上に欠けや異物等の欠陥部が存在していると判断する。 すなわち、エツジフラグ点Fが欠陥部の輪郭線の上の点
であれば、スティックマスクMは、欠陥部と欠陥部では
ない部分とに跨がることになるから、エツジフラグ点F
を中心として対称位置に存在する画素の濃度差を求めれ
ば、エツジフラグ点Fの近傍でのコントラストが検出で
きるわけである。さらに、複数画素について濃度差を検
出しているから、コントラストが強調され、検出精度を
向上させることができる。D≦SL1のときには、探索
ラインS上での探索を継続し、エツジフラグ点の有無を
検出する。こうして、探索ラインSの終点に到達した段
階で、エツジフラグ点が検出されなかったときには、欠
陥部が存在しないものと判定するのである1以上の処理
の流れを第6図に示す。
[Embodiment 1] In the present invention, as shown in FIG. 1, an image of an object to be inspected is captured by an image input device 1 such as a television camera, and the density of each pixel is converted into a digital signal by an analog-digital converter 2. Thereafter, the preprocessing section 3 performs the following preprocessing to obtain, in addition to the original image obtained from the analog-to-digital conversion section 2, a differential absolute value image, a differential direction value image, and an edge image. That is, the original image P0 obtained by imaging a spatial region including the inspection object is a grayscale image, and as shown in FIG. 2(a), it is an image containing inspection object 0, defect X1, foreign matter It becomes. The process of extracting edges such as the outline of the inspection object 0 from this grayscale image is based on the idea that edges correspond to areas with large density changes. Therefore, the differentiation process that extracts edges by differentiating the density is as shown in Figure 3.
The original image P0 is divided into locally parallel windows W of 3 x 3 pixels. In other words, the pixel E of interest and the 8 pixels (8 neighbors) around that pixel E are locally paralleled. form a window W, and a pixel A within the locally parallel window W
Find the vertical density change V and the horizontal density change ΔH of the density of ~■ by the following formula, ΔV=(A+B〇)−(G+H+I)ΔH=(A+D
+G)-(C+F+I) Furthermore, the differential absolute value 1e11 and the differential direction value le t are determined by the following equation. el-=(muV2+ΔH2)I/2 1 e g = ta□-・αyay ΔH However, A to A indicate the density of the corresponding pixel. As is clear from the above equation, the absolute differential value 1e represents the maximum rate of change in density in the vicinity of the pixel of interest in the original image, and the differential direction value l e t represents the direction of the maximum change in density in the vicinity of the pixel of interest. By performing calculations of 0 or more representing a direction perpendicular to , and the direction of the change. Here, an image in which the density of each pixel is expressed by a differential absolute value let is called a differential absolute value image, and an image expressed by a differential direction value let is called a differential direction value image. Next, a thinning process is performed. The thinning process is performed by focusing on the point that the larger the absolute differential value, the larger the density change. That is, by comparing the differential absolute value of each pixel with the differential absolute values of surrounding pixels and connecting those that are larger than the surrounding pixels, an edge with a width of one pixel is extracted. As shown in Figure 4, the position of each pixel is expressed by X-Y coordinates, and the differential absolute value is expressed by Z.
Considering the differential absolute value image P1 taken along the axis, the thinning process corresponds to finding the edge line on this curved surface. Through the processing up to this point, regardless of the magnitude of the absolute differential value,
All edges are extracted. The ridge line obtained at this stage also includes unnecessary small peaks due to noise, etc., so as shown in Figure 4,
A threshold value SL is appropriately set, and only values equal to or higher than the threshold value SL are employed to remove noise components. The image obtained by this process tends to have discontinuous lines when the contrast of the original image is insufficient or there is a lot of noise. Therefore, edge extension processing is performed. Starting from the end point of the line, the pixel of interest and its surrounding pixels are compared, and an evaluation function f(
Extend the line in the direction where ea) is the largest, and continue this until it collides with the end point of another line. f(e4)=3 Secondly, eo is the differential data of the central pixel (corresponding to E of the local parallel window W), and e is the differential data of the adjacent pixel (corresponding to the 8 neighbors of the local parallel window W) and j=1.2.・・・・・・It is 8. Through the above processing, as shown in FIG. 2(b), an edge image P is obtained that traces a portion of the original image where the density change is large. In the edge image P4, the original image, differential absolute value image, differential direction code image, edge Four types of images are obtained, and each image is stored in an original image memory 4, a differential absolute value image memory 5, a differential direction value image memory 6, and an edge image memory 7, respectively. In the following explanation, it is assumed that the position of a pixel in each image is expressed by X-Y coordinates. Let the density of each pixel in each image be f+(x, y>,
Let f2 (x, y), f3 (x, y), and f4 (x, y). The original image is a grayscale image, and the density is usually represented by 8 bits, so the density at each pixel is a(=f(x,y))
is 0≦a≦255. Further, the density of the differential absolute value image (i.e., the differential absolute value) b (= fz (x, y)) is expressed by, for example, 6 bits, and 0≦b≦63, and the density of the differential direction value image (i.e., Differential direction value) c (=
f 3 (X, y)) is expressed, for example, in 16 directions, and satisfies 0≦C≦15. For an edge image, since only the presence or absence of a line is present, pixels forming a line are represented as "1n", and other pixels are represented as "0". That is, fn(x,
The value range of y) is (0, 1). In the following explanation, the term density represents the density of white, and the larger the density value, the brighter it is. Next, as shown in FIG. 7, the search processing section 6 sets a search line S inside the contour line of the edge image P4. The search line S can be arbitrarily set as long as it has a closed loop shape, as shown in FIGS. 8(a) to 8(d). That is, a search line S whose starting point and ending point coincide is set. After setting the search line S, start the search and find a point on the search line S where f4 (x, y) = l; 1, then set this point as the edge flag point 0
Next, as shown in FIG. 9, in the stick mask setting section 9, starting from the starting point, centering on the pixel of the first edge flag point F found, a plurality of pixels (number 1) before and after the edge flag point F on the search line S are 8) are extracted and the stick mask M is set. The stick mask M is an area with a width of 1 and a length of 2n+1, where:
n is a natural number and is set appropriately. Now let the coordinates of the edge flag point F be (xr, yy), and the coordinates of each pixel in the stick mask M be RjXr+n+3' r+n)+
""...+R+(Xr+++3/Fl), F (X
r, 3'F), SI(XF-1,'/r-+
), '・”・', Sh (X F-n + yF-n
>, the density calculation unit 10 calculates the following formula to find the sum of differences in density of pixels on the original image P0 located at symmetrical positions across the edge flag point F within the stick mask M. D=ΣIf 1(XF+l,yF-1) f+(X
r-+, 3'r-+) where i=1.2.・・・・・・
., n, or i=m. m+1. ..., n (m≠1). Judgment part 1
1, the sum obtained as above is compared with a predetermined threshold SL1, and if D>SLI, the search line S
It is determined that there is a defective part such as a chip or a foreign object on the top. In other words, if the edge flag point F is a point on the contour line of the defective part, the stick mask M will straddle the defective part and a part that is not a defective part, so the edge flag point F
By finding the density difference between pixels located at symmetrical positions with F as the center, the contrast in the vicinity of the edge flag point F can be detected. Furthermore, since density differences are detected for a plurality of pixels, contrast is emphasized and detection accuracy can be improved. When D≦SL1, the search on the search line S is continued to detect the presence or absence of an edge flag point. In this way, when the end point of the search line S is reached and no edge flag point is detected, it is determined that no defective portion exists.The flow of one or more processes is shown in FIG.

【実施例2】 上記実施例では、探索ラインSを閉ループとなる形状に
形成していたが、本実施例では、第11図に示すように
、探索ラインSの開始点と終了点とを異なる位置として
いる。ここに、探索ラインSは、検査対称物の輪郭線の
内側であれば、直線、曲線、折線等、形状は任意に設定
可能であり、また、方向も任意に設定可能である。 処理の流れを示すと、第10図に示す通りであって、探
索ラインSを設定した後、実施例1と同様にしてエツジ
フラグ点Fを検出し、エツジフラグ点Fに対して実施例
1と同様の手法でスティックマスクMを設定し、スティ
ックマスクM上での対称位置に存在する画素の濃度差の
総和りを求める。 この総和りが所定のしきい値SL1に対して、D>SL
Iを満たせば、このエツジフラグ点Fを欠陥候補点とす
る。ただし、本実施例では、エツジフラグ点FがD>S
LIを満たしてもただちに欠陥部であると判定するので
はなく、探索ラインS上においてこのような欠陥候補点
の総数Kを求めた後、欠陥候補点の総数Kを所定のしき
い値SL2と比較し、K>SL2であるときに、欠陥部
が存在するものと判定する6すなわち、欠陥部が存在す
るかどうかの判定条件を実施例1よりも厳密にしており
、検出精度を一層高めることができるのである。
[Embodiment 2] In the above embodiment, the search line S was formed into a closed loop shape, but in this embodiment, as shown in FIG. It is located at Here, the search line S can be arbitrarily set in shape, such as a straight line, a curved line, or a broken line, as long as it is inside the outline of the object to be inspected, and its direction can also be set arbitrarily. The flow of the process is 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 detected in the same manner as in the first embodiment. A stick mask M is set using the following method, and the sum of density differences between pixels existing at symmetrical positions on the stick mask M is determined. If this sum is D>SL for a predetermined threshold SL1,
If I is satisfied, this edge flag point F is designated as a defect candidate point. However, in this embodiment, the edge flag point F is D>S
Rather than immediately determining that it is a defective part even if LI is satisfied, after calculating the total number K of such defective candidate points on the search line S, the total number K of defective candidate points is set to a predetermined threshold value SL2. By comparison, when K>SL2, it is determined that a defective part exists.6 In other words, the conditions for determining whether a defective part exists are made stricter than in Example 1, and the detection accuracy is further improved. This is possible.

【実施例3】 本実施例では、第13図に示すように、同形状の複数本
の探索ライン81〜Soを設定する。この場合、第14
図に示すように、欠陥部X1が存在していれば、欠陥部
X1は複数本の探索ラインについて連続して見つかるか
ら、欠陥部X1を見つけた探索ラインを欠陥候補ライン
とし、隣接する複数本の探索ラインが欠陥候補ラインと
なり、かつ欠陥候補ラインの総本数りを所定のしきい値
SL3と比較してL>SL3となっているときには、欠
陥部X1が存在するものと判定する。ここに、1本の探
索ライン上に欠陥部X1が存在するかどうかの判定は、
実施例1まなは実施pig2のいずれか方法によればよ
い1本実施例の処理の流れは第12図に示す通りであっ
て、同図中に破線で示した部分を除けば欠陥部X1を実
施例1の方法で検出したことになり、破線で示した部分
を入れると実施例2の方法で検出したことになる。
Embodiment 3 In this embodiment, as shown in FIG. 13, a plurality of search lines 81 to So having the same shape are set. In this case, the 14th
As shown in the figure, if the defective part X1 exists, the defective part X1 is found consecutively on multiple search lines. When the search line becomes a defect candidate line and the total number of defect candidate lines is compared with a predetermined threshold value SL3 and L>SL3, it is determined that the defective part X1 exists. Here, the determination of whether the defective part X1 exists on one search line is as follows:
Embodiment 1 The process flow of this embodiment is as shown in FIG. 12, and except for the part indicated by the broken line in the figure, the defective part This means that it was detected using the method of Example 1, and if the part indicated by the broken line is included, it means that it was detected using the method of Example 2.

【実施例4】 上記各実施例では、検査対象物の輪郭線の内部に探索ラ
インを設定したが、本実施例では、第16図に示すよう
に、検査対象物の輪郭線10の内部に基準濃度設定領域
DM、と検査領域DM、とを設定している。処理の流れ
は、第15図に示す通りであって、゛以下に説明する。 基準濃度設定領域DM、は、基準濃度設定領域DM、内
の全画素の濃度の平均値である基準濃度SDを原画像か
ら求める。次に、検査領域D M 2について、第17
図に矢印で示すように、ラスク走査を行い、f 4(X
 、y )= lとなるエツジフラグ点を求める。ラス
ク走査により最初に見付かったエツジフラグ点F0の座
標を(x o 、 yo)とし、このエツジフラグ点F
。を開始点とし、第18図に示すように、エツジフラグ
点Fo(Xo、:Yo)に順次連なる各エツジフラグ点
F。について以下の処理を行う、以下の説明では、各エ
ツジフラグ点Fにの座標をそれぞれ(XK、3/K)と
する、ただし、n=1.2.・・・である。 いま、エツジフラグ点F1について処理を行っていると
仮定する。注目しているエツジフラグ点F t(x l
 、y +)について、微分方向値画像から微分方向値
す、を求め、微分方向値す、が示す向きに対して直交す
る方向(法線方向)にスティックマスクMを設定する。 スティックマスクMは、第19図に示すように、エツジ
フラグ点F、を中心として対称な形状に設定されるが、
スティックマスクM内の画素は接触していなくてもよい
、ここではエツジフラグ点Ft(xl、y□)がらn画
素層れた画素と、m画素層れた画素とをスティックマス
クM内の画素としている。スティックマスクMの各点の
座標を(X I ell 13’ t +j、(X l
 *n + 3’ 1on)、(X +−n+y+−n
)、(X +−m+3’ l−Jとして、各点の濃度値
を原画像上で求め、 f +(X t、m、3’ I+j=d +f +(’
)C+*n、’j 11111)=d 2f +(X 
+−m+3’ t−j= dコf I(X r−+a、
 3’ 1−)= d 4とする。次に、検査領域DM
、内に存在する欠陥部X、が、非欠陥部に比較して明る
い欠陥(本実施例では、以下、白欠陥部と呼称する)で
あるか、非欠陥部に比較して暗い欠陥(本実施例では、
以下、黒欠陥部と呼称する)であるかを判別するために
、スティックマスクM内の濃度値d1〜d4と基準濃度
SDとを比較する。ここにおいて、dl。 d2.di、d4>5D(dlへd4のすべてがSDよ
り大)という条件を満足すれば、以後の処理において、
白しきい値WSLを用い、条件が満足されなければ、黒
しきい値BSLを用いる。白しきい値WSLおよび黒し
きい値BSLについては、欠陥部x1のコントラストに
応じて適宜設定すればよい。 すなわち、白しきい値WSLを用いる条件が満足されて
いる場合には、スティックマスクM内の対称点の濃度差
について、l d +  d 41 > W S L、
! d 2  d s I > W S Lの各条件が
満足されるかどうかを調べ、いずれか一方でも満足され
れば、条件を満足している濃度差を白加算値としする。 また、黒しきい値BSLを用いる条件が満足されている
場合には、同様に、ld+  d<I>BSL、1d2
−djl>BSLの各条件が満足されるかどうかを調べ
、いずれかの条件が満足されると、条件を満足している
濃度差を黒加算値とする。 以上のようにして白加算値と黒加算値とを求めた後、エ
ツジフラグ点F、から右回りに隣接するエツジフラグ点
の有無を調べる。隣接するエツジフラグ点が存在すれば
、上記処理を行い、さらに、隣接するエツジフラグ点の
有無を調べて追跡を行う、追跡を行っている間、白加算
値と黒加算値とについて、それぞれ総和を求める。この
追跡は次のいずれかの停止条件を満たすと終了する。 ■追跡する画素の数が、あらかじめ設定された最大追跡
数Tmを越えた場合 ■隣接するエツジフラグ点が検査領域D M 2から出
た場合 ■隣接するエツジフラグ点がなくなった場合追跡を終了
した後に、白加算値の総和TWと黒加算値の総和TBと
を、それぞれあらかじめ設定された白欠陥部用のしきい
値W、と黒欠陥部用のしきい値B、と比較し、TW>W
、を満たしているときには、検査領域D M 2内に白
欠陥部が存在し、T B > B +を満たしていると
きには、検査類゛域DM2内に黒欠陥部が存在している
と判定する。また、いずれの条件も満たされないときに
は、検査領域D M 2内に欠陥部は存在しないものと
判定する。 各しきい値WSL、BSL、W、、B、、最大追跡数T
mは、欠陥部の大きさやコントラストにより適宜設定す
ればよい。
[Embodiment 4] In each of the above embodiments, the search line was set inside the outline of the object to be inspected, but in this embodiment, as shown in FIG. A reference density setting area DM and an inspection area DM are set. The flow of processing is as shown in FIG. 15, and will be explained below. In the reference density setting area DM, a reference density SD, which is the average value of the density of all pixels in the reference density setting area DM, is determined from the original image. Next, regarding the inspection area D M 2, the 17th
As shown by the arrow in the figure, rask scanning is performed and f 4 (X
, y ) = l. Let the coordinates of the edge flag point F0 first found by rask scanning be (x o , yo), and this edge flag point F
. As a starting point, as shown in FIG. 18, each edge flag point F is sequentially connected to the edge flag point Fo (Xo, :Yo). In the following explanation, the coordinates of each edge flag point F are assumed to be (XK, 3/K), where n=1.2. ...is... Assume that processing is now being performed on edge flag point F1. The edge flag point F t(x l
, y +), a differential direction value S is obtained from the differential direction value image, and a stick mask M is set in a direction (normal direction) orthogonal to the direction indicated by the differential direction value S. As shown in FIG. 19, the stick mask M is set to have a symmetrical shape with the edge flag point F as the center.
Pixels in the stick mask M do not need to be in contact; here, a pixel with n pixel layers and a pixel with m pixel layers from the edge flag point Ft (xl, y□) are assumed to be pixels in the stick mask M. There is. The coordinates of each point of the stick mask M are (X I ell 13' t +j, (X l
*n + 3' 1on), (X +-n+y+-n
), (X + - m + 3' l - J, find the density value of each point on the original image, f + (X t, m, 3' I + j = d + f + ('
)C+*n,'j 11111)=d 2f +(X
+-m+3't-j=dcof I(X r-+a,
3' 1-)=d4. Next, the inspection area DM
, the defective part X, existing in In the example,
In order to determine whether it is a black defect (hereinafter referred to as a black defect), the density values d1 to d4 in the stick mask M are compared with the reference density SD. Here, dl. d2. If the condition di, d4>5D (all of d4 to dl is greater than SD) is satisfied, in the subsequent processing,
A white threshold WSL is used, and if the conditions are not satisfied, a black threshold BSL is used. The white threshold value WSL and the black threshold value BSL may be appropriately set depending on the contrast of the defective portion x1. That is, when the conditions for using the white threshold value WSL are satisfied, for the density difference between the symmetric points in the stick mask M, l d + d 41 > W S L,
! It is checked whether each condition of d 2 d s I > W SL is satisfied, and if any one of them is satisfied, the density difference that satisfies the condition is set as the white addition value. Similarly, if the conditions for using the black threshold BSL are satisfied, ld+d<I>BSL, 1d2
It is checked whether each condition -djl>BSL is satisfied, and if any of the conditions is satisfied, the density difference that satisfies the condition is set as the black addition value. After obtaining the white addition value and the black addition value as described above, the presence or absence of an edge flag point adjacent clockwise from edge flag point F is checked. If there is an adjacent edge flag point, perform the above processing, and then check whether there is an adjacent edge flag point and perform tracking. While tracking, calculate the sum of the white addition value and the black addition value. . This tracking ends when one of the following stopping conditions is met: ■When the number of pixels to be tracked exceeds the preset maximum tracking number Tm; ■When adjacent edge flag points leave the inspection area DM2; ■When there are no adjacent edge flag points. After tracking is completed, The total sum TW of the white added value and the total sum TB of the black added value are compared with a preset threshold value W for the white defect portion and a threshold value B for the black defect portion, respectively, and TW>W.
, it is determined that a white defect exists in the inspection area DM2, and when T B > B + is satisfied, it is determined that a black defect exists in the inspection area DM2. . Moreover, when any of the conditions is not satisfied, it is determined that there is no defective part within the inspection area DM2. Each threshold value WSL, BSL, W, ,B,, maximum tracking number T
m may be appropriately set depending on the size and contrast of the defective portion.

【実施例5】 本実施例では、第21図に示すように、検査対称物の輪
郭線内に検査領域DMのみを設定し、この検査領域DM
内でラスク走査を行い、追跡の開始点となるエツジフラ
グ点を検出する。処理手順は第20図に示す通りであっ
て、実施例4と同様に、スティックマスクMを設定し、
スティックマスクM内の各画素の濃度d1〜d4を求め
る。さら仁スティックマスクMでの対称点の濃度差を求
め、所定のしきい値SL、と比較する。すなわち、ld
+d4>SL+ I d 2  d :l l > S L +のうちの
少なくとも一方の条件が満たされるかどうかを調べなが
ら、エツジフラグ点の追跡を行う。 ここに、追跡中には条件を満たしたエツジフラグ点の数
を計数する。また、追跡されたエツジフラグ点について
微分絶対値画像に基づいて微分絶対値を求め、微分絶対
値を逐次加算する。エツジフラグ点の追跡に関する停止
条件は実施例4と同じである。追跡が終了した時点で、
上記条件を満たしたエツジフラグ点の総和にと、エツジ
フラグ点についての微分絶対値の総和りが求められるか
ら、それぞれあらかじめ設定されたしきい値SL2.S
L、と比較し、 K>SL。 L>SL。 の少なくとも一方の条件が満足されると検査領域DM、
内に欠陥部が存在すると判定する。欠陥部が発見されな
いときには、検査領域DM内でラスク走査を行っていな
い部分について上述の処理を施し、エツジフラグ点が見
付からないとき、もしくは、しきい値S L、、S L
、に対する条件が両方とも満たされないときには、検査
領域DM内には欠陥部は存在しないものと判断する。
[Embodiment 5] In this embodiment, as shown in FIG. 21, only the inspection area DM is set within the outline of the object to be inspected, and this inspection area DM
A rask scan is performed within the area to detect the edge flag point, which is the starting point for tracking. The processing procedure is as shown in FIG. 20, in which the stick mask M is set as in Example 4,
The densities d1 to d4 of each pixel in the stick mask M are determined. The density difference of the symmetrical point in the Sarani stick mask M is determined and compared with a predetermined threshold value SL. That is, ld
Edge flag points are tracked while checking whether at least one of the following conditions is satisfied: +d4>SL+Id2d:l1>SL+. During tracking, the number of edge flag points that satisfy the conditions is counted. Further, the differential absolute value of the tracked edge flag point is determined based on the differential absolute value image, and the differential absolute values are sequentially added. The stopping conditions for tracking edge flag points are the same as in the fourth embodiment. Once the tracking is finished,
Since the sum of the edge flag points that satisfy the above conditions and the sum of the differential absolute values for the edge flag points are calculated, a preset threshold value SL2. S
Compared with L, K>SL. L>SL. When at least one of the conditions is satisfied, the inspection area DM,
It is determined that there is a defective part within. When no defective part is found, the above-mentioned processing is performed on the part of the inspection area DM that has not been scanned, and when no edge flag point is found, or the threshold value S L, , S L
, it is determined that no defective portion exists within the inspection area DM.

【実施例6】 本実施例では実施S4と同様に基準濃度設定領域DM、
と検査領域D M 2とを設定し、基準濃度設定領域D
 M +内の濃度の平均値を基準濃度SDとする。以下
の処理は第22図の通りであり、この基準濃度SDより
も明るい濃度値をもつ欠陥部(本実施例では、以下、白
欠陥部と呼称する)、および暗い濃度値をもつ欠陥部(
本実施例では、以下、黒欠陥部と呼称する)を検出する
ために、白欠陥部検出用の白しきい値WSLと、黒欠陥
部検出用の黒しきい値BSLとを設定する。すなわち、
第23図に示すように、基準濃度SDに対して明暗のオ
フセット値LT、DKをそれぞれ設定し、次式のように
白しきい値WSLと黒しきい値BSLとを設定する。 WSL−3D+LT BSL=SD−DK このようにして、白しきい値WSLと黒しきい値BSL
とを設定した後、実施例4と同様にして検査領域DM、
内をラスク走査し、追跡の開始点となるエツジフラグ点
を検出する。エツジフラグ点F、を検出すると、第24
図に示すように、その位置の微分方向値に対して直交す
る方向において、エツジフラグ点を挟んで対称となる位
置に濃度測定点P R,P t、を設定する。ここに、
濃度測定点P1.l。 Pt、はエツジフラグ点Fイに対してn画素分離れた位
置に設定されている。微分方向値は、定義から明らかな
ように、原画像上では、微分方向値で示す向きの左側が
暗く右側が明るいという性質があるから、微分方向値で
示す向きの右側の濃度測定点P11の原画像における濃
度Uを白しきい値WSLと比較し、左側の濃度測定点P
Lの原画像における濃度Vを黒しきい値BSLと比較す
る。ここで、u>WSLという条件を満たせば、そのエ
ツジフラグ点を白欠陥候補点とする。また、v<BSL
を満たせば、そのエツジフラグ点を黒欠陥候補点とする
。一連につながるエツジフラグ点について追跡しながら
、この処理を繰り返し、白欠陥候補点みなされたエツジ
フラグ点と、黒欠陥候補点とみなされたエツジフラグ点
とのそれぞれの総数を求める。エツジフラグ点の追跡の
停止条件については実施例4と同じである。追跡を終了
した時点での白欠陥候補点の総数をSW、黒欠陥候補点
の総数をSBとし、あらかじめ設定されているしきい値
S L v 、 S L 4と比較する。すなわち、S
 W > S L 3 SB>SL。 の少なくとも一方の条件を満たせば、検査領域0M2内
に欠陥部が存在すると判定し、いずれも満たされない場
合には、検査領域DMf内で、まだラスク走査を行って
いない部分についてラスク走査を行い同様の手順で欠陥
部を検査する。 検査領域0M2内の全域についてラスク走査を終了した
時点で、エツジフラグ点が存在しないか、あるいはしき
い値S L、、S L、に関する条件が両方とも満たさ
れないときには、検査領域0M2内には欠陥部が存在し
ないものと判断する。
[Embodiment 6] In this embodiment, as in Embodiment S4, the reference density setting area DM,
and the inspection area D M 2, and set the reference concentration setting area D.
The average value of the densities within M+ is set as the reference density SD. The following processing is as shown in FIG. 22, and the defective area with a density value brighter than this standard density SD (hereinafter referred to as a white defective area in this embodiment) and the defective area with a darker density value (
In this embodiment, in order to detect a black defect (hereinafter referred to as a black defect), a white threshold WSL for detecting a white defect and a black threshold BSL for detecting a black defect are set. That is,
As shown in FIG. 23, bright and dark offset values LT and DK are set for the reference density SD, respectively, and a white threshold WSL and a black threshold BSL are set as shown in the following equations. WSL-3D+LT BSL=SD-DK In this way, white threshold WSL and black threshold BSL
After setting, the inspection area DM,
The edge flag point, which is the starting point of tracking, is detected. When the edge flag point F is detected, the 24th
As shown in the figure, density measurement points P R and P t are set at symmetrical positions across the edge flag point in a direction orthogonal to the differential direction value at that position. Here,
Concentration measurement point P1. l. Pt is set at a position separated by n pixels from the edge flag point Fi. As is clear from the definition, the differential direction value has the property that on the original image, the left side of the direction indicated by the differential direction value is dark and the right side is bright. The density U in the original image is compared with the white threshold value WSL, and the density measurement point P on the left is
The density V in the original image of L is compared with the black threshold BSL. Here, if the condition u>WSL is satisfied, that edge flag point is set as a white defect candidate point. Also, v<BSL
If it satisfies the following, the edge flag point is designated as a black defect candidate point. This process is repeated while tracking a series of connected edge flag points, and the total number of edge flag points regarded as white defect candidate points and edge flag points regarded as black defect candidate points is determined. The conditions for stopping tracking of edge flag points are the same as in the fourth embodiment. The total number of white defect candidate points at the time of finishing the tracking is set as SW, and the total number of black defect candidate points is set as SB, and these are compared with preset threshold values SLv and SL4. That is, S
W>SL 3 SB>SL. If at least one of these conditions is satisfied, it is determined that there is a defective part in the inspection area 0M2, and if neither of these conditions is satisfied, a rask scan is performed on the part of the inspection area DMf that has not yet been rask scanned, and the same process is performed. Inspect the defective part using the following procedure. When the rask scan is completed for the entire area in the inspection area 0M2, if there is no edge flag point or if both conditions regarding the thresholds S L, , S L are not satisfied, there is a defective part in the inspection area 0M2. It is assumed that does not exist.

【発明の効果】【Effect of the invention】

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

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

第1図は本発明の実施例1の方法に対応する処理回路の
ブロック図、第2図(a) (b)はそれぞれ本発明に
おける原画像、エツジ画像の一例を示す説明図、第3図
は同上における局所並列ウィンドウを示す説明図、第4
図は同上における微分絶対値画像を示す説明図、第5図
は同上において微分絶対値画像からエツジ画像を得る段
階でのノイズ除去を行う処理の説明図、第6図は同上の
処理平原を示す動作説明図、第7図は同上のエツジ画像
に対する探索ラインの設定状態を示す動作説明図、第8
図(a)〜(d)はそれぞれ同上の探索ラインの形態を
示す説明図、第9図は同上におけるエッジフラグ点の概
念を示す動作説明図、第1O図は本発明の実施例2にお
ける処理手順を示す動作説明図、第11図(、)〜(d
)はそれぞれ同上における探索ラインの形態を示す説明
図、第12図は本発明の実施例3における処理手順を示
す動作説明図、第13図は同上における探索ラインの形
態を示す説明図、第14図は同上の動作説明図、第15
図は本発明の実施例4における処理手順を示す動作説明
図、第16図は同上の動作説明図、第17図は同上にお
けるラスク走査の動作説明図、第18図は同上における
スティックマスクの設定状態を示す動作説明図、第19
図は同上におけるスティックマスクの一例を示す動作説
明図、第20図は本発明の実施例5における処理手順を
示す動作説明図、第21図は同上の検査領域を示す動作
説明図、第22図は本発明の実施例6における処理手順
を示す動作説明図、第23図は同上における白しきい値
および黒しきい値とオフセット値との関係を示す動作説
明図、第24図は同上における濃度測定点を示す動作説
明図である。 10〜12・・・輪郭線、 x2・・・異物。 O・・・検査対象物、
FIG. 1 is a block diagram of a processing circuit corresponding to the method of Embodiment 1 of the present invention, FIG. is an explanatory diagram showing locally parallel windows in the same as above, the fourth
The figure is an explanatory diagram showing the differential absolute value image in the same as above, Figure 5 is an explanatory diagram of the process of removing noise at the stage of obtaining an edge image from the differential absolute value image in the same as above, and Figure 6 shows the processing plain in the same as above. Fig. 7 is an explanatory diagram of the operation showing the setting state of the search line for the same edge image as above;
Figures (a) to (d) are explanatory diagrams showing the form of the search line in the same as above, Fig. 9 is an explanatory diagram of operation showing the concept of edge flag points in the same as above, and Fig. 1O is a processing in the second embodiment of the present invention. Operation explanatory diagram showing the procedure, Figures 11(,) to (d)
) are explanatory diagrams showing the form of the search line in the same as above, FIG. 12 is an explanatory diagram of the operation showing the processing procedure in the third embodiment of the present invention, FIG. The figure is the same operation explanatory diagram, No. 15.
The figure is an operation explanatory diagram showing the processing procedure in Embodiment 4 of the present invention, FIG. 16 is an explanatory diagram of the same as above, FIG. 17 is an explanatory diagram of rask scanning operation in the same as above, and FIG. 18 is a stick mask setting in same as above. Operation explanatory diagram showing the state, No. 19
20 is an explanatory diagram of the operation showing an example of the stick mask in the same as above, FIG. 20 is an explanatory diagram of the operation showing the processing procedure in the fifth embodiment of the present invention, FIG. 23 is an operation explanatory diagram showing the processing procedure in Embodiment 6 of the present invention, FIG. 23 is an operation explanatory diagram showing the relationship between the white threshold value, black threshold value, and offset value in the same as above, and FIG. 24 is the density diagram in the same as above. It is an operation explanatory diagram showing measurement points. 10-12...Contour line, x2...Foreign object. O...Inspection object,

Claims (8)

【特許請求の範囲】[Claims] (1)画像入力手段により検査対象物を含む空間領域を
撮像した後、画像入力手段により得られた原画像の各画
素の濃度に基づいて検査対象物の輪郭線を含むエッジ画
像に変換し、原画像とエッジ画像とに基づいて検査対象
物の輪郭線の内側に存在する欠け、ひび、汚れ等の欠陥
部を検査する欠陥検査方法において、エッジ画像に基づ
いて検査対象物の輪郭線の内側に少なくとも1本の探索
ラインを設定し、探索ライン上で欠陥部のエッジとみな
せるエッジフラグ点を検出すると、原画像についてエッ
ジフラグ点の近傍での濃度変化に基づいて欠陥部を識別
することを特徴とする欠陥検査方法。
(1) After capturing an image of a spatial region including the object to be inspected by the image input means, converting it into an edge image including the outline of the object to be inspected based on the density of each pixel of the original image obtained by the image input means; In a defect inspection method that inspects defects such as chips, cracks, dirt, etc. that exist inside the outline of an object to be inspected based on an original image and an edge image, At least one search line is set in the search line, and when an edge flag point that can be considered as the edge of a defective part is detected on the search line, the defective part is identified based on density changes in the vicinity of the edge flag point in the original image. Characteristic defect inspection method.
(2)上記エッジ画像は、原画像の各画素の近傍領域内
の濃度値の最大変化率を表す微分絶対値を各画素に対応
させた微分絶対値画像に基づく細線化処理により得られ
、エッジ画像に基づいて、検査対象物の輪郭線内に設定
された探索ライン上でエッジフラグ点を検出すると、探
索ライン上にエッジフラグ点を中心とする複数画素より
なるスティックマスクを設定し、原画像に基づいて、ス
ティックマスク内の対称位置の画素の濃度差の総和を求
め、その総和が所定値を越えると欠陥部が存在すると判
断することを特徴とする請求項1記載の欠陥検査方法。
(2) The above edge image is obtained by thinning processing based on a differential absolute value image in which each pixel is associated with a differential absolute value representing the maximum rate of change in density value in the neighborhood area of each pixel of the original image. When an edge flag point is detected on a search line set within the outline of the object to be inspected based on the image, a stick mask consisting of multiple pixels centered on the edge flag point is set on the search line, and the original image is 2. The defect inspection method according to claim 1, wherein the total sum of density differences of pixels at symmetrical positions in the stick mask is calculated based on the above, and when the sum exceeds a predetermined value, it is determined that a defective portion exists.
(3)上記エッジ画像は、原画像の各画素の近傍領域内
の濃度値の最大変化率を表す微分絶対値を各画素に対応
させた微分絶対値画像に基づく細線化処理により得られ
、エッジ画像に基づいて、検査対象物の輪郭線内に設定
された探索ライン上でエッジフラグ点を検出すると、探
索ライン上にエッジフラグ点を中心とする複数画素より
なるスティックマスクを設定し、原画像に基づいて、ス
ティックマスク内の対称位置の画素の濃度差の総和を求
め、その総和が所定値を越えるとそのエッジフラグ点を
欠陥候補点とし、探索ライン上の欠陥候補点の総数が所
定値を越えると欠陥部が存在すると判断することを特徴
とする請求項1記載の欠陥検査方法。
(3) The above edge image is obtained by thinning processing based on a differential absolute value image in which each pixel is associated with a differential absolute value representing the maximum rate of change in density value in the neighborhood area of each pixel of the original image. When an edge flag point is detected on a search line set within the outline of the object to be inspected based on the image, a stick mask consisting of multiple pixels centered on the edge flag point is set on the search line, and the original image is Based on this, the sum of the density differences of pixels at symmetrical positions in the stick mask is calculated, and if the sum exceeds a predetermined value, that edge flag point is designated as a defect candidate point, and the total number of defect candidate points on the search line is set to a predetermined value. 2. The defect inspection method according to claim 1, wherein it is determined that a defective portion exists if the value exceeds .
(4)エッジ画像に対して、検査対象物の輪郭線内に複
数本の並行する探索ラインを設定するとともに、各探索
ラインについて請求項2または請求項3の欠陥検査方法
により欠陥部が存在すると判定されると、その探索ライ
ンを欠陥候補ラインとし、隣接する複数本の探索ライン
が連続して欠陥候補ラインとなるとともに、欠陥候補ラ
インの総数が所定値を越えると欠陥部が存在すると判断
することを特徴とする欠陥検査方法。
(4) For the edge image, a plurality of parallel search lines are set within the outline of the object to be inspected, and each search line is detected by the defect inspection method of claim 2 or claim 3 if a defective portion exists. Once determined, the search line is set as a defect candidate line, and multiple adjacent search lines are consecutively set as defect candidate lines, and if the total number of defect candidate lines exceeds a predetermined value, it is determined that a defective part exists. A defect inspection method characterized by:
(5)画像入力手段により検査対象物を含む空間領域を
撮像した後、画像入力手段により得られた原画像の各画
素の濃度に基づいて検査対象物の輪郭線を含むエッジ画
像に変換し、原画像とエッジ画像とに基づいて検査対象
物の輪郭線の内側に存在する欠け、ひび、汚れ等の欠陥
部を検査する欠陥検査方法において、エッジ画像につい
て検査対象物の輪郭線の内側に少なくとも1個の検査領
域を設定し、検査領域の全領域を走査しつつ探索するこ
とにより欠陥部のエッジとみなせるエッジフラグ点を検
出すると、エッジフラグ点を開始点として欠陥部の輪郭
線を追跡するとともに、輪郭線上の各画素の近傍での濃
度変化に基づいて欠陥部を識別することを特徴とする欠
陥検査方法。
(5) After capturing an image of a spatial region including the object to be inspected by the image input means, converting it into an edge image including the outline of the object to be inspected based on the density of each pixel of the original image obtained by the image input means; In a defect inspection method for inspecting defects such as chips, cracks, dirt, etc. that exist inside the outline of an object to be inspected based on an original image and an edge image, at least When one inspection area is set and an edge flag point that can be considered as the edge of the defective part is detected by scanning and searching the entire area of the inspection area, the outline of the defective part is traced using the edge flag point as the starting point. Additionally, a defect inspection method is characterized in that a defective portion is identified based on a density change in the vicinity of each pixel on the contour line.
(6)上記エッジ画像は、原画像の各画素の近傍領域内
の濃度値の最大変化率を表す微分絶対値を各画素に対応
させた微分絶対値画像に基づく細線化処理により得られ
、検査対称物の輪郭線の内部に基準濃度設定領域と検査
領域とを設定し、原画像について基準濃度設定領域内の
画素の濃度の平均値を求めて基準濃度とし、検査領域内
の走査中にエッジフラグ点を検出すると、原画像の各画
素の近傍領域内の濃度値の最大変化の方向を反映する微
分方向値を各画素に対応させた微分方向値画像に基づい
て、濃度値の上記最大変化の方向でエッジフラグ点を中
心とする複数画素よりなるスティックマスクを設定し、
原画像についてスティックマスク内のすべての画素の濃
度が上記基準濃度を越えるとともに、スティックマスク
内の対称位置の画素の濃度差が所定の白しきい値を越え
ると、その濃度差を白加算値とし、原画像についてステ
ィックマスク内の少なくも1つの画素の濃度が上記基準
濃度以下であるとともに、スティックマスク内の対称位
置の画素の濃度差が所定の黒しきい値を越えると、その
濃度差を黒加算値とし、隣接するすべてのエッジフラグ
点を追跡し各エッジフラグ点について白加算値と黒加算
値とを検出した後、白加算値と黒加算値との少なくとも
一方がそれぞれに対応して設定された所定値を越えると
欠陥部が存在すると判断することを特徴とする請求項5
記載の欠陥検査方法。
(6) The above edge image is obtained by thinning processing based on a differential absolute value image in which each pixel is associated with a differential absolute value representing the maximum rate of change in density value in the neighborhood area of each pixel of the original image, and inspected. A reference density setting area and an inspection area are set inside the outline of the object, and the average value of the density of pixels in the reference density setting area for the original image is determined as the reference density. When a flag point is detected, the above maximum change in density value is determined based on a differential direction value image in which each pixel is associated with a differential direction value that reflects the direction of maximum change in density value in the neighborhood area of each pixel in the original image. Set a stick mask consisting of multiple pixels centered on the edge flag point in the direction of
When the density of all pixels in the stick mask for the original image exceeds the above reference density and the density difference between pixels at symmetrical positions in the stick mask exceeds a predetermined white threshold value, that density difference is used as the white addition value. , if the density of at least one pixel in the stick mask for the original image is below the reference density, and the density difference between pixels at symmetrical positions in the stick mask exceeds a predetermined black threshold, the density difference is After tracking all adjacent edge flag points and detecting a white addition value and a black addition value for each edge flag point, it is determined that at least one of the white addition value and the black addition value corresponds to each edge flag point. Claim 5 characterized in that it is determined that a defective portion exists when a predetermined value is exceeded.
Defect inspection method described.
(7)上記エッジ画像は、原画像の各画素の近傍領域内
の濃度値の最大変化率を表す微分絶対値を各画素に対応
させた微分絶対値画像に基づく細線化処理により得られ
、検査対称物の輪郭線の内部に検査領域を設定し、検査
領域内の走査中にエッジフラグ点を検出すると、原画像
の各画素の近傍領域内の濃度値の最大変化の方向を反映
する微分方向値を各画素に対応させた微分方向値画像に
基づいて、濃度値の上記最大変化の方向でエッジフラグ
点を中心とする複数画素よりなるスティックマスクを設
定し、原画像についてスティックマスク内の対称位置の
画素の濃度差が所定値を越えると、そのエッジフラグ点
を欠陥候補点とし、隣接するすべてのエッジフラグ点を
追跡した後、欠陥候補点の総数とすべての欠陥候補点の
微分絶対値の総和との少なくとも一方がそれぞれに対応
して設定された所定値を越えると欠陥部が存在すると判
断することを特徴とする請求項5記載の欠陥検査方法。
(7) The above edge image is obtained by thinning processing based on a differential absolute value image in which each pixel is associated with a differential absolute value representing the maximum rate of change in density value in the neighborhood area of each pixel of the original image, and inspected. When an inspection area is set inside the contour line of the object and an edge flag point is detected during scanning within the inspection area, the differential direction that reflects the direction of the maximum change in density value in the neighborhood area of each pixel of the original image is set. Based on the differential direction value image in which the value corresponds to each pixel, a stick mask consisting of multiple pixels centered on the edge flag point is set in the direction of the maximum change in the density value, and the symmetry within the stick mask is set for the original image. When the density difference between pixels at a position exceeds a predetermined value, that edge flag point is designated as a defect candidate point, and after tracking all adjacent edge flag points, the total number of defect candidate points and the differential absolute value of all defect candidate points are determined. 6. The defect inspection method according to claim 5, wherein it is determined that a defective portion exists when at least one of the total sum and the total sum exceeds a predetermined value set correspondingly to each of them.
(8)上記エッジ画像は、原画像の各画素の近傍領域内
の濃度値の最大変化率を表す微分絶対値を各画素に対応
させた微分絶対値画像に基づく細線化処理により得られ
、検査対称物の輪郭線の内部に基準濃度設定領域と検査
領域とを設定し、原画像より求めた基準濃度設定領域内
の画素の濃度の平均値より大きい白しきい値と上記平均
値より小さい黒しきい値とを設定し、検査領域内の走査
中にエッジフラグ点を検出すると、原画像の各画素の近
傍領域内の濃度値の最大変化の方向を反映する微分方向
値を各画素に対応させた微分方向値画像に基づいて、濃
度値の上記最大変化の方向でエッジフラグ点を中心とす
る対称位置にエッジフラグ点から離れた一対の濃度測定
点を設定し、原画像について濃度値が大きいほうの濃度
測定点の濃度値が白しきい値を越えると白欠陥候補点と
し、濃度値が小さいほうの濃度測定点の濃度値が黒しき
い値より小さいと黒欠陥候補点とし、隣接するすべての
エッジフラグ点を追跡し各エッジフラグ点について白欠
陥候補点と黒欠陥候補点とを検出した後、白欠陥候補点
の総数と黒欠陥候補点の総数との少なくとも一方がそれ
ぞれに対応して設定された所定値を越えると欠陥部が存
在すると判断することを特徴とする請求項5記載の欠陥
検査方法。
(8) The above edge image is obtained by thinning processing based on a differential absolute value image in which each pixel is associated with a differential absolute value representing the maximum rate of change in density value in the neighborhood area of each pixel of the original image, and inspected. A reference density setting area and an inspection area are set inside the outline of the object, and a white threshold value that is greater than the average density of pixels in the reference density setting area determined from the original image and a black threshold value that is smaller than the above average value are set. When an edge flag point is detected during scanning in the inspection area, a differential direction value is assigned to each pixel that reflects the direction of the maximum change in density value in the neighborhood of each pixel in the original image. Based on the differentiated direction value image, a pair of density measurement points separated from the edge flag point are set at symmetrical positions centering on the edge flag point in the direction of the maximum change in density value, and the density value is determined for the original image. If the density value of the larger density measurement point exceeds the white threshold, it is considered a white defect candidate point, and if the density value of the smaller density measurement point is smaller than the black threshold, it is considered a black defect candidate point, and the adjacent After tracking all edge flag points and detecting white defect candidate points and 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 corresponds to each. 6. The defect inspection method according to claim 5, wherein if the value exceeds a predetermined value, it is determined that a defective portion exists.
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 true JPH02242382A (en) 1990-09-26
JPH0718811B2 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)

Cited By (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
JP2007147407A (en) * 2005-11-25 2007-06-14 Matsushita Electric Works Ltd Visual examination method
JP2010032332A (en) * 2008-07-28 2010-02-12 Panasonic Electric Works Co Ltd Method and device for visual inspection
JP2010032334A (en) * 2008-07-28 2010-02-12 Panasonic Electric Works Co Ltd Method and device for visual inspection of molded article
JP2010118046A (en) * 2008-10-14 2010-05-27 Shibaura Mechatronics Corp Image processing method, image processor, and surface inspection device using the image processor
JP2010164333A (en) * 2009-01-13 2010-07-29 Toshiba Corp Device and method for inspecting defect
JP2020076606A (en) * 2018-11-06 2020-05-21 Tdk株式会社 Appearance inspection method and manufacturing method of electronic component

Cited By (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
JP2007147407A (en) * 2005-11-25 2007-06-14 Matsushita Electric Works Ltd Visual examination method
JP2010032332A (en) * 2008-07-28 2010-02-12 Panasonic Electric Works Co Ltd Method and device for visual inspection
JP2010032334A (en) * 2008-07-28 2010-02-12 Panasonic Electric Works Co Ltd Method and device for visual inspection of molded article
JP2010118046A (en) * 2008-10-14 2010-05-27 Shibaura Mechatronics Corp Image processing method, image processor, and surface inspection device using the image processor
JP2010164333A (en) * 2009-01-13 2010-07-29 Toshiba Corp Device and method for inspecting defect
JP2020076606A (en) * 2018-11-06 2020-05-21 Tdk株式会社 Appearance inspection method and manufacturing method of electronic component

Also Published As

Publication number Publication date
JPH0718811B2 (en) 1995-03-06

Similar Documents

Publication Publication Date Title
CN111369516B (en) Transformer bushing heating defect detection method based on infrared image recognition
US5537490A (en) Line image processing method
CN108520514B (en) Consistency detection method for electronic elements of printed circuit board based on computer vision
JP4189061B2 (en) Crack detection method for concrete surface
CN114049316A (en) Steel wire rope defect detection method based on metallic luster area
CN113077437A (en) Workpiece quality detection method and system
KR102242996B1 (en) Method for atypical defects detect in automobile injection products
JPH02242382A (en) Defect checking method
JP3890844B2 (en) Appearance inspection method
JPH03175343A (en) Method for extracting flaw by inspection appearance
JP2647502B2 (en) Pattern comparison inspection method and apparatus
JP3508518B2 (en) Appearance inspection method
JP2686053B2 (en) Defect inspection method by visual inspection
JP5346304B2 (en) Appearance inspection apparatus, appearance inspection system, and appearance inspection method
JP2710685B2 (en) Defect detection method by visual inspection
JPH10208066A (en) Method for extracting edge line of check object and appearance check method using this method
JP3753234B2 (en) Defect detection method
JP2000321038A (en) Method for detecting fault of pattern
JPH1114317A (en) Appearance inspection method and device
JPH0797410B2 (en) Image processing method
Decker A difference technique for automatic inspection of casting parts
JPH11351842A (en) Wheel shape measuring device
JPH0772909B2 (en) Welding condition judgment method by visual inspection
JP2514727B2 (en) Defect inspection method by visual inspection
JPH0319990B2 (en)

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