JP4018089B2 - Method for generating data map for determining surface condition and determination method - Google Patents
Method for generating data map for determining surface condition and determination method Download PDFInfo
- Publication number
- JP4018089B2 JP4018089B2 JP2004226658A JP2004226658A JP4018089B2 JP 4018089 B2 JP4018089 B2 JP 4018089B2 JP 2004226658 A JP2004226658 A JP 2004226658A JP 2004226658 A JP2004226658 A JP 2004226658A JP 4018089 B2 JP4018089 B2 JP 4018089B2
- Authority
- JP
- Japan
- Prior art keywords
- region
- determination
- area
- inspection
- feature vector
- 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.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
Landscapes
- Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computing Systems (AREA)
- Artificial Intelligence (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
Description
この発明は、検査対象物の表面状態を画像分析により判定する技術に関する。 The present invention relates to a technique for determining the surface state of an inspection object by image analysis.
ギアその他の加工品の表面の傷その他の表面状態の検査は、目視によって行われることが多いが、作業が単純である反面、集中力を必要とし、困難な作業とされている。このため、目視に依存することなくギアその他の加工品の検査を行うことのできる装置が必要とされている。 Inspection of scratches and other surface conditions on the surface of gears and other processed products is often performed by visual inspection. However, while the operation is simple, it requires concentration and is difficult. Therefore, there is a need for an apparatus that can inspect gears and other processed products without depending on visual observation.
特許文献1には、ギア歯面を撮影し、得られた画像の輝度を評価してギア歯面の打痕等の傷の有無を判別する方法が記載されている。1つのギアについて所定の間隔をおいて検査すべきギア歯面およびその歯面と異なるギア歯面を撮影して異なる歯面に関する実質的に同一方向からの複数の画像を作成し、画像間の輝度の差を表す差分画像を作成する。この差分画像を加算して加算画像を作成し、加算画像の輝度と基準値とを比較することにより、打痕の有無を判別する。 Japanese Patent Application Laid-Open No. 2004-228561 describes a method of determining the presence or absence of scratches such as dents on the gear tooth surface by photographing the gear tooth surface and evaluating the luminance of the obtained image. A gear tooth surface to be inspected and a gear tooth surface different from the tooth surface to be inspected at a predetermined interval with respect to one gear are created to create a plurality of images from substantially the same direction regarding the different tooth surfaces. A difference image representing a luminance difference is created. The difference image is added to create an added image, and the presence or absence of a dent is determined by comparing the luminance of the added image with a reference value.
特許文献2には、ニューラルネットワークを用いて対象物の画像から自己組織化マップを作成し、同じ画像に対応するニューロンのクラスタを形成し、このクラスターを用いて対象物の画像の認証を行う手法が記載されている。 Japanese Patent Application Laid-Open No. 2004-228561 creates a self-organizing map from an image of an object using a neural network, forms a cluster of neurons corresponding to the same image, and authenticates the image of the object using this cluster Is described.
特許文献3には、最初に複数の検査対象物の画像から、画像を構成するすべての画素の一と輝度値を入力データとして自己組織化マップを作成し、この自己組織化マップをマスタデータとして検査対象画像とマスタデータとの適合度により良否判定する手法が記載されている。
特許文献1に記載される技術では、ギアその他の加工品の表面の色ムラや切削痕など傷ではないが他の画像領域と輝度の異なる領域(以下、過検出、または過検出領域と呼ぶ)を多く検出してしまい、この中から傷その他の表面状態を検出するために相当な目視作業を必要とすることになる。この発明は、自動装置による傷検出の精度を向上させ、目視による判定の労力を軽減させることができる手法を提供する。
In the technique described in
特許文献2に記載される手法は、対象物、たとえば人の認証であり、たとえばギアのような加工品の表面状態判定には適さない。
The technique described in
また、特許文献3に記載される手法は、検査対象画像の一部分をマスタデータと比較し、その差に基づいて良否判定するもので、検査対象ごとにマスタデータが必要となり、検査対象について良品の形状が確定していることが前提条件になる。ギア面などの対象物の検査においては、良品とみなされる過検出(表面の色ムラやゴミ)は不規則で多様な形状をしており、このような前提条件を満足しない。したがって、特許文献3の手法をギアなどの対象物の検査に適用することはできない。
In addition, the technique described in
この発明は、一形態(請求項1)においては、同様のテクスチャの構成単位を連続的に複数有する対象物の表面状態を判定するためのデータマップを生成する方法を提供する。この方法は、要判定領域を含む検査領域の複数のサンプルを用意するステップと、前記サンプルから特徴ベクトルを抽出するステップと、前記特徴ベクトルを自己組織化マップに入力し、学習させるステップと、を含む。この方法は、さらに、前記学習した自己組織化マップにおいて同じ前記サンプルのそれぞれに対応し隣接するニューロンをグループ化してクラスタにするステップと、前記クラスタのそれぞれを傷、打痕、剥離など所定の表面状態に対応するものとそうでないものとに分類して判定データマップを生成するステップと、を含む。 In one form (claim 1), this invention provides the method of producing | generating the data map for determining the surface state of the target object which has a plurality of the same structural units of the texture continuously. The method includes the steps of preparing a plurality of samples of an examination region including a determination required region, extracting a feature vector from the sample, inputting the feature vector into a self-organizing map, and learning. Including. The method further includes the steps of grouping adjacent neurons corresponding to each of the same sample in the learned self-organizing map into clusters, and each of the clusters having a predetermined surface, such as a scratch, a dent, and an exfoliation. Generating a determination data map by classifying it into one corresponding to a state and one not corresponding to a state.
この発明によると、同様のテクスチャ(表面の組織の地、模様など)の構成単位を連続的に複数有する対象物の表面状態を自動的に判定するためのデータマップをニューラルネットワークの自己組織化学習を利用して生成するので、信頼性の高い判定データマップを得ることができる。 According to the present invention, a data map for automatically determining the surface state of an object having a plurality of structural units of the same texture (surface texture, pattern, etc.) of the same texture is automatically learned by a neural network. Therefore, a highly reliable determination data map can be obtained.
この発明の一形態(請求項2)では、判定データマップのクラスタは、所定の表面状態と過検出(表面のムラ、汚れなど)とに分類される。 In one embodiment of the present invention (claim 2), the clusters in the determination data map are classified into predetermined surface states and overdetection (surface unevenness, dirt, etc.).
また、この発明のもう一つの形態(請求項3)では、対象物はギアであり、特徴ベクトルは、要判定領域の面積、この領域の傾き、検査領域の輝度値エントロピー、検査領域の輝度値アニソトロピー、検査領域のエッジ画像の平均輝度、および要判定領域の円形度、のうちの一つまたは複数を含む。これらのパラメータを用いて特徴ベクトルを生成することにより、信頼性の高い判定データマップを生成することができる。 According to another aspect of the present invention (claim 3), the object is a gear, and the feature vector includes the area of the determination target area, the inclination of the area, the luminance value entropy of the inspection area, and the luminance value of the inspection area. One or more of anisotropy, average luminance of the edge image of the inspection area, and circularity of the determination required area are included. By generating a feature vector using these parameters, a highly reliable determination data map can be generated.
この発明は、もう一つの形態(請求項4)は、上記のデータマップを用いて対象物の表面状態を判定する方法を提供する。この方法は、前記対象物を相対的に回転させて、前記構成単位の画像を順次撮像するステップと、前記撮像手段から取得した画像において、今回の画像と前回の画像との差分をとるステップと、前記差分手段によって生成された差分画像において、予め定めたしきい値を超える輝度の要判定領域を検出し、該領域を囲む検査領域を特定するステップと、を含む。この方法は、さらに、前記検査領域から特徴ベクトルを抽出するステップと、前記特徴ベクトルと前記判定データマップの各ニューロンの結合係数ベクトルとの距離を演算するステップと、前記距離が小さいニューロンが隣接した領域を求めるステップと、前記隣接した領域における所定の表面状態のクラスタに属するニューロンの数に基づいて表面状態の判定を行うステップと、を含む。 According to another aspect (claim 4) of the present invention, there is provided a method for determining the surface state of an object using the data map. In this method, the target object is relatively rotated to sequentially capture the image of the structural unit, and the difference between the current image and the previous image is obtained in the image acquired from the imaging means; Detecting a determination required area having a luminance exceeding a predetermined threshold in the difference image generated by the difference means, and specifying an inspection area surrounding the area. The method further includes a step of extracting a feature vector from the examination region, a step of calculating a distance between the feature vector and a coupling coefficient vector of each neuron of the determination data map, and a neuron having a small distance adjacent to each other Determining a region, and determining a surface state based on the number of neurons belonging to a cluster of a predetermined surface state in the adjacent region.
この方法によると、要判定領域のサンプルを学習して生成された判定データマップを用いて、特徴ベクトルと該マップの各ニューロンの結合係数ベクトルとの距離演算に基づいて表面状態の判定をおこなうので、信頼性の高い判定を行うことができる。 According to this method, the determination of the surface state is performed based on the distance calculation between the feature vector and the coupling coefficient vector of each neuron of the map using the determination data map generated by learning the sample of the determination required region. A highly reliable determination can be made.
この発明の実施形態(請求項5)においては、前記表面状態の判定を行うステップは、前記隣接した領域における所定の表面状態クラスタに属するニューロンの数と該隣接した領域におけるニューロンの総数との比が予め定めた値以上であるとき、表面状態の判定を行う。 In an embodiment of the present invention (Claim 5), the step of determining the surface state is a ratio between the number of neurons belonging to a predetermined surface state cluster in the adjacent region and the total number of neurons in the adjacent region. When is equal to or greater than a predetermined value, the surface state is determined.
この発明の実施形態(請求項6)では、対象物はギアであり、特徴ベクトルは、要判定領域の面積、該領域の傾き、前記検査領域の輝度値エントロピー、該検査領域の輝度値アニソトロピー、該検査領域のエッジ画像の平均輝度、および要判定領域の円形度、のうちの一つまたは複数を含む。これらのパラメータを用いて特徴ベクトルを抽出することにより、信頼性の高い表面状態判定を行うことができる。 In an embodiment of the present invention (Claim 6), the object is a gear, and the feature vector includes an area of a determination required region, an inclination of the region, a luminance value entropy of the inspection region, a luminance value anisotropy of the inspection region, One or more of the average luminance of the edge image of the inspection area and the circularity of the determination required area are included. By extracting feature vectors using these parameters, highly reliable surface state determination can be performed.
この発明の実施形態(請求項7)では、表面状態の判定結果を用いて、自己組織化マップを再学習させ、判定データマップを更新する。これにより、使用が進むに従い、検査精度を向上させることができる。 In the embodiment of the present invention (Claim 7), the self-organization map is relearned using the determination result of the surface state, and the determination data map is updated. Thereby, inspection accuracy can be improved as use progresses.
また、この発明は、他の形態(請求項8−10)においては、コンピュータを用いた装置である。 In another form (claims 8-10), the present invention is an apparatus using a computer.
次に図面を参照して、この発明の実施形態を説明する。図1は、検査の対象物がギア11であるときの撮像装置の構成を示す。ギア11は、回転テーブル15に取り付けられ、台座17に設けられた図示しないステップモータによってギア歯のピッチでステップ状に回転される。ギア11は、照明装置19によって照射されている。CMOSイメージセンサを備えたカメラ21が、ギア11の歯面を撮影する。撮影は、ギア11のステップ状の回転と同期して行われ、歯面ごとに静止画像が撮影される。一実施例では、照明装置19は、青色発光ダイオードを用いたが、ランプその他の照明装置を使用することもできる。また、カメラ21には、測定可能な輝度レンジの広いワイドダイナミックレンジCMOSカメラを用いることにより、傷の判定に適した良好な画像が得られる。対象物によっては、CCDイメージセンサを用いたカメラを使用することもできる。
Next, an embodiment of the present invention will be described with reference to the drawings. FIG. 1 shows a configuration of an imaging apparatus when an object to be inspected is a
位置決めセンサ18は、一般に近接センサと呼ばれるもので、検出コイルにより高周波磁界を発生する。この磁界に金属の検出物体が近づくと電磁誘導により、検出物体に誘導電流(渦電流)が流れる。この電流によって検出コイルのインピーダンスが変化して、高周波の発振が停止することで、検出物体の接近を検出する。この実施例では、ギアの山の接近をこの近接センサによって検出する。位置決めセンサ18からの信号は、コンピュータ23(図2)に送られ、タイミング部24がギア歯検出に応じてカメラ21に信号を送る。カメラ21は、この信号に応答してギアを撮影する。
The
図2は、カメラ21で撮影した画像を処理するコンピュータ23の機能ブロックを示す。コンピュータ23は、パーソナル・コンピュータ、ワークステーションその他のコンピュータであってよい。画像取得部25は、カメラ21から歯面ピッチごとに撮影される画像を受け取り、差分画像生成部27に渡す。差分画像生成部27は、今回取得した画像と、前回取得した画像、すなわち1ピッチ前のギア歯面の画像との差分をとる。傷その他の表面状態のないギアの歯面は、どれも実質的に同じであるから差分をとると、全体的に輝度の小さい画像になる。ギア歯面に打痕などの傷がついていると、傷の部分の輝度が他の部分と異なるため、差分画像に大きな輝度の部分として現れる。2つの画像の差分をとると、輝度値が負の値をとる画素があるので、差分の輝度値に中間輝度の128を加算して、すべての画素の輝度値を正の値にする。128を加算することによって輝度値が255を超える画素は、輝度値を255とし、128を加算しても負の値になる画素は、輝度値を0とする。こうして、差分画像の輝度値のレンジを0から255に整える。
FIG. 2 shows functional blocks of the
図4(A)を参照すると、検査領域設定部28は、差分画像からしきい値より大きい輝度の領域を潜在的な傷領域31として検出し、この領域を囲む領域33を検査領域として設定する。検査領域33の形状は、四角形その他の多角形であってもよく、または円形もしくは楕円形であってもよい。その大きさは、潜在的な傷領域31に応じて、傷領域31を囲むに十分な大きさに設定する。
Referring to FIG. 4A, the inspection
特徴抽出部29は、次の6つのパラメータを抽出する。
The
(1)傷領域31の面積SA
検査領域を縦軸をi、横軸をjとする座標で表示し、傷領域31の境界線の座標を用いた積分演算により面積SAを求める。
(1) Area S A of the wound
The inspection area is displayed in coordinates with the vertical axis being i and the horizontal axis being j, and the area S A is obtained by integration using the coordinates of the boundary line of the
(2)傷領域31を楕円近似したときの歯スジに対する長軸の傾きθA
ギアに生じることの多い打痕は、楕円近似することができる。図4(B)において、図形の近似プログラムを用いて傷領域31を近似する楕円の近似式を求める。近似式は、既知のプログラムを用いて求めることができる。典型的には、多変量の非線形最小二乗法によるあてはめプログラムを用いて近似式を求める。こうして求めた楕円の長軸37とギアの歯スジ13(図1)に平行な直線35とのなす角度θAを求める。
(2) Long axis inclination θ A with respect to the tooth streak when the
A dent often occurring in a gear can be approximated to an ellipse. In FIG. 4B, an approximate equation of an ellipse that approximates the
(3)検査領域33の輝度値エントロピーentB
潜在的な傷領域31を含む検査領域33の輝度値のエントロピーを次の式により求める。輝度値エントロピーは、輝度値分布の情報量を表し、情報量が大きいことは、輝度値分布の乱雑度が大きいことを表す。
The entropy of the luminance value of the
この実施例では、輝度値エントロピーとして、輝度値0から255までの輝度値分布の乱雑性を用いた。数1で、pは輝度値、rel[p]は、輝度値pの頻度である。
In this embodiment, the randomness of the luminance value distribution from
図6は、輝度値ヒストグラムの例を示す。打痕その他の傷を有するギア歯面の場合、その画像の差分の画像に傷が多様な輝度値をもつ画素領域として現れるので、輝度値エントロピーが大きい。(A)は、種々の輝度値を有する画素がランダムに存在する画像の輝度値ヒストグラムである。中間輝度128を中心に広く輝度値が分布しており、エントロピーが大きい。(B)は、輝度値のばらつきが小さい画像の輝度値ヒストグラムであり、エントロピーが小さい。
FIG. 6 shows an example of a luminance value histogram. In the case of a gear tooth surface having dents or other scratches, since the scratches appear as pixel areas having various brightness values in the difference image, the brightness value entropy is large. (A) is a luminance value histogram of an image in which pixels having various luminance values randomly exist. Brightness values are widely distributed around the
(4)検査領域33の輝度値アニソトロピーansB
検査領域33の輝度値のアニソトロピーは、次の式で表される。アニソトロピーは、輝度値分布の対称性の度合いを示す。
The anisotropy of the luminance value of the
この式で、kは、出現頻度が最小の輝度値である。つまり、ansBは、検査領域33における0から最小の輝度値までの輝度値エントロピーを0から全輝度値のエントロピーで割った値である。輝度値分布が中間輝度値125の左右で対称のとき、ansB = -0.5 となる。ansB が-0.5に近づくほど対称性が高く、アニソトロピーが小さい。ansBが-0.5から離れて0または-1に近づくほど対称性が低く、アニソトロピーが大きい。
In this expression, k is a luminance value with the lowest appearance frequency. That is, ansB is a value obtained by dividing the luminance value entropy from 0 to the minimum luminance value in the
図7を参照すると、(A)のような輝度値ヒストグラムは、輝度値が中間値の128を中心として偏りなく分布しているので、対称性が高く、アニソトロピーは小さい。図7(B)の輝度値ヒストグラムは、中間値128の左側と右側で輝度値の分布が異なり、対称性が低く、アニソトロピーが大きい。(B)で出現頻度が最小の輝度値が230であるとすると、ansBが-1に近い値となる。
Referring to FIG. 7, the luminance value histogram as shown in FIG. 7A has a high luminance symmetry and a small anisotropy because the luminance values are distributed without any bias around the
(5)潜在的傷領域31の円形度CA
傷領域31の円形度CA は、次の式で表される。
Circularity C A wound
この式で、SA は、傷領域31の面積、rmax は、傷領域31の重心から領域33の端部までの最大距離である。
In this equation, S A is the area of the
(6)検査領域33のエッジ画像の平均輝度edgB
検査領域33の面積をSBで表すと、検査領域33のエッジ画像の平均輝度edgB は、次の式で求められる。
If represents the area of the
ここで、i、j は、画素の座標を示し、P(i,j)は、座標i, j の画素の輝度値を示す。ΔP(i,j) は、P(i,j) の上下(i軸方向)に隣接する2つの画素の輝度値の差分の二乗と、左右(j軸方向)に隣接する2つの画素の輝度値の差分の二乗との和の平方根である。ΔP(i,j)は、隣接する画素の輝度値の差分の大きさを表す。隣接画素の輝度値の差分をとることは、画像において輝度値の変化の大きいエッジ部分を強調した画像、すなわちエッジ画像、を生成することに相当する。edgB は、隣接画素の輝度値の差分の大きさの総和を領域33の面積で割ったもので、エッジ画像の平均輝度を示す。
Here, i and j indicate the coordinates of the pixel, and P (i, j) indicates the luminance value of the pixel at the coordinates i and j. ΔP (i, j) is the square of the difference between the luminance values of two pixels adjacent to the upper and lower sides (i-axis direction) of P (i, j) and the luminance of the two pixels adjacent to the left and right (j-axis direction) This is the square root of the sum of the difference squared. ΔP (i, j) represents the magnitude of the difference between the luminance values of adjacent pixels. Taking the difference between the luminance values of adjacent pixels corresponds to generating an image in which an edge portion having a large change in luminance value in the image is emphasized, that is, an edge image. edgB is obtained by dividing the sum of the magnitudes of the luminance values of adjacent pixels by the area of the
こうして求めた6つのパラメータのそれぞれについて、たくさんのサンプルについての最大値および最小値を用いて、次の式により正規化する。 For each of the six parameters thus obtained, normalization is performed by the following equation using the maximum value and the minimum value for many samples.
正規化=(得られた値 ― 最小値)/(最大値 ― 最小値)
この正規化により、それぞれのパラメータは、0から1の範囲の値をとる。こうして、潜在的傷領域31を含む検査領域33は、6つの特徴パラメータの数値ベクトルで表すことができる。
Normalization = (obtained value-minimum value) / (maximum value-minimum value)
By this normalization, each parameter takes a value in the range of 0 to 1. Thus, the
図5は、こうして得られた特徴ベクトルを示す。図5(A)は、図の上方に示す画像に見られるような打痕に対応する特徴ベクトルを示す。図5(B)は、ギア歯面の色ムラ(過検出)の特徴ベクトルを示す。潜在的傷領域の面積パラメータSA、楕円近似したときの長軸の傾きθA 、およびアニソトロピーansB については両者の間に大きな相違はないが、輝度値エントロピーentB 、円形度、およびエッジ画像の平均輝度edgB について大きな相違があることがわかる。 FIG. 5 shows the feature vector thus obtained. FIG. 5A shows a feature vector corresponding to a dent as seen in the image shown at the top of the figure. FIG. 5B shows a feature vector of color unevenness (overdetection) of the gear tooth surface. There is no significant difference between the area parameter S A of the potential flaw area, the long axis inclination θ A when the ellipse is approximated, and the anisotropy ansB, but the luminance value entropy entB, circularity, and the average of the edge image It can be seen that there is a large difference in luminance edgB.
図2に戻ると、特徴抽出部29は、上述のようにして検査領域33から上述の6つのパラメータからなる特徴ベクトルを抽出する。代替実施例では、特徴抽出部29は、検査領域の輝度値エントロピー、潜在的傷領域の円形度および検査領域のエッジ画像の平均輝度の3つのパラメータからなる特徴ベクトルを抽出する。
Returning to FIG. 2, the
図3は、この発明の一実施例におけるギア歯面1枚についての傷判定処理の流れを示すフローチャートであり、ギアのすべての歯面についての傷判定が終わるまでこの処理が連続的に実行される。ギア11を図1の回転テーブルに取り付け、照明装置19を起動させてから処理に入る。ステップS101でギア11のすべてのギア歯面が検査されたかどうかを判定し、未了であればステップS103に移る。すべてのギア歯面が検査されたかどうかの判定は、ギア11の歯数をカウンタにセットしておき、1つの歯についての処理が終了するごとにカウンタをデクリメントし、このカウンタの値を点検することによって行う。
FIG. 3 is a flowchart showing the flow of the flaw determination process for one gear tooth surface in one embodiment of the present invention. This process is continuously executed until the flaw determination for all tooth surfaces of the gear is completed. The The
ステップS103では、ギア11を一歯分、回転させる。位置決めセンサ18がギア歯を検出し、コンピュータ23に検出信号を送る。コンピュータ23のタイミング部24が、位置決めセンサ18からの信号に応じてカメラ21に駆動信号を送る。カメラ21は、これに応じてステップS105でギア11を撮影し、その画像を画像処理用パーソナルコンピュータ23に送る。撮影回数が1であるとき(S107)、すなわちギア11の最初の歯の撮影をしたばかりのときは、差分画像を用いた画像処理ができないので、この画像は保存しておき、次の歯を撮影するため後続のステップをスキップして初回の処理を終わり、再度、スタートから処理に入る。
In step S103, the
ステップS109では、上述したように2つの連続する歯の画像から差分画像を生成し、潜在的傷領域31(図4)を囲む検査領域33を選定する。次にステップS111では、図5に関連して説明したように差分画像から特徴ベクトルを抽出し、ステップS113に渡す。ステップS113では、判定データマップを用いて傷その他の表面状態の判定を行う。
In step S109, as described above, a difference image is generated from two consecutive tooth images, and an
まず、ニューラルネットワークを用いた自己組織化学習によって判定データマップを生成する手法を説明する。 First, a method for generating a determination data map by self-organizing learning using a neural network will be described.
この実施例では、40×40 のニューロンを用いて自己組織化マップを生成する。図8は、3つのニューロンNj-1、Nj、Nj+1を示す。ωj=(ωj0、ωj1、・・・、ωjm )は、ニューロンNjの結合係数ベクトルであり、χ=(χ0、χ1、・・・、χm )は、入力ベクトルである。自己組織化マップは、自己組織化特徴マップとも呼ばれ、教師なしアルゴリズムである。このマップは、入力データ中の隠れた特徴を抽出して自動的に学習を行い、入力データに対して選択的に反応するマップを生成する。自己組織化マップは、コホーネン(Kohonen)が提案したもので、たとえば産業図書株式会社発行の「ニューロ・ファジイ・遺伝的アルゴリズム」1994年、に解説されている。 In this embodiment, 40 × 40 neurons are used to generate a self-organizing map. FIG. 8 shows three neurons N j−1 , N j , N j + 1 . ω j = (ω j0 , ω j1 ,..., ω jm ) is a coupling coefficient vector of the neuron N j , and χ = (χ 0 , χ 1 ,..., χ m ) is an input vector is there. The self-organizing map is also called a self-organizing feature map and is an unsupervised algorithm. This map extracts hidden features in the input data and automatically learns to generate a map that selectively reacts to the input data. The self-organizing map was proposed by Kohonen and explained in, for example, “Neuro Fuzzy Genetic Algorithm” published in 1994 by Sangyo Tosho Co., Ltd.
この実施例での入力ベクトルは、特徴抽出部29(図2)で抽出された検査領域33の特徴ベクトルである。自己組織化マップは、次のステップで作成される。
The input vector in this embodiment is a feature vector of the
ステップ1:ネットワーク初期化
ニューロンの結合ベクトルωj=(ωj0、ωj1、・・・、ωjm )をすべてのニューロンについて乱数を用いて決定する。
Step 1: A network initialization neuron connection vector ω j = (ω j0 , ω j1 ,..., Ω jm ) is determined for all neurons using random numbers.
ステップ2:入力ベクトル入力
入力ベクトルχ=(χ0、χ1、・・・、χm )をそれぞれのニューロンに与える。各ニューロンと入力ベクトルとの関係は図8に示すとおりである。
Step 2: Input Vector Input Input vector χ = (χ 0 , χ 1 ,..., Χ m ) is given to each neuron. The relationship between each neuron and the input vector is as shown in FIG.
ステップ3:ニューロンの結合係数ベクトルと入力ベクトルの距離計算
それぞれのニューロンの結合ベクトルと入力ベクトルとの距離を次の式により計算する。
ステップ4:勝者ニューロン決定
距離dj が最小となるニューロンを選定する。このニューロンを勝者ニューロンと呼び、j*で表す。
Step 4: Select a neuron with the smallest winner neuron determination distance d j . This neuron is called the winner neuron and is represented by j *.
ステップ5:結合係数ベクトルの学習
勝者ニューロンとその近傍のニューロンのそれぞれの結合係数(重み)を次の式に従い更新する。
ηは、正の定数で、この実施例では0.05とする。h(j,j*)は、近傍関数と呼ばれ、次の式で表される。
σ(t)は学習経過とともに小さくなっていく。したがって、近傍関数の範囲は、図9に円で示すように学習の初期は広く、学習の進行とともに狭くなっていく。つまり、学習の進行とともに粗調整から微調整へと変化する。このように近傍関数は、マップを効果的に生成させる。図9は、勝者ニューロンを小さい円91で示し、これを囲む近傍関数を大きい円93で表している。
σ (t) decreases as the learning progresses. Therefore, the range of the neighborhood function is wide at the initial stage of learning as indicated by a circle in FIG. In other words, the coarse adjustment changes to the fine adjustment as the learning progresses. Thus, the neighborhood function effectively generates a map. FIG. 9 shows the winner neuron as a
ステップ6:t更新、入力ベクトル入力にもどる
学習回数tをt+1に更新し、ステップ2の入力ベクトルの入力にもどり、ステップ2〜6を繰り返し、結合係数ベクトルの更新を繰り返す。
Step 6: Update t, return to input vector input The learning count t is updated to t + 1, return to the input vector input in
自己組織化マップでは、勝者ニューロンとその近くのニューロンはすべてその時の入力ベクトルに近づく。学習の初期は、近傍関数によって多くのニューロンが近くとみなされ、おおまかなマップが形成される。学習の進行とともに近傍関数によって勝者ニューロンの近くとみなされるニューロン数が少なくなる。そのため、局所的な微調整が進み、空間的な解像度が上がる。 In the self-organizing map, the winner neuron and nearby neurons all approach the current input vector. At the beginning of learning, many neurons are considered to be close by the neighborhood function, and a rough map is formed. As the learning progresses, the number of neurons considered to be close to the winner neuron by the neighborhood function decreases. For this reason, local fine adjustment progresses and spatial resolution increases.
判定データマップの作成
複数のサンプルについて取得した、傷または過検出を含む検査領域33の特徴ベクトルをすべて順番に、またはランダムに選択して自己組織化マップに入力して学習させることで、入力した特徴ベクトルの類似関係を反映した自己組織化マップを生成することができる。すなわち、類似した特徴をもつクラスタが自己組織化マップ上で寄り集まる結果になる。図10は、このようにして得られた自己組織化マップを示す。実施例では、40かける40のニューロンを用いたが、図10では簡単のために20かける20のマップとして示す。図10でそれぞれの升目が一つのニューロンに対応する。実線で区切られた(1)、(2)、・・・(28)のブロックは、次のようにして決定されたクラスタを表す。
Creation of judgment data map All the feature vectors of the
自己組織化マップのそれぞれのニューロン位置に、その結合係数ベクトルとの距離が最も小さい特徴ベクトルを有する検査領域の画像を配置する。この検査領域は、自己組織化マップの生成に使用された複数のサンプルのうちの一つである。同じ画像を有する隣接するニューロンを選択してグループ化する。こうして形成されたニューロンのグループをクラスタと呼ぶ。ここでのグループ化は、既存の描画プログラムで使われているグループ化機能と同じで、グループ化されたニューロンは、グループ全体として選択し、プロパティを設定することができる。 An image of the examination region having a feature vector having the smallest distance from the coupling coefficient vector is arranged at each neuron position of the self-organizing map. This examination area is one of a plurality of samples used for generating the self-organizing map. Adjacent neurons with the same image are selected and grouped. A group of neurons formed in this way is called a cluster. The grouping here is the same as the grouping function used in the existing drawing program, and the grouped neurons can be selected as a whole group and the properties can be set.
次いで、それぞれのクラスタに配置された画像を目視で確認して、この検査領域33に含まれるのが傷その他の表面状態であるのか、あるいは表面ムラのような過検出であるのかを判定する。この判定結果をクラスタのプロパティとして設定する。具体的には、初期状態としてすべてのクラスタのプロパティ・フィールドに「過検出」が入力されている状態で、コンピュータのディスプレイ上に自己組織化マップを表示し、傷と判定されたクラスタをマウスで右クリックして「傷」に変更入力する。
Next, the images arranged in the respective clusters are visually confirmed, and it is determined whether the
傷または過検出の判定
図11は、こうしてクラスタが分類されたマップを示す。この実施例では、こうして形成された判定データマップを傷データマップと呼ぶ。図11においてハッチングを施されたクラスタ(1)、(2)、(6)、(10)、(11)、(12)、(13)、(15)および(16)のブロック55A、(22)、(27)および(28)のブロック55Bが「傷」に分類されたクラスタであり、ハッチングのないクラスタが「過検出」のクラスタである。この傷データマップをコンピュータ23(図2)に登録し、判定部30が傷の判定に使用する。
Determination view of a wound or
具体的には、まず、特徴抽出部29から渡される特徴ベクトルと結合係数ベクトルとの距離を求める。この距離は、上に示した数5に従って算出される。この距離が小さい順にニューロンを選択し、予め定めた数、たとえば10個以下のニューロンを選び、これを囲む円または楕円を近傍領域とする。傷データマップの生成過程から明らかなように、結合係数ベクトルが近似したニューロンがクラスタとしてグループ化されているので、上記のようにして距離が小さい順にニューロンを選択すると、互いに隣接したニューロンのかたまりが選択される。このニューロンのかたまりを囲む円または楕円を近傍領域とする。たとえば、図12を参照すると、円57が近傍領域を規定している。
Specifically, first, the distance between the feature vector passed from the
円57は、選択されたニューロンのかたまりの傷データマップ上の配列からこれらのニューロンのかたまりの中心位置を求め、この中心からこのニューロンの固まりの最も遠くにあるニューロンまでの距離を半径とする円として求めることができる。
A
こうして選ばれた円または楕円で規定される近傍領域に含まれる傷クラスタに属するニューロンの数(K)と近傍領域内のニューロンの総数(S)との比、(K)/(S)に基づいて傷の判定を行う。(K)/(S)≧D のとき、傷と判定し、(K)/(S)<D のとき、過検出と判定する。Dは予め設定したしきい値であり、たとえば0.5である。このようにして、傷その他の表面状態と過検出とを判別する。図12の例では、円57の中に傷クラスタ(12)に属するニューロンが8個あり、円57内のニューロンの総数は、12であるので、(K)/(S) = 8/12 = 0.67 であるので、今回の検査領域に含まれているのは、傷であると判定される。
Based on the ratio (K) / (S) of the number of neurons (K) belonging to the wound cluster included in the neighboring area defined by the circle or ellipse thus selected and the total number of neurons (S) in the neighboring area Check for scratches. When (K) / (S) ≧ D, it is judged as a scratch, and when (K) / (S) <D, it is judged as overdetection. D is a preset threshold value, for example, 0.5. In this way, the scratch and other surface conditions and overdetection are discriminated. In the example of FIG. 12, since there are eight neurons belonging to the wound cluster (12) in the
自己組織化マップの更新
上述の傷データマップを用いたコンピュータによる自動判定により傷ありと判定されたギアの歯面を目視で検査して、傷を確認する。自動判定により過検出と判定されたギアの歯面についても同様に目視で検査し、確認することができる。こうして、最終的に傷その他の表面状態があると判定されたギア歯面の検査領域の特徴ベクトルをクラスタ化する前の自己組織化マップに入力して学習させる。このとき、自己組織化マップのニューロンの結合係数ベクトルの初期値は、過去の学習で生成された最新の結合係数ベクトルを用いる。
Update of self-organizing map The tooth surface of the gear determined to be flawed by automatic determination by a computer using the flaw data map described above is visually inspected to confirm the flaw. Similarly, the tooth surface of the gear determined to be overdetected by automatic determination can be visually inspected and confirmed. Thus, the feature vector of the inspection region of the gear tooth surface finally determined to have a scratch or other surface condition is input to the self-organization map before clustering to be learned. At this time, the initial value of the coupling coefficient vector of the neurons of the self-organizing map uses the latest coupling coefficient vector generated by past learning.
こうして自己組織化マップを更新し、再度上述のクラスタ化処理を実行する。これによって、既存の種類の傷の検出精度を低下させることなく、新しい種類の傷または過検出に対応したクラスタを生成し、傷データマップを生成することができる。更新された傷データマップを使用することにより、検査精度を向上させることができる。この更新処理には、過去に得られた結合係数ベクトルを用いるので、短い学習時間で傷データマップを更新することができる。 In this way, the self-organizing map is updated, and the above-described clustering process is executed again. As a result, a cluster corresponding to a new type of flaw or overdetection can be generated and a flaw data map can be generated without reducing the detection accuracy of existing types of flaws. By using the updated flaw data map, the inspection accuracy can be improved. In this update process, since the coupling coefficient vector obtained in the past is used, the flaw data map can be updated in a short learning time.
以上にこの発明を具体的な実施例について説明したが、この発明はこのような実施例に限定されるものではない。 Although the present invention has been described with respect to specific embodiments, the present invention is not limited to such embodiments.
11 ギア
19 照明装置(LED)
21 カメラ
23 コンピュータ
11
21
Claims (9)
要判定領域を含む検査領域の複数のサンプルを用意するステップと、
前記サンプルから特徴ベクトルを抽出するステップと、
前記特徴ベクトルを自己組織化マップに入力し、学習させるステップと、
前記学習した自己組織化マップにおいて同じ前記サンプルのそれぞれに対応し隣接するニューロンをグループ化してクラスタにするステップと、
前記クラスタが傷に対応するものか過検出に対応するものかについてユーザが入力する判定結果に応じて、該クラスタを傷または過検出に分類するステップと、
を有するデータマップを生成する方法。 A method for generating a data map for determining a surface state of an inspection object having a plurality of structural units of similar texture continuously,
Preparing a plurality of samples of an inspection area including a determination required area;
Extracting a feature vector from the sample;
Inputting the feature vector into a self-organizing map and learning;
Grouping adjacent neurons corresponding to each of the same samples in the learned self-organizing map into clusters;
Classifying the cluster as a flaw or overdetection according to a determination result input by a user as to whether the cluster corresponds to a flaw or overdetection ;
A method for generating a data map having:
前記対象物を相対的に回転させて、前記構成単位の画像を順次撮像するステップと、
前記撮像手段から取得した画像において、今回の画像と前回の画像との差分をとるステップと、
前記差分手段によって生成された差分画像において、予め定めたしきい値を超える輝度の要判定領域を検出し、該要判定領域を囲む検査領域を特定するステップと、
前記検査領域から特徴ベクトルを抽出するステップと、
前記特徴ベクトルと前記データマップの各ニューロンの結合係数ベクトルとの距離を演算するステップと、
前記距離が小さいニューロンが隣接した領域を求めるステップと、
前記隣接した領域における傷のクラスタに属するニューロンの数に基づいて表面状態の判定を行うステップと、
を含む、表面状態の判定方法。 A determination method using the data map according to claim 1,
Relatively rotating the object and sequentially capturing images of the structural units;
In the image acquired from the imaging means, taking a difference between the current image and the previous image;
Detecting a required determination area having a luminance exceeding a predetermined threshold in the difference image generated by the difference means, and specifying an inspection area surrounding the required determination area;
Extracting a feature vector from the inspection region;
Calculating a distance between the feature vector and a coupling coefficient vector of each neuron of the data map;
Obtaining a region adjacent to a neuron having a small distance; and
Determining a surface state based on the number of neurons belonging to a cluster of flaws in the adjacent region;
A method for determining a surface state, including:
要判定領域を含む検査領域の複数のサンプルから特徴ベクトルを抽出する手段と、
前記特徴ベクトルを入力として自己組織化学習を行い自己組織化マップを生成するニューラルネットワークと、
前記学習した自己組織化マップにおいて同じ前記サンプルのそれぞれに対応し隣接するニューロンをグループ化してクラスタにする手段と、
前記クラスタが傷に対応するものか過検出に対応するものかについてユーザが入力する判定結果に応じて、該クラスタを傷または過検出に分類する手段と、
を有するデータマップを生成する装置。 An apparatus using a computer that generates a data map for determining a surface state of an object having a plurality of similar texture units continuously.
Means for extracting a feature vector from a plurality of samples in an inspection area including a determination required area;
A neural network that performs self-organization learning using the feature vector as input and generates a self-organization map;
Means for grouping and clustering adjacent neurons corresponding to each of the same samples in the learned self-organizing map;
Means for classifying the cluster into a flaw or overdetection according to a determination result input by a user as to whether the cluster corresponds to a flaw or overdetection ;
A device for generating a data map having:
前記対象物を相対的に回転させて、前記構成単位の画像を順次撮像する手段と、
前記撮像手段から取得した画像において、今回の画像と前回の画像との差分をとる手段と、
前記差分手段によって生成された差分画像において、予め定めたしきい値を超える輝度の要判定領域を検出し、該領域を囲む検査領域を特定する手段と、
前記検査領域から特徴ベクトルを抽出する手段と、
前記特徴ベクトルと前記データマップの各ニューロンの結合係数ベクトルとの距離を演算する手段と、
前記距離が小さいニューロンが隣接した領域を求める手段と、を備え、
前記隣接した領域における傷のクラスタに属するニューロンの数に基づいて表面状態の判定を行う、表面状態の判定装置。 A determination apparatus using the data map according to claim 7,
Means for relatively rotating the object and sequentially capturing images of the structural units;
In the image acquired from the imaging means, means for taking the difference between the current image and the previous image;
Means for detecting a determination required area of luminance exceeding a predetermined threshold in the difference image generated by the difference means, and specifying an inspection area surrounding the area;
Means for extracting a feature vector from the inspection region;
Means for calculating a distance between the feature vector and a coupling coefficient vector of each neuron of the data map;
And a means for obtaining a region adjacent to a neuron with a small distance,
A surface state determination device that determines a surface state based on the number of neurons belonging to a cluster of flaws in the adjacent region.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004226658A JP4018089B2 (en) | 2004-08-03 | 2004-08-03 | Method for generating data map for determining surface condition and determination method |
| US11/181,643 US20060029257A1 (en) | 2004-08-03 | 2005-07-13 | Apparatus for determining a surface condition of an object |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004226658A JP4018089B2 (en) | 2004-08-03 | 2004-08-03 | Method for generating data map for determining surface condition and determination method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2006047041A JP2006047041A (en) | 2006-02-16 |
| JP4018089B2 true JP4018089B2 (en) | 2007-12-05 |
Family
ID=36025764
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2004226658A Expired - Fee Related JP4018089B2 (en) | 2004-08-03 | 2004-08-03 | Method for generating data map for determining surface condition and determination method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4018089B2 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109142393A (en) * | 2018-09-03 | 2019-01-04 | 佛亚智能装备(苏州)有限公司 | A kind of defect classification method, apparatus and system |
| JP6653929B1 (en) * | 2019-07-18 | 2020-02-26 | Jeインターナショナル株式会社 | Automatic determination processing device, automatic determination processing method, inspection system, program, and recording medium |
| CN117309766B (en) * | 2023-10-20 | 2024-03-29 | 苏州宣雄智能科技有限公司 | Visual detection method and system for product surface defects |
-
2004
- 2004-08-03 JP JP2004226658A patent/JP4018089B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2006047041A (en) | 2006-02-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN114723701B (en) | Gear defect detection method and system based on computer vision | |
| CN118608504B (en) | Machine vision-based part surface quality detection method and system | |
| US20060029257A1 (en) | Apparatus for determining a surface condition of an object | |
| CN108428231B (en) | Multi-parameter part surface roughness learning method based on random forest | |
| JP6099479B2 (en) | Crack detection method | |
| CN119831966A (en) | PCB production line defect detection system and method based on image processing | |
| JP7415286B2 (en) | Color filter inspection equipment, inspection equipment, color filter inspection method and inspection method | |
| CN109242853A (en) | A kind of PCB defect intelligent detecting method based on image procossing | |
| JP5806786B1 (en) | Image recognition device | |
| CN119152284B (en) | A warehouse cargo abnormality detection method and device based on image recognition technology | |
| JP2018152055A (en) | System and method for scoring color candidate poses against color image in vision system | |
| WO2020019648A1 (en) | Machine vision positioning method | |
| Lin et al. | Surface defect detection of machined parts based on machining texture direction | |
| CN110427979A (en) | Road puddle recognition methods based on K-Means clustering algorithm | |
| CN119086589A (en) | Bridge welding quality detection method based on gray-relative depth fitting vision technology | |
| CN119006419B (en) | Part size online detection method and system based on linear array camera | |
| JP4018092B2 (en) | A device that automatically determines the cause of a given surface condition of an inspection object | |
| JP4725298B2 (en) | Visual inspection method using images | |
| JP4157507B2 (en) | Surface condition determination apparatus and program | |
| KR102851858B1 (en) | A method of diagnosing surface defects in a plate-shaped member based on machine learning. | |
| JP4018089B2 (en) | Method for generating data map for determining surface condition and determination method | |
| JP4018091B2 (en) | Apparatus and program for determining surface condition | |
| CN119399551A (en) | A method and system for detecting ladle lining | |
| CN116563276B (en) | Chemical fiber filament online defect detection method and detection system | |
| JP6126290B1 (en) | Appearance inspection device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070314 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070403 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070530 |
|
| 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: 20070918 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070919 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100928 Year of fee payment: 3 |
|
| LAPS | Cancellation because of no payment of annual fees |