JPH05280958A - Defect inspection device - Google Patents

Defect inspection device

Info

Publication number
JPH05280958A
JPH05280958A JP4103542A JP10354292A JPH05280958A JP H05280958 A JPH05280958 A JP H05280958A JP 4103542 A JP4103542 A JP 4103542A JP 10354292 A JP10354292 A JP 10354292A JP H05280958 A JPH05280958 A JP H05280958A
Authority
JP
Japan
Prior art keywords
defect
image
pixel
area
threshold value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP4103542A
Other languages
Japanese (ja)
Inventor
Yoshiko Shiimori
佳子 椎森
Hironori Okamura
広紀 岡村
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.)
Fujifilm Holdings Corp
Original Assignee
Fuji Photo Film Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Photo Film Co Ltd filed Critical Fuji Photo Film Co Ltd
Priority to JP4103542A priority Critical patent/JPH05280958A/en
Priority to EP93105276A priority patent/EP0563897A1/en
Publication of JPH05280958A publication Critical patent/JPH05280958A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To automatically detect a defect to extract a region including the defect so that its shape, type, etc., can be highly accurately discriminated. CONSTITUTION:An address of a defect is obtained based on a differential image, and a first threshold TH1 determined from a total density distribution of the differential image and a second threshold TH2 obtained from an average density value of a vicinity region of a pixel of interest are used to obtain a third threshold TH3 for each pixel of interest, which is used to binarizing each of the pixels of interest. The pixels of the region including defect addresses of regions obtained by this binarization processing are all painted by values indicating a defect. The third threshold TH3 is obtained by TH3=TH1-k(TH1-TH2) for example. Shape correction such as compressing, expanding, embedding, etc., can be performed immediately after the binarization processing.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、検査対象を走査して得
られる画像信号を用いて欠陥の有無を自動で検査し、こ
の欠陥の種類等を高精度に判別し得るように欠陥の領域
を抽出する欠陥検査装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention automatically detects the presence or absence of a defect by using an image signal obtained by scanning an object to be inspected, and determines the defect area so that the type of the defect can be determined with high accuracy. The present invention relates to a defect inspection device for extracting

【0002】[0002]

【従来の技術】鋼板やプラスチックフィルムや紙などの
表面を光学的に走査して、その表面のキズあるいは内部
の欠陥等を検出する欠陥検査装置が公知である。ここに
従来は検査対象を走査して得た画像信号を予め設定され
たしきい値と比較し、画像信号がこのしきい値を超える
時又は小さい時に欠陥であると判断していた(例えば特
願平2−245413号等参照)。
2. Description of the Related Art A defect inspection apparatus is known which optically scans the surface of a steel plate, plastic film, paper or the like to detect scratches on the surface or internal defects. Here, conventionally, an image signal obtained by scanning an inspection object is compared with a preset threshold value, and when the image signal exceeds or is smaller than this threshold value, it is determined to be a defect (for example, See Japanese Patent Application No. 2-245413, etc.).

【0003】また検出した欠陥の形状や種類などを判別
できるようにした装置も提案されている。例えば、検査
対象から得られた画像信号を一定のレベルで波高弁別
し、これによって得られた欠陥領域から特徴量を求め、
欠陥の種類を判別するものである。
There has also been proposed an apparatus capable of discriminating the shape and type of the detected defect. For example, the image signal obtained from the inspection object is wave height discriminated at a constant level, and the feature amount is obtained from the defect area obtained by this,
The type of defect is determined.

【0004】[0004]

【従来技術の問題点】しかしこの場合には、例えば欠陥
領域内の濃度レベルが低い部分では欠陥が十分に抽出で
きず、よって欠陥の特徴量を精度よく求めることが非常
に困難になる。
However, in this case, the defects cannot be sufficiently extracted, for example, in a portion having a low density level in the defect region, and thus it becomes very difficult to accurately obtain the feature amount of the defect.

【0005】[0005]

【発明の目的】従って本発明は、自動で欠陥を検出して
その形状や種類等を高精度に判別できるようにこの欠陥
を含む領域を抽出するようにした画像欠陥検出装置を提
供することを目的とする。
SUMMARY OF THE INVENTION It is, therefore, an object of the present invention to provide an image defect detecting apparatus for automatically detecting a defect and extracting a region including this defect so that the shape, type, etc. of the defect can be accurately determined. To aim.

【0006】[0006]

【発明の構成】本発明によればこの目的は、検査対象を
走査して得た画像信号を微分フィルタを含む空間フィル
タリング処理した微分画像を用いて検査対象の欠陥を含
む領域を抽出する欠陥検査装置において、前記微分画像
に基づいて前記欠陥のアドレスを求める欠陥アドレス検
出手段と、前記微分画像の全体の濃度分布から決まる第
1の閾値(TH1)と注目画素の近傍領域の濃度平均値
から得られる第2の閾値(TH2)とを用いて各注目画
素ごとに得られる第3の閾値(TH3)を用いて各注目
画素を2値化する2値化処理手段と、前記2値化処理手
段で得られた領域のうち前記欠陥のアドレスを含む領域
の画そを全て欠陥を示す値に塗り潰す欠陥領域抽出手段
とを備えることを特徴とする欠陥検査装置により達成さ
れる。
According to the present invention, an object of the present invention is to perform a defect inspection for extracting an area including a defect of an inspection object by using a differential image obtained by subjecting an image signal obtained by scanning the inspection object to spatial filtering processing including a differential filter. In the apparatus, the defect address detection means for obtaining the address of the defect based on the differential image, the first threshold value (TH1) determined from the density distribution of the entire differential image, and the density average value of the neighborhood area of the target pixel are obtained. And a binarization processing means for binarizing each pixel of interest using a third threshold value (TH3) obtained for each pixel of interest using the second threshold value (TH2) The defect inspection apparatus is characterized by further comprising defect area extracting means for filling all of the image of the area including the address of the defect to a value indicating the defect in the area obtained in (1).

【0007】ここに2値化処理に用いる第3の閾値TH
3は、微分画像全体の濃度分布から決まる第1の閾値T
H1と、注目画素の近傍領域の平均濃度から決まる第2
の閾値TH2とを用いて、例えばTH3=TH1−k
(TH1−TH2)により求めることができる。なお2
値化処理の直後に走査方向または副走査方向に収縮処理
を行ったり、抽出した欠陥領域に対して膨張処理、穴埋
め処理、収縮処理などを施して形状補正を行ってもよ
い。
Here, a third threshold value TH used in the binarization process
3 is a first threshold T determined from the density distribution of the entire differential image
H1 and the second density determined from the average density of the region near the pixel of interest
, And TH3 = TH1-k
It can be determined by (TH1-TH2). 2
Immediately after the binarization process, contraction processing may be performed in the scanning direction or the sub-scanning direction, or expansion processing, hole filling processing, contraction processing, or the like may be performed on the extracted defect area to perform shape correction.

【0008】[0008]

【実施例】図1は本発明の第1の実施例のブロック図、
図2はその一部の詳細ブロック図、図3は閾値TH1の
決定法の一例の説明図、図4は閾値TH2の決定法の一
例の説明図、図5は閾値TH3の説明図である。
FIG. 1 is a block diagram of a first embodiment of the present invention,
2 is a detailed block diagram of a part thereof, FIG. 3 is an explanatory diagram of an example of a method of determining the threshold TH1, FIG. 4 is an explanatory diagram of an example of a method of determining the threshold TH2, and FIG. 5 is an explanatory diagram of the threshold TH3.

【0009】図1において、符号10は鋼板、紙、プラ
スチックフィルムなどの検査対象であり、この検査対象
10は供給ロール12から巻取りロール14に送られ
る。この巻取りロール14は巻取りモータ16により駆
動される。この検査対象10の送り中にフライングスポ
ット方式による画像検出手段18によって表面の画像が
読取られる。
In FIG. 1, reference numeral 10 is an inspection object such as a steel plate, paper, or a plastic film, and this inspection object 10 is sent from a supply roll 12 to a winding roll 14. The winding roll 14 is driven by a winding motor 16. While the inspection object 10 is being fed, the image on the surface is read by the image detecting means 18 of the flying spot type.

【0010】この画像検出手段18は、レーザー光源2
0から射出されるレーザ光からなる走査ビームLを、モ
ータ22により回転される回転ミラー(ポリゴナルミラ
ー)24によって検査対象10の幅方向に一定の速度で
走査(主走査)する一方、検査対象10の表面による反
射光を受光ロッド26によって一対の受光器28(28
a、28b)に導いて受光するものである。すなわち受
光ロッド26は走査ビームLの主走査ライン30に近接
してこれに平行に配設され、反射光を受光すると受光ロ
ッド26の内面で全反射させてその両端に導き、フォト
マルチプライヤ(光電子増倍管)などの受光器28によ
り受光量が検出される。
The image detecting means 18 is a laser light source 2
The scanning beam L composed of the laser light emitted from 0 is scanned (main scanning) in the width direction of the inspection object 10 at a constant speed by the rotating mirror (polygonal mirror) 24 rotated by the motor 22 while the inspection object is inspected. The light reflected by the surface of 10 is received by a pair of light receivers 28 (28).
a, 28b) to receive light. That is, the light-receiving rod 26 is disposed close to and parallel to the main scanning line 30 of the scanning beam L, and when the reflected light is received, the light-receiving rod 26 is totally reflected by the inner surface of the light-receiving rod 26 and guided to both ends thereof, and the photomultiplier (photoelectron The amount of light received is detected by a light receiver 28 such as a multiplier.

【0011】各受光器28が出力する画像信号はプリア
ンプ、メインアンプで増幅され、また波形整形されてア
ナログ画像信号a1 、a2 となる。各信号a1 、a2
は、連続する異なる主走査ライン30に対応する信号
が、時間軸方向に一定時間毎に現れている。
The image signal output from each light receiver 28 is amplified by a preamplifier and a main amplifier, and waveform-shaped into analog image signals a 1 and a 2 . In each of the signals a 1 and a 2 , signals corresponding to successive different main scanning lines 30 appear at regular time intervals in the time axis direction.

【0012】各信号a1 、a2 は走査ビームLの主走査
ライン30上の走査位置から遠くなるとレベルが低下
し、反対に走査位置に近くなるとレベルが上昇するよう
に変化する。そこでこの実施例では、両信号a1 、a2
は加算手段32で加算され、主走査ライン30上の走査
位置の変化による影響が除去されて信号a3 となる。こ
の信号a3 は、走査ビームLの検査対象10表面への入
射角度の変化、検査対象10表面のむらや地合い、導光
ロッド26内での減衰などのために、その出力レベルが
大きく湾曲していることがある。
The levels of the signals a 1 and a 2 change such that the level thereof decreases when the scanning beam L is far from the scanning position on the main scanning line 30, and conversely the level increases when the scanning beam L is close to the scanning position. Therefore, in this embodiment, both signals a 1 and a 2
Are added by the adding means 32, and the influence due to the change of the scanning position on the main scanning line 30 is removed to become the signal a 3 . The output level of the signal a 3 is greatly curved due to a change in the incident angle of the scanning beam L on the surface of the inspection object 10, unevenness or texture of the surface of the inspection object 10, attenuation in the light guide rod 26, and the like. Sometimes

【0013】この加算された信号a3 はA/D変換手段
34においてデジタル信号a4 に変換される。例えば2
56階調の濃度信号a4 に変換される。そしてラインメ
モリ(図示せず)にメモリされる。
The added signal a 3 is converted into a digital signal a 4 in the A / D conversion means 34. Eg 2
It is converted into a density signal a 4 of 56 gradations. Then, it is stored in a line memory (not shown).

【0014】A/D変換された信号a4 は濃度変換手段
36で濃度変換され、微分フィルタ38に入力されて空
間フィルタリング処理される。濃度変換手段36は所定
の変換テーブルにより信号a4 を例えば256階調の範
囲内で適切な濃度分布に変換する。微分フィルタ38は
注目画素を中心とする例えば3×3画素領域に所定の重
み係数をもった空間フィルタを重ね、対応する画素同志
の積を求め、これらの総和を出力とするものである。
The A / D-converted signal a 4 is density-converted by the density converting means 36, is input to the differential filter 38, and is spatially filtered. The density converting means 36 converts the signal a 4 into an appropriate density distribution within a range of 256 gradations by using a predetermined conversion table. The differential filter 38 superimposes a spatial filter having a predetermined weighting coefficient on, for example, a 3 × 3 pixel area centered on the pixel of interest, calculates the product of the corresponding pixels, and outputs the sum of these.

【0015】これら濃度変換手段36および微分フィル
タ38については、特願平2−245413号等に詳細
に説明されているから、ここでは繰り返さない。なお濃
度変換手段36を省いて信号a4 を直接微分フィルタ3
8に入力してもよい。微分フィルタ38で空間フィルタ
リング処理をした信号a5 は、信号a4 にあった低周波
成分が除去されて欠陥の輪郭が強調されている。そして
この信号a5 は微分画像A0 を形成するものである。
The density converting means 36 and the differential filter 38 have been described in detail in Japanese Patent Application No. 2-245413, and will not be repeated here. The density conversion means 36 is omitted and the signal a 4 is directly differentiated by the differential filter 3
You may enter in 8. The signal a 5 spatially filtered by the differential filter 38 has the low-frequency component in the signal a 4 removed to enhance the contour of the defect. This signal a 5 forms the differential image A 0 .

【0016】40は欠陥アドレス検出手段であり、例え
ばこの信号a5 を閾値TH0と比較し、a5 >TH0ま
たはa5 <TH0の時に欠陥と判断する。そしてこの欠
陥を検出すると、この欠陥のアドレスAdが求められメ
モリされる。このアドレスAdは速度検出器(パルスジ
ェネレータ)42、モータ22の回転角から求める。な
お、信号a5 を欠陥と判断する方法は、ここで述べた方
法に限定されないものとする。
Reference numeral 40 denotes a defective address detecting means, which compares this signal a 5 with a threshold value TH0 and judges that it is defective when a 5 > TH0 or a 5 <TH0. When this defect is detected, the address Ad of this defect is obtained and stored. This address Ad is obtained from the rotation angle of the speed detector (pulse generator) 42 and the motor 22. The method of determining the signal a 5 as a defect is not limited to the method described here.

【0017】以上のようにして欠陥のアドレスAdを求
めるが、この過程は単に欠陥の有無を判定すればよいの
でここに用いる閾値TH0は後記の閾値TH3などに比
べて高く、すなわち欠陥の信号レベルに接近したレベル
に設定され、ノイズによる誤検出を防止している。
The defect address Ad is obtained as described above. In this process, the presence or absence of a defect may be simply determined. Therefore, the threshold value TH0 used here is higher than the threshold value TH3 described later, that is, the defect signal level. It is set to a level close to to prevent erroneous detection due to noise.

【0018】[0018]

【2値化処理手段】一方微分フィルタ38の出力信号a
5 が形成する画像すなわち微分画像A0 は2値化処理手
段42に入力される。この手段42は図2に示すように
第1の閾値TH1と第2の閾値TH2とから、第3の閾
値TH3を求め、この第3の閾値TH3を用いて信号a
5 を2値化するものである。
[Binarization processing means] Output signal a of the differential filter 38
The image formed by 5, that is, the differential image A 0 is input to the binarization processing means 42. As shown in FIG. 2, this means 42 obtains a third threshold TH3 from the first threshold TH1 and the second threshold TH2, and uses the third threshold TH3 to obtain the signal a.
Binarize 5

【0019】第1の閾値TH1はこの微分画像の全体の
濃度分布から決めるものであり、例えば図3に示す濃度
のヒストグラムを用いて決めることができる。この図3
で濃度の分布幅がxであれば、これを用いて度数の閾値
N(TH1)を N(TH1)=(全度数)/f(x) により求める。
The first threshold value TH1 is determined from the density distribution of the entire differential image, and can be determined using, for example, the density histogram shown in FIG. This Figure 3
If the distribution width of density is x, the frequency threshold N (TH1) is calculated by using N (TH1) = (total frequency) / f (x).

【0020】ここにf(x)は分布幅xの関数であり、
xの2次関数などで決める。そして度数の閾値N(TH
1)となるヒストグラムの濃度TH1を第1の閾値とす
れば、これは微分画像全体の濃度分布が反映された閾値
となる。なお、このN(TH1)の値は予め実験的に求
めておき、欠陥検出処理の過程では定数として扱っても
よい。
Where f (x) is a function of the distribution width x,
It is determined by a quadratic function of x or the like. The frequency threshold N (TH
If the density TH1 of the histogram 1) is used as the first threshold value, this is a threshold value that reflects the density distribution of the entire differential image. The value of N (TH1) may be obtained experimentally in advance and treated as a constant in the process of defect detection processing.

【0021】第2の閾値TH2は、注目画素の近傍領域
の濃度平均値から得られるものである。例えば図4に示
すように、注目画素を中心とする3×3の画素の濃度d
の総和Σdnを求め、これを画素数9で割ることにより
求めることができる。
The second threshold value TH2 is obtained from the density average value of the area near the target pixel. For example, as shown in FIG. 4, the density d of a 3 × 3 pixel centered on the pixel of interest
Can be obtained by obtaining the total sum Σdn of the above and dividing this by the number of pixels 9.

【0022】第3の閾値TH3はこれら第1、第2の閾
値TH1およびTH2を用いて決める。例えばkを定数
として TH3=TH1−k(TH1−TH2) により決める。この定数kは地合いの程度などを考慮し
て予め実験的に決めておく。
The third threshold TH3 is determined by using these first and second thresholds TH1 and TH2. For example, with k as a constant, TH3 = TH1-k (TH1-TH2) is determined. This constant k is experimentally determined in advance in consideration of the degree of texture.

【0023】2値化処理手段42では、この微分画像A
0 の各画素ごとに決まる第3の閾値TH3を微分画像A
0 の各画素の濃度と比較することにより(比較手段4
4)、2値画像A1 を求める。この2値画像A1 は、微
分画像A0 (信号a5 )の画素濃度がTH3以上の領域
が例えば“1”に、それ以外の領域が例えば“0”にな
った画像であり、本当の欠陥の領域だけでなくノイズに
より欠陥と判定された領域も含むものである。
In the binarization processing means 42, this differential image A
The third threshold TH3 determined for each pixel of 0 is set to the differential image A
By comparing with the density of each pixel of 0 (comparing means 4
4) Obtain the binary image A 1 . This binary image A 1 is an image in which the area of the differential image A 0 (signal a 5 ) in which the pixel density is TH3 or more is, for example, “1”, and the other area is, for example, “0”. It includes not only the defective area but also the area determined to be defective due to noise.

【0024】この2値化処理手段42の作用を図5によ
ってさらに説明する。図5の(A)は全体の閾値TH1
に対し、注目画素近傍の濃度平均値TH2を重ねて表し
たものであり、両者の差(TH1−TH2)を示す。図
5の(B)はTH1からこの差に定数kを掛けた曲線k
(TH1−TH2)を減算して得たTH3を示す。図5
の(C)は微分画像A0 とこの第3の閾値TH3との関
係を示すものである。
The operation of the binarization processing means 42 will be further described with reference to FIG. FIG. 5A shows the overall threshold TH1.
On the other hand, the density average value TH2 in the vicinity of the pixel of interest is shown in an overlapping manner, and the difference between them (TH1−TH2) is shown. FIG. 5B shows a curve k obtained by multiplying this difference from TH1 by a constant k.
The TH3 obtained by subtracting (TH1-TH2) is shown. Figure 5
(C) shows the relationship between the differential image A 0 and this third threshold value TH3.

【0025】この(C)から明らかなように、微分画像
0 を2値化する第3の閾値TH3は、画像濃度の大局
的な変化に追従して変動し、微分画像A0 の微少な濃度
変化も取り出すことができる。なおここに用いる定数k
は、0に近いほどTH1の影響が大きく、1に近いほど
TH2の影響が大きくなる。従って地合いの汚い工程で
はkを0に近く、地合いのきれいな工程ではkを1に近
く設定するなどのように、工程・対象部材に応じてこの
2値化処理を変えることが可能である。
As is apparent from (C), the third threshold value TH3 for binarizing the differential image A 0 changes in accordance with the global change in the image density, and the differential image A 0 has a small amount. The change in concentration can also be taken out. The constant k used here
Is closer to 0, the effect of TH1 is greater, and the closer to 1, the effect of TH2 is greater. Therefore, it is possible to change this binarization processing depending on the process and target member, such as setting k close to 0 in a process with a dirty formation and k close to 1 in a process with a beautiful formation.

【0026】[0026]

【垂直収縮処理】図2において46は垂直収縮処理手段
である。この手段46は2値画像A1 を垂直方向、すな
わち副走査方向(検査対象10の送り方向)に収縮し、
縦方向の線状欠陥の形状を損なうことなく欠陥部分と背
景ノイズとの連結を除去するものである。
[Vertical Shrinkage Processing] In FIG. 2, reference numeral 46 is a vertical shrinkage processing means. This means 46 contracts the binary image A 1 in the vertical direction, that is, the sub-scanning direction (the feeding direction of the inspection object 10),
The connection between the defective portion and the background noise is removed without impairing the shape of the linear defect in the vertical direction.

【0027】図6はこの手段46のアルゴリズムを説明
する図、図7はその処理の前後の画像を示す図である。
この処理では、処理対象画素X0 の上下2近傍画素X
1 、X2 の値を用いて、処理後の画素X0 ′を、X0
1 、X2 のいずれかが0の時には0に、全てが1の時
に1にする。ここで“1”は欠陥がある画素を、“0”
は背景となる画素とする。この処理を全ての画素に対し
てラスタ走査順に行う。この結果図7に示すように縦方
向に連続する領域のみが残り、横方向にのびる領域や点
状のノイズが消去される。
FIG. 6 is a diagram for explaining the algorithm of this means 46, and FIG. 7 is a diagram showing images before and after the processing.
In this processing, the upper and lower two neighboring pixels X of the processing target pixel X 0 are
Using the values of 1 and X 2 , the processed pixel X 0 ′ is converted into X 0 ,
Set to 0 when either X 1 or X 2 is 0, and set to 1 when all are 1. Here, "1" indicates a defective pixel and "0"
Is a background pixel. This process is performed for all pixels in raster scan order. As a result, as shown in FIG. 7, only the vertically continuous region remains, and the horizontally extended region and dot noise are erased.

【0028】なおこの垂直収縮処理は、前記2値化処理
手段のkの値が0に近い場合や欠陥が縦方向だけでなく
横方向にも多く発生する場合には省いてもよい。また以
上の説明では縦方向に連続する欠陥を残すものとしてい
るが、横方向(主走査方向)に連続する欠陥を残す場合
には図6の上下2近傍X1 、X2 に代えて、左右2近傍
の画素を用いて同様な処理を行えばよい。
The vertical contraction processing may be omitted when the value of k of the binarization processing means is close to 0 or when many defects occur not only in the vertical direction but also in the horizontal direction. Further, in the above description, it is assumed that defects that are continuous in the vertical direction are left, but when defects that are continuous in the horizontal direction (main scanning direction) are left, the left and right sides of the upper and lower two neighborhoods X 1 and X 2 in FIG. Similar processing may be performed using pixels in the vicinity of two.

【0029】[0029]

【欠陥領域抽出手段】図1、2において48は欠陥領域
抽出手段である。この手段48は、2値化処理で得られ
た2値画像A1 から、前記欠陥アドレス検出手段40で
得た欠陥のアドレスAdが含まれる連続領域を抽出す
る。そして2値画像A1 のうち、このアドレスAdが含
まれていない領域は欠陥でないとして除去するものであ
る。
[Defective Area Extracting Means] In FIGS. 1 and 2, reference numeral 48 is a defective area extracting means. This means 48 extracts a continuous area containing the address Ad of the defect obtained by the defect address detecting means 40 from the binary image A 1 obtained by the binarization process. Then, the area of the binary image A 1 which does not include the address Ad is removed because it is not a defect.

【0030】図8はこの処理のアルゴリズム説明図、図
9はこの処理の前後の画像を示す図である。この処理は
次のように行われる。まず欠陥アドレス検出手段40に
より欠陥アドレスAdで指定された画素、すなわち欠陥
信号が発生した画素(欠陥画素)を着目点とし、 この着目点の座標を記録し、対応する画素にラベルを
付ける。 図8に示した探索順に2値画像A1 内の欠陥画素でか
つまだラベルが付いていない画素を見つける。 見つかったら着目点をその画素に移し、へ戻る。 見つからなかったら着目点を一つ前の着目点に戻し、
へ戻る。
FIG. 8 is a diagram for explaining the algorithm of this process, and FIG. 9 is a diagram showing images before and after this process. This process is performed as follows. First, the pixel designated by the defect address Ad by the defect address detecting means 40, that is, the pixel (defective pixel) in which the defect signal is generated is set as a point of interest, the coordinates of this point of interest are recorded, and the corresponding pixel is labeled. A defective pixel in the binary image A 1 which is not yet labeled is found in the search order shown in FIG. When found, the point of interest is moved to the pixel and the process returns to. If not found, return the point of interest to the previous point of interest,
Return to.

【0031】〜の手順を、領域中にラベルが付いて
いない画素が見つからなくなるまで繰り返す。この処理
を、すでにラベル付けされた領域以外の領域のアドレス
(Ad)による欠陥信号全てについて行う。この結果2
値画像A1 の複数の領域のうち、欠陥信号を含む全ての
領域を抽出し、他の領域を除去することができる(図
9)。
The procedure from to is repeated until no unlabeled pixels are found in the area. This process is performed for all defective signals due to the address (Ad) of the area other than the already labeled area. This result 2
Of the plurality of areas of the value image A 1 , all the areas including the defect signal can be extracted and the other areas can be removed (FIG. 9).

【0032】[0032]

【形状補正】次にこのように抽出した欠陥を含む領域に
対して、形状補正手段50(図2)による形状補正処理
が施される。この処理は、抽出した領域を後記するよう
に欠陥形状や種類、等級などを認識する際に、処理をし
易くし、認識精度を向上させるために行うものであり、
欠陥領域抽出手段48の出力形式によってはこの手段5
0による処理を省いてもよい。
[Shape Correction] Next, shape correction processing is performed by the shape correction means 50 (FIG. 2) on the region including the defect thus extracted. This process is performed in order to facilitate the process and improve the recognition accuracy when recognizing the defect shape, type, grade, etc. as described later on the extracted area.
Depending on the output format of the defect area extraction means 48, this means 5
The processing by 0 may be omitted.

【0033】この形状補正手段50は、図2に示すよう
に膨張処理52と、穴埋め処理54と、収縮処理56と
を含む。図10、11、12はそれぞれ膨張処理52、
穴埋め処理54、収縮処理56のアルゴリズムの説明
図、図13はこれら各処理による画像の変化を示す図で
ある。
The shape correction means 50 includes an expansion process 52, a filling process 54, and a contraction process 56 as shown in FIG. 10, 11 and 12 show expansion processing 52,
FIGS. 13A and 13B are explanatory diagrams of algorithms of the hole filling process 54 and the contraction process 56, and FIGS.

【0034】[0034]

【膨張処理】膨張処理52は、断片化された近接する複
数の欠陥領域を連続させたり、途切れた輪郭を連結させ
るものである。すなわち図10に示すように、処理対象
画素X0 を中心とする例えば8近傍の画素X1 〜X8
の関係から、処理後の画素X0 ′を、X0 〜X8 のいず
れかが1の時に1に、X1 〜X8 の全てが0の時に0に
変換する。
[Expansion process] The expansion process 52 is for continuing a plurality of fragmented adjacent defect regions and for connecting discontinuous contours. That is, as shown in FIG. 10, the relationship between the target pixel X 0 pixel X 1 to X 8 for example of eight neighbors around the, after processing the pixels X 0 ', one of X 0 to X 8 is When it is 1, it is converted to 1, and when all of X 1 to X 8 are 0, it is converted to 0.

【0035】なおここで“1”は欠陥がある画素を、
“0”は背景となる画素とする。この処理を各画素ごと
にラスタ走査順に繰り返す。この処理は連続して2回繰
り返すのが望ましい。この結果図13(A)に示す処理
前の画像を(B)に示すように1つの連続した領域にま
とめることができる。
Here, "1" indicates a defective pixel,
“0” is a background pixel. This process is repeated for each pixel in raster scan order. It is desirable to repeat this process twice consecutively. As a result, the unprocessed image shown in FIG. 13A can be combined into one continuous area as shown in FIG. 13B.

【0036】[0036]

【穴埋め処理】穴埋め処理54は、図13の(B)に示
すように画像に穴がある場合に、この穴を埋めるもので
ある。すなわち図11に示すように、背景と同じ“0”
の画素で形成され画像の縁に連続しない領域を穴の領域
と判定し、この穴の領域を欠陥と同じ“1”の画素に変
えるものである。この処理により図13の(B)に示す
穴は(C)に示すように埋められる。
[Blank Filling Process] The hole filling process 54 fills a hole in an image when the hole is present in the image as shown in FIG. That is, as shown in FIG. 11, the same "0" as the background
The area formed by the pixels of # 1 and # 2 that is not continuous with the edge of the image is determined as a hole area, and this hole area is changed to the pixel of "1" which is the same as the defect. By this processing, the hole shown in FIG. 13B is filled in as shown in FIG.

【0037】[0037]

【収縮処理】収縮処理56は膨張処理52によって膨張
し肥大化した欠陥の画像を元の大きさに戻すものであ
る。この処理のアルゴリズムは、図12に示すように処
理対象画素X0 を中心とする例えば8近傍の画素X1
8 との関係から、処理後の画素X0 ′を、X0 〜X8
のいずれかが0の時に0とし、X0 〜X8 の全てが1の
時に1とする変換を行うものである。
[Shrinking Process] The shrinking process 56 is to restore the image of the defect expanded and enlarged by the expansion process 52 to the original size. The algorithm of the processing is centered on the target pixel X 0 as shown in FIG. 12, for example eight neighboring pixels X 1 ~
From the relationship with X 8 , the processed pixel X 0 ′ is converted into X 0 to X 8
Is converted to 0 when any one of them is 0, and is converted to 1 when all of X 0 to X 8 are 1.

【0038】ここに“1”は欠陥のある画素を、“0”
は背景となる画素を示す。この処理を各画素ごとにラス
タ走査順に繰り返す。この処理は前記膨張処理52の繰
り返し回数と同回数すなわち2回繰り返す。この結果図
13の(D)のように、形状補正された欠陥を含む領域
(欠陥領域)だけが抽出された画像(欠陥画像A2 )が
出力される。
Here, "1" indicates a defective pixel and "0".
Indicates a background pixel. This process is repeated for each pixel in raster scan order. This process is repeated the same number of times as the expansion process 52, that is, twice. As a result, as shown in (D) of FIG. 13, an image (defect image A 2 ) in which only an area (defect area) including a shape-corrected defect is extracted is output.

【0039】以上のように欠陥領域だけが抽出された画
像A2 は、画像計測処理手段58に入力され、領域分割
処理60によって欠陥ごとに領域分割され、さらに特徴
量計測処理62によって分割されたそれぞれの欠陥の特
徴量が求められる。
The image A 2 in which only the defective area is extracted as described above is input to the image measuring processing means 58, divided into areas by the area dividing processing 60, and further divided by the characteristic amount measuring processing 62. The feature amount of each defect is obtained.

【0040】領域分割処理60は、例えば欠陥画像A2
のx軸方向およびy軸方向へ投影された周辺分布情報を
用いて欠陥領域の分布を調べることにより、複数の欠陥
領域を分割する。
The area division processing 60 is performed by, for example, the defect image A 2
A plurality of defect areas are divided by examining the distribution of the defect areas by using the peripheral distribution information projected in the x-axis direction and the y-axis direction.

【0041】特徴量計測処理62は、分割された欠陥領
域ごとの面積、長さ、幅、方向、濃度平均値、極性(正
または負)等の特徴量を求める。ここに濃度平均値は欠
陥領域をマスク画像としてこれに対応する原画像の領域
を抜き出し、その濃度を求めることにより算出する。
The characteristic amount measuring process 62 obtains the characteristic amount such as area, length, width, direction, density average value, polarity (positive or negative) for each of the divided defect areas. The density average value is calculated by extracting the area of the original image corresponding to the defective area as a mask image and calculating the density.

【0042】[0042]

【画像認識処理】このように欠陥の特徴量が求められる
と、次に画像認識処理手段64においてこの欠陥の形状
を求め、その欠陥の等級を判別して最終的に欠陥に対す
る総合判定を下す。
[Image recognition processing] When the feature amount of the defect is obtained in this way, the shape of the defect is then obtained in the image recognition processing means 64, the grade of the defect is discriminated, and finally a comprehensive judgment is made for the defect.

【0043】欠陥の形状は形状認識処理66により行わ
れる。この処理66は、例えばニューラルネットワーク
による認識法により欠陥形状の大分類を行い、さらに決
定木による認識法により欠陥形状ごとに細分類を行うよ
うに、2段階に処理する。
The shape of the defect is determined by the shape recognition processing 66. This process 66 is performed in two steps such that the defect shape is roughly classified by a recognition method using a neural network, and the defect shape is finely classified by the recognition method using a decision tree.

【0044】ここにニューラルネットワークは、例えば
「面積」と「幅/長さ」の2つの特徴量を入力とし、2
次元特徴空間上で3つの識別平面により点・面・線の3
つのカテゴリーの分類を行う。従ってこの場合のニュー
ラルネットワークは、入力層、中間層、出力層の3層構
造として、入力層のユニット数を特徴量すなわち特徴空
間の次元数2とし、中間層のユニット数を識別平面の数
3とし、出力層のユニット数を点・線・面のカテゴリー
数3とすることができる。
Here, the neural network receives two feature quantities, for example, "area" and "width / length", as input.
3 points, 3 faces, and 3 lines by 3 identification planes in the dimensional feature space
Classify into one category. Therefore, the neural network in this case has a three-layer structure of an input layer, an intermediate layer, and an output layer, the number of units in the input layer is the feature quantity, that is, the dimension number of the feature space is 2, and the number of units in the intermediate layer is 3 in the identification plane. And the number of units in the output layer can be set to 3 categories of dots, lines, and planes.

【0045】決定木を用いる方法では、ニューラルネッ
トワークにより求めた欠陥形状ごとに判断ツリーを作成
し、このツリーの各ノードに予め設定されている閾値と
特徴量とを比較し、その結果に基づいて進路を選択して
ゆき、終端に着いたらそこに対応するカテゴリーを分類
結果とする。
In the method using the decision tree, a decision tree is created for each defect shape obtained by the neural network, the threshold value preset in each node of this tree is compared with the feature quantity, and based on the result. When the route is selected and the end is reached, the category corresponding to that is taken as the classification result.

【0046】欠陥の等級は等級認識処理68により行わ
れる。この処理68は、例えば欠陥の「面積」、「濃度
平均値」の2つの特徴量を用い、ニューラルネットワー
クを用いて欠陥の等級を軽、中、重の3つのレベルに分
けることができる。
Defect grading is performed by a grade recognition process 68. In this processing 68, for example, two feature quantities of the "area" and "density average value" of the defect are used, and the class of the defect can be divided into three levels of light, medium and heavy by using a neural network.

【0047】このようにして欠陥の形状、等級が判定さ
れると、次に総合判定処理70により総合判定される。
この時複数の欠陥の形状が全て同一カテゴリーであれば
その旨の情報が付加される。さらに同一形状の欠陥が複
数ある場合には、その等級をそれぞれの単一の欠陥に対
する等級より高くすることにより、欠陥個数の影響を加
味するようにしてもよい。
When the shape and the grade of the defect are determined in this way, the comprehensive determination processing 70 then makes a comprehensive determination.
At this time, if the shapes of a plurality of defects are all in the same category, information to that effect is added. Further, when there are a plurality of defects having the same shape, the grade may be set higher than the grade for each single defect, so that the influence of the number of defects may be taken into consideration.

【0048】[0048]

【発明の効果】請求項1の発明は以上のように、欠陥ア
ドレス検出手段(40)によって欠陥のアドレス(A
d)を求める一方、微分画像全体の濃度分布から決まる
第1の閾値TH1と注目画素の近傍領域の濃度平均値か
ら得られる第2の閾値TH2とを用いて各注目画素ごと
に第3の閾値TH3を求め、この第3の閾値TH3を用
いて微分画像を2値化する(2値化処理手段42)。そ
してこの2値化した画像(2値画像A1 )から得た領域
のうち、前記欠陥アドレス(Ad)を含む領域のみを抽
出して(領域抽出手段48)欠陥を示す値に塗り潰すも
のである。
As described above, according to the invention of claim 1, the defective address (A) is detected by the defective address detecting means (40).
While obtaining d), a third threshold value for each target pixel is obtained using the first threshold value TH1 determined from the density distribution of the entire differential image and the second threshold value TH2 obtained from the average density value of the neighboring region of the target pixel. TH3 is obtained, and the differential image is binarized using the third threshold TH3 (binarization processing means 42). Then, of the regions obtained from this binarized image (binary image A 1 ), only the region containing the defect address (Ad) is extracted (region extraction means 48) and filled to a value indicating a defect. is there.

【0049】このため欠陥を無人で検出し、この欠陥を
含む欠陥領域の形状や大きさなどを明確にすることがで
きる。この結果その抽出した欠陥画像(A2 )を用いて
欠陥の等級などを高精度に判定するのに適する。
Therefore, the defect can be detected unattended, and the shape and size of the defect area including the defect can be clarified. As a result, the defect image (A 2 ) thus extracted is suitable for highly accurately determining the grade of the defect and the like.

【0050】ここに第3の閾値TH3は TH3=TH1−k(TH1−TH2) により求めることができる(請求項2)。この場合、定
数kを検査対象の状態や特性に対応して変えることによ
り、一層高精度な抽出が可能になる。
Here, the third threshold value TH3 can be obtained by TH3 = TH1-k (TH1-TH2) (claim 2). In this case, by changing the constant k in accordance with the state and characteristics of the inspection target, it is possible to perform extraction with higher accuracy.

【0051】なお2値化処理手段(42)の次に、この
2値化した画像(A1 )を垂直方向(走査方向または副
走査方向)に収縮させる垂直収縮手段(46)を介在さ
せれば、筋状の欠陥を検出する場合にこの垂直方向に直
交する方向の欠陥や点状の欠陥を除去して、目的とする
筋状の欠陥を精度良く抽出できる(請求項3)。
After the binarization processing means (42), a vertical contraction means (46) for contracting the binarized image (A 1 ) in the vertical direction (scanning direction or sub-scanning direction) is interposed. For example, when a streak-like defect is detected, the defect in the direction orthogonal to the vertical direction or the dot-like defect can be removed, and the intended streak-like defect can be accurately extracted (claim 3).

【0052】さらに欠陥領域抽出手段(48)の出力で
ある欠陥画像(A2 )に対して、膨張、穴埋め、収縮な
どの処理を施せば、欠陥の形状は一層正確になり、それ
以後における形状認識などの処理に一層都合が良い(請
求項4)。
Further, if the defect image (A 2 ) output from the defect area extracting means (48) is subjected to processing such as expansion, hole filling, and contraction, the shape of the defect becomes more accurate, and the shape after that. This is more convenient for processing such as recognition (claim 4).

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

【図1】本発明の第1の実施例のブロック図FIG. 1 is a block diagram of a first embodiment of the present invention.

【図2】その一部の詳細ブロック図FIG. 2 is a detailed block diagram of a part thereof.

【図3】閾値TH1の決定法の一例の説明図FIG. 3 is an explanatory diagram of an example of a method of determining a threshold TH1.

【図4】閾値TH2の決定法の一例の説明図FIG. 4 is an explanatory diagram of an example of a method of determining a threshold TH2.

【図5】閾値TH3の説明図FIG. 5 is an explanatory diagram of a threshold TH3.

【図6】垂直収縮のアルゴリズム説明図FIG. 6 is an explanatory diagram of a vertical contraction algorithm.

【図7】垂直収縮の概念説明図FIG. 7 is a conceptual explanatory diagram of vertical contraction.

【図8】領域抽出のアルゴリズム説明図FIG. 8 is an explanatory diagram of a region extraction algorithm.

【図9】領域抽出処理説明図FIG. 9 is an explanatory diagram of region extraction processing

【図10】膨張処理のアルゴリズム説明図FIG. 10 is an explanatory diagram of an expansion processing algorithm.

【図11】穴埋め処理の説明図FIG. 11 is an explanatory diagram of a filling process.

【図12】収縮処理のアルゴリズム説明図FIG. 12 is an algorithm explanatory diagram of contraction processing.

【図13】欠陥画像の形状補正過程を示す図FIG. 13 is a diagram showing a process of correcting the shape of a defect image.

【符号の説明】[Explanation of symbols]

10 検査対象 38 微分フィルタ 40 欠陥アドレス検出手段 42 2値化処理手段 46 垂直収縮処理手段 48 欠陥領域抽出手段 50 形状補正手段 52 膨張処理 54 穴埋め処理 56 収縮処理 A0 微分画素 A1 2値画像 A2 欠陥画像10 inspection object 38 differential filter 40 defect address detection means 42 binarization processing means 46 vertical shrinkage processing means 48 defect area extraction means 50 shape correction means 52 expansion processing 54 hole filling processing 56 shrinkage processing A 0 differential pixel A 1 binary image A 2 defect image

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 検査対象を走査して得た画像信号を微分
フィルタを含む空間フィルタリング処理した微分画像を
用いて検査対象の欠陥を含む領域を抽出する欠陥検査装
置において、前記微分画像に基づいて前記欠陥のアドレ
スを求める欠陥アドレス検出手段と、前記微分画像の全
体の濃度分布から決まる第1の閾値(TH1)と注目画
素の近傍領域の濃度平均値から得られる第2の閾値(T
H2)とを用いて各注目画素ごとに得られる第3の閾値
(TH3)を用いて各注目画素を2値化する2値化処理
手段と、前記2値化処理手段で得られた領域のうち前記
欠陥のアドレスを含む領域の画素を全て欠陥を示す値に
塗り潰す欠陥領域抽出手段とを備えることを特徴とする
欠陥検査装置。
1. A defect inspection apparatus for extracting an area including a defect of an inspection object by using a differential image obtained by spatially filtering an image signal obtained by scanning an inspection object based on the differential image. Defect address detection means for obtaining the address of the defect, a first threshold value (TH1) determined from the entire density distribution of the differential image, and a second threshold value (T) obtained from the density average value in the region near the target pixel.
H2) and a binarization processing unit that binarizes each pixel of interest using a third threshold value (TH3) obtained for each pixel of interest, and a region obtained by the binarization processing unit. A defect inspection apparatus comprising: a defect area extraction unit that fills all pixels in an area including the address of the defect with a value indicating a defect.
【請求項2】 2値化処理手段は、第3の閾値TH3を
次式 TH3=TH1−k(TH1−TH2) (ただしkは定数) により求める請求項1の欠陥検査装置。
2. The defect inspection apparatus according to claim 1, wherein the binarization processing means obtains the third threshold value TH3 by the following expression TH3 = TH1-k (TH1-TH2) (where k is a constant).
【請求項3】 前記2値化処理手段の次に、この2値化
した画像を走査方向または副走査方向に収縮処理する垂
直収縮処理手段を設けた請求項1または2の欠陥検査装
置。
3. The defect inspection apparatus according to claim 1, further comprising a vertical contraction processing unit for contracting the binarized image in the scanning direction or the sub-scanning direction, after the binarization processing unit.
【請求項4】 欠陥領域抽出手段により抽出された欠陥
領域に対し、膨張処理、穴埋め処理、収縮処理の少くと
も1つの処理を施す形状補正手段を有する請求項1また
は2または3の欠陥検査装置。
4. The defect inspection apparatus according to claim 1, further comprising shape correction means for performing at least one of expansion processing, hole filling processing, and contraction processing on the defect area extracted by the defect area extraction means. ..
JP4103542A 1992-03-30 1992-03-30 Defect inspection device Pending JPH05280958A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP4103542A JPH05280958A (en) 1992-03-30 1992-03-30 Defect inspection device
EP93105276A EP0563897A1 (en) 1992-03-30 1993-03-30 Defect inspection system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4103542A JPH05280958A (en) 1992-03-30 1992-03-30 Defect inspection device

Publications (1)

Publication Number Publication Date
JPH05280958A true JPH05280958A (en) 1993-10-29

Family

ID=14356734

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4103542A Pending JPH05280958A (en) 1992-03-30 1992-03-30 Defect inspection device

Country Status (1)

Country Link
JP (1) JPH05280958A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6597805B1 (en) * 1998-11-27 2003-07-22 Nec Corporation Visual inspection method for electronic device, visual inspecting apparatus for electronic device, and record medium for recording program which causes computer to perform visual inspecting method for electronic device
US11341616B2 (en) * 2020-03-23 2022-05-24 Ge Precision Healthcare Methods and system for selective removal of streak artifacts and noise from images using deep neural networks

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6597805B1 (en) * 1998-11-27 2003-07-22 Nec Corporation Visual inspection method for electronic device, visual inspecting apparatus for electronic device, and record medium for recording program which causes computer to perform visual inspecting method for electronic device
US11341616B2 (en) * 2020-03-23 2022-05-24 Ge Precision Healthcare Methods and system for selective removal of streak artifacts and noise from images using deep neural networks

Similar Documents

Publication Publication Date Title
US6614924B1 (en) Adaptive mask technique for defect inspection
JP4416365B2 (en) Automatic detection of scanned documents
CN109377485A (en) A kind of instant noodles packaging defect machine vision detection method
CN113362326A (en) Method and device for detecting welding spot defects of battery
JPH05280960A (en) Defect inspection device
EP0563897A1 (en) Defect inspection system
CN115601359A (en) Welding seam detection method and device
EP0505729B1 (en) Image binarization system
JP3255562B2 (en) Surface inspection equipment
JPH05280959A (en) Defect inspecton device
CN117115095A (en) Method and system for detecting tiny defects of ceramic tiles with complex textures
JPH05280958A (en) Defect inspection device
JP4293653B2 (en) Appearance inspection method
JP3890844B2 (en) Appearance inspection method
JP2691794B2 (en) Defect inspection equipment
JP3367449B2 (en) Electronic component appearance inspection method, appearance inspection apparatus, and recording medium storing a program for causing a computer to execute the appearance inspection process
JPH08292158A (en) Method and apparatus for detecting wrinkle of sheet or the like
JPH0829145A (en) Inspection of surface defect
CN107092909B (en) Angle detection algorithm based on triangle correspondence theorem
JPH04157353A (en) Cracked image data processing method
JP2812619B2 (en) Image processing device
JP2710685B2 (en) Defect detection method by visual inspection
JP3715473B2 (en) Address reader
JP3523945B2 (en) Surface inspection method
JPH0319990B2 (en)