JP3580088B2 - Appearance inspection method - Google Patents

Appearance inspection method Download PDF

Info

Publication number
JP3580088B2
JP3580088B2 JP16926197A JP16926197A JP3580088B2 JP 3580088 B2 JP3580088 B2 JP 3580088B2 JP 16926197 A JP16926197 A JP 16926197A JP 16926197 A JP16926197 A JP 16926197A JP 3580088 B2 JP3580088 B2 JP 3580088B2
Authority
JP
Japan
Prior art keywords
line
circular
value
pixel
pixels
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 - Lifetime
Application number
JP16926197A
Other languages
Japanese (ja)
Other versions
JPH1115975A (en
Inventor
満 白澤
肇 直原
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.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP16926197A priority Critical patent/JP3580088B2/en
Publication of JPH1115975A publication Critical patent/JPH1115975A/en
Application granted granted Critical
Publication of JP3580088B2 publication Critical patent/JP3580088B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明は、被検査物の画像に基づいて被検査物の表面に生じた欠けや被検査物の表面に付着した異物などを欠陥として検出する外観検査方法に関するものである。
【0002】
【従来の技術】
この種の外観検査方法として、被検査物の画像から求めた被検査物の輪郭線の内側に輪郭線を設定し、輪郭線上で欠陥部のエッジとみなせるエッジフラグ点を検出すると、エッジフラグ点の近傍での濃度変化に基づいて欠陥部を識別するものがある(特公平7−18811号公報)。
【0003】
【発明が解決しようとする課題】
ところで、上述の方法は、基本的には同種の被検査物に対しては同じ輪郭線を用いるものであり、したがって被検査物を同じ条件で撮像するのはもちろんのこと、被検査物も同種のものであれば同じ形状であることが要求される。しかしながら、同種の被検査物であっても合成樹脂成形品などではロットが異なると金型や成形条件が異なることがあり、同種の被検査物でもわずかに形状が異なっていることある。形状にわずかな相違があっても被検査物の輪郭線から輪郭線までの距離に余裕を持たせれば、同じ輪郭線を使用することが可能になるが、それでは微小な欠陥部を発見することができなくなるというジレンマが生じる。
【0004】
本発明は上記事由に鑑みて為されたものであり、その目的は、被検査物の形状にわずかな相違があっても被検査物の輪郭線近傍の欠陥部を確実に抽出することができる外観検査方法を提供することにある。
【0005】
【課題を解決するための手段】
請求項1の発明は、画像内で円形の輪郭線を持つ被検査物の中心位置を求め、この中心位置を中心とする円形の円形状ラインを設定するとともに被検査物の輪郭線に円形状ラインが重なるまで円形状ラインの半径を1画素ずつ変化させ、被検査物の輪郭線に重なる円形状ラインを探索ラインとして、探索ライン上の欠陥部の有無を検出するものである。この方法によれば、円形の被検査物と中心が一致する円形状ラインの半径を1画素ずつ変化させることにより、被検査物の輪郭線に一致する円形状ラインを求め、被検査物の輪郭線に一致した円形状ラインを探索ラインとして欠陥部の検出に用いるから、被検査物の寸法に誤差があってもその誤差分に応じた探索ラインを設定することができ、結果的に欠陥部の検出精度が高くなる。
【0006】
請求項2の発明は、請求項1の発明において、半径が1画素分異なる各一対の円形状ラインの上の画素の濃度値の平均値をそれぞれ求め、両平均値の差がライン設定用の閾値より大きいときに前記中心位置に近いほうの円形状ラインを探索ラインとするものである。また、請求項3の発明は、半径が1画素分異なる各一対の円形状ラインの上の画素の濃度値の平均値をそれぞれ求め、両平均値の比が1付近の規定範囲を逸脱するときに前記中心位置に近いほうの円形状ラインを探索ラインとするものである。さらに、請求項4の発明は、半径が1画素分異なる各一対の円形状ラインの上の画素の濃度値の平均値をそれぞれ求め、両平均値の差がライン設定用の第1の閾値より大きいときに前記中心位置に近いほうの円形状ラインを探索ライン候補とし、探索ライン候補の上の画素の微分絶対値の総和がライン設定用の第2の閾値より大きいときに探索ライン候補を探索ラインとするものである。請求項5の発明は、半径が1画素分異なる各一対の円形状ラインの上の画素の濃度値の平均値および画素の微分絶対値の総和をそれぞれ求め、両平均値の比が1付近の規定範囲を逸脱し、かつ両微分絶対値の比が1付近になるときに前記中心位置に近いほうの円形状ラインを探索ラインとするものである。請求項2ないし請求項5の方法は、請求項1の発明においてどの円形状ラインを探索ラインとするかの判断方法の望ましい実施態様であって、画素の濃度値と微分絶対値とを用いるものである。
【0007】
請求項6の発明は、請求項1の発明において、円形状ラインの上の画素の微分方向値のヒストグラムを生成し、前記ヒストグラムにおいてすべての微分方向値の度数が規定範囲内であるときにその円形状ラインを探索ラインとするものである。請求項7の発明は、請求項1の発明において、円形状ラインの上の画素の微分方向値を求め、円形状ラインの少なくとも一部に沿って微分方向値が連続的に変化するときにその円形状ラインを探索ラインとするものである。請求項8の発明は、請求項1の発明において、円形状ラインの上の画素の微分絶対値および微分方向値を求め、円形状ラインの上の画素の微分絶対値の総和がライン設定用の閾値より大きくかつその円形状ラインの少なくとも一部に沿って微分方向値が連続的に変化するときにその円形状ラインを探索ラインとするものである。請求項6ないし請求項8の方法は、請求項1の発明においてどの円形状ラインを探索ラインとするかの判断方法の望ましい実施態様であって、微分方向値を利用するものである。
【0008】
請求項9の発明は、請求項7または請求項8の発明において、探索ラインの上の画素の微分方向値の変化が不連続になるときに欠陥部が存在すると判断するものである。請求項10の発明は、請求項8の発明において、探索ラインの上の画素の微分方向値の変化が不連続になり、かつ微分絶対値の総和が欠陥検出用の閾値よりも小さいときに欠陥部が存在すると判断するものである。請求項9および請求項10の発明は、微分方向値を利用して探索ラインを設定したときに、欠陥部の検出にも微分方向値を利用することで演算量を低減するものである。
【0009】
請求項11の発明は、請求項1の発明において、探索ラインである円形状ラインを複数の弧に分割し、各弧ごとに各別に欠陥部の有無を検出するものである。この方法によれば、探索ラインを複数の弧に分割して各弧ごとに欠陥部の有無を検出するから、より細かい判断によって欠陥部を検出する確率が大きくなる。
請求項12の発明は、請求項1の発明において、探索ラインである円形状ラインを複数の弧に分割し、各弧を微小範囲で移動させることにより探索ラインの位置を補正し、補正後の探索ラインの上で欠陥部の有無を検出するものである。請求項13の発明は、請求項1の発明において、探索ラインである円形状ラインを複数の弧に分割し、各弧を微小範囲で移動させることにより探索ラインの位置を補正し、補正後の各弧の上の画素の濃度値と微分絶対値と微分方向値との少なくとも1つの要素について互いに他の弧の要素と比較し、比較結果に基づいて欠陥部の有無を検出するものである。請求項12および請求項13の発明は、探索ラインを複数の弧に分割するだけではなく微小範囲で移動させることにより探索ラインの位置を補正するから、たとえば照明条件などの相違によって被検査物の輪郭線が真円になっていないような場合でも、各弧の位置を補正して被検査物の輪郭線に近づけることが可能になり、結果的に被検査物の輪郭線付近の欠陥部の検査をより精度よく行なうことができる。
【0010】
請求項14の発明は、請求項1の発明において、探索ラインである円形状ラインを複数の弧に分割し、各弧を微小範囲で移動させることにより探索ラインの位置を補正し、補正後の探索ラインの上の画素の濃度値の平均値を求め、各弧の上の画素のうち前記平均値との差が欠陥検出用の閾値よりも大きい画素の個数を計数し、計数された画素数が規定の閾値よりも大きいときに欠陥部が存在すると判断するものである。請求項15の発明は、請求項1の発明において、探索ラインである円形状ラインを複数の弧に分割し、各弧を微小範囲で移動させることにより探索ラインの位置を補正し、補正後の探索ラインに沿って移動させる一定画素数のスティックマスクを設定し、スティックマスクの長手方向の中心を挟んで略等距離に位置する画素の濃度値の差の総和を求め、スティックマスクを探索ラインに沿って1画素ずつ移動させたときに前記総和が規定の閾値よりも大きくなると欠陥部が存在すると判断するものである。請求項14および請求項15の発明は、探索ラインを複数の弧に分割したときにおける欠陥部の検出方法の望ましい実施態様である。
【0011】
【発明の実施の形態】
本発明は、画像内で輪郭線が円形となる被検査物を対象にしており、かつ被検査物の輪郭線の近傍に存在する欠陥部を検出するものである。図2に示すように被検査物1の画像はテレビカメラのような画像入力装置2により被検査物1を撮像することで得られ、画像入力装置2からの映像信号はアナログ−デジタル変換部3においてデジタル信号に変換された後に、画像処理部4に入力され濃淡画像である原画像から、微分絶対値画像、微分方向値画像、エッジ画像が生成される。原画像は各画素の画素値を濃度値とした画像であり、微分絶対値画像と微分方向値画像とはそれぞれ画素値を微分絶対値ないし微分方向値とした画像である。微分絶対値は、着目する画素の近傍での濃度値の勾配を示すものであり、濃度値の変化が大きいほど微分絶対値は大きくなる。また、微分方向値は、着目する画素の近傍での濃度値の変化方向を示すものである。さらに、エッジ画像は、微分絶対値が閾値以上でかつ微分値絶対値が極大値となる1画素幅のエッジを抽出する細線化処理、および細線化処理により得られた不連続なエッジを延長して連続させるエッジ延長化処理により得られる1画素幅のエッジのみが他の部分と異なる画素値となった画像である。したがって、エッジ画像は微分絶対値画像および微分方向値画像を生成した後に生成される。
【0012】
原画像、微分絶対値画像、微分方向値画像、エッジ画像は、それぞれ原画像メモリ5、微分絶対値画像メモリ6、微分方向値画像メモリ7、エッジ画像メモリ8に格納され、被検査物1の輪郭線付近に存在する欠陥部の検出に用いられる。ここに、原画像はたとえば8ビット256階調、微分絶対値画像はたとえば6ビット64段階、微分方向値はたとえば4ビット16方向、エッジ画像は1ビットで表される。これらのビット数は限定する趣旨ではないが、実用レベルを考慮して妥当な値になっている。なお、画像処理部4において微分絶対値画像、微分方向値画像、エッジ画像を生成する手順については各種の技術が提案されているが、基本的には特公平7−18811号公報に記載された技術を用いればよい。
【0013】
本発明は、上述のようにして、原画像メモリ5、微分絶対値画像メモリ6、微分方向値画像メモリ7、エッジ画像メモリ8にそれぞれ格納された原画像、微分絶対値画像、微分方向値画像、エッジ画像を適宜に用いることによって、被検査物1の輪郭線上の欠陥部を検出する。また、欠陥部を検出するための基本的な手順は、被検査物1の中心を求め、求めた中心を基準にして被検査物1の輪郭線上に探索ラインを設定し、その探索ライン上で欠陥部を検出するというものである。したがって、被検査物1の中心を求める中心算出部9、探索ラインを求める探索ライン設定部10、欠陥部を検出する欠陥検査部11を備える。
【0014】
中心算出部9での処理手順は以下に説明する各実施形態で共通であって、原画像から画素値が濃度に関して規定の閾値以上である領域(被検査物1に相当する領域となるように閾値を設定する)の重心を求め、求めた重心の座標(画像に設定した横方向をX方向、縦方向をY方向という)を中心とみなすのである。要するに原画像から濃度に関する2値画像を生成して重心を求めることに相当する。ここで、被検査物1と画像入力装置2との位置関係や照明の配光などの条件は、被検査物1の実際の中心と上述のようにして求めた被検査物1の中心とみなされる座標とがほぼ一致するように設定されているものとする。また、被検査物1は背景よりも暗くなるものとする(つまり画像内では被検査物1の画素は背景よりも濃度が小さい)。
【0015】
なお、背景と被検査物1とを完全に分離することができる場合には、微分絶対値画像をラスタスキャンして微分絶対値が規定の閾値以上である画素(被検査物1の輪郭線上の画素とみなせるように閾値を設定する)を抽出するか、あるいはエッジ画像を用い、被検査物1に相当する領域におけるX座標値とY座標値とのそれぞれの最大値および最小値を求め、X座標値の最大値と最小値との平均値を中心のX座標、Y座標値の最大値と最小値との平均値を中心のY座標とみなしてもよい。
【0016】
以下の各実施形態では、画像入力装置2で撮像された画像内で被検査物1の中心とみなせる座標はすでに求められているものとして説明する。また、被検査物1の中心とみなせる座標を中心アドレスという。
(実施形態1)
本実施形態では、図3に示すように、中心アドレスCTを中心とした円形の円形状ラインLcを設定する。設定した円形状ラインLcの上の画素の微分絶対値の総和を求め、この総和を規定の閾値(ライン設定用の閾値)と比較する。この閾値は被検査物1や背景に円形状ラインLcが設定されているときには微分絶対値の総和が閾値より小さくなり、円形状ラインLcが被検査物1の輪郭線上に重複するときに閾値より大きくなるように設定される。しかして、微分絶対値の総和が閾値よりも小さいときには、円形状ラインLcの半径を1画素大きくし、新たに設定した円形状ラインLcの上の画素について微分絶対値の総和を再び求める。微分絶対値の総和が閾値を越えたときには、円形状ラインLcが被検査物1の輪郭線上に重複していると考えられるから、この円形状ラインLcを輪郭線候補とする。
【0017】
なお、微分絶対値の総和は画素数に依存するから各画素の微分絶対値が等しい場合でも円形状ラインLcの半径が異なれば値は変わるが、被検査物1の寸法は欠陥検査では既知であるから、被検査物1の輪郭線の半径に応じて適正な閾値を設定することができる。半径の異なる複数種類の被検査物1を検査対象とするときには、微分絶対値の総和ではなく微分絶対値の平均値を用いればよい。また、被検査物1の輪郭線の半径が既知であるから、最初に設定する円形状ラインLcの半径を被検査物1の輪郭線の半径よりやや小さい程度としておけば、被検査物1の輪郭線に重複する円形状ラインLcをより短時間で決定することができる。さらに、最初に設定する円形状ラインLcの半径を被検査物1の輪郭線の半径よりも小さくし、円形状ラインLcの半径を1画素ずつ大きくしているが、円形状ラインLcの半径を被検査物1の輪郭線の半径よりも大きく設定しておき、円形状ラインLcの半径を1画素ずつ小さくすることによって被検査物1の輪郭線に重複する円形状ラインLcを求めてもよい。
【0018】
次に、図4に示すように、求めた輪郭線候補Lkの上の画素を中心とする1画素幅の濃度測定用スティックマスクMSを設定する。濃度測定用スティックマスクMSは、輪郭線LSの上の画素と中心アドレスCTとを通る直線上に設定される。図示例では7画素の長さを有する濃度測定用スティックマスクMSを設定してあるが、濃度測定用スティックマスクMSの画素数は、3画素以上であって輪郭線候補Lkの内外の画素数が同じになるように設定するのでればとくに限定されるものではない。また、濃度測定用スティックマスクMSの設定箇所や設定個数にはとくに制限はないが、輪郭線候補Lkの異なる場所にできるだけ多くの濃度測定用スティックマスクMSを設定するのが望ましい。
【0019】
濃度測定用スティックマスクMSが設定されると、各濃度測定用スティックマスクMSの画素について、中心画素から同じ距離に位置する画素同士の濃度差を求めて、その濃度差の総和を求める。たとえば、濃度測定用スティックマスクMSにおいて輪郭線候補Lkの外側の画素の濃度をa〜aとし、内側の画素の濃度をb〜b(添字が同じ画素は中心画素から等距離にある)とするとき、次式の値を求めるのである。
|a−b|+|a−b|+|a−b
上述のようにして求めた画素の濃度差の総和を規定の閾値と比較し、閾値よりも大きいときには濃度測定用スティックマスクMSの中心画素を被検査物1の輪郭線の上の画素の候補点とする。濃度測定用スティックマスクMSの本数に対して候補点の得られた個数の占める割合が規定値以上であれば、その輪郭線候補Lkを輪郭線LSとして採用する。本実施形態では、この輪郭線LSが探索ラインとして用いられる。つまり、ここまでが探索ライン設定部10の処理になる。
【0020】
なお、微分絶対値の総和のみで求めた輪郭線候補Lkを輪郭線LSとして採用してもよい。あるいは、微分絶対値の総和を用いずに、半径の異なる円形状ラインLcごとに濃度測定用スティックマスクMSを設定して濃度差の総和を閾値と比較して候補点を求めるとともに、濃度測定用スティックマスクMSの本数に対する候補点の個数の占める割合が規定値以上であるときに、その円形状ラインLcを輪郭線LSとして採用してもよい。
【0021】
上述のようにして輪郭線LSを設定した後には欠陥検査部11において輪郭線LSの上の欠陥部の有無を検出する。すなわち、輪郭線LSの内側に複数本の探索ラインを所定間隔で平行に設定し、各探索ライン上の各画素の微分絶対値を求める。ここで、微分絶対値が規定の閾値を越える画素数が所定個数以上であるときには欠陥部があると判断する。また、微分絶対値の総和が規定の閾値以上であるときに欠陥部があると判断する。
【0022】
上述した手順をまとめると、図1のようになる。すなわち、画像入力装置2により被検査物1が撮像され(S1)、原画像のほか、微分絶対値画像、微分方向値画像、エッジ画像の各種画像が必要に応じて生成される(S2)。さらに、画像内での被検査物1の中心アドレスが求められる(S3)。その後、中心アドレスを中心として半径1画素の円形状ラインLcが設定され(S4,S5)、円形状ラインLcが被検査物1の輪郭線に一致するか否かが判定される(S6)。不一致の場合には円形状ラインLcの半径が1画素分大きく設定され(S7)、円形状ラインLcが被検査物1の輪郭線に一致するか否かが判定される(S6)。この処理を繰り返し、円形状ラインLcが被検査物1の輪郭線に一致するようになると、その円形状ラインLcを探索ラインとして採用し(S8)、探索ラインの上で欠陥部の有無を検査する(S9)。
【0023】
なお、上述の説明から明らかなように、本実施形態では微分方向値画像は用いていない。また、エッジ画像も必ずしも用いなくてもよい。つまり、微分方向値画像やエッジ画像を求める処理は本実施形態では必須ではない。
(実施形態2)
本実施形態は、実施形態1と同様に、中心アドレスCTを中心とした円形の円形状ラインLcを設定する。ただし、微分絶対値を用いるのではなく、図5に示すように、設定した円形状ラインLcの上の画素の濃度値の平均値を、半径が1画素分小さい円形状ラインLc’の上の画素の濃度値の平均値と比較する。円形状ラインLcは輪郭線候補Lkが得られるまで実施形態1と同様に半径が1画素ずつ大きくなるから、半径の1画素分小さい円形状ラインLc’については濃度値の平均値はすでに求められているものを用いる。つまり、各半径の円形状ラインLcごとに濃度値の平均値を記憶保持し、記憶保持した値を後の演算に用いるのである。このようにして各円形状ラインLcの濃度値の平均値の差(外側の円形状ラインLcに関する濃度値の平均値をmb、内側の円形状ラインLc’に関する濃度値の平均値をmb’とするとき、|mb−mb’|)を求め、濃度値の平均値が内側の円形状ラインLc’よりも大きくなり(|mb−mb’|≫0)、かつそのときの濃度値の平均値の差が規定の閾値(ライン設定用の閾値)より大きいと判断されたときに、半径が1画素分小さい(つまり、中心に近いほうの)円形状ラインLc’を輪郭線LSとみなすのである(あるいは輪郭線候補Lkとし、さらに濃度測定用スティックマスクMSを用いて輪郭線LSを決定する)。他の処理については実施形態1と同様である。
【0024】
(実施形態3)
本実施形態は、実施形態3と同様に、設定した円形状ラインLcの上の画素の濃度値の平均値を用いて輪郭線LSを決定する。本実施形態では、隣接する一対の円形状ラインLc,Lc’の濃度値の比(外側の円形状ラインLcに関する濃度値の平均値をmb’、内側の円形状ラインLc’に関する濃度値の平均値をmb’とするとき、mb/mb’)を求め、濃度値の平均値が内側の円形状ラインLc’よりも大きくなり(mb/mb’≫1)、かつそのときの濃度値の平均値の比が規定の閾値よりも大きいと判断されたときに、半径が1画素分小さい(つまり、中心に近いほうの)円形状ラインLc’を輪郭線LSとみなす(あるいは輪郭線候補Lkとし、さらに濃度測定用スティックマスクMSを用いて輪郭線LSを決定する)。他の処理については実施形態1と同様である。
【0025】
(実施形態4)
本実施形態は、円形状ラインLcの上の画素の微分絶対値の総和と、画素の濃度値の平均値との両方を用いて輪郭線LSを決定するものである。すなわち、上述した各実施形態と同様に円形状ラインLcを設定し、輪郭線LSが決定されるまで円形状ラインLcの半径を大きくする。ここで、実施形態2と同様に、円形状ラインLcの上の画素の濃度値の平均値を求め、1画素分半径の小さい円形状ラインLc’について求めた画素の濃度値の平均値との差から円形状ラインLc’が輪郭線LSとして採用可能か否かを判断する。実施形態2では濃度値の平均値に基づいて求めた円形状ラインLc’を輪郭線LSとして採用したが、本実施形態では、この円形状ラインLc’を輪郭線候補Lkとする。そして、輪郭線候補Lkの上の画素の微分絶対値の総和を求め、微分絶対値の総和が規定の閾値を越えるとその円形状ラインLcを輪郭線LSとして採用するのである。他の処理は実施形態1と同様である。
【0026】
なお、画素の濃度値の平均値から輪郭線候補Lkを求め、微分絶対値の総和により検証して輪郭線LSと決定したが、微分絶対値の総和により輪郭線候補Lkを求め、画素の濃度値の平均値により検証して輪郭線LSを決定してもよい。
(実施形態5)
本実施形態も、円形状ラインLcの上の画素の微分絶対値の総和と濃度値の平均値とを用いるものである。すなわち、各半径の円形状ラインLcごとに円形状ラインLcの上の画素の微分絶対値の総和と濃度値の平均値とを求める。また、本実施形態では濃度値の平均値だけではなく微分絶対値の総和についても、半径が1画素分小さい円形状ラインLc’との比を求める。
【0027】
すなわち、円形状ラインLcの上の画素の濃度値の平均値をmb、微分絶対値の総和をmsとし、半径が1画素分小さい円形状ラインLc’の上の画素の濃度値の平均値をmb’、微分絶対値の総和をms’とするとき、mb/mb’とms/ms’とを求める。濃度値の平均値については輪郭線LSでは大きくなる方向に変化するから、mb/mb’≫1になり、微分絶対値の総和は輪郭線LS上では非常に大きいから、ms/ms’≒1になる。つまり、円形状ラインLc’が輪郭線LSに重複したとすれば、円形状ラインLcは輪郭線LSの外側であり円形状ラインLc’は輪郭線LSの内側であるから、mb>mb’であり、ms≒ms’になると考えられる。そこで、このような条件の判定が可能な閾値を設定すれば輪郭線LSか否かを判別することが可能になる。他の処理は実施形態1と同様である。
【0028】
(実施形態6)
上述した各実施形態では、微分方向値を用いていないが、本実施形態は微分方向値を用いるものである。ところで、被検査物1が円形であるから輪郭線LSの上の画素の微分方向値は理想的には均等に分布する。つまり、すべての微分方向値の発生確率は等しくなる。画像入力装置2や画像メモリ5〜8などの画像処理系に十分な解像度があるものと考えると、ほぼ理想通りの結果が得られることになる。
【0029】
そこで、本実施形態では、各半径の円形状ラインLcごとに円形状ラインLcの上の画素の微分方向値のヒストグラムを求める。このような微分方向値のヒストグラムを求めると、輪郭線LSの上以外では特定の微分方向値にのみピークが生じるから、微分方向値が均等に発生しているか否かを判定すれば円形状ラインLcが輪郭線LSに一致しているか否かを知ることができる。微分方向値が均等に分布しているか否かは、各微分方向値の度数の標準偏差を求めるか、最大度数と最小度数との差を求めることによって判断することができる。つまり、微分方向値の度数が規定範囲内であるときに輪郭線LSに一致しているものと判断するのである。
【0030】
また、輪郭線LSは円形であるから、輪郭線LS上の画素の微分方向値を順次追跡すれば、微分方向値は連続的に変化することになる。そこで、円形状ラインLcの少なくとも一部に沿って画素を追跡し、追跡した画素の微分方向値が連続的に変化しているときには(多少の誤差は許容する)、その円形状ラインLcを輪郭線LS(つまり探索ライン)として採用する。
【0031】
なお、本実施形態は微分方向値のみで輪郭線LSか否かを判断しているが、実施形態1のように円形状ラインLcの上の微分絶対値の総和が規定の閾値より大きいか否かを合わせて判断し、微分絶対値の総和が閾値より大きくかつ微分方向値が均等に分布しているか、あるいは連続的に変化しているときに、その円形状ラインLcを輪郭線LSとして採用するようにしてもよい。
【0032】
また、本実施形態では、被検査物1の形状の識別も可能になる。つまり、円形以外の被検査物1では輪郭線LSの上で微分方向値は均等に分布しないから、仮に被検査物1として円形ではないものが混在していたとすれば、円形状ラインLcの半径を変えても輪郭線LSが検出されず、欠陥部のある被検査物1と同様に排除することができる。円形状ラインLcは画像内で設定できない大きさになれば当然ながら次の円形状ラインLcは設定されずに処理の終了になる。つまり、処理の終了までに輪郭線LSが検出されなければ、その被検査物1は排除されることになる。
【0033】
ところで、輪郭線LS上に欠陥部が存在している場合に、本実施形態では微分方向値の変化によって欠陥部を検出することが可能である。微分方向値を決めるには、画素の濃度の変化が最大になる方向に方向値を与える場合と、画素の濃度の変化が最小になる方向に方向値を与える場合とがある。本実施形態では画素の濃度の変化が最大になる方向に方向値を与えるものとする。この場合、欠陥部の輪郭線上の画素の微分方向値は欠陥部の中心向きか(欠陥部内の画素の濃度が周囲よりも小さい黒画素の場合)、中心から発散する向きになる(欠陥部内の画素の濃度が周囲よりも大きい白画素の場合)。また、円形状ラインLcにより検出された輪郭線LS(つまり探索ライン)の上に欠陥部が存在すれば、微分絶対値および微分方向値が他の部分とは大きく異なると考えられる。
【0034】
そこで、探索ライン(輪郭線LS)の上で各画素を追跡し微分方向値の変化に着目したときに、微分方向値の変化が不連続になれば、その部分に欠陥部が存在すると判断することで、欠陥部を検出することができる。また、より正確に欠陥部を検出するには、探索ラインの上で微分絶対値も合わせて検出するようにし、微分方向値の変化が不連続でかつ微分絶対値の総和が欠陥検出用の閾値よりも小さいときには欠陥部が存在するものと判断すればよい。他の処理は実施形態1と同様である。
【0035】
(実施形態7)
上述した各実施形態では、円形状ラインLcを設定し、特定の条件を満たす円形状ラインLcを輪郭線LSとみなしていたが、円形の被検査物1を撮像したとしても画像入力装置2により撮像した画像では必ずしも円形になっていない場合がある。つまり、画像内では被検査物1の輪郭線LSが真円にならない場合がある。そこで、本実施形態では、図6に示すように、円形状ラインLcを用いて得られた輪郭線LSを規定の中心角で分割し(図示例では6分割)、分割された各弧A,A,…,Aごとに微小移動させるとともに、移動させた各位置で実施形態1ないし実施形態6のいずれかの処理手順を用いて各弧A〜Aと被検査物1の輪郭線LSとの一致の程度を判定する。すなわち、上述した各実施形態では輪郭線LSが探索ラインに一致していたが、本実施形態では探索ラインが各弧A〜A単位で設定されることになる。したがって、欠陥部を検出する可能性が一層高くなる。ここで、各弧A〜Aを移動させる場合には、各弧A〜Aを含む扇形は変形させず、また扇形の中心線方向も変化させないようにして、扇形の中心位置のみを図7に矢印で示すように移動させる。図7では枡目が画素に対応する。移動範囲はn×n画素(nは3以上の奇数)の範囲であって、円形状ラインLcを設定した中心アドレスを中心としてn×n画素の正方領域Dsを設定し、正方領域Dsの中心の画素(斜線部)から始めて扇形の中心を正方領域の中で螺旋状に移動させるのである。
【0036】
このようにして、各弧A〜Aをそれぞれ探索ラインとして決定した後、各探索ライン上の画素の濃度値の平均値を求める。探索ライン上に欠陥部が存在すれば、欠陥部の画素の濃度値は他の部分とは異なるから、欠陥部の存在しない場合の平均値を基準値mとし、基準値mからどれだけ離れると欠陥部があるとみなすかのオフセット値ofsを設定して、実際に検出された各画素の濃度値bとの関係が、以下の条件を満たす画素は欠陥部の画素の可能性があると判断する。
|b−m|>ofs
上の条件が成立する画素は欠陥部の候補であるから、上の条件を満たす画素の個数を計数し、計数結果が規定の閾値を越えるときには欠陥部が存在すると判断する。他の処理は実施形態1と同様である。
【0037】
(実施形態8)
実施形態7では、探索ラインとなる各弧A〜Aの上の画素の濃度を用いて欠陥部を検出する例を示したが、本実施形態では探索ラインとしての各弧A〜Aの位置を決定した後に、図8に示すような探索ラインに沿った形状のn画素(nは3以上の奇数)のスティックマスクMSを設定し、このスティックマスクMSを探索ラインに沿って走査する。ここで、被検査物1の輪郭線は円形であり各弧A〜Aを移動させる際にも各弧A〜Aの位置を変えるのみで変形させないから、スティックマスクMSは各弧A〜Aを定めた円形状ラインLcの半径に等しい円弧の一部となる形状に設定すればよい。
【0038】
欠陥部は他の部位とは濃度値が異なるのであるから、つまり、スティックマスクMSの中心の画素を挟んで略等距離に位置する画素同士の濃度値の差の総和を求め、この総和が規定の閾値よりも大きいときには欠陥部が存在すると判断する。つまり、図8のように5画素のスティックマスクMSを設定し、そのときに中心画素を挟む各画素の濃度値を順にa,a,b,bとするとき、
|a−b|+|a−b
を求め、この値が閾値より大きいときには欠陥部が存在すると判断する。他の処理は実施形態7と同様である。
【0039】
【発明の効果】
請求項1の発明は、画像内で円形の輪郭線を持つ被検査物の中心位置を求め、この中心位置を中心とする円形の円形状ラインを設定するとともに被検査物の輪郭線に円形状ラインが重なるまで円形状ラインの半径を1画素ずつ変化させ、被検査物の輪郭線に重なる円形状ラインを探索ラインとして、探索ライン上の欠陥部の有無を検出するものであり、円形の被検査物と中心が一致する円形状ラインの半径を1画素ずつ変化させることにより、被検査物の輪郭線に一致する円形状ラインを求め、被検査物の輪郭線に一致した円形状ラインを探索ラインとして欠陥部の検出に用いるから、被検査物の寸法に誤差があってもその誤差分に応じた探索ラインを設定することができ、結果的に欠陥部の検出精度が高くなるという利点がある。
【0040】
請求項9の発明のように、探索ラインの上の画素の微分方向値の変化が不連続になるときに欠陥部が存在すると判断するものや、請求項10の発明のように、探索ラインの上の画素の微分方向値の変化が不連続になり、かつ微分絶対値の総和が欠陥検出用の閾値よりも小さいときに欠陥部が存在すると判断するものでは、微分方向値を利用して探索ラインを設定したときに、欠陥部の検出にも微分方向値を利用することで演算量を低減することができる。
【0041】
請求項11の発明のように、探索ラインである円形状ラインを複数の弧に分割し、各弧ごとに各別に欠陥部の有無を検出するものでは、探索ラインを複数の弧に分割して各弧ごとに欠陥部の有無を検出するから、より細かい判断によって欠陥部を検出する確率が大きくなるという利点がある。
請求項12の発明のように、探索ラインである円形状ラインを複数の弧に分割し、各弧を微小範囲で移動させることにより探索ラインの位置を補正し、補正後の探索ラインの上で欠陥部の有無を検出するものや、請求項13の発明のように、探索ラインである円形状ラインを複数の弧に分割し、各弧を微小範囲で移動させることにより探索ラインの位置を補正し、補正後の各弧の上の画素の濃度値と微分絶対値と微分方向値との少なくとも1つの要素について互いに他の弧の要素と比較し、比較結果に基づいて欠陥部の有無を検出するものでは、探索ラインを複数の弧に分割するだけではなく微小範囲で移動させることにより探索ラインの位置を補正するから、たとえば照明条件などの相違によって被検査物の輪郭線が真円になっていないような場合でも、各弧の位置を補正して被検査物の輪郭線に近づけることが可能になり、結果的に被検査物の輪郭線付近の欠陥部の検査をより精度よく行なうことができるという利点がある。
【図面の簡単な説明】
【図1】本発明の実施形態1を示す動作説明図である。
【図2】同上に用いる装置を示すブロック図である。
【図3】同上の概念説明図である。
【図4】同上の概念説明図である。
【図5】本発明の実施形態2の概念説明図である。
【図6】本発明の実施形態7の概念説明図である。
【図7】同上の概念説明図である。
【図8】本発明の実施形態8の概念説明図である。
【符号の説明】
1 被検査物
2 画像入力装置
3 アナログ−デジタル変換部
4 画像処理部
5 原画像メモリ
6 微分絶対値画像メモリ
7 微分方向値画像メモリ
8 エッジ画像メモリ
9 中心算出部
10 探索ライン設定部
11 欠陥検査部
〜A
CT 中心アドレス
Lc 円形状ライン
Lc’円形状ライン
LS 輪郭線
MS 濃度測定用スティックマスク
MS スティックマスク
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a visual inspection method for detecting, as a defect, a chip generated on the surface of an inspection object or a foreign substance attached to the surface of the inspection object based on an image of the inspection object.
[0002]
[Prior art]
As this kind of appearance inspection method, when an outline is set inside the outline of the inspection object obtained from the image of the inspection object, and an edge flag point which can be regarded as an edge of a defective portion on the outline is detected, an edge flag point is detected. (Japanese Patent Publication No. 7-18811).
[0003]
[Problems to be solved by the invention]
By the way, the above-described method basically uses the same contour line for the same kind of inspected object. Therefore, not only is the image of the inspected object taken under the same conditions, but also the inspected object is of the same kind. Are required to have the same shape. However, even in the case of the same type of inspection object, if the lot is different for a synthetic resin molded product or the like, the mold and molding conditions may be different, and even the same type of inspection object may have a slightly different shape. Even if there is a slight difference in the shape, if the distance between the contours of the inspected object has a margin, it is possible to use the same contour, but then it is necessary to find minute defects A dilemma arises that it is no longer possible.
[0004]
The present invention has been made in view of the above circumstances, and an object of the present invention is to be able to reliably extract a defective portion near the contour of an inspection object even if there is a slight difference in the shape of the inspection object. It is to provide a visual inspection method.
[0005]
[Means for Solving the Problems]
According to the first aspect of the present invention, a center position of a test object having a circular outline in an image is determined, a circular circular line centered on the center position is set, and a circular shape is formed on the outline of the test object. The radius of the circular line is changed one pixel at a time until the line overlaps, and the presence or absence of a defect on the search line is detected by using the circular line overlapping the contour of the inspection object as the search line. According to this method, the radius of the circular line whose center coincides with the circular object to be inspected is changed one pixel at a time to obtain a circular line that matches the contour of the object to be inspected, and the outline of the object to be inspected is obtained. Since a circular line that matches the line is used as a search line for detecting a defective portion, even if there is an error in the dimension of the inspection object, a search line can be set according to the error, and as a result, the defective portion can be set. Detection accuracy increases.
[0006]
According to a second aspect of the present invention, in the first aspect of the present invention, an average value of density values of pixels on each pair of circular lines having a radius different by one pixel is obtained, and a difference between the two average values is used for line setting. When the value is larger than the threshold value, the circular line closer to the center position is set as the search line. According to a third aspect of the present invention, when the average value of the density values of the pixels on each pair of circular lines having a radius different by one pixel is obtained, the ratio of the two average values deviates from a prescribed range of around 1. First, a circular line closer to the center position is set as a search line. Further, according to the invention of claim 4, the average value of the density values of the pixels on each pair of circular lines having a radius different by one pixel is obtained, and the difference between the two average values is smaller than the first threshold value for line setting. When larger, the circular line closer to the center position is set as a search line candidate, and when the sum of the differential absolute values of the pixels above the search line candidate is larger than a second threshold for line setting, the search line candidate is searched. Line. According to a fifth aspect of the present invention, the average value of the density values of the pixels on each pair of circular lines having different radii by one pixel and the sum of the differential absolute values of the pixels are obtained. When the ratio deviates from the specified range and the ratio between the absolute values of the two differentials is close to 1, the circular line closer to the center position is set as the search line. The method according to any one of claims 2 to 5 is a preferred embodiment of the method for determining which circular line is used as the search line in the invention according to claim 1, wherein the method uses the density value and the differential absolute value of the pixel. It is.
[0007]
According to a sixth aspect of the present invention, in the first aspect of the present invention, a histogram of differential direction values of pixels on the circular line is generated, and when the frequencies of all the differential direction values in the histogram are within a specified range, the histogram is generated. A circular line is used as a search line. According to a seventh aspect of the present invention, in the first aspect of the present invention, a differential direction value of a pixel on a circular line is obtained, and when the differential direction value changes continuously along at least a part of the circular line, the differential direction value is calculated. A circular line is used as a search line. According to an eighth aspect of the present invention, in the first aspect, the differential absolute value and the differential direction value of the pixel on the circular line are obtained, and the sum of the differential absolute values of the pixels on the circular line is used for line setting. When the differential direction value is continuously larger than a threshold value and continuously changes along at least a part of the circular line, the circular line is used as a search line. The method of claim 6 to claim 8 is a preferred embodiment of the method of determining which circular line is to be the search line in the invention of claim 1, and uses a differential direction value.
[0008]
According to a ninth aspect of the present invention, when the change of the differential direction value of the pixel on the search line becomes discontinuous in the seventh or eighth aspect, it is determined that a defective portion exists. According to a tenth aspect of the present invention, when the change in the differential direction value of the pixel on the search line becomes discontinuous and the sum of the differential absolute values is smaller than the defect detection threshold in the eighth aspect, It is determined that a part exists. According to the ninth and tenth aspects of the present invention, when a search line is set using a differential direction value, the amount of calculation is reduced by using the differential direction value also for detecting a defective portion.
[0009]
According to an eleventh aspect of the present invention, in the first aspect of the invention, a circular line serving as a search line is divided into a plurality of arcs, and the presence or absence of a defective portion is detected for each arc. According to this method, the search line is divided into a plurality of arcs, and the presence / absence of a defective portion is detected for each of the arcs. Therefore, the probability of detecting a defective portion by finer judgment increases.
According to a twelfth aspect of the present invention, in the first aspect of the present invention, the circular line serving as the search line is divided into a plurality of arcs, and each arc is moved within a minute range to correct the position of the search line. This is to detect the presence or absence of a defective portion on the search line. According to a thirteenth aspect of the present invention, in the first aspect of the invention, the position of the search line is corrected by dividing the circular line, which is the search line, into a plurality of arcs, and moving each arc within a minute range. At least one element of a density value, a differential absolute value, and a differential direction value of a pixel above each arc is compared with elements of another arc, and the presence or absence of a defective portion is detected based on the comparison result. According to the twelfth and thirteenth aspects of the present invention, the position of the search line is corrected by not only dividing the search line into a plurality of arcs but also moving the search line in a minute range. Even when the contour is not a perfect circle, it is possible to correct the position of each arc and bring it closer to the contour of the inspection object. The inspection can be performed more accurately.
[0010]
According to a fourteenth aspect of the present invention, in the first aspect of the invention, the position of the search line is corrected by dividing the circular line that is the search line into a plurality of arcs, and moving each arc within a minute range. The average value of the density values of the pixels on the search line is obtained, and the number of pixels on each of the arcs whose difference from the average value is larger than the threshold value for defect detection is counted. Is larger than a prescribed threshold, it is determined that a defective portion exists. According to a fifteenth aspect of the present invention, in the first aspect of the present invention, the position of the search line is corrected by dividing the circular line as the search line into a plurality of arcs, and moving each of the arcs in a minute range. Set a stick mask with a certain number of pixels to be moved along the search line, calculate the sum of differences in density values of pixels located at substantially equal distances across the center of the stick mask in the longitudinal direction, and set the stick mask as the search line. If the sum is larger than a specified threshold value when the pixel is moved one pixel at a time, it is determined that a defective portion exists. The invention according to claims 14 and 15 is a preferred embodiment of a method for detecting a defective portion when a search line is divided into a plurality of arcs.
[0011]
BEST MODE FOR CARRYING OUT THE INVENTION
The present invention is directed to an inspection object whose contour is circular in an image, and detects a defect existing near the contour of the inspection object. As shown in FIG. 2, an image of the inspection object 1 is obtained by imaging the inspection object 1 with an image input device 2 such as a television camera, and a video signal from the image input device 2 is converted into an analog-digital converter 3 After being converted into digital signals in step (1), a differential absolute value image, a differential direction value image, and an edge image are generated from the original image which is input to the image processing unit 4 and is a grayscale image. The original image is an image in which the pixel value of each pixel is a density value, and the differential absolute value image and the differential direction value image are images in which the pixel value is a differential absolute value or a differential direction value, respectively. The differential absolute value indicates the gradient of the density value near the pixel of interest, and the greater the change in the density value, the larger the differential absolute value. The differential direction value indicates the direction in which the density value changes near the pixel of interest. Further, the edge image is a thinning process for extracting an edge of one pixel width in which the differential absolute value is equal to or more than a threshold value and the differential absolute value is a local maximum, and a discontinuous edge obtained by the thinning process is extended. Only the edge of one pixel width obtained by the edge extension processing for making the image continuous is an image having a pixel value different from those of the other portions. Therefore, the edge image is generated after generating the differential absolute value image and the differential direction value image.
[0012]
The original image, differential absolute value image, differential direction value image, and edge image are stored in an original image memory 5, a differential absolute value image memory 6, a differential direction value image memory 7, and an edge image memory 8, respectively. It is used for detecting a defect existing near the contour. Here, the original image is represented by, for example, 8 bits and 256 gradations, the differential absolute value image is represented by, for example, 6 bits and 64 steps, the differential direction value is represented by, for example, 4 bits and 16 directions, and the edge image is represented by 1 bit. The number of these bits is not intended to be limited, but is an appropriate value in consideration of a practical level. Although various techniques have been proposed for the procedure for generating the differential absolute value image, the differential direction value image, and the edge image in the image processing unit 4, they are basically described in Japanese Patent Publication No. 7-18811. Technology may be used.
[0013]
The present invention provides an original image, a differential absolute value image, and a differential direction value image stored in the original image memory 5, the differential absolute value image memory 6, the differential direction value image memory 7, and the edge image memory 8 as described above. By using the edge image as appropriate, a defect on the contour of the inspection object 1 is detected. The basic procedure for detecting a defective portion is as follows. The center of the object 1 is determined, a search line is set on the contour of the object 1 based on the determined center, and the search line is set on the search line. This is to detect a defective portion. Therefore, a center calculation unit 9 for finding the center of the inspection object 1, a search line setting unit 10 for finding a search line, and a defect inspection unit 11 for detecting a defective portion are provided.
[0014]
The processing procedure in the center calculation unit 9 is common to each of the embodiments described below, and an area in which the pixel value is equal to or more than a predetermined threshold value in density from the original image (an area corresponding to the inspection object 1 so as to be an area). The center of gravity of the calculated center of gravity is set, and the coordinates of the obtained center of gravity (the horizontal direction set in the image is the X direction, and the vertical direction is the Y direction) are regarded as the center. In short, this is equivalent to generating a binary image relating to density from the original image and obtaining the center of gravity. Here, conditions such as the positional relationship between the inspection object 1 and the image input device 2 and the light distribution of illumination are regarded as the actual center of the inspection object 1 and the center of the inspection object 1 obtained as described above. It is assumed that the coordinates are set so as to substantially match the coordinates to be set. It is assumed that the inspected object 1 is darker than the background (that is, the pixels of the inspected object 1 have lower density than the background in the image).
[0015]
When the background and the object 1 can be completely separated from each other, the differential absolute value image is raster-scanned, and the pixels whose differential absolute values are equal to or greater than a predetermined threshold value (the pixels on the contour of the object 1). The threshold value is set so that the pixel can be regarded as a pixel), or the maximum value and the minimum value of the X coordinate value and the minimum value of the Y coordinate value in the area corresponding to the inspection object 1 are obtained using the edge image, and X The average of the maximum and minimum coordinate values may be regarded as the center X coordinate, and the average of the maximum and minimum Y coordinate values may be regarded as the center Y coordinate.
[0016]
In the following embodiments, a description will be given on the assumption that coordinates that can be regarded as the center of the inspection object 1 in an image captured by the image input device 2 have already been obtained. In addition, coordinates that can be regarded as the center of the inspection object 1 are called center addresses.
(Embodiment 1)
In the present embodiment, as shown in FIG. 3, a circular circular line Lc centering on the center address CT is set. The sum of the differential absolute values of the pixels on the set circular line Lc is calculated, and this sum is compared with a prescribed threshold (threshold for line setting). This threshold value is smaller than the threshold value when the sum of the differential absolute values is smaller than the threshold value when the circular line Lc is set in the inspection object 1 or the background, and when the circular line Lc overlaps the contour line of the inspection object 1. Set to be larger. When the sum of the differential absolute values is smaller than the threshold value, the radius of the circular line Lc is increased by one pixel, and the sum of the differential absolute values is calculated again for the pixels on the newly set circular line Lc. When the sum of the differential absolute values exceeds the threshold value, it is considered that the circular line Lc overlaps the contour of the inspection object 1, and thus the circular line Lc is set as a contour candidate.
[0017]
Since the sum of the differential absolute values depends on the number of pixels, the value changes if the radius of the circular line Lc is different even if the differential absolute values of the pixels are equal, but the dimensions of the inspection object 1 are known in the defect inspection. Therefore, an appropriate threshold value can be set according to the radius of the contour of the inspection object 1. When a plurality of types of inspected objects 1 having different radii are to be inspected, the average of the differential absolute values may be used instead of the sum of the differential absolute values. In addition, since the radius of the contour of the inspection object 1 is known, if the radius of the circular line Lc set first is set to be slightly smaller than the radius of the outline of the inspection object 1, the radius of the inspection object 1 can be reduced. The circular line Lc overlapping with the contour can be determined in a shorter time. Further, the radius of the circular line Lc to be set first is smaller than the radius of the contour line of the inspection object 1, and the radius of the circular line Lc is increased by one pixel. The radius of the contour line of the inspection object 1 may be set larger than the radius of the inspection object 1, and the radius of the circular line Lc may be reduced by one pixel to obtain the circular line Lc overlapping the outline of the inspection object 1. .
[0018]
Next, as shown in FIG. 4, the density measurement stick mask MS having a width of one pixel centering on the pixel above the obtained contour line candidate Lk. 1 Set. Stick mask MS for density measurement 1 Is set on a straight line passing through the pixel above the contour line LS and the center address CT. In the illustrated example, a stick mask MS for density measurement having a length of 7 pixels 1 Is set, but the density measurement stick mask MS 1 The number of pixels is not particularly limited as long as it is set so that the number of pixels inside and outside the contour line candidate Lk is equal to or more than three pixels. Also, a stick mask MS for density measurement 1 There are no particular restrictions on the setting locations and the number of setting, but as many density measuring stick masks MS as possible at different locations of the contour line candidates Lk. 1 It is desirable to set
[0019]
Stick mask MS for density measurement 1 Is set, each density measurement stick mask MS 1 For each pixel, the density difference between pixels located at the same distance from the center pixel is calculated, and the sum of the density differences is calculated. For example, a density measurement stick mask MS 1 , The density of the pixel outside the contour line candidate Lk is represented by a 1 ~ A 3 And the density of the inner pixel is b 1 ~ B 3 When (the pixels with the same subscript are equidistant from the center pixel), the value of the following equation is obtained.
| A 1 -B 1 | + | A 2 -B 2 | + | A 3 -B 3 |
The sum of the density differences of the pixels obtained as described above is compared with a predetermined threshold value. 1 Is set as a candidate point of a pixel on the contour line of the inspection object 1. Stick mask MS for density measurement 1 If the ratio of the obtained number of candidate points to the number of lines is equal to or more than the specified value, the contour candidate Lk is adopted as the contour LS. In the present embodiment, the contour line LS is used as a search line. That is, the process up to here is the process of the search line setting unit 10.
[0020]
Note that a contour line candidate Lk obtained from only the sum of the differential absolute values may be adopted as the contour line LS. Alternatively, without using the sum of the differential absolute values, the density measurement stick mask MS for each of the circular lines Lc having different radii. 1 Is set and the sum of the density differences is compared with a threshold to obtain candidate points, and the density measurement stick mask MS 1 When the ratio of the number of the candidate points to the number of the candidate points is equal to or more than the specified value, the circular line Lc may be adopted as the contour line LS.
[0021]
After setting the contour line LS as described above, the defect inspection unit 11 detects the presence or absence of a defect on the contour line LS. That is, a plurality of search lines are set inside the contour line LS in parallel at predetermined intervals, and the differential absolute value of each pixel on each search line is obtained. Here, when the number of pixels whose differential absolute value exceeds a prescribed threshold is equal to or greater than a predetermined number, it is determined that there is a defective portion. When the sum of the differential absolute values is equal to or greater than a specified threshold, it is determined that there is a defective portion.
[0022]
The above procedure is summarized in FIG. That is, the inspection object 1 is imaged by the image input device 2 (S1), and in addition to the original image, various images such as a differential absolute value image, a differential direction value image, and an edge image are generated as necessary (S2). Further, the center address of the inspection object 1 in the image is obtained (S3). Thereafter, a circular line Lc having a radius of one pixel with the center address as the center is set (S4, S5), and it is determined whether or not the circular line Lc matches the contour of the inspection object 1 (S6). If they do not match, the radius of the circular line Lc is set to be larger by one pixel (S7), and it is determined whether or not the circular line Lc matches the contour of the inspection object 1 (S6). This process is repeated, and when the circular line Lc becomes coincident with the contour of the inspection object 1, the circular line Lc is adopted as a search line (S8), and the presence or absence of a defect is inspected on the search line. (S9).
[0023]
As is clear from the above description, the present embodiment does not use the differential direction value image. Further, an edge image need not always be used. That is, the processing for obtaining the differential direction value image and the edge image is not essential in the present embodiment.
(Embodiment 2)
In the present embodiment, similarly to the first embodiment, a circular circular line Lc centering on the center address CT is set. However, instead of using the differential absolute value, as shown in FIG. 5, the average value of the density values of the pixels on the set circular line Lc is calculated by dividing the average value of the density values on the circular line Lc ′ whose radius is smaller by one pixel. This is compared with the average value of the density values of the pixels. Since the radius of the circular line Lc increases by one pixel until the contour line candidate Lk is obtained as in the first embodiment, the average value of the density values of the circular line Lc ′ smaller by one pixel of the radius has already been obtained. Use That is, the average value of the density values is stored and held for each circular line Lc of each radius, and the stored value is used for the subsequent calculation. Thus, the difference between the average values of the density values of the respective circular lines Lc (the average value of the density values of the outer circular line Lc is mb, and the average value of the density values of the inner circular line Lc ′ is mb ′ | Mb−mb ′ |), the average value of the density values becomes larger than the inner circular line Lc ′ (| mb−mb ′ | ≫0), and the average value of the density values at that time Is determined to be larger than a predetermined threshold (threshold for line setting), a circular line Lc ′ having a radius smaller by one pixel (that is, closer to the center) is regarded as the contour line LS. (Or a contour candidate Lk, and a density measurement stick mask MS 1 Is used to determine the contour line LS). Other processes are the same as in the first embodiment.
[0024]
(Embodiment 3)
In the present embodiment, similarly to the third embodiment, the contour line LS is determined using the average value of the density values of the pixels on the set circular line Lc. In the present embodiment, the ratio of the density values of a pair of adjacent circular lines Lc and Lc ′ (the average value of the density values of the outer circular line Lc is mb ′, and the average of the density values of the inner circular line Lc ′ is When the value is mb ′, mb / mb ′) is obtained, and the average value of the density values becomes larger than the inner circular line Lc ′ (mb / mb′≫1), and the average of the density values at that time is obtained. When it is determined that the value ratio is larger than the specified threshold, the circular line Lc ′ having a radius smaller by one pixel (that is, closer to the center) is regarded as the contour line LS (or as a contour line candidate Lk). And stick mask MS for concentration measurement 1 Is used to determine the contour line LS). Other processes are the same as in the first embodiment.
[0025]
(Embodiment 4)
In the present embodiment, the contour line LS is determined using both the sum of the differential absolute values of the pixels on the circular line Lc and the average value of the density values of the pixels. That is, the circular line Lc is set in the same manner as in the above-described embodiments, and the radius of the circular line Lc is increased until the contour line LS is determined. Here, similarly to the second embodiment, the average value of the density values of the pixels on the circular line Lc is obtained, and the average value of the pixel density values obtained for the circular line Lc ′ having a smaller radius for one pixel is calculated. From the difference, it is determined whether the circular line Lc ′ can be adopted as the contour line LS. In the second embodiment, the circular line Lc ′ obtained based on the average value of the density values is used as the contour line LS, but in the present embodiment, the circular line Lc ′ is set as the contour line candidate Lk. Then, the sum of the differential absolute values of the pixels on the contour line candidate Lk is obtained, and when the sum of the differential absolute values exceeds a prescribed threshold value, the circular line Lc is adopted as the contour line LS. Other processes are the same as in the first embodiment.
[0026]
The contour line candidate Lk is obtained from the average value of the density values of the pixels, and the contour line LS is determined by verifying the sum of the differential absolute values. The contour line LS may be determined by verifying the average value.
(Embodiment 5)
This embodiment also uses the sum of the differential absolute values of the pixels on the circular line Lc and the average value of the density values. That is, for each circular line Lc of each radius, the sum of the differential absolute values of the pixels on the circular line Lc and the average value of the density values are obtained. Further, in the present embodiment, not only the average value of the density values but also the sum of the differential absolute values, the ratio with the circular line Lc ′ having a radius smaller by one pixel is obtained.
[0027]
That is, the average value of the density values of the pixels on the circular line Lc is mb, the sum of the differential absolute values is ms, and the average value of the density values of the pixels on the circular line Lc ′ having a radius smaller by one pixel is Assuming that mb ′ and the sum of the absolute differential values are ms ′, mb / mb ′ and ms / ms ′ are obtained. Since the average value of the density values changes in the direction of increasing in the contour line LS, it becomes mb / mb 'な り 1, and since the sum of the differential absolute values is very large on the contour line LS, ms / ms' ≒ 1 become. That is, assuming that the circular line Lc 'overlaps the contour line LS, the circular line Lc is outside the contour line LS and the circular line Lc' is inside the contour line LS, so that mb> mb ' It is considered that ms ≒ ms ′. Therefore, by setting a threshold value capable of determining such a condition, it is possible to determine whether or not the line is the contour line LS. Other processes are the same as in the first embodiment.
[0028]
(Embodiment 6)
In each of the above-described embodiments, the differential direction value is not used, but the present embodiment uses the differential direction value. By the way, since the inspection object 1 is circular, the differential direction values of the pixels above the contour line LS are ideally uniformly distributed. That is, the occurrence probabilities of all differential direction values are equal. Assuming that the image processing system such as the image input device 2 and the image memories 5 to 8 has a sufficient resolution, almost ideal results can be obtained.
[0029]
Therefore, in the present embodiment, a histogram of the differential direction value of the pixel on the circular line Lc is obtained for each circular line Lc of each radius. When such a histogram of the differential direction values is obtained, a peak occurs only in a specific differential direction value except on the contour line LS. Therefore, if it is determined whether the differential direction values are uniformly generated, a circular line is obtained. It is possible to know whether or not Lc matches the contour line LS. Whether or not the differential direction values are evenly distributed can be determined by calculating the standard deviation of the frequency of each differential direction value or by calculating the difference between the maximum frequency and the minimum frequency. That is, when the frequency of the differential direction value is within the specified range, it is determined that the value coincides with the contour line LS.
[0030]
Further, since the contour LS is circular, if the differential direction values of the pixels on the contour LS are sequentially tracked, the differential direction values will change continuously. Therefore, the pixel is tracked along at least a part of the circular line Lc, and when the differentiated direction value of the tracked pixel changes continuously (a slight error is allowed), the circular line Lc is contoured. It is adopted as a line LS (that is, a search line).
[0031]
In the present embodiment, whether or not the contour line LS is determined based on only the differential direction value. However, as in the first embodiment, whether the sum of the differential absolute values on the circular line Lc is larger than a predetermined threshold value is determined. When the sum of the differential absolute values is larger than the threshold value and the differential direction values are uniformly distributed or continuously changing, the circular line Lc is adopted as the contour line LS. You may make it.
[0032]
In the present embodiment, the shape of the inspection object 1 can be identified. That is, since the differential direction values are not uniformly distributed on the contour line LS in the inspection object 1 other than the circle, if the inspection object 1 is not circular, the radius of the circular line Lc is assumed. Is changed, the contour line LS is not detected, and can be eliminated similarly to the inspection object 1 having a defective portion. If the circular line Lc has a size that cannot be set in the image, the process ends without setting the next circular line Lc. That is, if the contour line LS is not detected by the end of the processing, the inspection object 1 is excluded.
[0033]
By the way, in the present embodiment, when a defective portion exists on the contour line LS, the defective portion can be detected by a change in the differential direction value. In order to determine the differential direction value, there are a case where a direction value is given in a direction in which a change in pixel density is maximum, and a case where a direction value is given in a direction in which a change in pixel density is minimum. In the present embodiment, it is assumed that the direction value is given in the direction in which the change in the density of the pixel is maximum. In this case, the differential direction value of the pixel on the contour line of the defective portion is the direction of the center of the defective portion (in the case of a black pixel where the density of the pixel in the defective portion is smaller than the surroundings) or the direction diverging from the center (in the defective portion (In the case of a white pixel where the density of the pixel is larger than the surroundings). If a defect exists on the contour line LS (that is, the search line) detected by the circular line Lc, it is considered that the differential absolute value and the differential direction value are significantly different from other portions.
[0034]
Therefore, when each pixel is traced on the search line (contour line LS) and attention is paid to the change in the differential direction value, if the change in the differential direction value becomes discontinuous, it is determined that a defective portion exists in that portion. Thus, a defective portion can be detected. In order to detect a defective portion more accurately, the differential absolute value is also detected along the search line, and the change in the differential direction value is discontinuous and the sum of the differential absolute values is a threshold value for defect detection. If it is smaller, it may be determined that a defective portion exists. Other processes are the same as in the first embodiment.
[0035]
(Embodiment 7)
In each of the above-described embodiments, the circular line Lc is set, and the circular line Lc that satisfies a specific condition is regarded as the contour line LS. However, even if the circular inspection object 1 is imaged, the image input device 2 uses The captured image may not always be circular. That is, the contour line LS of the inspection object 1 may not be a perfect circle in the image. Therefore, in the present embodiment, as shown in FIG. 6, the contour line LS obtained by using the circular line Lc is divided at a specified center angle (in the illustrated example, divided into six), and each of the divided arcs A is divided. 1 , A 2 , ..., A n Each of the arcs A is moved minutely at each position by using any one of the processing procedures of the first to sixth embodiments. 1 ~ A n And the degree of coincidence with the contour line LS of the inspection object 1 are determined. That is, in each of the above-described embodiments, the contour line LS coincides with the search line. 1 ~ A n It will be set in units. Therefore, the possibility of detecting a defective portion is further increased. Here, each arc A 1 ~ A n Move each arc A 1 ~ A n Are not deformed and the center line direction of the sector is not changed, and only the center position of the sector is moved as shown by the arrow in FIG. In FIG. 7, squares correspond to pixels. The moving range is a range of n × n pixels (n is an odd number of 3 or more). A square area Ds of n × n pixels is set around a center address where the circular line Lc is set, and the center of the square area Ds is set. Starting from the pixel (shaded area), the center of the fan shape is spirally moved in the square area.
[0036]
Thus, each arc A 1 ~ A n Is determined as a search line, and the average value of the density values of the pixels on each search line is obtained. If a defective portion exists on the search line, the density value of the pixel of the defective portion is different from other portions. Therefore, the average value when no defective portion exists is set as a reference value m. By setting an offset value ofs for determining whether or not a defective portion is present, it is determined that the relationship between the actually detected density value b of each pixel and a pixel satisfying the following conditions is a possibility that the pixel is a defective portion pixel. I do.
| B-m |> ofs
Since the pixel satisfying the above condition is a candidate for a defective portion, the number of pixels satisfying the above condition is counted, and when the counting result exceeds a prescribed threshold value, it is determined that a defective portion exists. Other processes are the same as in the first embodiment.
[0037]
(Embodiment 8)
In the seventh embodiment, each arc A serving as a search line 1 ~ A n The example in which a defective portion is detected by using the density of the pixel above is described in the present embodiment. 1 ~ A n Is determined, and a stick mask MS of n pixels (n is an odd number of 3 or more) shaped along the search line as shown in FIG. 2 Set this stick mask MS 2 Scan along the search line. Here, the contour line of the inspection object 1 is circular and each arc A 1 ~ A n To move each arc A 1 ~ A n Stick mask MS 2 Is each arc A 1 ~ A n May be set to a shape that becomes a part of an arc equal to the radius of the circular line Lc in which.
[0038]
Since the defective portion has a different density value from the other portions, that is, the stick mask MS 2 , The sum of the differences between the density values of the pixels located at substantially equal distances across the center pixel is determined, and if this sum is greater than a specified threshold, it is determined that a defective portion exists. That is, as shown in FIG. 2 Is set, and the density values of the pixels sandwiching the center pixel are sequentially set to a 1 , A 2 , B 2 , B 1 When
| A 1 -B 1 | + | A 2 -B 2 |
When this value is larger than the threshold value, it is determined that a defective portion exists. Other processes are the same as in the seventh embodiment.
[0039]
【The invention's effect】
According to the first aspect of the present invention, a center position of a test object having a circular outline in an image is determined, a circular circular line centered on the center position is set, and a circular shape is formed on the outline of the test object. The radius of the circular line is changed one pixel at a time until the line overlaps, and the circular line overlapping the contour of the inspection object is used as a search line to detect the presence or absence of a defect on the search line. By changing the radius of the circular line whose center coincides with the inspection object by one pixel, a circular line matching the outline of the inspection object is obtained, and the circular line matching the outline of the inspection object is searched. Since the line is used to detect a defective portion, even if there is an error in the dimension of the inspection object, a search line can be set according to the error, and as a result, the advantage that the accuracy of detecting the defective portion is increased is obtained. is there.
[0040]
According to a ninth aspect of the present invention, when a change in the differential direction value of a pixel on the search line becomes discontinuous, it is determined that a defective portion exists, or as in the tenth aspect of the present invention. If the change in the differential direction value of the upper pixel becomes discontinuous and the sum of the differential absolute values is smaller than the defect detection threshold, it is determined that a defective portion exists. When a line is set, the amount of calculation can be reduced by using the differential direction value for detecting a defective portion.
[0041]
According to the eleventh aspect of the present invention, a circular line serving as a search line is divided into a plurality of arcs, and the presence or absence of a defective portion is detected for each arc. Since the presence or absence of a defective portion is detected for each arc, there is an advantage that the probability of detecting the defective portion by a finer judgment increases.
According to the twelfth aspect of the present invention, a circular line as a search line is divided into a plurality of arcs, and each arc is moved in a minute range to correct the position of the search line. The position of the search line is corrected by dividing the circular line which is the search line into a plurality of arcs and moving each of the arcs in a minute range, as in the case of detecting the presence / absence of a defective portion or as in the invention of claim 13. Then, at least one element of the density value, the differential absolute value, and the differential direction value of the pixel on each of the corrected arcs is compared with each other, and the presence or absence of a defective portion is detected based on the comparison result. In this method, the position of the search line is corrected not only by dividing the search line into a plurality of arcs but also by moving the search line in a very small area. Not Even in such a case, it is possible to correct the position of each arc so as to approach the contour of the inspection object, and as a result, it is possible to more accurately inspect a defect portion near the outline of the inspection object. There are advantages.
[Brief description of the drawings]
FIG. 1 is an operation explanatory diagram showing Embodiment 1 of the present invention.
FIG. 2 is a block diagram showing an apparatus used in the embodiment.
FIG. 3 is a conceptual explanatory diagram of the above.
FIG. 4 is a conceptual explanatory view of the above.
FIG. 5 is a conceptual explanatory diagram of Embodiment 2 of the present invention.
FIG. 6 is a conceptual explanatory diagram of Embodiment 7 of the present invention.
FIG. 7 is a conceptual explanatory diagram of the above.
FIG. 8 is a conceptual explanatory diagram of Embodiment 8 of the present invention.
[Explanation of symbols]
1 Inspection object
2 Image input device
3 Analog-digital conversion unit
4 Image processing unit
5 Original image memory
6. Differential absolute value image memory
7 Differential direction value image memory
8. Edge image memory
9 Center calculation unit
10 Search line setting section
11 Defect Inspection Department
A 1 ~ A n Arc
CT center address
Lc circular line
Lc 'circular line
LS contour
MS 1 Stick mask for density measurement
MS 2 Stick mask

Claims (15)

画像内で円形の輪郭線を持つ被検査物の中心位置を求め、この中心位置を中心とする円形の円形状ラインを設定するとともに被検査物の輪郭線に円形状ラインが重なるまで円形状ラインの半径を1画素ずつ変化させ、被検査物の輪郭線に重なる円形状ラインを探索ラインとして、探索ライン上の欠陥部の有無を検出することを特徴とする外観検査方法。Find the center position of the inspection object having a circular outline in the image, set a circular circular line centered on this center position, and set the circular line until the circular line overlaps the outline of the inspection object. And changing the radius of each pixel one pixel at a time, and detecting the presence or absence of a defect on the search line using a circular line overlapping the contour of the inspection object as a search line. 半径が1画素分異なる各一対の円形状ラインの上の画素の濃度値の平均値をそれぞれ求め、両平均値の差がライン設定用の閾値より大きいときに前記中心位置に近いほうの円形状ラインを探索ラインとすることを特徴とする請求項1記載の外観検査方法。The average value of the density values of the pixels on each pair of circular lines having a radius different by one pixel is obtained, and when the difference between the two average values is larger than the threshold value for line setting, the circular shape closer to the center position is obtained. 2. The method according to claim 1, wherein the line is a search line. 半径が1画素分異なる各一対の円形状ラインの上の画素の濃度値の平均値をそれぞれ求め、両平均値の比が1付近の規定範囲を逸脱するときに前記中心位置に近いほうの円形状ラインを探索ラインとすることを特徴とする請求項1記載の外観検査方法。The average value of the density values of the pixels on each pair of circular lines having different radii by one pixel is obtained, and when the ratio of the two average values deviates from a prescribed range near 1, the circle closer to the center position is obtained. The appearance inspection method according to claim 1, wherein the shape line is a search line. 半径が1画素分異なる各一対の円形状ラインの上の画素の濃度値の平均値をそれぞれ求め、両平均値の差がライン設定用の第1の閾値より大きいときに前記中心位置に近いほうの円形状ラインを探索ライン候補とし、探索ライン候補の上の画素の微分絶対値の総和がライン設定用の第2の閾値より大きいときに探索ライン候補を探索ラインとすることを特徴とする請求項1記載の外観検査方法。The average value of the density values of the pixels on each pair of circular lines having a radius different by one pixel is obtained, and when the difference between the two average values is larger than the first threshold value for line setting, A search line candidate when the sum of the differential absolute values of the pixels above the search line candidate is larger than a second threshold value for line setting. Item 4. The appearance inspection method according to Item 1. 半径が1画素分異なる各一対の円形状ラインの上の画素の濃度値の平均値および画素の微分絶対値の総和をそれぞれ求め、両平均値の比が1付近の規定範囲を逸脱し、かつ両微分絶対値の比が1付近になるときに前記中心位置に近いほうの円形状ラインを探索ラインとすることを特徴とする請求項1記載の外観検査方法。The average value of the density values of the pixels on each pair of circular lines having different radii by one pixel and the sum of the absolute differential values of the pixels are obtained, and the ratio of the two average values deviates from a prescribed range of around 1, and 2. The appearance inspection method according to claim 1, wherein when the ratio between the absolute values of the two differentials is close to 1, a circular line closer to the center position is set as a search line. 円形状ラインの上の画素の微分方向値のヒストグラムを生成し、前記ヒストグラムにおいてすべての微分方向値の度数が規定範囲内であるときにその円形状ラインを探索ラインとすることを特徴とする請求項1記載の外観検査方法。A histogram of differential direction values of pixels on the circular line is generated, and when the frequencies of all differential direction values in the histogram are within a specified range, the circular line is set as a search line. Item 4. The appearance inspection method according to Item 1. 円形状ラインの上の画素の微分方向値を求め、円形状ラインの少なくとも一部に沿って微分方向値が連続的に変化するときにその円形状ラインを探索ラインとすることを特徴とする請求項1記載の外観検査方法。Calculating a differential direction value of a pixel on the circular line and, when the differential direction value changes continuously along at least a part of the circular line, setting the circular line as a search line; Item 4. The appearance inspection method according to Item 1. 円形状ラインの上の画素の微分絶対値および微分方向値を求め、円形状ラインの上の画素の微分絶対値の総和がライン設定用の閾値より大きくかつその円形状ラインの少なくとも一部に沿って微分方向値が連続的に変化するときにその円形状ラインを探索ラインとすることを特徴とする請求項1記載の外観検査方法。The differential absolute value and the differential direction value of the pixel on the circular line are obtained, and the sum of the differential absolute values of the pixel on the circular line is larger than the line setting threshold and along at least a part of the circular line. 2. The appearance inspection method according to claim 1, wherein when the differential direction value changes continuously, the circular line is used as a search line. 探索ラインの上の画素の微分方向値の変化が不連続になるときに欠陥部が存在すると判断することを特徴とする請求項7または請求項8記載の外観検査方法。9. The visual inspection method according to claim 7, wherein it is determined that a defective portion exists when a change in the differential direction value of a pixel on the search line becomes discontinuous. 探索ラインの上の画素の微分方向値の変化が不連続になり、かつ微分絶対値の総和が欠陥検出用の閾値よりも小さいときに欠陥部が存在すると判断することを特徴とする請求項8記載の外観検査方法。9. The method according to claim 8, wherein when the change in the differential direction value of the pixel on the search line becomes discontinuous and the sum of the differential absolute values is smaller than a defect detection threshold value, it is determined that a defective portion exists. Visual inspection method described. 探索ラインである円形状ラインを複数の弧に分割し、各弧ごとに各別に欠陥部の有無を検出することを特徴とする請求項1記載の外観検査方法。2. The visual inspection method according to claim 1, wherein a circular line serving as a search line is divided into a plurality of arcs, and presence / absence of a defective portion is detected for each arc. 探索ラインである円形状ラインを複数の弧に分割し、各弧を微小範囲で移動させることにより探索ラインの位置を補正し、補正後の探索ラインの上で欠陥部の有無を検出することを特徴とする請求項1記載の外観検査方法。Dividing a circular line, which is a search line, into multiple arcs, correcting the position of the search line by moving each arc within a minute range, and detecting the presence or absence of a defect on the corrected search line. The appearance inspection method according to claim 1, wherein: 探索ラインである円形状ラインを複数の弧に分割し、各弧を微小範囲で移動させることにより探索ラインの位置を補正し、補正後の各弧の上の画素の濃度値と微分絶対値と微分方向値との少なくとも1つの要素について互いに他の弧の要素と比較し、比較結果に基づいて欠陥部の有無を検出することを特徴とする請求項1記載の外観検査方法。The search line is divided into a plurality of arcs, and the position of the search line is corrected by moving each arc in a minute range. 2. The appearance inspection method according to claim 1, wherein at least one element with the differential direction value is compared with another arc element, and the presence or absence of a defective portion is detected based on the comparison result. 探索ラインである円形状ラインを複数の弧に分割し、各弧を微小範囲で移動させることにより探索ラインの位置を補正し、補正後の探索ラインの上の画素の濃度値の平均値を求め、各弧の上の画素のうち前記平均値との差が欠陥検出用の閾値よりも大きい画素の個数を計数し、計数された画素数が規定の閾値よりも大きいときに欠陥部が存在すると判断することを特徴とする請求項1記載の外観検査方法。The search line is divided into a plurality of arcs, and each arc is moved in a small range to correct the position of the search line, and the average value of the density values of the pixels on the corrected search line is calculated. In the pixels on each arc, the number of pixels whose difference from the average value is larger than a threshold for defect detection is counted, and when the counted number of pixels is larger than a prescribed threshold, a defective portion is present. The visual inspection method according to claim 1, wherein the determination is made. 探索ラインである円形状ラインを複数の弧に分割し、各弧を微小範囲で移動させることにより探索ラインの位置を補正し、補正後の探索ラインに沿って移動させる一定画素数のスティックマスクを設定し、スティックマスクの長手方向の中心を挟んで略等距離に位置する画素の濃度値の差の総和を求め、スティックマスクを探索ラインに沿って1画素ずつ移動させたときに前記総和が規定の閾値よりも大きくなると欠陥部が存在すると判断することを特徴とする請求項1記載の外観検査方法。Dividing the circular line that is the search line into multiple arcs, correcting the position of the search line by moving each arc within a small range, and using a stick mask with a fixed number of pixels to move along the corrected search line Is set, the sum of the differences between the density values of pixels located at substantially equal distances across the center in the longitudinal direction of the stick mask is determined, and the sum is defined when the stick mask is moved one pixel at a time along the search line. 2. The appearance inspection method according to claim 1, wherein it is determined that a defective portion exists when the value exceeds the threshold value.
JP16926197A 1997-06-25 1997-06-25 Appearance inspection method Expired - Lifetime JP3580088B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16926197A JP3580088B2 (en) 1997-06-25 1997-06-25 Appearance inspection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16926197A JP3580088B2 (en) 1997-06-25 1997-06-25 Appearance inspection method

Publications (2)

Publication Number Publication Date
JPH1115975A JPH1115975A (en) 1999-01-22
JP3580088B2 true JP3580088B2 (en) 2004-10-20

Family

ID=15883239

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16926197A Expired - Lifetime JP3580088B2 (en) 1997-06-25 1997-06-25 Appearance inspection method

Country Status (1)

Country Link
JP (1) JP3580088B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3858633B2 (en) * 2001-06-25 2006-12-20 松下電器産業株式会社 Bonding state inspection method
JP2003242482A (en) * 2002-02-14 2003-08-29 Hitachi High-Technologies Corp Inspection method and inspection device for circuit pattern
JP5390755B2 (en) * 2007-06-28 2014-01-15 パナソニック株式会社 Appearance inspection method and apparatus using image processing
WO2010044433A1 (en) * 2008-10-14 2010-04-22 芝浦メカトロニクス株式会社 Image processing method, image processing device, and surface inspection device using the image processing device
JP5452035B2 (en) * 2009-02-24 2014-03-26 パナソニック株式会社 Defect inspection method and defect inspection apparatus

Also Published As

Publication number Publication date
JPH1115975A (en) 1999-01-22

Similar Documents

Publication Publication Date Title
JP3524853B2 (en) Pattern inspection apparatus, pattern inspection method, and recording medium
JP2011017705A (en) Pattern inspection device, pattern inspection method, and recording medium
CN105160652A (en) Handset casing testing apparatus and method based on computer vision
CN107796826B (en) Micro duplicate gear broken tooth defect detection method based on tooth center distance curve analysis
US20120213425A1 (en) Combining feature boundaries
CN106815830B (en) Image defect detection method
Hu et al. Rail surface spalling detection based on visual saliency
CN114693651A (en) Rubber ring flow mark detection method and device based on image processing
JP3580088B2 (en) Appearance inspection method
JP2009188239A (en) Pattern evaluation method, program, and method of manufacturing semiconductor device
JP4597509B2 (en) Pattern inspection apparatus and pattern inspection method
JPH0210461B2 (en)
CN113554688B (en) O-shaped sealing ring size measurement method based on monocular vision
JP3508518B2 (en) Appearance inspection method
JP3456096B2 (en) Shape inspection method
CN114994176A (en) Hole defect accurate measurement method based on ultrasonic threshold imaging
JP3675543B2 (en) Image position measurement method
JPH024948B2 (en)
JP2686053B2 (en) Defect inspection method by visual inspection
JPH06160289A (en) Inner face inspection equipment for circular vessel
Lafiosca et al. Automatic Segmentation of Aircraft Dents in Point Clouds
EP1146481A2 (en) Pattern inspection apparatus, pattern inspection method, and recording medium
JP2000321038A (en) Method for detecting fault of pattern
CN114037705B (en) Metal fracture fatigue source detection method and system based on moire lines
JP2710685B2 (en) Defect detection method by visual inspection

Legal Events

Date Code Title Description
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: 20040629

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040712

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

Free format text: PAYMENT UNTIL: 20070730

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20080730

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090730

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090730

Year of fee payment: 5

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20090730

Year of fee payment: 5

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20090730

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100730

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100730

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110730

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120730

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120730

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130730

Year of fee payment: 9

EXPY Cancellation because of completion of term