JP2011008482A - Defect detection method, defect detection device and defect detection program - Google Patents

Defect detection method, defect detection device and defect detection program Download PDF

Info

Publication number
JP2011008482A
JP2011008482A JP2009150740A JP2009150740A JP2011008482A JP 2011008482 A JP2011008482 A JP 2011008482A JP 2009150740 A JP2009150740 A JP 2009150740A JP 2009150740 A JP2009150740 A JP 2009150740A JP 2011008482 A JP2011008482 A JP 2011008482A
Authority
JP
Japan
Prior art keywords
defect
target pixel
inspection
comparison target
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
JP2009150740A
Other languages
Japanese (ja)
Inventor
Koichi Kojima
広一 小島
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2009150740A priority Critical patent/JP2011008482A/en
Publication of JP2011008482A publication Critical patent/JP2011008482A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide a defect detection method, a defect detection device and a defect detection program, for detecting a stripe defect with high accuracy.SOLUTION: The defect detection method includes: a defect enhancement processing step having an inspection pixel selection step of sequentially selecting a target pixel from an image obtained by imaging an object to be inspected, a comparison pixel group setting step of setting a comparison pixel group, a minimum luminance difference calculation step of obtaining a minimum luminance difference, and a defect enhancement value calculation step of obtaining a defect enhancement value; and a defect detection step having a defect candidate extraction step ST31 of extracting a defect candidate pixel from the defect enhancement value, a circumscribing quadrangle setting step ST33 of detecting an inspection circumscribing quadrangle that circumscribes a defect candidate pixel group, a dimensional ratio calculation step ST34 of calculating a dimensional ratio of a short side to a long side of the inspection circumscribing quadrangle, an area ratio calculation step ST35 of calculating an area ratio of the defect candidate pixel group to the inspection circumscribing quadrangle, and a defect specification step ST36 of specifying a stripe defect based on the dimensional ratio and the area ratio.

Description

本発明は、被検査物を撮像した画像を処理することで、被検査物のスジ状欠陥を検出する欠陥検出方法、欠陥検出装置、および欠陥検出プログラムに関する。   The present invention relates to a defect detection method, a defect detection apparatus, and a defect detection program for detecting a streak-like defect of an inspection object by processing an image obtained by imaging the inspection object.

従来、フレキシブルプリント基板の配線封止面の異物や傷の欠陥検出では、画像処理手法の一つであるフィルター処理を用いて欠陥検出を行っている(例えば特許文献1〜2参照)。   Conventionally, in the defect detection of foreign matters and scratches on the wiring sealing surface of a flexible printed circuit board, defect detection is performed using a filter process which is one of image processing techniques (see, for example, Patent Documents 1 and 2).

特許文献1に記載の検査方法では、検査物の撮像画像に対して、平滑化フィルターによりノイズを除去し、1次微分フィルターを用いることでスジ状のムラ欠陥を検出する。
また、特許文献2に記載の画像検査方法では、撮像画像に2次微分フィルターを適用した後に所定輝度閾値に対して二値化した画像、および透過画像を所定輝度閾値に対して二値化した画、またはこれらの二値化画像を合成した画像の2次特徴量を算出し、算出された2次特徴量から欠陥を検出する。
In the inspection method described in Patent Document 1, noise is removed from a captured image of an inspection object using a smoothing filter, and a streaky uneven defect is detected by using a primary differential filter.
In the image inspection method described in Patent Document 2, an image obtained by binarizing a predetermined luminance threshold after applying a second-order differential filter to a captured image and a binary image of a transmission image are binarized with respect to the predetermined luminance threshold. A secondary feature amount of the image or an image obtained by synthesizing these binarized images is calculated, and a defect is detected from the calculated secondary feature amount.

また、本出願人は、検査対象点と、その周囲に配置された複数の比較対象点との輝度値の差をそれぞれ求め、各輝度値差データのうち、値が最大のものを検査対象点の欠陥強調値とし、欠陥強調値に基づいて、欠陥候補を抽出する欠陥検出方法を提案している(特許文献3参照)。   In addition, the applicant obtains the difference in luminance value between the inspection target point and a plurality of comparison target points arranged around the inspection target point, and among the luminance value difference data, the one with the maximum value is the inspection target point. A defect detection method for extracting defect candidates based on the defect enhancement value is proposed (see Patent Document 3).

特開2006−189293号公報JP 2006-189293 A 特開2007−309679号公報JP 2007-309679 A 特開2007−285753号公報JP 2007-285753 A

しかしながら、上記特許文献1のような1次微分を用いた欠陥検出方法では、シミ状の欠陥まで検出されるため、スジ状欠陥のみを選択的に検出することが困難であるという問題がある。また、特許文献2の欠陥検出方法では、撮像画像を二値化処理した画像、および撮像画像に2次微分フィルターを適用した上で二値化処理した画像から欠陥検出を実施するが、2次微分フィルターを用いる場合、シェーディングの影響による誤検出のおそれがあり、欠陥検出精度が悪化する問題がある。
これに対し、本出願人が提案した特許文献3の欠陥検出方法では、直線状のスジ状欠陥を良好に検出することはできるが、欠陥内で角度が変化する場合、スジ状欠陥として検出されない場合があり、別途検出方法を設ける必要があるという問題がある。また、スジ状欠陥とシミ状欠陥との双方が検出されるため、これらを判別することが困難である。
However, the defect detection method using the first derivative as described in Patent Document 1 has a problem that it is difficult to selectively detect only a streak-like defect because even a spot-like defect is detected. Further, in the defect detection method of Patent Document 2, defect detection is performed from an image obtained by binarizing a captured image, and an image obtained by applying a secondary differential filter to the captured image and then binarizing the image. When the differential filter is used, there is a risk of erroneous detection due to the influence of shading, and there is a problem that the defect detection accuracy deteriorates.
On the other hand, in the defect detection method of Patent Document 3 proposed by the present applicant, a linear streak defect can be detected well, but when the angle changes within the defect, it is not detected as a streak defect. In some cases, it is necessary to provide a separate detection method. Also, since both streak-like defects and spot-like defects are detected, it is difficult to distinguish them.

本発明は、上記のような問題に鑑みて、スジ状欠陥を精度よく検出する欠陥検出方法、欠陥検出装置、および欠陥検出プログラムを提供することを目的とする。   In view of the above problems, an object of the present invention is to provide a defect detection method, a defect detection apparatus, and a defect detection program for accurately detecting streak defects.

本発明の欠陥検出方法は、被検査物を撮像した撮像画像に対して欠陥強調フィルターを用いて欠陥強調処理を行う欠陥強調処理工程と、前記欠陥強調処理工程で得られた各画素の欠陥強調値に基づいて欠陥を検出する欠陥検出工程と、を備え、前記欠陥強調処理工程は、前記撮像画像に対して、検査対象画素を順次選定する検査対象画素選定工程と、選定された検査対象画素の中心から所定距離離れた比較対象画素を検査対象画素の周囲に略円形状に複数配置し、これらの比較対象画素のうち前記検査対象画素を挟んで互いに点対称の位置に配置される一対の比較対象画素をセットとした比較対象画素群を複数設定する比較対象画素群設定工程と、比較対象画素群に含まれる各比較対象画素の輝度値と、前記検査対象画素の輝度値との差である輝度差データを求め、それらの輝度差データのうち、値が最小となる最小輝度差を比較対象画素群毎に求める最小輝度差算出工程と、比較対象画素群毎に算出された最小輝度差のうち、値が最大となる最小輝度差を前記検査対象画素の欠陥強調値とする欠陥強調値算出工程と、を有し、前記欠陥検出工程は、前記欠陥強調値が所定の欠陥閾値以上となる画素を欠陥候補画素として抽出する欠陥候補抽出工程と、互いに隣接する前記欠陥候補画素を欠陥候補画素群とし、この欠陥候補画素群に外接する外接長方形のうち、面積が最小となる外接長方形を検査外接四角形として設定する外接四角形設定工程と、前記欠陥候補画素の慣性軸方向に沿う前記検査外接四角形の長辺寸法、および前記慣性軸方向に直交する幅方向に沿う前記検査外接四角形の短辺寸法を計測するとともに、長辺寸法に対する短辺寸法の比である寸法比を算出する寸法比算出工程と、前記検査外接四角形に対する前記欠陥候補画素群の面積比を算出する面積比算出工程と、前記寸法比算出工程にて算出される寸法比が所定の寸法比閾値未満となる場合、または前記面積比算出工程にて算出される面積比が所定の面積比閾値未満となる場合に、前記欠陥候補画素群をスジ状欠陥として特定する欠陥特定工程と、を有することを特徴とする。   The defect detection method of the present invention includes a defect enhancement process step of performing defect enhancement processing on a captured image obtained by imaging an inspection object using a defect enhancement filter, and defect enhancement of each pixel obtained in the defect enhancement processing step. A defect detection step for detecting a defect based on a value, and the defect enhancement processing step includes: an inspection target pixel selection step for sequentially selecting inspection target pixels with respect to the captured image; and a selected inspection target pixel A plurality of comparison target pixels separated by a predetermined distance from the center of the pixel are arranged in a substantially circular shape around the inspection target pixel, and a pair of these comparison target pixels are arranged at point-symmetric positions with respect to the inspection target pixel. The comparison target pixel group setting step for setting a plurality of comparison target pixel groups with the comparison target pixel as a set, and the difference between the luminance value of each comparison target pixel included in the comparison target pixel group and the luminance value of the inspection target pixel Ah The luminance difference data is obtained, and among the luminance difference data, a minimum luminance difference calculation step for obtaining a minimum luminance difference with a minimum value for each comparison target pixel group, and a minimum luminance difference calculated for each comparison target pixel group. A defect enhancement value calculating step in which a minimum luminance difference having a maximum value is a defect enhancement value of the inspection target pixel, and the defect detection step has the defect enhancement value equal to or greater than a predetermined defect threshold value. A defect candidate extraction step of extracting pixels as defect candidate pixels, and the defect candidate pixels adjacent to each other as a defect candidate pixel group, and among circumscribed rectangles circumscribing the defect candidate pixel group, a circumscribed rectangle having the smallest area is inspected A circumscribed rectangle setting step for setting as a circumscribed rectangle, a long side dimension of the inspection circumscribed rectangle along the inertial axis direction of the defect candidate pixel, and the inspection circumscribed line along the width direction orthogonal to the inertial axis direction Measuring the short side dimension of the shape, calculating a ratio of the short side dimension to the long side dimension, and calculating an area ratio of the defect candidate pixel group to the inspection circumscribed rectangle When the calculation step and the dimensional ratio calculated in the dimensional ratio calculation step are less than a predetermined dimensional ratio threshold, or the area ratio calculated in the area ratio calculation step is less than a predetermined area ratio threshold And a defect specifying step of specifying the defect candidate pixel group as a streak-like defect.

本発明では、欠陥強調フィルターを用いた欠陥強調処理工程において、選定された検査対象画素と、その周囲に略円形状に複数配置される比較対象画素とを設定する。そして、比較対象画素を、前記検査対称画素を挟んで互いに点対称の位置に配置される一対の比較対称画素をセットとした複数の比較対象画素群に分け、これらの比較対象画素群に含まれる比較対象画素と検査対象画素との輝度差データのうち、値が最小となる最小輝度差を選択し、さらに、複数の比較対象画素群に対してそれぞれ選択された最小輝度差のうち、値が最大となる最小輝度差を前記検査対象画素の欠陥強調値としている。これにより、検査対象画素を含み、かつ、いずれかの比較対象画素群は含まない欠陥を検出できる。なお、本発明の欠陥強調フィルターとは、欠陥強調工程を実施する上でのアルゴリズムを示し、すなわち、検査対象画素選定工程、比較対象画素群設定工程、最小輝度算出工程、および欠陥強調値算出工程の各工程を、撮像画像の各画素に対して実施して、ある空間周波数の成分のみを強調値として選択的に残し、他の空間周波数の成分を抑える処理を指す。
このような欠陥強調処理工程では、検査対象画素部分に欠陥がなく、周囲の画素と輝度差が無い場合には、前記最小輝度差は非常に小さい値になる。また、検査対象画素に欠陥があっても、その欠陥がいずれかの比較対象画素部分まで広がっている場合には、その欠陥部分に含まれる検査対象画素および比較対象画素の輝度差は殆ど無いため、前記最小輝度差も非常に小さい値になる。一方、検査対象画素に欠陥が存在し、かつ、周囲のいずれかの比較対象画素群には欠陥が無い場合、検査対象画素の輝度値は、比較対称画素群のいずれの比較対象画素の輝度値とも差があるため、最小輝度差も比較的大きな値になる。これにより、いずれかの比較対象画素群の内側に納まる大きさの欠陥が存在する場合に、最小輝度差は比較的大きな値となり、欠陥が強調されることになる。
また、この時、前記複数の比較対象画素を、前記検査対象画素を挟んで互いに点対称の位置に配置された一対に比較対象画素を1セットとした複数の比較対象画素群に分けているので、スジ状欠陥も適切に検出できる。すなわち、比較対象画素を複数の比較対象画素群に分けない場合では、複数の比較対象画素の少なくとも一つと、検出対象画素とに重なるスジ状欠陥がある場合、そのスジ状欠陥上の各画素の輝度値の差は小さいため、前記最小輝度差も小さな値となり、欠陥を検出することができない。一方、本発明のように、略円形状に複数配置された比較対象画素を、複数の比較対象画素群に分け、各比較対象画素群毎に最小輝度差を算出している場合、各比較対象画素の位置が異なるため、一方の比較対象画素群の比較対象画素にスジ状欠陥が重なってそのスジ状欠陥を検出できなくても、他の比較対象画素群の比較対象画素は前記スジ状欠陥と重ならず、そのスジ状欠陥を検出できる。
In the present invention, in the defect enhancement processing step using the defect enhancement filter, the selected inspection target pixel and a plurality of comparison target pixels arranged in a substantially circular shape around the selected inspection target pixel are set. Then, the comparison target pixels are divided into a plurality of comparison target pixel groups that are a set of a pair of comparison symmetric pixels arranged at point-symmetric positions with respect to the inspection symmetric pixels, and are included in these comparison target pixel groups. From the luminance difference data between the comparison target pixel and the inspection target pixel, a minimum luminance difference having a minimum value is selected, and among the minimum luminance differences selected for each of the plurality of comparison target pixel groups, the value is The smallest minimum luminance difference is used as the defect enhancement value of the inspection target pixel. As a result, it is possible to detect a defect that includes the inspection target pixel and does not include any of the comparison target pixel groups. The defect emphasis filter of the present invention indicates an algorithm for performing the defect emphasis process, that is, an inspection target pixel selection process, a comparison target pixel group setting process, a minimum luminance calculation process, and a defect emphasis value calculation process. This process is performed for each pixel of the captured image, and only a certain spatial frequency component is selectively left as an emphasis value and other spatial frequency components are suppressed.
In such a defect emphasis processing step, when there is no defect in the pixel portion to be inspected and there is no luminance difference with surrounding pixels, the minimum luminance difference becomes a very small value. Further, even if the inspection target pixel has a defect, if the defect extends to any of the comparison target pixel portions, there is almost no luminance difference between the inspection target pixel and the comparison target pixel included in the defective portion. The minimum luminance difference is also a very small value. On the other hand, when the inspection target pixel has a defect and any of the surrounding comparison target pixel groups have no defect, the luminance value of the inspection target pixel is the luminance value of any comparison target pixel of the comparison symmetric pixel group. Therefore, the minimum luminance difference is a relatively large value. As a result, when there is a defect having a size that fits inside one of the comparison target pixel groups, the minimum luminance difference becomes a relatively large value, and the defect is emphasized.
Further, at this time, the plurality of comparison target pixels are divided into a plurality of comparison target pixel groups in which one set of comparison target pixels is arranged in a point-symmetrical position with respect to the inspection target pixel. Also, streak-like defects can be detected appropriately. That is, when the comparison target pixel is not divided into a plurality of comparison target pixel groups, and there is a streak defect that overlaps at least one of the plurality of comparison target pixels and the detection target pixel, each pixel on the streak defect Since the difference in luminance value is small, the minimum luminance difference is also a small value, and a defect cannot be detected. On the other hand, when the comparison target pixels arranged in a plurality of substantially circular shapes are divided into a plurality of comparison target pixel groups and the minimum luminance difference is calculated for each comparison target pixel group as in the present invention, Because the pixel positions are different, the comparison target pixel of one comparison target pixel group overlaps the comparison target pixel, and even if the streak defect cannot be detected, the comparison target pixel of the other comparison target pixel group is not the streak defect. The streak defect can be detected without overlapping.

以上により、上記欠陥強調値を用いることで、シミ状欠陥およびスジ状欠陥の両方の欠陥を強調でき、精度よく欠陥部分を抽出することができる。本発明では、さらに、欠陥検出工程において、上記のように検出される欠陥強調値に基づいて、欠陥候補画素をピックアップする。そして、互いに隣接する欠陥候補画素を欠陥候補画素群とし、これらの欠陥候補画素に外接する検査外接四角形に基づいて、寸法比および面積比をそれぞれ算出する。ここで、前記面積比が面積比閾値未満となる場合、または、寸法比が寸法比閾値未満となる場合に、スジ状欠陥として検出する。
すなわち、直線状のスジ状欠陥では、その慣性軸方向と検査外接四角形の長辺方向とが略一致するため、検査外接四角形の短辺寸法とスジ状欠陥の幅寸法とが略同一寸法となる。一方、シミ状欠陥では、幅寸法が大きくなるため、検査外接四角形の長辺寸法に対する短辺寸法の寸法比は1に近い値となる。これに対して、スジ状欠陥では、幅寸法が小さく、検査外接四角形の長辺に対する短辺の寸法比も小さく、例えば0に近い値となる。すなわち、寸法比閾値として、0に限りなく近い値を設定することで、細い略直線形状のスジ状欠陥を検出することができる。
また、スジ状欠陥では、直線状の欠陥に限らず、途中で角度が変化する折れ線状の欠陥や、曲線状の欠陥、環状の欠陥なども考えられるが、この場合、検査外接四角形の短辺長さ寸法も増大する。このようなスジ状欠陥に対しては、検査外接四角形に対する欠陥候補画素群の面積比を用いる。すなわち、シミ状の欠陥では、検査外接四角形に対する欠陥候補画素群の面積比が大きく、1に近い値となる。これに対して、スジ状欠陥は線状であり、面積が小さいため、面積比が0に近い値となる。したがって、面積比が面積比閾値より小さい欠陥候補画素群をスジ状欠陥として検出することができる。これにより、シミ状欠陥およびスジ状欠陥が混在する欠陥候補画素群からスジ状欠陥のみを良好に検出することができる。
As described above, by using the defect emphasis value, it is possible to emphasize both a spot-like defect and a streak-like defect, and a defect portion can be extracted with high accuracy. In the present invention, in the defect detection step, defect candidate pixels are picked up based on the defect enhancement value detected as described above. Then, defect candidate pixels adjacent to each other are defined as a defect candidate pixel group, and the size ratio and the area ratio are calculated based on the inspection circumscribed rectangle circumscribing these defect candidate pixels. Here, when the area ratio is less than the area ratio threshold, or when the dimension ratio is less than the dimension ratio threshold, it is detected as a streak defect.
That is, in the straight streak-like defect, the inertial axis direction and the long side direction of the inspection circumscribed rectangle substantially coincide with each other, so that the short side dimension of the inspection circumscribed rectangle and the width dimension of the streak defect are substantially the same dimension. . On the other hand, in the case of a spot-like defect, since the width dimension becomes large, the dimension ratio of the short side dimension to the long side dimension of the inspection circumscribed rectangle becomes a value close to 1. On the other hand, in the stripe defect, the width dimension is small, and the dimensional ratio of the short side to the long side of the inspection circumscribed rectangle is also small, for example, a value close to 0. That is, by setting a value close to 0 as the dimension ratio threshold value, it is possible to detect a thin, substantially linear stripe-like defect.
In addition, the streak defect is not limited to a straight defect, but a broken line defect, a curved defect, an annular defect, or the like whose angle changes in the middle is also conceivable. In this case, the short side of the inspection circumscribed rectangle The length dimension also increases. For such streak defects, the area ratio of the defect candidate pixel group to the inspection circumscribed rectangle is used. That is, in the case of a spot-like defect, the area ratio of the defect candidate pixel group to the inspection circumscribed rectangle is large and is a value close to 1. On the other hand, the streak-like defect is linear and has a small area, so that the area ratio is close to zero. Therefore, a defect candidate pixel group whose area ratio is smaller than the area ratio threshold can be detected as a streak defect. As a result, only the streak defect can be detected well from the defect candidate pixel group in which the spot-like defect and the streak defect are mixed.

本発明の欠陥検出方法では、前記最小輝度差算出工程は、前記検査対象画素の輝度値から、比較対象画素群に含まれる各比較対象画素の輝度値を減算した明欠陥輝度差データから明欠陥最小輝度差を算出する明欠陥最小輝度差算出工程、および比較対象画素群に含まれる各比較対象画素の輝度値から、前記検査対象画素の輝度値を減算した暗欠陥輝度差データから暗欠陥最小輝度差を算出する暗欠陥最小輝度差算出工程と、を備え、前記欠陥強調値算出工程は、前記明欠陥最小輝度差および前記暗欠陥最小輝度差に基づいて、明欠陥強調値および暗欠陥強調値をそれぞれ求め、前記欠陥検出工程は、前記明欠陥強調値および前記暗欠陥強調値に基づいて、スジ状明欠陥およびスジ状暗欠陥をそれぞれ検出することが好ましい。   In the defect detection method of the present invention, the minimum luminance difference calculation step includes a light defect from light defect luminance difference data obtained by subtracting the luminance value of each comparison target pixel included in the comparison target pixel group from the luminance value of the inspection target pixel. Bright defect minimum brightness difference calculating step for calculating a minimum brightness difference, and dark defect minimum from dark defect brightness difference data obtained by subtracting the brightness value of the inspection target pixel from the brightness value of each comparison target pixel included in the comparison target pixel group A dark defect minimum luminance difference calculation step for calculating a luminance difference, and the defect enhancement value calculation step includes a bright defect enhancement value and a dark defect enhancement based on the bright defect minimum luminance difference and the dark defect minimum luminance difference. It is preferable that a value is obtained, and the defect detection step detects a streak-like bright defect and a streak-like dark defect based on the bright defect enhancement value and the dark defect enhancement value, respectively.

この発明では、最小輝度差算出工程は、検査対象画素の輝度値から比較対象画素の輝度値を減算した輝度値データの最小値である明欠陥最小輝度差、および比較対象画素の輝度値から検査対象画素の輝度値を減算した輝度値データの最小値である暗欠陥最小輝度差を求め、これらの明欠陥最小輝度差および暗欠陥最小輝度差のそれぞれに対して、その後の工程を実施する。
最小輝度差を算出する際に、検査対象画素の輝度値から比較対象画素の輝度値を引いた値のみを用いる場合、暗欠陥を検出することができず、また、比較対象画素の輝度値から検査対象画素の輝度値を引いた値のみを用いる場合では、明欠陥を検出することができない。一方、検査対象画素の輝度値と比較対象画素の輝度値の差分の絶対値を用いて欠陥強調値を求める方法も考えられるが、この場合、明欠陥と暗欠陥との判別が困難であり、例えば明欠陥のみを検出したい場合や、暗欠陥のみを検出したい場合に、これらを判別するための別工程を設ける必要がある。これに対して、本発明では、最小輝度差算出工程において、明欠陥最小輝度差および暗欠陥最小輝度差をそれぞれ算出し、これらの明欠陥最小輝度差、および暗欠陥最小輝度差に対して、前記欠陥強調値算出工程および前記欠陥検出工程を実施することで、明欠陥と暗欠陥とを明確に分けて検出することができる。したがって、明欠陥および暗欠陥のうちいずれか一方のみを選択的に検出したい場合でも、容易に欠陥検出処理を実施することができる。
In the present invention, the minimum luminance difference calculation step inspects the bright defect minimum luminance difference, which is the minimum value of the luminance value data obtained by subtracting the luminance value of the comparison target pixel from the luminance value of the inspection target pixel, and the luminance value of the comparison target pixel. A dark defect minimum luminance difference, which is the minimum value of the luminance value data obtained by subtracting the luminance value of the target pixel, is obtained, and the subsequent steps are performed for each of the light defect minimum luminance difference and the dark defect minimum luminance difference.
When only the value obtained by subtracting the luminance value of the comparison target pixel from the luminance value of the inspection target pixel is used when calculating the minimum luminance difference, a dark defect cannot be detected, and from the luminance value of the comparison target pixel When only the value obtained by subtracting the luminance value of the pixel to be inspected is used, a bright defect cannot be detected. On the other hand, although a method of obtaining a defect enhancement value using the absolute value of the difference between the luminance value of the inspection target pixel and the luminance value of the comparison target pixel is also conceivable, in this case, it is difficult to distinguish between a bright defect and a dark defect, For example, when it is desired to detect only bright defects or only dark defects, it is necessary to provide a separate process for discriminating these. On the other hand, in the present invention, in the minimum luminance difference calculating step, the light defect minimum luminance difference and the dark defect minimum luminance difference are calculated, respectively, and for these light defect minimum luminance difference and dark defect minimum luminance difference, By performing the defect emphasis value calculation step and the defect detection step, it is possible to clearly detect bright defects and dark defects. Therefore, even when it is desired to selectively detect only one of the bright defect and the dark defect, the defect detection process can be easily performed.

本発明の欠陥検出方法では、前記欠陥強調処理工程は、検査対象画素から比較対象画素までの距離が異なる複数の欠陥強調フィルターを用いて欠陥強調処理を実施することが好ましい。   In the defect detection method of the present invention, it is preferable that the defect enhancement processing step performs the defect enhancement processing using a plurality of defect enhancement filters having different distances from the inspection target pixel to the comparison target pixel.

この発明では、比較画素設定工程において、前記検査対象画素から所定画素離れて略円形状に配置される前記比較対象画素を設定する。このような方法では、検査対象画素から比較対象画素までの距離が異なる複数の欠陥強調フィルターが用いられるため、様々なサイズのスジ状欠陥を検出することが可能となる。また、検査対象画素と比較対象画素との距離を変えて設定した複数の欠陥強調フィルターに基づいて強調され、検出されたスジ状欠陥を合成することで、各サイズのスジ状欠陥を例えば1つの欠陥検出結果画像にまとめて表示させるなどすることができる。また、より多くの比較対象画素に対する欠陥強調値が算出されるため、より精度よく欠陥を抽出することができ、欠陥検出の信頼性を一層高めることができる。   In the present invention, in the comparison pixel setting step, the comparison target pixel that is arranged in a substantially circular shape is set apart from the inspection target pixel by a predetermined pixel. In such a method, since a plurality of defect emphasis filters having different distances from the inspection target pixel to the comparison target pixel are used, it is possible to detect stripe-shaped defects of various sizes. In addition, by synthesizing the detected streak defects based on a plurality of defect emphasis filters set by changing the distance between the inspection target pixel and the comparison target pixel, each size streak defect is, for example, one A defect detection result image can be displayed together. In addition, since the defect emphasis value for a larger number of comparison target pixels is calculated, it is possible to extract a defect with higher accuracy and further improve the reliability of defect detection.

本発明の欠陥検出方法では、前記欠陥強調処理工程は、前記欠陥検出工程により検出する前記スジ状欠陥の幅寸法に応じて、前記検査対象画素から前記比較対象画素までの距離が設定された欠陥強調フィルターを用いて前記欠陥強調処理を実施することが好ましい。   In the defect detection method of the present invention, the defect emphasis processing step is a defect in which a distance from the inspection target pixel to the comparison target pixel is set according to a width dimension of the streak defect detected by the defect detection step. It is preferable that the defect enhancement process is performed using an enhancement filter.

この発明では、欠陥として検出するスジ状欠陥の幅寸法に応じて検査対象画素から比較対象画素までの距離が設定された欠陥強調フィルターを用いて、欠陥強調処理を行う。
すなわち、検査対象画素から比較対象画素までの距離が所定距離(比較画素選択距離)に設定された欠陥強調フィルターを用い、この比較対象画素を選択した場合、比較画素選択距離の2倍、すなわち、検査対象画素を挟んで相対する比較対象画素間の距離よりも大きい線幅のスジ状欠陥は検出せず、この比較対象画素間の距離より小さいスジ状欠陥を検出する。したがって、検出対象となるスジ状欠陥の線幅に応じて比較画素選択距離を設定した欠陥強調フィルターを用いて欠陥強調処理を行うことで、所望の線幅のスジ状欠陥を精度よく検出することができる。
In the present invention, the defect enhancement process is performed using a defect enhancement filter in which the distance from the inspection target pixel to the comparison target pixel is set in accordance with the width dimension of the streak defect detected as a defect.
That is, when the comparison target pixel is selected using a defect enhancement filter in which the distance from the inspection target pixel to the comparison target pixel is set to a predetermined distance (comparison pixel selection distance), that is, twice the comparison pixel selection distance, A streak defect having a line width larger than the distance between the comparison target pixels facing each other across the inspection target pixel is not detected, and a streak defect smaller than the distance between the comparison target pixels is detected. Therefore, by performing defect emphasis processing using a defect emphasis filter in which a comparison pixel selection distance is set according to the line width of the line-shaped defect to be detected, it is possible to accurately detect a line-shaped defect having a desired line width. Can do.

また、この時、前記欠陥強調処理工程は、前記検査対象画素から前記比較対象画素までの距離が、前記欠陥検出工程により検出する前記スジ状欠陥の幅寸法に対して所定画素分大きい距離となる欠陥強調フィルターを用いて前記欠陥強調処理を実施することが好ましい。   At this time, in the defect enhancement processing step, the distance from the inspection target pixel to the comparison target pixel is a distance larger by a predetermined pixel than the width dimension of the streak defect detected by the defect detection step. It is preferable to carry out the defect enhancement process using a defect enhancement filter.

この発明では、比較画素選択距離が、検出したスジ状欠陥の線幅よりも、例えば2〜3画素分だけ大きく設定された欠陥強調フィルターを用いることが好ましい。このような欠陥強調フィルターを用いることで、目的とする線幅のスジ状欠陥の検出漏れや過検出を防止でき、精度の高い欠陥検出を実施することができる。   In the present invention, it is preferable to use a defect enhancement filter in which the comparison pixel selection distance is set to be, for example, 2 to 3 pixels larger than the detected line width of the streak-like defect. By using such a defect emphasis filter, it is possible to prevent a detection defect or overdetection of a streak-like defect having a target line width, and to perform highly accurate defect detection.

本発明の欠陥検出装置は、被検査物を撮像した撮像画像に対して欠陥強調フィルターを用いて欠陥強調処理を行う欠陥強調処理手段と、前記欠陥強調処理工程で得られた各画素の欠陥強調値に基づいて欠陥を検出する欠陥検出手段と、を備え、前記欠陥強調処理手段は、前記撮像画像に対して、検査対象画素を順次選定する検査対象画素選定手段と、選定された検査対象画素の中心から所定距離離れた比較対象画素を検査対象画素の周囲に略円形状に複数配置し、これらの比較対象画素のうち前記検査対象画素を挟んで互いに点対称の位置に配置される一対の比較対象画素をセットとした比較対象画素群を複数設定する比較対象画素群設定手段と、比較対象画素群に含まれる各比較対象画素の輝度値と、前記検査対象画素の輝度値との差である輝度差データを求め、それらの輝度差データのうち、値が最小となる最小輝度差を比較対象画素群毎に求める最小輝度差算出手段と、比較対象画素群毎に算出された最小輝度差のうち、値が最大となる最小輝度差を前記検査対象画素の欠陥強調値とする欠陥強調値算出手段と、を有し、前記欠陥検出手段は、前記欠陥強調値が所定の欠陥閾値以上となる画素を欠陥候補画素として抽出する欠陥候補抽出手段と、互いに隣接する前記欠陥候補画素を欠陥候補画素群とし、この欠陥候補画素群に外接する外接長方形のうち、面積が最小となる外接長方形を検査外接四角形として設定する外接四角形設定手段と、前記欠陥候補画素の慣性軸方向に沿う前記検査外接四角形の長辺寸法、および前記慣性軸方向に直交する幅方向に沿う前記検査外接四角形の短辺寸法を計測するとともに、長辺寸法に対する短辺寸法の比である寸法比を算出する寸法比算出手段と、前記検査外接四角形に対する前記欠陥候補画素群の面積比を算出する面積比算出手段と、前記寸法比算出工程にて算出される寸法比が所定の寸法比閾値未満となる場合、または前記面積比算出工程にて算出される面積比が所定の面積比閾値未満となる場合に、前記欠陥候補画素群をスジ状欠陥として特定する欠陥特定手段と、を有することを特徴とする。   The defect detection apparatus of the present invention includes defect enhancement processing means for performing defect enhancement processing on a captured image obtained by imaging an inspection object using a defect enhancement filter, and defect enhancement of each pixel obtained in the defect enhancement processing step. Defect detection means for detecting a defect based on a value, wherein the defect enhancement processing means selects inspection target pixels for sequentially selecting inspection target pixels for the captured image, and selected inspection target pixels A plurality of comparison target pixels separated by a predetermined distance from the center of the pixel are arranged in a substantially circular shape around the inspection target pixel, and a pair of these comparison target pixels are arranged at point-symmetric positions with respect to the inspection target pixel. A comparison target pixel group setting unit that sets a plurality of comparison target pixel groups each including a comparison target pixel, and a difference between a luminance value of each comparison target pixel included in the comparison target pixel group and a luminance value of the inspection target pixel Ah The luminance difference data is obtained, and among the luminance difference data, the minimum luminance difference calculating means for obtaining the smallest luminance difference with the smallest value for each comparison target pixel group, and the minimum luminance difference calculated for each comparison target pixel group A defect enhancement value calculation unit that uses a minimum luminance difference having a maximum value as a defect enhancement value of the inspection target pixel, and the defect detection unit has the defect enhancement value equal to or greater than a predetermined defect threshold value. A defect candidate extraction unit that extracts pixels as defect candidate pixels and the defect candidate pixels adjacent to each other as a defect candidate pixel group, and a circumscribed rectangle having a minimum area among the circumscribed rectangles circumscribing the defect candidate pixel group is inspected A circumscribed rectangle setting means for setting as a circumscribed rectangle, a long side dimension of the inspection circumscribed rectangle along the inertial axis direction of the defect candidate pixel, and the inspection circumscribed line along the width direction orthogonal to the inertial axis direction Dimension ratio calculating means for measuring the short side dimension of the shape and calculating a dimensional ratio which is a ratio of the short side dimension to the long side dimension, and an area ratio for calculating the area ratio of the defect candidate pixel group to the inspection circumscribed rectangle When the dimensional ratio calculated in the calculating means and the dimensional ratio calculating step is less than a predetermined dimensional ratio threshold, or the area ratio calculated in the area ratio calculating step is less than a predetermined area ratio threshold And defect specifying means for specifying the defect candidate pixel group as a streak-like defect.

この発明は、上述した欠陥検出方法を実施する欠陥検出装置であり、上記欠陥検出方法の発明と同様の作用および効果を享受でき、欠陥強調値に基づいて高精度に欠陥候補画素を抽出することができ、これらの欠陥候補画素から、スジ状欠陥のみを精度よく検出することができる。   The present invention is a defect detection apparatus that performs the above-described defect detection method, can enjoy the same operations and effects as the defect detection method, and extract defect candidate pixels with high accuracy based on the defect enhancement value. From these defect candidate pixels, only streak defects can be detected with high accuracy.

本発明の欠陥検出プログラムは、演算手段により読み込まれて演算処理される欠陥検出プログラムであって、前記欠陥検出プログラムは、被検査物を撮像した撮像画像に対して欠陥強調フィルターを用いて欠陥強調処理を行う欠陥強調処理手段と、前記欠陥強調処理工程で得られた各画素の欠陥強調値に基づいて欠陥を検出する欠陥検出手段と、を備え、前記欠陥強調処理手段は、前記撮像画像に対して、検査対象画素を順次選定する検査対象画素選定手段と、選定された検査対象画素の中心から所定距離離れた比較対象画素を検査対象画素の周囲に略円形状に複数配置し、これらの比較対象画素のうち前記検査対象画素を挟んで互いに点対称の位置に配置される一対の比較対象画素をセットとした比較対象画素群を複数設定する比較対象画素群設定手段と、比較対象画素群に含まれる各比較対象画素の輝度値と、前記検査対象画素の輝度値との差である輝度差データを求め、それらの輝度差データのうち、値が最小となる最小輝度差を比較対象画素群毎に求める最小輝度差算出手段と、比較対象画素群毎に算出された最小輝度差のうち、値が最大となる最小輝度差を前記検査対象画素の欠陥強調値とする欠陥強調値算出手段と、を有し、前記欠陥検出手段は、前記欠陥強調値が所定の欠陥閾値以上となる画素を欠陥候補画素として抽出する欠陥候補抽出手段と、互いに隣接する前記欠陥候補画素を欠陥候補画素群とし、この欠陥候補画素群に外接する外接長方形のうち、面積が最小となる外接長方形を検査外接四角形として設定する外接四角形設定手段と、前記欠陥候補画素の慣性軸方向に沿う前記検査外接四角形の長辺寸法、および前記慣性軸方向に直交する幅方向に沿う前記検査外接四角形の短辺寸法を計測するとともに、長辺寸法に対する短辺寸法の比である寸法比を算出する寸法比算出手段と、前記検査外接四角形に対する前記欠陥候補画素群の面積比を算出する面積比算出手段と、前記寸法比算出工程にて算出される寸法比が所定の寸法比閾値未満となる場合、または前記面積比算出工程にて算出される面積比が所定の面積比閾値未満となる場合に、前記欠陥候補画素群をスジ状欠陥として特定する欠陥特定手段と、を有することを特徴とする。   The defect detection program of the present invention is a defect detection program that is read and calculated by a calculation means, and the defect detection program uses a defect enhancement filter for a captured image obtained by imaging an inspection object. A defect enhancement processing unit that performs processing, and a defect detection unit that detects a defect based on a defect enhancement value of each pixel obtained in the defect enhancement processing step, and the defect enhancement processing unit adds to the captured image. On the other hand, the inspection target pixel selection means for sequentially selecting the inspection target pixels, and a plurality of comparison target pixels that are separated by a predetermined distance from the center of the selected inspection target pixels are arranged in a substantially circular shape around the inspection target pixels. Comparison target image for setting a plurality of comparison target pixel groups, each of which is a set of a pair of comparison target pixels arranged at point symmetry with respect to the inspection target pixel among the comparison target pixels A luminance setting data which is a difference between a luminance value of each comparison target pixel included in the comparison target pixel group and a luminance value of the inspection target pixel, and a value of the luminance difference data is the smallest A minimum luminance difference calculating means for obtaining a minimum luminance difference for each comparison target pixel group, and among the minimum luminance differences calculated for each comparison target pixel group, the minimum luminance difference having the maximum value is determined as a defect of the inspection target pixel. A defect enhancement value calculating unit that sets an enhancement value, and the defect detection unit is adjacent to a defect candidate extraction unit that extracts a pixel having the defect enhancement value equal to or higher than a predetermined defect threshold as a defect candidate pixel. The defect candidate pixel is defined as a defect candidate pixel group, and a circumscribed rectangle setting unit that sets a circumscribed rectangle having a minimum area as a test circumscribed rectangle among circumscribed rectangles circumscribing the defect candidate pixel group; A dimension which is a ratio of a short side dimension to a long side dimension while measuring a long side dimension of the inspection circumscribed square along the axial direction and a short side dimension of the inspection circumscribed square along a width direction orthogonal to the inertial axis direction. A size ratio calculating means for calculating a ratio, an area ratio calculating means for calculating an area ratio of the defect candidate pixel group with respect to the inspection circumscribed rectangle, and a size ratio calculated in the size ratio calculating step is a predetermined size ratio threshold value Defect specifying means for specifying the defect candidate pixel group as a streak-like defect when the area ratio is less than or less than a predetermined area ratio threshold value. It is characterized by.

この発明は、上述した欠陥検出方法を実施するために用いられるプログラムであり、上記欠陥検出方法の発明と同様の作用および効果を享受でき、欠陥強調値に基づいて高精度に欠陥候補画素を抽出することができ、これらの欠陥候補画素から、スジ状欠陥のみを精度よく検出することができる。   The present invention is a program used to implement the above-described defect detection method, and can enjoy the same operations and effects as those of the above-described defect detection method, and extract defect candidate pixels with high accuracy based on the defect emphasis value. From these defect candidate pixels, only streak defects can be accurately detected.

本発明の一実施の形態に係る欠陥検出装置の構成を示すブロック図。The block diagram which shows the structure of the defect detection apparatus which concerns on one embodiment of this invention. 制御装置の概略構成を示すブロック図。The block diagram which shows schematic structure of a control apparatus. 欠陥強調フィルターの比較対象画素配置の一例を示す図。The figure which shows an example of the comparison object pixel arrangement | positioning of a defect emphasis filter. 撮像画像の画像データ上に設定される検査対象画素および比較対象画素を示す図。The figure which shows the test object pixel and comparison object pixel which are set on the image data of a captured image. 直線状のスジ状欠陥の一例を示す図。The figure which shows an example of a linear stripe defect. 折線状のスジ状欠陥の一例を示す図。The figure which shows an example of a broken line-like stripe defect. 環状のスジ状欠陥の一例を示す図。The figure which shows an example of a cyclic | annular stripe-like defect. シミ状欠陥の一例を示す図。The figure which shows an example of a spot-like defect. 本実施の形態の欠陥検出装置の動作を示すフローチャート。The flowchart which shows operation | movement of the defect detection apparatus of this Embodiment. 欠陥強調処理工程の処理を示すフローチャート。The flowchart which shows the process of a defect emphasis processing process. 欠陥検出工程の処理を示すフローチャート。The flowchart which shows the process of a defect detection process. 撮像画像の一例を示す図。The figure which shows an example of a captured image. 図12の撮像画像に対する明欠陥強調画像を示す図。The figure which shows the bright defect emphasis image with respect to the captured image of FIG. 図12の撮像画像に対する暗欠陥強調画像を示す図。The figure which shows the dark defect emphasis image with respect to the captured image of FIG. 図13に対する明欠陥特定画像を示す図。The figure which shows the bright defect specific image with respect to FIG. 図14に対する暗欠陥特定画像を示す図。The figure which shows the dark defect specific image with respect to FIG.

〔欠陥検出装置の構成〕
図1は本発明の一実施の形態に係る欠陥検出装置の構成を示すブロック図である。
本実施の形態の欠陥検出装置100は、フレキシブル基板や、液晶パネル(TFTパネル)、半導体ウェハなどの被検査物1の欠陥を検出するものである。被検査物1は、XYステージ2上に載置され、平面的に移動可能に構成されている。
欠陥検出装置100は、顕微鏡4、CCDカメラ5、制御装置6、表示装置7を備えている。
[Configuration of defect detection device]
FIG. 1 is a block diagram showing a configuration of a defect detection apparatus according to an embodiment of the present invention.
The defect detection apparatus 100 according to the present embodiment detects a defect of an inspection object 1 such as a flexible substrate, a liquid crystal panel (TFT panel), or a semiconductor wafer. The inspection object 1 is placed on the XY stage 2 and configured to be movable in a plane.
The defect detection device 100 includes a microscope 4, a CCD camera 5, a control device 6, and a display device 7.

顕微鏡4は、被検査物1を拡大してCCDカメラ5で撮影するために設けられており、被検査物1の欠陥を検出するために十分な倍率を有するものが用いられている。
CCDカメラ5は、顕微鏡4を介して被検査物1を撮影する撮像手段である。
制御装置6は、CCDカメラ5を制御し、被検査物1を検出する画像処理手段である。表示装置7は、制御装置6に接続された液晶ディスプレイなどの表示装置である。
The microscope 4 is provided for enlarging the inspection object 1 and photographing it with the CCD camera 5, and a microscope having a sufficient magnification for detecting a defect of the inspection object 1 is used.
The CCD camera 5 is an imaging unit that images the inspection object 1 through the microscope 4.
The control device 6 is an image processing unit that controls the CCD camera 5 and detects the inspection object 1. The display device 7 is a display device such as a liquid crystal display connected to the control device 6.

図2は、制御装置6の概略構成を示すブロック図である。
この制御装置6は、例えばパーソナルコンピュータなどを用いることができ、CCDカメラ5により撮像された撮像画像を処理して、被検査物1の欠陥を検出する。そして、この制御装置6は、図2に示すように、画像入力手段60と、欠陥強調処理手段61と、欠陥検出手段62とを備えている。また、本実施の形態では、制御装置6は、HDDやメモリなどの記憶手段を備え、この記憶手段に記録されるプログラムとして欠陥強調処理手段61および欠陥検出手段62が記憶されている。そして、制御装置6に設けられるCPU(Central Processing Unit)により、記憶手段から欠陥強調処理手段61や欠陥検出手段62などのプログラムが読み出され、演算処理により欠陥の検出処理が実行される。
なお、本実施の形態では、上記のように、欠陥強調処理手段61および欠陥検出手段62がプログラムとして記憶手段に記憶され、CPUにより適宜読み出されて処理が実行される構成を例示するが、これに限定されない。すなわち、欠陥強調処理手段61や欠陥検出手段62は、ICチップなどの集積回路により構成され、画像入力手段60から入力される撮像画像の画像データを適宜処理することで欠陥を検出する構成としてもよい。
FIG. 2 is a block diagram illustrating a schematic configuration of the control device 6.
For example, a personal computer or the like can be used as the control device 6, and a captured image captured by the CCD camera 5 is processed to detect a defect in the inspection object 1. As shown in FIG. 2, the control device 6 includes an image input unit 60, a defect enhancement processing unit 61, and a defect detection unit 62. In the present embodiment, the control device 6 includes storage means such as an HDD and a memory, and defect emphasis processing means 61 and defect detection means 62 are stored as programs recorded in the storage means. Then, a CPU (Central Processing Unit) provided in the control device 6 reads programs such as the defect emphasis processing means 61 and the defect detection means 62 from the storage means, and a defect detection process is executed by arithmetic processing.
In the present embodiment, as described above, the defect emphasis processing means 61 and the defect detection means 62 are stored in the storage means as programs, and a configuration in which the processing is executed by being appropriately read out by the CPU is illustrated. It is not limited to this. That is, the defect emphasis processing means 61 and the defect detection means 62 are configured by an integrated circuit such as an IC chip, and may be configured to detect defects by appropriately processing image data of a captured image input from the image input means 60. Good.

画像入力手段60は、CCDカメラ5から撮像された撮像画像の画像データが入力され、その画像データを図示しない記憶手段に記憶する。   The image input means 60 receives image data of a captured image taken from the CCD camera 5 and stores the image data in a storage means (not shown).

欠陥強調処理手段61は、取得した画像に対して、欠陥強調フィルターを用いて、欠陥強調処理を行う欠陥強調処理工程を実施するものであり、検査対象画素選定手段611と、比較対象画素群設定手段612と、最小輝度差算出手段613と、欠陥強調値算出手段614とを備える。   The defect enhancement processing unit 61 performs a defect enhancement processing step of performing defect enhancement processing on the acquired image using a defect enhancement filter. The defect enhancement processing unit 61 and the comparison target pixel group setting are performed. Means 612, minimum luminance difference calculation means 613, and defect enhancement value calculation means 614 are provided.

検査対象画素選定手段611は、撮像画像において検査対象画素を順次選定する検査対象画素選定工程を実施する。
比較対象画素群設定手段612は、検査対象画素選定手段611により選定された検査対象画素の中心から、所定距離(比較画素選択距離)だけ離れた比較対象画素を検査対象画素の周囲に略円形状に複数配置し、これらの比較対象画素を複数の比較対象画素群に分けて設定する比較対象画素群設定工程を実施する。また、予め検査対象画素と比較対象画素の位置関係を求めた欠陥強調フィルター構成を用いて、比較対象画素を選択してもよい。図3は、比較対象画素選択距離を7画素に設定した欠陥強調フィルター構成の一例を示す図である。この欠陥強調フィルター構成70は、図3に示すように、検査対象画素に対応する中心画素71と、この中心画素71から7画素分離れた位置に略円環状に配置される複数の比較対象画素に対応する比較設定画素72とを備えている。そして、比較対象画素群設定手段612は、撮像画像から検査対象画素選定手段611により選定された検査対象画素O(図4参照)と、中心画素71とが一致するように欠陥強調フィルター構成70を重ね合わせ、撮像画像上の比較設定画素72と重なり合う画素を比較対象画素S〜S56(図4参照)として設定すればよい。
The inspection target pixel selection unit 611 performs an inspection target pixel selection step of sequentially selecting inspection target pixels in the captured image.
The comparison target pixel group setting unit 612 has a substantially circular shape around the inspection target pixel. The comparison target pixel is separated from the center of the inspection target pixel selected by the inspection target pixel selection unit 611 by a predetermined distance (comparison pixel selection distance). A comparison target pixel group setting step is performed in which a plurality of comparison target pixels are arranged and set in a plurality of comparison target pixel groups. Alternatively, the comparison target pixel may be selected using a defect enhancement filter configuration in which the positional relationship between the inspection target pixel and the comparison target pixel is obtained in advance. FIG. 3 is a diagram illustrating an example of a defect enhancement filter configuration in which the comparison target pixel selection distance is set to 7 pixels. As shown in FIG. 3, the defect enhancement filter configuration 70 includes a central pixel 71 corresponding to the inspection target pixel and a plurality of comparison target pixels arranged in a substantially annular shape at a position separated from the central pixel 71 by 7 pixels. And a comparison setting pixel 72 corresponding to. The comparison target pixel group setting unit 612 then sets the defect enhancement filter configuration 70 so that the inspection target pixel O 1 (see FIG. 4) selected by the inspection target pixel selection unit 611 from the captured image and the center pixel 71 coincide with each other. And pixels that overlap with the comparison setting pixel 72 on the captured image may be set as comparison target pixels S 1 to S 56 (see FIG. 4).

なお、図3において、欠陥強調フィルター構成70として、中心画素71から比較設定画素72までの比較画素選択距離を、7画素として設定しているが、これは、被検査物1において検査すべきスジ状欠陥の線幅により適宜設定される。すなわち、記憶手段には、比較画素選択距離が異なる複数の欠陥強調フィルター構成70が記憶されており、比較対象画素群設定手段612は、例えば検査者が設定入力した設定事項に応じて、欠陥強調フィルター構成70を切り替えて比較対象画素を設定する。例えば、図3に示すような欠陥強調フィルター構成70により選択される比較対象画素では、1つの比較対象画素群を構成する、検査対象画素を挟んで相対する一対の比較対象画素間の距離が14画素となるが、この場合、スジ状欠陥の線幅が12画素以下となるスジ状欠陥を精度よく検出可能となる。この時、検査者によりさらに細い線幅のスジ状欠陥を検出する旨の要求信号、例えば線幅が5画素分程度のスジ状欠陥を検出する旨の設定入力が入力された場合、欠陥強調フィルター構成70は、比較対象画素間の距離が7〜8画素程度、すなわち比較画素選択距離が3〜4画素となる欠陥強調フィルター構成70を読み出し、この欠陥強調フィルター構成70により比較対象画素を設定する。
また、比較対象画素群設定手段612は、設定した比較対象画素を複数の比較対象画素群に分割する。本実施の形態では、比較対象画素群設定手段612は、検査対象画素を挟んで互いに点対称となる位置に配置される一対の比較対象画素をセットとした比較対象画素群を設定する。例えば、図3に示すような欠陥強調フィルター構成70を用いた場合、検査対象画素に対して、図4に示すような56個の比較対象画素が設定される。この場合、比較対象画素Sと検査対象画素を挟んで点対称の位置関係となる比較対象画素Sn+28(ただし、n=1,2,3…28)を比較対象画素群として設定する。
In FIG. 3, as the defect enhancement filter configuration 70, the comparison pixel selection distance from the center pixel 71 to the comparison setting pixel 72 is set as 7 pixels. It is set as appropriate according to the line width of the defect. That is, the storage unit stores a plurality of defect enhancement filter configurations 70 having different comparison pixel selection distances, and the comparison target pixel group setting unit 612, for example, performs defect enhancement according to the setting items set and input by the inspector. The comparison target pixel is set by switching the filter configuration 70. For example, in the comparison target pixel selected by the defect enhancement filter configuration 70 as illustrated in FIG. 3, the distance between a pair of comparison target pixels that constitute one comparison target pixel group and that are opposed to each other with the inspection target pixel interposed therebetween is 14. In this case, the streak defect having a line width of 12 pixels or less can be accurately detected. At this time, if the inspector inputs a request signal for detecting a stripe-like defect having a narrower line width, for example, a setting input for detecting a stripe-like defect having a line width of about 5 pixels, the defect enhancement filter The configuration 70 reads out the defect enhancement filter configuration 70 in which the distance between the comparison target pixels is about 7 to 8 pixels, that is, the comparison pixel selection distance is 3 to 4 pixels, and the comparison target pixel is set by the defect enhancement filter configuration 70. .
The comparison target pixel group setting unit 612 divides the set comparison target pixel into a plurality of comparison target pixel groups. In the present embodiment, the comparison target pixel group setting unit 612 sets a comparison target pixel group that includes a pair of comparison target pixels that are arranged at positions that are point-symmetric with respect to the inspection target pixel. For example, when the defect enhancement filter configuration 70 as shown in FIG. 3 is used, 56 comparison target pixels as shown in FIG. 4 are set for the inspection target pixel. In this case, the comparison target pixel S n + 28 (where n = 1, 2, 3... 28) having a point-symmetrical positional relationship across the comparison target pixel Sn and the inspection target pixel is set as the comparison target pixel group.

最小輝度差算出手段613は、比較対象画素群に含まれる各比較対象画素の輝度値と、前記検査対象画素の輝度値との差である輝度差データを求め、それらの輝度差データのうち、値が最小となる最小輝度差を比較対象画素群毎に求める最小輝度差算出工程を実施する。
具体的には、最小輝度差算出手段613は、各比較対象画素群に対して、明欠陥最小輝度差および暗欠陥最小輝度差を算出する。
明欠陥最小輝度差の算出では、まず、次式(1)(2)に示す式に基づいて、明欠陥輝度差Fwsnを算出する。
The minimum luminance difference calculating unit 613 obtains luminance difference data that is a difference between the luminance value of each comparison target pixel included in the comparison target pixel group and the luminance value of the inspection target pixel, and among the luminance difference data, A minimum luminance difference calculating step for obtaining a minimum luminance difference with a minimum value for each comparison target pixel group is performed.
Specifically, the minimum luminance difference calculating unit 613 calculates a bright defect minimum luminance difference and a dark defect minimum luminance difference for each comparison target pixel group.
In calculating the bright defect minimum luminance difference, first, the bright defect luminance difference F wsn is calculated based on the following equations (1) and (2).

この後、最小輝度差算出手段613は、次式(3)により、式(1)(2)にて算出された明欠陥輝度差Fwsnのうち、値が小さい一方を明欠陥最小輝度差Dwsnとして算出する。 Thereafter, the minimum luminance difference calculation means 613 calculates the bright defect minimum luminance difference D as a smaller one of the bright defect luminance differences F wsn calculated by the equations (1) and (2) according to the following equation (3). Calculate as wsn .

一方、暗欠陥最小輝度差の算出は、次式(4)(5)に示す式に基づいて、暗欠陥輝度差Fbsnを算出する。 On the other hand, the dark defect minimum luminance difference is calculated by calculating the dark defect luminance difference F bsn based on the following equations (4) and (5).

そして、最小輝度差算出手段613は、次式(6)により、式(4)(5)にて算出された暗欠陥輝度差Fbsnのうち、値が小さい一方を暗欠陥最小輝度差Dbsnとして算出する。 Then, the minimum luminance difference calculation unit 613 calculates the dark defect minimum luminance difference D bsn from the dark defect luminance differences F bsn calculated by the equations (4) and (5) according to the following equation (6). Calculate as

欠陥強調値算出手段614は、式(7)に示すように、比較対象画素群毎に算出された明欠陥最小輝度差Dwsn、暗欠陥最小輝度差Dbsnのうち、値が最大となる値と求め、それぞれ明欠陥強調値R1、暗欠陥強調値R2とする。 As shown in Expression (7), the defect enhancement value calculation unit 614 has a maximum value among the bright defect minimum luminance difference D wsn and the dark defect minimum luminance difference D bsn calculated for each comparison target pixel group. To obtain a bright defect enhancement value R1 and a dark defect enhancement value R2, respectively.

欠陥検出手段62は、欠陥強調処理手段61で処理された結果である明欠陥強調値R1、暗欠陥強調値R2から、欠陥候補画素を抽出し、さらに、これらの欠陥候補画素からスジ状欠陥のみを検出する。この欠陥検出手段62は、図2に示すように、欠陥候補抽出手段621と、外接四角形設定手段622と、寸法比算出手段623と、面積比算出手段624と、欠陥特定手段625と、を備えている。   The defect detection means 62 extracts defect candidate pixels from the bright defect enhancement value R1 and the dark defect enhancement value R2 that are the results processed by the defect enhancement processing means 61, and only the streak-like defects are extracted from these defect candidate pixels. Is detected. As shown in FIG. 2, the defect detection unit 62 includes a defect candidate extraction unit 621, a circumscribed rectangle setting unit 622, a size ratio calculation unit 623, an area ratio calculation unit 624, and a defect specification unit 625. ing.

欠陥候補抽出手段621は、欠陥強調処理手段61により算出される欠陥強調値R1,R2を所定の閾値と比較して、欠陥候補画素を抽出する欠陥候補抽出工程を実施する。この閾値としては、次式(8)(9)に示すような明欠陥閾値wslevelと、暗欠陥閾値bslevelとが設定され、それぞれ明欠陥強調値R1,暗欠陥強調値R2と比較することで明欠陥候補画素および暗欠陥候補画素をそれぞれ抽出する。   The defect candidate extraction unit 621 performs a defect candidate extraction step of extracting defect candidate pixels by comparing the defect enhancement values R1 and R2 calculated by the defect enhancement processing unit 61 with a predetermined threshold. As this threshold value, a bright defect threshold value wslevel and a dark defect threshold value bslevel as shown in the following equations (8) and (9) are set and compared with the bright defect emphasis value R1 and the dark defect emphasis value R2, respectively. A defect candidate pixel and a dark defect candidate pixel are extracted.

上記式(8)(9)において、avr(明)、avr(暗)は、それぞれ明欠陥強調値R1の平均値、暗欠陥強調値R2の平均値であり、σ(明)、σ(暗)は、それぞれ明欠陥強調値R1、暗欠陥強調値R2の標準偏差であり、α1、α2、β1、β2は、それぞれ任意の定数であり、検査対象となる撮像画像の状況により決定される。また、明欠陥強調値R1、暗欠陥強調値R2が負の値となる画素も存在するが、明欠陥強調値R1が負の値の場合、暗欠陥であることを示し、暗欠陥強調値R2が負の値の場合、明欠陥であることを示すものであるため、avr(明)、avr(暗)およびσ(明)、σ(暗)の計算において、これらの欠陥強調値R1,R2の負の値は、省いて各閾値が算出される。   In the above formulas (8) and (9), avr (bright) and avr (dark) are the average value of the bright defect enhancement value R1 and the average value of the dark defect enhancement value R2, respectively, and σ (bright) and σ (dark) ) Are standard deviations of the bright defect emphasis value R1 and the dark defect emphasis value R2, and α1, α2, β1, and β2 are arbitrary constants, and are determined according to the state of the captured image to be inspected. Further, there are pixels in which the bright defect enhancement value R1 and the dark defect enhancement value R2 are negative, but when the bright defect enhancement value R1 is a negative value, it indicates that the defect is a dark defect, and the dark defect enhancement value R2 When N is a negative value, it indicates a bright defect. Therefore, in the calculation of avr (bright), avr (dark) and σ (bright), σ (dark), these defect emphasis values R1, R2 Each threshold value is calculated by omitting the negative value of.

また、欠陥強調処理手段61で処理された画像に対し、メディアンフィルタなどを適用してノイズ除去処理を行ってから、欠陥候補抽出手段621による欠陥候補画素の抽出処理を実行してもよい。   Alternatively, the defect candidate pixel extraction processing by the defect candidate extraction unit 621 may be performed after applying a median filter or the like to the image processed by the defect enhancement processing unit 61 to perform noise removal processing.

外接四角形設定手段622は、欠陥候補抽出手段621により抽出された欠陥候補画素のうち、互いに隣接する画素に欠陥候補画素がある場合、これらの欠陥候補画素を連結した欠陥候補画素群81(図5〜図8参照)として検出する。ここで、外接四角形設定手段622は、例えば欠陥候補画素の周囲8画素を検査し、この8画素内に欠陥候補画素がある場合に互いに隣接する欠陥候補画素として認識し、欠陥候補画素群81として検出する。   When there are defect candidate pixels in adjacent pixels among the defect candidate pixels extracted by the defect candidate extraction unit 621, the circumscribed rectangle setting unit 622 connects the defect candidate pixel group 81 (see FIG. 5). To (see FIG. 8). Here, the circumscribed rectangle setting unit 622 inspects, for example, eight pixels around the defect candidate pixel, and recognizes a defect candidate pixel adjacent to each other when there is a defect candidate pixel in the eight pixels. To detect.

そして、外接四角形設定手段622は、検出した欠陥候補画素群81に外接する検査外接四角形82を設定する外接四角形設定工程を実施する。
具体的には、外接四角形設定手段622は、欠陥候補画素群81の外周部に配置される外周欠陥候補画素を検出し、この外周欠陥候補画素の少なくとも3点以上に接する外接長方形を検出する。そして、外接四角形設定手段622は、これらの検出される外接長方形のうち、面積が最小となる外接長方形を検査外接四角形82として設定する。ここで、この検査外接四角形82の長辺に沿う一方向が欠陥候補画素群の慣性主軸方向となる。
Then, the circumscribed rectangle setting unit 622 performs a circumscribed rectangle setting step of setting an inspection circumscribed rectangle 82 circumscribed to the detected defect candidate pixel group 81.
Specifically, the circumscribed rectangle setting unit 622 detects outer peripheral defect candidate pixels arranged on the outer peripheral portion of the defect candidate pixel group 81, and detects a circumscribed rectangle that is in contact with at least three points of the outer peripheral defect candidate pixels. Then, the circumscribed rectangle setting unit 622 sets the circumscribed rectangle having the smallest area among these detected circumscribed rectangles as the inspection circumscribed rectangle 82. Here, one direction along the long side of the inspection circumscribed rectangle 82 is the inertial principal axis direction of the defect candidate pixel group.

寸法比算出手段623は、外接四角形設定手段622により設定された検査外接四角形82の長辺の長さ寸法l、および短辺の長さ寸法hを計測し、長辺の寸法に対する短辺の寸法の比である寸法比M1(=h/l)を算出する寸法比算出工程を実施する。
面積比算出手段624は、外接四角形設定手段622により設定された検査外接四角形82内の欠陥候補画素群81の面積を計測する。これには、例えば欠陥候補画素群81を形成する欠陥候補画素の個数mを計測し、1画素分の面積aと掛け合わせることで算出する。そして、面積比算出手段624は、検査外接四角形82に対する欠陥候補画素群81の面積比M2(=ma/lh)を算出する面積比算出工程を実施する。
The dimension ratio calculation means 623 measures the long side length dimension l and the short side length dimension h of the inspection circumscribed square 82 set by the circumscribed square setting means 622, and measures the short side dimension with respect to the long side dimension. A dimension ratio calculating step for calculating a dimension ratio M1 (= h / l), which is a ratio of
The area ratio calculation unit 624 measures the area of the defect candidate pixel group 81 in the inspection circumscribed rectangle 82 set by the circumscribed rectangle setting unit 622. For example, the number m of defect candidate pixels forming the defect candidate pixel group 81 is measured and calculated by multiplying the area a by one pixel. Then, the area ratio calculating means 624 performs an area ratio calculating step of calculating the area ratio M2 (= ma / lh) of the defect candidate pixel group 81 with respect to the inspection circumscribed rectangle 82.

欠陥特定手段625は、寸法比算出手段623および面積比算出手段624により算出される寸法比M1および面積比M2を、寸法比閾値N1および面積比閾値N2と比較して、スジ状欠陥を特定する欠陥特定工程を実施する。
ここで、図5から図8に、欠陥候補画素群81の例を示す。図5は、直線状のスジ状欠陥の一例を示す図である。図6は、折線状のスジ状欠陥の一例を示す図である。図7は、環状のスジ状欠陥の一例を示す図である。図8は、シミ状欠陥の一例を示す図である。
図5に示すような直線状のスジ状欠陥では、慣性主軸方向に沿う長さ寸法に対して、慣性主軸方向に直交する幅方向の長さ寸法の比、すなわち、検査外接四角形82の長辺に対する短辺の寸法比M1が小さい値(M1≒0)となる。一方、図8に示すようなシミ状欠陥では、検査外接四角形82の長辺に対する短辺の寸法比M1が大きくなる(例えば図8では、M1≒1)。したがって、欠陥特定手段625は、寸法比M1が所定の寸法比閾値N1より小さいか否かを判断することで、欠陥候補画素群81が直線状のスジ状欠陥であるか否かを判別することが可能となる。
The defect identification unit 625 identifies the streak defect by comparing the dimension ratio M1 and the area ratio M2 calculated by the dimension ratio calculation unit 623 and the area ratio calculation unit 624 with the dimension ratio threshold N1 and the area ratio threshold N2. Perform the defect identification process.
Here, FIGS. 5 to 8 show examples of the defect candidate pixel group 81. FIG. 5 is a diagram illustrating an example of a linear streak defect. FIG. 6 is a diagram illustrating an example of a broken line-like streak defect. FIG. 7 is a diagram illustrating an example of an annular streak defect. FIG. 8 is a diagram illustrating an example of a spot-like defect.
In a linear streak defect as shown in FIG. 5, the ratio of the length dimension in the width direction perpendicular to the inertial principal axis direction to the length dimension along the inertial principal axis direction, that is, the long side of the inspection circumscribed rectangle 82 The dimension ratio M1 of the short side with respect to is a small value (M1≈0). On the other hand, in a spot-like defect as shown in FIG. 8, the dimension ratio M1 of the short side to the long side of the inspection circumscribed rectangle 82 is large (for example, M1≈1 in FIG. 8). Therefore, the defect specifying means 625 determines whether or not the defect candidate pixel group 81 is a linear streak defect by determining whether or not the dimension ratio M1 is smaller than the predetermined dimension ratio threshold N1. Is possible.

また、曲線状のスジ状欠陥や折れ線状、環状のスジ状欠陥では、曲率が小さい場合や折曲角度が小さい場合では、上記した直線状のスジ状欠陥と同様に、寸法比M1が十分小さいものとなり、スジ状欠陥として特定することが可能であるが、図6に示すように、検査外接四角形82の長辺と短辺との寸法差が小さい場合、寸法比M1の値が大きくなる。このような場合では、上記寸法比M1のみでは、スジ状欠陥であっても、シミ状欠陥として検出されない。これに対して、本実施の形態の欠陥検出装置100では、欠陥特定手段625は、面積比による欠陥検出をも実施する。
すなわち、図8に示すようなシミ状欠陥では、検査外接四角形82に対する欠陥候補画素群81の面積比M2が大きくなり、例えば図8では、M2≒1となる。これに対し、図6に示すような曲線上のスジ状欠陥や、図7に示すような環状のスジ状欠陥では、検査外接四角形82に対する欠陥候補画素群81の面積比M2が十分小さい値(M2≒0)となる。したがって、欠陥特定手段625は、面積比M2が所定の面積比閾値N2より小さいか否かを判断することで、欠陥候補画素群81が角度変化を有するスジ状欠陥であるか否かを判別することが可能となる。
欠陥特定手段625は、以上のように、寸法比M1が寸法比閾値N1より小さい場合、または面積比M2が面積比閾値N2より小さい場合のいずれか一方に当てはまる場合に、その欠陥候補画素群81をスジ状欠陥として特定する。
Further, in the case of curved streaky defects, broken line shapes, and annular streaky defects, when the curvature is small or the bending angle is small, the dimension ratio M1 is sufficiently small as in the case of the straight streaky defects described above. As shown in FIG. 6, when the dimensional difference between the long side and the short side of the inspection circumscribed square 82 is small, the value of the dimensional ratio M1 is large. In such a case, even if it is a streak-like defect only with the dimensional ratio M1, it is not detected as a spot-like defect. On the other hand, in the defect detection apparatus 100 of the present embodiment, the defect identification unit 625 also performs defect detection based on the area ratio.
That is, in the spot-like defect as shown in FIG. 8, the area ratio M2 of the defect candidate pixel group 81 with respect to the inspection circumscribed rectangle 82 is large, for example, M2≈1 in FIG. On the other hand, in the case of a streak-like defect on a curve as shown in FIG. 6 or an annular streak-like defect as shown in FIG. 7, the area ratio M2 of the defect candidate pixel group 81 to the inspection circumscribed rectangle 82 is a sufficiently small value ( M2≈0). Therefore, the defect specifying unit 625 determines whether or not the defect candidate pixel group 81 is a streak defect having an angle change by determining whether or not the area ratio M2 is smaller than the predetermined area ratio threshold N2. It becomes possible.
As described above, the defect specifying unit 625 applies the defect candidate pixel group 81 when the dimension ratio M1 is smaller than the dimension ratio threshold N1 or when the area ratio M2 is smaller than the area ratio threshold N2. Is identified as a streak defect.

〔欠陥検出装置の動作〕
次に、本実施の形態の欠陥検出装置による欠陥検出方法について説明する。
図9は、本実施の形態の欠陥検出装置100の動作を説明するためのフローチャートである。
[Operation of defect detection device]
Next, the defect detection method by the defect detection apparatus of this Embodiment is demonstrated.
FIG. 9 is a flowchart for explaining the operation of the defect detection apparatus 100 of the present embodiment.

まず、被検査物1がXYステージ2にセットされると、制御装置6の画像入力手段60は、被検査物1の画像をCCDカメラ5で撮影し、その撮影画像の画像データを取得する画像取得工程(撮像工程)を行う(ST1)。このとき撮影画像の画像データは、図示しないA/D変換器により、例えば、256階調(8ビット)のデジタルデータとして、制御装置6に取り込まれる。
なお、被検査物1が液晶パネルなどの表示パネルの場合、表示パネル上に特定の画像パターンを表示させ、欠陥を検出しやすいようにしてもよい。例えば、暗欠陥を検出しやすいように全画面を白表示する全白画面パターン、明欠陥を検出しやすいように全画面を黒表示する全黒画面パターン、中間調の画面パターン等があり、検出したい欠陥種類に応じて適宜設定すればよい。
First, when the inspection object 1 is set on the XY stage 2, the image input means 60 of the control device 6 captures an image of the inspection object 1 with the CCD camera 5 and obtains image data of the captured image. An acquisition process (imaging process) is performed (ST1). At this time, the image data of the photographed image is taken into the control device 6 as, for example, 256 gradation (8 bits) digital data by an A / D converter (not shown).
When the inspection object 1 is a display panel such as a liquid crystal panel, a specific image pattern may be displayed on the display panel so that defects can be easily detected. For example, there are an all-white screen pattern that displays the entire screen in white so that dark defects can be easily detected, an all-black screen pattern that displays all screens in black so that bright defects can be easily detected, and a halftone screen pattern. What is necessary is just to set suitably according to the defect kind to want.

次に、欠陥強調処理手段61は、取得された画像に対して欠陥を強調する欠陥強調処理工程を行う(ST2)。この欠陥強調処理工程ST2は、低コントラストの欠陥はそのままでは検出が難しいために、画像の中の欠陥成分のみを強調する処理を行うものである。欠陥強調処理工程ST2は、図10に示す処理フローで実施される。   Next, the defect emphasis processing means 61 performs a defect emphasis processing step for emphasizing defects on the acquired image (ST2). In this defect enhancement processing step ST2, since it is difficult to detect a low-contrast defect as it is, only the defect component in the image is enhanced. The defect enhancement processing step ST2 is performed according to the processing flow shown in FIG.

欠陥強調処理手段61は、まず、検査対象画素選定手段611により、検査対象となる検査対象画素を選定する検査対象画素選定工程を実行する(ST21)。
本実施の形態では、CCDカメラ5の各撮像画素単位で対象画素を選定するようにされている。
First, the defect enhancement processing means 61 executes an inspection target pixel selection step of selecting an inspection target pixel to be inspected by the inspection target pixel selection means 611 (ST21).
In the present embodiment, the target pixel is selected for each imaging pixel unit of the CCD camera 5.

次に、欠陥強調処理手段61は、比較対象画素群設定手段612により、比較対象画素群設定工程を実行する(ST22)。
すなわち、比較対象画素群設定手段612は、図3に示すような欠陥強調フィルター構成70を用い、図4に示すように、検査対象画素Oを中心とする円周方向に56個の比較対象画素S〜S56を設定する。
Next, the defect enhancement processing means 61 executes the comparison target pixel group setting step by the comparison target pixel group setting means 612 (ST22).
That is, the comparison target pixel group setting means 612 uses a defect emphasis filter configuration 70 as shown in FIG. 3 and, as shown in FIG. 4, 56 comparison targets in the circumferential direction centering on the inspection target pixel O 1. Pixels S 1 to S 56 are set.

なお、検査対象画素Oと比較対象画素S〜S56との距離が7画素である欠陥強調フィルター構成70により、比較対象画素S〜S56を設定したが、上記したように、検出対象となるスジ状欠陥の幅寸法に応じて適宜欠陥強調フィルター構成70が選択される。すなわち、本実施の形態では、検査対象画素Oと比較対象画素S〜S56との輝度差で欠陥を強調するため、スジ状欠陥は比較対象画素S〜S56で囲まれるエリア内に納まる幅寸法でなければ検出できない。従って、検出したいスジ状欠陥の大きさによって、前記検査対象画素Oと比較対象画素S〜S56の距離を設定すればよい。 The comparison target pixels S 1 to S 56 are set by the defect enhancement filter configuration 70 in which the distance between the inspection target pixel O 1 and the comparison target pixels S 1 to S 56 is 7 pixels. The defect emphasis filter configuration 70 is appropriately selected according to the width dimension of the target stripe defect. That is, in the present embodiment, the defect is emphasized by the luminance difference between the inspection target pixel O 1 and the comparison target pixels S 1 to S 56 , so that the streak defect is within the area surrounded by the comparison target pixels S 1 to S 56 . It can be detected only if the width is within the range. Therefore, the distance between the inspection target pixel O 1 and the comparison target pixels S 1 to S 56 may be set according to the size of the stripe defect to be detected.

そして、比較対象画素群設定手段612は、これらの比較対象画素S〜S56を、検査対象画素Oを中心として点対称となる一対の比較対象画素をセットとした、28個の比較対象画素群に分けて設定する。 The comparison target pixel group setting unit 612 then sets these comparison target pixels S 1 to S 56 as a set of 28 comparison targets that are a pair of comparison target pixels that are symmetric about the inspection target pixel O 1. Set by dividing into pixel groups.

次に、欠陥強調処理手段61は、最小輝度差算出手段613により最小輝度差算出工程を実行する(ST23)。具体的には、最小輝度差算出手段613は、まず第1の比較対象画素群(S,S29)の一対の比較対象画素を順に選択し、式(1)(2)に示すように、検査対象画素Oの輝度値から各比較対象画素S,S29の輝度値を引いて明欠陥輝度差Fws1,Fws29を求める。また、最小輝度差算出手段613は、各比較対象画素S,S29の輝度値から検査対象画素Oの輝度値を引いて暗欠陥輝度差Fbs1,Fbs29を求める。 Next, the defect enhancement processing means 61 performs a minimum luminance difference calculation step by the minimum luminance difference calculation means 613 (ST23). Specifically, the minimum luminance difference calculation unit 613 first selects a pair of comparison target pixels in the first comparison target pixel group (S 1 , S 29 ) in order, as shown in Expressions (1) and (2). , obtaining the inspection target pixel each comparison target pixel S 1 from the luminance value of O 1, bright defect luminance difference by subtracting the luminance value of S 29 F ws1, F ws29. Further, the minimum luminance difference calculation means 613 subtracts the luminance value of the inspection target pixel O 1 from the luminance values of the comparison target pixels S 1 and S 29 to obtain the dark defect luminance differences F bs1 and F bs29 .

次に、最小輝度差算出手段613は、式(3)および式(6)を用いて、第1の比較対象画素群の各明欠陥輝度差Fws1,Fws29のうち、値が最小となる明欠陥最小輝度差Dws1、および、各暗欠陥輝度差Fbs1,Fbs29のうち、値が最小となる暗欠陥最小輝度差Dbs1を求める。 Next, the minimum luminance difference calculation unit 613, using Equation (3) and (6), the first comparison the bright defect luminance difference of the target pixel group F ws1, among F Ws29, the value is minimum bright defect minimum luminance difference D ws1, and, among the dark defect luminance difference F bs1, F bs29, obtaining the dark defect minimum luminance difference D bs1 value is minimized.

次に、最小輝度差算出手段613は、第2の比較対象画素群の各画素を順次1画素ずつ選択しながら、上記処理と同様に、検査対象画素Oの輝度値から各比較対象画素S,S30の輝度値を引いた明欠陥輝度差Fws2,Fws30、および各比較対象画素S,S30の輝度値から検査対象画素Oの輝度値を引いた暗欠陥輝度差Fbs2,Fbs30を求める。そして、上記第1の比較画素群と同様に、これらの値の最小値である明欠陥最小輝度差Dws1、および暗欠陥最小輝度差Dbs1を求める。
最小輝度差算出手段613は、n=3〜28に対しても、上記第1の比較画素群、第2の比較画素群と同様の処理を実施し、明欠陥最小輝度差Dwsn、および暗欠陥最小輝度差Dbsnを順次求める。
Next, the minimum luminance difference calculating unit 613 sequentially selects each pixel of the second comparison target pixel group one by one, and in the same manner as the above processing, calculates each comparison target pixel S from the luminance value of the inspection target pixel O 1. 2 and the bright defect luminance difference F ws2 and F ws30 obtained by subtracting the luminance values of S 30 and the dark defect luminance difference F obtained by subtracting the luminance value of the inspection target pixel O 1 from the luminance values of the comparison target pixels S 2 and S 30. bs2 and Fbs30 are obtained. Then, as in the first comparative pixel group, determine these minimum and is bright defect minimum luminance difference D ws1 value and dark defect minimum luminance difference D bs1.
The minimum luminance difference calculation unit 613 performs the same processing as that for the first comparison pixel group and the second comparison pixel group for n = 3 to 28 , and determines the bright defect minimum luminance difference D wsn and darkness. The defect minimum luminance difference D bsn is obtained sequentially.

次に、欠陥強調処理手段61は、欠陥強調値算出手段614により、検査対象画素の欠陥強調値を設定する欠陥強調値算出工程を実行する(ST24)。具体的には、欠陥強調値算出手段614は、各比較対象画素群ごとに算出した明欠陥最小輝度差Dwsnのうちで、値が最大となるものを検査対象画素Oの位置の明欠陥強調値R1として設定し、各比較対象画素群ごとに算出した明欠陥最小輝度差Dwsnのうちで、値が最大となるものを検査対象画素Oの位置の暗欠陥強調値R2として設定する。 Next, the defect emphasis processing means 61 performs a defect emphasis value calculation step of setting the defect emphasis value of the inspection target pixel by the defect emphasis value calculation means 614 (ST24). Specifically, the defect emphasis value calculation means 614 uses the bright defect minimum luminance difference D wsn calculated for each comparison target pixel group as the bright defect at the position of the inspection target pixel O 1 with the maximum value. The brightness value minimum brightness difference D wsn calculated for each comparison target pixel group is set as the enhancement value R1, and the one with the maximum value is set as the dark defect enhancement value R2 at the position of the inspection target pixel O 1. .

欠陥強調処理手段61は、図10に示すように、取得した画像の全体にわたって欠陥強調処理が済んだか否かを判断し(ST25)、処理済みでない場合には、検査対象画素Oを移動させて別の検査対象画素Oを選定し(ST21)、比較対象画素群設定工程ST22、最小輝度差算出工程ST23、欠陥強調値算出工程ST24を行う。すなわち、検査対象画素OをCCDカメラ5の撮像画素単位に設定しているため、検査対象画素Oを撮像画素毎に順次移動して各工程ST21〜24を順次行えばよい。 As shown in FIG. 10, the defect enhancement processing means 61 determines whether or not the defect enhancement processing has been completed for the entire acquired image (ST25). If not, the inspection target pixel O 1 is moved. Then, another inspection target pixel O 1 is selected (ST21), and a comparison target pixel group setting step ST22, a minimum luminance difference calculation step ST23, and a defect enhancement value calculation step ST24 are performed. That is, since the inspection target pixel O 1 is set for each imaging pixel of the CCD camera 5, the inspection target pixel O 1 may be sequentially moved for each imaging pixel, and the steps ST21 to ST24 may be sequentially performed.

一方、ST25において処理済みであった場合には、欠陥強調処理手段61は、各画素毎に算出した欠陥強調値による欠陥強調画像を生成する(ST26)。すなわち、欠陥強調処理手段61は、明欠陥強調値R1に基づいた明欠陥強調画像を生成し、暗欠陥強調値R2に基づいた暗欠陥強調画像を生成する。ここで、本実施の形態では、欠陥強調処理手段61は、各欠陥強調値R1,R2を輝度値とした明欠陥強調画像および暗欠陥強調画像を生成するが、例えば各欠陥強調値R1,R2に応じたレベル値を設定し、このレベル値に応じて輝度値や色度を設定した強調画像を生成するものであってもよい。ここで、本実施の形態における欠陥検出処理のサンプルデータとして、図12に、撮像画像の一例を示し、図13に、図12の撮像画像に対する明欠陥強調画像を示し、図14に、図12の撮像画像に対する暗欠陥強調画像を示す。
なお、欠陥強調処理手段61は、明欠陥あるいは暗欠陥のいずれか一方の欠陥強調値しか算出していない場合には、算出した欠陥強調値による欠陥強調画像のみを生成する。
以上により欠陥強調処理工程ST2が終了する。
On the other hand, if the processing has been completed in ST25, the defect enhancement processing means 61 generates a defect enhanced image using the defect enhancement value calculated for each pixel (ST26). That is, the defect enhancement processing means 61 generates a bright defect enhanced image based on the bright defect enhanced value R1, and generates a dark defect enhanced image based on the dark defect enhanced value R2. Here, in the present embodiment, the defect enhancement processing means 61 generates a bright defect enhancement image and a dark defect enhancement image with the defect enhancement values R1, R2 as luminance values. For example, the defect enhancement values R1, R2 It is also possible to set a level value in accordance with, and generate an emphasized image in which the luminance value and chromaticity are set in accordance with the level value. Here, as sample data of the defect detection processing in the present embodiment, FIG. 12 shows an example of a captured image, FIG. 13 shows a bright defect enhanced image with respect to the captured image of FIG. 12, and FIG. The dark defect emphasis image with respect to the captured image of is shown.
In addition, the defect emphasis processing unit 61 generates only the defect emphasis image based on the calculated defect emphasis value when only the defect emphasis value of either the bright defect or the dark defect is calculated.
Thus, the defect enhancement processing step ST2 is completed.

欠陥強調処理工程ST2が終了すると、図9に示すように、欠陥検出手段62は、欠陥強調処理工程ST2で得られた欠陥強調画像に基づいて、スジ欠陥を検出する欠陥検出工程を実行する(ST3)。図11は、欠陥検出手段62による欠陥検出処理を示すフローチャートである。   When the defect enhancement processing step ST2 is completed, as shown in FIG. 9, the defect detection means 62 executes a defect detection step of detecting streak defects based on the defect enhancement image obtained in the defect enhancement processing step ST2 ( ST3). FIG. 11 is a flowchart showing the defect detection process by the defect detection means 62.

欠陥検出処理では、まず、欠陥検出手段62は、欠陥候補抽出手段621により、欠陥候補画素を抽出する欠陥候補抽出工程を実施する(ST31)。
これには、欠陥検出手段62の欠陥候補抽出手段621は、明欠陥強調画像に対して、式(8)に示すような明欠陥を切り出す明欠陥閾値を設定し、暗欠陥強調画像に対して、式(9)に示すような暗欠陥を切り出す暗欠陥閾値を設定する。そして、欠陥候補抽出手段621は、明欠陥強調画像および暗欠陥強調画像の輝度値、すなわち明欠陥強調値R1および暗欠陥強調値R2と、設定した明欠陥閾値wslevelおよび暗欠陥閾値bslevelをと比較し、閾値以上となる画素を欠陥候補画素として切り出す。この際、欠陥候補抽出手段621は、明欠陥強調結果に対しては明欠陥閾値wslevel以上の画素を明欠陥候補画素として検出し、暗欠陥強調結果に対しては暗欠陥閾値bslevel以上の画素を暗欠陥候補画素として検出する。
In the defect detection process, first, the defect detection means 62 performs a defect candidate extraction step of extracting defect candidate pixels by the defect candidate extraction means 621 (ST31).
For this purpose, the defect candidate extraction unit 621 of the defect detection unit 62 sets a bright defect threshold for cutting out a bright defect as shown in Expression (8) for the bright defect emphasized image, and for the dark defect emphasized image. A dark defect threshold value for cutting out a dark defect as shown in Expression (9) is set. Then, the defect candidate extraction unit 621 compares the brightness values of the bright defect enhanced image and the dark defect enhanced image, that is, the bright defect enhanced value R1 and the dark defect enhanced value R2, with the set bright defect threshold wslevel and dark defect threshold bslevel. Then, pixels that are equal to or greater than the threshold are cut out as defect candidate pixels. At this time, the defect candidate extraction unit 621 detects pixels having the bright defect threshold wslevel or higher as the bright defect candidate pixels for the bright defect enhancement result, and detects pixels having the dark defect threshold bslevel or higher for the dark defect enhancement result. It is detected as a dark defect candidate pixel.

次に、欠陥検出手段62は、外接四角形設定手段622により、欠陥候補画素群81を設定する欠陥候補画素群抽出工程を実施し(ST32)、さらに、この欠陥候補画素群81に外接する検査外接四角形82を設定する外接四角形設定工程を実施する(ST33)。   Next, the defect detection means 62 carries out a defect candidate pixel group extraction step for setting the defect candidate pixel group 81 by the circumscribed rectangle setting means 622 (ST32), and further, the inspection circumscribing that circumscribes the defect candidate pixel group 81 A circumscribed rectangle setting process for setting the rectangle 82 is performed (ST33).

具体的には、欠陥候補画素群抽出工程では、外接四角形設定手段622は、ST31により抽出される各欠陥候補画素に対して、周囲8画素範囲内に他の欠陥候補画素があるか否かを判断する。そして、欠陥候補画素の周囲8画素内に他の欠陥候補画素がある場合、これらの欠陥候補画素を互いに関連付け、欠陥候補画素群81として抽出する。ここで、欠陥候補画素群81に含まれる欠陥候補画素の数が所定閾値未満である場合、欠陥候補画素がノイズであることが考えられるため、この欠陥候補画素群81に対しては、以降の処理を実施させない動作をしてもよい。   Specifically, in the defect candidate pixel group extraction step, the circumscribed rectangle setting unit 622 determines whether or not there is another defect candidate pixel in the surrounding eight pixel range for each defect candidate pixel extracted in ST31. to decide. When there are other defect candidate pixels in the eight pixels around the defect candidate pixels, these defect candidate pixels are associated with each other and extracted as a defect candidate pixel group 81. Here, when the number of defect candidate pixels included in the defect candidate pixel group 81 is less than the predetermined threshold, it is considered that the defect candidate pixel is noise. You may perform operation | movement which does not implement a process.

また、ST33の外接四角形設定工程では、外接四角形設定手段622は、欠陥候補画素群81に含まれる外周欠陥候補画素を検出し、これらの外周欠陥候補画素に外接する外接長方形のうち、面積が最小となる外接長方形を検査外接四角形82として設定する。   In the circumscribed rectangle setting step of ST33, the circumscribed rectangle setting means 622 detects the peripheral defect candidate pixels included in the defect candidate pixel group 81, and the area of the circumscribed rectangle circumscribing these peripheral defect candidate pixels is the smallest. The circumscribed rectangle is set as the inspection circumscribed rectangle 82.

この後、欠陥検出手段62は、寸法比算出手段623によりST33の外接四角形設定処理にて設定された検査外接四角形82の長辺の長さ寸法lおよび短辺の長さ寸法hを計測する。そして、寸法比算出手段623は、長辺の長さに対する短辺の長さの比である寸法比M1を算出する寸法比算出工程を実施する(ST34)。   Thereafter, the defect detection means 62 measures the length dimension l of the long side and the length dimension h of the short side of the inspection circumscribed rectangle 82 set in the circumscribed rectangle setting process of ST33 by the dimension ratio calculating means 623. Then, the dimension ratio calculating means 623 performs a dimension ratio calculating step of calculating the dimension ratio M1, which is the ratio of the length of the short side to the length of the long side (ST34).

また、欠陥検出手段62は、面積比算出手段624により、ST33の検査外接四角形82に対する欠陥候補画素群81の面積比を算出する面積比算出工程を実施する(ST35)。具体的には、面積比算出手段624は、例えば欠陥候補画素群81に含まれる欠陥候補画素の個数mを計測し、1画素分の面積aを掛け合わせることで欠陥候補画素群81の面積(ma)を算出し、検査外接四角形82の面積(lh)との面積比(ma/lh)を算出する。   Further, the defect detection means 62 performs an area ratio calculation step of calculating the area ratio of the defect candidate pixel group 81 with respect to the inspection circumscribed rectangle 82 in ST33 by the area ratio calculation means 624 (ST35). Specifically, the area ratio calculation unit 624 measures, for example, the number m of defect candidate pixels included in the defect candidate pixel group 81 and multiplies the area a for one pixel ( ma) is calculated, and the area ratio (ma / lh) to the area (lh) of the inspection circumscribed rectangle 82 is calculated.

次に、欠陥検出手段62は、欠陥特定手段625により、欠陥候補画素群81からスジ状欠陥のみを特定する欠陥特定工程を実施する(ST36)。
具体的には、欠陥特定手段625は、ST34の寸法比算出処理にて算出される寸法比M1と所定の寸法比閾値N1(例えばN1=0.1)とを比較し、寸法比M1が寸法比閾値N1未満である場合にその欠陥候補画素群81をスジ状欠陥として特定する。また、欠陥特定手段625は、ST35の面積比算出処置にて算出される面積比M2と所定の面積比閾値N2(例えばN2=0.1)とを比較し、面積比M2が面積比閾値N2未満である場合に、その欠陥候補画素群81をスジ状欠陥として特定する。すなわち、欠陥特定手段625は、寸法比M1が寸法比閾値N1未満となる欠陥候補画素群81、または面積比M2が面積比閾値N2未満となる欠陥候補画素群81を検出し、スジ状欠陥として特定する。
Next, the defect detection means 62 carries out a defect specification step of specifying only a streak-like defect from the defect candidate pixel group 81 by the defect specification means 625 (ST36).
Specifically, the defect specifying means 625 compares the dimension ratio M1 calculated in the dimension ratio calculation process of ST34 with a predetermined dimension ratio threshold N1 (for example, N1 = 0.1), and the dimension ratio M1 is the dimension. When it is less than the ratio threshold N1, the defect candidate pixel group 81 is specified as a streak defect. Further, the defect identification unit 625 compares the area ratio M2 calculated in the area ratio calculation process of ST35 with a predetermined area ratio threshold N2 (for example, N2 = 0.1), and the area ratio M2 is the area ratio threshold N2. If it is less, the defect candidate pixel group 81 is specified as a streak-like defect. That is, the defect specifying means 625 detects a defect candidate pixel group 81 having a dimension ratio M1 less than the dimension ratio threshold N1, or a defect candidate pixel group 81 having an area ratio M2 less than the area ratio threshold N2, and creates a streak-like defect. Identify.

また、欠陥検出手段62は、特定したスジ状欠陥に基づいた欠陥特定画像を生成する。ここで、欠陥検出手段62は、明欠陥検出強調画像および暗欠陥強調画像に対して、それぞれ欠陥特定画像を生成する。すなわち、欠陥検出手段62は、図13に示すような明欠陥強調画像に対して検出されるスジ欠陥に基づいて、図15に示すような明欠陥特定画像を生成し、また、図14に示すような暗欠陥強調画像に対して検出されるスジ欠陥に基づいて、図16に示すような暗欠陥特定画像を生成する。
なお、これらの明欠陥特定画像および暗欠陥特定画像を合成して、1つの欠陥特定画像とする処理を実施してもよい。
Moreover, the defect detection means 62 produces | generates the defect specific image based on the specified stripe-shaped defect. Here, the defect detection means 62 generates a defect specific image for each of the bright defect detection enhanced image and the dark defect enhanced image. That is, the defect detection means 62 generates a bright defect specifying image as shown in FIG. 15 based on the streak defect detected for the bright defect emphasized image as shown in FIG. 13, and also shown in FIG. Based on the streak defect detected with respect to such a dark defect enhanced image, a dark defect specific image as shown in FIG. 16 is generated.
Note that a process of combining these bright defect specific image and dark defect specific image into one defect specific image may be performed.

なお、上記実施の形態では、欠陥強調フィルター構成70として、中心画素71から比較設定画素72までの画素間距離が7画素である例を示したが、これに限定されるものではない。例えば、検査対象となるスジ欠陥の幅寸法などが特に設定されない場合などでは、中心画素71から比較設定画素72までの画素間距離が異なる複数の欠陥強調フィルター構成70を用い、各欠陥強調フィルター構成70により設定された欠陥強調値R1,R2に基づいて、スジ状欠陥を特定する欠陥検出処理を実施してもよい。この場合、各欠陥強調フィルター構成70に対応して、様々なサイズのスジ状欠陥を検出することが可能となる。また、このように検出されたスジ状欠陥を合成して例えば1つの欠陥特定画像とすることで、様々な幅寸法のスジ状欠陥が表示した欠陥特定画像を得ることができる。   In the above-described embodiment, the example in which the inter-pixel distance from the center pixel 71 to the comparison setting pixel 72 is 7 pixels is shown as the defect emphasis filter configuration 70, but the present invention is not limited to this. For example, when the width dimension of the stripe defect to be inspected is not particularly set, a plurality of defect enhancement filter configurations 70 having different inter-pixel distances from the center pixel 71 to the comparison setting pixel 72 are used, and each defect enhancement filter configuration Based on the defect emphasis values R1 and R2 set by 70, a defect detection process for specifying a streak defect may be performed. In this case, it becomes possible to detect streak-like defects of various sizes corresponding to each defect enhancement filter configuration 70. Moreover, the defect specific image which displayed the stripe-shaped defect of various width dimensions can be obtained by synthesize | combining the stripe-shaped defect detected in this way, and making it one defect specific image, for example.

〔実施の形態の作用効果〕
上述のように、本実施の形態の欠陥検出装置100では、欠陥強調処理手段61は、検査対象画素Oの周囲に複数の上記比較対象画素S〜S56を配置し、かつ、これらの上記比較対象画素S〜S56を複数の比較対象画素群に分けて設定し、前記検査対象画素Oの輝度値と、各比較対象画素S〜S56の輝度値との差を求め、比較対象画素群ごとに輝度差データが最も小さい最小輝度差Dwsn,Dbsnを算出し、これらの最小輝度差Dwsn,Dbsnのうち、値が大きいものを検査対象画素Oの欠陥強調値R1,R2としている。
そして、欠陥検出手段62は、欠陥候補抽出手段621により、上記のように算出された欠陥強調値R1,R2に基づいて欠陥候補画素を抽出し、外接四角形設定手段622により、互いに隣接する欠陥候補画素同士を連結した欠陥候補画素群81の検査外接四角形82を設定する。その後、欠陥検出手段62は、寸法比算出手段623により、検査外接四角形の長辺に対する短辺の寸法比M1を算出し、面積比算出手段624により、検査外接四角形に対する欠陥候補画素群81の面積比M2を算出する。そして、欠陥特定手段625は、寸法比M1が寸法比閾値N1未満となる欠陥候補画素群81、または面積比M2が面積比閾値N2未満となる欠陥候補画素群81を抽出し、これらの欠陥候補画素群81をスジ状欠陥として検出する。
[Effects of Embodiment]
As described above, in the defect detection apparatus 100 of the present embodiment, the defect enhancement processing unit 61 arranges the plurality of comparison target pixels S 1 to S 56 around the inspection target pixel O 1 , and these The comparison target pixels S 1 to S 56 are divided into a plurality of comparison target pixel groups and set, and the difference between the luminance value of the inspection target pixel O 1 and the luminance value of each comparison target pixel S 1 to S 56 is obtained. Then, the minimum luminance differences D wsn and D bsn having the smallest luminance difference data are calculated for each comparison target pixel group, and among these minimum luminance differences D wsn and D bsn , the largest value is determined as the defect of the inspection target pixel O 1 . Emphasized values R1 and R2.
Then, the defect detection means 62 extracts defect candidate pixels based on the defect enhancement values R1 and R2 calculated as described above by the defect candidate extraction means 621, and the defect candidate adjacent to each other by the circumscribed rectangle setting means 622. An inspection circumscribed rectangle 82 of the defect candidate pixel group 81 in which the pixels are connected is set. Thereafter, the defect detection means 62 calculates the size ratio M1 of the short side with respect to the long side of the inspection circumscribed rectangle by the dimension ratio calculation means 623, and the area of the defect candidate pixel group 81 for the inspection circumscribed rectangle by the area ratio calculation means 624. The ratio M2 is calculated. Then, the defect specifying unit 625 extracts a defect candidate pixel group 81 in which the size ratio M1 is less than the size ratio threshold N1, or a defect candidate pixel group 81 in which the area ratio M2 is less than the area ratio threshold N2, and these defect candidates. The pixel group 81 is detected as a streak defect.

このため、欠陥検出装置100では、各比較対象画素群において最小輝度差を求めることで、各比較対象画素群において、前記検査対象画素Oを含み、かつ、比較対象画素で囲まれる領域内にあるシミ状欠陥および比較対象画素に囲われる領域内を通るスジ状欠陥を強調することができる。この時、各比較対象画素群は、比較対象画素の位置が互いに異なるため、一方の比較対象画素群では強調できない欠陥も、他方の比較対象画素群において強調できるため、各比較対象画素群の最小輝度差のうち、値が大きいものを検査対象画素Oの欠陥強調値とすることで、シミ状欠陥およびスジ状欠陥の欠陥候補画素を確実に強調して検出することができ、スジ状欠陥の角度による検出漏れなどを防止でき、欠陥検出感度を向上させることができる。
そして、上記のように検出された欠陥候補画素に対して、欠陥候補画素群81および検査外接四角形82を設定し、この検査外接四角形82に対する寸法比M1、および検査外接四角形82に対する欠陥候補画素群81の面積比M2を算出する。このような検査外接四角形82を用いたスジ状欠陥の検出では、欠陥候補画素群81が直線状のスジ状欠陥である場合、面積比M2はM2≒1となるが、検査外接四角形82の長辺に対する短辺の長さ寸法が小さくなり、寸法比M1が0に近い値となる。したがって、欠陥特定手段625では、この寸法比M1を寸法比閾値N1と比較することで、容易に欠陥候補画素群81から直線状のスジ状欠陥と検出することができる。また、欠陥候補画素群81が曲線状、折線状、または環状のスジ状欠陥である場合、寸法比M1は1に近い値となる場合もあるが、面積比M2は0に近い値となる。したがって、欠陥特定手段625では、この面積比M2を面積比閾値N2と比較することで、容易に曲線状、折線状、または環状のスジ状欠陥を検出することができる。
以上により、欠陥強調処理手段61により、欠陥候補画素を精度よく検出することができ、欠陥検出手段62により、これらの欠陥候補画素からスジ状欠陥を精度よく特定することができる。したがって、被検査物1からスジ状欠陥のみを検出する検査において、容易にかつ精度よくスジ状欠陥を検出することができる。
Therefore, the defect detection apparatus 100, by obtaining the minimum luminance difference at each comparison pixel group, in each comparison pixel group includes the inspection target pixel O 1, and, within the area enclosed by the comparison pixel A certain spot-like defect and a streak-like defect passing through a region surrounded by the comparison target pixel can be emphasized. At this time, since each comparison target pixel group is different in position of the comparison target pixel, defects that cannot be emphasized in one comparison target pixel group can be emphasized in the other comparison target pixel group. By setting a larger value among the luminance differences as the defect emphasis value of the inspection target pixel O 1 , it is possible to surely emphasize and detect the defect candidate pixel of the spot-like defect and the streak-like defect. The detection omission due to the angle of can be prevented, and the defect detection sensitivity can be improved.
Then, the defect candidate pixel group 81 and the inspection circumscribed rectangle 82 are set for the defect candidate pixels detected as described above, and the dimension ratio M1 for the inspection circumscribed rectangle 82 and the defect candidate pixel group for the inspection circumscribed rectangle 82 are set. An area ratio M2 of 81 is calculated. In the detection of the stripe defect using the inspection circumscribed rectangle 82, when the defect candidate pixel group 81 is a linear stripe defect, the area ratio M2 is M2≈1, but the length of the inspection circumscribed rectangle 82 is long. The length dimension of the short side with respect to the side becomes small, and the dimension ratio M1 becomes a value close to zero. Therefore, the defect specifying means 625 can easily detect a linear streak defect from the defect candidate pixel group 81 by comparing the dimension ratio M1 with the dimension ratio threshold N1. In addition, when the defect candidate pixel group 81 is a curved, broken line, or annular streak defect, the dimension ratio M1 may be a value close to 1, but the area ratio M2 is a value close to 0. Therefore, the defect specifying means 625 can easily detect a curved, bent, or annular streak defect by comparing the area ratio M2 with the area ratio threshold N2.
As described above, the defect enhancement processing unit 61 can detect the defect candidate pixels with high accuracy, and the defect detection unit 62 can accurately identify the streak-like defects from these defect candidate pixels. Therefore, in the inspection for detecting only the streak-like defect from the inspection object 1, the streak-like defect can be easily and accurately detected.

また、最小輝度差算出手段613は、最小輝度差の算出において、式(1)(2)および式(4)(5)を用いることで、明欠陥最小輝度差Dwsnおよび暗欠陥最小輝度差Dbsnを求め、欠陥強調値算出手段614は、これらの明欠陥最小輝度差Dwsnおよび暗欠陥最小輝度差Dbsnから、それぞれ明欠陥強調値R1および暗欠陥強調値R2を求め、欠陥検出手段62では、これら明欠陥強調値R1および暗欠陥強調値R2に基づいて、スジ状明欠陥およびスジ状暗欠陥をそれぞれ検出する。
このため、明欠陥と暗欠陥とを分けてスジ状欠陥を検出することができ、欠陥検出精度をより向上させることができる。また、被検査物1における明欠陥、暗欠陥をそれぞれ分別して検出したい場合や、明欠陥および暗欠陥のうちいずれか一方を検出した場合にも容易に対応することができ、精度よく明欠陥のスジ状欠陥、暗欠陥のスジ状欠陥を検出することができる。
Further, the minimum luminance difference calculation means 613 uses the equations (1), (2), and (4), (5) in calculating the minimum luminance difference, so that the bright defect minimum luminance difference D wsn and the dark defect minimum luminance difference are calculated. D bsn is obtained, and the defect emphasis value calculating means 614 obtains the light defect emphasis value R1 and the dark defect emphasis value R2 from the light defect minimum luminance difference D wsn and the dark defect minimum luminance difference D bsn , respectively. At 62, a streak-like bright defect and a streak-like dark defect are detected based on the bright defect enhancement value R1 and the dark defect enhancement value R2, respectively.
For this reason, a streak-like defect can be detected separately for a bright defect and a dark defect, and the defect detection accuracy can be further improved. Further, it is possible to easily cope with a case where it is desired to separately detect and detect a light defect and a dark defect in the inspection object 1 or a case where any one of a light defect and a dark defect is detected. It is possible to detect a streak defect and a dark defect.

また、欠陥強調処理手段61の比較対象画素群設定手段612は、検出すべきスジ状欠陥の幅寸法に応じて、欠陥強調フィルター構成70を選択して比較対象画素および比較対象画素群を設定する。
このため、例えば利用者の設定入力により、中心画素71から比較設定画素72までの画素間距離がより短い欠陥強調フィルター構成70を選択することで、より細かいスジ状欠陥のみを検出することができる。したがって、検出するスジ状欠陥の幅寸法を容易に変更することができ、検査目的に応じた適切な欠陥検出を実施することができる。
The comparison target pixel group setting unit 612 of the defect enhancement processing unit 61 selects the defect enhancement filter configuration 70 according to the width dimension of the stripe defect to be detected, and sets the comparison target pixel and the comparison target pixel group. .
For this reason, for example, by selecting a defect enhancement filter configuration 70 having a shorter inter-pixel distance from the center pixel 71 to the comparison setting pixel 72 by a user's setting input, only finer streak-like defects can be detected. . Therefore, the width dimension of the streak-like defect to be detected can be easily changed, and appropriate defect detection according to the inspection purpose can be performed.

また、この時、比較対象画素群設定手段612は、検出すべきスジ状欠陥の幅寸法に対して、中心画素71を挟んで配置される一対の比較設定画素72の画素間距離が2〜3画素だけ大きい欠陥強調フィルター構成70を用いて、比較対象画素および比較対象画素群を設定する。
欠陥強調フィルター構成70の中心画素71を挟んで配置される一対の比較設定画素72の画素間距離が、検出すべきスジ状欠陥の幅寸法と同寸法以上である場合、目的とする幅寸法のスジ状欠陥を検出することができるが、例えばスジ状欠陥の一部に幅寸法が大きくなる部分がある場合など、欠陥強調値が正しく算出されず、検出漏れが起こる場合がある。これに対して、上記のように、中心画素71を挟んで配置される一対の比較設定画素72の画素間距離が、検出すべきスジ状欠陥の幅寸法よりも2〜3画素大きい欠陥強調フィルター構成70を用いることで、より精度よくスジ状欠陥を検出することができる。なお、中心画素71を挟んで点対称配置される一対の比較設定画素72間の画素間距離が、検出すべきスジ状欠陥の幅寸法よりもさらに大きい欠陥強調フィルター構成70を用いてもよいが、この場合、欠陥でない良品部分も欠陥として検出してしまうなど過検出などが考えられるため、上記のように、検出対象のスジ状欠陥の幅寸法に対して、中心画素71を挟んで配置される一対の比較設定画素72の画素間距離が2〜3画素だけ大きい欠陥強調フィルター構成70を用いることが好ましい。
Further, at this time, the comparison target pixel group setting unit 612 has a distance between pixels of a pair of comparison setting pixels 72 arranged with the center pixel 71 interposed therebetween with respect to the width dimension of the stripe defect to be detected. The comparison target pixel and the comparison target pixel group are set using the defect emphasis filter configuration 70 that is larger by the pixel.
When the distance between the pair of comparison setting pixels 72 arranged with the center pixel 71 of the defect enhancement filter configuration 70 sandwiched therebetween is equal to or larger than the width dimension of the stripe-like defect to be detected, Although a streak-like defect can be detected, for example, when a part of the streak-like defect has a part with an increased width dimension, the defect emphasis value is not calculated correctly, and detection omission may occur. On the other hand, as described above, the defect enhancement filter in which the inter-pixel distance between the pair of comparison setting pixels 72 arranged with the center pixel 71 interposed therebetween is two to three pixels larger than the width dimension of the stripe defect to be detected. By using the configuration 70, the stripe defect can be detected with higher accuracy. Note that the defect emphasis filter configuration 70 in which the inter-pixel distance between the pair of comparison setting pixels 72 arranged symmetrically with respect to the center pixel 71 may be larger than the width dimension of the stripe defect to be detected. In this case, since a non-defective non-defective part may be detected as a defect, for example, an over-detection may be considered. Therefore, as described above, the center pixel 71 is disposed with respect to the width dimension of the stripe-shaped defect to be detected. It is preferable to use a defect enhancement filter configuration 70 in which the distance between the pair of comparison setting pixels 72 is larger by 2 to 3 pixels.

そして、欠陥検出手段62の外接四角形設定手段622は、欠陥候補画素群81に外接する外接長方形のうち、面積が最小となるものと検査外接四角形82として設定する。そして、寸法比算出手段623および面積比算出手段624は、この検査外接四角形82に基づいてそれぞれ寸法比M1および面積比M2を算出する。
このような検査外接四角形82を設定することで、直線状のスジ欠陥がある場合、そのスジ欠陥の慣性軸方向と検査外接四角形の慣性軸方向(長辺に沿う方向)とを一致させることができる。すなわち、直線状のスジ欠陥の慣性軸方向に沿う長さ寸法と検査外接四角形82の長辺寸法とが略同一寸法となり、直線状のスジ欠陥の幅寸法と、検査外接四角形82の短辺寸法とが略同一寸法となる。したがって、検査外接四角形82の寸法比M1と寸法比閾値N1とを比較することで、直線状のスジ欠陥を容易に特定することができる。
また、面積比M2を用いて曲線状、折線状、環状などのスジ状欠陥を検出する場合において、上記のように検査外接四角形82を用いることで、検出精度を向上させることができる。すなわち、欠陥候補画素群81に外接する複数の外接長方形のうち、例えば面積が大きい外接四角形では、シミ状欠陥であっても、外接四角形の面積に対する欠陥候補画素の面積の比が小さくなる場合が考えられ、精度よくスジ状欠陥のみを検出することができない。これに対して、複数の外接長方形のうち、面積が最小となる外接長方形を検査外接四角形82とすると、曲線状、折線状、環状などのスジ状欠陥の場合のみ、面積比M2が小さくなり、シミ状欠陥では面積比M2が1に近い大きい値となる。したがって、このような検査外接四角形82を用いた面積比M2と面積比閾値N2とを比較することで、容易に、かつ精度よく曲線状、折線状、環状などのスジ状欠陥を検出することができる。
The circumscribed rectangle setting unit 622 of the defect detecting unit 62 sets the circumscribed rectangle that circumscribes the defect candidate pixel group 81 as the inspection circumscribed rectangle 82 that has the smallest area. Then, the dimension ratio calculating unit 623 and the area ratio calculating unit 624 calculate the dimension ratio M1 and the area ratio M2 based on the inspection circumscribed rectangle 82, respectively.
By setting such an inspection circumscribed rectangle 82, when there is a linear streak defect, it is possible to make the inertial axis direction of the streak defect coincide with the inertial axis direction (direction along the long side) of the inspection circumscribed rectangle. it can. That is, the length dimension along the inertial axis direction of the linear streak defect and the long side dimension of the inspection circumscribed rectangle 82 are substantially the same dimension, and the width dimension of the linear streak defect and the short side dimension of the inspection circumscribed rectangle 82 are the same. And have substantially the same dimensions. Therefore, by comparing the dimension ratio M1 of the inspection circumscribed rectangle 82 with the dimension ratio threshold N1, it is possible to easily identify the linear streak defect.
Further, when detecting a line-like defect such as a curved line, a broken line, or a ring using the area ratio M2, the detection accuracy can be improved by using the inspection circumscribed rectangle 82 as described above. That is, among the circumscribed rectangles circumscribing the defect candidate pixel group 81, for example, in the circumscribed rectangle having a large area, the ratio of the area of the defect candidate pixel to the area of the circumscribed rectangle may be small even for a spot-like defect. It is conceivable that only the streak defect cannot be detected with high accuracy. On the other hand, when the circumscribed rectangle having the smallest area among the plurality of circumscribed rectangles is the inspection circumscribed rectangle 82, the area ratio M2 is reduced only in the case of a line-shaped defect such as a curved line, a polygonal line, or a ring, In the spot-like defect, the area ratio M2 is a large value close to 1. Therefore, by comparing the area ratio M2 using the inspection circumscribed rectangle 82 and the area ratio threshold N2, it is possible to easily and accurately detect a line-shaped defect such as a curved line, a polygonal line, or a ring. it can.

〔他の実施の形態〕
なお、本発明は前述の実施形態に限定されるものではなく、本発明の目的を達成できる範囲での変形、改良等は本発明に含まれるものである。
例えば、上記実施の形態において、欠陥強調処理手段61および欠陥検出手段62は、記憶手段に記憶され、適宜CPUに読み出されて演算処理が実行されるプログラムとして構成される例を示したが、これに限定されるものではなく、例えばICチップなどの集積回路、各種ハードウェアにより構成されるものであってもよい。
[Other Embodiments]
It should be noted that the present invention is not limited to the above-described embodiments, and modifications, improvements, and the like within the scope that can achieve the object of the present invention are included in the present invention.
For example, in the above embodiment, the defect emphasis processing unit 61 and the defect detection unit 62 are stored in the storage unit, and have been shown as examples configured as programs that are appropriately read out by the CPU to execute arithmetic processing. However, the present invention is not limited to this, and for example, an integrated circuit such as an IC chip and various hardware may be used.

本発明は、被検査物1の撮像画像に、周囲と輝度差がある部分があれば検出できる。このため、本発明は、フレキシブル基板などにおける異物欠陥検出や、被検査物表面の傷や汚れの検出や、各種表示装置のスジ状欠陥の検出等に広く利用できる。   The present invention can detect if the captured image of the object to be inspected 1 has a portion having a luminance difference from the surrounding. For this reason, the present invention can be widely used for detection of foreign matter defects on a flexible substrate, detection of scratches and dirt on the surface of an object to be inspected, detection of streak defects of various display devices, and the like.

その他、本発明の実施の際の具体的な構造および手順は、本発明の目的を達成できる範囲で他の構造などに適宜変更できる。   In addition, the specific structure and procedure for carrying out the present invention can be changed as appropriate to other structures and the like within the scope of achieving the object of the present invention.

1…被検査物、61…欠陥強調処理手段、62…欠陥検出手段、70…欠陥強調フィルター構成、81…欠陥候補画素群、82…検査外接四角形、100…欠陥検出装置、611…検査対象画素選定手段、612…比較対象画素群設定手段、613…最小輝度差算出手段、614…欠陥強調値算出手段、621…欠陥候補抽出手段、622…外接四角形設定手段、623…寸法比算出手段、624…面積比算出手段、625…欠陥特定手段。   DESCRIPTION OF SYMBOLS 1 ... Inspection object, 61 ... Defect emphasis processing means, 62 ... Defect detection means, 70 ... Defect emphasis filter configuration, 81 ... Defect candidate pixel group, 82 ... Inspection circumscribed rectangle, 100 ... Defect detection apparatus, 611 ... Inspection object pixel Selection means, 612 ... Comparison target pixel group setting means, 613 ... Minimum luminance difference calculation means, 614 ... Defect enhancement value calculation means, 621 ... Defect candidate extraction means, 622 ... circumscribed rectangle setting means, 623 ... dimensional ratio calculation means, 624 ... Area ratio calculation means, 625 ... Defect identification means.

Claims (7)

被検査物を撮像した撮像画像に対して欠陥強調フィルターを用いて欠陥強調処理を行う欠陥強調処理工程と、
前記欠陥強調処理工程で得られた各画素の欠陥強調値に基づいて欠陥を検出する欠陥検出工程と、を備え、
前記欠陥強調処理工程は、
前記撮像画像に対して、検査対象画素を順次選定する検査対象画素選定工程と、
選定された検査対象画素の中心から所定距離離れた比較対象画素を検査対象画素の周囲に略円形状に複数配置し、これらの比較対象画素のうち前記検査対象画素を挟んで互いに点対称の位置に配置される一対の比較対象画素をセットとした比較対象画素群を複数設定する比較対象画素群設定工程と、
比較対象画素群に含まれる各比較対象画素の輝度値と、前記検査対象画素の輝度値との差である輝度差データを求め、それらの輝度差データのうち、値が最小となる最小輝度差を比較対象画素群毎に求める最小輝度差算出工程と、
比較対象画素群毎に算出された最小輝度差のうち、値が最大となる最小輝度差を前記検査対象画素の欠陥強調値とする欠陥強調値算出工程と、
を有し、
前記欠陥検出工程は、
前記欠陥強調値が所定の欠陥閾値以上となる画素を欠陥候補画素として抽出する欠陥候補抽出工程と、
互いに隣接する前記欠陥候補画素を欠陥候補画素群とし、この欠陥候補画素群に外接する外接長方形のうち、面積が最小となる外接長方形を検査外接四角形として設定する外接四角形設定工程と、
前記欠陥候補画素の慣性軸方向に沿う前記検査外接四角形の長辺寸法、および前記慣性軸方向に直交する幅方向に沿う前記検査外接四角形の短辺寸法を計測するとともに、長辺寸法に対する短辺寸法の比である寸法比を算出する寸法比算出工程と、
前記検査外接四角形に対する前記欠陥候補画素群の面積比を算出する面積比算出工程と、
前記寸法比算出工程にて算出される寸法比が所定の寸法比閾値未満となる場合、または前記面積比算出工程にて算出される面積比が所定の面積比閾値未満となる場合に、前記欠陥候補画素群をスジ状欠陥として特定する欠陥特定工程と、
を有することを特徴とする欠陥検出方法。
A defect enhancement processing step of performing defect enhancement processing using a defect enhancement filter on a captured image obtained by imaging the inspection object; and
A defect detection step of detecting a defect based on the defect enhancement value of each pixel obtained in the defect enhancement processing step, and
The defect emphasis processing step includes
An inspection target pixel selection step for sequentially selecting inspection target pixels for the captured image;
A plurality of comparison target pixels that are separated from the center of the selected inspection target pixel by a predetermined distance are arranged in a substantially circular shape around the inspection target pixel, and are located symmetrically with respect to each other across the inspection target pixel among these comparison target pixels A comparison target pixel group setting step of setting a plurality of comparison target pixel groups in which a pair of comparison target pixels arranged in a set is set;
The luminance difference data that is the difference between the luminance value of each comparison target pixel included in the comparison target pixel group and the luminance value of the inspection target pixel is obtained, and the minimum luminance difference that minimizes the value among the luminance difference data Calculating a minimum luminance difference for each comparison target pixel group,
A defect enhancement value calculating step in which a minimum luminance difference having a maximum value among the minimum luminance differences calculated for each comparison target pixel group is a defect enhancement value of the inspection target pixel; and
Have
The defect detection step includes
A defect candidate extraction step of extracting pixels with the defect enhancement value equal to or higher than a predetermined defect threshold as defect candidate pixels;
A circumscribed rectangle setting step for setting the defect candidate pixels adjacent to each other as a defect candidate pixel group, and setting a circumscribed rectangle having a minimum area as an inspection circumscribed rectangle among circumscribed rectangles circumscribing the defect candidate pixel group;
The long side dimension of the inspection circumscribed rectangle along the inertial axis direction of the defect candidate pixel and the short side dimension of the inspection circumscribed rectangle along the width direction orthogonal to the inertial axis direction are measured, and the short side with respect to the long side dimension is measured. A dimensional ratio calculating step of calculating a dimensional ratio which is a ratio of dimensions;
An area ratio calculating step of calculating an area ratio of the defect candidate pixel group with respect to the inspection circumscribed rectangle;
The defect when the dimensional ratio calculated in the dimensional ratio calculating step is less than a predetermined dimensional ratio threshold or when the area ratio calculated in the area ratio calculating step is less than a predetermined area ratio threshold. A defect identification step for identifying the candidate pixel group as a streak defect;
A defect detection method characterized by comprising:
請求項1に記載の欠陥検出方法において、
前記最小輝度差算出工程は、前記検査対象画素の輝度値から、比較対象画素群に含まれる各比較対象画素の輝度値を減算した明欠陥輝度差データから明欠陥最小輝度差を算出する明欠陥最小輝度差算出工程、および比較対象画素群に含まれる各比較対象画素の輝度値から、前記検査対象画素の輝度値を減算した暗欠陥輝度差データから暗欠陥最小輝度差を算出する暗欠陥最小輝度差算出工程と、を備え、
前記欠陥強調値算出工程は、前記明欠陥最小輝度差および前記暗欠陥最小輝度差に基づいて、明欠陥強調値および暗欠陥強調値をそれぞれ求め、
前記欠陥検出工程は、前記明欠陥強調値および前記暗欠陥強調値に基づいて、スジ状明欠陥およびスジ状暗欠陥をそれぞれ検出する
ことを特徴とする欠陥検出方法。
The defect detection method according to claim 1,
The minimum luminance difference calculating step calculates a light defect minimum luminance difference from light defect luminance difference data obtained by subtracting the luminance value of each comparison target pixel included in the comparison target pixel group from the luminance value of the inspection target pixel. Minimum dark difference calculation step, and dark defect minimum for calculating a dark defect minimum brightness difference from dark defect brightness difference data obtained by subtracting the brightness value of the inspection target pixel from the brightness value of each comparison target pixel included in the comparison target pixel group A luminance difference calculating step,
The defect enhancement value calculation step obtains a bright defect enhancement value and a dark defect enhancement value based on the bright defect minimum luminance difference and the dark defect minimum luminance difference,
The defect detection step detects a streak-like bright defect and a streak-like dark defect based on the bright defect enhancement value and the dark defect enhancement value, respectively.
請求項1または請求項2に記載の欠陥検出方法において、
前記欠陥強調処理工程は、検査対象画素から比較対象画素までの距離が異なる複数の欠陥強調フィルターを用いて前記欠陥強調処理を実施する
ことを特徴とする欠陥検出方法。
In the defect detection method according to claim 1 or 2,
In the defect enhancement processing step, the defect enhancement processing is performed using a plurality of defect enhancement filters having different distances from the inspection target pixel to the comparison target pixel.
請求項1ないし請求項3のいずれかに記載の欠陥検出方法において、
前記欠陥強調処理工程は、前記欠陥検出工程により検出する前記スジ状欠陥の幅寸法に応じて、前記検査対象画素から前記比較対象画素までの距離が設定された欠陥強調フィルターを用いて前記欠陥強調処理を実施する
ことを特徴とする欠陥検出方法。
The defect detection method according to any one of claims 1 to 3,
The defect enhancement processing step uses the defect enhancement filter in which a distance from the inspection target pixel to the comparison target pixel is set in accordance with the width dimension of the streak defect detected by the defect detection step. A defect detection method characterized by performing processing.
請求項4に記載の欠陥検出方法において、
前記欠陥強調処理工程は、前記検査対象画素から前記比較対象画素までの距離が、前記欠陥検出工程により検出する前記スジ状欠陥の幅寸法に対して所定画素分大きい距離となる欠陥強調フィルターを用いて前記欠陥強調処理を実施する
ことを特徴とする欠陥検出方法。
The defect detection method according to claim 4,
The defect enhancement processing step uses a defect enhancement filter in which a distance from the inspection target pixel to the comparison target pixel is a distance larger by a predetermined pixel than a width dimension of the streak defect detected by the defect detection step. And performing the defect enhancement process.
被検査物を撮像した撮像画像に対して欠陥強調フィルターを用いて欠陥強調処理を行う欠陥強調処理手段と、
前記欠陥強調処理工程で得られた各画素の欠陥強調値に基づいて欠陥を検出する欠陥検出手段と、を備え、
前記欠陥強調処理手段は、
前記撮像画像に対して、検査対象画素を順次選定する検査対象画素選定手段と、
選定された検査対象画素の中心から所定距離離れた比較対象画素を検査対象画素の周囲に略円形状に複数配置し、これらの比較対象画素のうち前記検査対象画素を挟んで互いに点対称の位置に配置される一対の比較対象画素をセットとした比較対象画素群を複数設定する比較対象画素群設定手段と、
比較対象画素群に含まれる各比較対象画素の輝度値と、前記検査対象画素の輝度値との差である輝度差データを求め、それらの輝度差データのうち、値が最小となる最小輝度差を比較対象画素群毎に求める最小輝度差算出手段と、
比較対象画素群毎に算出された最小輝度差のうち、値が最大となる最小輝度差を前記検査対象画素の欠陥強調値とする欠陥強調値算出手段と、
を有し、
前記欠陥検出手段は、
前記欠陥強調値が所定の欠陥閾値以上となる画素を欠陥候補画素として抽出する欠陥候補抽出手段と、
互いに隣接する前記欠陥候補画素を欠陥候補画素群とし、この欠陥候補画素群に外接する外接長方形のうち、面積が最小となる外接長方形を検査外接四角形として設定する外接四角形設定手段と、
前記欠陥候補画素の慣性軸方向に沿う前記検査外接四角形の長辺寸法、および前記慣性軸方向に直交する幅方向に沿う前記検査外接四角形の短辺寸法を計測するとともに、長辺寸法に対する短辺寸法の比である寸法比を算出する寸法比算出手段と、
前記検査外接四角形に対する前記欠陥候補画素群の面積比を算出する面積比算出手段と、
前記寸法比算出工程にて算出される寸法比が所定の寸法比閾値未満となる場合、または前記面積比算出工程にて算出される面積比が所定の面積比閾値未満となる場合に、前記欠陥候補画素群をスジ状欠陥として特定する欠陥特定手段と、
を有することを特徴とする欠陥検出装置。
Defect enhancement processing means for performing defect enhancement processing using a defect enhancement filter on a captured image obtained by imaging the inspection object;
A defect detection means for detecting a defect based on the defect enhancement value of each pixel obtained in the defect enhancement processing step,
The defect enhancement processing means includes
Inspection target pixel selection means for sequentially selecting inspection target pixels for the captured image;
A plurality of comparison target pixels that are separated from the center of the selected inspection target pixel by a predetermined distance are arranged in a substantially circular shape around the inspection target pixel, and are located symmetrically with respect to each other across the inspection target pixel among these comparison target pixels Comparison target pixel group setting means for setting a plurality of comparison target pixel groups in which a pair of comparison target pixels arranged in a set is set;
The luminance difference data that is the difference between the luminance value of each comparison target pixel included in the comparison target pixel group and the luminance value of the inspection target pixel is obtained, and the minimum luminance difference that minimizes the value among the luminance difference data A minimum luminance difference calculating means for obtaining for each comparison target pixel group,
A defect enhancement value calculation means for setting a minimum luminance difference having a maximum value among the minimum luminance differences calculated for each comparison target pixel group as a defect enhancement value of the inspection target pixel;
Have
The defect detection means includes
A defect candidate extracting means for extracting, as a defect candidate pixel, a pixel having the defect enhancement value equal to or greater than a predetermined defect threshold;
A circumscribed rectangle setting means for setting the defect candidate pixels adjacent to each other as a defect candidate pixel group, and setting a circumscribed rectangle having a minimum area as an inspection circumscribed rectangle among circumscribed rectangles circumscribing the defect candidate pixel group;
The long side dimension of the inspection circumscribed rectangle along the inertial axis direction of the defect candidate pixel and the short side dimension of the inspection circumscribed rectangle along the width direction orthogonal to the inertial axis direction are measured, and the short side with respect to the long side dimension is measured. A dimensional ratio calculating means for calculating a dimensional ratio which is a dimensional ratio;
An area ratio calculating means for calculating an area ratio of the defect candidate pixel group with respect to the inspection circumscribed rectangle;
The defect when the dimensional ratio calculated in the dimensional ratio calculating step is less than a predetermined dimensional ratio threshold or when the area ratio calculated in the area ratio calculating step is less than a predetermined area ratio threshold. A defect specifying means for specifying a candidate pixel group as a streak-like defect;
A defect detection apparatus comprising:
演算手段により読み込まれて演算処理される欠陥検出プログラムであって、
前記欠陥検出プログラムは、被検査物を撮像した撮像画像に対して欠陥強調フィルターを用いて欠陥強調処理を行う欠陥強調処理手段と、
前記欠陥強調処理工程で得られた各画素の欠陥強調値に基づいて欠陥を検出する欠陥検出手段と、を備え、
前記欠陥強調処理手段は、
前記撮像画像に対して、検査対象画素を順次選定する検査対象画素選定手段と、
選定された検査対象画素の中心から所定距離離れた比較対象画素を検査対象画素の周囲に略円形状に複数配置し、これらの比較対象画素のうち前記検査対象画素を挟んで互いに点対称の位置に配置される一対の比較対象画素をセットとした比較対象画素群を複数設定する比較対象画素群設定手段と、
比較対象画素群に含まれる各比較対象画素の輝度値と、前記検査対象画素の輝度値との差である輝度差データを求め、それらの輝度差データのうち、値が最小となる最小輝度差を比較対象画素群毎に求める最小輝度差算出手段と、
比較対象画素群毎に算出された最小輝度差のうち、値が最大となる最小輝度差を前記検査対象画素の欠陥強調値とする欠陥強調値算出手段と、
を有し、
前記欠陥検出手段は、
前記欠陥強調値が所定の欠陥閾値以上となる画素を欠陥候補画素として抽出する欠陥候補抽出手段と、
互いに隣接する前記欠陥候補画素を欠陥候補画素群とし、この欠陥候補画素群に外接する外接長方形のうち、面積が最小となる外接長方形を検査外接四角形として設定する外接四角形設定手段と、
前記欠陥候補画素の慣性軸方向に沿う前記検査外接四角形の長辺寸法、および前記慣性軸方向に直交する幅方向に沿う前記検査外接四角形の短辺寸法を計測するとともに、長辺寸法に対する短辺寸法の比である寸法比を算出する寸法比算出手段と、
前記検査外接四角形に対する前記欠陥候補画素群の面積比を算出する面積比算出手段と、
前記寸法比算出工程にて算出される寸法比が所定の寸法比閾値未満となる場合、または前記面積比算出工程にて算出される面積比が所定の面積比閾値未満となる場合に、前記欠陥候補画素群をスジ状欠陥として特定する欠陥特定手段と、
を有することを特徴とする欠陥検出プログラム。
A defect detection program that is read and calculated by a calculation means,
The defect detection program includes defect enhancement processing means for performing defect enhancement processing using a defect enhancement filter for a captured image obtained by imaging an inspection object;
A defect detection means for detecting a defect based on the defect enhancement value of each pixel obtained in the defect enhancement processing step,
The defect enhancement processing means includes
Inspection target pixel selection means for sequentially selecting inspection target pixels for the captured image;
A plurality of comparison target pixels that are separated from the center of the selected inspection target pixel by a predetermined distance are arranged in a substantially circular shape around the inspection target pixel, and are located symmetrically with respect to each other across the inspection target pixel among these comparison target pixels Comparison target pixel group setting means for setting a plurality of comparison target pixel groups in which a pair of comparison target pixels arranged in a set is set;
The luminance difference data that is the difference between the luminance value of each comparison target pixel included in the comparison target pixel group and the luminance value of the inspection target pixel is obtained, and the minimum luminance difference that minimizes the value among the luminance difference data A minimum luminance difference calculating means for obtaining for each comparison target pixel group,
A defect enhancement value calculation means for setting a minimum luminance difference having a maximum value among the minimum luminance differences calculated for each comparison target pixel group as a defect enhancement value of the inspection target pixel;
Have
The defect detection means includes
A defect candidate extracting means for extracting, as a defect candidate pixel, a pixel having the defect enhancement value equal to or greater than a predetermined defect threshold;
A circumscribed rectangle setting means for setting the defect candidate pixels adjacent to each other as a defect candidate pixel group, and setting a circumscribed rectangle having a minimum area as an inspection circumscribed rectangle among circumscribed rectangles circumscribing the defect candidate pixel group;
The long side dimension of the inspection circumscribed rectangle along the inertial axis direction of the defect candidate pixel and the short side dimension of the inspection circumscribed rectangle along the width direction orthogonal to the inertial axis direction are measured, and the short side with respect to the long side dimension is measured. A dimensional ratio calculating means for calculating a dimensional ratio which is a dimensional ratio;
An area ratio calculating means for calculating an area ratio of the defect candidate pixel group with respect to the inspection circumscribed rectangle;
The defect when the dimensional ratio calculated in the dimensional ratio calculating step is less than a predetermined dimensional ratio threshold or when the area ratio calculated in the area ratio calculating step is less than a predetermined area ratio threshold. A defect specifying means for specifying a candidate pixel group as a streak-like defect;
A defect detection program characterized by comprising:
JP2009150740A 2009-06-25 2009-06-25 Defect detection method, defect detection device and defect detection program Pending JP2011008482A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009150740A JP2011008482A (en) 2009-06-25 2009-06-25 Defect detection method, defect detection device and defect detection program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009150740A JP2011008482A (en) 2009-06-25 2009-06-25 Defect detection method, defect detection device and defect detection program

Publications (1)

Publication Number Publication Date
JP2011008482A true JP2011008482A (en) 2011-01-13

Family

ID=43565073

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009150740A Pending JP2011008482A (en) 2009-06-25 2009-06-25 Defect detection method, defect detection device and defect detection program

Country Status (1)

Country Link
JP (1) JP2011008482A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012099563A (en) * 2010-10-29 2012-05-24 Shin Etsu Handotai Co Ltd Wafer evaluation method and susceptor evaluation method
KR101813223B1 (en) * 2016-05-11 2018-01-30 한국과학기술원 Method and apparatus for detecting and classifying surface defect of image
US9933370B2 (en) 2013-10-17 2018-04-03 Hitachi High-Technologies Corporation Inspection apparatus
JP2019215336A (en) * 2018-05-24 2019-12-19 キーサイト テクノロジーズ, インク. Unevenness detection in master panel of flat panel display during manufacturing
CN114519714A (en) * 2022-04-20 2022-05-20 中导光电设备股份有限公司 Method and system for judging smudgy defect of display screen
JP7137880B1 (en) 2021-12-02 2022-09-15 株式会社岩崎電機製作所 Image processing device, image processing method, and image processing program

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012099563A (en) * 2010-10-29 2012-05-24 Shin Etsu Handotai Co Ltd Wafer evaluation method and susceptor evaluation method
US9933370B2 (en) 2013-10-17 2018-04-03 Hitachi High-Technologies Corporation Inspection apparatus
KR101813223B1 (en) * 2016-05-11 2018-01-30 한국과학기술원 Method and apparatus for detecting and classifying surface defect of image
JP2019215336A (en) * 2018-05-24 2019-12-19 キーサイト テクノロジーズ, インク. Unevenness detection in master panel of flat panel display during manufacturing
JP7461112B2 (en) 2018-05-24 2024-04-03 キーサイト テクノロジーズ, インク. Detection of uneven defects in master panels of flat panel displays during manufacturing
JP7137880B1 (en) 2021-12-02 2022-09-15 株式会社岩崎電機製作所 Image processing device, image processing method, and image processing program
JP2023082342A (en) * 2021-12-02 2023-06-14 株式会社岩崎電機製作所 Image processing device, image processing method, and image processing program
CN114519714A (en) * 2022-04-20 2022-05-20 中导光电设备股份有限公司 Method and system for judging smudgy defect of display screen
CN114519714B (en) * 2022-04-20 2022-07-26 中导光电设备股份有限公司 Method and system for judging smudgy defect of display screen

Similar Documents

Publication Publication Date Title
JP5225297B2 (en) Method for recognizing array region in die formed on wafer, and setting method for such method
US7764826B2 (en) Method and apparatus of reviewing defects on a semiconductor device
JP5313939B2 (en) Pattern inspection method, pattern inspection program, electronic device inspection system
TWI497032B (en) Defect inspection apparatus
JP2010520622A (en) Method for accurately identifying the edge of an inspection area for an array area formed on a wafer, and a method for binning detected defects in an array area formed on a wafer
KR20070024377A (en) Defect detecting method and defect detecting device
KR20180113572A (en) Defect classification apparatus and defect classification method
KR20090066212A (en) Defect detection method and defect detection apparatus
KR20130108413A (en) Charged particle beam apparatus
JP2011008482A (en) Defect detection method, defect detection device and defect detection program
JP2003057019A (en) Pattern inspection device and inspection method using the same
JP5088165B2 (en) Defect detection method and defect detection apparatus
KR19980032065A (en) Image processing method and apparatus
KR101146081B1 (en) Detection of macro-defects using micro-inspection inputs
JP2006284471A (en) Pattern inspection method, pattern inspection device and pattern inspecting program
JP2008020235A (en) Defect inspection device and defect inspection method
JP2005172559A (en) Method and device for detecting line defect on panel
JP4910128B2 (en) Defect inspection method for object surface
JP2006170921A (en) Visual inspection method and its apparatus
JP2009036582A (en) Inspection method, inspection device and inspection program of plane display panel
JP2011227748A (en) Image processing apparatus, image processing method, image processing program, and defect detection apparatus
JP5257063B2 (en) Defect detection method and defect detection apparatus
JP2008014842A (en) Method and apparatus for detecting stain defects
JP2008249413A (en) Defect detection method and device
CN117252861A (en) Method, device and system for detecting wafer surface defects