JP2011014152A - Abnormal region detecting device and abnormal region detection method - Google Patents

Abnormal region detecting device and abnormal region detection method Download PDF

Info

Publication number
JP2011014152A
JP2011014152A JP2010186217A JP2010186217A JP2011014152A JP 2011014152 A JP2011014152 A JP 2011014152A JP 2010186217 A JP2010186217 A JP 2010186217A JP 2010186217 A JP2010186217 A JP 2010186217A JP 2011014152 A JP2011014152 A JP 2011014152A
Authority
JP
Japan
Prior art keywords
pixel
feature data
abnormal
index
principal component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2010186217A
Other languages
Japanese (ja)
Other versions
JP4728444B2 (en
Inventor
Nobuyuki Otsu
展之 大津
Takuya Nanri
卓也 南里
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National Institute of Advanced Industrial Science and Technology AIST
Original Assignee
National Institute of Advanced Industrial Science and Technology AIST
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by National Institute of Advanced Industrial Science and Technology AIST filed Critical National Institute of Advanced Industrial Science and Technology AIST
Priority to JP2010186217A priority Critical patent/JP4728444B2/en
Publication of JP2011014152A publication Critical patent/JP2011014152A/en
Application granted granted Critical
Publication of JP4728444B2 publication Critical patent/JP4728444B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a high speed and general abnormal region detecting device for highly precisely detecting the presence and the position of abnormality by using higher-order local autocorrelation features.SOLUTION: The abnormal region detecting device includes: a means for extracting feature data by higher-order local autocorrelation by pixel from image data; a means for adding the feature data about a pixel group by pixel in a prescribed range including each pixel; a means for calculating an index showing the abnormalities of the feature data for a partial space showing a normal region; a means for determining abnormality on the basis of the index; and a means for outputting a pixel position determined to be abnormal. A plurality of pieces of higher-order local autocorrelation feature data that differ due to displacement width may be extracted. Furthermore, the abnormal region detection device may be provided with a means for searching a partial space showing a normal region, based on main component vectors by a main component analyzing method from the feature data. Thus, determination of abnormalities according to pixels can be made, and accurate detection the position of abnormal regions can be made.

Description

本発明は、画像を取り込んで自動的に通常とは異なる領域を検出する異常領域検出装置および異常領域検出方法に関するものである。   The present invention relates to an abnormal region detection apparatus and an abnormal region detection method for capturing an image and automatically detecting a region different from the normal region.

従来、例えばフレキシブル配線基板のフィルムの欠陥検査において、線が断線している場合は通電により検出可能であるが、製品の欠陥の原因となる恐れのある線の細りなどは通電では検出できない。従って、細り等の異常は目視、あるいは画像を用いて検出する必要がある。
目視の場合には、線が微細であるため、画像を拡大する目視検査装置等を利用する必要がある。また欠陥の製造工程へのフィードバックを行うために、欠陥の座標、程度を出力する必要があり、手間がかかるので大量の製品を全て検査することが困難であるという問題点があった。
Conventionally, for example, in a defect inspection of a film of a flexible wiring board, when a wire is disconnected, it can be detected by energization, but thinning of a wire that may cause a product defect cannot be detected by energization. Therefore, it is necessary to detect abnormalities such as thinning visually or using an image.
In the case of visual observation, since the line is fine, it is necessary to use a visual inspection device or the like for enlarging the image. In addition, in order to provide feedback to the defect manufacturing process, it is necessary to output the coordinates and degree of the defect, which is troublesome and it is difficult to inspect all of a large number of products.

そこで、今日では、多くの製品検査において画像を用いた異常検査の自動化がなされている。検査手法としては、例えば製品ごとに登録された基準画像との照合を行うパターンマッチング手法が採用されている。
一方、画像データから特定の図形等を検出したり、登録されている画像との一致/不一致を判定するために各種の技術が提案されている。本発明者らが出願した下記の特許文献1には、2次元画像に対する高次局所自己相関特徴(以下、HLACデータとも記す)を用いた学習適応型画像認識・計測方式の技術が開示されている。
Therefore, today, an abnormality inspection using an image is automated in many product inspections. As an inspection method, for example, a pattern matching method is used in which a reference image registered for each product is compared.
On the other hand, various techniques have been proposed in order to detect a specific figure or the like from image data and to determine matching / mismatching with a registered image. The following patent document 1 filed by the present inventors discloses a technique of a learning adaptive image recognition / measurement method using a high-order local autocorrelation feature (hereinafter also referred to as HLAC data) for a two-dimensional image. Yes.

特許第2982814号公報Japanese Patent No. 2982814

上記した従来の異常領域検出手法であるパターンマッチング手法においては対象に対する汎用性や学習効果が無く、かつ位置や方向を合わせる必要があり、処理時間が長く、精度が悪いという問題点があった。また、フレキシブル配線基板の導体部はフィルム上に印刷された樹脂であり、粒状であるため、画像から直線のエッジ等の図形を検出し難く、欠陥の検出が難しいという問題点があった。
一方で、高次局所自己相関特徴を用いた学習適応型画像認識方式においては、対象(欠陥領域)が画像のどの位置にあっても同じ検出結果となる位置不変性があり、対象(欠陥領域)の位置を特定できないので、欠陥検査に適用できないという問題点があった。
The pattern matching method, which is the conventional abnormal region detection method described above, has a problem that there is no versatility or learning effect on the target, and the position and direction need to be matched, the processing time is long, and the accuracy is poor. Moreover, since the conductor part of the flexible wiring board is a resin printed on a film and is granular, there is a problem that it is difficult to detect a figure such as a straight edge from an image and it is difficult to detect a defect.
On the other hand, in the learning adaptive image recognition method using higher-order local autocorrelation features, there is position invariance that results in the same detection result regardless of the position of the target (defect region) in the image. ) Cannot be specified, so that it cannot be applied to defect inspection.

本発明の目的は、上記したような従来例の問題点を解決し、高次局所自己相関特徴を用いて異常の有無と共に位置を高い精度で検出できる高速かつ汎用的な異常領域検出装置および異常領域検出方法を提供する点にある。   The object of the present invention is to solve the problems of the conventional example as described above, and to use a high-order local autocorrelation feature to detect the presence and absence of an abnormality and a position with high accuracy and a general-purpose abnormal area detection device and an abnormality It is in providing a region detection method.

本発明の異常領域検出装置は、画像データから画素毎に高次局所自己相関によって特徴データを抽出する特徴データ抽出手段と、所定の距離だけ離れた画素毎に、その画素を含む所定の範囲の画素群について前記特徴データ抽出手段によって抽出された前記特徴データを加算する画素対応特徴データ生成手段と、正常領域を示す部分空間に対する前記画素対応特徴データ生成手段により生成された特徴データの異常さを示す指標を計算する指標計算手段と、前記指標が所定値よりも大きい場合に異常と判定する異常判定手段と、前記異常判定手段が異常と判定した画素位置を異常とする判定結果を出力する出力手段とを備えたことを主要な特徴とする。   An abnormal region detection apparatus according to the present invention includes a feature data extraction unit that extracts feature data for each pixel from image data by high-order local autocorrelation, and a predetermined range including the pixel for each pixel separated by a predetermined distance. The pixel correspondence feature data generation means for adding the feature data extracted by the feature data extraction means for a pixel group, and the abnormality of the feature data generated by the pixel correspondence feature data generation means for a partial space indicating a normal region An index calculation unit that calculates an index to be indicated; an abnormality determination unit that determines that an abnormality occurs when the index is greater than a predetermined value; and an output that outputs a determination result that abnormally determines a pixel position that the abnormality determination unit determines to be abnormal The main feature is that it is provided with means.

また、前記した異常領域検出装置において、前記特徴データ抽出手段は、変位幅の異なる複数の高次局所自己相関特徴データを抽出する点にも特徴がある。また、前記した異常領域検出装置において、前記部分空間に対する異常さを示す指標は特徴データの前記部分空間との距離あるいは角度の情報のいずれかを含んでいる点にも特徴がある。   In the abnormal region detection apparatus described above, the feature data extraction unit is characterized in that it extracts a plurality of higher-order local autocorrelation feature data having different displacement widths. Further, the above-described abnormal area detecting device is characterized in that the index indicating the abnormality with respect to the partial space includes either information on the distance or angle of the characteristic data with respect to the partial space.

また、前記した異常領域検出装置において、更に、特徴データ抽出手段によって抽出された特徴データから主成分分析手法により主成分ベクトルに基づく正常領域を示す部分空間を求める主成分部分空間生成手段を備えた点にも特徴がある。また、前記した異常領域検出装置において、前記主成分部分空間生成手段は、逐次的主成分分析手法により主成分ベクトルに基づく部分空間を求める点にも特徴がある。   Further, the abnormal region detection apparatus described above further includes a principal component subspace generation unit for obtaining a subspace indicating a normal region based on a principal component vector from the feature data extracted by the feature data extraction unit by a principal component analysis method. There is also a feature in the point. The above-described abnormal region detection apparatus is characterized in that the principal component subspace generation means obtains a subspace based on a principal component vector by a sequential principal component analysis method.

また、前記した異常領域検出装置において、更に、前記画素対応特徴データ生成手段によって生成された画素対応特徴データから得られる部分空間と前記部分空間との正準角に基づく類似度の指標を求め、クラスタリング手法を用いて画素毎にクラス分けするクラス分け手段を備え、前記主成分部分空間生成手段は、クラス毎に前記特徴データを加算してクラス対応の部分空間を求め、前記指標計算手段は、前記画素対応特徴データ生成手段により生成された特徴データの前記クラス対応の部分空間に対する異常さを示す指標を計算する点にも特徴がある。   Further, in the above-described abnormal area detection device, further, an index of similarity based on a canonical angle between the partial space obtained from the pixel correspondence feature data generated by the pixel correspondence feature data generation unit and the partial space, Classifying means for classifying each pixel using a clustering method, the principal component subspace generating means adds the feature data for each class to obtain a class-corresponding subspace, and the index calculating means includes: There is also a feature in that an index indicating abnormality of the feature data generated by the pixel-corresponding feature data generation unit with respect to the class-corresponding partial space is calculated.

本発明の異常領域検出方法は、画像データから画素毎に高次局所自己相関によって特徴データを抽出するステップ、所定の距離だけ離れた画素毎に、その画素を含む所定の範囲の画素群について前記特徴データを加算するステップ、正常領域を示す部分空間に対する前記特徴データの異常さを示す指標を計算するステップ、前記指標が所定値よりも大きい場合に異常と判定するステップ、異常と判定された画素位置を異常とする判定結果を出力するステップを含むことを主要な特徴とする。   In the abnormal region detection method of the present invention, the feature data is extracted from the image data by high-order local autocorrelation for each pixel, and for each pixel separated by a predetermined distance, the pixel group in a predetermined range including the pixel is described above. A step of adding feature data; a step of calculating an index indicating abnormality of the feature data with respect to a partial space indicating a normal region; a step of determining abnormality when the index is greater than a predetermined value; a pixel determined to be abnormal The main feature is that it includes a step of outputting a determination result indicating that the position is abnormal.

本発明によれば、以下のような効果がある。
(1)画素対応に異常判定が可能であり、異常領域の位置を正確に検出可能である。
(2)従来は対象が多数存在していると異常検出精度が低下してしまうが、画素を中心とする所定の範囲を適切に選択すれば、検出対象が多数あっても異常領域の判定精度が低下することがない。
(3)特徴抽出や異常判定のための計算量が少なく、かつ計算量は対象に依らず一定であるので、高速に処理可能である。
The present invention has the following effects.
(1) Abnormality determination can be performed in correspondence with pixels, and the position of the abnormal region can be accurately detected.
(2) Conventionally, when there are a large number of objects, the abnormality detection accuracy decreases. However, if a predetermined range centered on pixels is appropriately selected, even if there are a large number of detection objects, the determination accuracy of the abnormal region is high. Will not drop.
(3) Since the amount of calculation for feature extraction and abnormality determination is small and the amount of calculation is constant regardless of the object, high-speed processing is possible.

(4)正常領域を陽に定義することなく統計的に学習しているため、設計の段階で正常領域とは何かについて定義する必要がなく、監視対象に則した検出を行うことができる。さらに、監視対象についての仮定が不要であり、さまざまな監視対象に対しても、正常、異常を判別でき、汎用性が高い。また、異常判定と同時に正常領域の部分空間を更新することにより、正常領域の変化に追従していくことができる。
(5)対象の種類が複数種あっても位置によってクラス分けすることにより、検出精度が更に向上する。また、クラス分けを予め処理してもよいし、クラス分け処理を異常判定と同時に自動的に更新することも可能である。
(4) Since the normal region is statistically learned without being explicitly defined, it is not necessary to define what the normal region is at the design stage, and detection according to the monitoring target can be performed. Furthermore, the assumption about the monitoring target is unnecessary, and normality and abnormality can be discriminated for various monitoring targets, and the versatility is high. In addition, by updating the partial space of the normal area simultaneously with the abnormality determination, it is possible to follow the change of the normal area.
(5) Even if there are a plurality of types of objects, the detection accuracy is further improved by classifying them by position. Further, the classification may be processed in advance, or the classification process can be automatically updated simultaneously with the abnormality determination.

本発明による異常領域検出装置の構成を示すブロック図である。It is a block diagram which shows the structure of the abnormal area | region detection apparatus by this invention. 本発明による異常領域検出処理の概要を示す説明図である。It is explanatory drawing which shows the outline | summary of the abnormal area | region detection process by this invention. 2次元画素空間における自己相関処理座標を示す説明図である。It is explanatory drawing which shows the autocorrelation process coordinate in a two-dimensional pixel space. 自己相関マスクパターンの内容を示す説明図である。It is explanatory drawing which shows the content of an autocorrelation mask pattern. 本発明の異常検出処理の内容を示すフローチャートである。It is a flowchart which shows the content of the abnormality detection process of this invention. 画素対応HLACデータ生成処理の内容を示すフローチャートである。It is a flowchart which shows the content of the pixel corresponding | compatible HLAC data generation process. HLAC特徴データ生成処理の内容を示すフローチャートである。It is a flowchart which shows the content of the HLAC characteristic data generation process. HLAC特徴の部分空間の性質を示す説明図である。It is explanatory drawing which shows the property of the subspace of HLAC characteristic. 入力画像および異常判定結果を表す画像を示す説明図である。It is explanatory drawing which shows the image showing an input image and an abnormality determination result.

本明細書においては、異常領域を「正常領域ではないもの」として定義する。正常領域は、領域特徴の統計的な分布を考えた場合に分布の集中する領域であるものとすれば、統計的な分布として教師無しで学習可能である。そして、その分布から大きく逸脱する領域を異常領域とする。   In this specification, an abnormal area is defined as “not a normal area”. If the normal region is a region where the distribution is concentrated when a statistical distribution of region features is considered, the normal region can be learned as a statistical distribution without a teacher. An area that greatly deviates from the distribution is defined as an abnormal area.

異常領域検出の具体的な手法としては、高次局所自己相関特徴による領域特徴空間の中で正常領域特徴の部分空間を生成し、その部分空間からの距離あるいは角度を指標として異常領域を検出する。正常領域部分空間の生成には例えば主成分分析手法を用い、例えば累積寄与率0.99の主成分ベクトルにより主成分部分空間を構成する。   As a specific method of abnormal region detection, a partial space of normal region features is generated in a region feature space based on higher-order local autocorrelation features, and the abnormal region is detected using the distance or angle from the partial space as an index. . For example, a principal component analysis method is used to generate the normal region subspace, and the principal component subspace is configured by a principal component vector having a cumulative contribution rate of 0.99, for example.

ここで、高次局所自己相関特徴には、対象の切りだしが不要で画面内において加法性があるという性質がある。この加法性により、正常領域部分空間を構成すると、画面内に正常な配線が何本あっても特徴ベクトルは正常領域部分空間の中に収まることになり、その中の一カ所でも異常領域が存在すると、部分空間から飛び出して異常値として検出できる。線を個々にトラッキングし、切り出す必要がないため、計算量は線の数に比例することなく一定となり、高速に計算可能である。   Here, the high-order local autocorrelation feature has a property that it does not require extraction of an object and is additive in the screen. Due to this additivity, when a normal area subspace is configured, the feature vector will fit in the normal area subspace no matter how many normal wires are in the screen, and there is an abnormal area in one of them. Then, it jumps out of the partial space and can be detected as an abnormal value. Since it is not necessary to track and cut out the lines individually, the calculation amount is constant without being proportional to the number of lines, and can be calculated at high speed.

また、本発明においては、対象の位置を検出するために、所定の距離(1画素以上の任意の距離)だけ離れた画素毎に、この画素を含む(中心とする)所定の領域のHLACデータを積算した画素対応HLAC特徴データを求め、このデータと正常領域部分空間との距離あるいは角度によって異常判定を行う。この処理によって画素毎の正常/異常の判定が可能である。
画像データからの領域特徴の抽出には、高次局所自己相関(HLAC) 特徴を用いる。HLAC特徴の第k成分は次の数式1で与えられる。
Further, in the present invention, in order to detect the position of the object, HLAC data of a predetermined area including (centering) this pixel for each pixel separated by a predetermined distance (arbitrary distance of one pixel or more) The pixel-corresponding HLAC feature data obtained by integrating is obtained, and abnormality determination is performed based on the distance or angle between this data and the normal region partial space. With this process, it is possible to determine normality / abnormality for each pixel.
Higher order local autocorrelation (HLAC) features are used to extract region features from image data. The k-th component of the HLAC feature is given by Equation 1 below.

Figure 2011014152
Figure 2011014152

ここで、I(r)は画像を表し、変数r(参照点)とN個の局所変位aN kは、画面内の座標x,yを成分として持つ二次元のベクトルである。BN kは、N個の局所変位を列成分とした局所変位行列である。さらに、積分範囲はW×Hの画像領域とし、W,Hは画像の幅と高さを表す。
Here, I (r) represents an image, and a variable r (reference point) and N local displacements a N k are two-dimensional vectors having in-screen coordinates x and y as components. B N k is a local displacement matrix having N local displacements as column components. Further, the integration range is a W × H image area, and W and H represent the width and height of the image.

また、本発明では、HLAC特徴に対して近傍領域を3×3に限らずさらに広い領域の高次相関も抽出する。そこで、行列Rを用いて、下記のように定式化される立体高次局所自己相関特徴を考える。   Further, in the present invention, the high-order correlation of a wider region is also extracted than the 3 × 3 neighborhood region for the HLAC feature. Therefore, using the matrix R, a solid higher-order local autocorrelation feature formulated as follows is considered.

Figure 2011014152
Figure 2011014152

この特徴は、画像I(r)に対して、画像平面内のスケールを水平方向に1/λx倍、垂直方向に1/λy倍縮小した画像Iamp(r,R)=I(Rr)から抽出した特徴量に比例する特徴量となる。即ちIamp(r,R)に対して抽出されるCHLAC特徴hamp(Br,R)は以下のようになる。 This feature is obtained by reducing the scale in the image plane by 1 / λ x times in the horizontal direction and 1 / λ y times in the vertical direction with respect to the image I (r). I amp (r, R) = I (Rr The feature amount is proportional to the feature amount extracted from (). That is, the CHLAC feature h amp (Br, R) extracted for I amp (r, R) is as follows.

Figure 2011014152
Figure 2011014152

従って、行列Rを用いてより広い範囲の相関をとった特徴量は、元の画像を縮小した画像から抽出したHLAC特徴量のλxλy倍であることが分かる。実際に、ある対象からより多くの相関特徴を抽出しようと考えた場合、対象や画像に応じて画像のスケールを適切に変化させる必要があるが、これらのパラメータによって、対象の特徴がうまく抽出できるようにスケールを調整することができる。 Therefore, it can be seen that the feature quantity that has been correlated in a wider range using the matrix R is λ x λ y times the HLAC feature quantity extracted from the reduced image. In fact, if you want to extract more correlation features from a target, you need to change the scale of the image appropriately according to the target and the image. So that the scale can be adjusted.

そこで、スケールに対してロバストにするために、スケールの異なる特徴(λx,λy)をベクトルの成分に追加し、それを新たな特徴として用いる。例えば、(λx,λy)=(1,1)で抽出した特徴と(λx,λy)=(2,2)で抽出した特徴を組み合わせることで35×2次元のスケールにロバストな特徴を得る。 Therefore, in order to be robust with respect to the scale, features (λ x , λ y ) with different scales are added to the vector components and used as new features. For example, by combining the feature extracted with (λ x , λ y ) = (1, 1) and the feature extracted with (λ x , λ y ) = (2, 2), it is robust to a 35 × 2 dimensional scale. Get features.

図1は、本発明による異常領域検出装置の構成を示すブロック図である。デジタルカメラ10は例えば検査対象となる製品の画像データを出力する。顕微鏡に組み込まれたカメラであってもよい。デジタルカメラ10はモノクロでもよいしカラーカメラであってもよい。コンピュータ11は例えばUSB等の画像を取り込むための入力端子を備えた周知のパソコン(PC)であってもよい。本発明は、パソコンなどの周知の任意のコンピュータ11に後述する処理のプログラムを作成してインストールして起動することにより実現される。   FIG. 1 is a block diagram showing a configuration of an abnormal area detecting apparatus according to the present invention. For example, the digital camera 10 outputs image data of a product to be inspected. It may be a camera incorporated in a microscope. The digital camera 10 may be a monochrome camera or a color camera. The computer 11 may be a known personal computer (PC) having an input terminal for capturing an image such as a USB. The present invention is realized by creating, installing, and starting a processing program to be described later in any known computer 11 such as a personal computer.

モニタ装置12はコンピュータ11の周知の出力装置であり、例えば異常領域が検出されたことをオペレータに表示するために使用される。キーボード13およびマウス14は、オペレータが入力に使用する周知の入力装置である。なお、デジタルカメラ10は任意の通信網を介してコンピュータ11と接続されていてもよいし、メモリカードを介してコンピュータ11にデータを転送してもよい。   The monitor device 12 is a well-known output device of the computer 11 and is used, for example, to display to the operator that an abnormal region has been detected. The keyboard 13 and the mouse 14 are well-known input devices used for input by the operator. The digital camera 10 may be connected to the computer 11 via an arbitrary communication network, or data may be transferred to the computer 11 via a memory card.

図2は、本発明による異常領域検出処理の概要を示す説明図である。例えば360画素×240画素、256階調グレースケールの入力画像データ(a)について、まず変位幅1、即ち変位幅が画素幅と等しく設定して、画素毎に画素対応HLACデータを計算する(b)。HLACデータについては後述する。次に、変位幅を2、即ち画素幅の2倍に設定して同じように画素毎に画素対応HLACデータを計算する(b)。この処理を変位幅の最大値(例えば3)まで繰り返す。この結果、変位幅毎の画素対応HLACデータ(c)が得られる。   FIG. 2 is an explanatory diagram showing an outline of the abnormal area detection processing according to the present invention. For example, for 360 × 240 pixels, 256 gray scale input image data (a), first, displacement width 1, that is, the displacement width is set equal to the pixel width, and pixel-corresponding HLAC data is calculated for each pixel (b) ). The HLAC data will be described later. Next, the displacement width is set to 2, that is, twice the pixel width, and pixel-corresponding HLAC data is calculated for each pixel in the same manner (b). This process is repeated up to the maximum displacement width (for example, 3). As a result, pixel-corresponding HLAC data (c) for each displacement width is obtained.

次に、変位幅毎にHLACデータ(c)を加算(g)して求めた特徴データの集合を全HLAC特徴データ(h)とする。そして、全HLAC特徴データ(h)から主成分分析あるいは逐次的主成分分析によって主成分部分空間を求める(i)。通常、画像のほとんどの領域は正常な領域であるので、この主成分部分空間は正常領域の特徴を表している。   Next, a set of feature data obtained by adding (g) HLAC data (c) for each displacement width is defined as all HLAC feature data (h). Then, a principal component subspace is obtained from all HLAC feature data (h) by principal component analysis or sequential principal component analysis (i). Usually, since most areas of the image are normal areas, this principal component subspace represents the characteristics of the normal areas.

一方、変位幅毎の画素対応HLACデータ(c)から、変位幅毎に、注目画素を移動させながら、注目画素を中心とする所定領域(例えば10×10)のHLACデータを加算する処理を行い(e)、画素対応HLAC特徴データ(f)を得る。最後に、画素毎に正常部分空間と画素対応HLAC特徴データとの距離あるいは角度によって異常判定を行い(j)、異常と判定された画素位置を異常領域として表示、出力する(k)。   On the other hand, from the pixel-corresponding HLAC data (c) for each displacement width, a process of adding HLAC data of a predetermined area (for example, 10 × 10) centered on the target pixel while moving the target pixel for each displacement width is performed. (E) Pixel corresponding HLAC feature data (f) is obtained. Finally, abnormality determination is performed for each pixel based on the distance or angle between the normal subspace and the pixel-corresponding HLAC feature data (j), and the pixel position determined to be abnormal is displayed and output as an abnormal area (k).

なお、本発明においては、正常領域の部分空間生成処理(g)、(i)を予め画像の全領域あるいはランダムにまたは規則的にサンプリングした一部の領域について実行し、得られた正常領域の部分空間情報に基づき異常判定処理(j)を行ってもよい。   In the present invention, the normal region partial space generation processes (g) and (i) are performed on the entire region of the image in advance or on a part of the region sampled randomly or regularly. The abnormality determination process (j) may be performed based on the partial space information.

以下に、処理の詳細について説明する。図5は、本発明の異常検出処理の内容を示すフローチャートである。なお、例えば256階調のグレースケール画像データが既に読み込まれているものとする。S10においては、変位幅λを1にセットする。S11においては、画像の画素毎に、変位幅λに基づく画素対応HLACデータを生成し、保存する。この処理の詳細については後述する。   Details of the processing will be described below. FIG. 5 is a flowchart showing the contents of the abnormality detection process of the present invention. For example, assume that 256 gray scale image data has already been read. In S10, the displacement width λ is set to 1. In S11, pixel-corresponding HLAC data based on the displacement width λ is generated and stored for each pixel of the image. Details of this processing will be described later.

図3は、2次元画素空間における自己相関処理座標を示す説明図である。本発明においては、注目する参照画素を中心とする3×3=9画素の正方形の内部の画素について相関を取る(λ=1の場合)。マスクパターンは、相関を取る画素の組合せを示す情報であり、正方形の中心である注目画素(参照点)は必ず選択され、周りが局所変位を表す。マスクパターンによって選択された画素のデータが相関値の計算に使用される。   FIG. 3 is an explanatory diagram showing autocorrelation processing coordinates in a two-dimensional pixel space. In the present invention, correlation is performed for pixels in a square of 3 × 3 = 9 pixels centering on the reference pixel of interest (when λ = 1). The mask pattern is information indicating a combination of pixels to be correlated, and the pixel of interest (reference point) that is the center of the square is always selected, and the surroundings represent local displacement. The pixel data selected by the mask pattern is used to calculate the correlation value.

図4は、自己相関マスクパターンの内容を示す説明図である。図4(1)は注目画素のみの最も簡単な0次のマスクパターン(1個)である。(2)は2つの画素が選択されている1次マスクパターン例(計5個)であり、枠内の数はその画素値を乗算する回数を示している。(3)以降の行は3つの画素が選択されている3次マスクパターン例(計29個)である。注目画素を移動した場合に重複するパターンを除くと、濃淡画像に対するマスクパターン、即ちHLAC特徴の成分の数は合計35個ある。即ち、1つの2次元データに対する高次局所自己相関特徴ベクトルは35次元となる。   FIG. 4 is an explanatory diagram showing the contents of the autocorrelation mask pattern. FIG. 4 (1) shows the simplest zeroth-order mask pattern (one) with only the target pixel. (2) is an example of a primary mask pattern in which two pixels are selected (a total of five), and the number in the frame indicates the number of times that the pixel value is multiplied. (3) The subsequent rows are examples of a tertiary mask pattern (29 in total) in which three pixels are selected. Excluding overlapping patterns when the pixel of interest is moved, the total number of mask patterns for grayscale images, that is, HLAC feature components, is 35. That is, the high-order local autocorrelation feature vector for one two-dimensional data is 35 dimensions.

S12においては、注目画素を移動させながら、注目画素を中心とする所定領域、例えば10×10の領域のHLACデータを加算して、λ対応画素対応HLAC特徴データを生成する。この処理の詳細については後述する。S13においては、全ての画素対応HLACデータを加算し、λ対応全HLAC特徴データを保存する。   In S12, the HLAC feature data corresponding to the λ-corresponding pixel is generated by adding the HLAC data of a predetermined area centered on the target pixel, for example, a 10 × 10 area, while moving the target pixel. Details of this processing will be described later. In S13, all the pixel-corresponding HLAC data are added, and the λ-corresponding all HLAC feature data is stored.

S14においては、λに1を加算する。S15においては、λが最高値(例えば3)を越えたか否かが判定され、判定結果が否定の場合にはSS11に移行するが、肯定の場合にはSS16に移行する。S16においては、λ対応画素対応HLAC特徴データおよびλ対応全HLAC特徴データのそれぞれについて、全λについてまとめる。従って、λの最高値が3である場合には画素対応HLAC特徴データおよび全HLAC特徴データの次元は35×3=105次元となる。   In S14, 1 is added to λ. In S15, it is determined whether or not λ has exceeded the maximum value (for example, 3). If the determination result is negative, the process proceeds to SS11, but if the determination result is affirmative, the process proceeds to SS16. In S16, for each of the λ corresponding HLAC feature data and the λ corresponding all HLAC feature data, all λ are collected. Accordingly, when the maximum value of λ is 3, the dimensions of the pixel-corresponding HLAC feature data and the total HLAC feature data are 35 × 3 = 105 dimensions.

S17においては、主成分分析あるいは逐次的主成分分析手法により全HLAC特徴データから主成分ベクトルを求め、正常領域の部分空間とする。主成分分析手法自体は周知であるので概略を説明する。まず、正常領域の部分空間を構成するために、全HLAC特徴データから主成分分析により主成分ベクトルを求める。M次元のHLAC特徴ベクトルxを以下のように表す。   In S17, a principal component vector is obtained from all HLAC feature data by principal component analysis or sequential principal component analysis method, and is set as a subspace of a normal region. Since the principal component analysis method itself is well known, an outline will be described. First, in order to construct a subspace of the normal region, a principal component vector is obtained by principal component analysis from all HLAC feature data. The M-dimensional HLAC feature vector x is expressed as follows.

Figure 2011014152
Figure 2011014152

なお、M=35である。また、主成分ベクトルを列に並べた行列U(固有ベクトル)を以下のように表す。   Note that M = 35. A matrix U (eigenvector) in which principal component vectors are arranged in columns is expressed as follows.

Figure 2011014152
Figure 2011014152

主成分ベクトルを列に並べた行列Uは、以下のように求める。自己相関行列Rを次式に示す。 The matrix U in which the principal component vectors are arranged in columns is obtained as follows. The autocorrelation matrix R x is shown in the following equation.

Figure 2011014152
Figure 2011014152

行列Uはこの自己相関行列Rを用いて、次の式の固有値問題より求まる。 The matrix U is obtained from the eigenvalue problem of the following equation using this autocorrelation matrix Rx .

Figure 2011014152
Figure 2011014152

固有値行列Λを次式で表す。   The eigenvalue matrix Λ is expressed by the following equation.

Figure 2011014152
Figure 2011014152

第K固有値までの累積寄与率αKは、以下のように表される。 The cumulative contribution rate α K up to the Kth eigenvalue is expressed as follows.

Figure 2011014152
Figure 2011014152

そこで、累積寄与率αKが所定値(例えばαK=0.99)となる次元までの固有ベクトルu1,...,uKにより張られる空間を、正常領域の部分空間として適用する。なお、累積寄与率αKの最適値は監視対象や検出精度にも依存するので実験等により決定する。以上の計算を行うことにより、正常領域と対応する部分空間が生成される。 Therefore, the space spanned by the eigenvectors u 1 ,..., U K up to a dimension where the cumulative contribution rate α K becomes a predetermined value (for example, α K = 0.99) is applied as a subspace of the normal region. Note that the optimum value of the cumulative contribution rate α K depends on the monitoring target and the detection accuracy, and is therefore determined by experiments or the like. By performing the above calculation, a partial space corresponding to the normal region is generated.

次に、固有値問題を解かず、共分散行列を求めずに、インクリメンタルに部分空間を求める逐次主成分分析手法を説明する。実世界への応用では大量のデータを扱うため、全てのデータを保持しておくことは難しい。そこで、逐次的に通常領域の部分空間を学習、更新する。   Next, a sequential principal component analysis method for obtaining subspaces incrementally without solving the eigenvalue problem and obtaining the covariance matrix will be described. Since real-world applications handle large amounts of data, it is difficult to keep all the data. Therefore, the subspace of the normal region is learned and updated sequentially.

逐次的な主成分分析として考えられる手法としては、まず、ステップごとに固有値問題を解くことが考えられる。固有値問題に必要な自己相関行列Rは、次のように更新される。 As a method considered as a sequential principal component analysis, first, an eigenvalue problem may be solved for each step. The autocorrelation matrix R x required for the eigenvalue problem is updated as follows.

Figure 2011014152
Figure 2011014152

ここでR(n)はnステップ目の自己相関行列であり、x(n)はnステップ目の入力ベクトルである。これは、前記した主成分分析手法に忠実ではあるが、ステップごとに固有値問題を解かなければならないため、計算量が多いという問題がある。そこで、固有値問題を解くことなく相関行列を求めずに固有ベクトルを逐次更新する手法であるCCIPCAを適用する。CCIPCAの内容については、下記の非特許文献1に開示されている。
Juyang Weng, Yilu Zhang and Wey-Shiuan Hwang, "Candid Covariance-Free Incremental Principal Component Analysis",IEEE Transactions on Pattern Analysis and Machine Intelligence,Vol.25, No.8, pp.1034-1040, 2003。
Here, R x (n) is an autocorrelation matrix at the nth step, and x (n) is an input vector at the nth step. Although this is faithful to the principal component analysis method described above, there is a problem that the calculation amount is large because the eigenvalue problem must be solved for each step. Therefore, CCIPCA, which is a technique for sequentially updating eigenvectors without solving the eigenvalue problem without obtaining a correlation matrix, is applied. The contents of CCIPCA are disclosed in Non-Patent Document 1 below.
Juyang Weng, Yilu Zhang and Wey-Shiuan Hwang, "Candid Covariance-Free Incremental Principal Component Analysis", IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol.25, No.8, pp.1034-1040, 2003.

このアルゴリズムでは、ステップごとに固有値問題を解く必要がないため、非常に高速な手法となっている。また、この手法では、固有値の収束はあまり良くないが、固有ベクトルの収束は速いという性質を持つ。第1固有ベクトルと第1固有値は、次のように更新される。   This algorithm is a very fast method because it is not necessary to solve the eigenvalue problem for each step. In this method, eigenvalue convergence is not so good, but eigenvector convergence is fast. The first eigenvector and the first eigenvalue are updated as follows.

Figure 2011014152
Figure 2011014152

ここで、固有ベクトルはv/‖v‖であり、固有値は‖v‖である。この更新則では、nが無限大のときにv(n)→±λ11となることが証明されている。ここでλ1は、サンプルの相関行列Rの最大固有値であり、e1はそれに対応する固有ベクトルである。第n固有ベクトルと第n固有値については、第1固有ベクトルと第1固有値からGram-Schmidtの直交化法に則って漸化的に更新され、真の固有値、固有ベクトルに収束することが示されている。詳しい更新アルゴリズムは次のようになる。 Here, the eigenvector is v / ‖v‖, and the eigenvalue is ‖v‖. This updating rule proves that v (n) → ± λ 1 e 1 when n is infinite. Here, λ 1 is the maximum eigenvalue of the correlation matrix R of the sample, and e 1 is a corresponding eigenvector. It is shown that the n-th eigenvector and the n-th eigenvalue are updated incrementally from the first eigenvector and the first eigenvalue according to the Gram-Schmidt orthogonalization method and converge to the true eigenvalue and eigenvector. The detailed update algorithm is as follows.

Figure 2011014152
Figure 2011014152

本発明においては、CCIPCAで求める固有ベクトルについて全次元のM個を求めるのではなく、上限値を決める。固有値問題を解く場合には、固有値を求めてから累積寄与率を求め、累積寄与率が例えば0.99999を越える次元まで取るということを行うが、CCIPCAでは、次の二つの理由で上限値を設ける。第一に、従来の方法では計算量が大きいという点である。寄与率を求めるためには、全ての固有値を推定しなければならず、その計算時間は特徴抽出の計算時間を含めない場合でもパソコンで数十秒もかかってしまう。一方、次元を定数の例えば4として計算すると数ミリ秒で計算出来る。   In the present invention, the upper limit value is determined instead of obtaining M in all dimensions for the eigenvector obtained by CCIPCA. When solving the eigenvalue problem, the eigenvalue is calculated and then the cumulative contribution rate is obtained, and the cumulative contribution rate is taken to a dimension exceeding, for example, 0.99999. First, the conventional method requires a large amount of calculation. In order to obtain the contribution rate, all eigenvalues must be estimated, and the calculation time takes several tens of seconds even if the calculation time for feature extraction is not included. On the other hand, if the dimension is calculated as a constant, for example, 4, it can be calculated in several milliseconds.

2つ目の理由は、このCCIPCA手法においては固有値の収束が遅いという点である。数千フレームのデータ数に対してCCIPCA手法を用いた場合、最終的に通常領域部分空間の次元は二百程度であり、収束値である4に全く収束していないことが分かる。これらの理由により部分空間の次元を一定として求める。このパラメータのおおよその値は、ある時間幅の入力ベクトルに対して一度固有値問題を解くことによって求めることができる。   The second reason is that the eigenvalue convergence is slow in this CCIPCA method. When the CCIPCA method is used for the number of data of several thousand frames, it can be seen that the dimension of the normal region subspace is finally about two hundred and does not converge to the convergence value of 4 at all. For these reasons, the dimension of the subspace is determined to be constant. The approximate value of this parameter can be obtained by solving the eigenvalue problem once for an input vector of a certain time width.

S18においては、S16にて求めた画素対応HLAC特徴データとS17で求めた部分空間との距離d⊥を求める。   In S18, the distance d⊥ between the pixel corresponding HLAC feature data obtained in S16 and the partial space obtained in S17 is obtained.

図8は、HLAC特徴の部分空間の性質を示す説明図である。図8は、説明を簡単にするために、HLAC特徴データ空間を2次元(実際には26×3次元)とし、正常領域の部分空間を1次元(実施例では例えば累積寄与率0.99とすると3〜12次元程度)としたものであり、正常領域のHLAC特徴データが監視対象の個数ごとの集団を形成している。   FIG. 8 is an explanatory diagram showing the properties of the subspace of the HLAC feature. In FIG. 8, for the sake of simplicity, the HLAC feature data space is two-dimensional (actually 26 × 3 dimensions), and the normal area subspace is one-dimensional (in the embodiment, for example, the cumulative contribution rate is 0.99, 3). The HLAC feature data of the normal area forms a group for each number of monitoring targets.

主成分分析によって求められた正常領域部分空間Sは正常領域のHLAC特徴データを含む形で近傍に存在している。これに対して異常領域のHLAC特徴データAは、正常領域部分空間Sとの垂直距離d⊥が大きくなる。従って、HLAC特徴データと通常領域の部分空間との垂直距離d⊥を測ることによって、容易に異常領域を検出することができる。   The normal area subspace S obtained by the principal component analysis exists in the vicinity including the HLAC feature data of the normal area. On the other hand, the HLAC feature data A of the abnormal area has a large vertical distance d⊥ with respect to the normal area partial space S. Accordingly, the abnormal region can be easily detected by measuring the vertical distance d⊥ between the HLAC feature data and the partial space of the normal region.

距離d⊥は以下のように求める。主成分直交基底UK =[u1,...,uK] によって張られた正常部分空間への射影子Pおよびそれに対する直交補空間への射影子P⊥は下記のようになる。 The distance d⊥ is obtained as follows. The projector P onto the normal subspace spanned by the principal component orthogonal basis U K = [u 1 ,..., U K ] and the projector P⊥ onto the orthogonal complement space are as follows.

Figure 2011014152
Figure 2011014152

U’は行列Uの転置行列であり、IMはM次の単位行列である。直交補空間での2乗距離、即ち、部分空間Uへの垂線の2乗距離d2⊥は、次のように表すことができる。 U ′ is a transposed matrix of the matrix U, and I M is an M-th unit matrix. The square distance in the orthogonal complement space, that is, the square distance d 2の of the perpendicular to the subspace U can be expressed as follows.

Figure 2011014152
Figure 2011014152

本実施例においては、この垂直距離d⊥を異常であるか否かの指標として採用可能である。但し、上記した垂直距離d⊥はスケール(特徴ベクトルのノルム)により変化する指標である。従って、スケールの違いによって異なる判定結果が出る恐れがある。そこで、他の指標として、以下に示す、よりスケールロバストな指標を採用してもよい。   In the present embodiment, this vertical distance d⊥ can be used as an indicator of whether or not it is abnormal. However, the above-mentioned vertical distance d 指標 is an index that varies depending on the scale (norm of the feature vector). Therefore, there is a risk that different determination results may be obtained depending on the difference in scale. Therefore, as another index, the following more robust index may be adopted.

まず部分空間Sとの角度、即ちsinθを指標とする場合を考える。しかし、この指標はノイズなどのスケールが非常に小さい特徴に対しても非常に大きな値が出る指標であり、あまり適切な指標ではない。そこで、スケールが小さい場合でも小さい値とするために、この指標を次のように変更する。   First, consider the case where the angle with the subspace S, that is, sin θ is used as an index. However, this index is an index that gives a very large value even for features with a very small scale such as noise, and is not a very appropriate index. Therefore, in order to obtain a small value even when the scale is small, this index is changed as follows.

Figure 2011014152
Figure 2011014152

ここでcは正の定数である。この指標により異常判定値はスケールに対して補正され、ノイズにも強い指標となる。この指標は、図8のグラフ上では原点から−cだけ横軸方向にずらした点からの角度を測ることを意味する。   Here, c is a positive constant. With this index, the abnormality determination value is corrected with respect to the scale and becomes an index that is also resistant to noise. This index means that an angle from a point shifted in the horizontal axis direction by −c from the origin on the graph of FIG. 8 is measured.

S19においては、距離d⊥が所定の閾値を越えたか否かが判定され、判定結果が否定の場合にはS20に移行するが、肯定の場合にはS21に移行する。S20においては正常と判定する。また、S21においては異常と判定する。S22においては、全ての画素について判定処理が完了したか否かが判定され、判定結果が否定の場合にはS18に移行するが、肯定の場合にはS23に移行する。S23においては、判定結果を出力する。   In S19, it is determined whether or not the distance d⊥ exceeds a predetermined threshold value. If the determination result is negative, the process proceeds to S20, but if the determination result is affirmative, the process proceeds to S21. In S20, it is determined as normal. Moreover, in S21, it determines with it being abnormal. In S22, it is determined whether or not the determination process has been completed for all the pixels. If the determination result is negative, the process proceeds to S18, but if the determination is affirmative, the process proceeds to S23. In S23, the determination result is output.

図6は、S11の画素対応HLACデータ生成処理の内容を示すフローチャートである。S30においては、相関パターン対応特徴値をクリアする。S31においては、未処理の画素(参照点)を1つ選択する。S32においては、未処理のパターンを1つ選択する。S33においては、相関パターンおよび変位幅λに基づいて、前記した数式1を用いてパターンと対応する位置の画素輝度値を乗算して相関値を計算する。なお、この処理は前記した数式1におけるf(r)f(r+a1)…f(r+aN)の演算に相当する。   FIG. 6 is a flowchart showing the contents of the pixel-corresponding HLAC data generation process of S11. In S30, the correlation pattern corresponding feature value is cleared. In S31, one unprocessed pixel (reference point) is selected. In S32, one unprocessed pattern is selected. In S33, based on the correlation pattern and the displacement width λ, the correlation value is calculated by multiplying the pixel luminance value at the position corresponding to the pattern by using Equation 1 described above. This process corresponds to the calculation of f (r) f (r + a1)... F (r + aN) in the above-described equation 1.

S34においては、相関値を相関パターン対応に保存する。S35においては、全てのパターンについて処理が完了したか否かが判定され、判定結果が否定の場合にはS32に移行するが、肯定の場合にはS36に移行する。S36においては、相関値群を画素対応に保存する。S37においては、全ての画素について処理が完了したか否かが判定され、判定結果が否定の場合にはS31に移行するが、肯定の場合にはS38に移行する。S38においては、相関値群の集合を画素対応HLACデータとして出力する。   In S34, the correlation value is stored in correspondence with the correlation pattern. In S35, it is determined whether or not processing has been completed for all patterns. If the determination result is negative, the process proceeds to S32, but if the determination is affirmative, the process proceeds to S36. In S36, the correlation value group is stored for each pixel. In S37, it is determined whether or not the processing has been completed for all pixels. If the determination result is negative, the process proceeds to S31, but if the determination is affirmative, the process proceeds to S38. In S38, a set of correlation value groups is output as pixel-corresponding HLAC data.

図7は、S12のHLAC特徴データ生成処理の内容を示すフローチャートである。S40においては、未処理の画素(参照点)を1つ選択する。選択方法は全ての画素をスキャンしてもよいが、画像のXY座標上で2画素以上の所定の距離だけ離れた画素ごとに選択(サンプリング)するようにしてもよい。このようにすれば、処理量が軽減される。   FIG. 7 is a flowchart showing the contents of the HLAC feature data generation process of S12. In S40, one unprocessed pixel (reference point) is selected. Although all pixels may be scanned as a selection method, selection (sampling) may be performed for each pixel separated by a predetermined distance of 2 pixels or more on the XY coordinates of the image. In this way, the processing amount is reduced.

S41においては、参照点を中心とする所定の領域の画素対応HLACデータを加算する。所定の領域は例えば注目画素を含む(中心とする)10×10であってもよい。なお、この処理は、前記した数式1において、注目画素を所望の範囲だけ移動(スキャン)させて相関値を足し合わせる(次元毎に相関値を加算する)積分操作に相当する。   In S41, pixel-corresponding HLAC data in a predetermined area centered on the reference point is added. The predetermined area may be, for example, 10 × 10 including the pixel of interest (centered). This processing corresponds to the integration operation in Equation 1 described above, in which the pixel of interest is moved (scanned) by a desired range and the correlation values are added (correlation values are added for each dimension).

S42においては、加算されたデータを画素対応に保存する。S43においては、全ての画素について処理が完了したか否かが判定され、判定結果が否定の場合にはS40に移行するが、肯定の場合にはS44に移行する。S44においては、特徴加算値の集合を画素対応HLAC特徴データとして出力する。   In S42, the added data is stored in correspondence with the pixels. In S43, it is determined whether or not processing has been completed for all pixels. If the determination result is negative, the process proceeds to S40, but if the determination is affirmative, the process proceeds to S44. In S44, the set of feature addition values is output as pixel-corresponding HLAC feature data.

図9は、入力画像および異常判定結果を表す画像を示す説明図である。図9(a)は入力された濃淡画像を表し、図9(b)は、本発明の方式により処理した画素ごとの異常指標値を、最大値を255、最小値を0として正規化した濃淡画像を表す。中央の欠陥部分の指標値が大きく(白く)なっており、欠陥が検出されていることが判る。   FIG. 9 is an explanatory diagram illustrating an input image and an image representing an abnormality determination result. FIG. 9A shows the input grayscale image, and FIG. 9B shows the grayscale obtained by normalizing the abnormal index value for each pixel processed by the method of the present invention with the maximum value being 255 and the minimum value being 0. Represents an image. The index value of the central defect portion is large (white), indicating that a defect has been detected.

実施例1においては、画像全体から正常領域の部分空間を求めているが、実施例2においては、例えば直線状の配線のある領域と丸いパターンが多数存在する領域とが混在しているような場合に、領域を直線状の配線のある領域と丸いパターンが多数存在する領域とにクラス分けし、各クラス毎に正常領域の部分空間を求めて異常判定を行う。このようにすることにより、判定精度が向上する。   In the first embodiment, the partial space of the normal region is obtained from the entire image. However, in the second embodiment, for example, a region having a straight wiring and a region having many round patterns are mixed. In this case, the region is classified into a region having a straight line and a region having a large number of round patterns, and abnormality determination is performed by obtaining a partial space of a normal region for each class. By doing so, the determination accuracy is improved.

まず、主成分分析手法あるいは逐次的主成分分析手法により全HLACデータおよび画素対応HLAC特徴データからそれぞれ主成分ベクトルを求める。次に、求めた2つの主成分ベクトルの正準角を求め、正準角に基づく類似度によって画素をクラスに分ける。   First, a principal component vector is obtained from all HLAC data and pixel-corresponding HLAC feature data by a principal component analysis method or a sequential principal component analysis method. Next, the canonical angles of the two obtained principal component vectors are obtained, and the pixels are classified into classes according to the similarity based on the canonical angles.

正準角とは、統計学において二つの部分空間のなす角度を意味し、M次元部分空間とN次元部分空間の間にはN(≦M)個の正準角が定義できる。第2正凖角θ2は最小正準角θ1に直交する方向において測った最小角、同様に第3正準角θ3はθ2とθ1に直交した方向で測った最小角となる。F次元特徴空間における部分空間L1とL2の基底ベクトルをΦi、Ψi、これらから計算されるF×Fの射影行列を下記に示す。 The canonical angle means an angle formed by two subspaces in statistics, and N (≦ M) canonical angles can be defined between the M-dimensional subspace and the N-dimensional subspace. The second canonical angle θ 2 is the minimum angle measured in the direction orthogonal to the minimum canonical angle θ 1 , and similarly the third canonical angle θ 3 is the minimum angle measured in the direction orthogonal to θ 2 and θ 1. . The basis vectors of the subspaces L 1 and L 2 in the F-dimensional feature space are Φ i and ψ i , and the F × F projection matrix calculated from these is shown below.

Figure 2011014152
Figure 2011014152

12あるいはP21のi番目に大きい固有値λがcos2θiとなる。M次元部分空間L1とN次元部分空間L2の関係はN個の正準角により完全に規定される。二つの部分空間が完全に一致している場合にはN個の正準角はすべて0度となる。両者が離れるにつれて下位の正準角から大きくなり、両者が完全に直交するときにすべての角度が90度となる。このように複数の正準角は二つの部分空間の構造的な類似度を表す。そこでn(≦N)個の正準角を用いて類似度S[n]を以下のように定義し、この指標を用いる。 The i-th largest eigenvalue λ i of P 1 P 2 or P 2 P 1 is cos 2 θ i . The relationship between the M-dimensional subspace L 1 and the N-dimensional subspace L 2 is completely defined by N canonical angles. If the two subspaces are completely coincident, all N canonical angles are 0 degrees. As the distance between them increases, the lower canonical angle increases, and when they are completely orthogonal, all angles are 90 degrees. Thus, a plurality of canonical angles represents the structural similarity between the two subspaces. Therefore, the similarity S [n] is defined as follows using n (≦ N) canonical angles, and this index is used.

Figure 2011014152
Figure 2011014152

次に、正準角の類似度によって求めた指標値について、Mean Shift法を用いてクラスタリングを行う。Mean Shift法の内容については下記の非特許文献2に開示されている。Mean Shift法は、クラス数を与えないクラスタリング手法であり、どの程度の近傍を近いものとするかのスケールパラメータを設定する必要がある。本実施例においては、0から1の間の値しか持たない正準角の類似度を指標としているため、およそ0.1程度のスケールパラメータとする。
Dorin Comaniciu and Peter Meer. Mean shift:A robust approach toward feature space analysis.IEEE Transactions on Pattern Analysis and Machine Intelligence,Vol.24, No.5, pp.603-619, 2002。
Next, clustering is performed using the Mean Shift method on the index value obtained by the similarity of the canonical angle. The contents of the Mean Shift method are disclosed in Non-Patent Document 2 below. The Mean Shift method is a clustering method that does not give the number of classes, and it is necessary to set a scale parameter indicating how close the neighborhood is. In this embodiment, since the similarity of the canonical angle having a value between 0 and 1 is used as an index, the scale parameter is set to about 0.1.
Dorin Comaniciu and Peter Meer. Mean shift: A robust approach toward feature space analysis. IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 24, No. 5, pp. 603-619, 2002.

最後に、クラス毎に画素対応HLACデータを加算し、加算されたHLAC特徴データから前記したような主成分分析手法あるいは逐次主成分分析手法でクラス毎の主成分ベクトルを求め、クラス毎の正常領域の部分空間とする。そして、画素対応HLAC特徴データと、判定されたクラスと対応する正常領域の部分空間との距離によって異常判定を行う。   Finally, pixel-corresponding HLAC data is added for each class, the principal component vector for each class is obtained from the added HLAC feature data by the principal component analysis method or the sequential principal component analysis method as described above, and the normal region for each class The subspace of Then, the abnormality determination is performed based on the distance between the pixel-corresponding HLAC feature data and the partial space of the normal region corresponding to the determined class.

以上、異常領域の検出を行う実施例について説明したが、本発明には以下のような変形例も考えられる。実施例においては、正常領域の部分空間を更新しながら異常領域の検出を行う例を開示したが、学習フェーズによって予め正常領域の部分空間を生成しておき、固定した部分空間を使用して異常領域の検出を行ってもよい。更に、ランダムサンプリングなどによって少量のデータを前もって学習しておいてもよい。   Although the embodiment for detecting an abnormal region has been described above, the following modifications may be considered in the present invention. In the embodiment, an example in which an abnormal region is detected while updating a partial space of a normal region has been disclosed. However, a normal region partial space is generated in advance by a learning phase, and an abnormality is detected using a fixed partial space. An area may be detected. Furthermore, a small amount of data may be learned in advance by random sampling or the like.

実施例においては、画素毎に特徴データを生成する例を開示したが、位置が近接する特徴データほど類似している。従って、例えば図9に示す処理を所定の距離だけ離れた画素毎に行うことにより、処理負荷が軽くなり、より高速に領域させることができる。但しこの方法は場所を特定する、あるいは検出精度という課題とトレードオフであり、各課題に対して適切な設定が必要である。   In the embodiment, an example in which feature data is generated for each pixel has been disclosed. However, feature data closer in position are more similar. Therefore, for example, by performing the process shown in FIG. 9 for each pixel separated by a predetermined distance, the processing load is reduced and the area can be made faster. However, this method is a trade-off with the problem of specifying the location or the detection accuracy, and an appropriate setting is required for each problem.

実施例においては、スケールを制御するパラメータであるλとして画素の整数倍の値を使用する例を開示したが、λとしては小数点以下も含む任意の実数値を採用可能である。但し、実数値の場合には画素値の補間演算が必要である。また、画像を小数点以下も含む任意の倍率で拡大縮小処理してから特徴抽出するようにしてもよい。   In the embodiment, an example in which a value that is an integer multiple of a pixel is used as λ, which is a parameter for controlling the scale, is disclosed, but any real value including a decimal point can be used as λ. However, pixel values need to be interpolated in the case of real values. Further, the feature may be extracted after the image is enlarged / reduced at an arbitrary magnification including a decimal point.

10…デジタルカメラ
11…コンピュータ
12…モニタ装置
13…キーボード
14…マウス
DESCRIPTION OF SYMBOLS 10 ... Digital camera 11 ... Computer 12 ... Monitor apparatus 13 ... Keyboard 14 ... Mouse

Claims (6)

画像データから画素毎に、予め定められた複数の相関パターンのそれぞれに基づいてパターンと対応する複数位置の画素輝度値同士を乗算することによって相関パターンの数と対応するデータの集合を生成する高次局所自己相関によって特徴データを抽出する特徴データ抽出手段と、
前記画像データの所定の距離だけ離れた画素毎に、その画素を含む所定の範囲の画素群について前記特徴データ抽出手段によって抽出された前記特徴データを加算して画素対応特徴データを生成する画素対応特徴データ生成手段と、
前記特徴データ抽出手段によって抽出された特徴データから主成分分析手法により主成分ベクトルに基づき正常領域を示す部分空間を求める正常部分空間生成手段と、
前記正常領域を示す部分空間に対する前記画素対応特徴データの異常さを示す指標であって、前記画素対応特徴データと前記正常領域を示す部分空間との距離あるいは角度の情報のいずれかを含んでいる指標を計算する指標計算手段と、
前記指標が所定値よりも大きい場合に異常と判定する異常判定手段と、
前記異常判定手段が異常と判定した画素位置を異常とする判定結果を出力する出力手段と
を備えたことを特徴とする異常領域検出装置。
For each pixel from image data, a high number of sets of data corresponding to the number of correlation patterns is generated by multiplying pixel luminance values at a plurality of positions corresponding to the pattern based on each of a plurality of predetermined correlation patterns. Feature data extraction means for extracting feature data by next local autocorrelation;
For each pixel separated by a predetermined distance in the image data, pixel-corresponding feature data is generated by adding the feature data extracted by the feature data extraction unit for a pixel group in a predetermined range including the pixel. Feature data generation means;
A normal subspace generating means for obtaining a subspace indicating a normal area based on a principal component vector from a feature data extracted by the feature data extracting means by a principal component analysis method;
This is an index indicating the abnormality of the pixel-corresponding feature data with respect to the partial space indicating the normal region, and includes either distance or angle information between the pixel-corresponding feature data and the partial space indicating the normal region. An index calculation means for calculating an index;
Abnormality determining means for determining an abnormality when the index is greater than a predetermined value;
An abnormality area detection apparatus comprising: output means for outputting a determination result that makes the pixel position determined abnormal by the abnormality determination means abnormal.
前記特徴データ抽出手段は、変位幅の異なる複数の高次局所自己相関特徴データを抽出することを特徴とする請求項1に記載の異常領域検出装置。   The abnormal region detection apparatus according to claim 1, wherein the feature data extraction unit extracts a plurality of higher-order local autocorrelation feature data having different displacement widths. 前記画像データはグレースケールの濃淡画像であることを特徴とする請求項1に記載の異常領域検出装置。 The abnormal area detection apparatus according to claim 1, wherein the image data is a grayscale grayscale image. 前記正常部分空間生成手段は、次元に上限値を設けた逐次的主成分分析手法により主成分ベクトルに基づく部分空間を求めることを特徴とする請求項1に記載の異常領域検出装置。   2. The abnormal region detection apparatus according to claim 1, wherein the normal subspace generation unit obtains a subspace based on a principal component vector by a sequential principal component analysis method in which an upper limit value is provided for a dimension. 更に、前記画素対応特徴データ生成手段によって生成された画素対応特徴データから得られる部分空間と前記正常領域を示す部分空間との正準角に基づく類似度の指標を求め、クラスタリング手法を用いて画素毎にクラス分けするクラス分け手段と、
前記特徴データ抽出手段によって抽出された特徴データを前記クラス毎に加算し、主成分分析手法により主成分ベクトルに基づく正常領域を示す部分空間をクラス毎に求めるクラス部分空間生成手段とを備え、
前記指標計算手段は、前記正常領域を示すクラス対応の部分空間に対して、前記画素対応特徴データ生成手段により生成された特徴データの異常さを示す指標として特徴データと前記クラス対応の部分空間との距離あるいは角度の情報のいずれかを計算する
ことを特徴とする請求項1に記載の異常領域検出装置。
Further, an index of similarity based on a canonical angle between the partial space obtained from the pixel-corresponding feature data generated by the pixel-corresponding feature data generating unit and the partial space indicating the normal region is obtained, and a pixel is obtained using a clustering method. Classifying means for classifying every time,
Class subspace generation means for adding the feature data extracted by the feature data extraction means for each class, and obtaining a subspace for each class indicating a normal area based on a principal component vector by a principal component analysis method,
The index calculation means includes feature data as an index indicating abnormality of feature data generated by the pixel-corresponding feature data generation means with respect to a class-corresponding partial space indicating the normal area, The abnormal region detection device according to claim 1, wherein either the distance information or the angle information is calculated.
コンピュータが、画像データから画素毎に、予め定められた複数の相関パターンのそれぞれに基づいてパターンと対応する複数位置の画素輝度値同士を乗算することによって相関パターンの数と対応するデータの集合を生成する高次局所自己相関によって特徴データを抽出するステップ、
コンピュータが、前記画像データの所定の距離だけ離れた画素毎に、その画素を含む所定の範囲の画素群について前記特徴データ抽出手段によって抽出された前記特徴データを加算して画素対応特徴データを生成するステップ、
コンピュータが、前記特徴データ抽出手段によって抽出された特徴データを加算した全特徴データから主成分分析手法により主成分ベクトルに基づき正常領域を示す部分空間を求めるステップ、
コンピュータが、前記正常領域を示す部分空間に対する前記画素対応特徴データの異常さを示す指標であって、前記画素対応特徴データと前記正常領域を示す部分空間との距離あるいは角度の情報のいずれかを含んでいる指標を計算するステップ、
コンピュータが、前記指標が所定値よりも大きい場合に異常と判定するステップ、
コンピュータが、前記異常と判定した画素位置を異常とする判定結果を出力するステップ
を含むことを特徴とする異常領域検出方法。
For each pixel from the image data, the computer multiplies pixel luminance values at a plurality of positions corresponding to the pattern based on each of a plurality of predetermined correlation patterns to obtain a set of data corresponding to the number of correlation patterns. Extracting feature data by higher order local autocorrelation to generate,
A computer generates pixel-corresponding feature data by adding the feature data extracted by the feature data extraction unit for a pixel group in a predetermined range including the pixel for each pixel separated by a predetermined distance in the image data. Step to do,
A step of obtaining a partial space indicating a normal region based on a principal component vector by a principal component analysis method from all feature data obtained by adding the feature data extracted by the feature data extraction means;
The computer is an index indicating abnormality of the pixel-corresponding feature data with respect to the partial space indicating the normal region, and information on either distance or angle between the pixel-corresponding feature data and the partial space indicating the normal region Calculating the metrics it contains,
A step of determining that the computer is abnormal when the index is larger than a predetermined value;
A method for detecting an abnormal region, comprising: a step of outputting a determination result that the computer determines that the pixel position determined to be abnormal is abnormal.
JP2010186217A 2010-08-23 2010-08-23 Abnormal region detection apparatus and abnormal region detection method Active JP4728444B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010186217A JP4728444B2 (en) 2010-08-23 2010-08-23 Abnormal region detection apparatus and abnormal region detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010186217A JP4728444B2 (en) 2010-08-23 2010-08-23 Abnormal region detection apparatus and abnormal region detection method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2006167961A Division JP4603512B2 (en) 2006-06-16 2006-06-16 Abnormal region detection apparatus and abnormal region detection method

Publications (2)

Publication Number Publication Date
JP2011014152A true JP2011014152A (en) 2011-01-20
JP4728444B2 JP4728444B2 (en) 2011-07-20

Family

ID=43592910

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010186217A Active JP4728444B2 (en) 2010-08-23 2010-08-23 Abnormal region detection apparatus and abnormal region detection method

Country Status (1)

Country Link
JP (1) JP4728444B2 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013076927A1 (en) * 2011-11-24 2013-05-30 パナソニック株式会社 Diagnosis assistance apparatus and diagnosis assistance method
WO2016088758A1 (en) * 2014-12-01 2016-06-09 国立研究開発法人産業技術総合研究所 Ultrasound examination system and ultrasound examination method
JP2016181098A (en) * 2015-03-24 2016-10-13 株式会社Screenホールディングス Area detection device and area detection method
WO2018225745A1 (en) * 2017-06-06 2018-12-13 株式会社デンソー External appearance examination device, conversion data generation device, and program
CN111913081A (en) * 2020-07-14 2020-11-10 上海电力大学 Mean shift clustering-based abnormal detection method for insulation state of switch cabinet
CN112164223A (en) * 2020-02-27 2021-01-01 周国霞 Intelligent traffic information processing method and device based on cloud platform
CN113554605A (en) * 2021-07-07 2021-10-26 常州大学 Fabric abnormal area detection method based on feature matching
CN116630332A (en) * 2023-07-26 2023-08-22 山东华航高分子材料有限公司 PVC plastic pipe orifice defect detection method based on image processing

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09171552A (en) * 1995-10-18 1997-06-30 Fuji Xerox Co Ltd Picture recognizing device
JP2005092346A (en) * 2003-09-12 2005-04-07 National Institute Of Advanced Industrial & Technology Characteristic extraction method from three-dimensional data and device
JP2005209155A (en) * 2003-12-10 2005-08-04 Nissan Motor Co Ltd Motion detector and motion detection method
JP2006098152A (en) * 2004-09-29 2006-04-13 Dainippon Screen Mfg Co Ltd Apparatus and method for detecting defect

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09171552A (en) * 1995-10-18 1997-06-30 Fuji Xerox Co Ltd Picture recognizing device
JP2005092346A (en) * 2003-09-12 2005-04-07 National Institute Of Advanced Industrial & Technology Characteristic extraction method from three-dimensional data and device
JP2005209155A (en) * 2003-12-10 2005-08-04 Nissan Motor Co Ltd Motion detector and motion detection method
JP2006098152A (en) * 2004-09-29 2006-04-13 Dainippon Screen Mfg Co Ltd Apparatus and method for detecting defect

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5607839B2 (en) * 2011-11-24 2014-10-15 パナソニック株式会社 Diagnosis support apparatus and diagnosis support method
US9330455B2 (en) 2011-11-24 2016-05-03 Panasonic Intellectual Property Management Co., Ltd. Diagnostic support apparatus and diagnostic support method
WO2013076927A1 (en) * 2011-11-24 2013-05-30 パナソニック株式会社 Diagnosis assistance apparatus and diagnosis assistance method
KR102014104B1 (en) 2014-12-01 2019-08-26 고쿠리츠켄큐카이하츠호진 상교기쥬츠 소고켄큐쇼 Ultrasound examination system and ultrasound examination method
WO2016088758A1 (en) * 2014-12-01 2016-06-09 国立研究開発法人産業技術総合研究所 Ultrasound examination system and ultrasound examination method
JPWO2016088758A1 (en) * 2014-12-01 2017-06-29 国立研究開発法人産業技術総合研究所 Ultrasonic inspection system and ultrasonic inspection method
KR20170082630A (en) * 2014-12-01 2017-07-14 고쿠리츠켄큐카이하츠호진 상교기쥬츠 소고켄큐쇼 Ultrasound examination system and ultrasound examination method
US10786227B2 (en) 2014-12-01 2020-09-29 National Institute Of Advanced Industrial Science And Technology System and method for ultrasound examination
JP2016181098A (en) * 2015-03-24 2016-10-13 株式会社Screenホールディングス Area detection device and area detection method
JP2018205163A (en) * 2017-06-06 2018-12-27 株式会社デンソー Visual inspection device, conversion data generator, and program
WO2018225745A1 (en) * 2017-06-06 2018-12-13 株式会社デンソー External appearance examination device, conversion data generation device, and program
CN112164223A (en) * 2020-02-27 2021-01-01 周国霞 Intelligent traffic information processing method and device based on cloud platform
CN112164223B (en) * 2020-02-27 2022-04-29 浙江恒隆智慧科技集团有限公司 Intelligent traffic information processing method and device based on cloud platform
CN111913081A (en) * 2020-07-14 2020-11-10 上海电力大学 Mean shift clustering-based abnormal detection method for insulation state of switch cabinet
CN113554605A (en) * 2021-07-07 2021-10-26 常州大学 Fabric abnormal area detection method based on feature matching
CN113554605B (en) * 2021-07-07 2023-09-26 常州大学 Fabric abnormal region detection method based on feature matching
CN116630332A (en) * 2023-07-26 2023-08-22 山东华航高分子材料有限公司 PVC plastic pipe orifice defect detection method based on image processing
CN116630332B (en) * 2023-07-26 2023-09-26 山东华航高分子材料有限公司 PVC plastic pipe orifice defect detection method based on image processing

Also Published As

Publication number Publication date
JP4728444B2 (en) 2011-07-20

Similar Documents

Publication Publication Date Title
JP4603512B2 (en) Abnormal region detection apparatus and abnormal region detection method
JP4728444B2 (en) Abnormal region detection apparatus and abnormal region detection method
TWI750553B (en) Method of defect detection on a specimen and system thereof
JP4215781B2 (en) Abnormal operation detection device and abnormal operation detection method
CN107111872B (en) Information processing apparatus, information processing method, and storage medium
JP2012032370A (en) Defect detection method, defect detection apparatus, learning method, program, and recording medium
US8542912B2 (en) Determining the uniqueness of a model for machine vision
JP2019061484A (en) Image processing device and control method thereof and program
Oszust No-reference image quality assessment using image statistics and robust feature descriptors
CN108182449A (en) A kind of hyperspectral image classification method
US11915406B2 (en) Generating training data usable for examination of a semiconductor specimen
JP7027978B2 (en) Inspection equipment, inspection method, and inspection program
CN110135514B (en) Workpiece classification method, device, equipment and medium
US6993177B1 (en) Gauging based on global alignment and sub-models
US11816946B2 (en) Image based novelty detection of material samples
JP2006039658A (en) Image classification learning processing system and image identification processing system
Kiruthika et al. Matching of different rice grains using digital image processing
Pramunendar et al. Fish classification based on underwater image interpolation and back-propagation neural network
US8542905B2 (en) Determining the uniqueness of a model for machine vision
CN111221996A (en) Instrument screen visual detection method and system
Wang et al. Local defect detection and print quality assessment
CN114202665A (en) Image similarity determining method and device, equipment and storage medium
WO2015136716A1 (en) Image processing device, image sensor, and image processing method
Yang et al. Image quality assessment via multiple features
JP2020071716A (en) Abnormality determination method, feature quantity calculation method, and appearance inspection device

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110106

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110306

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: 20110325

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110414

R150 Certificate of patent or registration of utility model

Ref document number: 4728444

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20140422

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140422

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250