JP5359377B2 - Defect detection apparatus, defect detection method, and defect detection program - Google Patents
Defect detection apparatus, defect detection method, and defect detection program Download PDFInfo
- Publication number
- JP5359377B2 JP5359377B2 JP2009048114A JP2009048114A JP5359377B2 JP 5359377 B2 JP5359377 B2 JP 5359377B2 JP 2009048114 A JP2009048114 A JP 2009048114A JP 2009048114 A JP2009048114 A JP 2009048114A JP 5359377 B2 JP5359377 B2 JP 5359377B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- partial
- vector
- learning
- size
- 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.)
- Active
Links
Landscapes
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
Abstract
Description
この発明は検査画像から欠陥を検出する欠陥検出装置、欠陥検出方法および欠陥検出プログラムに関し、特に学習画像から取得された学習結果に基づいて欠陥を検出する技術に関するものである。 The present invention relates to a defect detection apparatus, a defect detection method, and a defect detection program for detecting a defect from an inspection image, and particularly to a technique for detecting a defect based on a learning result acquired from a learning image.
従来から、FA(Factory Automation)分野などにおいては、検査対象物(対象ワーク)に現れるキズやゴミなどの欠陥を検出する欠陥検査技術が開発されてきた。このような欠陥検査技術の代表的な方法として、検査対象物を撮影して得られる検査画像に対して画像処理を行なうことで欠陥を検出する、いわゆる画像計測を用いた欠陥検査が実用化されている。 Conventionally, in the FA (Factory Automation) field and the like, a defect inspection technique for detecting defects such as scratches and dust appearing on an inspection object (target work) has been developed. As a typical method of such defect inspection technology, defect inspection using so-called image measurement, in which defects are detected by performing image processing on an inspection image obtained by photographing an inspection object, has been put into practical use. ing.
このような画像計測を用いた欠陥検査の中でも、欠陥に相当するモデルを予め取得しておき、検査画像の各領域をこのモデルと比較することで、欠陥を検出する方法が一般的に採用されてきた。 Among such defect inspections using image measurement, a method for detecting defects by acquiring a model corresponding to a defect in advance and comparing each area of the inspection image with this model is generally employed. I came.
これに対して、画像の全体で成り立つ性質から画像中の全体と異なる部分を検出する方法が提案されている。たとえば、非特許文献1には、画像のフラクタル性や周期性によって得られる画像の局所領域間における相関性に着目した欠陥検出方法が開示されている。 On the other hand, there has been proposed a method for detecting a portion different from the whole in the image due to the properties that hold in the whole of the image. For example, Non-Patent Document 1 discloses a defect detection method that focuses on the correlation between local regions of an image obtained by fractal nature and periodicity of the image.
この欠陥検出方法によれば、検査画像からサンプルを複数切り出し、このサンプル毎に画像ベクトルを算出する。そして、これらの画像ベクトル列に対して固有ベクトル列を算出することによって固有空間を生成し、この固有空間とサンプル(画像ベクトル)との距離を用いて欠陥箇所を検出する。このような検出方法は、固有空間欠陥検出器(ESDD:Eigen Space Defect Detector)と称され、本明細書においても、固有空間と画像ベクトルとの距離に基づく欠陥の検出方法を「ESDD」とも総称する。 According to this defect detection method, a plurality of samples are cut out from the inspection image, and an image vector is calculated for each sample. Then, an eigenspace is generated by calculating eigenvector sequences for these image vector sequences, and a defect location is detected using the distance between the eigenspace and a sample (image vector). Such a detection method is called an Eigen Space Defect Detector (ESDD), and in this specification, a defect detection method based on a distance between an eigenspace and an image vector is also collectively referred to as “ESDD”. To do.
このように、ESDDによれば、予め欠陥に相当するモデルを取得しておく必要がないので、検査対象物に生じ得る欠陥を予めモデル化することが困難な場合であっても、欠陥を検出できるという利点がある。 Thus, according to ESDD, since it is not necessary to acquire a model corresponding to a defect in advance, even if it is difficult to model a defect that may occur in the inspection object in advance, the defect is detected. There is an advantage that you can.
しかしながら、検査対象物に生じる欠陥が、検査サンプルに比較して極端に大きな場合、あるいは極端に小さな場合には、欠陥の検出精度が低下するおそれがある。そのため、検査対象物に発生する欠陥の大きさにバラツキがある場合などには、特定の大きさの欠陥だけが検出対象として検出される一方、その他の欠陥は検出されないという問題が生じ得る。 However, when the defect generated in the inspection object is extremely large or extremely small as compared with the inspection sample, the defect detection accuracy may be lowered. For this reason, when there are variations in the size of the defect generated in the inspection object, there may be a problem that only a defect having a specific size is detected as a detection target, while other defects are not detected.
そこで、この発明は、かかる問題を解決するためになされたものであり、その目的は、検査対象物に発生する欠陥の大きさにかかわらず欠陥の検出精度を維持可能な学習型の欠陥検出装置、欠陥検出方法および欠陥検出プログラムを提供することである。 Accordingly, the present invention has been made to solve such a problem, and the object thereof is a learning type defect detection apparatus capable of maintaining the detection accuracy of defects regardless of the size of defects occurring in an inspection object. A defect detection method and a defect detection program are provided.
この発明のある局面に従えば、欠陥を含まない学習画像から取得された学習結果に基づいて検査画像における欠陥を検出する欠陥検出装置を提供する。欠陥検出装置は、検査画像に設定された第1の評価領域を包含し、かつ互いに大きさの異なる複数の部分領域それぞれの画像情報を抽出する手段と、検査画像から抽出される画像情報の各々から、部分領域の大きさ毎に検査画像ベクトルを生成する手段と、部分領域の大きさ毎の検査画像ベクトルの各々について、対応の固有空間との間の距離を算出する手段と、予め定められた判別関数を参照して、部分領域の大きさ毎の距離を要素とする第1の応答ベクトルに基づいて、第1の評価領域における欠陥の有無を判断する手段とを備える。 According to an aspect of the present invention, there is provided a defect detection device that detects a defect in an inspection image based on a learning result acquired from a learning image that does not include a defect. The defect detection apparatus includes means for extracting image information of a plurality of partial areas each including a first evaluation area set in an inspection image and having different sizes, and each of image information extracted from the inspection image A means for generating an inspection image vector for each size of the partial region, a means for calculating a distance between the corresponding eigenspace for each of the inspection image vectors for each size of the partial region, Means for referring to the discriminant function and determining the presence or absence of a defect in the first evaluation region based on a first response vector whose element is a distance for each size of the partial region.
この発明によれば、第1の評価領域に対して互いに大きさの異なる複数の部分領域が設定されとともに、各部分領域について、その画像情報から生成される画像ベクトルと対応の固有空間との間の距離を算出する。さらに、各部分領域についての大きさ毎の距離を要素とする第1の応答ベクトルを生成し、予め定められた判別関数を参照して、この第1の応答ベクトルを評価することで、第1の評価領域における欠陥の有無を判断する。このように、第1の評価領域を互いに大きさの異なる複数の部分領域の単位におけるそれぞれの評価結果を総合した上で、欠陥の有無を判断するので、検査画像に発生し得る欠陥の大きさのバラツキによる影響を抑制し、欠陥の検出精度をより高めることができる。 According to the present invention, a plurality of partial areas having different sizes are set for the first evaluation area, and between each partial area, an image vector generated from the image information and a corresponding eigenspace are provided. The distance is calculated. Furthermore, a first response vector having a distance for each size of each partial region as an element is generated, and the first response vector is evaluated with reference to a predetermined discriminant function, whereby the first response vector is evaluated. The presence or absence of defects in the evaluation area is determined. As described above, since the first evaluation area is determined based on the evaluation results in the units of the plurality of partial areas having different sizes, the presence / absence of the defect is determined. Therefore, the size of the defect that may occur in the inspection image. It is possible to suppress the influence due to the variation of the defect and to further improve the detection accuracy of the defect.
好ましくは、欠陥検出装置は、学習画像に順次設定される第2の評価領域を含み、かつ検査画像から抽出される複数の部分領域とそれぞれ同じ大きさを有する複数の部分領域の画像情報をそれぞれ抽出する手段と、学習画像から抽出される画像情報の各々から、部分領域の大きさ毎に評価領域画像ベクトルを順次生成する手段と、部分領域の大きさ毎の評価領域画像ベクトルの各々について、対応の固有空間との間の距離を順次算出する手段と、各々が部分領域の大きさ毎の距離を要素とする第2の応答ベクトルの集合に基づいて、集合内と集合外との境界を規定する判別関数を決定する手段とをさらに備える。 Preferably, the defect detection apparatus includes image information of a plurality of partial areas each including a second evaluation area sequentially set in the learning image and having the same size as each of the plurality of partial areas extracted from the inspection image. From each of the means for extracting, the image information extracted from the learning image, the means for sequentially generating the evaluation area image vector for each size of the partial area, and for each of the evaluation area image vector for each size of the partial area, Based on the means for sequentially calculating the distance between the corresponding eigenspaces and the set of second response vectors each having a distance for each size of the subregion, the boundary between the inside and outside the set is determined. And a means for determining a discriminant function to be defined.
さらに好ましくは、判別関数を決定する手段は、はずれ値検出手法に従って、判別関数を決定する。 More preferably, the means for determining the discriminant function determines the discriminant function according to the outlier detection method.
好ましくは、欠陥検出装置は、学習画像から、複数の部分領域のうち1つの部分領域と同じ大きさの第3の部分領域の画像情報を順次抽出する手段と、順次抽出される第3の部分領域の画像情報から学習画像ベクトルを生成する手段と、学習画像ベクトルを含むベクトルの組から固有ベクトルを算出する手段と、算出される固有ベクトルのうち、その固有値が大きいものから順に所定数の固有ベクトルを用いて、第3の部分領域の大きさにおける固有空間を決定する手段をさらに備える。 Preferably, the defect detection apparatus sequentially extracts image information of a third partial area having the same size as one partial area from among the plurality of partial areas, and a third part that is sequentially extracted. Means for generating a learning image vector from image information of a region, means for calculating an eigenvector from a set of vectors including the learning image vector, and using a predetermined number of eigenvectors in descending order of eigenvalues among the calculated eigenvectors And a means for determining an eigenspace in the size of the third partial region.
この発明の別の局面に従えば、欠陥を含まない学習画像から取得された学習結果に基づいて検査画像における欠陥を検出する欠陥検出装置を提供する。欠陥検出装置は、学習画像に順次設定される第1の評価領域を含み、かつ互いに大きさの異なる複数の部分領域それぞれの画像情報を抽出する手段と、学習画像から抽出される画像情報の各々から、部分領域の大きさ毎に評価領域画像ベクトルを順次生成する手段と、部分領域の大きさ毎の評価領域画像ベクトルの各々について、対応の固有空間との間の距離を順次算出する手段と、各々が部分領域の大きさ毎の距離を要素とする応答ベクトルの集合に基づいて、集合内と集合外との境界を規定する判別関数を決定する手段と、検査画像に順次設定される第2の評価領域を含み、かつ学習画像から抽出される複数の部分領域とそれぞれ同じ大きさを有する複数の部分領域の画像情報をそれぞれ抽出し、この抽出される画像情報から生成される検査画像ベクトルと、判別関数とに基づいて、第2の評価領域における欠陥の有無を判断する手段とを備える。 If another situation of this invention is followed, the defect detection apparatus which detects the defect in an inspection image based on the learning result acquired from the learning image which does not contain a defect is provided. The defect detection apparatus includes means for extracting image information of a plurality of partial areas each including a first evaluation area that is sequentially set in a learning image, and each of image information extracted from the learning image. Means for sequentially generating an evaluation area image vector for each size of the partial area, and means for sequentially calculating a distance from the corresponding eigenspace for each of the evaluation area image vectors for each size of the partial area; , A means for determining a discriminant function that defines the boundary between the inside and outside of the set based on a set of response vectors each having a distance for each size of the partial region as an element, Image information of a plurality of partial areas including two evaluation areas and having the same size as each of the plurality of partial areas extracted from the learning image is extracted and generated from the extracted image information And 査 image vector, based on a determination function, and means for determining the presence or absence of defects in the second evaluation region.
好ましくは、判別関数を決定する手段は、はずれ値検出手法に従って、判別関数を決定する。 Preferably, the means for determining the discriminant function determines the discriminant function according to the outlier detection method.
この発明のさらに別の局面に従えば、演算装置および記憶装置を含むコンピュータを用いて、学習画像から取得された学習結果に基づいて検査画像における欠陥を検出する欠陥検出方法を提供する。欠陥検出方法は、演算装置が、記憶装置に格納された検査画像に設定される第1の評価領域を包含し、かつ互いに大きさの異なる複数の部分領域それぞれの画像情報を抽出するステップと、検査画像から抽出する画像情報の各々から、部分領域の大きさ毎に検査画像ベクトルを生成するステップと、部分領域の大きさ毎の検査画像ベクトルの各々について、対応の固有空間との間の距離を算出するステップと、予め記憶装置に格納された判別関数を参照して、部分領域の大きさ毎の距離を要素とする第1の応答ベクトルに基づいて、第1の評価領域における欠陥の有無を判断するステップとを含む。 According to still another aspect of the present invention, there is provided a defect detection method for detecting a defect in an inspection image based on a learning result acquired from a learning image using a computer including an arithmetic device and a storage device. In the defect detection method, the arithmetic device includes a first evaluation region set in the inspection image stored in the storage device and extracts image information of each of the plurality of partial regions having different sizes from each other; A step of generating an inspection image vector for each size of the partial area from each piece of image information extracted from the inspection image, and a distance between the corresponding eigenspace for each of the inspection image vectors for each size of the partial area And the presence / absence of a defect in the first evaluation region based on a first response vector whose element is a distance for each size of the partial region with reference to a discriminant function stored in advance in a storage device Determining.
この発明のさらに別の局面に従えば、演算装置および記憶装置を含むコンピュータを用いて、学習画像から取得された学習結果に基づいて検査画像における欠陥を検出する欠陥検出方法を提供する。欠陥検出装置は、演算装置が、記憶装置に格納された学習画像に順次設定される第1の評価領域を含み、かつ互いに大きさの異なる複数の部分領域それぞれの画像情報を抽出するステップと、学習画像から抽出する画像情報の各々から、部分領域の大きさ毎に評価領域画像ベクトルを順次生成するステップと、部分領域の大きさ毎の評価領域画像ベクトルの各々について、対応の固有空間との間の距離を順次算出するステップと、各々が部分領域の大きさ毎の距離を要素とする応答ベクトルの集合に基づいて、集合内と集合外との境界を規定する判別関数を決定するステップと、記憶装置に格納された検査画像に順次設定される第2の評価領域を含み、かつ学習画像から抽出される複数の部分領域とそれぞれ同じ大きさを有する複数の部分領域の画像情報をそれぞれ抽出し、この抽出される画像情報から生成される検査画像ベクトルと、判別関数とに基づいて、第2の評価領域における欠陥の有無を判断するステップとを含む。 According to still another aspect of the present invention, there is provided a defect detection method for detecting a defect in an inspection image based on a learning result acquired from a learning image using a computer including an arithmetic device and a storage device. In the defect detection device, the arithmetic device includes a first evaluation region that is sequentially set in the learning image stored in the storage device, and extracts image information of each of the plurality of partial regions having different sizes from each other; A step of sequentially generating an evaluation area image vector for each size of the partial area from each piece of image information extracted from the learning image, and a corresponding eigenspace for each of the evaluation area image vectors for each size of the partial area A step of sequentially calculating a distance between them, a step of determining a discriminant function that defines a boundary between the inside and outside of the set based on a set of response vectors each having a distance for each size of a partial region as an element; A plurality of partial areas including a second evaluation area sequentially set in the examination image stored in the storage device and having the same size as each of the plurality of partial areas extracted from the learning image Extracted image information, respectively, and the inspection image vector generated from the image information to be the extraction, based on the discriminant function, and determining the presence or absence of a defect in the second evaluation region.
この発明のさらに別の局面に従えば、コンピュータを用いて、学習画像から取得された学習結果に基づいて検査画像における欠陥を検出する欠陥検出プログラムを提供する。欠陥検出プログラムは、コンピュータを、検査画像に設定された第1の評価領域を包含し、かつ互いに大きさの異なる複数の部分領域それぞれの画像情報を抽出する手段と、検査画像から抽出される画像情報の各々から、部分領域の大きさ毎に検査画像ベクトルを生成する手段と、部分領域の大きさ毎の検査画像ベクトルの各々について、対応の固有空間との間の距離を算出する手段と、予め定められた判別関数を参照して、部分領域の大きさ毎の距離を要素とする第1の応答ベクトルに基づいて、第1の評価領域における欠陥の有無を判断する手段として機能させる。 According to still another aspect of the present invention, there is provided a defect detection program for detecting a defect in an inspection image based on a learning result acquired from a learning image using a computer. The defect detection program includes a computer that includes a first evaluation region set in an inspection image and that extracts image information of each of a plurality of partial regions having different sizes, and an image extracted from the inspection image Means for generating an inspection image vector for each size of the partial area from each of the information; means for calculating a distance between the corresponding eigenspace for each of the inspection image vectors for each size of the partial area; With reference to a predetermined discriminant function, it is made to function as means for determining the presence or absence of a defect in the first evaluation region based on a first response vector whose element is a distance for each size of the partial region.
この発明のさらに別の局面に従えば、コンピュータを用いて、学習画像から取得された学習結果に基づいて検査画像における欠陥を検出する欠陥検出プログラムを提供する。欠陥検出プログラムは、コンピュータを、学習画像に順次設定される第1の評価領域を含み、かつ互いに大きさの異なる複数の部分領域それぞれの画像情報を抽出する手段と、学習画像から抽出される画像情報の各々から、部分領域の大きさ毎に評価領域画像ベクトルを順次生成する手段と、部分領域の大きさ毎の評価領域画像ベクトルの各々について、対応の固有空間との間の距離を順次算出する手段と、各々が部分領域の大きさ毎の距離を要素とする応答ベクトルの集合に基づいて、集合内と集合外との境界を規定する判別関数を決定する手段と、検査画像に順次設定される第2の評価領域を含み、かつ学習画像から抽出される複数の部分領域とそれぞれ同じ大きさを有する複数の部分領域の画像情報をそれぞれ抽出し、この抽出される画像情報から生成される検査画像ベクトルと、判別関数とに基づいて、第2の評価領域における欠陥の有無を判断する手段として機能させる。 According to still another aspect of the present invention, there is provided a defect detection program for detecting a defect in an inspection image based on a learning result acquired from a learning image using a computer. The defect detection program includes a computer that includes a first evaluation region that is sequentially set in a learning image, and that extracts image information of a plurality of partial regions having different sizes, and an image extracted from the learning image From each piece of information, a means for sequentially generating an evaluation area image vector for each size of the partial area and a distance between the corresponding eigenspace for each evaluation area image vector for each size of the partial area are sequentially calculated. Means for determining a discriminant function that defines the boundary between the inside and outside of the set based on a set of response vectors each having a distance for each size of the partial area as an element, and sequentially setting the inspection image Image information of a plurality of partial areas including the second evaluation area to be extracted and having the same size as each of the plurality of partial areas extracted from the learning image is extracted. A test image vector generated from the image information, based on the discriminant function, to function as means for determining the presence or absence of a defect in the second evaluation region.
この発明によれば、検査対象物に発生する欠陥の大きさにかかわらず欠陥の検出精度を維持できる。 According to the present invention, it is possible to maintain the detection accuracy of a defect regardless of the size of the defect generated in the inspection object.
この発明の実施の形態について、図面を参照しながら詳細に説明する。なお、図中の同一または相当部分については、同一符号を付してその説明は繰返さない。 Embodiments of the present invention will be described in detail with reference to the drawings. Note that the same or corresponding parts in the drawings are denoted by the same reference numerals and description thereof will not be repeated.
[実施の形態1]
(全体装置構成)
図1は、この発明の実施の形態1に従う欠陥検出装置を含む欠陥検出システム1の全体構成を示す概略図である。
[Embodiment 1]
(Overall equipment configuration)
FIG. 1 is a schematic diagram showing an overall configuration of a defect detection system 1 including a defect detection apparatus according to Embodiment 1 of the present invention.
図1を参照して、欠陥検出システム1は、代表的に生産ラインなどに組込まれ、欠陥検査の対象となるワーク(以下、対象ワークとも称す)における欠陥の有無および欠陥の発生位置を検出する。欠陥とは、代表的に対象ワークに生じるキズやゴミなどを意味する。 Referring to FIG. 1, a defect detection system 1 is typically incorporated in a production line or the like, and detects the presence / absence of a defect and a position where a defect occurs in a workpiece to be subjected to defect inspection (hereinafter also referred to as a target workpiece). . Defects typically mean scratches, dust, etc. that occur in the target workpiece.
本実施の形態に従う欠陥検出システム1においては、対象ワーク2は、ベルトコンベヤなどの搬送機構6によって搬送され、搬送された対象ワーク2は、撮像部8において順次撮影される。撮像部8によって撮影された画像(以下、「検査画像」とも称す)は、本実施の形態に従う欠陥検出装置を実現する代表例であるコンピュータ100へ伝送される。 In the defect detection system 1 according to the present embodiment, the target work 2 is transported by a transport mechanism 6 such as a belt conveyor, and the transported target work 2 is sequentially photographed by the imaging unit 8. An image (hereinafter, also referred to as “inspection image”) captured by the imaging unit 8 is transmitted to a computer 100 that is a representative example that implements the defect detection apparatus according to the present embodiment.
撮像部8は、一例として、CCD(Coupled Charged Device)やCMOS(Complementary Metal Oxide Semiconductor)センサなどの撮像素子およびレンズを備え、対象ワーク2または後述する基準ワーク4を撮影する。なお、撮像部8は、搬送機構6の搬送動作に応じてコンピュータ100が発生する撮影指令などに従って撮影を行なう。 The imaging unit 8 includes, for example, an imaging element such as a CCD (Coupled Charged Device) or a CMOS (Complementary Metal Oxide Semiconductor) sensor and a lens, and images the target workpiece 2 or a reference workpiece 4 described later. Note that the imaging unit 8 performs imaging according to an imaging command generated by the computer 100 in accordance with the conveyance operation of the conveyance mechanism 6.
この撮像部8で撮影される画像は、典型的には、画素単位で画像情報を有する。代替的に、複数の画素をまとめたブロック単位で画像情報を有するようにしてもよい。このような「画像情報」としては、撮像部8が3バンドのカラーカメラであれば、光の三原色に基づく「赤色」「緑色」「青色」の階調値(R成分値、G成分値、B成分値)で特定される情報が用いられる。代替的に、画像情報として、光の三原色の補色である「シアン」「マゼンダ」「黄色」の階調値(C成分値、M成分値、Y成分値)で特定される情報を用いてもよい。また、撮像部8がより多くのバンド数を有するカラーカメラであれば、そのバンド数に応じた数の階調値で特定される情報が用いられる。 An image captured by the imaging unit 8 typically has image information in units of pixels. Alternatively, image information may be provided in units of blocks in which a plurality of pixels are collected. As such “image information”, if the imaging unit 8 is a three-band color camera, the “red”, “green”, and “blue” gradation values (R component value, G component value, Information specified by (B component value) is used. Alternatively, information specified by gradation values (C component value, M component value, Y component value) of “cyan”, “magenta”, and “yellow”, which are complementary colors of the three primary colors of light, may be used as the image information. Good. If the imaging unit 8 is a color camera having a larger number of bands, information specified by a number of gradation values corresponding to the number of bands is used.
あるいは、撮像部8がモノクロカメラであれば、濃淡を示す階調値(グレイスケール)で特定される情報を用いてもよい。この階調値を2段階とした場合には、「白」または「黒」の2値化画像を表わすことになる。 Alternatively, if the imaging unit 8 is a monochrome camera, information specified by gradation values (gray scale) indicating light and shade may be used. When this gradation value is divided into two stages, it represents a binarized image of “white” or “black”.
さらに、上述のような階調値に代えて、「色相(Hue)」「明度(Value)」「彩度(Chroma)」の各パラメータからなる色属性を画像情報」として用いてもよい。 Furthermore, instead of the gradation value as described above, a color attribute including parameters of “Hue”, “Lightness (Value)”, and “Saturation (Chroma)” may be used as the image information.
特に本実施の形態に従う欠陥検出装置は、欠陥検査の基準にすべき基準ワーク4を予め撮影しておき、この撮影によって得られる画像(以下、「学習画像」とも称す)から学習結果を取得し、この学習結果に基づいて検査画像における欠陥を検出する(以下、本発明に係る欠陥検出装置による欠陥検出を「学習型ESDD」とも称す)。そのため、基準ワーク4としては、対象ワーク2と同一種類の製品を選択する必要がある。なお、基準ワーク4(すなわち、学習画像)は欠陥を含まないことが望ましい。ここで、「欠陥を含まない」とは、所定の判断基準下で欠陥と判断される部分を含まないことを意味する。 In particular, the defect detection apparatus according to the present embodiment images a reference work 4 to be used as a reference for defect inspection in advance, and acquires a learning result from an image obtained by this imaging (hereinafter also referred to as “learning image”). Based on this learning result, a defect in the inspection image is detected (hereinafter, defect detection by the defect detection apparatus according to the present invention is also referred to as “learning ESDD”). Therefore, it is necessary to select the same type of product as the target workpiece 2 as the reference workpiece 4. Note that it is desirable that the reference workpiece 4 (that is, the learning image) does not include a defect. Here, “does not include a defect” means that a portion determined to be a defect under a predetermined determination criterion is not included.
また、本明細書においては、学習結果の代表例として、互いにベクトルサイズの異なる複数の画像ベクトルと対応の固有空間との距離を要素として有する応答ベクトルを評価するための判別関数を用いる。この判別関数や応答ベクトルについては、後述する。 Further, in this specification, as a representative example of the learning result, a discriminant function for evaluating a response vector having as an element the distance between a plurality of image vectors having different vector sizes and the corresponding eigenspace is used. The discriminant function and response vector will be described later.
一方、対象ワーク2としては、電子部品やプラスチック部品などの連続的に生産される同一種類の製品が適している。なお、本発明に係る欠陥検出装置が欠陥検出の対象とする対象ワークの大きさや種類などは特に制限されない。さらに、工場の生産ラインで製造されるものに限られず、りんごなどの農作物の傷や映画フィルムにおけるスクラッチ傷などを検出することもできる。 On the other hand, as the target workpiece 2, the same type of products that are continuously produced, such as electronic parts and plastic parts, are suitable. In addition, the magnitude | size, the kind, etc. of the object workpiece | work which the defect detection apparatus based on this invention makes the object of defect detection are not restrict | limited. Furthermore, the present invention is not limited to those manufactured on the production line of a factory, and scratches on agricultural products such as apples and scratches on movie films can also be detected.
欠陥検出システム1は、撮像部8の撮影範囲の付近を照明するための照明部10と、この照明部10を駆動する光源部12とをさらに含む。そして、この光源部12は、コンピュータ100からの照明指令に従って、照明部10から所定の光量の光を照射させる。照明部10から照射される光は、比較的波長スペクトルの広いものが望ましい。 The defect detection system 1 further includes an illumination unit 10 for illuminating the vicinity of the imaging range of the imaging unit 8 and a light source unit 12 that drives the illumination unit 10. The light source unit 12 irradiates a predetermined amount of light from the illumination unit 10 in accordance with an illumination command from the computer 100. It is desirable that the light emitted from the illumination unit 10 has a relatively wide wavelength spectrum.
また、コンピュータ100は、FD(Flexible Disk)駆動装置111およびCD−ROM(Compact Disk-Read Only Memory)駆動装置113を備えたコンピュータ本体101と、モニタ102と、キーボード103と、マウス104とを含む。そして、コンピュータ100は、予め格納されたプログラムを実行することで、本実施の形態に従う欠陥検出装置を実現する。 The computer 100 also includes a computer main body 101 having an FD (Flexible Disk) driving device 111 and a CD-ROM (Compact Disk-Read Only Memory) driving device 113, a monitor 102, a keyboard 103, and a mouse 104. . Computer 100 implements a defect detection apparatus according to the present embodiment by executing a program stored in advance.
(ハードウェア構成)
図2は、コンピュータ100のハードウェア構成を示す概略構成図である。
(Hardware configuration)
FIG. 2 is a schematic configuration diagram illustrating a hardware configuration of the computer 100.
図2を参照して、コンピュータ本体101は、図1に示すFD駆動装置111およびCD−ROM駆動装置113に加えて、相互にバスで接続された、演算装置であるCPU(Central Processing Unit)105と、メモリ106と、記憶装置である固定ディスク107と、インターフェイス109とを含む。 2, in addition to the FD drive device 111 and the CD-ROM drive device 113 shown in FIG. 1, a computer main body 101 includes a CPU (Central Processing Unit) 105 that is an arithmetic device connected to each other via a bus. A memory 106, a fixed disk 107 as a storage device, and an interface 109.
FD駆動装置111にはFD112が装着され、CD−ROM駆動装置113にはCD−ROM114が装着される。上述したように、本実施の形態に従う欠陥検出装置は、CPU105がメモリ106などのコンピュータハードウェアを用いて、プログラムを実行することで実現される。一般的に、このようなプログラムは、FD112やCD−ROM114などの記録媒体に格納されて、またはネットワークなどを介して流通する。そして、このようなプログラムは、FD駆動装置111やCD−ROM駆動装置113などにより記録媒体から読取られて、またはインターフェイス109にて受信されて、固定ディスク107に格納される。さらに、固定ディスク107からメモリ106に読出されて、CPU105により実行される。 An FD 112 is mounted on the FD driving device 111, and a CD-ROM 114 is mounted on the CD-ROM driving device 113. As described above, the defect detection apparatus according to the present embodiment is realized by CPU 105 executing a program using computer hardware such as memory 106. In general, such a program is stored in a recording medium such as the FD 112 or the CD-ROM 114, or distributed via a network or the like. Such a program is read from a recording medium by the FD driving device 111 or the CD-ROM driving device 113 or received by the interface 109 and stored in the fixed disk 107. Further, it is read from the fixed disk 107 to the memory 106 and executed by the CPU 105.
モニタ102は、CPU105が出力する情報を表示するための表示部であって、一例としてLCD(Liquid Crystal Display)やCRT(Cathode Ray Tube)などから構成される。マウス104は、クリックやスライドなどの動作に応じたユーザからの指令を受付ける。キーボード103は、入力されるキーに応じたユーザからの指令を受付ける。CPU105は、プログラムされた命令を順次実行することで、各種の演算を実施する演算処理部である。メモリ106は、CPU105でのプログラム実行に応じて、各種の情報を記憶する。インターフェイス109は、コンピュータ100と撮像部8(図1)や照明部10(図1)との間の通信を確立するための装置であり、CPU105が出力した情報をたとえば電気信号に変換してこれらの装置へ送出するとともに、これらの装置から電気信号を受信してCPU105が利用できる情報に変換する。特に、撮像部8によって撮影された画像データは、インターフェイス109を介して、メモリ106または固定ディスク107へ格納される。固定ディスク107は、CPU105が実行するプログラムや画像データなどを記憶する不揮発性の記憶装置である。また、コンピュータ100には、必要に応じて、プリンタなどの他の出力装置が接続されてもよい。 The monitor 102 is a display unit for displaying information output by the CPU 105, and includes, for example, an LCD (Liquid Crystal Display) or a CRT (Cathode Ray Tube). The mouse 104 receives a command from the user according to an operation such as click or slide. The keyboard 103 receives a command from the user corresponding to the input key. The CPU 105 is an arithmetic processing unit that performs various calculations by sequentially executing programmed instructions. The memory 106 stores various types of information in accordance with program execution by the CPU 105. The interface 109 is a device for establishing communication between the computer 100 and the imaging unit 8 (FIG. 1) and the illumination unit 10 (FIG. 1). The information output from the CPU 105 is converted into, for example, an electrical signal, and the like. Are sent to these devices, and electrical signals are received from these devices and converted into information that can be used by the CPU 105. In particular, image data captured by the imaging unit 8 is stored in the memory 106 or the fixed disk 107 via the interface 109. The fixed disk 107 is a non-volatile storage device that stores programs executed by the CPU 105, image data, and the like. The computer 100 may be connected to another output device such as a printer as necessary.
(学習型ESDDによる欠陥検出処理)
図3は、学習型ESDDを用いて欠陥検出を行なう場合の処理を説明するための図である。図3(a)は、欠陥を含まない学習画像LNIMGの一例を示し、図3(b)は、欠陥DEFを含む検査画像IMGの一例を示し、図3(c)は、欠陥DEFを含まない部分領域BLK1の一例を示し、図3(d)は、欠陥DEFを含む部分領域BLK2の一例を示す。
(Defect detection processing by learning type ESDD)
FIG. 3 is a diagram for explaining processing when defect detection is performed using learning-type ESDD. 3A shows an example of a learning image LNIMG that does not include a defect, FIG. 3B shows an example of an inspection image IMG that includes a defect DEF, and FIG. 3C does not include a defect DEF. An example of the partial region BLK1 is shown, and FIG. 3D shows an example of the partial region BLK2 including the defect DEF.
図3(a)を参照して、まず、学習型ESDDによれば、基準ワーク4を撮影して得られた欠陥を含まない学習画像LNIMGから所定の大きさの部分領域BLKLNが順次抽出される。そして、この学習画像LNIMGの全体として現れる性質(特徴)が予め取得される(学習)。なお、図3(a)では、図面を簡素化するために、互いに重ならないように部分領域BLKLNを順次抽出する例を示すが、互いに重なるように部分領域BLKLNを設定してもよい。 Referring to FIG. 3A, first, according to learning-type ESDD, partial regions BLK LN of a predetermined size are sequentially extracted from a learning image LNIMG that does not include a defect obtained by photographing the reference workpiece 4. The Then, properties (features) appearing as a whole of the learning image LNIMG are acquired in advance (learning). 3A shows an example in which the partial regions BLK LN are sequentially extracted so as not to overlap each other in order to simplify the drawing, the partial regions BLK LN may be set so as to overlap each other.
図3(b)を参照して、続いて、学習型ESDDによれば、対象ワーク2を撮影して得られた検査画像IMGから所定の大きさの部分領域BLK1,BLK2などが抽出される。なお、検査画像IMGから抽出される部分領域BLK1,BLK2は、学習画像LNIMGから抽出した部分領域BLKLNの大きさといずれも同じである。 With reference to FIG. 3B, subsequently, according to learning-type ESDD, partial areas BLK1, BLK2, and the like having a predetermined size are extracted from the inspection image IMG obtained by photographing the target workpiece 2. Note that the partial areas BLK1 and BLK2 extracted from the inspection image IMG have the same size as the partial areas BLK LN extracted from the learning image LNIMG.
図3(c)に示すように、部分領域BLK1が欠陥DEFを含まない場合には、部分領域BLK1は、学習画像LNIMGの全体として現れる性質とほぼ同様の性質を有することになる。一方、図3(d)に示すように、部分領域BLK2に欠陥DEFが含まれる場合には、部分領域BLK2は、学習画像LNIMGの全体として現れる性質とは異なる特徴的な性質を有することになる。 As shown in FIG. 3C, when the partial region BLK1 does not include the defect DEF, the partial region BLK1 has substantially the same property as that of the entire learning image LNIMG. On the other hand, as shown in FIG. 3D, when the partial region BLK2 includes a defect DEF, the partial region BLK2 has a characteristic property that is different from the property that appears as a whole of the learning image LNIMG. .
このように、学習型ESDDによれば、基準ワーク4を撮影して得られる学習画像LNIMGの全体として現れる性質を予め取得(学習)しておき、この予め取得した学習画像LNIMGの全体として現れる性質と、検査画像IMGの対応する部分領域BLKに現れる性質とを比較することで、検査画像IMG中の欠陥DEFを検出する。 As described above, according to the learning type ESDD, the property that appears as the entire learning image LNIMG obtained by photographing the reference workpiece 4 is acquired (learned) in advance, and the property that appears as the entire learning image LNIMG acquired in advance. And the property appearing in the corresponding partial region BLK of the inspection image IMG, thereby detecting the defect DEF in the inspection image IMG.
図4は、検査画像IMG内に発生する欠陥DEF1,DEF2の一例を示す図である。
図4を参照して、対象ワークによっては、発生する欠陥の大きさにバラツキが生じ得る。そのため、検査画像IMG中には、部分領域BLKに収まる欠陥DEF1が発生する場合もあれば、1つの部分領域BLKに収まりきらないような欠陥DEF2が発生する場合もある。
FIG. 4 is a diagram illustrating an example of the defects DEF1 and DEF2 generated in the inspection image IMG.
Referring to FIG. 4, depending on the target workpiece, the size of the generated defect may vary. Therefore, in the inspection image IMG, there may be a defect DEF1 that fits in the partial area BLK, or a defect DEF2 that does not fit in one partial area BLK.
一方、発生する欠陥の大きさを予め予測することは困難である場合が多く、予め部分領域BLKLNおよびBLKの大きさを最適化することは難しい。また欠陥の大きさにバラツキが生じる場合などにも、部分領域BLKLNおよびBLKの大きさを最適化することは難しい。 On the other hand, it is often difficult to predict the size of the generated defect in advance, and it is difficult to optimize the sizes of the partial regions BLK LN and BLK in advance. Further, it is difficult to optimize the sizes of the partial regions BLK LN and BLK even when the defect sizes vary.
そこで、本発明に係る欠陥検出装置は、非特許文献1に開示されているESDDとは異なり、部分領域BLKLNおよびBLKの大きさを固定することなく、互いに大きさの異なる複数の部分領域BLKLNおよびBLKを用いて画像を評価し、欠陥を検出する。なお、以下では、部分領域BLKLNおよびBLKの大きさのことを「ベクトルサイズ」とも称す。 Therefore, unlike the ESDD disclosed in Non-Patent Document 1, the defect detection apparatus according to the present invention does not fix the sizes of the partial regions BLK LN and BLK, and a plurality of partial regions BLK having different sizes from each other. Images are evaluated using LN and BLK to detect defects. Hereinafter, the sizes of the partial areas BLK LN and BLK are also referred to as “vector sizes”.
(学習処理および欠陥検出処理)
図5は、この発明の実施の形態1に従う欠陥検出装置に設定される部分領域の大きさとその評価を概念的に説明するための図である。
(Learning process and defect detection process)
FIG. 5 is a diagram for conceptually explaining the size of the partial area set in the defect detection apparatus according to the first embodiment of the present invention and its evaluation.
図6は、この発明の実施の形態1に従う欠陥検出装置における学習処理および欠陥検出処理を概念的に説明するための図である。図6(a)は学習処理を概念的に示し、図6(b)は欠陥検出処理を概念的に示す。 FIG. 6 is a diagram for conceptually explaining learning processing and defect detection processing in the defect detection device according to the first embodiment of the present invention. FIG. 6A conceptually shows the learning process, and FIG. 6B conceptually shows the defect detection process.
図5を参照して、本実施の形態に従う欠陥検出装置は、学習画像LNIMGまたは検査画像IMG(以下、単に「画像」と総称する場合もある)から、大きさの異なる複数の部分領域BLKEV(1),BLKEV(2),・・・,BLKEV(m)またはBLK(1),BLK(2),・・・,BLK(m)をそれぞれ抽出する。このとき、BLKEV(1),BLKEV(2),・・・,BLKEV(m)または部分領域BLK(1),BLK(2),・・・,BLK(m)のうち、最も小さい(狭い)部分領域がそれぞれの評価領域となる。そして、他の部分領域は、この評価領域に相当する最も小さい領域(図5においては、部分領域BLKEV(1)またはBLK(1))を包含するように設定される。以下、ある評価領域に対応する部分領域BLKEV(1),BLKEV(2),・・・,BLKEV(m)またはBLK(1),BLK(2),・・・,BLK(m)を「部分領域セットSET」とも称す。 Referring to FIG. 5, the defect detection apparatus according to the present embodiment includes a plurality of partial areas BLK EV having different sizes from learning image LNIMG or inspection image IMG (hereinafter sometimes simply referred to as “image”). (1), BLK EV (2 ), ···, BLK EV (m) or BLK (1), BLK (2 ), extracts · · ·, BLK (m) is, respectively. At this time, BLK EV (1), BLK EV (2), ···, BLK EV (m) or partial regions BLK (1), BLK (2 ), ···, of BLK (m), the smallest (Narrow) partial areas are the respective evaluation areas. The other partial areas are set so as to include the smallest area corresponding to the evaluation area (partial area BLK EV (1) or BLK (1) in FIG. 5). Hereinafter, the partial area corresponding to a certain evaluation area BLK EV (1), BLK EV (2), ···, BLK EV (m) or BLK (1), BLK (2 ), ···, BLK (m) Is also referred to as “partial region set SET”.
そして、抽出された部分領域BLKEV(1),BLKEV(2),・・・,BLKEV(m)の各々の画像情報からそれぞれの画像ベクトルが算出され、さらに各画像ベクトルと対応する固有空間との間の距離Out1,Out2,・・・,Outmが算出される。このような過程によって、各評価領域に対応する部分領域セットSETについての応答ベクトルRV=[Out1,Out2,・・・,Outm]が算出できる。 Then, each image vector is calculated from each image information of the extracted partial areas BLK EV (1) , BLK EV (2) ,..., BLK EV (m) , and further, a unique corresponding to each image vector is calculated. The distances Out 1 , Out 2 ,..., Out m between the spaces are calculated. Through such a process, the response vector RV = [Out 1 , Out 2 ,..., Out m ] for the partial region set SET corresponding to each evaluation region can be calculated.
このように、学習画像LNIMGに設定される部分領域BLKEV(1),BLKEV(2),・・・,BLKEV(m)は、応答ベクトルRVの算出に用いられ、この応答ベクトルRVは、検査画像IMGに設定される各評価領域を評価するための判別関数の算出に用いられる。一方、後述する部分領域BLKLNは、主として、学習画像LNIMGにおける固有空間(固有ベクトル)の算出に用いられる。実際は、部分領域BLKEV(1),BLKEV(2),・・・,BLKEV(m)の大きさ(ベクトルサイズ)別に、固有空間(固有ベクトル)を算出する必要があるので、両者は同じ領域となる場合もあるが、理解を容易にするために、符号を異ならせて記載する。 As described above, the partial areas BLK EV (1) , BLK EV (2) ,..., BLK EV (m) set in the learning image LNIMG are used for calculating the response vector RV. This is used to calculate a discriminant function for evaluating each evaluation region set in the inspection image IMG. On the other hand, a partial region BLK LN described later is mainly used for calculating an eigenspace (eigenvector) in the learning image LNIMG. Actually, it is necessary to calculate eigenspaces (eigenvectors) for each size (vector size) of the partial areas BLK EV (1) , BLK EV (2) ,..., BLK EV (m). Although it may be a region, it is described with a different symbol for easy understanding.
図6(a)を参照して、本実施の形態に従う欠陥検出装置は、学習処理において、学習画像LNIMGの各評価領域に対応して算出される応答ベクトルRVを特徴空間に写像する。この特徴空間は、応答ベクトルを構成する各成分に対応する次元をもつ超空間となる。すなわち、この特徴空間は、各ベクトルサイズにおける画像ベクトルと固有空間との距離を基底(座標)とする。 Referring to FIG. 6A, the defect detection apparatus according to the present embodiment maps response vector RV calculated corresponding to each evaluation region of learning image LNIMG to the feature space in the learning process. This feature space is a superspace having a dimension corresponding to each component constituting the response vector. That is, in this feature space, the distance between the image vector and the eigenspace at each vector size is set as a base (coordinate).
そして、本実施の形態に従う欠陥検出装置は、この特徴空間に写像された応答ベクトルの集合に対して、正常値とはずれ値とを区別する。このような区別は、データマイニング(Data mining)分野のはずれ値検出手法を用いることで実現される。より具体的には、本実施の形態に従う欠陥検出装置は、正常値とはずれ値とを区別するための判別関数を決定する。すなわち、判別関数は、応答ベクトルの集合内と同集合外との境界を規定する関数である。 Then, the defect detection apparatus according to the present embodiment distinguishes a normal value from an outlier value with respect to a set of response vectors mapped to the feature space. Such a distinction is realized by using an outlier detection method in the data mining field. More specifically, the defect detection apparatus according to the present embodiment determines a discriminant function for distinguishing between a normal value and a deviation value. That is, the discriminant function is a function that defines the boundary between the inside and outside of the set of response vectors.
このような判別関数を決定する手順としては、以下のようになる。まず、学習画像LNIMGから算出される複数の応答ベクトルRVをクラスタリングする。このクラスタリングされた結果に対して、その距離(distance)や密度分布(density)などに基づいて、1つ以上のクラス(欠陥ではない部分に対応)を定義する。すなわち、各クラスの相違の基準を決定する。このクラスの相違の基準を示す関数が判別関数に相当する。そして、この判別関数に基づいて、何らかの検査画像IMGから算出された応答ベクトルRVが、定義されたいずれのクラスにも属さない場合には、「リジェクトクラス」として分類され、はずれ値、すなわち欠陥と判断される。 The procedure for determining such a discriminant function is as follows. First, a plurality of response vectors RV calculated from the learning image LNIMG are clustered. For this clustered result, one or more classes (corresponding to non-defect portions) are defined based on the distance and density distribution. That is, the standard for the difference of each class is determined. A function indicating a criterion for this class difference corresponds to a discriminant function. Then, based on this discriminant function, if the response vector RV calculated from any inspection image IMG does not belong to any defined class, it is classified as a “reject class”. To be judged.
本実施の形態に従う欠陥検出装置では、応答ベクトルRVが「正常値」および「はずれ値」のいずれであるかを判別するだけであるので、1つのクラスのみを定義する、いわゆる「1クラス問題」の手法を用いて決定することができる。このような1クラス問題の代表的な手法として、1−クラスSVM(One-Class Support Vector Machine)やSVDD(Support Vector Data Description)が知られている。なお、1−クラスSVMについては、たとえば、文献(Siwei Lyu and Hany Farid, Steganalysis Using Color Wavelet Statistics and One-Class Support Vector Machines, Department of Science, Dartmouth College, Hanover, NH 03755, USA)を参照されたい。 In the defect detection apparatus according to the present embodiment, since it is only necessary to determine whether the response vector RV is “normal value” or “outlier value”, a so-called “one-class problem” in which only one class is defined. It can be determined using the method. As typical techniques for such a one-class problem, 1-class SVM (One-Class Support Vector Machine) and SVDD (Support Vector Data Description) are known. For 1-class SVM, refer to, for example, literature (Siwei Lyu and Hany Farid, Steganalysis Using Color Wavelet Statistics and One-Class Support Vector Machines, Department of Science, Dartmouth College, Hanover, NH 03755, USA). .
代替的に、このような判別関数の決定手法として、K−NN法、K−Means法、MCD(Minimum Covariance Determinant)法、GMM(Gaussian Mixture Model)法、GP(Gaussian Process)法などを用いることもできる。なお、上述した、はずれ値検出手法については、文献(Sanjay Chawla and Pei Sun, "Clustering and Outlier Detection in High Dimensional Data", School of Information Technologies, University of Sydney NSW, Australia, http://www.dbs.ifi.lmu.de/CODHDD09/[インターネット])を参照されたい。 Alternatively, K-NN method, K-Means method, MCD (Minimum Covariance Determinant) method, GMM (Gaussian Mixture Model) method, GP (Gaussian Process) method or the like is used as a method for determining such discriminant function. You can also. The outlier detection method described above is described in the literature (Sanjay Chawla and Pei Sun, "Clustering and Outlier Detection in High Dimensional Data", School of Information Technologies, University of Sydney NSW, Australia, http: //www.dbs .ifi.lmu.de / CODHDD09 / [Internet]).
以上のように、本実施の形態に従う欠陥検出装置は、学習処理において特徴空間上の判別関数(学習結果)を予め決定する。 As described above, the defect detection device according to the present embodiment determines a discriminant function (learning result) on the feature space in advance in the learning process.
図6(b)を参照して、欠陥検出処理において、本実施の形態に従う欠陥検出装置は、上記の処理と同様に、検査画像IMGの各評価領域に対応する部分領域セットSETについての応答ベクトルRV’を順次算出し、上記の特徴空間に写像する。そして、本実施の形態に従う欠陥検出装置は、予め決定した判別関数に基づいて、この写像した応答ベクトルRV’が正常値であるかはずれ値であるかを判断する。すなわち、この写像した応答ベクトルRV’が学習画像から算出される応答ベクトルの集合内に存在するか否かが判断される。そして、本実施の形態に従う欠陥検出装置は、応答ベクトルがはずれ値であれば、対応する評価領域において欠陥が存在すると検出する。 Referring to FIG. 6B, in the defect detection process, the defect detection apparatus according to the present embodiment is similar to the above-described process in that the response vector for partial area set SET corresponding to each evaluation area of inspection image IMG. RV ′ is sequentially calculated and mapped to the feature space. Then, the defect detection apparatus according to the present embodiment determines whether or not this mapped response vector RV ′ is a normal value or a deviation value based on a predetermined discriminant function. That is, it is determined whether or not the mapped response vector RV ′ is present in the set of response vectors calculated from the learning image. If the response vector is an outlier, the defect detection device according to the present embodiment detects that a defect exists in the corresponding evaluation region.
以上のように、本実施の形態に従う欠陥検出装置は、評価領域を包含する大きさの異なる複数の部分領域の各々についての評価結果を総合して、対象となる評価領域における欠陥の有無を判断する。そのため、欠陥の大きさと部分領域の大きさとの相対的なバラツキが存在する場合であっても、このバラツキによる欠陥検出の係る影響を抑制でき、欠陥の検出精度をより高めることができる。 As described above, the defect detection apparatus according to the present embodiment determines the presence / absence of a defect in the target evaluation region by integrating the evaluation results for each of the plurality of partial regions having different sizes including the evaluation region. To do. Therefore, even when there is a relative variation between the size of the defect and the size of the partial area, the influence of the defect detection due to this variation can be suppressed, and the detection accuracy of the defect can be further increased.
(制御構造)
次に、上述のような処理を実現するための制御構造について説明する。
(Control structure)
Next, a control structure for realizing the above processing will be described.
図7は、この発明の実施の形態1に従う欠陥検出装置の制御構造を示す機能ブロック図である。 FIG. 7 is a functional block diagram showing a control structure of the defect detection apparatus according to the first embodiment of the present invention.
図7を参照して、本実施の形態に従う欠陥検出装置は、その機能として、画像バッファ部202,222と、抽出部204,214,224と、ベクトル生成部206,216,226と、固有ベクトル算出部208と、固有空間決定部210と、距離算出部218,228と、分類部220と、判断部230と、欠陥検出部232と、学習結果格納部240とを含む。 Referring to FIG. 7, the defect detection apparatus according to the present embodiment functions as image buffer units 202 and 222, extraction units 204, 214 and 224, vector generation units 206, 216 and 226, and eigenvector calculation. Unit 208, eigenspace determination unit 210, distance calculation units 218 and 228, classification unit 220, determination unit 230, defect detection unit 232, and learning result storage unit 240.
画像バッファ部202は、メモリ106(図1)の所定の領域に形成され、装置外部から入力される学習画像を一時的に格納する。なお、本実施の形態においては、撮像部8から画像バッファ部202へ学習画像が入力される構成について例示するが、撮像部8以外の装置によって撮影された学習画像が記録媒体やネットワークなどを介して、予め固定ディスク107(図2)に格納されていてもよい。 The image buffer unit 202 is formed in a predetermined area of the memory 106 (FIG. 1), and temporarily stores a learning image input from the outside of the apparatus. In this embodiment, a configuration in which a learning image is input from the imaging unit 8 to the image buffer unit 202 is illustrated. However, a learning image captured by a device other than the imaging unit 8 is transmitted via a recording medium, a network, or the like. Thus, it may be stored in advance in the fixed disk 107 (FIG. 2).
抽出部204と、ベクトル生成部206と、固有ベクトル算出部208と、固有空間決定部210とは、各画像ベクトルとの間の距離を算出するための基準となる固有空間を決定する。なお、固有空間は、部分領域セットSETに含まれる部分領域BLKEVの大きさ(ベクトルサイズ)別にそれぞれ決定される。すなわち、各部分領域セットSETが互いに異なるベクトルサイズをもつm種類の部分領域BLKEV(またはBLK)を含む場合には、m個の固有空間が決定される。 The extraction unit 204, the vector generation unit 206, the eigenvector calculation unit 208, and the eigenspace determination unit 210 determine an eigenspace that serves as a reference for calculating the distance between each image vector. The eigenspace is determined for each size (vector size) of the partial area BLK EV included in the partial area set SET. That is, when each partial region set SET includes m types of partial regions BLK EV (or BLK) having different vector sizes, m eigenspaces are determined.
抽出部204は、部分領域セットSETに含まれる複数の部分領域BLKEVのそれぞれについて、画像バッファ部202に一時的に格納される学習画像から、対応するベクトルサイズをもつ部分領域BLKLNをそれぞれ抽出し、このそれぞれ抽出した部分領域BLKLNに対応する学習画像の画像情報をベクトル生成部206へ出力する。言い換えれば、抽出部204は、画像バッファ部202に一時的に格納される学習画像から、ベクトルサイズ別に、学習サンプル(局所領域)を順次切り出す。 The extraction unit 204 extracts, for each of the plurality of partial regions BLK EV included in the partial region set SET, partial regions BLK LN having a corresponding vector size from the learning image temporarily stored in the image buffer unit 202. Then, the image information of the learning image corresponding to each extracted partial region BLK LN is output to the vector generation unit 206. In other words, the extraction unit 204 sequentially extracts learning samples (local regions) for each vector size from the learning image temporarily stored in the image buffer unit 202.
ベクトル生成部206は、抽出部204によって順次抽出される学習画像の部分領域BLKLNの画像情報から、各ベクトルサイズjについての学習画像ベクトルx1 LN(j),x2 LN(j),・・・,xR(j) LN(j)を順次生成する(但し、R(j)は各ベクトルサイズjにおける学習サンプル総数である)。 The vector generation unit 206 uses the learning image vectors x 1 LN (j) , x 2 LN (j) , ... For each vector size j from the image information of the partial regions BLK LN of the learning images sequentially extracted by the extraction unit 204. .., X R (j) LN (j) is generated sequentially (where R (j) is the total number of learning samples at each vector size j).
図8は、この発明の実施の形態1に従う欠陥検出装置における画像ベクトルの生成処理を概念的に説明するための図である。 FIG. 8 conceptually illustrates image vector generation processing in the defect detection apparatus according to the first embodiment of the present invention.
図9は、この発明の実施の形態1に従う欠陥検出装置における部分領域の画像情報を概念的に説明するための図である。 FIG. 9 is a diagram for conceptually explaining image information of a partial region in the defect detection device according to the first embodiment of the present invention.
図8を参照して、抽出部204は、画像バッファ部202に格納されている学習画像LNIMGに対して、異なる複数のベクトルサイズ毎に部分領域を順次設定する。図8(a)は、学習画像LNIMGに対して、ベクトルサイズ1の部分領域BLKLN(1)が設定されている状態を示し、同様に、図8(b)および図8(c)は、それぞれ学習画像LNIMGに対して、ベクトルサイズ2の部分領域BLKLN(2)およびベクトルサイズmの部分領域BLKLN(m)が設定されている状態を示す。 Referring to FIG. 8, extraction unit 204 sequentially sets partial areas for each of a plurality of different vector sizes for learning image LNIMG stored in image buffer unit 202. FIG. 8A shows a state in which a partial area BLK LN (1) of vector size 1 is set for the learning image LNIMG. Similarly, FIG. 8B and FIG. A state where a partial area BLK LN (2) of vector size 2 and a partial area BLK LN (m) of vector size m are set for each of the learning images LNIMG.
図9を参照して、部分領域BLKLNがw画素×h画素の大きさ(ベクトルサイズ)であれば、抽出部204は、設定される部分領域BLKLN(j)の各々について、N(=w×h)個の画像情報ciをベクトル生成部206へ出力する。そして、ベクトル生成部206は、設定される部分領域BLKLNの各々について、以下のような学習画像ベクトルを生成する。 Referring to FIG. 9, if a partial area BLK LN is w pixels × h magnitude of the pixel (vector size), extraction unit 204, for each of the partial regions BLK LN (j) is set, N (= The w × h) pieces of image information c i are output to the vector generation unit 206. Then, the vector generation unit 206 generates the following learning image vector for each of the set partial areas BLK LN .
学習画像ベクトルxi LN(j)=[c1,c2,・・・,cN(j)]T
但し、N(j)=w×h,1≦j≦m
なお、各画素がR成分値、G成分値、B成分値からなる場合には、画像情報ciはこれらの成分値を含む3次元の配列となる。そのため、学習画像ベクトルxi LN(j)としては、以下のようになる。
Learning image vector x i LN (j) = [c 1 , c 2 ,..., C N (j) ] T
However, N (j) = w × h, 1 ≦ j ≦ m
Each pixel is the R component value, G component value, if made of the B component value, the image information c i is the 3-dimensional array containing these component values. Therefore, the learning image vector x i LN (j) is as follows.
xi LN(j)=[R1,G1,B1,R2,G2,B2,・・・,RN(j),GN(j),BN(j)]T
ベクトル生成部206が生成する各部分領域BLKLN(j)についての学習画像ベクトルxi LN(j)は、N次元ユークリッド空間上の点として定義できる。
x i LN (j) = [R 1 , G 1 , B 1 , R 2 , G 2 , B 2 ,..., R N (j) , G N (j) , B N (j) ] T
The learning image vector x i LN (j) for each partial region BLK LN (j) generated by the vector generation unit 206 can be defined as a point on the N-dimensional Euclidean space.
再度、図7を参照して、固有ベクトル算出部208は、ベクトル生成部206が順次生成する学習画像ベクトルxi LN(j)の組から、ベクトルサイズ毎に固有ベクトルを算出する。より詳細には、固有ベクトル算出部208は、ベクトル生成部206で生成される学習画像ベクトルxi LN(j)の組(集合)として、ベクトルサイズ別に、以下のような集合ベクトルXLN(j)を算出する。 Referring again to FIG. 7, eigenvector calculation section 208 calculates eigenvectors for each vector size from a set of learning image vectors x i LN (j) sequentially generated by vector generation section 206. More specifically, the eigenvector calculation unit 208 sets the following set vector X LN (j) for each vector size as a set (set) of learning image vectors x i LN (j) generated by the vector generation unit 206. Is calculated.
集合ベクトルXLN(j)=[x1 LN(j),x2 LN(j),・・・,xR(j) LN(j)]
但し、R(j)は、対応のベクトルサイズjにおいて、学習画像LNIMGに設定される部分領域BLKLNの総数(学習サンプル総数)である
そして、固有ベクトル算出部208は、集合ベクトルXLN(j)の分散行列Q(j)=XLN(j)・XLN(j)Tを対角化する固有ベクトルV(j)を算出する。すなわち、固有ベクトル算出部208は、以下の式が成立するように、固有ベクトルV(j)および固有値行列Δ(j)を算出する。
Set vector X LN (j) = [x 1 LN (j) , x 2 LN (j) ,..., X R (j) LN (j) ]
However, R (j) is the total number (the total number of learning samples) of the partial areas BLK LN set in the learning image LNIMG in the corresponding vector size j. The eigenvector calculation unit 208 uses the set vector X LN (j) The eigenvector V (j) for diagonalizing the variance matrix Q (j) = X LN (j) · X LN (j) T is calculated. That is, the eigenvector calculation unit 208 calculates the eigenvector V (j) and the eigenvalue matrix Δ (j) so that the following expression is established.
分散行列Q(j)=XLN(j)・XLN(j)T=V(j)・Δ(j)・V(j)T
固有ベクトルV(j)=[e1 (j),e2 (j),・・・,eR (j)]
ここで、基底ベクトルe1 (j),e2 (j),・・・,eR (j)は、以下の条件を満たす。
Dispersion matrix Q (j) = X LN (j) · X LN (j) T = V (j) · Δ (j) · V (j) T
Eigenvector V (j) = [e 1 (j) , e 2 (j) ,..., E R (j) ]
Here, the basis vectors e 1 (j) , e 2 (j) ,..., E R (j) satisfy the following conditions.
また、固有値行列Δ(j)は、以下のように固有値λ1 (j),λ2 (j),・・・,λR (j)の対角行列として表される。 The eigenvalue matrix Δ (j) is represented as a diagonal matrix of eigenvalues λ 1 (j) , λ 2 (j) ,..., Λ R (j) as follows.
なお、上記のような固有ベクトルおよび固有値の演算処理は、KL(Karhunen-Loeve)展開などの公知のアルゴリズムを用いて実現することができる。 Note that the eigenvector and eigenvalue calculation processes as described above can be realized using a known algorithm such as KL (Karhunen-Loeve) expansion.
ここで、固有ベクトルV(j)を構成する基底ベクトルe1 (j),e2 (j),・・・,eR (j)の各々は、学習画像LNIMGを対応のベクトルサイズでサンプリングした場合に、学習画像LNIMGの全体として現れる性質を代表するものであり、その固有値が大きいものほどその代表する度合いが大きくなる。ここで、固有値λ1 (j)≧λ2 (j)≧・・・≧λR (j)であるので、基底ベクトルe1 (j),e2 (j),・・・,eR (j)の順で学習画像LNIMGの全体として現れる性質を代表する度合いが大きいことを意味する。 Here, each of the basis vectors e 1 (j) , e 2 (j) ,..., E R (j) constituting the eigenvector V (j) is obtained by sampling the learning image LNIMG with a corresponding vector size. In addition, it represents the property that appears as a whole of the learning image LNIMG, and the greater the eigenvalue, the greater the degree of representation. Here, since it is the eigenvalues λ 1 (j) ≧ λ 2 (j) ≧ ··· ≧ λ R (j), basis vectors e 1 (j), e 2 (j), ···, e R ( This means that the degree of representing the property appearing as a whole of the learning image LNIMG in the order of j) is large.
そこで、本実施の形態に従う欠陥検出装置では、このような基底ベクトルe1 (j),e2 (j),・・・,eR (j)における物理的な意味を考慮して、その固有値が大きいものから順に所定数の基底ベクトルを用いて、各ベクトルサイズにおける固有空間を決定する。すなわち、固有空間は、固有ベクトル算出部208で生成される基底ベクトルe1 (j),e2 (j),・・・,eR (j)の一部を用いて算出される部分空間である。このように算出される固有空間は、学習画像LNIMGの全体として現れる性質を、基底ベクトルの次元(次数)に応じた程度で反映したものとなる。ここで、学習画像LNIMGにおけるフラクタル性や周期性が支配的であれば、相対的に小さい次元の基底ベクトルで規定される固有空間であっても、学習画像LNIMGの大部分の特性をほぼ近似し得る。 Therefore, in the defect detection device according to the present embodiment, the eigenvalue is considered in consideration of the physical meaning of such basis vectors e 1 (j) , e 2 (j) ,..., E R (j) . The eigenspace in each vector size is determined using a predetermined number of basis vectors in order from the largest. That is, the eigenspace is a subspace calculated using a part of the basis vectors e 1 (j) , e 2 (j) ,..., E R (j) generated by the eigenvector calculation unit 208. . The eigenspace calculated in this way reflects the properties appearing as a whole of the learning image LNIMG to the extent corresponding to the dimension (order) of the base vector. Here, if the fractal nature and periodicity in the learning image LNIMG are dominant, the characteristics of most of the learning image LNIMG are approximately approximated even in the eigenspace defined by the relatively small dimensional basis vectors. obtain.
固有空間決定部210は、固有ベクトル算出部208が算出した固有ベクトルV(j)=[e1 (j),e2 (j),・・・,eR (j)]のうち、その固有値が大きいものから所定数の基底ベクトルe1 (j),e2 (j),・・・,edim(j) (j)(dim(j)≦R(j))を用いて、各ベクトルサイズにおける固有空間E(j)を決定する。この固有空間E(j)は、次元dim(j)の超平面となる。なお、次元dim(j)は、学習画像LNIMGに現れる性質に応じて任意に決定できるが、次元dim(j)が高くなるほど、後述する投影ベクトルなどに演算量が増大する。そのため、非特許文献1に開示されるような累積寄与度などに基づいて、適切な次元を決定することが望ましい。そして、固有空間決定部210は、この決定した固有空間E(j)を距離算出部218へ出力するとともに、学習結果格納部240へ格納する。 The eigenspace determination unit 210 has a large eigenvalue among eigenvectors V (j) = [e 1 (j) , e 2 (j) ,..., E R (j) ] calculated by the eigenvector calculation unit 208. Using a predetermined number of basis vectors e 1 (j) , e 2 (j) ,..., E dim (j) (j) (dim (j) ≦ R (j)) The eigenspace E (j) is determined. This eigenspace E (j) is a hyperplane of dimension dim (j). Note that the dimension dim (j) can be arbitrarily determined according to the property appearing in the learning image LNIMG, but the calculation amount increases to a projection vector, which will be described later, as the dimension dim (j) increases. Therefore, it is desirable to determine an appropriate dimension based on the cumulative contribution as disclosed in Non-Patent Document 1. Then, the eigenspace determination unit 210 outputs the determined eigenspace E (j) to the distance calculation unit 218 and stores it in the learning result storage unit 240.
次に、抽出部214と、ベクトル生成部216と、距離算出部218と、分類部220とは、学習画像LNIMGに設定される各評価領域に対応する部分領域セットSETについての応答ベクトルを算出するとともに、この応答ベクトルの集合に対して、正常値とはずれ値とを区別するための判別関数を決定する。 Next, the extraction unit 214, the vector generation unit 216, the distance calculation unit 218, and the classification unit 220 calculate a response vector for the partial region set SET corresponding to each evaluation region set in the learning image LNIMG. At the same time, a discriminant function for discriminating between a normal value and an outlier value is determined for the set of response vectors.
抽出部214は、学習画像LNIMGに評価領域を順次設定するとともに、各評価領域に対応付けて、異なる複数のベクトルサイズをもつ部分領域BLKEV(1),BLKEV(2),・・・,BLKEV(m)を順次抽出する。なお、部分領域BLKEV(1),BLKEV(2),・・・,BLKEV(m)の大きさは、ベクトル生成部206によって生成される固有空間E(j)(但し、1≦j≦m)のそれぞれに対応する部分領域の大きさと一致する。 The extraction unit 214 sequentially sets evaluation regions in the learning image LNIMG, and also associates with each evaluation region, and includes partial regions BLK EV (1) , BLK EV (2) ,. BLK EV (m) is sequentially extracted. The sizes of the partial areas BLK EV (1) , BLK EV (2) ,..., BLK EV (m) are equal to the eigenspace E (j) generated by the vector generation unit 206 (where 1 ≦ j ≦ m) is equal to the size of the partial area corresponding to each.
そして、抽出部214は、この順次抽出する部分領域BLKEV(1),BLKEV(2),・・・,BLKEV(m)(部分領域セット)に対応する学習画像の画像情報を画像バッファ部202からそれぞれ読出し、これらの読出した画像情報をベクトル生成部216へ出力する。上述したように、部分領域BLKEV(1),BLKEV(2),・・・,BLKEV(m)は、いずれも対応する評価領域を包含するように設定される。 Then, the extraction unit 214 stores image information of learning images corresponding to the partial areas BLK EV (1) , BLK EV (2) ,..., BLK EV (m) (partial area set) to be sequentially extracted. The information is read from the unit 202 and the read image information is output to the vector generation unit 216. As described above, the partial areas BLK EV (1) , BLK EV (2) ,..., BLK EV (m) are all set to include the corresponding evaluation areas.
ここで、部分領域BLKEV(1),BLKEV(2),・・・,BLKEV(m)は、評価領域(最小の部分領域BLKに相当)を包含するものであればどのように設定してもよい。そのため、図5に示すように、評価領域(部分領域BLKEV(1)に相当)に対して紙面右下方向に順次拡大するように部分領域をそれぞれ設定してもよいし、評価領域を中心として周辺方向に順次拡大するように部分領域を設定してもよい。 Here, the partial areas BLK EV (1) , BLK EV (2) ,..., BLK EV (m) are set in any manner as long as they include the evaluation area (corresponding to the smallest partial area BLK). May be. Therefore, as shown in FIG. 5, the partial areas may be set so as to sequentially expand in the lower right direction on the paper with respect to the evaluation area (corresponding to the partial area BLK EV (1)) , or the evaluation area is centered. The partial area may be set so as to sequentially expand in the peripheral direction.
図10は、複数の部分領域BLKEV(1),BLKEV(2),・・・,BLKEV(m)の設定方法の一例を示す図である。図10においては、学習画像LNIMGに設定される評価領域(部分領域BLKEV(1)に相当)を中心として、その周辺方向に拡大するように、部分領域BLKEV(2)〜BLKEV(m)が設定される場合が示される。 FIG. 10 is a diagram illustrating an example of a method of setting a plurality of partial areas BLK EV (1) , BLK EV (2) ,..., BLK EV (m) . In FIG. 10, the partial areas BLK EV (2) to BLK EV (m ) are enlarged so as to expand in the peripheral direction with the evaluation area (corresponding to the partial area BLK EV (1)) set in the learning image LNIMG as the center. ) Is set.
また、評価領域は、学習画像LNIMG中の任意の場所に設定することが可能である。
図11は、評価領域に対応する部分領域セットSETの設定方法の一例を示す図である。図11(a)に示すように、抽出部214(図7)は、一例として、学習画像LNIMGに対して、部分領域セットSETを所定間隔だけずらして順次設定する。このとき、部分領域セットSET1と隣接する部分領域セットSET2との一部が互いに重複してもよい。さらに、図11(b)に示すように、部分領域セットSET1と、部分領域セットSET1から互いに所定間隔だけ隔離された部分領域セットSET2とを設定してもよい。さらに、部分領域セットSET1と部分領域セットSET2との間、および部分領域セットSET2と部分領域セットSET3との間のように、隣接する部分領域セットの間隔が一定でなくともよい。
The evaluation area can be set at an arbitrary location in the learning image LNIMG.
FIG. 11 is a diagram illustrating an example of a setting method of the partial region set SET corresponding to the evaluation region. As illustrated in FIG. 11A, the extraction unit 214 (FIG. 7) sequentially sets the partial region set SET by shifting the partial region set SET by a predetermined interval with respect to the learning image LNIMG as an example. At this time, the partial area set SET1 and a part of the adjacent partial area set SET2 may overlap each other. Furthermore, as shown in FIG. 11B, a partial region set SET1 and a partial region set SET2 that is separated from the partial region set SET1 by a predetermined interval may be set. Further, the interval between adjacent partial region sets may not be constant, such as between the partial region set SET1 and the partial region set SET2, and between the partial region set SET2 and the partial region set SET3.
なお、抽出部204および抽出部214(図7)が設定する部分領域セットに含まれる部分領域の大きさは、ユーザなどからの最小/最大ベクトルサイズ設定に従って、決定することができる。すなわち、部分領域セットSETに含まれる最小の部分領域の大きさを最小ベクトルサイズに設定し、同じく最大の部分領域の大きさを最大ベクトルサイズに設定する。さらに、最小ベクトルサイズから最大ベクトルサイズの間で、必要な数の部分領域が設定される。 The size of the partial area included in the partial area set set by the extraction unit 204 and the extraction unit 214 (FIG. 7) can be determined according to the minimum / maximum vector size setting from the user or the like. That is, the size of the minimum partial region included in the partial region set SET is set to the minimum vector size, and the size of the maximum partial region is also set to the maximum vector size. Further, a necessary number of partial areas are set between the minimum vector size and the maximum vector size.
図12は、部分領域セットに含まれ得る部分領域の上限ベクトルサイズおよび下限ベクトルサイズを示す図である。図12を参照して、部分領域として設定可能なベクトルサイズの下限値としては、学習画像LNIMGを構成する最小単位である1画素となる。一方、部分領域として設定可能なベクトルサイズの上限値としては、学習画像LNIMGの全体、すなわち学習画像LNIMGの画像サイズとなる。 FIG. 12 is a diagram illustrating an upper limit vector size and a lower limit vector size of a partial area that can be included in the partial area set. Referring to FIG. 12, the lower limit value of the vector size that can be set as a partial region is one pixel that is the minimum unit constituting learning image LNIMG. On the other hand, the upper limit of the vector size that can be set as the partial area is the entire learning image LNIMG, that is, the image size of the learning image LNIMG.
また、部分領域セットの一部が学習画像LNIMGからはみ出る場合には、特定の処理を行なうようにしてもよい。 In addition, when a part of the partial region set protrudes from the learning image LNIMG, a specific process may be performed.
図13は、部分領域セットSETの一部が学習画像LNIMGからはみ出る場合の処理を説明するための図である。 FIG. 13 is a diagram for explaining processing when a part of the partial region set SET protrudes from the learning image LNIMG.
部分領域セットSETの一部が学習画像LNIMGからはみ出る場合の処理例として、図13(a)に示すように、当該はみ出し部分の画像情報の出力を省略してもよい。図13(a)に示す例では、部分領域BLKEV(m)の一部の領域がはみ出し部分となるので、この部分についての画像情報は出力されない。このような場合には、後述するベクトル生成部216で生成される対応の画像ベクトルの大きさが小さくなるが、画像ベクトルと対応の固有空間との間の距離に基づいて欠陥の有無が評価されるので、この画像ベクトルの大きさの変動による影響はない。 As an example of processing when a part of the partial region set SET protrudes from the learning image LNIMG, as shown in FIG. 13A, the output of the image information of the protruding part may be omitted. In the example shown in FIG. 13A, since a partial area of the partial area BLK EV (m) is a protruding part, image information about this part is not output. In such a case, the size of a corresponding image vector generated by the vector generation unit 216 described later is reduced, but the presence or absence of a defect is evaluated based on the distance between the image vector and the corresponding eigenspace. Therefore, there is no influence due to the variation in the size of the image vector.
代替的に、図13(b)に示すように、学習画像LNIMGからはみ出る部分について、当該部分に隣接する部分の画像情報に基づいて補間処理を行なってもよい。このような補間処理を行なうことで、その一部が学習画像LNIMGからはみ出る部分領域を含む部分領域セットであっても、すべての部分領域が学習画像LNIMG内に収まる部分領域セットと同様の画像ベクトルの組を生成できる。この補間処理は、はみ出した部分を隣接する部分と同様の性質を有するとして扱うものであるため、ESDDに基づく欠陥検出方法においては、この補間処理による検出精度の低下はほとんど無視できる。 Alternatively, as shown in FIG. 13B, interpolation processing may be performed on a portion that protrudes from the learning image LNIMG based on image information of a portion adjacent to the portion. By performing such interpolation processing, even if a part of the partial region set includes a partial region that protrudes from the learning image LNIMG, the same image vector as the partial region set in which all the partial regions fit within the learning image LNIMG. Can be generated. Since this interpolation process treats the protruding part as having the same property as the adjacent part, in the defect detection method based on ESDD, the decrease in detection accuracy due to this interpolation process can be almost ignored.
再度、図7を参照して、ベクトル生成部216は、抽出部214によって順次抽出される部分領域セット(部分領域BLKEV(1),BLKEV(2),・・・,BLKEV(m))の画像情報から、評価領域画像ベクトルxk EV(1),xk EV(2),・・・,xk EV(m)を順次生成する。なお、kは、学習画像LNIMGに設定される部分領域セット(評価領域)を示すラベル番号である。 Referring to FIG. 7 again, the vector generation unit 216 is configured to extract the partial region sets (partial regions BLK EV (1) , BLK EV (2) ,..., BLK EV (m) sequentially extracted by the extraction unit 214. ), The evaluation area image vectors x k EV (1) , x k EV (2) ,..., X k EV (m) are sequentially generated. Note that k is a label number indicating a partial region set (evaluation region) set in the learning image LNIMG.
ベクトル生成部216における評価領域画像ベクトルの生成処理は、上述したベクトル生成部206における学習画像ベクトルの生成処理と同様であるので、詳細な説明は繰返さない。そして、ベクトル生成部216は、生成した評価領域画像ベクトルを距離算出部218へ出力する。 Since the generation process of the evaluation area image vector in the vector generation unit 216 is the same as the generation process of the learning image vector in the vector generation unit 206 described above, detailed description will not be repeated. Then, the vector generation unit 216 outputs the generated evaluation area image vector to the distance calculation unit 218.
距離算出部218は、ベクトル生成部216から出力される評価領域画像ベクトルxk EV(1),xk EV(2),・・・,xk EV(m)の各々について、対応するベクトルサイズの固有空間E(j)との間の距離Out1(k),Out2(k),・・・,Outm(k)を順次算出する。 The distance calculation unit 218 outputs a vector size corresponding to each of the evaluation region image vectors x k EV (1) , x k EV (2) ,..., X k EV (m) output from the vector generation unit 216. The distances Out 1 (k), Out 2 (k),..., Out m (k) to the eigenspace E (j ) are sequentially calculated.
ここで、固有空間Eと画像ベクトルxとの距離の算出方法について一般化して説明する。 Here, a method for calculating the distance between the eigenspace E and the image vector x will be generalized and described.
図14は、固有空間Eと画像ベクトルxとの距離Outを説明するための図である。
図14を参照して、固有空間Eと画像ベクトルxとの距離Outは、ユークリッド距離として定義され、このユークリッド距離は、画像ベクトルxの固有空間Eへの投影点x’を用いて、以下のような式で表すことができる。
FIG. 14 is a diagram for explaining the distance Out between the eigenspace E and the image vector x.
Referring to FIG. 14, the distance Out between the eigenspace E and the image vector x is defined as the Euclidean distance, and this Euclidean distance is expressed as follows using the projection point x ′ of the image vector x on the eigenspace E: It can be expressed by the following formula.
|Out|2=|x−x’|2=(x−x’)T(x−x’)
また、画像ベクトルxの固有空間Eへの投影点x’は、以下のような式で表すことができる。
| Out | 2 = | xx ′ | 2 = (xx ′) T (xx ′)
Further, the projection point x ′ of the image vector x on the eigenspace E can be expressed by the following equation.
次に、図15を参照して、固有空間を1次元とした場合について、固有空間E(1)と画像ベクトルxとの間の距離について説明する。 Next, the distance between the eigenspace E (1) and the image vector x will be described with reference to FIG.
図15は、1次元の固有空間E(1)と画像ベクトルxとの距離Outを説明するための図である。 FIG. 15 is a diagram for explaining the distance Out between the one-dimensional eigenspace E (1) and the image vector x.
図15を参照して、原点から投影点x’までの距離Pについて考える。1次元の固有空間E(1)は、基底ベクトルe1で定義されるので、ベクトル集合Pは、画像ベクトルxと基底ベクトルe1とを用いて以下のような式で表すことができる。 With reference to FIG. 15, consider the distance P from the origin to the projection point x ′. Since the one-dimensional eigenspace E (1) is defined by the basis vector e 1 , the vector set P can be expressed by the following equation using the image vector x and the basis vector e 1 .
P=x・e1
これを、dim次元まで拡張すると、原点から投影点x’までの距離Pの集合は、以下のような式で表すことができる。
P = x · e 1
When this is expanded to the dim dimension, a set of distances P from the origin to the projection point x ′ can be expressed by the following equation.
P=(P1,P2,・・・,Pdim)T
したがって、任意の成分における原点から投影点x’までの距離は、Pm=x・em(1≦m≦dim)となる。
P = (P 1 , P 2 ,..., P dim ) T
Therefore, the distance from the origin to the projection point x ′ in an arbitrary component is P m = x · e m (1 ≦ m ≦ dim).
図15に示すように固有空間(1)が1次元であれば、固有空間(1)(基底ベクトルe1平面)上の投影点x’は、基底ベクトルe1方向にP倍したものと考えられるので、x’=Pe1となる。但し、基底ベクトルe1を単位ベクトルとする。 As shown in FIG. 15, if the eigenspace (1) is one-dimensional, the projection point x ′ on the eigenspace (1) (base vector e 1 plane) is considered to be P times in the direction of the base vector e 1. Therefore, x ′ = Pe 1 is satisfied. However, the basis vector e 1 is a unit vector.
これを、dim次元まで拡張すると、投影点x’は以下のような式で表すことができる。 When this is expanded to the dim dimension, the projection point x ′ can be expressed by the following equation.
再度、固有空間Eと画像ベクトルxとの距離Outについて考える。上述したように、 Consider again the distance Out between the eigenspace E and the image vector x. As mentioned above,
であるので、
|Out|2=|x−x’|2=(x−x’)T(x−x’)
=(x−EP)T(x−EP) (但し、P=ETx)
=xTx−xTEP−PTETx+PTETEP
ここで、以下の式が成立するので、
So
| Out | 2 = | xx ′ | 2 = (xx ′) T (xx ′)
= (X-EP) T (x-EP) (where P = E T x)
= X T x-x T EP -P T E T x + P T E T EP
Here, the following equation holds, so
|Out|2=xTx−PTP−PTP+PTP
=xTx−PTP
以上のように、固有空間Eと画像ベクトルxとの距離Outは、画像ベクトルxとベクトル集合Pとを用いて、以下のような式で表すことができる。
| Out | 2 = x T x -P T P-P T P + P T P
= X T x-P T P
As described above, the distance Out between the eigenspace E and the image vector x can be expressed by the following equation using the image vector x and the vector set P.
|Out|2=xTx−PTP
ここで、ベクトル集合Pは、画像ベクトルxを投影点x’へ投影するための投影ベクトルに相当し、PTPは、この投影ベクトルの内積値に相当する。
| Out | 2 = x T x -P T P
Here, vector set P corresponds to the projection vector for projecting an image vector x to the projection point x ', P T P is equivalent to the inner product value of the projection vector.
再度、図7を参照して、距離算出部218は、ベクトル生成部216から出力される評価領域画像ベクトルxk EV(1),xk EV(2),・・・,xk EV(m)の各々について、固有空間決定部210から出力される固有空間E(j)のうち、同一のベクトルサイズをもつ固有空間との間の距離Out1(k),Out2(k),・・・,Outm(k)を順次算出する。 Referring to FIG. 7 again, the distance calculation unit 218 outputs the evaluation area image vectors x k EV (1) , x k EV (2) ,..., X k EV (m ) output from the vector generation unit 216. ) Between the eigenspaces E (j) output from the eigenspace determining unit 210 and eigenspaces having the same vector size Out 1 (k), Out 2 (k),.・, Out m (k) is calculated sequentially.
|Outj(k)|2=xk EV(j)T・xk EV(j)−Pk (j)T・Pk (j)
但し、Pk (j)=E(j)T・xk EV(j)
そして、距離算出部218は、このように順次算出する距離Out1(k),Out2(k),・・・,Outm(k)を分類部220へ出力する。
| Out j (k) | 2 = x k EV (j) T · x k EV (j) −P k (j) T · P k (j)
However, P k (j) = E (j) T · x k EV (j)
Then, the distance calculation unit 218 outputs the distances Out 1 (k), Out 2 (k),..., Out m (k) sequentially calculated in this way to the classification unit 220.
なお、部分領域が互いに重複して設定される領域の固有空間に対する距離は、重複して設定される各部分領域についての距離の和として算出してもよい。 Note that the distance to the eigenspace of the area where the partial areas are set to overlap each other may be calculated as the sum of the distances for the partial areas set to overlap.
図16は、部分領域が重複して設定される領域の固有空間に対する距離の算出方法を説明するための図である。図16(a)は、2つの部分領域BLKaおよびBLKbが重複する場合を示し、図16(b)は、4つの部分領域BLKa,BLKb,BLKc,BLKdが重複する場合を示す。 FIG. 16 is a diagram for explaining a method for calculating the distance to the eigenspace of an area set with overlapping partial areas. FIG. 16A shows a case where two partial regions BLKa and BLKb overlap, and FIG. 16B shows a case where four partial regions BLKa, BLKb, BLKc, and BLKd overlap.
図16(a)を参照して、部分領域BLKaと部分領域BLKbとの重複部分についての固有空間に対する距離は、部分領域BLKaの固有空間に対する距離と、部分領域BLKbの固有空間に対する距離との和、もしくはその平均値として算出することができる。 Referring to FIG. 16 (a), the distance to the eigenspace for the overlapping portion of partial area BLKa and partial area BLKb is the sum of the distance to eigenspace of partial area BLKa and the distance to eigenspace of partial area BLKb. Or an average value thereof.
また、図16(b)を参照して、部分領域BLKa,BLKb,BLKc,BLKdの重複部分についての固有空間に対する距離は、部分領域BLKa,BLKb,BLKc,BLKdの固有空間に対するそれぞれの距離の和、もしくはその平均値として算出することができる。 Referring to FIG. 16B, the distance to the eigenspace for the overlapping portion of the partial areas BLKa, BLKb, BLKc, and BLKd is the sum of the distances to the eigenspace of the partial areas BLKa, BLKb, BLKc, and BLKd. Or an average value thereof.
再度、図7を参照して、分類部220は、まず、距離算出部218で算出された各評価領域における距離Out1(k),Out2(k),・・・,Outm(k)を集合して応答ベクトルRV(k)=[Out1(k),Out2(k),・・・,Outm(k)]を順次生成する。そして、分類部220は、順次生成する応答ベクトルRV(k)をm次元の特徴空間に写像する。さらに、分類部220は、このm次元の特徴空間上において、写像されたk個の応答ベクトルRV(k)の集合に対して、正常値とはずれ値とを区別するための判別関数を決定する(図6(a)参照)。 Referring to FIG. 7 again, the classification unit 220 first determines the distances Out 1 (k), Out 2 (k),..., Out m (k) in each evaluation region calculated by the distance calculation unit 218. Are sequentially generated as response vector RV (k) = [Out 1 (k), Out 2 (k),..., Out m (k)]. Then, the classification unit 220 maps the response vectors RV (k) that are sequentially generated into the m-dimensional feature space. Further, the classification unit 220 determines a discriminant function for distinguishing a normal value from an outlier value for a set of k response vectors RV (k) mapped on the m-dimensional feature space. (See FIG. 6 (a)).
上述したように、本実施の形態に従う分類部220は、はずれ値検出手法(典型的には、1−クラスSVM)の手法を用いて判別関数を決定する。そして、分類部220は、この決定した判別関数を学習結果格納部240へ格納する。 As described above, the classification unit 220 according to the present embodiment determines the discriminant function using the outlier detection method (typically 1-class SVM). Then, the classification unit 220 stores the determined discriminant function in the learning result storage unit 240.
以上のように、学習結果格納部240には、学習結果として、分類部220により決定された判別関数が格納される。これにより、学習処理は完了する。 As described above, the discriminant function determined by the classification unit 220 is stored in the learning result storage unit 240 as a learning result. Thereby, the learning process is completed.
次に、画像バッファ部222と、抽出部224と、ベクトル生成部226と、距離算出部228と、判断部230と、欠陥検出部232とは、検査画像における欠陥の検出処理を行なう。 Next, the image buffer unit 222, the extraction unit 224, the vector generation unit 226, the distance calculation unit 228, the determination unit 230, and the defect detection unit 232 perform a defect detection process on the inspection image.
画像バッファ部222は、メモリ106(図1)の所定の領域に形成され、装置外部から入力される検査画像を一時的に格納する。なお、本実施の形態においては、撮像部8から画像バッファ部222へ検査画像が入力される構成について例示するが、撮像部8以外の装置によって撮影された検査画像が記録媒体やネットワークなどを介して、予め固定ディスク107(図2)に格納されていてもよい。 The image buffer unit 222 is formed in a predetermined area of the memory 106 (FIG. 1), and temporarily stores an inspection image input from the outside of the apparatus. In the present embodiment, the configuration in which the inspection image is input from the imaging unit 8 to the image buffer unit 222 is illustrated. However, the inspection image captured by a device other than the imaging unit 8 is transmitted via a recording medium or a network. Thus, it may be stored in advance in the fixed disk 107 (FIG. 2).
抽出部224は、画像バッファ部222に一時的に格納される検査画像IMGに評価領域を順次設定するとともに、各評価領域に対応付けて、異なる複数のベクトルサイズをもつ部分領域BLK(1),BLK(2),・・・,BLK(m)を順次抽出する。なお、部分領域BLK(1),BLK(2),・・・,BLK(m)の大きさは、抽出部214によって学習画像LNIMGから順次抽出される部分領域BLK(1),BLK(2),・・・,BLK(m)の大きさと一致する。また、抽出部224が検査画像IMGに設定する評価領域は、抽出部214が学習画像LNIMGに設定する評価領域のいずれかに対応するものとする。 The extraction unit 224 sequentially sets evaluation regions in the inspection image IMG temporarily stored in the image buffer unit 222 and associates with each evaluation region with partial regions BLK (1) , 2 having different vector sizes. BLK (2) ,..., BLK (m) are sequentially extracted. The portion area BLK (1), BLK (2 ), ···, BLK size of (m) is the extraction unit 214 by the learning image portion area BLK (1) to be sequentially extracted from LNIMG, BLK (2) ,..., Matches the size of BLK (m) . In addition, the evaluation area set by the extraction unit 224 in the inspection image IMG corresponds to one of the evaluation areas set by the extraction unit 214 in the learning image LNIMG.
また、抽出部224は、検査画像IMGから順次抽出する評価領域の位置(ラベル情報)を判断部230へ出力する。 Further, the extraction unit 224 outputs to the determination unit 230 the position (label information) of the evaluation region that is sequentially extracted from the inspection image IMG.
ベクトル生成部226は、抽出部224によって順次抽出される部分領域セット(部分領域BLK(1),BLK(2),・・・,BLK(m))の画像情報から、検査画像ベクトルxk (1),xk (2),・・・,xk (m)を生成する。なお、kは、検査画像ベクトルに設定された評価領域が、学習画像LNIMGに設定された部分領域セット(評価領域)のいずれに対応するかを示すラベル番号である。なお、ベクトル生成部226における検査画像ベクトルの生成処理は、上述したベクトル生成部206における学習画像ベクトルの生成処理と同様であるので、詳細な説明は繰返さない。そして、ベクトル生成部226は、生成した検査画像ベクトルを距離算出部228へ出力する。 The vector generation unit 226 uses the inspection image vector x k ( from the image information of the partial region sets (partial regions BLK (1) , BLK (2) ,..., BLK (m) ) sequentially extracted by the extraction unit 224. 1) , x k (2) ,..., X k (m) are generated. Note that k is a label number indicating which of the partial region set (evaluation region) set in the learning image LNIMG corresponds to the evaluation region set in the inspection image vector. Note that the inspection image vector generation processing in vector generation unit 226 is similar to the learning image vector generation processing in vector generation unit 206 described above, and therefore detailed description thereof will not be repeated. Then, the vector generation unit 226 outputs the generated inspection image vector to the distance calculation unit 228.
距離算出部228は、ベクトル生成部226から出力される検査画像ベクトルxk (1),xk (2),・・・,xk (m)の各々について、対応するベクトルサイズの固有空間E(1),E(2),・・・,E(m)との間の距離Out’1(k),Out’2(k),・・・,Out’m(k)を順次算出する。より詳細には、距離算出部228は、ベクトル生成部226から出力される検査画像ベクトルxk (j)と、学習結果格納部240に格納される対応するベクトルサイズの固有空間E(D)とに基づいて、
|Out’j(k)|2=xk (j)T・xk (j)−Pk (j)T・Pk (j)
(但し、Pk (j)=E(D)Txk (j))
の関係式に従って、検査画像ベクトルxk (j)と対応する固有空間E(D)との間の距離Out’j(k)を算出する。この演算に際して、距離算出部228は、学習結果格納部240から対応の固有空間E(D)を読出す。
The distance calculation unit 228, for each of the inspection image vectors x k (1) , x k (2) ,..., X k (m) output from the vector generation unit 226, corresponds to the eigenspace E of the corresponding vector size. (1), E (2) , ···, E (m) distance Out '1 (k), Out ' between the 2 (k), ···, and sequentially calculates the Out 'm (k) . More specifically, the distance calculation unit 228 includes the inspection image vector x k (j) output from the vector generation unit 226 and the corresponding vector size eigenspace E (D) stored in the learning result storage unit 240. On the basis of the,
| Out ′ j (k) | 2 = x k (j) T · x k (j) −P k (j) T · P k (j)
(However, Pk (j) = E (D) Txk (j) )
The distance Out ′ j (k) between the inspection image vector x k (j) and the corresponding eigenspace E (D) is calculated according to the following relational expression. In this calculation, the distance calculation unit 228 reads the corresponding eigenspace E (D) from the learning result storage unit 240.
このように、距離算出部228は、学習結果格納部240に格納された固有空間E(D)を用いて、固有空間E(D)と検査画像ベクトルxk (j)との距離Out’j(k)を算出するので、学習画像LNIMGに基づいて固有空間E(D)が一旦算出された後は、その後に入力される検査画像IMGの各々に対して固有空間E(D)を再度算出する必要はない。そのため、従来に比較して処理時間を短縮することができる。また、基準となる固有空間E(D)が画像中に含まれる欠陥部分の情報を含むことがないので、欠陥検出の精度を高めることができる。 As described above, the distance calculation unit 228 uses the eigenspace E (D) stored in the learning result storage unit 240 to use the distance Out ′ j between the eigenspace E (D) and the inspection image vector x k (j). since calculating the (k), after the eigenspace E based on the learning image LNIMG (D) is calculated once again calculates the eigenspace E (D) for each test image IMG is input to the subsequent do not have to. Therefore, the processing time can be shortened as compared with the conventional case. Moreover, since the eigen space E (D) serving as a reference does not include information on a defective portion included in the image, the accuracy of defect detection can be increased.
判断部230は、距離算出部228で算出された対象評価領域における距離Out’1(k),Out’2(k),・・・,Out’m(k)を集合して応答ベクトルRV’(k)=[Out’1(k),Out’2(k),・・・,Out’m(k)]を生成する。そして、判断部230は、生成した応答ベクトルRV’(k)をm次元の特徴空間に写像するとともに、学習結果格納部240から予め算出された判別関数を読出し、この写像した応答ベクトルRV’が正常値およびはずれ値のいずれの領域に存在しているかを判断する(図6(b)参照)。そして、判断部230は、応答ベクトルRV’がはずれ値の領域に存在していれば、対象となる評価領域に欠陥が存在すると判断する。一方、判断部230は、応答ベクトルRV’が正常値の領域に存在していれば、対象となる評価領域には欠陥が存在しないと判断する。さらに、欠陥が存在していると判断すると、判断部230は、欠陥位置を特定するための情報を欠陥検出部232へ通知する。 The determination unit 230 collects the distances Out ′ 1 (k), Out ′ 2 (k),..., Out ′ m (k) in the target evaluation area calculated by the distance calculation unit 228 to collect the response vector RV ′. (K) = [Out ′ 1 (k), Out ′ 2 (k),..., Out ′ m (k)] is generated. Then, the determination unit 230 maps the generated response vector RV ′ (k) to the m-dimensional feature space, reads a discriminant function calculated in advance from the learning result storage unit 240, and the mapped response vector RV ′ It is determined in which region the normal value or the outlier exists (see FIG. 6B). If the response vector RV ′ is present in the outlier region, the determination unit 230 determines that a defect exists in the target evaluation region. On the other hand, when the response vector RV ′ is present in the normal value region, the determination unit 230 determines that there is no defect in the target evaluation region. Further, when determining that a defect exists, the determination unit 230 notifies the defect detection unit 232 of information for specifying the defect position.
欠陥検出部232は、判断部230からの欠陥位置の特定情報に基づいて、画像バッファ部222に格納されている検査画像IMGを参照し、欠陥の種類や大きさなどの欠陥についての詳細な情報を検出する。具体的には、欠陥検出部232は、検査画像IMGに対してエッジ検出などを実行する。そして、欠陥検出部232は、検出した欠陥の詳細情報などを欠陥検出結果として出力する。 The defect detection unit 232 refers to the inspection image IMG stored in the image buffer unit 222 based on the defect position specifying information from the determination unit 230, and detailed information about the defect such as the type and size of the defect. Is detected. Specifically, the defect detection unit 232 performs edge detection and the like on the inspection image IMG. And the defect detection part 232 outputs the detailed information etc. of the detected defect as a defect detection result.
以上のような機能構成によって、本実施の形態に従う欠陥検出装置は、欠陥を含まない学習画像LNIMGに基づいて検査画像IMGにおける欠陥を検出する。 With the functional configuration as described above, the defect detection device according to the present embodiment detects a defect in inspection image IMG based on learning image LNIMG that does not include a defect.
(処理手順)
図17は、この発明の実施の形態1に従う欠陥検出システム1において対象ワーク2に発生し得る欠陥を検出するための処理手順を示すフローチャートである。
(Processing procedure)
FIG. 17 is a flowchart showing a processing procedure for detecting a defect that may occur in the target work 2 in the defect detection system 1 according to the first embodiment of the present invention.
図1および図17を参照して、ユーザは、予め欠陥が発生していないことが分かっている基準ワーク4を搬送機構6上の撮像部8の撮影範囲に配置する(ステップS2)。そして、ユーザは、欠陥検出装置に所定の指令を与えて、この基準ワーク4を撮影した学習画像を取得させる(ステップS4)。この際、照明部10は、所定の光量の光を基準ワークに向けて照射する。なお、上述したように、撮像部8以外の装置によって予め撮影された学習画像を欠陥検出装置に与えるようにしてもよい。 Referring to FIGS. 1 and 17, the user places reference work 4 that is known to have no defect in advance in the imaging range of imaging unit 8 on transport mechanism 6 (step S2). Then, the user gives a predetermined command to the defect detection device to acquire a learning image obtained by photographing the reference workpiece 4 (step S4). At this time, the illumination unit 10 irradiates a predetermined amount of light toward the reference workpiece. As described above, a learning image captured in advance by an apparatus other than the imaging unit 8 may be given to the defect detection apparatus.
学習画像の取得後、欠陥検出装置は学習処理を実行し(ステップS6)、その学習結果(判別関数や固有空間)を格納する(ステップS8)。なお、学習処理については、後述する。 After acquiring the learning image, the defect detection apparatus executes a learning process (step S6) and stores the learning result (discriminant function or eigenspace) (step S8). The learning process will be described later.
この学習処理および学習結果の格納が終了すると、ユーザは、対象ワーク2が搬送機構6上の撮像部8の撮影範囲に順次搬送されるように、搬送機構6などを操作する(ステップS10)。撮像部8の撮影範囲に対象ワーク2が搬送されると、欠陥検出装置は、撮像部8によって対象ワーク2を撮影することで検査画像を取得する(ステップS12)。なお、欠陥検出装置は、搬送機構6上などに配置される位置センサ(図示しない)などによって、対象ワーク2の到着を検出する。 When the learning process and the storage of the learning result are finished, the user operates the transport mechanism 6 and the like so that the target work 2 is sequentially transported to the photographing range of the imaging unit 8 on the transport mechanism 6 (step S10). When the target workpiece 2 is transported to the imaging range of the imaging unit 8, the defect detection apparatus acquires an inspection image by imaging the target workpiece 2 by the imaging unit 8 (step S12). The defect detection device detects the arrival of the target workpiece 2 by a position sensor (not shown) arranged on the transport mechanism 6 or the like.
検査画像を取得すると、欠陥検出装置は、欠陥検出処理を実行し(ステップS14)、その欠陥検出結果を出力する(ステップS16)。なお、欠陥検出結果は、欠陥検出装置に格納されたり、モニタ102などに出力されたりする。 When the inspection image is acquired, the defect detection apparatus executes defect detection processing (step S14) and outputs the defect detection result (step S16). The defect detection result is stored in the defect detection apparatus or output to the monitor 102 or the like.
そして、欠陥検出装置は、終了指示が与えられたか否かを判断する(ステップS18)。この終了指示は、ユーザなどによって与えられ、もしくは欠陥検出対象の対象ワーク2が不存在であることの検知などに連動して与えられる。終了指示が与えられていなければ(ステップS18においてNO)、欠陥検出装置は、ステップS12以降の処理を再度実行する。終了指示が与えられていれば(ステップS18においてYES)、処理は終了する。 Then, the defect detection device determines whether or not an end instruction has been given (step S18). This end instruction is given by the user or the like, or in conjunction with the detection of the absence of the target workpiece 2 as the defect detection target. If an end instruction has not been given (NO in step S18), the defect detection device executes the processes in and after step S12 again. If an end instruction is given (YES in step S18), the process ends.
図18は、この発明の実施の形態1に従う学習処理の処理手順を示すフローチャートである。また、図19は、この発明の実施の形態1に従う欠陥検出処理の処理手順を示すフローチャートである。なお、図18および図19に示すフローチャートは、CPU105が固定ディスク107などに予め格納されたプログラムをメモリ106に読出して実行することにより、図7に示すような機能を実現することで実行される。 FIG. 18 is a flowchart showing a processing procedure of learning processing according to the first embodiment of the present invention. FIG. 19 is a flowchart showing a processing procedure for defect detection processing according to the first embodiment of the present invention. The flowcharts shown in FIGS. 18 and 19 are executed by realizing the functions shown in FIG. 7 by the CPU 105 reading a program stored in advance in the fixed disk 107 or the like into the memory 106 and executing it. .
(学習処理の処理手順)
図7および図18を参照して、抽出部204として機能するCPU105は、ユーザから、部分領域セットに含まれる部分領域の最小/最大ベクトルサイズおよび部分領域の数の設定を受付ける(ステップS100)。そして、抽出部204として機能するCPU105は、ステップS100におけるユーザからの設定情報に従って、部分領域セットを決定する(ステップS102)。
(Learning process)
Referring to FIGS. 7 and 18, CPU 105 functioning as extraction unit 204 accepts the setting of the minimum / maximum vector size of the partial area and the number of partial areas included in the partial area set from the user (step S <b> 100). Then, the CPU 105 functioning as the extraction unit 204 determines a partial region set according to the setting information from the user in step S100 (step S102).
抽出部204として機能するCPU105は、部分領域セットに含まれる1つのベクトルサイズについて、学習画像LNIMGから部分領域を抽出する(ステップS104)。そして、ベクトル生成部206として機能するCPU105は、抽出された部分領域の画像情報から学習画像ベクトルxi LN(j)を生成する(ステップS106)。さらに、CPU105は、学習画像LNIMGから抽出すべき部分領域BLKLNが未だ残っているか否かを判断する(ステップS108)。学習画像LNIMGから抽出すべき部分領域BLKLNが残っている場合(ステップS108においてYESの場合)には、CPU105は、ステップS104以下の処理を繰返す。 The CPU 105 functioning as the extracting unit 204 extracts a partial region from the learning image LNIMG for one vector size included in the partial region set (step S104). Then, the CPU 105 functioning as the vector generation unit 206 generates a learning image vector x i LN (j) from the extracted partial region image information (step S106). Further, the CPU 105 determines whether or not the partial region BLK LN to be extracted from the learning image LNIMG still remains (step S108). When partial region BLK LN to be extracted from learning image LNIMG remains (YES in step S108), CPU 105 repeats the processing in step S104 and subsequent steps.
これに対して、学習画像LNIMGから抽出すべき部分領域BLKが残っていない場合(ステップS108においてNOの場合)には、固有ベクトル算出部208として機能するCPU105は、学習画像ベクトルxi LN(j)からなるベクトルの組から固有ベクトルV(j)を算出する(ステップS110)。そして、固有空間決定部210として機能するCPU105は、算出した固有ベクトルV(j)のうち、その固有値が大きいものから順に所定数の固有ベクトルを用いて、当該ベクトルサイズにおける固有空間E(j)を決定する(ステップS112)。そして、CPU105は、決定した固有空間E(j)を学習結果格納部240へ格納する(ステップS114)。 On the other hand, when the partial region BLK to be extracted from the learning image LNIMG does not remain (NO in step S108), the CPU 105 functioning as the eigenvector calculation unit 208 determines the learning image vector x i LN (j). An eigenvector V (j) is calculated from a set of vectors consisting of (step S110). Then, the CPU 105 functioning as the eigenspace determining unit 210 determines the eigenspace E (j) in the vector size using a predetermined number of eigenvectors in descending order from the calculated eigenvector V (j). (Step S112). Then, the CPU 105 stores the determined eigenspace E (j) in the learning result storage unit 240 (step S114).
さらに、CPU105は、部分領域セットに含まれるすべてのベクトルサイズの部分領域について固有空間E(j)の決定が完了したか否かを判断する(ステップS116)。部分領域セットに含まれるすべてのベクトルサイズの部分領域について固有空間E(j)の算出が完了していない場合(ステップS116においてNOの場合)には、抽出部204として機能するCPU105は、部分領域セットに含まれる残りのベクトルサイズについて、学習画像LNIMGから部分領域を抽出する(ステップS118)。そして、ステップS106以降の処理を再度実行する。 Further, the CPU 105 determines whether or not the determination of the eigenspace E (j) is completed for all the partial areas of the vector size included in the partial area set (step S116). When the calculation of the eigenspace E (j) is not completed for all the partial areas of the vector size included in the partial area set (NO in step S116), the CPU 105 functioning as the extracting unit 204 For the remaining vector sizes included in the set, a partial region is extracted from the learning image LNIMG (step S118). And the process after step S106 is performed again.
部分領域セットに含まれるすべてのベクトルサイズの部分領域について抽出を完了している場合(ステップS116においてYESの場合)には、抽出部214として機能するCPU105は、学習画像LNIMGに評価領域を設定(ステップS120)し、その評価領域について、異なる複数のベクトルサイズをもつ部分領域BLKEV(1),BLKEV(2),・・・,BLKEV(m)を順次抽出する(ステップS122)。そして、ベクトル生成部216として機能するCPU105は、抽出された部分領域BLKEV(1),BLKEV(2),・・・,BLKEV(m)の画像情報から、評価領域画像ベクトルxk EV(1),xk EV(2),・・・,xk EV(m)を生成する(ステップS124)。 When extraction has been completed for all the partial regions of the vector size included in the partial region set (YES in step S116), CPU 105 functioning as extraction unit 214 sets an evaluation region in learning image LNIMG ( Then, partial areas BLK EV (1) , BLK EV (2) ,..., BLK EV (m) having a plurality of different vector sizes are sequentially extracted from the evaluation area (step S122). Then, the CPU 105 functioning as the vector generation unit 216 determines the evaluation area image vector x k EV from the image information of the extracted partial areas BLK EV (1) , BLK EV (2) ,..., BLK EV (m). (1) , x k EV (2) ,..., X k EV (m) are generated (step S124).
続いて、距離算出部218として機能するCPU105は、評価領域画像ベクトルxk EV(1),xk EV(2),・・・,xk EV(m)の各々について、対応するベクトルサイズの固有空間E(1),E(1),・・・,E(m)との間の距離Out1(k),Out2(k),・・・,Outm(k)を算出する(ステップS126)。そして、距離算出部218として機能するCPU105は、算出した距離Out1(k),Out2(k),・・・,Outm(k)を集合して応答ベクトルRV(k)=[Out1(k),Out2(k),・・・,Outm(k)]を生成する(ステップS128)。 Subsequently, the CPU 105 functioning as the distance calculation unit 218 has a vector size corresponding to each of the evaluation area image vectors x k EV (1) , x k EV (2) ,..., X k EV (m) . eigenspace E (1), E (1 ), ···, E (m) distance Out 1 (k) between, Out 2 (k), ··· , calculates the Out m (k) ( Step S126). Then, the CPU 105 functioning as the distance calculation unit 218 collects the calculated distances Out 1 (k), Out 2 (k),..., Out m (k) and sets a response vector RV (k) = [Out 1 (K), Out 2 (k),..., Out m (k)] are generated (step S128).
さらに、CPU105は、学習画像LNIMGに評価領域を設定すべき領域が未だ残っているか否かを判断する(ステップS130)。学習画像LNIMGに評価領域を設定すべき領域が残っている場合(ステップS130においてYESの場合)には、CPU105は、ステップS120以下の処理を繰返す。 Further, the CPU 105 determines whether or not there is still a region where an evaluation region should be set in the learning image LNIMG (step S130). If there is an area for which an evaluation area is to be set in learning image LNIMG (YES in step S130), CPU 105 repeats the processes in and after step S120.
これに対して、学習画像LNIMGに評価領域を設定すべき領域が残っていない場合(ステップS130においてNOの場合)には、分類部220として機能するCPU105は、ステップS126において生成した応答ベクトルRV(k)の集合に対して、正常値とはずれ値とを区別するための判別関数を決定し(ステップS132)、この決定した判別関数を学習結果格納部240へ格納する(ステップS134)。そして、処理はステップS8へ戻る。 On the other hand, when there is no region for which the evaluation region should be set in the learning image LNIMG (NO in step S130), the CPU 105 functioning as the classification unit 220 generates the response vector RV ( For the set k), a discriminant function for discriminating between a normal value and an outlier value is determined (step S132), and the determined discriminant function is stored in the learning result storage unit 240 (step S134). Then, the process returns to step S8.
(欠陥検査処理の処理手順)
図7および図19を参照して、抽出部224として機能するCPU105は、検査画像IMGに評価領域を設定(ステップS200)し、その評価領域について、異なる複数のベクトルサイズをもつ部分領域BLK(1),BLK(2),・・・,BLK(m)を順次抽出する(ステップS202)。そして、ベクトル生成部226として機能するCPU105は、抽出された部分領域BLK(1),BLK(2),・・・,BLK(m)の画像情報から、検査画像ベクトルxk (1),xk (2),・・・,xk (m)を生成する(ステップS204)。
(Defect inspection processing procedure)
Referring to FIGS. 7 and 19, CPU 105 functioning as extraction unit 224 sets an evaluation area in inspection image IMG (step S200), and partial areas BLK (1 having different vector sizes for the evaluation area) ), BLK (2), ··· , sequentially extracted BLK (m) (step S202). Then, the CPU 105 functioning as the vector generation unit 226 determines the inspection image vector x k (1) , x from the image information of the extracted partial areas BLK (1) , BLK (2) ,..., BLK (m). k (2) ,..., x k (m) are generated (step S204).
続いて、距離算出部228として機能するCPU105は、学習結果格納部240から、検査画像ベクトルxk (1),xk (2),・・・,xk (m)にそれぞれ対応する固有空間E(D)を読出す(ステップS206)。そして、距離算出部228として機能するCPU105は、検査画像ベクトルxk (1),xk (2),・・・,xk (m)と、これらの読出した内積値Pk (j)T・Pk (j)とに基づいて、対応するベクトルサイズの固有空間E(j)との距離Out’1(k),Out’2(k),・・・,Out’m(k)を算出する(ステップS208)。 Subsequently, the CPU 105 functioning as the distance calculation unit 228 receives eigenspaces corresponding to the inspection image vectors x k (1) , x k (2) ,..., X k (m) from the learning result storage unit 240, respectively. E (D) is read (step S206). The CPU 105 functioning as the distance calculation unit 228 and the inspection image vectors x k (1) , x k (2) ,..., X k (m) and the read inner product values P k (j) T Based on P k (j) , the distances Out ′ 1 (k), Out ′ 2 (k),..., Out ′ m (k) with the corresponding eigenspace E (j) of the vector size Calculate (step S208).
続いて、判断部230として機能するCPU105は、算出した距離Out’1(k),Out’2(k),・・・,Out’m(k)を集合して応答ベクトルRV’(k)=[Out’1(k),Out’2(k),・・・,Out’m(k)]を生成する(ステップS210)。そして、判断部230として機能するCPU105は、学習結果格納部240から判別関数を読出し(ステップS212)、読出した判別関数に基づいて、算出した応答ベクトルRV’(k)が正常値およびはずれ値のいずれの領域に存在しているかを判断する(ステップS214)。そして、判断部230として機能するCPU105は、対象の評価領域のラベル情報に対応付けて、検査画像IMGにおける欠陥有無の状態をマッピングする(ステップS216)。すなわち、CPU105は、検査画像IMGにおける欠陥の位置を特定する。 Subsequently, the CPU 105 functioning as the determination unit 230 collects the calculated distances Out ′ 1 (k), Out ′ 2 (k),..., Out ′ m (k) to collect the response vector RV ′ (k). = [Out ' 1 (k), Out' 2 (k), ..., Out ' m (k)] is generated (step S210). Then, the CPU 105 functioning as the determination unit 230 reads the discriminant function from the learning result storage unit 240 (step S212), and the calculated response vector RV ′ (k) based on the read discriminant function has a normal value and an outlier value. It is determined in which area it exists (step S214). Then, the CPU 105 functioning as the determination unit 230 maps the defect presence / absence state in the inspection image IMG in association with the label information of the target evaluation area (step S216). That is, the CPU 105 identifies the position of the defect in the inspection image IMG.
その後、CPU105は、検査画像IMGに評価領域を設定すべき領域が未だ残っているか否かを判断する(ステップS218)。検査画像IMGに評価領域を設定すべき領域が残っている場合(ステップS218においてYESの場合)には、CPU105は、ステップS200以下の処理を繰返す。 Thereafter, the CPU 105 determines whether or not there is still an area for setting the evaluation area in the inspection image IMG (step S218). If there remains an area for which an evaluation area should be set in inspection image IMG (YES in step S218), CPU 105 repeats the processes in and after step S200.
これに対して、検査画像IMGに評価領域を設定すべき領域が残っていない場合(ステップS218においてNOの場合)には、判断部230として機能するCPU105は、検査画像IMGに対して欠陥の位置と特定された箇所に対して、エッジ検出などを実行し、欠陥の種類や大きさなどの欠陥についての詳細な情報を検出する(ステップS220)。そして、処理はステップS16へ戻る。 On the other hand, when there is no region where the evaluation region should be set in the inspection image IMG (NO in step S218), the CPU 105 functioning as the determination unit 230 determines the position of the defect with respect to the inspection image IMG. Edge detection or the like is performed on the part identified as “” and detailed information about the defect such as the type and size of the defect is detected (step S220). Then, the process returns to step S16.
(本実施の形態による作用効果)
この発明の実施の形態1によれば、検査画像の評価領域に対して互いに大きさの異なる複数の部分領域が設定されとともに、各部分領域について、その画像情報から生成される画像ベクトルと対応の固有空間との間の距離を算出する。さらに、各部分領域についての大きさ毎の距離を要素とする応答ベクトルを生成し、学習処理によって予め定められた判別関数を参照して、この応答ベクトルを評価することで、評価領域における欠陥の有無を判断する。このように、評価領域を互いに大きさの異なる複数の部分領域の単位におけるそれぞれの評価結果を総合した上で、欠陥の有無を判断するので、検査画像に発生し得る欠陥の大きさのバラツキによる影響を抑制し、欠陥の検出精度をより高めることができる。
(Operational effects of the present embodiment)
According to the first embodiment of the present invention, a plurality of partial areas having different sizes are set for the evaluation area of the inspection image, and each partial area is associated with an image vector generated from the image information. Calculate the distance to the eigenspace. Further, a response vector having a distance for each size as a component for each partial region is generated, and this response vector is evaluated with reference to a discriminant function determined in advance by a learning process. Judgment is made. In this way, since the evaluation area is determined based on the evaluation results in the units of a plurality of partial areas having different sizes, the presence / absence of a defect is determined. The influence can be suppressed and the detection accuracy of defects can be further increased.
また、この発明の実施の形態1によれば、予め欠陥を含まない学習画像に基づいて、画像ベクトルとの間の距離を算出するための基準となる固有空間が決定される。そのため、欠陥部分の影響を排除した固有空間を決定することができるので、検査画像に対する欠陥の検出精度をより高めることができる。 Further, according to the first embodiment of the present invention, the eigenspace serving as a reference for calculating the distance to the image vector is determined based on a learning image not including a defect in advance. For this reason, the eigenspace in which the influence of the defective portion is eliminated can be determined, so that the defect detection accuracy for the inspection image can be further increased.
また、この発明の実施の形態1によれば、欠陥検出処理時における画像ベクトルと固有空間との間の距離は、学習処理時に算出された投影ベクトルの内積値を用いて算出される。そのため、欠陥検出処理における距離算出に伴う演算量を低減できるので、より高速な欠陥検出処理を実現できる。 According to the first embodiment of the present invention, the distance between the image vector and the eigenspace during the defect detection process is calculated using the inner product value of the projection vectors calculated during the learning process. As a result, the amount of calculation associated with the distance calculation in the defect detection process can be reduced, so that a faster defect detection process can be realized.
[実施の形態2]
上述の実施の形態1に従う欠陥検出処理によれば、検査画像に発生し得る欠陥の大きさのバラツキによる影響を抑制し、欠陥の検出精度をより高めることができる。しかしながら、検査画像が周期的なテクスチャをもつ場合などには、誤差を生じやすい。
[Embodiment 2]
According to the defect detection process according to the above-described first embodiment, it is possible to suppress the influence due to the variation in the size of the defect that may occur in the inspection image, and to further improve the defect detection accuracy. However, an error tends to occur when the inspection image has a periodic texture.
具体的には、検査画像から切り出すサンプルの位置が学習画像と全く同じ位置であっても、そこの表れている周期的なテクスチャが全く同一であるとは限らない。そのため、切り出した評価領域(部分領域セットSET)に表れる周期的な濃淡模様に空間的な位相差が生じ、その結果、欠陥がなくても固有空間に対する距離が増大し得る。そこで、本実施の形態では、周期的な濃淡模様を含む検査画像に対しても、正確に欠陥検出を行なうことができる構成および処理について例示する。 Specifically, even if the position of the sample cut out from the inspection image is exactly the same as that of the learning image, the periodic texture appearing there is not always exactly the same. Therefore, a spatial phase difference occurs in the periodic gray pattern appearing in the cut out evaluation area (partial area set SET), and as a result, the distance to the eigenspace can be increased even if there is no defect. Therefore, in the present embodiment, a configuration and processing capable of accurately detecting a defect even for an inspection image including a periodic shading pattern will be exemplified.
より具体的には、検査画像IMGに対する評価領域の配置パターンの開始位置を適切に決定するために、各検査画像IMGにおける基準位置を検索する。特に、学習画像LNIMGおよび検査画像IMGが周期的な濃淡模様をもつ場合には、この配置パターンをいずれの位置に配置するかによって、その欠陥の検出精度が大きく影響される。なお、周期的な濃淡模様をもつ画像とは、同一の模様(テクスチャ)が所定周期(周期一定)で連続的に表れるような画像を意味する。典型的には、後述する図21,図22,図24に示すような幾何学的模様などを含む画像を意味する。 More specifically, the reference position in each inspection image IMG is searched in order to appropriately determine the start position of the arrangement pattern of the evaluation area with respect to the inspection image IMG. In particular, when the learning image LNIMG and the inspection image IMG have a periodic shading pattern, the defect detection accuracy is greatly influenced by which position the arrangement pattern is arranged. Note that an image having a periodic shading pattern means an image in which the same pattern (texture) appears continuously at a predetermined period (constant period). Typically, it means an image including a geometric pattern or the like as shown in FIGS.
ここで、学習画像LNIMGと検査画像IMGとに生じる周期的な濃淡模様の位置(空間的な位相)が全く同一であるとは限らず、また生産ラインの搬送状態などによっても、撮像部8によって撮影された画像に表れる周期的な濃淡模様にずれが生じる。このような場合には、当該配置パターンのある位置に存在する評価領域に対応するある部分領域BLKLNおよびBLKについて見れば、学習画像LNIMGおよび検査画像IMGからそれぞれ生成された画像ベクトルに表れる特徴量は互いに異なったものとなる。そこで、検査画像IMGに対する欠陥検出の実行前に、学習画像LNIMGの所定の検索方向に沿って、所定の大きさをもつ部分領域BLKSを順次設定していき、各位置における部分領域BLKSの画像情報から生成される画像ベクトルの固有空間に対する距離を順次算出する。そして、この固有空間に対する距離の検索方向についての変化に基づいて、検査画像IMGにおける対応する基準位置を決定する。そして、この決定した基準位置に基づく配置パターンに従って、検査画像IMGに対して評価領域(すなわち、対応するBLK(1),BLK(2),・・・,BLK(m))を設定し、欠陥の有無を検出する。 Here, the position (spatial phase) of the periodic shading pattern generated in the learning image LNIMG and the inspection image IMG is not always the same, and the imaging unit 8 also depends on the transport state of the production line and the like. Deviation occurs in the periodic shading pattern appearing in the captured image. In such a case, if the partial areas BLK LN and BLK corresponding to the evaluation area existing at a certain position of the arrangement pattern are viewed, the feature amounts appearing in the image vectors respectively generated from the learning image LNIMG and the inspection image IMG Are different from each other. Therefore, before performing the defect detection with respect to the inspection image IMG, along a predetermined search direction of the learning image LNIMG, continue to sequentially set the partial area BLK S having a predetermined size, the partial area BLK S at each position The distance to the eigenspace of the image vector generated from the image information is sequentially calculated. And based on the change about the search direction of the distance with respect to this eigenspace, the corresponding reference position in the inspection image IMG is determined. Then, according to the arrangement pattern based on the determined reference position, an evaluation region (that is, a corresponding BLK (1) , BLK (2) ,..., BLK (m) ) is set for the inspection image IMG, and a defect is detected. The presence or absence of is detected.
(制御構造)
図20は、この発明の実施の形態2に従う欠陥検出装置の制御構造を示す機能ブロック図である。
(Control structure)
FIG. 20 is a functional block diagram showing a control structure of the defect detection apparatus according to the second embodiment of the present invention.
図20を参照して、本実施の形態に従う欠陥検出装置は、図7に示す実施の形態1に従う欠陥検出装置において、領域設定部244と、ベクトル生成部246と、距離算出部248と、基準位置決定部250と、検索領域受付部256とを加えたものに相当する。その他の部位については、図7を用いて説明したので、詳細な説明は繰返さない。 Referring to FIG. 20, the defect detection device according to the present embodiment is the same as the defect detection device according to the first embodiment shown in FIG. 7, but includes region setting unit 244, vector generation unit 246, distance calculation unit 248, reference This corresponds to the addition of the position determination unit 250 and the search area reception unit 256. Since other parts have been described with reference to FIG. 7, detailed description will not be repeated.
まず、対象ワーク2が周期的なテクスチャを有し、学習画像LNIMGおよび検査画像IMGに周期的な濃淡模様が表れている場合について考える。このような場合には、検査画像IMGに設定する評価領域(すなわち、対応するBLKEV(1),BLKEV(2),・・・,BLKEV(m)、または、BLK(1),BLK(2),・・・,BLK(m))の配置パターンを、検査画像IMGに表れる周期的な濃淡模様に応じて適切に設定する必要がある。 First, let us consider a case where the target work 2 has a periodic texture and a periodic shading pattern appears in the learning image LNIMG and the inspection image IMG. In such a case, the evaluation area (that is, the corresponding BLK EV (1) , BLK EV (2) ,..., BLK EV (m) or BLK (1) , BLK set in the inspection image IMG. The arrangement pattern of (2) ,..., BLK (m) ) needs to be appropriately set according to the periodic shading pattern appearing in the inspection image IMG.
以下、このような周期的な濃淡模様が表れている学習画像LNIMGおよび検査画像IMGに対して、本実施の形態に従う欠陥検出方法を適用する場合に、誤差が発生する原因について説明する。 Hereinafter, the reason why an error occurs when the defect detection method according to the present embodiment is applied to the learning image LNIMG and the inspection image IMG in which such a periodic shading pattern appears will be described.
図21は、周期的なテクスチャを有する対象ワーク2の一例を示す図である。たとえば、図21(a)に示す対象ワーク2と、図21(b)に示す対象ワーク2とを比較すると、各対象ワーク2における周期的な濃淡模様の相対的な開始位置が異なっていることがわかる。具体的には、当該濃淡模様が全体的に紙面上下方向にずれていることがわかる。このように、同一の製造ラインで製造される対象ワークであっても、その表面に現れるテクスチャが全く同一の位置に現れるとは限らない。 FIG. 21 is a diagram illustrating an example of the target workpiece 2 having a periodic texture. For example, when the target workpiece 2 shown in FIG. 21A and the target workpiece 2 shown in FIG. 21B are compared, the relative start positions of the periodic shading patterns in each target workpiece 2 are different. I understand. Specifically, it can be seen that the shading pattern is entirely displaced in the vertical direction of the paper. As described above, even if the workpieces are manufactured on the same manufacturing line, the texture appearing on the surface does not always appear at the same position.
図22は、検査画像IMGに表れる周期的な濃淡模様の位置がばらつく場合において、抽出される部分領域BLKの一例を示す図である。図22(a)は、検査画像IMG全体の一例を示し、図22(b)および図22(c)は、それぞれ抽出される部分領域BLKの一例を示す。 FIG. 22 is a diagram illustrating an example of the partial region BLK that is extracted when the positions of the periodic shading patterns that appear in the inspection image IMG vary. FIG. 22A shows an example of the entire inspection image IMG, and FIGS. 22B and 22C show examples of the partial areas BLK that are extracted.
図22(a)に示すような、全体的に周期的な濃淡模様を有する検査画像IMGにおいて、周期的な濃淡模様の位置がばらついてしまうと、検査画像IMGにおける対応する座標位置を基準として評価領域を設定したとしても、抽出された部分領域BLK(1),BLK(2),・・・,BLK(m)に含まれる特徴は異なったものとなる。たとえば、検査画像IMGの左上の頂点を基準として評価領域を設定したとしても、当該検査画像IMGの周期的な濃淡模様の位置がばらついてしまうと、図22(b)および図22(c)に示すように、その評価領域に対応する同一サイズの部分領域BLKEV(m)とBLK(m)との間の特徴は互いに異なったものとなる。 In the inspection image IMG having an overall periodic shading pattern as shown in FIG. 22A, if the position of the periodic shading pattern varies, the evaluation is performed based on the corresponding coordinate position in the inspection image IMG. Even if the region is set, the features included in the extracted partial regions BLK (1) , BLK (2) ,..., BLK (m) are different. For example, even if the evaluation region is set with reference to the upper left vertex of the inspection image IMG, if the position of the periodic shading pattern of the inspection image IMG varies, the states shown in FIGS. 22 (b) and 22 (c) are obtained. As shown, the features between the partial areas BLK EV (m) and BLK (m) of the same size corresponding to the evaluation area are different from each other.
図23は、検査画像IMGに設定された評価領域に対応する代表的な部分領域BLKについての固有空間に対する距離を視覚的に示した図の一例である。図23(a)は、検査画像IMGにおける基準位置がずれている場合を示し、図23(b)は、検査画像IMGにおける基準位置が学習画像LNIMGの基準位置と対応している場合を示す。なお、図23においては、濃度が高い(黒い)ほど、固有空間に対する距離が小さいことを示し、明るい(白い)ほど、固有空間に対する距離が大きいことを示す。 FIG. 23 is an example of a diagram visually showing the distance to the eigenspace for a representative partial region BLK corresponding to the evaluation region set in the inspection image IMG. FIG. 23A shows a case where the reference position in the inspection image IMG is shifted, and FIG. 23B shows a case where the reference position in the inspection image IMG corresponds to the reference position of the learning image LNIMG. In FIG. 23, the higher the density (black), the smaller the distance to the eigenspace, and the brighter (white), the greater the distance to the eigenspace.
図23(a)を参照して、検査画像IMGの基準位置がずれている場合には、このずれによって周期的な誤差が発生していることがわかる。これに対して、図23(b)に示すように、検査画像IMGの基準位置が学習画像LNIMGの基準位置と対応している場合には、欠陥DEFを含む部分領域BLKを除いて、各部分領域BLKについての固有空間
に対する距離が小さく、かつ均一化していることがわかる。
Referring to FIG. 23A, when the reference position of the inspection image IMG is deviated, it can be seen that a cyclic error occurs due to this deviation. On the other hand, as shown in FIG. 23B, when the reference position of the inspection image IMG corresponds to the reference position of the learning image LNIMG, each part except for the partial area BLK including the defect DEF. It can be seen that the distance to the eigenspace for the region BLK is small and uniform.
そこで、本実施の形態に従う欠陥画像装置は、検査画像IMGに対して、学習画像LNIMGに設定される評価領域に対応する基準位置を検索し、この検索した基準位置を基準にして、欠陥検出の対象とする評価領域を設定する。すなわち、学習画像LNIMGおよび検査画像IMG内での相対的な位置を共通化するのではなく、学習画像LNIMGの基準点における周期的な濃淡模様の部分と対応付けて、検査画像IMG内の基準点を検索するものである。これにより、学習画像LNIMGに表れる周期的な濃淡模様と検査画像IMGに表れる濃淡模様との間にずれがあっても、正確な欠陥検出を実現できる。 Therefore, the defect image device according to the present embodiment searches the inspection image IMG for a reference position corresponding to the evaluation region set in the learning image LNIMG, and performs defect detection on the basis of the searched reference position. Set the target evaluation area. That is, instead of sharing the relative position in the learning image LNIMG and the inspection image IMG, the reference point in the inspection image IMG is associated with the periodic shade pattern portion in the reference point of the learning image LNIMG. Is to search. Thus, accurate defect detection can be realized even if there is a deviation between the periodic shading pattern appearing in the learning image LNIMG and the shading pattern appearing in the inspection image IMG.
再度、図20を参照して、このような基準位置の検索処理は、領域設定部244と、ベクトル生成部246と、距離算出部248と、基準位置決定部250と、検索領域受付部256とによって実現される。 Referring again to FIG. 20, such a reference position search process includes an area setting unit 244, a vector generation unit 246, a distance calculation unit 248, a reference position determination unit 250, and a search region reception unit 256. It is realized by.
図24は、検査画像IMGにおける基準位置の検索処理を説明するための図である。図24(a)は、学習画像LNIMGに設定される評価領域(但し、簡略化のため、最小サイズの部分領域BLKEV(1)として表現)を示し、図24(b)は、検査画像IMGにおける基準位置を検索するための部分領域BLKSを示す。 FIG. 24 is a diagram for explaining reference position search processing in the inspection image IMG. FIG. 24A shows an evaluation region (represented as a partial region BLK EV (1) having a minimum size for simplification) set in the learning image LNIMG, and FIG. 24B shows an inspection image IMG. A partial region BLK S for searching for a reference position at is shown.
図24(a)を参照して、たとえば、学習画像LNIMGには、所定の基準位置(たとえば、左上頂点)を基準とする所定の配置パターンに従って、評価領域が規則的に複数設定される。この複数設定された評価領域に対応する部分領域BLK(1),BLK(2),・・・,BLK(m)の全部もしくは一部に基づいて、固有空間が算出される。 Referring to FIG. 24A, for example, in the learning image LNIMG, a plurality of evaluation regions are regularly set according to a predetermined arrangement pattern based on a predetermined reference position (for example, the upper left vertex). The eigenspace is calculated based on all or part of the partial areas BLK (1) , BLK (2) ,..., BLK (m) corresponding to the plurality of set evaluation areas.
一方、図24(b)を参照して、検査画像IMGに対して設定される部分領域BLKSを所定の検索方向に沿って、順次走査するとともに、各部分領域BLKSに対応する画像ベクトル(以下、「検索画像ベクトル」とも称す)と固有空間との間の距離を順次算出する。なお、便宜上、検査画像IMGの紙面横方向をX方向と称し、同じく紙面縦方向をY方向と称す。さらに、この検索方向についての固有空間に対する距離の変化に基づいて、検査画像IMGにおける基準位置が決定される。 On the other hand, referring to FIG. 24 (b), the along the partial region BLK S set for the test image IMG in a predetermined search direction, as well as progressive scan, image vectors corresponding to the respective partial regions BLK S ( Hereinafter, the distance between the “search image vector” and the eigenspace is sequentially calculated. For convenience, the horizontal direction of the test image IMG is referred to as the X direction, and the vertical direction of the paper is also referred to as the Y direction. Furthermore, a reference position in the inspection image IMG is determined based on a change in distance with respect to the eigenspace with respect to the search direction.
検査画像IMGにおける基準位置を検索するためには、検索方向に沿った部分領域BLKSの長さより短い間隔で部分領域BLKSを順次設定する必要があり、検査画像IMGを構成する画素(ピクセル)単位の間隔で部分領域BLKSを設定することがより好ましい。このように、部分領域BLKSを1画素単位で移動させることによって、より正確に検査画像IMGにおける基準位置を決定することができる。 In order to search for the reference position in the inspection image IMG, it is necessary to sequentially set the partial areas BLK S at intervals shorter than the length of the partial area BLK S along the search direction, and the pixels (pixels) constituting the inspection image IMG It is more preferable to set the partial areas BLK S at unit intervals. In this manner, the reference position in the inspection image IMG can be determined more accurately by moving the partial region BLK S in units of one pixel.
また、部分領域BLKSを検査画像IMGの全体に亘って走査することで、検査画像IMGにおける基準位置を検索することができるが、そのために過剰な処理時間を要する場合も考えられる。そこで、予め定められた検索領域SRC内において、部分領域BLKSを走査することが好ましい。なお、X方向単独またはY方向単独、ないしX・Y方向同時のいずれの方法で部分領域BLKSの走査を行なってよい。 Further, the reference position in the inspection image IMG can be searched by scanning the partial region BLK S over the entire inspection image IMG. However, there may be a case where excessive processing time is required. Therefore, it is preferable to scan the partial area BLK S within the predetermined search area SRC. Incidentally, X-direction alone or the Y direction alone, to be subjected to scanning the partial area BLK S by any of the methods of the X · Y-direction simultaneously.
図25は、検査画像IMGにおける基準位置を検索するための検索領域SRCの決定方法を説明するための図である。図25(a)は、濃淡模様の周期が部分領域BLKSの大きさより短い場合を示し、図25(b)は、濃淡模様の周期が部分領域BLKSの大きさより長い場合を示す。図26は、濃淡模様の周期について説明するための図である。 FIG. 25 is a diagram for explaining a method of determining a search area SRC for searching for a reference position in the inspection image IMG. FIG. 25A shows a case where the period of the shade pattern is shorter than the size of the partial region BLK S , and FIG. 25B shows a case where the cycle of the shade pattern is longer than the size of the partial region BLK S. FIG. 26 is a diagram for explaining the period of the shading pattern.
図25(a)を参照して、濃淡模様の周期が部分領域BLKSの大きさより短い場合、
すなわち1つの部分領域BLKS内に1周期以上の濃淡模様が存在する場合には、検索領域SRCは、最大で部分領域BLKSの2×2の大きさとすればよい。これは、部分領域BLKSを濃淡模様の1周期分の距離に亘って走査することで、基準位置を決定することができるためである。
Referring to FIG. 25A, when the period of the light and shade pattern is shorter than the size of the partial region BLK S ,
In other words, if there is a light and shade pattern of one period or more in one partial area BLK S , the search area SRC may be at most 2 × 2 in size of the partial area BLK S. This is because the reference position can be determined by scanning the partial region BLK S over a distance corresponding to one period of the light and shade pattern.
一方、図25(b)を参照して、濃淡模様の周期が部分領域BLKSの大きさより長い場合、すなわち1つの部分領域BLKSが1周期分の濃淡模様を含まない場合には、当該濃淡模様の周期に応じて、検索領域SRCを決定する必要がある。 On the other hand, referring to FIG. 25 (b), the if the period of the shading pattern is longer than the size of the partial region BLK S, i.e. one partial area BLK S does not include a shading pattern of one period is the gray The search area SRC needs to be determined according to the pattern period.
図26を参照して、本明細書において、濃淡模様の周期とは、隣接する同一模様(テクスチャ)の間の距離を意味する。濃淡模様の周期としては、基本的に、X方向およびY方向のそれぞれについて規定することができる。そして、これらのX方向に1周期分以上およびY方向に1周期分以上の長さをもつ検索領域SRCを設定することが好ましい。 With reference to FIG. 26, in this specification, the period of a light and shade pattern means the distance between the same adjacent patterns (textures). Basically, the period of the shading pattern can be defined for each of the X direction and the Y direction. It is preferable to set a search region SRC having a length of one cycle or more in the X direction and one cycle or more in the Y direction.
このような検索領域SRCは、欠陥を含まない学習画像LNIMGに基づいて固有空間を算出する際に、ユーザが、学習画像LNIMGに表れる周期的な濃淡模様を確認した上で、予め決定してもよい。このような場合には、検索領域受付部256(図20)がユーザから検索領域SRCの大きさを受付け、その値を学習結果格納部240へ格納する。あるいは、学習画像LNIMGに対して、公知のパターン抽出処理などを行なって、このような濃淡模様の周期を算出した上で、検索領域SRCを算出してもよい。このような場合には、検索領域受付部256(図20)が、ユーザに検索領域SRCとすべき領域の候補をガイドするようにしてもよい。 Such a search area SRC may be determined in advance after the user confirms a periodic shading pattern appearing in the learning image LNIMG when calculating the eigenspace based on the learning image LNIMG not including a defect. Good. In such a case, the search area receiving unit 256 (FIG. 20) receives the size of the search area SRC from the user and stores the value in the learning result storage unit 240. Alternatively, the search area SRC may be calculated after performing a known pattern extraction process or the like on the learning image LNIMG and calculating the period of such a shading pattern. In such a case, the search area receiving unit 256 (FIG. 20) may guide the user of areas that should be the search area SRC.
再度、図20を参照して、領域設定部244は、画像バッファ部222に一時的に格納される検査画像IMGに対して、検査画像IMGの所定の検索方向に従って、部分領域BLKSを順次設定する。領域設定部244は、図24(b)に示すように、学習結果格納部240に格納された検索領域SRCに従って、部分領域BLKSを順次設定する。 Referring to FIG. 20 again, region setting unit 244 sequentially sets partial regions BLK S according to a predetermined search direction of inspection image IMG for inspection image IMG temporarily stored in image buffer unit 222. To do. The region setting unit 244 sequentially sets the partial regions BLK S according to the search region SRC stored in the learning result storage unit 240 as shown in FIG.
そして、領域設定部244は、この設定した各部分領域BLKSに対応する検査画像IMGの画像情報をベクトル生成部246へ出力する。言い換えれば、領域設定部244は、画像バッファ部222に一時的に格納される検査画像から所定の大きさの検索サンプル(局所領域)を順次切り出す。 Then, the region setting unit 244 outputs the image information of the inspection image IMG corresponding to each set partial region BLK S to the vector generation unit 246. In other words, the region setting unit 244 sequentially extracts search samples (local regions) having a predetermined size from the inspection image temporarily stored in the image buffer unit 222.
ベクトル生成部246は、領域設定部244によって順次抽出される検査画像IMGの部分領域BLKSの画像情報から検索画像ベクトルxS iを順次生成する。なお、ベクトル生成部246における検索画像ベクトルxS iの生成処理は、ベクトル生成部206および216における学習画像ベクトルxLN iの生成処理、ならびにベクトル生成部226における検査画像ベクトルxiの生成処理と同様であるので、詳細な説明は繰返さない。 The vector generation unit 246 sequentially generates the search image vector x S i from the image information of the partial region BLK S of the inspection image IMG sequentially extracted by the region setting unit 244. The search image vector x S i generation processing in the vector generation unit 246 includes the learning image vector x LN i generation processing in the vector generation units 206 and 216 and the inspection image vector x i generation processing in the vector generation unit 226. Since they are similar, detailed description will not be repeated.
距離算出部248は、ベクトル生成部246から出力される検索画像ベクトルxS iと、学習結果格納部240に予め格納される固有空間E(D)とに基づいて、固有空間E(D)と検索画像ベクトルxS iとの距離ΔxS iを算出する。なお、この固有空間E(D)と検索画像ベクトルxS iとの距離ΔxS iを算出処理は、上述の距離算出部218における、固有空間E(D)と検査画像ベクトルxiとの距離Δxiを算出処理と同様であるので、詳細な説明は繰返さない。 Distance calculating unit 248, a search image vector x S i output from the vector generator 246, based on the eigenspace E (D) which is previously stored in the learning result storage unit 240, an eigenspace E (D) A distance Δx S i with the search image vector x S i is calculated. The distance calculation processing distance [Delta] x S i of the eigenspace E and (D) and the search image vector x S i is the distance calculation unit 218 described above, the inspection image vector x i with eigenspace E (D) because the [Delta] x i is the same as the calculation processing, the detailed description thereof will not be repeated.
基準位置決定部250は、距離算出部248において順次算出される距離ΔxS iの検索方向についての変化に基づいて、検査画像IMGにおいて、学習画像LNIMGの基準位置に対応する基準位置を決定する。 The reference position determination unit 250, based on a change in the search direction of the distance [Delta] x S i that are sequentially calculated in the distance calculation unit 248, the inspection image IMG, determines the reference position corresponding to the reference position of the learning images LNIMG.
図27は、距離算出部248において順次算出される距離ΔxS iの一例を示す図である。図27(a)は、検査画像IMGをX方向に検索した場合の変化の一例を示し、図27(b)は、検査画像IMGをY方向に検索した場合の変化の一例を示す。 FIG. 27 is a diagram illustrating an example of the distance Δx S i sequentially calculated by the distance calculation unit 248. FIG. 27A shows an example of a change when the inspection image IMG is searched in the X direction, and FIG. 27B shows an example of a change when the inspection image IMG is searched in the Y direction.
図27(a)および図27(b)を参照して、基準位置決定部250は、検査画像IMGに設定される部分領域BLKSの位置に応じて変化する距離ΔxS iに対して、極小点となる位置を基準位置の候補位置として抽出する。なお、基準位置の候補位置として抽出する際には、その距離ΔxS iが所定のしきい値Th以下であることを条件にすることが好ましい。このしきい値Thは、距離ΔxS iの全体平均値などに応じて決定することができる。 Referring to FIGS. 27 (a) and 27 (b), the reference position determination unit 250, with respect to the distance [Delta] x S i which varies according to the position of the partial area BLK S set in the inspection image IMG, minimum A point position is extracted as a reference position candidate position. At the time of extracting a candidate position of the reference position, it is preferred that the distance [Delta] x S i is on condition that is below a predetermined threshold value Th. The threshold Th can be determined in accordance with the overall average value of the distance [Delta] x S i.
基準位置を検索する方法としては、検査画像IMGのX方向またはY方向の一方を固定した上で、他方の軸に沿って部分領域BLKSを順次設定する方法や、X方向およびY方向を独立に変化させて部分領域BLKSを順次設定する方法を採用することができる。 As a method of searching the reference position, independently, fix one of the X or Y direction of the test image IMG, and a method of sequentially setting a partial area BLK S along the other axis, the X and Y directions It is possible to adopt a method in which the partial regions BLK S are sequentially set by changing to.
図28は、検査画像IMGに対して、抽出された候補点の一例を示す図である。
図28を参照して、上記のような方法によれば、X方向およびY方向における候補位置を取得することができるので、これらの候補位置に基づいて、検査画像IMGに対して複数の候補点が算出できる。ここで、候補点は、X方向の候補位置とY方向の候補位置とによって、一意に決定される座標である。
FIG. 28 is a diagram illustrating an example of candidate points extracted for the inspection image IMG.
Referring to FIG. 28, according to the method as described above, candidate positions in the X direction and the Y direction can be acquired. Therefore, based on these candidate positions, a plurality of candidate points with respect to the inspection image IMG can be obtained. Can be calculated. Here, a candidate point is a coordinate uniquely determined by a candidate position in the X direction and a candidate position in the Y direction.
基準位置決定部250は、複数の候補点のうち、1つの候補点を検査画像IMGにおける基準位置として決定する。代表的に、基準位置決定部250は、学習画像LNIMGの基準位置に対応する原点からの距離Disが最も小さい候補点を基準位置として決定する。すなわち、候補点の座標を(x,y)とすると、原点からの距離Dis=(x2+y2)1/2が最小となる候補点を基準位置として決定する。 The reference position determination unit 250 determines one candidate point as a reference position in the inspection image IMG among the plurality of candidate points. Typically, the reference position determination unit 250 determines the candidate point having the smallest distance Dis from the origin corresponding to the reference position of the learning image LNIMG as the reference position. That is, if the coordinates of the candidate point are (x, y), the candidate point with the smallest distance from the origin Dis = (x 2 + y 2 ) 1/2 is determined as the reference position.
これは、一般的に、対象ワーク2に表れる周期的な濃淡模様のずれは周期単位で現れるため、学習画像LNIMGに現れる周期的な濃淡模様に対するずれが最小となる位置を選択することで、より適切な基準位置を決定できるからである。 This is because, in general, since a periodic shading pattern shift appearing in the target work 2 appears in units of cycles, by selecting a position where the shift with respect to the periodic shading pattern appearing in the learning image LNIMG is minimized, This is because an appropriate reference position can be determined.
このように基準位置決定部250で決定された基準位置は、抽出部224へ出力され、検査画像IMGに対する欠陥検出処理が実行される。 Thus, the reference position determined by the reference position determination unit 250 is output to the extraction unit 224, and defect detection processing for the inspection image IMG is performed.
図29は、抽出部224によって検査画像IMGに対して設定される評価領域(但し、簡略化のため、最小サイズの部分領域BLK(1)として表現)を説明するための図である。 FIG. 29 is a diagram for explaining an evaluation region (expressed as a partial region BLK (1) of the minimum size for simplification) set for the inspection image IMG by the extraction unit 224.
図29を参照して、抽出部224は、基準位置決定部250によって決定された基準位置に基づいて、当該基準位置を基準とする配置パターンに従って、検査画像IMGに対して評価領域を順次設定する。 Referring to FIG. 29, based on the reference position determined by reference position determination unit 250, extraction unit 224 sequentially sets evaluation regions for inspection image IMG according to an arrangement pattern with reference to the reference position. .
図24(a)と図29とを比較すると、検査画像IMGの全体枠に対して、評価領域を設定するための配置パターンがはみ出して配置されていることがわかる。しかしながら、検査画像IMGに現れる濃淡模様に対するこの配置パターンの相対的な位置関係は、学習画像LNIMGに現れる濃淡模様に対する、評価領域を設定するための配置パターンの相対的な位置関係とほぼ一致していることがわかる。すなわち、たとえば、学習画像LNIMGの基準位置に隣接する評価領域に囲まれた濃淡模様は、検査画像IMGの基準位置に隣接する評価領域に囲まれた濃淡模様と同様であることがわかる。このように、学習画像LNIMGと検査画像IMGとの間において、対応する一対の評価領域に対応するそれぞれの部分領域に現れる濃淡模様を互いに一致させることで、精度の高い誤差検出を行なうことができる。 Comparing FIG. 24A and FIG. 29, it can be seen that the arrangement pattern for setting the evaluation region is arranged so as to protrude from the entire frame of the inspection image IMG. However, the relative positional relationship of this arrangement pattern with respect to the shading pattern appearing in the inspection image IMG substantially coincides with the relative positional relationship of the arrangement pattern for setting the evaluation region with respect to the shading pattern appearing in the learning image LNIMG. I understand that. That is, for example, it is understood that the shading pattern surrounded by the evaluation region adjacent to the reference position of the learning image LNIMG is the same as the shading pattern surrounded by the evaluation region adjacent to the reference position of the inspection image IMG. In this way, by accurately matching the shade patterns appearing in the partial areas corresponding to the corresponding pair of evaluation areas between the learning image LNIMG and the inspection image IMG, it is possible to perform highly accurate error detection. .
(バリエーション1)
上述の説明では、予め定められた検索領域SRCに対して、部分領域BLKSを所定の間隔(好ましくは、1画素単位)で順次設定する構成について説明したが、部分領域BLKSを設定する間隔を複数段階に分けてもよい。すなわち、相対的に大きな間隔で基準位置を大まかに検索した後、相対的に小さな間隔で基準位置をより細かく検索してもよい。
(Variation 1)
In the above description, (preferably, 1 pixel) for a predetermined search area SRC, a predetermined interval partial area BLK S configuration has been described to sequentially set at, sets a partial region BLK S Interval May be divided into a plurality of stages. That is, after the reference position is roughly searched at a relatively large interval, the reference position may be searched more finely at a relatively small interval.
具体的には、検査画像IMGに対して、部分領域BLKSを相対的に大きな間隔(たとえば、8画素単位)で順次設定して、上記と同様の方法によって候補点を検索する。そして、この候補点の周辺に検索領域を限定した上で、当該検索画像に対して相対的に小さな間隔(たとえば、1画素単位)で部分領域BLKSを順次設定して、上記と同様の方法によって候補点をさらに緻密に検索する。 Specifically, the inspection image IMG, a relatively large interval partial area BLK S (e.g., 8 pixels) are sequentially set in, looking for candidate points by the same method as described above. Then, after a limited search area around the candidate point, a relatively small distance with respect to the search image (e.g., 1 pixel) are sequentially set the partial area BLK S in, the same manner as described above To search for candidate points more precisely.
このような方法によれば、部分領域BLKSの設定および固有空間に対する距離の算出を効率化できるので、基準位置の検索処理を高速化できる。 According to this method, it is possible to streamline the distance calculation with respect to setting and eigenspace subregion BLK S, the search process of the reference position can be speeded.
なお、上記のような方法を採用する場合には、検索領域SRCを予め設定しなくともよい。 Note that when the method as described above is employed, the search area SRC may not be set in advance.
(バリエーション2)
上述の説明では、検査画像IMG内の周期的な濃淡模様に対して、部分領域BLKSを順次設定する構成について説明したが、部分領域BLKSを検査画像IMGからはみ出るように設定してもよい。
(Variation 2)
In the above description, the configuration in which the partial areas BLK S are sequentially set for the periodic shading pattern in the inspection image IMG has been described. However, the partial areas BLK S may be set so as to protrude from the inspection image IMG. .
図30は、設定された部分領域BLKSの一部が検査画像IMGからはみ出る場合の処理を説明するための図である。 FIG. 30 is a diagram for explaining processing when a part of the set partial region BLK S protrudes from the inspection image IMG.
図30を参照して、検査画像IMGからはみ出る部分について、隣接する部分の画像情報に基づいて補間処理を行なってもよい。このような補間処理については、文献(天野敏之・佐藤幸男、「kBPLP法を用いた高次元非線形投影による画像補間」、電子情報通信学会論文誌 D−II Vol.J86−D−II No.4 pp.525−534、2003年4月)などを参照されたい。 Referring to FIG. 30, interpolation processing may be performed on a portion that protrudes from inspection image IMG based on image information of an adjacent portion. Such interpolation processing is described in the literature (Toshiyuki Amano, Yukio Sato, “Image interpolation by high-dimensional nonlinear projection using kBPLP method”, IEICE Transactions D-II Vol. J86-D-II No. 4). pp. 525-534, April 2003).
このような補間処理を行なうことで、その一部が検査画像IMGからはみ出る部分領域BLKSが存在する場合であっても、基準位置を検索することができる。 By performing such an interpolation process, the reference position can be searched even when there is a partial region BLK S that partially protrudes from the inspection image IMG.
(比較例)
従来から、検査画像から欠陥を検出する方法として、画像を構成する画素の輝度値で表される空間周波数に基づいて処理を行なう方法が知られている。しかしながら、このような方法では、本発明の対象とする周期的な濃淡模様をもつ検査画像から欠陥を検出することは難しい。
(Comparative example)
Conventionally, as a method of detecting a defect from an inspection image, a method of performing processing based on a spatial frequency represented by a luminance value of a pixel constituting the image is known. However, with such a method, it is difficult to detect a defect from an inspection image having a periodic shading pattern that is a subject of the present invention.
図31は、対象とする周期的な濃淡模様をもつ検査画像の一例を示す図である。
図32は、図31に示す検査画像に対して、従来の方法および本実施の形態に従う方法を適用した場合の結果を示す図である。
FIG. 31 is a diagram illustrating an example of an inspection image having a periodic shading pattern as a target.
FIG. 32 is a diagram showing a result when the conventional method and the method according to the present embodiment are applied to the inspection image shown in FIG. 31.
図31を参照して、従来の方法および本実施の形態に従う方法を、紙面横方向および紙面縦方向に沿って周期的な濃淡模様をもつ検査画像に適用する場合を考える。 Referring to FIG. 31, consider a case where the conventional method and the method according to the present embodiment are applied to an inspection image having a periodic gray pattern along the horizontal direction of the paper surface and the vertical direction of the paper surface.
図32(a)は、図31のサンプル領域におけるR成分値、G成分値、B成分値を、その位置に対応付けてプロットしたグラフを示す。このように、各画素の成分からなる空間周波数で評価した場合には、検査画像が周期的な濃淡模様をもっていても、各成分値における差分値や正・負の値には、ばらつきが生じる。そのため、基準にすべき色成分を決定したり、そのしきい値を決定したりすることは非常に困難である。 FIG. 32A shows a graph in which the R component value, the G component value, and the B component value in the sample region of FIG. 31 are plotted in association with the positions. As described above, when the evaluation is performed with the spatial frequency composed of the components of each pixel, even if the inspection image has a periodic shading pattern, the difference value or the positive / negative value in each component value varies. Therefore, it is very difficult to determine a color component to be used as a reference and to determine the threshold value.
これに対して、図32(b)に示すように、学習画像LNIMGに基づいて固有空間を予め算出した上、各部分領域における当該固有空間からの距離を用いて評価することによって、変数を1次元化できるとともに、ノイズを除去した上で、欠陥検出を行なうことができる。そのため、本発明に係る方法は、検査画像に表れる周期的な濃淡模様の色成分などに影響されることなく、汎用的に適用することができる。 On the other hand, as shown in FIG. 32 (b), the eigenspace is calculated in advance based on the learning image LNIMG, and then evaluated using the distance from the eigenspace in each partial region. It is possible to perform dimension detection and to perform defect detection after removing noise. For this reason, the method according to the present invention can be applied universally without being affected by the color components of the periodic shading pattern appearing in the inspection image.
(処理手順)
図33は、この発明の実施の形態2に従う欠陥検出システム1において対象ワーク2に発生し得る欠陥を検出するための処理手順を示すフローチャートである。
(Processing procedure)
FIG. 33 is a flowchart showing a processing procedure for detecting a defect that may occur in the target work 2 in the defect detection system 1 according to the second embodiment of the present invention.
図33に示すフローチャートは、図7に示すフローチャートにおいて、ステップS7およびS13を追加したものに相当する。同一の処理には、図7と同一のステップ番号を付しており、各ステップの処理については上述したので、詳細な説明は繰返さない。 The flowchart shown in FIG. 33 corresponds to the flowchart shown in FIG. 7 with steps S7 and S13 added. The same steps are given the same step numbers as in FIG. 7, and the processing of each step has been described above, and thus detailed description will not be repeated.
図20および図33を参照して、学習処理(ステップS6)の実行後、欠陥検出装置はユーザから検索領域SRCを受付ける(ステップS7)。ユーザは、撮影された学習画像を確認しながら、キーボード103やマウス104を操作して、検索領域SRCを設定する。 Referring to FIGS. 20 and 33, after the execution of the learning process (step S6), the defect detection device accepts search area SRC from the user (step S7). The user operates the keyboard 103 and the mouse 104 while checking the captured learning image to set the search area SRC.
撮像部8によって対象ワーク2を撮影することで検査画像を取得(ステップS12)した後、欠陥検出装置は、まず基準位置検索処理を実行する(ステップS13)。その上で、欠陥検出装置は、欠陥検出処理を実行する(ステップS14)。そして、欠陥検出装置は、その欠陥検出結果を出力する(ステップS16)。 After acquiring the inspection image by photographing the target workpiece 2 by the imaging unit 8 (step S12), the defect detection device first executes a reference position search process (step S13). In addition, the defect detection device executes a defect detection process (step S14). Then, the defect detection device outputs the defect detection result (step S16).
図34は、この発明の実施の形態2に従う基準位置検索処理の処理手順を示すフローチャートである。なお、図34に示すフローチャートは、CPU105が固定ディスク107などに予め格納されたプログラムをメモリ106に読出して実行することにより、図20に示すような機能を実現することで実行される。 FIG. 34 is a flowchart showing a procedure of the reference position search process according to the second embodiment of the present invention. The flowchart shown in FIG. 34 is executed by realizing the functions shown in FIG. 20 by the CPU 105 reading a program stored in advance in the fixed disk 107 or the like into the memory 106 and executing it.
図20および図34を参照して、領域設定部244として機能するCPU105は、学習値格納部212から検索領域SRCを読出す(ステップS300)。そして、領域設定部244として機能するCPU105は、検査画像IMGに対して、所定の検索方向に従って、検索領域SRC内に部分領域BLKSを順次設定する(ステップS302)。そして、ベクトル生成部246として機能するCPU105は、各部分領域BLKSの画像情報から検索画像ベクトルxS iを生成する(ステップS304)。距離算出部248として機能するCPU105は、学習値格納部212から、固有空間E(D)を読出す(ステップS306)。そして、CPU105は、検索画像ベクトルxS iと、読出した固有空間E(D)とに基づいて、固有空間E(D)から検索画像ベクトルxS iまでの距離ΔxS iを算出する(ステップS308)。さらに、CPU105は、検索領域SRC内に抽出すべき部分領域BLKSが残っているか否かを判断する(ステップS310)。検索領域SRC内に抽出すべき部分領域BLKSが残っている場合(ステップS310においてYESの場合)には、CPU105は、ステップS302以下の処理を繰返す。 Referring to FIGS. 20 and 34, CPU 105 functioning as region setting unit 244 reads search region SRC from learned value storage unit 212 (step S300). Then, the CPU 105 functioning as the area setting unit 244 sequentially sets the partial areas BLK S in the search area SRC according to a predetermined search direction for the inspection image IMG (step S302). Then, the CPU 105 functioning as the vector generation unit 246 generates a search image vector x S i from the image information of each partial area BLK S (step S304). The CPU 105 functioning as the distance calculation unit 248 reads the eigenspace E (D) from the learning value storage unit 212 (step S306). Then, the CPU 105 calculates a distance Δx S i from the eigenspace E (D) to the search image vector x S i based on the retrieved image vector x S i and the read eigenspace E (D) (step) S308). Further, the CPU 105 determines whether or not the partial area BLK S to be extracted remains in the search area SRC (step S310). When partial area BLK S to be extracted remains in search area SRC (YES in step S310), CPU 105 repeats the processes in and after step S302.
検索領域SRC内に抽出すべき部分領域BLKSが残っていない場合(ステップS310においてNOの場合)には、基準位置決定部250として機能するCPU105は、距離ΔxS iの検索方向のそれぞれについて極小点となる位置を、候補位置として抽出する(ステップS312)とともに、抽出した極小点のうち、所定のしきい値Thを超えるものを除外する(ステップS314)。さらに、CPU105は、それぞれの検索方向における候補位置に基づいて、検査画像IMGにおける候補点を算出し(ステップS316)、これらの候補点のうち、学習画像LNIMGの基準位置に対応する原点からの距離が最も小さい候補点を基準位置として決定する(ステップS318)。 When there is no partial region BLK S to be extracted in the search region SRC (NO in step S310), the CPU 105 functioning as the reference position determination unit 250 minimizes each of the search directions of the distance Δx S i . A position that becomes a point is extracted as a candidate position (step S312), and among the extracted minimum points, those that exceed a predetermined threshold Th are excluded (step S314). Further, the CPU 105 calculates candidate points in the inspection image IMG based on the candidate positions in the respective search directions (step S316), and among these candidate points, the distance from the origin corresponding to the reference position of the learning image LNIMG. The candidate point with the smallest is determined as the reference position (step S318).
(本実施の形態による作用効果)
この発明の実施の形態2によれば、検査画像に評価領域を設定するに際して、所定の検索方向に沿って、固有空間に対する距離が極小値をとるような位置を検索する。そして、この検索した位置に基づいて、評価領域を設定するための配置パターンを位置決めする。これにより、学習画像および検査画像において周期的な濃淡模様を含む場合であっても、学習画像および検査画像において、周期的な濃淡模様に対する配置パターンの相対的な開始位置を互いに一致させることができる。よって、周期的な濃淡模様を含む検査画像
に対しても、欠陥検出の精度を高めることができる。
(Operational effects of the present embodiment)
According to the second embodiment of the present invention, when an evaluation area is set in an inspection image, a position where the distance to the eigenspace has a minimum value is searched along a predetermined search direction. Based on the searched position, an arrangement pattern for setting the evaluation area is positioned. As a result, even when the learning image and the inspection image include a periodic shading pattern, the relative start positions of the arrangement pattern with respect to the periodic shading pattern can be matched with each other in the learning image and the inspection image. . Therefore, it is possible to improve the accuracy of defect detection even for an inspection image including a periodic shading pattern.
[実施の形態2の変形例]
上述の実施の形態2においては、学習画像LNIMGおよび検査画像IMGが周期的な濃淡模様をもつ場合に、評価領域の配置パターンを適切化する構成について例示した。ところで、実際の生産ラインなどにおいては、生産効率を高めるために、1つの基材から複数の製品を製造するようなプロセス、たとえば、液晶パネルや半導体基板などの製造プロセスが知られている。このようなプロセスでは、各製品は同一のサイズを有しているので、1つの基材上には、切り離し前の製品が周期的に配列されている。このような場合には、1つの製品の大きさに対応する部分領域セットを定めて、画像ベクトルおよび応答ベクトルを算出することが望ましい。そこで、本変形例においては、このようなアプリケーションに適用が容易に構成について、以下説明する。
[Modification of Embodiment 2]
In the above-described second embodiment, the configuration for optimizing the arrangement pattern of the evaluation region is illustrated when the learning image LNIMG and the inspection image IMG have a periodic shading pattern. By the way, in an actual production line or the like, a process for manufacturing a plurality of products from one base material, for example, a manufacturing process for a liquid crystal panel, a semiconductor substrate, or the like is known in order to increase production efficiency. In such a process, since each product has the same size, the products before separation are periodically arranged on one substrate. In such a case, it is desirable to determine a partial region set corresponding to the size of one product and calculate an image vector and a response vector. Therefore, in this modification, a configuration that can be easily applied to such an application will be described below.
図35は、この発明の実施の形態2の変形例に従う対象ワークを撮像して得られた画像SMPの一例を示す図である。図35には、典型例として、1つの基材上に複数の回路基板が形成されている状態を示す。 FIG. 35 is a diagram showing an example of an image SMP obtained by imaging a target workpiece according to the modification of the second embodiment of the present invention. FIG. 35 shows a state where a plurality of circuit boards are formed on one base material as a typical example.
本変形例に従う欠陥検出装置は、図35(a)に示すような対象ワークに対して、画像ベクトルを生成するための部分領域のサイズおよび位置を自動的に決定することが可能である。より具体的には、対象ワークに含まれる1つの回路基板の少なくとも一部を表わすパターン(テンプレートパターン)MDLを予め登録しておき、画像SMP上でこの登録されたパターンMDLと一致する複数の位置を特定する。このパターンMDLに基づいて特定された位置の数は、検査対象物に含まれる製品の数と一致し、その位置周期は、検査対象物に含まれる製品の配置周期と一致する。したがって、図35(b)に示すように、登録されたパターンと一致する位置同士の間隔を計測することで、各製品に対して設定すべき部分領域BLKのサイズ(X方向長さLxおよびY方向長さLy)を決定することができる。以下、図36に示すフローチャートを用いて、より詳細な処理手順について説明する。 The defect detection apparatus according to the present modification can automatically determine the size and position of the partial area for generating the image vector for the target workpiece as shown in FIG. More specifically, a pattern (template pattern) MDL representing at least a part of one circuit board included in the target work is registered in advance, and a plurality of positions matching the registered pattern MDL on the image SMP is registered. Is identified. The number of positions specified based on the pattern MDL matches the number of products included in the inspection object, and the position period thereof matches the arrangement period of products included in the inspection object. Therefore, as shown in FIG. 35 (b), by measuring the interval between positions that match the registered pattern, the size of the partial area BLK (X-direction lengths Lx and Y) to be set for each product is measured. The direction length Ly) can be determined. Hereinafter, a more detailed processing procedure will be described with reference to the flowchart shown in FIG.
図36は、この発明の実施の形態2の変形例に従う欠陥検出システムにおいて周期性を有する対象ワークについての画像ベクトルを生成するための処理手順を示すフローチャートである。なお、図36に示すフローチャートは、CPU105が固定ディスク107などに予め格納されたプログラムをメモリ106に読出して実行することにより実現される。 FIG. 36 is a flowchart showing a processing procedure for generating an image vector for a target workpiece having periodicity in the defect detection system according to the modification of the second embodiment of the present invention. The flowchart shown in FIG. 36 is realized by the CPU 105 reading a program stored in advance in the fixed disk 107 or the like into the memory 106 and executing it.
図36を参照して、CPU105は、ユーザが指定するテンプレートパターンを受付ける(ステップS400)。すなわち、ユーザは、対象ワークに周期的に現れる1つの製品などの一部の画像をモデル画像を示すパターンMDLとして登録する。このパターンMDLは、基準にすべきワークを撮影して得られた画像データから切り出してもよいし、あるいは、カタログなどの画像データを外部入力してもよい。さらに、CPU105は、ユーザが指定する対象ワークに周期的に現れる周期サイズ(X方向およびY方向の値)を受付ける(ステップS402)。すなわち、ユーザは、対象ワークに周期的に現れる1つの製品などのおおよそのサイズを入力する。このサイズは、後述するサーチ処理に要する時間を短縮するためのものである。 Referring to FIG. 36, CPU 105 accepts a template pattern designated by the user (step S400). That is, the user registers a part of an image such as one product that periodically appears in the target work as a pattern MDL indicating a model image. This pattern MDL may be cut out from image data obtained by photographing a workpiece to be used as a reference, or image data such as a catalog may be externally input. Furthermore, the CPU 105 accepts a periodic size (values in the X direction and the Y direction) that appears periodically in the target work specified by the user (step S402). That is, the user inputs an approximate size such as one product that periodically appears in the target workpiece. This size is for shortening the time required for the search processing described later.
これらの入力が終了すると、CPU105は、対象ワークを撮像して得られた画像データに対して、先に登録されたパターンMDLと一致する位置を探すための粗検索処理を実行する(ステップS404)。この粗検索処理においては、パターンMDLと対象の領域との間の特徴量、典型的には、相関値が相対的に高い位置を検索する(正規化相関マッチング処理)。この結果、相関値が相対的に高い位置にパターンMDLが位置決めされる。 When these inputs are completed, the CPU 105 executes a rough search process for searching for a position that matches the previously registered pattern MDL on the image data obtained by imaging the target workpiece (step S404). . In this rough search process, a feature amount between the pattern MDL and the target region, typically, a position having a relatively high correlation value is searched (normalized correlation matching process). As a result, the pattern MDL is positioned at a position where the correlation value is relatively high.
続いて、CPU105は、各位置決めされた部分を基準として、検索領域SRCをそれぞれ設定する(ステップS406)。なお、この検索領域SRCは、ステップS402において入力された周期サイズに応じた範囲で設定される。続いて、CPU105は、各検索領域SRCにおいて、パターンMDLと一致する位置をより詳細に探すための微検索処理を実行する(ステップS408)。 Subsequently, the CPU 105 sets a search area SRC based on each positioned part (step S406). The search area SRC is set in a range corresponding to the period size input in step S402. Subsequently, the CPU 105 executes a fine search process for searching for a position that matches the pattern MDL in more detail in each search area SRC (step S408).
パターンMDLと一致する位置がそれぞれ特定されると、CPU105は、それぞれ特定されたパターンMDLと一致する位置の間の間隔(図35(a)に示すX方向長さLxおよびY方向長さLy)を計測する(ステップS410)。続いて、CPU105は、計測したX方向長さLxおよびY方向長さLyをもつ部分領域BLKを、ステップS408において特定されたパターンMDLと一致する位置に対応付けて、設定する(ステップS412)。さらに、CPU105は、対象ワーク上に設定した部分領域BLKの各々について、画像情報を抽出するとともに、抽出した画像情報に基づいて画像ベクトルを生成する(ステップS414)。この生成された画像ベクトルに基づいて、応答ベクトルなどが算出される。 When the position that matches the pattern MDL is specified, the CPU 105 determines the interval between the positions that match the specified pattern MDL (the X-direction length Lx and the Y-direction length Ly shown in FIG. 35A). Is measured (step S410). Subsequently, the CPU 105 sets the partial area BLK having the measured X-direction length Lx and Y-direction length Ly in association with the position that matches the pattern MDL specified in step S408 (step S412). Further, the CPU 105 extracts image information for each of the partial areas BLK set on the target work, and generates an image vector based on the extracted image information (step S414). A response vector and the like are calculated based on the generated image vector.
上述のような処理手順は、学習画像LNIMGおよび検査画像IMGのそれぞれについての画像ベクトルおよび応答ベクトルの生成の手順の一部として組入れられる。 The processing procedure as described above is incorporated as part of the procedure for generating the image vector and the response vector for each of the learning image LNIMG and the inspection image IMG.
(本実施の形態の変形例による作用効果)
この発明の実施の形態2の変形例によれば、周期性をもつ構造物に対して、画像ベクトルおよび応答ベクトルをより迅速かつ確実に生成することができる。そのため、1つの基材から複数の製品を製造するようなプロセスにおいても、確実に欠陥検出を行なうことができる。
(Operational effects of the modification of the present embodiment)
According to the modification of the second embodiment of the present invention, an image vector and a response vector can be generated more quickly and reliably for a structure having periodicity. Therefore, defect detection can be reliably performed even in a process of manufacturing a plurality of products from a single substrate.
[実施の形態3]
上述の図1では、対象ワーク2として電子部品やプラスチック部品などの相対的に小型のものを検査対象とする構成について例示したが、本発明に係る欠陥検出装置は、相対的に大型のものを検査対象とすることもできる。
[Embodiment 3]
In FIG. 1 described above, a configuration in which a relatively small object such as an electronic component or a plastic part is an inspection target is illustrated as the target workpiece 2, but the defect detection apparatus according to the present invention is a relatively large one. It can also be an inspection target.
図37は、この発明の実施の形態3に従う欠陥検出装置を含む欠陥検出システム1#を示す概略図である。 FIG. 37 is a schematic diagram showing a defect detection system 1 # including a defect detection device according to the third embodiment of the present invention.
図37を参照して、欠陥検出システム1#は、一例として液晶パネルなどの相対的に大型の板状の対象ワーク2に対して欠陥を検査対象とする場合の構成を示す。欠陥検出システム1#は、搬送架台20と、搬送架台20上を搬送方向にスライド可能な搬送台22と、撮像部14と、撮像部14を対象ワーク2の搬送方向と直交する方向に移動可能な撮像部駆動機構24とを備える。対象ワーク2は、搬送台22の上に配置されて搬送方向に沿って移動する。撮像部14は、搬送台22によって移動する対象ワーク2を搬送方向に所定間隔毎に撮影するとともに、撮像部駆動機構24によって移動されることにより、対象ワーク2を搬送方向と直交する方向にも所定間隔毎(但し、搬送方向の所定間隔とは異なる)に撮影する。 Referring to FIG. 37, defect detection system 1 # shows, as an example, a configuration in which a defect is an inspection target for a relatively large plate-shaped target workpiece 2 such as a liquid crystal panel. The defect detection system 1 # is movable in a direction orthogonal to the conveyance direction of the target workpiece 2, the conveyance frame 20, the conveyance table 22 that can slide on the conveyance frame 20 in the conveyance direction, the imaging unit 14, and the imaging unit 14. And an image pickup unit driving mechanism 24. The target workpiece 2 is arranged on the transport table 22 and moves along the transport direction. The imaging unit 14 shoots the target workpiece 2 moving on the conveyance platform 22 in the conveyance direction at predetermined intervals, and is moved by the imaging unit driving mechanism 24 so that the target workpiece 2 is also orthogonal to the conveyance direction. Shoot at every predetermined interval (however, different from the predetermined interval in the transport direction).
この撮像部14で撮影された画像は、インターフェイス16を介して、欠陥検出装置を実現する制御装置100#へ伝送される。なお、撮像部14には、照明部が一体的に組込まれていてもよく、この場合には、インターフェイス16からこの照明部を駆動するための電源などが供給される。 An image photographed by the imaging unit 14 is transmitted to the control device 100 # that realizes the defect detection device via the interface 16. The imaging unit 14 may be integrated with an illumination unit. In this case, a power source for driving the illumination unit is supplied from the interface 16.
制御装置100#は、本体101#と、モニタ102#と、キーボード103#などをさらに含む。本体101#、モニタ102#、およびキーボード103#は、それぞれ図1に示すコンピュータ100の本体101、モニタ102、およびキーボード103と同様の機能を実現する。 Control device 100 # further includes a main body 101 #, a monitor 102 #, a keyboard 103 #, and the like. Main body 101 #, monitor 102 #, and keyboard 103 # implement the same functions as main body 101, monitor 102, and keyboard 103 of computer 100 shown in FIG.
特に、本実施の形態に従う欠陥検出システム1#では、撮像部14の撮影範囲内に対象ワーク2のすべてを収めることができないので、対象ワーク2の搬送方向の位置および撮像部14の搬送方向と直交する方向の位置と対応付けた処理によって、欠陥位置を特定する必要がある。 In particular, in defect detection system 1 # according to the present embodiment, since all of target workpiece 2 cannot be accommodated within the imaging range of imaging unit 14, the position of target workpiece 2 in the conveyance direction and the conveyance direction of imaging unit 14 It is necessary to specify the defect position by processing associated with the position in the orthogonal direction.
また、対象ワーク2と同様の大きさの基準ワークを用いる必要はなく、撮像部14の撮影範囲にその全体が収まるような大きさの基準ワークを用いれば十分である。 In addition, it is not necessary to use a reference workpiece having the same size as the target workpiece 2, and it is sufficient to use a reference workpiece having a size that can be entirely accommodated in the imaging range of the imaging unit 14.
その他の構成および処理については、上述の本実施の形態に従う欠陥検出装置と同様であるので、詳細な説明は繰返さない。 Since other configurations and processes are the same as those of the defect detection apparatus according to the above-described embodiment, detailed description thereof will not be repeated.
[その他の形態]
本発明に係るプログラムは、コンピュータのオペレーティングシステム(OS)の一部として提供されるプログラムモジュールのうち、必要なモジュールを所定の配列で所定のタイミングで呼出して処理を実行させるものであってもよい。その場合、プログラム自体には上記モジュールが含まれずOSと協働して処理が実行される。このようなモジュールを含まないプログラムも、本発明にかかるプログラムに含まれ得る。
[Other forms]
The program according to the present invention may be a program module that is provided as a part of a computer operating system (OS) and that calls necessary modules in a predetermined arrangement at a predetermined timing to execute processing. . In that case, the program itself does not include the module, and the process is executed in cooperation with the OS. A program that does not include such a module can also be included in the program according to the present invention.
また、本発明にかかるプログラムは他のプログラムの一部に組込まれて提供されるものであってもよい。その場合にも、プログラム自体には上記他のプログラムに含まれるモジュールが含まれず、他のプログラムと協働して処理が実行される。このような他のプログラムに組込まれたプログラムも、本発明にかかるプログラムに含まれ得る。 The program according to the present invention may be provided by being incorporated in a part of another program. Even in this case, the program itself does not include the module included in the other program, and the process is executed in cooperation with the other program. Such a program incorporated in another program can also be included in the program according to the present invention.
提供されるプログラム製品は、ハードディスクなどのプログラム格納部にインストールされて実行される。なお、プログラム製品は、プログラム自体と、プログラムが記憶された記録媒体とを含む。 The provided program product is installed in a program storage unit such as a hard disk and executed. Note that the program product includes the program itself and a recording medium in which the program is stored.
さらに、本発明に係るプログラムによって実現される機能の一部または全部を専用のハードウェアによって構成してもよい。 Furthermore, part or all of the functions realized by the program according to the present invention may be configured by dedicated hardware.
今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は、上記した説明ではなく、特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。 The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.
1,1# 欠陥検出システム、2 対象ワーク、4 基準ワーク、6 搬送機構、8 撮像部、10 照明部、12 光源部、14 撮像部、16,109 インターフェイス、20 搬送架台、22 搬送台、24 撮像部駆動機構、100 コンピュータ、100# 制御装置、101 コンピュータ本体、101# 本体、102,102# モニタ、103,103# キーボード、104,104# マウス、106 メモリ、107 固定ディスク、111 FD駆動装置、113 CD−ROM駆動装置、202,222 画像バッファ部、204,214,224 抽出部、206,216,226 ベクトル生成部、208 固有ベクトル算出部、210 固有空間決定部、218,228 距離算出部、220 分類部、230 判断部、232 欠陥検出部、240 学習結果格納部、244 領域設定部、246 ベクトル生成部、248 距離算出部、250 基準位置決定部、256 検索領域受付部。 1, 1 # Defect detection system, 2 target workpiece, 4 reference workpiece, 6 transport mechanism, 8 imaging unit, 10 illumination unit, 12 light source unit, 14 imaging unit, 16, 109 interface, 20 transport platform, 22 transport platform, 24 Imaging unit drive mechanism, 100 computer, 100 # control device, 101 computer main body, 101 # main body, 102, 102 # monitor, 103, 103 # keyboard, 104, 104 # mouse, 106 memory, 107 fixed disk, 111 FD drive device 113 CD-ROM drive, 202, 222 image buffer unit, 204, 214, 224 extraction unit, 206, 216, 226 vector generation unit, 208 eigenvector calculation unit, 210 eigenspace determination unit, 218, 228 distance calculation unit, 220 classification unit, 230 determination unit, 2 2 defect detecting unit, 240 learning result storage unit, 244 area setting unit, 246 vector generation unit, 248 distance calculating section, 250 reference position determination unit, 256 search area accepting unit.
Claims (10)
前記検査画像に設定された第1の評価領域を包含し、かつ互いに大きさの異なる複数の部分領域それぞれの画像情報を抽出する手段と、
前記検査画像から抽出される前記画像情報の各々から、前記部分領域の大きさ毎に検査画像ベクトルを生成する手段と、
前記部分領域の大きさ毎の検査画像ベクトルの各々について、対応の固有空間との間の距離を算出する手段と、
予め定められた判別関数を参照して、前記部分領域の大きさ毎の前記距離を要素とする第1の応答ベクトルに基づいて、前記第1の評価領域における欠陥の有無を判断する手段とを備える、欠陥検出装置。 A defect detection device that detects a defect in an inspection image based on a learning result acquired from a learning image that does not include a defect,
Means for extracting image information of each of a plurality of partial areas including the first evaluation area set in the inspection image and having different sizes from each other;
Means for generating an inspection image vector for each size of the partial area from each of the image information extracted from the inspection image;
Means for calculating a distance between the corresponding eigenspace for each of the inspection image vectors for each size of the partial region;
Means for referring to a predetermined discriminant function and determining the presence or absence of a defect in the first evaluation region based on a first response vector having the distance for each size of the partial region as an element; A defect detection device.
前記学習画像から抽出される前記画像情報の各々から、前記部分領域の大きさ毎に評価領域画像ベクトルを順次生成する手段と、
前記部分領域の大きさ毎の評価領域画像ベクトルの各々について、対応の固有空間との間の距離を順次算出する手段と、
各々が前記部分領域の大きさ毎の前記距離を要素とする第2の応答ベクトルの集合に基づいて、前記集合内と前記集合外との境界を規定する前記判別関数を決定する手段とをさらに備える、請求項1に記載の欠陥検出装置。 Means for extracting image information of a plurality of partial areas each including a second evaluation area sequentially set in the learning image and having the same size as each of the plurality of partial areas extracted from the inspection image;
Means for sequentially generating an evaluation area image vector for each size of the partial area from each of the image information extracted from the learning image;
Means for sequentially calculating a distance from a corresponding eigenspace for each of the evaluation area image vectors for each size of the partial area;
Means for determining the discriminant function defining a boundary between the inside of the set and the outside of the set based on a set of second response vectors each having the distance for each size of the partial region as an element; The defect detection apparatus of Claim 1 provided.
順次抽出される前記第3の部分領域の画像情報から学習画像ベクトルを生成する手段と、
前記学習画像ベクトルを含むベクトルの組から固有ベクトルを算出する手段と、
算出される前記固有ベクトルのうち、その固有値が大きいものから順に所定数の固有ベクトルを用いて、前記第3の部分領域の大きさにおける前記固有空間を決定する手段をさらに備える、請求項1〜3のいずれか1項に記載の欠陥検出装置。 Means for sequentially extracting image information of a third partial area having the same size as one of the plurality of partial areas from the learning image;
Means for generating a learning image vector from the image information of the third partial region extracted sequentially;
Means for calculating an eigenvector from a set of vectors including the learning image vector;
4. The apparatus according to claim 1, further comprising means for determining the eigenspace in the size of the third partial region using a predetermined number of eigenvectors in descending order of eigenvalues among the calculated eigenvectors. The defect detection apparatus of any one of Claims.
前記学習画像に順次設定される第1の評価領域を含み、かつ互いに大きさの異なる複数の部分領域それぞれの画像情報を抽出する手段と、
前記学習画像から抽出される前記画像情報の各々から、前記部分領域の大きさ毎に評価領域画像ベクトルを順次生成する手段と、
前記部分領域の大きさ毎の評価領域画像ベクトルの各々について、対応の固有空間との間の距離を順次算出する手段と、
各々が前記部分領域の大きさ毎の前記距離を要素とする応答ベクトルの集合に基づいて、前記集合内と前記集合外との境界を規定する判別関数を決定する手段と、
前記検査画像に順次設定される第2の評価領域を含み、かつ前記学習画像から抽出される前記複数の部分領域とそれぞれ同じ大きさを有する複数の部分領域の画像情報をそれぞれ抽出し、この抽出される前記画像情報から生成される検査画像ベクトルと、前記判別関数とに基づいて、前記第2の評価領域における欠陥の有無を判断する手段とを備える、欠陥検出装置。 A defect detection device that detects a defect in an inspection image based on a learning result acquired from a learning image that does not include a defect,
Means for extracting image information of each of a plurality of partial areas including first evaluation areas sequentially set in the learning image and having different sizes;
Means for sequentially generating an evaluation area image vector for each size of the partial area from each of the image information extracted from the learning image;
Means for sequentially calculating a distance from a corresponding eigenspace for each of the evaluation area image vectors for each size of the partial area;
It means for each based on a set of response vector to the distance elements for each size of the partial region, to determine the determine specific functions that define the boundary between the set outer and the inner set,
Extract image information of a plurality of partial areas each including a second evaluation area sequentially set in the inspection image and having the same size as the plurality of partial areas extracted from the learning image. A defect detection apparatus comprising: means for determining the presence or absence of a defect in the second evaluation region based on the inspection image vector generated from the image information to be performed and the discriminant function.
前記演算装置が、前記記憶装置に格納された前記検査画像に設定される第1の評価領域を包含し、かつ互いに大きさの異なる複数の部分領域それぞれの画像情報を抽出するステップと、
前記演算装置が、前記検査画像から抽出する前記画像情報の各々から、前記部分領域の大きさ毎に検査画像ベクトルを生成するステップと、
前記演算装置が、前記部分領域の大きさ毎の検査画像ベクトルの各々について、対応の固有空間との間の距離を算出するステップと、
前記演算装置が、予め前記記憶装置に格納された判別関数を参照して、前記部分領域の大きさ毎の前記距離を要素とする第1の応答ベクトルに基づいて、前記第1の評価領域における欠陥の有無を判断するステップとを含む、欠陥検出方法。 A defect detection method for detecting defects in an inspection image based on a learning result acquired from a learning image using a computer including an arithmetic device and a storage device,
The arithmetic device including a first evaluation region set in the inspection image stored in the storage device and extracting image information of each of a plurality of partial regions having different sizes;
The arithmetic unit generates an inspection image vector for each size of the partial region from each of the image information extracted from the inspection image;
The arithmetic unit calculating a distance between the corresponding eigenspace for each inspection image vector for each size of the partial region;
The arithmetic device refers to a discriminant function stored in advance in the storage device, and based on a first response vector whose element is the distance for each size of the partial region, in the first evaluation region Determining a presence or absence of a defect.
前記演算装置が、前記記憶装置に格納された前記学習画像に順次設定される第1の評価領域を含み、かつ互いに大きさの異なる複数の部分領域それぞれの画像情報を抽出するステップと、
前記演算装置が、前記学習画像から抽出する前記画像情報の各々から、前記部分領域の大きさ毎に評価領域画像ベクトルを順次生成するステップと、
前記演算装置が、前記部分領域の大きさ毎の評価領域画像ベクトルの各々について、対応の固有空間との間の距離を順次算出するステップと、
前記演算装置が、各々が前記部分領域の大きさ毎の前記距離を要素とする応答ベクトルの集合に基づいて、前記集合内と前記集合外との境界を規定する判別関数を決定するステップと、
前記演算装置が、前記記憶装置に格納された前記検査画像に順次設定される第2の評価領域を含み、かつ前記学習画像から抽出される前記複数の部分領域とそれぞれ同じ大きさを有する複数の部分領域の画像情報をそれぞれ抽出し、この抽出される前記画像情報から生成される検査画像ベクトルと、前記判別関数とに基づいて、前記第2の評価領域における欠陥の有無を判断するステップとを含む、欠陥検出方法。 A defect detection method for detecting defects in an inspection image based on a learning result acquired from a learning image using a computer including an arithmetic device and a storage device,
The arithmetic device includes a first evaluation area sequentially set in the learning image stored in the storage device, and extracts image information of each of a plurality of partial areas having different sizes;
The arithmetic device sequentially generates an evaluation area image vector for each size of the partial area from each of the image information extracted from the learning image;
The arithmetic device sequentially calculating a distance from the corresponding eigenspace for each of the evaluation region image vectors for each size of the partial region;
Step the arithmetic unit, based on the set of response vectors, each of which with the distance elements for each size of the partial region, to determine the determine specific functions that define the boundary between the set outer and the inner set When,
The arithmetic device includes a plurality of second evaluation regions sequentially set in the inspection image stored in the storage device, and a plurality of partial regions extracted from the learning image, each having the same size Extracting image information of each partial area, and determining whether or not there is a defect in the second evaluation area based on the inspection image vector generated from the extracted image information and the discriminant function; Including a defect detection method.
前記検査画像に設定された第1の評価領域を包含し、かつ互いに大きさの異なる複数の部分領域それぞれの画像情報を抽出する手段と、
前記検査画像から抽出される前記画像情報の各々から、前記部分領域の大きさ毎に検査画像ベクトルを生成する手段と、
前記部分領域の大きさ毎の検査画像ベクトルの各々について、対応の固有空間との間の距離を算出する手段と、
予め定められた判別関数を参照して、前記部分領域の大きさ毎の前記距離を要素とする第1の応答ベクトルに基づいて、前記第1の評価領域における欠陥の有無を判断する手段として機能させる、欠陥検出プログラム。 A defect detection program for detecting defects in an inspection image based on a learning result obtained from a learning image using a computer, the computer comprising:
Means for extracting image information of each of a plurality of partial areas including the first evaluation area set in the inspection image and having different sizes from each other;
Means for generating an inspection image vector for each size of the partial area from each of the image information extracted from the inspection image;
Means for calculating a distance between the corresponding eigenspace for each of the inspection image vectors for each size of the partial region;
Function as means for judging presence / absence of a defect in the first evaluation region based on a first response vector having the distance for each size of the partial region as an element with reference to a predetermined discriminant function Defect detection program.
前記学習画像に順次設定される第1の評価領域を含み、かつ互いに大きさの異なる複数の部分領域それぞれの画像情報を抽出する手段と、
前記学習画像から抽出される前記画像情報の各々から、前記部分領域の大きさ毎に評価領域画像ベクトルを順次生成する手段と、
前記部分領域の大きさ毎の評価領域画像ベクトルの各々について、対応の固有空間との間の距離を順次算出する手段と、
各々が前記部分領域の大きさ毎の前記距離を要素とする応答ベクトルの集合に基づいて、前記集合内と前記集合外との境界を規定する判別関数を決定する手段と、
前記検査画像に順次設定される第2の評価領域を含み、かつ前記学習画像から抽出される前記複数の部分領域とそれぞれ同じ大きさを有する複数の部分領域の画像情報をそれぞれ抽出し、この抽出される前記画像情報から生成される検査画像ベクトルと、前記判別関数とに基づいて、前記第2の評価領域における欠陥の有無を判断する手段として機能させる、欠陥検出プログラム。 A defect detection program for detecting defects in an inspection image based on a learning result obtained from a learning image using a computer, the computer comprising:
Means for extracting image information of each of a plurality of partial areas including first evaluation areas sequentially set in the learning image and having different sizes;
Means for sequentially generating an evaluation area image vector for each size of the partial area from each of the image information extracted from the learning image;
Means for sequentially calculating a distance from a corresponding eigenspace for each of the evaluation area image vectors for each size of the partial area;
It means for each based on a set of response vector to the distance elements for each size of the partial region, to determine the determine specific functions that define the boundary between the set outer and the inner set,
Extract image information of a plurality of partial areas each including a second evaluation area sequentially set in the inspection image and having the same size as the plurality of partial areas extracted from the learning image. A defect detection program that functions as means for determining the presence / absence of a defect in the second evaluation region based on the inspection image vector generated from the image information and the discriminant function.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009048114A JP5359377B2 (en) | 2009-03-02 | 2009-03-02 | Defect detection apparatus, defect detection method, and defect detection program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009048114A JP5359377B2 (en) | 2009-03-02 | 2009-03-02 | Defect detection apparatus, defect detection method, and defect detection program |
Publications (3)
| Publication Number | Publication Date |
|---|---|
| JP2010203845A JP2010203845A (en) | 2010-09-16 |
| JP2010203845A5 JP2010203845A5 (en) | 2012-03-08 |
| JP5359377B2 true JP5359377B2 (en) | 2013-12-04 |
Family
ID=42965480
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2009048114A Active JP5359377B2 (en) | 2009-03-02 | 2009-03-02 | Defect detection apparatus, defect detection method, and defect detection program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5359377B2 (en) |
Families Citing this family (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2012098181A (en) * | 2010-11-02 | 2012-05-24 | Sumitomo Electric Ind Ltd | Device and method for detection |
| JP6682561B2 (en) | 2016-01-26 | 2020-04-15 | 富士フイルム株式会社 | Crack information detecting device, crack information detecting method, and crack information detecting program |
| KR102450130B1 (en) * | 2019-07-02 | 2022-10-04 | 주식회사 마키나락스 | Systems and methods for detecting flaws on panels using images of the panels |
| US11948292B2 (en) | 2019-07-02 | 2024-04-02 | MakinaRocks Co., Ltd. | Systems and methods for detecting flaws on panels using images of the panels |
| JP7435303B2 (en) | 2020-06-23 | 2024-02-21 | オムロン株式会社 | Inspection device, unit selection device, inspection method, and inspection program |
| KR102439163B1 (en) * | 2022-06-24 | 2022-09-01 | 주식회사 아이브 | Apparatus, method, and program for detecting defective products using unsupervised learning models based on AI |
| JP2024135911A (en) * | 2023-03-23 | 2024-10-04 | 株式会社東京精密 | Workpiece visual inspection device and method |
| CN116805204B (en) * | 2023-08-24 | 2023-12-01 | 超网实业(成都)股份有限公司 | Intelligent plant monitoring method and system |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH05322533A (en) * | 1992-05-25 | 1993-12-07 | Yamatake Honeywell Co Ltd | Circuit component connection state detection method |
| JP3310898B2 (en) * | 1997-03-28 | 2002-08-05 | 三菱電機株式会社 | Image processing device |
| JP3447572B2 (en) * | 1998-07-31 | 2003-09-16 | 株式会社山武 | Inspection method for component connection |
-
2009
- 2009-03-02 JP JP2009048114A patent/JP5359377B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2010203845A (en) | 2010-09-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5359377B2 (en) | Defect detection apparatus, defect detection method, and defect detection program | |
| CN111539908B (en) | Method and system for detecting defects of sample | |
| TWI681183B (en) | Hot spot defect detecting method and hot spot defect detecting system | |
| TWI607213B (en) | Apparatus and method for defect detection including block and block comparison | |
| KR102103853B1 (en) | Defect inspection device and defect inspection method | |
| US11430108B2 (en) | Defect offset correction | |
| JP4776308B2 (en) | Image defect inspection apparatus, image defect inspection system, defect classification apparatus, and image defect inspection method | |
| KR20210020112A (en) | Pattern grouping method based on machine learning | |
| JP5225297B2 (en) | Method for recognizing array region in die formed on wafer, and setting method for such method | |
| US20100021067A1 (en) | Abnormal area detection apparatus and abnormal area detection method | |
| WO2014168884A1 (en) | Adaptive sampling for semiconductor inspection recipe creation, defect review, and metrology | |
| US9613425B2 (en) | Three-dimensional measurement apparatus, three-dimensional measurement method and program | |
| US10074167B2 (en) | Reducing registration and design vicinity induced noise for intra-die inspection | |
| US10515459B2 (en) | Image processing apparatus for processing images captured by a plurality of imaging units, image processing method, and storage medium storing program therefor | |
| TW201734949A (en) | Improving defect sensitivity of semiconductor wafer detectors using design data with wafer image data | |
| KR20120089541A (en) | Method and system for wafer registration | |
| JP6405124B2 (en) | Inspection device, inspection method, and program | |
| JP6585793B2 (en) | Inspection device, inspection method, and program | |
| KR20220114716A (en) | Method and apparatus for clustering images | |
| US20240046497A1 (en) | Image analysis method and camera apparatus | |
| CN116364569B (en) | Defect detection using computationally efficient segmentation methods | |
| US10893167B2 (en) | Extracting a document page image from a electronically scanned image having a non-uniform background content | |
| JP2010198476A (en) | Defect detecting apparatus, defect detecting method and defect detecting program | |
| KR100960543B1 (en) | System and method for generating a reference image using an unknown quality pattern | |
| WO2023116481A1 (en) | Peak position measurement offset in a two-dimensional optical spectrum |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120124 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120124 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130116 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20130806 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130819 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 5359377 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |