JP5498109B2 - Defect detection apparatus and defect detection method - Google Patents

Defect detection apparatus and defect detection method Download PDF

Info

Publication number
JP5498109B2
JP5498109B2 JP2009221601A JP2009221601A JP5498109B2 JP 5498109 B2 JP5498109 B2 JP 5498109B2 JP 2009221601 A JP2009221601 A JP 2009221601A JP 2009221601 A JP2009221601 A JP 2009221601A JP 5498109 B2 JP5498109 B2 JP 5498109B2
Authority
JP
Japan
Prior art keywords
defect
gray value
defect candidate
average gray
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2009221601A
Other languages
Japanese (ja)
Other versions
JP2011069742A (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 Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co 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 Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP2009221601A priority Critical patent/JP5498109B2/en
Publication of JP2011069742A publication Critical patent/JP2011069742A/en
Application granted granted Critical
Publication of JP5498109B2 publication Critical patent/JP5498109B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、欠陥検出装置および欠陥検出方法に関するものである。   The present invention relates to a defect detection apparatus and a defect detection method.

従来より、撮像した検査画像に2値化処理や微分処理を施すことによって被検査物の外観上の欠陥の有無を検査する外観検査装置が提供されている(例えば特許文献1参照)。このような外観検査装置では、画像全体で1つの閾値が設定されており、この閾値を基準に各画素の濃淡値を2値化することで、被検査物が欠陥か否かを判別できるようになっている。   2. Description of the Related Art Conventionally, there has been provided an appearance inspection apparatus that inspects the presence or absence of defects on the appearance of an inspection object by performing binarization processing and differentiation processing on a captured inspection image (see, for example, Patent Document 1). In such an appearance inspection apparatus, one threshold value is set for the entire image, and it is possible to determine whether or not the inspection object is defective by binarizing the gray value of each pixel based on this threshold value. It has become.

また、撮像した検査画像に浮動2値化処理を施して欠陥の有無を検査するものも提供されている。この外観検査装置では、検査画像の所定のライン毎に画素の濃淡値の最頻値を算出し、算出した各最頻値に基づいてライン毎に閾値を設定している。そして、ライン毎に設定された閾値を基準に各ラインに含まれる画素の濃淡値をそれぞれ2値化することで、被検査物が欠陥か否かを判別できるようになっている。   In addition, there is also provided an inspection image that is subjected to floating binarization processing to inspect for the presence or absence of defects. In this appearance inspection apparatus, the mode value of the gray value of the pixel is calculated for each predetermined line of the inspection image, and a threshold value is set for each line based on each calculated mode value. Then, it is possible to determine whether or not the inspection object is defective by binarizing the grayscale values of the pixels included in each line on the basis of the threshold value set for each line.

特許第3890844号公報(段落[0020]−段落[0036]、及び、第1図−第15図)Japanese Patent No. 3890844 (paragraph [0020] -paragraph [0036] and FIGS. 1-15)

例えば、成形部と、成形部に保持される金属部とで構成されたコネクタなどの被検査物について成形部の欠陥の有無を検査する場合、上述の前者の外観検査装置では画像全体で1つの閾値が設定されるため、例えば金属部の曲面部分などで生じる反射むらを成形部の欠陥として誤検出する場合があった。   For example, in the case of inspecting the presence or absence of defects in the molded part with respect to an object to be inspected such as a connector constituted by a molded part and a metal part held by the molded part, the above-mentioned former visual inspection apparatus has one entire image. Since the threshold value is set, for example, there is a case where a reflection unevenness generated in a curved surface portion of a metal part is erroneously detected as a defect in the formed part.

また、上述の後者の外観検査装置ではライン毎に閾値が設定されるため、成形部の欠陥については検出できるものの、金属ノイズなどによってコントラストが低くなっている部分についても成形部の欠陥として誤検出してしまうものであった。   In addition, since the threshold value is set for each line in the latter visual inspection apparatus described above, a defect in the molded part can be detected, but a part having a low contrast due to metal noise or the like is erroneously detected as a defect in the molded part. It was something to end up with.

本発明は上記問題点に鑑みて為されたものであり、その目的とするところは、成形部の欠陥の検出精度を向上させた欠陥検出装置および欠陥検出方法を提供することにある。   The present invention has been made in view of the above problems, and an object of the present invention is to provide a defect detection apparatus and a defect detection method that improve the detection accuracy of defects in a molded part.

請求項1の発明は、成形部と、前記成形部に保持される金属部とで構成された被検査物の欠陥を検出するための欠陥検出装置であって、前記被検査物の所定の検査領域を撮像する撮像手段と、前記撮像手段により撮像された検査画像のうち前記金属部に対応する部分画像に対して所定のライン毎に画素の濃淡値の最頻値を算出し、算出した各々の前記最頻値からライン毎に閾値を設定した後、設定した前記閾値を基準に2値化することで欠陥候補画素をライン毎に抽出するとともに、抽出した前記欠陥候補画素に対してラベリング処理を実行して欠陥候補部を設定し、設定した前記欠陥候補部の平均濃淡値を算出する画像処理部と、前記欠陥候補部が欠陥か否かを判別するための予め設定された範囲を記憶する記憶部と、前記欠陥候補部が欠陥か否かを判別する欠陥判断部とを備え、前記画像処理部は、前記検査画像のうち前記成形部に対応する部分画像の平均濃淡値を算出し、前記欠陥判断部は、前記成形部に対応する前記部分画像の前記平均濃淡値と前記欠陥候補部の前記平均濃淡値の差分が前記予め設定された範囲内にある場合、前記欠陥候補部が欠陥であると判断することを特徴とする。 The invention according to claim 1 is a defect detection apparatus for detecting a defect of an inspection object composed of a forming part and a metal part held by the forming part, and a predetermined inspection of the inspection object An imaging unit that captures an area; and a mode value of a gray value of a pixel for each predetermined line with respect to a partial image corresponding to the metal part of an inspection image captured by the imaging unit, and each calculated After setting a threshold value for each line from the mode value, a defect candidate pixel is extracted for each line by binarization based on the set threshold value, and a labeling process is performed on the extracted defect candidate pixel. Is executed to set a defect candidate portion, and an image processing unit that calculates an average gray value of the set defect candidate portion, and a preset range for determining whether or not the defect candidate portion is a defect are stored. a storage unit that, before Symbol defect candidate part is missing And a defect determination unit for determining whether the image processing unit calculates the average gray value of the corresponding partial image to the forming portion of the test image, the defect determination unit, the forming unit when the difference of the average gray value of said average gray value of the corresponding partial image and the defect candidate part is within the range of the preset, wherein the defect candidate part is determined to be defective .

請求項の発明は、前記欠陥判断部は、前記欠陥候補部が前記成形部に隣接している場合、前記欠陥候補部が欠陥であると判断することを特徴とする。 The invention of claim 2, wherein the defect determination unit, when the defect candidate part is adjacent to the forming unit, the defect candidate parts is characterized in that it is determined that the defect.

請求項の発明は、前記画像処理部は、前記欠陥候補部の濃淡値のばらつきを算出し、前記欠陥判断部は、前記欠陥候補部の前記濃淡値のばらつきが予め設定された閾値以下である場合、前記欠陥候補部が欠陥であると判断することを特徴とする。 The invention according to claim 3, wherein the image processing unit calculates a variation of the gray value of the defect candidate parts, the defect determination unit, the variation of the gray value of the defect candidate part below a preset threshold value in some cases, the defect candidate parts is characterized in that it is determined that the defect.

請求項の発明は、前記画像処理部は、前記検査画像のうち前記成形部に対応する部分画像の濃淡値のばらつきを算出し、前記欠陥判断部は、前記部分画像の前記濃淡値のばらつきと前記欠陥候補部の前記濃淡値のばらつきの差分が予め設定された範囲内にある場合、前記欠陥候補部が欠陥であると判断することを特徴とする。 The invention according to claim 4, wherein the image processing unit calculates a variation of the gray value of the corresponding partial image to the forming portion of the test image, the defect determination unit, the variation of the gray value of the partial image If within the scope of the difference of the variation of the gray value is set in advance of the defect candidate parts, the defect candidate parts is characterized in that it is determined that the defect.

請求項5の発明は、成形部と、前記成形部に保持される金属部とで構成された被検査物の欠陥を検出するための欠陥検出方法であって、前記被検査物の所定の検査領域を撮像手段により撮像する検査領域撮像工程と、前記撮像手段により撮像された検査画像のうち前記金属部に対応する部分画像に対して所定のライン毎に画素の濃淡値の最頻値を算出する最頻値算出工程と、算出した各々の前記最頻値からライン毎に閾値を設定し、設定した前記閾値を基準に2値化することで欠陥候補画素をライン毎に抽出する欠陥候補画素抽出工程と、抽出した前記欠陥候補画素に対してラベリング処理を実行して欠陥候補部を設定し、設定した前記欠陥候補部の平均濃淡値を算出する平均濃淡値算出工程と、前記欠陥候補部が欠陥か否かを判別する欠陥判断工程とを備え、前記平均濃淡値算出工程において前記検査画像のうち前記成形部に対応する部分画像の平均濃淡値を算出し、前記欠陥判断工程において前記成形部に対応する前記部分画像の前記平均濃淡値と前記欠陥候補部の前記平均濃淡値の差分が予め設定された範囲内にある場合、前記欠陥候補部が欠陥であると判断することを特徴とする。 The invention according to claim 5 is a defect detection method for detecting a defect of an inspection object composed of a forming part and a metal part held by the forming part, and a predetermined inspection of the inspection object An inspection area imaging step of imaging an area by an imaging unit, and a mode value of a gray value of a pixel for each predetermined line with respect to a partial image corresponding to the metal part in an inspection image captured by the imaging unit A mode value calculating step, a threshold value is set for each line from each calculated mode value, and defect candidate pixels are extracted for each line by binarization based on the set threshold value an extraction step, the extracted running labeling processing on the defective pixel candidate setting the defect candidate part, and the average gray value calculation step of calculating an average gray value of the defect candidate part that is set before Symbol defect candidate Defects that determine whether a part is defective And a cross-sectional step, the calculated at the average gray value calculation step the average gray value of the corresponding partial image to the forming portion of the test image, said of the partial image corresponding to the molding portion in the defect decision step When the difference between the average gray value and the average gray value of the defect candidate portion is within a preset range, it is determined that the defect candidate portion is a defect.

請求項1の発明によれば、欠陥候補部の平均濃淡値を欠陥閾値と比較することによって、成形部の欠陥と金属部の金属ノイズの判別が可能になることから誤検出を低減することができ、その結果成形部の欠陥の検出精度を向上させることができる。しかも、誤検出を低減することで生産性を向上させることもできるという効果がある。   According to the invention of claim 1, by comparing the average gray value of the defect candidate portion with the defect threshold value, it becomes possible to discriminate between the defect of the formed portion and the metal noise of the metal portion, thereby reducing false detection. As a result, it is possible to improve the accuracy of detecting defects in the molded part. Moreover, there is an effect that productivity can be improved by reducing false detection.

また、欠陥候補部の平均濃淡値を成形部の平均濃淡値と比較することによって、現物に即した比較が可能になることからさらに誤検出を低減することができ、その結果検出精度をさらに向上させることができるという効果がある。 In addition , by comparing the average gray value of the defect candidate part with the average gray value of the molding part, it becomes possible to make a comparison in accordance with the actual product, so that false detection can be further reduced, and as a result, detection accuracy is further improved. There is an effect that can be made.

請求項の発明によれば、欠陥候補部が成形部に隣接している場合には当該欠陥候補部が欠陥である可能性が高く、欠陥候補部および成形部の平均濃淡値の比較結果と合わせて評価することで、請求項に比べて誤検出を低減することができ、その結果検出精度をさらに向上させることができるという効果がある。 According to the invention of claim 2 , when the defect candidate part is adjacent to the molding part, the defect candidate part is highly likely to be a defect, and the comparison result of the average gray value of the defect candidate part and the molding part is By evaluating together, it is possible to reduce erroneous detection as compared with the first aspect, and as a result, there is an effect that detection accuracy can be further improved.

請求項の発明によれば、欠陥候補部が金属ノイズによるものである場合には濃淡値のばらつきが大きくなることから、濃淡値のばらつきを所定の閾値と比較することによって、欠陥候補部が金属ノイズによるものか否かを判別することができ、その結果検出精度をさらに向上させることができるという効果がある。 According to the invention of claim 3 , when the defect candidate portion is caused by metal noise, the variation of the gray value becomes large. Therefore, by comparing the variation of the gray value with the predetermined threshold, the defect candidate portion It is possible to determine whether or not it is due to metal noise, and as a result, the detection accuracy can be further improved.

請求項の発明によれば、欠陥候補部の濃淡値のばらつきを成形部の濃淡値のばらつきと比較することによって、現物に即した比較が可能になることから請求項に比べて誤検出を低減することができ、その結果検出精度をさらに向上させることができるという効果がある。 According to the invention of claim 4, by comparing the variation of the gray value of the defect candidate parts and the variation of the gray value of the molded part, erroneously compared to claim 3 since it becomes possible to compare in line with actual detection As a result, the detection accuracy can be further improved.

請求項の発明によれば、成形部の欠陥と金属部の金属ノイズの判別が可能な検出精度の高い欠陥検出方法を実現することができるという効果がある。また、欠陥候補部の平均濃淡値を成形部の平均濃淡値と比較することによって、現物に即した比較が可能になることからさらに誤検出を低減することができ、その結果検出精度をさらに向上させることができるという効果もある。 According to the invention of claim 5 , there is an effect that it is possible to realize a defect detection method with high detection accuracy capable of discriminating between defects in the formed part and metal noise in the metal part. In addition, by comparing the average gray value of the defect candidate part with the average gray value of the molding part, it becomes possible to make a comparison in accordance with the actual product, so that false detection can be further reduced, and as a result, detection accuracy is further improved. There is also an effect that can be made.

実施形態1の欠陥検査装置を示す概略ブロック図である。It is a schematic block diagram which shows the defect inspection apparatus of Embodiment 1. 同上の被検査物の一例であるコネクタの断面斜視図である。It is a cross-sectional perspective view of the connector which is an example of a test object same as the above. (a)は同上の検査画像、(b),(c)は検査画像のうち金属部に対応する部分画像の濃淡値を表すデータ図である。(A) is an inspection image same as the above, and (b) and (c) are data diagrams showing the gray value of a partial image corresponding to a metal part in the inspection image. 同上のフローチャートである。It is a flowchart same as the above. 実施形態2の欠陥検査装置の検査画像である。It is an inspection image of the defect inspection apparatus of Embodiment 2. 同上のフローチャートである。It is a flowchart same as the above. 実施形態3の欠陥検査装置のフローチャートである。It is a flowchart of the defect inspection apparatus of Embodiment 3. 実施形態4の欠陥検査装置のフローチャートである。It is a flowchart of the defect inspection apparatus of Embodiment 4. 実施形態5の欠陥検査装置のフローチャートである。It is a flowchart of the defect inspection apparatus of Embodiment 5.

以下に、本発明に係る欠陥検出装置および欠陥検出方法の実施形態を図面に基づいて説明する。本発明に係る欠陥検出装置は、被検査物(例えば後述するコネクタなど)の製造上の欠陥を検出するために用いられるものである。   Hereinafter, embodiments of a defect detection apparatus and a defect detection method according to the present invention will be described with reference to the drawings. The defect detection apparatus according to the present invention is used to detect a manufacturing defect of an inspection object (for example, a connector described later).

(実施形態1)
図1は実施形態1の欠陥検出装置Aを示す概略ブロック図であり、本欠陥検出装置Aは、例えばCCDカメラからなり被検査物Bの所定の検査領域を撮像する撮像手段1と、撮像手段1により撮像された検査画像P1(図3(a)参照)に対して後述の画像処理を実行する画像処理部2と、後述の欠陥閾値を記憶させるための記憶部3と、記憶部3に記憶させた欠陥閾値に基づいて被検査物Bが欠陥か否かを判別する欠陥判断部4とを備えている。
(Embodiment 1)
FIG. 1 is a schematic block diagram illustrating a defect detection apparatus A according to the first embodiment. The defect detection apparatus A includes, for example, an imaging unit 1 that includes a CCD camera and images a predetermined inspection area of an inspection object B, and an imaging unit. 1, an image processing unit 2 that executes image processing to be described later on the inspection image P <b> 1 (see FIG. 3A), a storage unit 3 for storing a defect threshold to be described later, and the storage unit 3. And a defect determination unit 4 for determining whether or not the inspection object B is defective based on the stored defect threshold.

図2は被検査物Bの一例であるコネクタ5の断面斜視図であり、本コネクタ5は、例えば1対のプリント基板(図示せず)を電気的且つ機械的に接続するためのコネクタであって、合成樹脂成形品からなる縦長の成形部5aと、成形部5aの長手方向に沿って等間隔に配置された複数の金属端子からなる金属部5bとで構成されている。なお、コネクタ5については従来周知のものであるから、詳細については説明を省略する。また、上記のコネクタ5は一方のプリント基板に実装されるコネクタであり、他方のプリント基板に実装されるコネクタについては図示および説明を省略している。   FIG. 2 is a cross-sectional perspective view of a connector 5 which is an example of an inspection object B. The connector 5 is a connector for electrically and mechanically connecting a pair of printed circuit boards (not shown), for example. Thus, it is composed of a vertically long molded part 5a made of a synthetic resin molded product and a metal part 5b made of a plurality of metal terminals arranged at equal intervals along the longitudinal direction of the molded part 5a. Since the connector 5 is well known in the art, a detailed description thereof will be omitted. The connector 5 is a connector mounted on one printed circuit board, and illustration and description of the connector mounted on the other printed circuit board are omitted.

図3(a)は撮像手段1により撮像された検査画像P1を示しており、この検査画像P1は、図2中の矢印C方向からコネクタ5の一部を撮像したものである。また、図3(b)および図3(c)は、検査画像P1のうち金属部5bに対応する部分画像を検査エリアa1に設定した場合の各画素の濃淡値を表すデータ図であり、各画素中の数値はそれぞれの濃淡値を示している。なお、上記の検査エリアa1は、例えば所定の基準点を中心として自動的に設定するように構成してもいいし、またモニターなどを見ながら手動で設定するように構成してもよい。   FIG. 3A shows an inspection image P1 imaged by the imaging means 1, and this inspection image P1 is obtained by imaging a part of the connector 5 from the direction of arrow C in FIG. 3 (b) and 3 (c) are data diagrams showing the gray value of each pixel when a partial image corresponding to the metal part 5b in the inspection image P1 is set in the inspection area a1, Numerical values in the pixels indicate the respective shade values. The inspection area a1 may be configured to be automatically set around a predetermined reference point, for example, or may be configured to be manually set while looking at a monitor or the like.

ところで、上記の画像処理部2では、図3(b)に示すように、金属部5bに対応する部分画像に対してラインa〜f毎に画素の濃淡値の最頻値(図3(b)中の○印で囲まれた値)を算出し、算出した各最頻値からラインa〜f毎に2値化のための閾値を設定する。さらに、各閾値を基準に各画素の濃淡値を2値化して、閾値よりも濃淡値が低い欠陥候補画素(図3(b)中の網掛け部分)をラインa〜f毎に抽出する。そして最後に、抽出した欠陥候補画素に対してラベリング処理を実行して欠陥候補部b1,b2を設定し(図3(c)参照)、各欠陥候補部b1,b2の平均濃淡値を算出する。本実施形態では、欠陥候補部b1の平均濃淡値は、(80+81+79+80+81+79+80+80)÷8=80となり、欠陥候補部b2の平均濃淡値は、(105+100+90+120)÷4≒103となる。なお、本実施形態では、抽出した各欠陥候補画素に対して4近傍の画素を同一の欠陥候補部に設定し、各欠陥候補部に対してそれぞれラベリングしている。例えば、本実施形態では、図3(b)中の左上の欠陥候補部にラベルb1を割り付け、また右下の欠陥候補部にラベルb2を割り付けている。ここに4近傍とは、ある画素に対して上下左右方向において隣接する画素のことをいう。   By the way, in the image processing unit 2 described above, as shown in FIG. 3B, the mode value of the gray value of the pixel for each line af with respect to the partial image corresponding to the metal portion 5b (FIG. 3B). ), And a threshold value for binarization is set for each of the lines a to f from the calculated mode values. Further, the gray value of each pixel is binarized on the basis of each threshold value, and defect candidate pixels (shaded portions in FIG. 3B) having a gray value lower than the threshold value are extracted for each of the lines a to f. Finally, a labeling process is performed on the extracted defect candidate pixels to set defect candidate portions b1 and b2 (see FIG. 3C), and an average gray value of each defect candidate portion b1 and b2 is calculated. . In the present embodiment, the average gray value of the defect candidate part b1 is (80 + 81 + 79 + 80 + 81 + 79 + 80 + 80) ÷ 8 = 80, and the average gray value of the defect candidate part b2 is (105 + 100 + 90 + 120) ÷ 4≈103. In the present embodiment, four neighboring pixels are set in the same defect candidate portion for each extracted defect candidate pixel, and each defect candidate portion is labeled. For example, in the present embodiment, the label b1 is assigned to the upper left defect candidate portion in FIG. 3B, and the label b2 is assigned to the lower right defect candidate portion. Here, the vicinity of 4 means a pixel adjacent to a certain pixel in the vertical and horizontal directions.

また、上記の記憶部3には欠陥候補部が欠陥か否かを判別するための欠陥閾値(例えば本実施形態では成形バリと金属ノイズを弁別するための値として100に設定)が予め記憶されており、欠陥判断部4では、欠陥候補部の平均濃淡値と欠陥閾値を比較することで欠陥候補部が欠陥か否かを判別する。例えば、本実施形態では、欠陥候補部b1の平均濃淡値は80であり、欠陥閾値100よりも小さいことから欠陥候補部b1は成形バリであると判断される。一方、欠陥候補部b2の平均濃淡値は103であり、欠陥閾値100よりも大きいことから欠陥候補部b2は成形バリではないと判断される。ここに、欠陥候補部b1は成形部5aの成形バリ5c(図3(a)参照)であり、また欠陥候補部b2は金属部5bの金属ノイズ(例えば反射むらなど)であるから、本実施形態の欠陥検出装置Aによれば、成形部5aの欠陥(成形バリ5c)と金属部5bの金属ノイズの判別が可能になることから誤検出を低減することができ、その結果成形部5aの欠陥の検出精度を向上させることができる。しかも、誤検出を低減することで生産性を向上させることもできる。   Further, a defect threshold value (for example, set to 100 as a value for discriminating forming burr and metal noise in this embodiment) is stored in the storage unit 3 in advance to determine whether or not the defect candidate portion is a defect. The defect determination unit 4 determines whether or not the defect candidate portion is defective by comparing the average gray value of the defect candidate portion with the defect threshold value. For example, in this embodiment, since the average gray value of the defect candidate portion b1 is 80 and is smaller than the defect threshold 100, the defect candidate portion b1 is determined to be a molding burr. On the other hand, the average gray value of the defect candidate portion b2 is 103, which is larger than the defect threshold 100, so that the defect candidate portion b2 is determined not to be a molding burr. Here, the defect candidate part b1 is a molding burr 5c (see FIG. 3A) of the molding part 5a, and the defect candidate part b2 is a metal noise (for example, uneven reflection) of the metal part 5b. According to the defect detection apparatus A of the embodiment, it becomes possible to discriminate between a defect (molding burr 5c) of the molded part 5a and a metal noise of the metal part 5b, so that false detection can be reduced, and as a result, Defect detection accuracy can be improved. In addition, productivity can be improved by reducing false detection.

次に、本欠陥検出装置Aの動作について図4のフローチャートを参照しながら説明する。まず最初に、撮像手段1によりコネクタ5の検査画像P1を撮像し(ステップS1)、撮像した検査画像P1のうち金属部5bに対応する部分画像を検査エリアa1に設定する(ステップS2)。次に、画像処理部2は、上記の部分画像に対してラインa〜f毎に画素の濃淡値の最頻値を算出し(ステップS3)、各最頻値に対してそれぞれ所定のオフセット値を与えてラインa〜f毎に閾値を設定する。さらに、画像処理部2は、各閾値を基準に各画素の濃淡値の2値化を行って欠陥候補画素をラインa〜f毎に抽出し(ステップS4)、その後抽出した欠陥候補画素に対してラベリング処理を実行して欠陥候補部b1,b2を設定するとともに、各欠陥候補部b1,b2の平均濃淡値を算出する(ステップS5)。そして、欠陥判断部4は、各欠陥候補部b1,b2の平均濃淡値と、記憶部3に記憶させた欠陥閾値を比較し、各欠陥候補部b1,b2の平均濃淡値が欠陥閾値よりも低い場合には成形バリであると判断する(ステップS6)。本実施形態では、欠陥判断部4は、欠陥候補部b1を成形バリであると判断し、欠陥候補部b2については成形バリではないとして除外するので、成形バリのみを欠陥として抽出できる。   Next, the operation of the defect detection apparatus A will be described with reference to the flowchart of FIG. First, an inspection image P1 of the connector 5 is imaged by the imaging means 1 (step S1), and a partial image corresponding to the metal part 5b is set in the inspection area a1 in the captured inspection image P1 (step S2). Next, the image processing unit 2 calculates the mode value of the gray value of the pixel for each line a to f with respect to the partial image (step S3), and a predetermined offset value for each mode value. And a threshold value is set for each of the lines a to f. Furthermore, the image processing unit 2 binarizes the gray value of each pixel based on each threshold value, extracts defect candidate pixels for each of the lines a to f (step S4), and then extracts the defect candidate pixels that have been extracted. Then, the labeling process is executed to set the defect candidate parts b1 and b2, and the average gray value of the defect candidate parts b1 and b2 is calculated (step S5). And the defect judgment part 4 compares the average gray value of each defect candidate part b1, b2 with the defect threshold value memorize | stored in the memory | storage part 3, and the average gray value of each defect candidate part b1, b2 is more than a defect threshold value. If it is low, it is determined that it is a molding burr (step S6). In the present embodiment, the defect determination unit 4 determines that the defect candidate portion b1 is a molding burr and excludes the defect candidate portion b2 as not being a molding burr, so that only the molding burr can be extracted as a defect.

ここに、上記のステップS1が検査領域撮像工程、ステップS3が最頻値算出工程、ステップS4が欠陥候補画素抽出工程、ステップS5が平均濃淡値算出工程、ステップS6が欠陥判断工程であり、本実施形態によれば、成形部5aの欠陥(成形バリ5c)と金属部5bの金属ノイズの判別が可能な検出精度の高い欠陥検出方法を実現することができる。   Here, the above-described step S1 is an inspection region imaging step, step S3 is a mode value calculation step, step S4 is a defect candidate pixel extraction step, step S5 is an average gray value calculation step, and step S6 is a defect determination step. According to the embodiment, it is possible to realize a defect detection method with high detection accuracy capable of discriminating a defect (molding burr 5c) of the molded part 5a and metal noise of the metal part 5b.

なお、上記の欠陥閾値は一例であって、被検査物に応じて適宜設定すればよい。   Note that the above defect threshold is an example, and may be set as appropriate according to the inspection object.

(実施形態2)
本発明に係る欠陥検出装置の実施形態2について説明する。実施形態1では、欠陥候補部b1,b2の平均濃淡値を記憶部3に予め記憶させた欠陥閾値と比較することで、欠陥候補部b1,b2が欠陥か否かを判別しているが、本実施形態では、検査画像P1のうち成形部5aに対応する部分画像の平均濃淡値を算出し、欠陥候補部b1,b2の平均濃淡値と上記成形部5aの平均濃淡値を比較することで、欠陥候補部b1,b2が欠陥か否かを判別している。なお、それ以外の構成については実施形態1と同様であり、同一の構成要素には同一の符号を付して説明は省略する。また、以下の説明では、図1〜図3も参照しながら説明する。
(Embodiment 2)
Embodiment 2 of the defect detection apparatus according to the present invention will be described. In the first embodiment, it is determined whether or not the defect candidate parts b1 and b2 are defective by comparing the average gray value of the defect candidate parts b1 and b2 with a defect threshold value stored in the storage unit 3 in advance. In the present embodiment, the average gray value of the partial image corresponding to the molding part 5a in the inspection image P1 is calculated, and the average gray value of the defect candidate parts b1 and b2 is compared with the average gray value of the molding part 5a. It is determined whether or not the defect candidate parts b1 and b2 are defective. In addition, about another structure, it is the same as that of Embodiment 1, the same code | symbol is attached | subjected to the same component and description is abbreviate | omitted. The following description will be given with reference to FIGS.

本実施形態の欠陥検出装置Aは、撮像手段1と、画像処理部2と、記憶部3と、欠陥判断部4とを備えている。   The defect detection apparatus A of the present embodiment includes an imaging unit 1, an image processing unit 2, a storage unit 3, and a defect determination unit 4.

画像処理部2では、実施形態1と同様の処理を経て各欠陥候補部b1,b2の平均濃淡値(実施形態1よりそれぞれ80,103)を算出し、さらに検査画像P1のうち成形部5aに対応する部分画像を検査エリアa2に設定し(図5参照)、この検査エリアa2の平均濃淡値を算出する。なお、以下の説明では、検査エリアa2の平均濃淡値が90であるとして説明する。そして、欠陥判断部4では、欠陥候補部b1,b2の平均濃淡値と検査エリアa2の平均濃淡値の差分を取り、この差分が予め設定された範囲(例えば±10)内にある場合には成形バリであると判断し、成形バリのみを欠陥として抽出する。なお、上記差分の許容範囲については、記憶部3に予め記憶させている。   The image processing unit 2 calculates the average gray value of the defect candidate portions b1 and b2 (80 and 103, respectively from the first embodiment) through the same processing as in the first embodiment, and further in the molding unit 5a in the inspection image P1. The corresponding partial image is set in the inspection area a2 (see FIG. 5), and the average gray value of the inspection area a2 is calculated. In the following description, it is assumed that the average gray value of the inspection area a2 is 90. Then, the defect determination unit 4 takes the difference between the average gray value of the defect candidate parts b1 and b2 and the average gray value of the inspection area a2, and if this difference is within a preset range (for example, ± 10). It is determined that the burr is a molding burr, and only the molding burr is extracted as a defect. Note that the allowable range of the difference is stored in the storage unit 3 in advance.

次に、本欠陥検出装置Aの動作について図6のフローチャートを参照しながら説明する。まず最初に、撮像手段1によりコネクタ5の検査画像P1を撮像し(ステップS1)、撮像した検査画像P1のうち金属部5bに対応する部分画像を検査エリアa1に設定する(ステップS2)。次に、画像処理部2は、上記の部分画像に対してラインa〜f毎に画素の濃淡値の最頻値を算出し(ステップS3)、各最頻値に対してそれぞれ所定のオフセット値を与えてラインa〜f毎に閾値を設定する。さらに、画像処理部2は、各閾値を基準に各画素の濃淡値の2値化を行って欠陥候補画素をラインa〜f毎に抽出し(ステップS4)、その後抽出した欠陥候補画素に対してラベリング処理を実行して欠陥候補部b1,b2を設定するとともに、各欠陥候補部b1,b2の平均濃淡値を算出する(ステップS5)。また、画像処理部2は、検査画像P1のうち成形部5aに対応する部分画像を検査エリアa2に設定し(ステップS6)、この検査エリアa2の平均濃淡値を算出する(ステップS7)。そして、欠陥判断部4は、各欠陥候補部b1,b2の平均濃淡値と、検査エリアa2の平均濃淡値の差分を取り、この差分が所定範囲(±10)内にある場合に成形バリであると判断する(ステップS8)。本実施形態では、欠陥候補部b1と検査エリアa2の平均濃淡値の差分は10であるから成形バリであると判断され、欠陥候補部b2と検査エリアa2の平均濃淡値の差分は13であるから成形バリではないとして除外されるので、成形バリのみを欠陥として抽出できる。   Next, the operation of the defect detection apparatus A will be described with reference to the flowchart of FIG. First, an inspection image P1 of the connector 5 is imaged by the imaging means 1 (step S1), and a partial image corresponding to the metal part 5b is set in the inspection area a1 in the captured inspection image P1 (step S2). Next, the image processing unit 2 calculates the mode value of the gray value of the pixel for each line a to f with respect to the partial image (step S3), and a predetermined offset value for each mode value. And a threshold value is set for each of the lines a to f. Furthermore, the image processing unit 2 binarizes the gray value of each pixel based on each threshold value, extracts defect candidate pixels for each of the lines a to f (step S4), and then extracts the defect candidate pixels that have been extracted. Then, the labeling process is executed to set the defect candidate parts b1 and b2, and the average gray value of the defect candidate parts b1 and b2 is calculated (step S5). The image processing unit 2 sets a partial image corresponding to the forming unit 5a in the inspection image P1 in the inspection area a2 (step S6), and calculates an average gray value of the inspection area a2 (step S7). Then, the defect judgment unit 4 takes the difference between the average gray value of the defect candidate portions b1 and b2 and the average gray value of the inspection area a2, and if this difference is within a predetermined range (± 10), the defect judgment unit 4 It is determined that there is (step S8). In the present embodiment, since the difference in the average gray value between the defect candidate part b1 and the inspection area a2 is 10, it is determined as a molding burr, and the difference in the average gray value between the defect candidate part b2 and the inspection area a2 is 13. Therefore, only molding burrs can be extracted as defects.

而して、本実施形態によれば、欠陥候補部b1,b2の平均濃淡値を成形部5aに対応する検査エリアa2の平均濃淡値と比較することによって、現物に即した比較が可能になることから実施形態1に比べて誤検出を低減することができ、その結果検出精度をさらに向上させることができる。   Thus, according to the present embodiment, by comparing the average gray value of the defect candidate portions b1 and b2 with the average gray value of the inspection area a2 corresponding to the forming portion 5a, comparison according to the actual product becomes possible. Therefore, erroneous detection can be reduced compared to the first embodiment, and as a result, detection accuracy can be further improved.

なお、上記差分の範囲は一例であって、被検査物に応じて適宜設定すればよい。   The range of the difference is an example, and may be set as appropriate according to the inspection object.

(実施形態3)
本発明に係る欠陥検出装置の実施形態3について説明する。実施形態2では、欠陥候補部b1,b2の平均濃淡値を成形部5aに対応する検査エリアa2の平均濃淡値と比較することで、欠陥候補部b1,b2が欠陥か否か判別しているが、本実施形態では、さらに各欠陥候補部b1,b2の位置情報を算出し、この位置情報と上記比較結果に基づいて欠陥か否かを判別している。なお、それ以外の構成については実施形態2と同様であり、同一の構成要素には同一の符号を付して説明は省略する。また、以下の説明では、図1〜図3および図5も参照しながら説明する。
(Embodiment 3)
Embodiment 3 of the defect detection apparatus according to the present invention will be described. In the second embodiment, it is determined whether or not the defect candidate parts b1 and b2 are defective by comparing the average gray value of the defect candidate parts b1 and b2 with the average gray value of the inspection area a2 corresponding to the molding part 5a. However, in this embodiment, the position information of the defect candidate parts b1 and b2 is further calculated, and it is determined whether or not the defect is based on the position information and the comparison result. In addition, about another structure, it is the same as that of Embodiment 2, and attaches | subjects the same code | symbol to the same component, and abbreviate | omits description. Further, the following description will be given with reference to FIGS. 1 to 3 and FIG.

本実施形態の欠陥検出装置Aは、撮像手段1と、画像処理部2と、記憶部3と、欠陥判断部4とを備えている。   The defect detection apparatus A of the present embodiment includes an imaging unit 1, an image processing unit 2, a storage unit 3, and a defect determination unit 4.

画像処理部2では、実施形態2と同様の処理を経て各欠陥候補部b1,b2の平均濃淡値、および成形部5aに対応する検査エリアa2の平均濃淡値を算出し、さらに各欠陥候補部b1,b2の位置情報を算出する。そして、欠陥判断部4では、各欠陥候補部b1,b2と検査エリアa2の平均濃淡値の差分が所定範囲(例えば±10)内にあって、且つ各欠陥候補部b1,b2が成形部5aに接している場合に成形バリであると判断し、成形バリのみを欠陥として抽出する。なお、上記差分の許容範囲については、実施形態2と同様に記憶部3に予め記憶させている。ここに、上記の位置情報とは、各欠陥候補部b1,b2の輪郭部の座標であり、各輪郭部の座標が成形部5aの輪郭座標に近い場合、成形バリであると判断される。   The image processing unit 2 calculates the average gray value of the defect candidate portions b1 and b2 and the average gray value of the inspection area a2 corresponding to the forming unit 5a through the same processing as in the second embodiment, and further each defect candidate portion. The position information of b1 and b2 is calculated. In the defect determination unit 4, the difference between the average gray values of the defect candidate portions b1 and b2 and the inspection area a2 is within a predetermined range (for example, ± 10), and the defect candidate portions b1 and b2 are formed in the molding unit 5a. If it is in contact with the metal, it is judged as a molding burr, and only the molding burr is extracted as a defect. The allowable range of the difference is stored in advance in the storage unit 3 as in the second embodiment. Here, the position information is the coordinates of the contour portions of the defect candidate portions b1 and b2, and when the coordinates of the contour portions are close to the contour coordinates of the forming portion 5a, it is determined that it is a forming burr.

次に、本欠陥検出装置Aの動作について図7のフローチャートを参照しながら説明する。まず最初に、撮像手段1によりコネクタ5の検査画像P1を撮像し(ステップS1)、撮像した検査画像P1のうち金属部5bに対応する部分画像を検査エリアa1に設定する(ステップS2)。次に、画像処理部2は、上記の部分画像に対してラインa〜f毎に画素の濃淡値の最頻値を算出し(ステップS3)、各最頻値に対してそれぞれ所定のオフセット値を与えてラインa〜f毎に閾値を設定する。さらに、画像処理部2は、各閾値を基準に各画素の濃淡値の2値化を行って欠陥候補画素をラインa〜f毎に抽出し(ステップS4)、その後抽出した欠陥候補画素に対してラベリング処理を実行して欠陥候補部b1,b2を設定し、各欠陥候補部b1,b2の平均濃淡値を算出するとともに位置情報を算出する(ステップS5)。また、画像処理部2は、検査画像P1のうち成形部5aに対応する部分画像を検査エリアa2に設定し(ステップS6)、この検査エリアa2の平均濃淡値を算出する(ステップS7)。そして、欠陥判断部4は、各欠陥候補部b1,b2の平均濃淡値と、検査エリアa2の平均濃淡値の差分を取り、この差分が所定範囲(±10)内にあって、且つ各欠陥候補部b1,b2が成形部5aに接している場合に成形バリであると判断する(ステップS8)。本実施形態では、欠陥候補部b1と検査エリアa2の平均濃淡値の差分は10であり、且つ欠陥候補部b1は成形部5aに接していることから成形バリであると判断される。一方、欠陥候補部b2と検査エリアa2の平均濃淡値の差分は13であり、また欠陥候補部b2は成形部5aに接していないことから成形バリではないとして除外される。その結果、成形バリのみを欠陥として抽出することができる。   Next, the operation of the defect detection apparatus A will be described with reference to the flowchart of FIG. First, an inspection image P1 of the connector 5 is imaged by the imaging means 1 (step S1), and a partial image corresponding to the metal part 5b is set in the inspection area a1 in the captured inspection image P1 (step S2). Next, the image processing unit 2 calculates the mode value of the gray value of the pixel for each line a to f with respect to the partial image (step S3), and a predetermined offset value for each mode value. And a threshold value is set for each of the lines a to f. Furthermore, the image processing unit 2 binarizes the gray value of each pixel based on each threshold value, extracts defect candidate pixels for each of the lines a to f (step S4), and then extracts the defect candidate pixels that have been extracted. Then, the labeling process is executed to set the defect candidate parts b1 and b2, and the average gray value of each defect candidate part b1 and b2 is calculated and the position information is calculated (step S5). The image processing unit 2 sets a partial image corresponding to the forming unit 5a in the inspection image P1 in the inspection area a2 (step S6), and calculates an average gray value of the inspection area a2 (step S7). Then, the defect determination unit 4 takes the difference between the average gray value of the defect candidate portions b1 and b2 and the average gray value of the inspection area a2, and the difference is within a predetermined range (± 10), and each defect When the candidate parts b1 and b2 are in contact with the molding part 5a, it is determined that it is a molding burr (step S8). In the present embodiment, the difference in average gray value between the defect candidate part b1 and the inspection area a2 is 10, and the defect candidate part b1 is in contact with the molding part 5a, so that it is determined as a molding burr. On the other hand, the difference in the average gray value between the defect candidate part b2 and the inspection area a2 is 13, and since the defect candidate part b2 is not in contact with the molding part 5a, it is excluded as not being a molding burr. As a result, only molding burrs can be extracted as defects.

而して、本実施形態によれば、欠陥候補部が成形部に隣接している場合には当該欠陥候補部が欠陥である可能性が高く、欠陥候補部および成形部の平均濃淡値の比較結果と合わせて評価することで、実施形態2に比べて誤検出を低減することができ、その結果検出精度をさらに向上させることができる。   Thus, according to the present embodiment, when the defect candidate part is adjacent to the molding part, the defect candidate part is likely to be a defect, and the average gray value of the defect candidate part and the molding part is compared. By evaluating together with the result, it is possible to reduce false detection as compared with the second embodiment, and as a result, detection accuracy can be further improved.

(実施形態4)
本発明に係る欠陥検出装置の実施形態4について説明する。実施形態3では、欠陥候補部b1,b2の平均濃淡値と、成形部5aに対応する検査エリアa2の平均濃淡値の比較結果、および各欠陥候補部b1,b2の位置情報に基づいて欠陥か否か判別しているが、本実施形態では、さらに各欠陥候補部b1,b2の濃淡値のばらつき(以下、標準偏差という)を算出し、この標準偏差と上記比較結果と位置情報に基づいて欠陥か否かを判別している。なお、それ以外の構成については実施形態3と同様であり、同一の構成要素には同一の符号を付して説明は省略する。また、以下の説明では、図1〜図3および図5も参照しながら説明する。
(Embodiment 4)
Embodiment 4 of the defect detection apparatus according to the present invention will be described. In the third embodiment, whether or not the defect is based on the comparison result of the average gray value of the defect candidate parts b1 and b2 and the average gray value of the inspection area a2 corresponding to the forming part 5a and the positional information of each defect candidate part b1 and b2. In this embodiment, the variation of the gray value of the defect candidate parts b1 and b2 (hereinafter referred to as standard deviation) is further calculated, and based on the standard deviation, the comparison result, and the position information. It is determined whether or not it is a defect. In addition, about another structure, it is the same as that of Embodiment 3, and attaches | subjects the same code | symbol to the same component, and abbreviate | omits description. Further, the following description will be given with reference to FIGS. 1 to 3 and FIG.

本実施形態の欠陥検出装置Aは、撮像手段1と、画像処理部2と、記憶部3と、欠陥判断部4とを備えている。   The defect detection apparatus A of the present embodiment includes an imaging unit 1, an image processing unit 2, a storage unit 3, and a defect determination unit 4.

画像処理部2では、実施形態3と同様の処理を経て各欠陥候補部b1,b2の平均濃淡値、位置情報、および成形部5aに対応する検査エリアa2の平均濃淡値を算出し、さらに各欠陥候補部b1,b2の標準偏差を算出する。そして、欠陥判断部4では、各欠陥候補部b1,b2の平均濃淡値と検査エリアa2の平均濃淡値の差分を取り、この差分が所定範囲内にあって、且つ各欠陥候補部b1,b2が成形部5aに接しており、且つ標準偏差が予め設定された閾値(例えば本実施形態では5に設定)以下である場合に成形バリであると判断し、成形バリのみを欠陥として抽出する。ここで、標準偏差σは、
で求められ、(1)式より欠陥候補部b1の標準偏差σ=0.76、欠陥候補部b2の標準偏差σ=12.5と求められる。なお、上記の閾値は記憶部3に予め記憶させている。
The image processing unit 2 calculates the average gray value, position information of the defect candidate portions b1 and b2, and the average gray value of the inspection area a2 corresponding to the forming unit 5a through the same processing as in the third embodiment. The standard deviation of the defect candidate parts b1 and b2 is calculated. Then, the defect determination unit 4 takes the difference between the average gray value of the defect candidate portions b1 and b2 and the average gray value of the inspection area a2, and the difference is within a predetermined range, and the defect candidate portions b1 and b2 Is in contact with the forming portion 5a and the standard deviation is equal to or less than a preset threshold value (for example, set to 5 in the present embodiment), it is determined as a forming burr, and only the forming burr is extracted as a defect. Here, the standard deviation σ is
From the equation (1), the standard deviation σ = 0.76 of the defect candidate part b1 and the standard deviation σ = 12.5 of the defect candidate part b2 are obtained. The above threshold value is stored in the storage unit 3 in advance.

次に、本欠陥検出装置Aの動作について図8のフローチャートを参照しながら説明する。まず最初に、撮像手段1によりコネクタ5の検査画像P1を撮像し(ステップS1)、撮像した検査画像P1のうち金属部5bに対応する部分画像を検査エリアa1に設定する(ステップS2)。次に、画像処理部2は、上記の部分画像に対してラインa〜f毎に画素の濃淡値の最頻値を算出し(ステップS3)、各最頻値に対してそれぞれ所定のオフセット値を与えてラインa〜f毎に閾値を設定する。さらに、画像処理部2は、各閾値を基準に各画素の濃淡値の2値化を行って欠陥候補画素をラインa〜f毎に抽出し(ステップS4)、その後抽出した欠陥候補画素に対してラベリング処理を実行して欠陥候補部b1,b2を設定し、各欠陥候補部b1,b2の平均濃淡値、位置情報を算出するとともに標準偏差を算出する(ステップS5)。また、画像処理部2は、検査画像P1のうち成形部5aに対応する部分画像を検査エリアa2に設定し(ステップS6)、この検査エリアa2の平均濃淡値を算出する(ステップS7)。そして、欠陥判断部4は、各欠陥候補部b1,b2の平均濃淡値と、検査エリアa2の平均濃淡値の差分を取り、この差分が所定範囲(例えば±10)内にあって、且つ各欠陥候補部b1,b2が成形部5aに接しており、且つ標準偏差が予め設定された閾値5以下である場合には成形バリであると判断する(ステップS8)。本実施形態では、欠陥候補部b1と検査エリアa2の平均濃淡値の差分は10であり、且つ欠陥候補部b1は成形部5aに接しており、且つ欠陥候補部b1の標準偏差は0.76(<5)であるから、欠陥候補部b1は成形バリであると判断される。一方、欠陥候補部b2と検査エリアa2の平均濃淡値の差分は13であり、また欠陥候補部b2は成形部5aに接しておらず、また欠陥候補部b2の標準偏差は12.5(>5)であるから、欠陥候補部b2は成形バリではないとして除外される。その結果、成形バリのみを欠陥として抽出することができる。   Next, the operation of the defect detection apparatus A will be described with reference to the flowchart of FIG. First, an inspection image P1 of the connector 5 is imaged by the imaging means 1 (step S1), and a partial image corresponding to the metal part 5b is set in the inspection area a1 in the captured inspection image P1 (step S2). Next, the image processing unit 2 calculates the mode value of the gray value of the pixel for each line a to f with respect to the partial image (step S3), and a predetermined offset value for each mode value. And a threshold value is set for each of the lines a to f. Furthermore, the image processing unit 2 binarizes the gray value of each pixel based on each threshold value, extracts defect candidate pixels for each of the lines a to f (step S4), and then extracts the defect candidate pixels that have been extracted. The labeling process is executed to set defect candidate parts b1 and b2, and the average gray value and position information of each defect candidate part b1 and b2 are calculated and the standard deviation is calculated (step S5). The image processing unit 2 sets a partial image corresponding to the forming unit 5a in the inspection image P1 in the inspection area a2 (step S6), and calculates an average gray value of the inspection area a2 (step S7). Then, the defect determination unit 4 takes a difference between the average gray value of the defect candidate portions b1 and b2 and the average gray value of the inspection area a2, and the difference is within a predetermined range (for example, ± 10), and each If the defect candidate parts b1 and b2 are in contact with the forming part 5a and the standard deviation is equal to or less than the preset threshold value 5, it is determined that the defect is a forming burr (step S8). In the present embodiment, the difference in average gray value between the defect candidate part b1 and the inspection area a2 is 10, the defect candidate part b1 is in contact with the forming part 5a, and the standard deviation of the defect candidate part b1 is 0.76. Since (<5), it is determined that the defect candidate part b1 is a molding burr. On the other hand, the difference in average gray value between the defect candidate part b2 and the inspection area a2 is 13, the defect candidate part b2 is not in contact with the forming part 5a, and the standard deviation of the defect candidate part b2 is 12.5 (> 5), the defect candidate part b2 is excluded as not being a molding burr. As a result, only molding burrs can be extracted as defects.

而して、本実施形態によれば、欠陥候補部が金属ノイズによるものである場合には濃淡値のばらつき(標準偏差)が大きくなるのに対して、成形バリであれば濃淡値のばらつきは少ないと考えられるから、濃淡値のばらつきを所定の閾値と比較することによって、欠陥候補部が金属ノイズによるものか否かを判別することができ、その結果検出精度をさらに向上させることができる。   Thus, according to the present embodiment, when the defect candidate portion is caused by metal noise, the variation in gray value (standard deviation) is large, whereas in the case of molding burr, the variation in gray value is Therefore, it is possible to determine whether or not the defect candidate portion is caused by metal noise by comparing the variation of the gray value with a predetermined threshold value, and as a result, the detection accuracy can be further improved.

なお、上記閾値は一例であって、被検査物に応じて適宜設定すればよい。   The threshold value is an example, and may be set as appropriate according to the inspection object.

(実施形態5)
本発明に係る欠陥検出装置の実施形態5について説明する。実施形態4では、欠陥候補部b1,b2の平均濃淡値と、成形部5aに対応する検査エリアa2の平均濃淡値の比較結果、各欠陥候補部b1,b2の位置情報、および各欠陥候補部b1,b2の標準偏差の閾値との比較結果に基づいて欠陥か否か判別しているが、本実施形態では、検査エリアa2の標準偏差を算出し、この標準偏差と各欠陥候補部b1,b2の標準偏差の比較結果、平均濃淡値の比較結果および位置情報に基づいて欠陥か否かを判別している。なお、それ以外の構成については実施形態4と同様であり、同一の構成要素には同一の符号を付して説明は省略する。また、以下の説明では、図1〜図3および図5も参照しながら説明する。
(Embodiment 5)
Embodiment 5 of the defect detection apparatus according to the present invention will be described. In the fourth embodiment, the comparison result of the average gray value of the defect candidate parts b1 and b2 and the average gray value of the inspection area a2 corresponding to the forming part 5a, the position information of each defect candidate part b1 and b2, and each defect candidate part Although it is determined whether or not the defect is based on the comparison result with the standard deviation threshold values of b1 and b2, in this embodiment, the standard deviation of the inspection area a2 is calculated, and this standard deviation and each defect candidate part b1, It is determined whether or not it is a defect based on the comparison result of the standard deviation of b2, the comparison result of the average gray value, and the position information. In addition, about another structure, it is the same as that of Embodiment 4, the same code | symbol is attached | subjected to the same component and description is abbreviate | omitted. Further, the following description will be given with reference to FIGS. 1 to 3 and FIG.

本実施形態の欠陥検出装置Aは、撮像手段1と、画像処理部2と、記憶部3と、欠陥判断部4とを備えている。   The defect detection apparatus A of the present embodiment includes an imaging unit 1, an image processing unit 2, a storage unit 3, and a defect determination unit 4.

画像処理部2では、実施形態4と同様の処理を経て各欠陥候補部b1,b2の平均濃淡値、位置情報および標準偏差を算出するとともに、成形部5aに対応する検査エリアa2の平均濃淡値を算出し、さらに検査エリアa2の標準偏差を算出する。なお、以下の説明では、検査エリアa2の平均濃淡値が90、標準偏差が0.7であるとして説明する。そして、欠陥判断部4では、各欠陥候補部b1,b2の平均濃淡値と検査エリアa2の平均濃淡値の差分が所定範囲(例えば±10)内にあって、且つ各欠陥候補部b1,b2が成形部5aに接しており、且つ各欠陥候補部b1,b2の標準偏差と検査エリアa2の標準偏差の差分が所定範囲(例えば±2)内である場合に成形バリであると判断し、成形バリのみを欠陥として抽出する。なお、各欠陥候補部b1,b2の標準偏差は実施形態4と同様に(1)式から求められ、欠陥候補部b1の標準偏差σ=0.76、欠陥候補部b2の標準偏差σ=12.5となる。また、上記差分の許容範囲については、記憶部3に予め記憶させている。   The image processing unit 2 calculates the average gray value, position information, and standard deviation of the defect candidate portions b1 and b2 through the same processing as in the fourth embodiment, and also calculates the average gray value of the inspection area a2 corresponding to the forming unit 5a. And the standard deviation of the inspection area a2 is calculated. In the following description, it is assumed that the average gray value of the inspection area a2 is 90 and the standard deviation is 0.7. In the defect determination unit 4, the difference between the average gray value of the defect candidate portions b1 and b2 and the average gray value of the inspection area a2 is within a predetermined range (for example, ± 10), and the defect candidate portions b1 and b2 Is determined to be a molding burr when the difference between the standard deviation of each of the defect candidate parts b1 and b2 and the standard deviation of the inspection area a2 is within a predetermined range (for example, ± 2). Only molding burrs are extracted as defects. The standard deviation of each defect candidate part b1, b2 is obtained from the equation (1) as in the fourth embodiment. The standard deviation σ = 0.76 of the defect candidate part b1 and the standard deviation σ = 12 of the defect candidate part b2 .5. Further, the allowable range of the difference is stored in the storage unit 3 in advance.

次に、本欠陥検出装置Aの動作について図9のフローチャートを参照しながら説明する。まず最初に、撮像手段1によりコネクタ5の検査画像P1を撮像し(ステップS1)、撮像した検査画像P1のうち金属部5bに対応する部分画像を検査エリアa1に設定する(ステップS2)。次に、画像処理部2は、上記の部分画像に対してラインa〜f毎に画素の濃淡値の最頻値を算出し(ステップS3)、各最頻値に対してそれぞれ所定のオフセット値を与えてラインa〜f毎に閾値を設定する。さらに、画像処理部2は、各閾値を基準に各画素の濃淡値の2値化を行って欠陥候補画素をラインa〜f毎に抽出し(ステップS4)、その後抽出した欠陥候補画素に対してラベリング処理を実行して欠陥候補部b1,b2を設定し、各欠陥候補部b1,b2の平均濃淡値、位置情報および標準偏差を算出する(ステップS5)。また、画像処理部2は、検査画像P1のうち成形部5aに対応する部分画像を検査エリアa2に設定し(ステップS6)、この検査エリアa2の平均濃淡値および標準偏差を算出する(ステップS7)。そして、欠陥判断部4は、各欠陥候補部b1,b2の平均濃淡値と、検査エリアa2の平均濃淡値の差分を取り、この差分が所定範囲(±10)内にあって、且つ各欠陥候補部b1,b2が成形部5aに接しており、且つ各欠陥候補部b1,b2の標準偏差と検査エリアa2の標準偏差の差分が所定範囲(±2)内にある場合には成形バリであると判断する(ステップS8)。本実施形態では、欠陥候補部b1と検査エリアa2の平均濃淡値の差分は10であり、且つ欠陥候補部b1は成形部5aに接しており、且つ欠陥候補部b1と検査エリアa2の標準偏差の差分は0.06(<2)であるから、欠陥候補部b1は成形バリであると判断される。一方、欠陥候補部b2と検査エリアa2の平均濃淡値の差分は13であり、また欠陥候補部b2は成形部5aに接しておらず、また欠陥候補部b2と検査エリアa2の標準偏差の差分は11.8(>2)であるから、欠陥候補部b2は成形ばりではないとして除外される。その結果、成形バリのみを欠陥として抽出することができる。   Next, the operation of the defect detection apparatus A will be described with reference to the flowchart of FIG. First, an inspection image P1 of the connector 5 is imaged by the imaging means 1 (step S1), and a partial image corresponding to the metal part 5b is set in the inspection area a1 in the captured inspection image P1 (step S2). Next, the image processing unit 2 calculates the mode value of the gray value of the pixel for each line a to f with respect to the partial image (step S3), and a predetermined offset value for each mode value. And a threshold value is set for each of the lines a to f. Furthermore, the image processing unit 2 binarizes the gray value of each pixel based on each threshold value, extracts defect candidate pixels for each of the lines a to f (step S4), and then extracts the defect candidate pixels that have been extracted. The labeling process is executed to set the defect candidate parts b1 and b2, and the average gray value, position information, and standard deviation of the defect candidate parts b1 and b2 are calculated (step S5). Further, the image processing unit 2 sets a partial image corresponding to the molding unit 5a in the inspection image P1 in the inspection area a2 (step S6), and calculates an average gray value and a standard deviation of the inspection area a2 (step S7). ). Then, the defect determination unit 4 takes the difference between the average gray value of the defect candidate portions b1 and b2 and the average gray value of the inspection area a2, and the difference is within a predetermined range (± 10), and each defect If the candidate parts b1 and b2 are in contact with the molding part 5a and the difference between the standard deviation of each defect candidate part b1 and b2 and the standard deviation of the inspection area a2 is within a predetermined range (± 2), molding burr It is determined that there is (step S8). In the present embodiment, the difference in average gray value between the defect candidate part b1 and the inspection area a2 is 10, the defect candidate part b1 is in contact with the forming part 5a, and the standard deviation between the defect candidate part b1 and the inspection area a2 Is 0.06 (<2), the defect candidate part b1 is determined to be a molding burr. On the other hand, the difference in the average gray value between the defect candidate part b2 and the inspection area a2 is 13, the defect candidate part b2 is not in contact with the forming part 5a, and the difference in standard deviation between the defect candidate part b2 and the inspection area a2 Since 11.8 (> 2), the defect candidate part b2 is excluded as not being a forming beam. As a result, only molding burrs can be extracted as defects.

而して、本実施形態によれば、欠陥候補部b1,b2の濃淡値のばらつき(標準偏差)を成形部5aに対応する検査エリアa2の濃淡値のばらつきと比較することによって、現物に即した比較が可能になることから実施形態4に比べて誤検出を低減することができ、その結果検出精度をさらに向上させることができる。   Thus, according to the present embodiment, the variation (standard deviation) of the grayscale values of the defect candidate portions b1 and b2 is compared with the variation of the grayscale values of the inspection area a2 corresponding to the molding portion 5a, so that Therefore, the erroneous detection can be reduced as compared with the fourth embodiment, and as a result, the detection accuracy can be further improved.

なお、上記差分の範囲は一例であって、被検査物に応じて適宜設定すればよい。   The range of the difference is an example, and may be set as appropriate according to the inspection object.

また、上記の実施形態1〜5では、被検査物Bがコネクタの場合を例に説明したが、被検査物はコネクタに限定されるものではなく、例えば集積回路やセンサなどの半導体部品のほか、リレー、ソケットなどの電子部品であってもよい。さらに、上記の実施形態1〜5では金属部5bを例に説明したが、光沢があるようなものであれば金属部に限定されるものではなく、他のものであってもよい。   In the first to fifth embodiments described above, the case where the inspection object B is a connector has been described as an example. However, the inspection object is not limited to a connector, for example, other than semiconductor components such as an integrated circuit and a sensor. Electronic components such as relays and sockets may also be used. Furthermore, in the first to fifth embodiments described above, the metal part 5b has been described as an example. However, the metal part is not limited to the metal part as long as it is glossy, and other parts may be used.

1 撮像手段
2 画像処理部
3 記憶部
4 欠陥判断部
5 コネクタ
5a 成形部
5b 金属部
A 欠陥検出装置
B 被検査物
DESCRIPTION OF SYMBOLS 1 Imaging means 2 Image processing part 3 Memory | storage part 4 Defect judgment part 5 Connector 5a Molding part 5b Metal part A Defect detection apparatus B Inspected object

Claims (5)

成形部と、前記成形部に保持される金属部とで構成された被検査物の欠陥を検出するための欠陥検出装置であって、
前記被検査物の所定の検査領域を撮像する撮像手段と、前記撮像手段により撮像された検査画像のうち前記金属部に対応する部分画像に対して所定のライン毎に画素の濃淡値の最頻値を算出し、算出した各々の前記最頻値からライン毎に閾値を設定した後、設定した前記閾値を基準に2値化することで欠陥候補画素をライン毎に抽出するとともに、抽出した前記欠陥候補画素に対してラベリング処理を実行して欠陥候補部を設定し、設定した前記欠陥候補部の平均濃淡値を算出する画像処理部と、前記欠陥候補部が欠陥か否かを判別するための予め設定された範囲を記憶する記憶部と、前記欠陥候補部が欠陥か否かを判別する欠陥判断部とを備え、
前記画像処理部は、前記検査画像のうち前記成形部に対応する部分画像の平均濃淡値を算出し、前記欠陥判断部は、前記成形部に対応する前記部分画像の前記平均濃淡値と前記欠陥候補部の前記平均濃淡値の差分が前記予め設定された範囲内にある場合、前記欠陥候補部が欠陥であると判断することを特徴とする欠陥検出装置。
A defect detection device for detecting a defect of an object to be inspected composed of a molded part and a metal part held by the molded part,
An imaging unit that images a predetermined inspection area of the inspection object, and a mode of a gray value of a pixel for each predetermined line with respect to a partial image corresponding to the metal portion of the inspection image captured by the imaging unit After calculating a value and setting a threshold value for each line from each calculated mode value, the defect candidate pixels are extracted for each line by binarization based on the set threshold value, and the extracted In order to determine whether or not the defect candidate portion is defective, and an image processing portion that performs a labeling process on the defect candidate pixel to set a defect candidate portion, calculates an average gray value of the set defect candidate portion, and comprising of a storage unit for storing a preset range, before Symbol defect candidate part and a defect determination unit for determining whether or not a defect,
The image processing unit calculates an average gray value of a partial image corresponding to the molding unit in the inspection image, and the defect determination unit is configured to calculate the average gray value of the partial image corresponding to the molding unit and the defect. when the difference of the average gray value of the candidate section is within the range of the preset, the defect detecting device, wherein the defect candidate part is determined to be defective.
前記欠陥判断部は、前記欠陥候補部が前記成形部に隣接している場合、前記欠陥候補部が欠陥であると判断することを特徴とする請求項1記載の欠陥検出装置。   The defect detection apparatus according to claim 1, wherein the defect determination unit determines that the defect candidate part is a defect when the defect candidate part is adjacent to the forming part. 前記画像処理部は、前記欠陥候補部の濃淡値のばらつきを算出し、前記欠陥判断部は、前記欠陥候補部の前記濃淡値のばらつきが予め設定された閾値以下である場合、前記欠陥候補部が欠陥であると判断することを特徴とする請求項2記載の欠陥検出装置。   The image processing unit calculates a variation in gray value of the defect candidate portion, and the defect determination unit determines that the defect candidate portion is less than or equal to a preset threshold value when the variation in gray value of the defect candidate portion is equal to or less than a preset threshold value. The defect detection apparatus according to claim 2, wherein it is determined that the defect is a defect. 前記画像処理部は、前記検査画像のうち前記成形部に対応する部分画像の濃淡値のばらつきを算出し、前記欠陥判断部は、前記部分画像の前記濃淡値のばらつきと前記欠陥候補部の前記濃淡値のばらつきの差分が予め設定された範囲内にある場合、前記欠陥候補部が欠陥であると判断することを特徴とする請求項3記載の欠陥検出装置。   The image processing unit calculates a variation in the gray value of the partial image corresponding to the forming unit in the inspection image, and the defect determination unit determines the variation in the gray value of the partial image and the defect candidate portion. The defect detection apparatus according to claim 3, wherein the defect candidate portion is determined to be a defect when a difference in gradation value variation is within a preset range. 成形部と、前記成形部に保持される金属部とで構成された被検査物の欠陥を検出するための欠陥検出方法であって、
前記被検査物の所定の検査領域を撮像手段により撮像する検査領域撮像工程と、前記撮像手段により撮像された検査画像のうち前記金属部に対応する部分画像に対して所定のライン毎に画素の濃淡値の最頻値を算出する最頻値算出工程と、算出した各々の前記最頻値からライン毎に閾値を設定し、設定した前記閾値を基準に2値化することで欠陥候補画素をライン毎に抽出する欠陥候補画素抽出工程と、抽出した前記欠陥候補画素に対してラベリング処理を実行して欠陥候補部を設定し、設定した前記欠陥候補部の平均濃淡値を算出する平均濃淡値算出工程と、前記欠陥候補部が欠陥か否かを判別する欠陥判断工程とを備え、
前記平均濃淡値算出工程において前記検査画像のうち前記成形部に対応する部分画像の平均濃淡値を算出し、前記欠陥判断工程において前記成形部に対応する前記部分画像の前記平均濃淡値と前記欠陥候補部の前記平均濃淡値の差分が予め設定された範囲内にある場合、前記欠陥候補部が欠陥であると判断することを特徴とする欠陥検出方法。
A defect detection method for detecting a defect of an object to be inspected composed of a molded part and a metal part held by the molded part,
An inspection area imaging step of imaging a predetermined inspection area of the object to be inspected by an imaging means, and a pixel for each predetermined line with respect to a partial image corresponding to the metal part of the inspection image captured by the imaging means A mode value calculation step for calculating the mode value of the gray value, a threshold value is set for each line from each calculated mode value, and binarization is performed on the basis of the set threshold value. A defect candidate pixel extraction step for extracting line by line, and an average gray value for calculating the average gray value of the set defect candidate part by performing a labeling process on the extracted defect candidate pixel to set a defect candidate part comprising a calculation step, before Symbol defect candidate part and a defect judgment step of judging whether or not a defect,
The average gray value of the partial image corresponding to the molded part in the inspection image is calculated in the average gray value calculating step, and the average gray value and the defect of the partial image corresponding to the molded part in the defect determining step. A defect detection method comprising: determining that the defect candidate portion is a defect when a difference in the average gray value of the candidate portion is within a preset range.
JP2009221601A 2009-09-25 2009-09-25 Defect detection apparatus and defect detection method Expired - Fee Related JP5498109B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009221601A JP5498109B2 (en) 2009-09-25 2009-09-25 Defect detection apparatus and defect detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009221601A JP5498109B2 (en) 2009-09-25 2009-09-25 Defect detection apparatus and defect detection method

Publications (2)

Publication Number Publication Date
JP2011069742A JP2011069742A (en) 2011-04-07
JP5498109B2 true JP5498109B2 (en) 2014-05-21

Family

ID=44015144

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009221601A Expired - Fee Related JP5498109B2 (en) 2009-09-25 2009-09-25 Defect detection apparatus and defect detection method

Country Status (1)

Country Link
JP (1) JP5498109B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103245666B (en) * 2013-04-02 2015-03-18 杭州电子科技大学 Automatic detecting method for appearance defects of storage battery polar plate
CN103760165B (en) * 2013-12-31 2016-08-17 深圳市华星光电技术有限公司 The defect inspection method of display floater and defect detecting device
CN114742788A (en) * 2022-04-01 2022-07-12 南通高精数科机械有限公司 Copper bar defect detection method and system based on machine vision
CN116863175B (en) * 2023-08-31 2023-12-26 中江立江电子有限公司 Right-angle connector defect identification method, device, equipment and medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3126634B2 (en) * 1995-07-26 2001-01-22 松下電工株式会社 Appearance inspection method
JP2008111705A (en) * 2006-10-30 2008-05-15 Seiko Epson Corp Method and program for detecting defect and inspection apparatus
JP4780032B2 (en) * 2007-05-14 2011-09-28 株式会社デンソー Inspection apparatus and inspection method for parts having a plurality of pigtails, and fuel pump manufacturing method

Also Published As

Publication number Publication date
JP2011069742A (en) 2011-04-07

Similar Documents

Publication Publication Date Title
KR20130126370A (en) Method and apparatus for inspecting via hole
JP5498109B2 (en) Defect detection apparatus and defect detection method
JP4230880B2 (en) Defect inspection method
KR102242996B1 (en) Method for atypical defects detect in automobile injection products
JP2004109018A (en) Circuit pattern inspecting method and inspecting device
JP7226494B2 (en) Contact wire wear detection method
CN111435118A (en) Inspection apparatus and inspection method
JP3589424B1 (en) Board inspection equipment
CN114677348A (en) IC chip defect detection method and system based on vision and storage medium
KR20160097651A (en) Apparatus and Method for Testing Pattern of Sample using Validity Image Processing Technique, and computer-readable recording medium with program therefor
JP2017161435A (en) Inspection method of transparent body
JP2002243655A (en) Method and equipment for visual inspection of electronic component
JP4403036B2 (en) Soot detection method and apparatus
JP2010071980A (en) Fin extraction inspection method of heat exchanger
JP2010054246A (en) Method for detecting joint and method for inspecting external appearance of joint using the method
JP5452035B2 (en) Defect inspection method and defect inspection apparatus
JP2007081513A (en) Blot defect detecting method for solid-state imaging element
JP4821647B2 (en) Electronic component terminal position detection method
JP2006284308A (en) Visual examination method of semiconductor device
JP5346304B2 (en) Appearance inspection apparatus, appearance inspection system, and appearance inspection method
KR20110020437A (en) Inspection method of patterned wafer for detecting defects
JP5784406B2 (en) Inspection method for processed products
JP2831273B2 (en) Appearance inspection method
JP2000329699A (en) Method and apparatus for inspection of defect
JP2000321038A (en) Method for detecting fault of pattern

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20120118

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120703

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130709

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130716

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130917

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131105

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131224

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140307

LAPS Cancellation because of no payment of annual fees