JP4998722B2 - Work defect inspection method by image processing - Google Patents
Work defect inspection method by image processing Download PDFInfo
- Publication number
- JP4998722B2 JP4998722B2 JP2007148710A JP2007148710A JP4998722B2 JP 4998722 B2 JP4998722 B2 JP 4998722B2 JP 2007148710 A JP2007148710 A JP 2007148710A JP 2007148710 A JP2007148710 A JP 2007148710A JP 4998722 B2 JP4998722 B2 JP 4998722B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- work
- illuminance
- workpiece
- normal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims description 80
- 230000007547 defect Effects 0.000 title claims description 41
- 238000007689 inspection Methods 0.000 title claims description 31
- 238000001514 detection method Methods 0.000 claims description 40
- 238000005070 sampling Methods 0.000 claims description 18
- 230000002950 deficient Effects 0.000 claims description 11
- 125000004122 cyclic group Chemical group 0.000 claims description 2
- 238000005286 illumination Methods 0.000 description 13
- 238000013500 data storage Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 9
- 238000009499 grossing Methods 0.000 description 9
- 239000000428 dust Substances 0.000 description 8
- 238000001914 filtration Methods 0.000 description 5
- 238000003384 imaging method Methods 0.000 description 4
- 238000000465 moulding Methods 0.000 description 3
- 238000010191 image analysis Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 239000013013 elastic material Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012856 packing Methods 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000004804 winding Methods 0.000 description 1
Images
Landscapes
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Description
本発明は、ワークを撮像した画像を処理してワーク表面の欠陥を検出する欠陥検査方法に関するものである。 The present invention relates to a defect inspection method for detecting defects on the surface of a workpiece by processing an image obtained by imaging the workpiece.
一般に、画像処理による物品検出方法のひとつとして、例えば特許文献1に開示されたようなパターンマッチングによる方法がある。パターンマッチングは、検出対象の物品の特徴的形状や大きさ等を予め登録しておき、登録されたデータと実際にカメラなどにより物品を撮像した画像データとを比較することによって、撮像された物品が登録されたものと同一であるかを判定するものであるため、ワークの欠陥を検出する方法としても有用である。しかしながら、検査対象のワークが、例えば自らの重量などによる形状の変化が大きい大型のゴム製品であるような場合は、登録すべきマスター形状が定まらないので、パターンマッチングによる方法は採用することができない。
In general, as one of article detection methods based on image processing, for example, there is a pattern matching method as disclosed in
これに対し、例えば特許文献2に開示された画像処理装置及び画像形成装置は、画像の輪郭を検出して、この輪郭データに基づいて、画像データを原画像のオブジェクトの種類に拘わらず同一にし、データの取り扱いを一元化するものである。また、例えば特許文献3に開示された画像解析装置は、輪郭データの精度の悪い画像であっても、これを補正して高精度な輪郭データを検出する画像解析装置に関する。しかし、例えば成形不良などによってワークの輪郭の一部又は全部が欠損しているような欠陥については、特許文献2又は特許文献3に開示された技術では対応できないといった問題がある。
On the other hand, for example, the image processing apparatus and the image forming apparatus disclosed in
本発明は、以上のような点に鑑みてなされたものであって、その技術的課題とするところは、検査対象のワークが、例えば自らの重量などによる形状の変化が大きい、長尺で柔軟な製品であっても、また、ワークに存在する欠陥が、成形不良などによってワークの輪郭の一部又は全部が欠損したものである場合でも、画像処理による欠陥検出を確実に行うことができるようにすることにある。 The present invention has been made in view of the above points, and the technical problem is that the workpiece to be inspected is long and flexible, for example, having a large shape change due to its own weight. Even if the product is a defective product, or even if a defect existing in the workpiece is a part or all of the outline of the workpiece that has been lost due to a molding defect or the like, defect detection by image processing can be reliably performed. Is to make it.
上述した技術的課題を有効に解決するための手段として、請求項1の発明に係る画像処理によるワーク欠陥検査方法は、長手方向各部の断面が同形同大のワークを撮像した画像を表示する画面上を移動する走査要素によって画素照度をサンプリングし、サンプリングされた照度値から画面内のワーク画像を認識するワーク画像認識処理と、認識されたワーク画像上の任意の位置座標を法線検出点としてこの法線検出点を通る任意の直線を中心とする所定幅でワーク画像を切り取って前記直線で折り返し、折り返された画像が互いに重合しなければ前記直線の角度を変更して再び折り返し、折り返された画像が互いに重合した場合に、このときの前記直線を法線として検出し、この法線上の特定の点でこの法線と直交する直線上にあって前記特定の点から所定距離離れた位置座標を次の法線検出点として前記法線の検出を繰り返す循環検出処理と、前記法線上の特定の点でこの法線と直交する直線に沿って前記ワーク画像を直線化する画像直線化処理と、直線化処理された画像から欠陥部を検出してその良否を判定する欠陥検出処理とを備えるものである。
As a means for effectively solving the technical problem described above, the work defect inspection method by image processing according to the invention of
請求項2の発明に係る画像処理によるワーク欠陥検査方法は、請求項1に記載されたワーク画像認識処理において、画素照度のサンプリングを、走査要素を中心とする所定範囲における複数箇所で行い、サンプリングされた照度値の平均値を所定のしきい値と比較するものである。
The workpiece defect inspection method by image processing according to the invention of
請求項3の発明に係る画像処理によるワーク欠陥検査方法は、請求項1に記載されたワークの断面形状が、幅方向中央を対称軸とする対称形状であり、循環検出処理において、法線上の特定の点が、この法線上の画素照度をサンプリングして照度プロファイルを生成し、前記法線上の任意の点で前記照度プロファイルを折り返すことによって互いに重合した照度プロファイルの差が最小となる点として決定されるものである。
In the work defect inspection method by image processing according to the invention of
請求項4の発明に係る画像処理によるワーク欠陥検査方法は、請求項1に記載された方法において、ワーク画像をMedianフィルタにより平滑化し、入力されたワーク画像と平滑化された画像との差分によりノイズを除去するノイズ除去ステップを備え、欠陥検出処理では、前記ノイズ除去ステップによるノイズ除去後の画像データから欠陥部の良否を判定するものである。
A work defect inspection method by image processing according to a fourth aspect of the invention is the method according to
請求項1の発明に係る画像処理によるワーク欠陥検査方法によれば、自重により容易に形状が変化してしまうような柔軟で長尺のワークでも、画像を直線化により一元化することによって、欠陥の検出が可能であり、また、ワークに存在する欠陥が、成形不良などによってワークの輪郭の一部又は全部が欠損したものである場合でも、画像処理による欠陥検出を確実に行うことができる。
According to the work defect inspection method by image processing according to the invention of
請求項2の発明に係る画像処理によるワーク欠陥検査方法によれば、請求項1の発明において、複数箇所のサンプリング照度の平均値を用いることで、汚れや塵埃などによるノイズを受けにくくして、ワーク画像を高精度で検出することができる。
According to the work defect inspection method by image processing according to the invention of
請求項3の発明に係る画像処理によるワーク欠陥検査方法によれば、請求項1の発明において、検出された法線を高精度に設定することができる。
According to the work defect inspection method by the image processing according to the invention of
請求項4の発明に係る画像処理によるワーク欠陥検査方法によれば、請求項1の発明において、ワーク画像から、ワーク上の塵埃や表面性状、照明ムラ等に起因する種々のノイズを除去するので、欠陥検出を高精度で行うことができる。
According to the work defect inspection method by image processing according to the invention of
以下、本発明に係る画像処理によるワーク欠陥検査方法の好ましい実施の形態について、図面を参照しながら説明する。まず図1は、本発明の方法により検査されるワークを示す断面斜視図、図2は、本発明に係る画像処理によるワーク欠陥検査方法を実施するために用いられるシステムの概略構成を示すブロック図である。 Hereinafter, a preferred embodiment of a work defect inspection method by image processing according to the present invention will be described with reference to the drawings. First, FIG. 1 is a sectional perspective view showing a workpiece to be inspected by the method of the present invention, and FIG. 2 is a block diagram showing a schematic configuration of a system used for carrying out a workpiece defect inspection method by image processing according to the present invention. It is.
図1に示されるように、この実施の形態の方法による検査対象のワークWは、断面形状が幅方向中心を対称軸とする対称形状をなし、かつ長手方向各部の断面が同形同大の長尺物で、しかも自重などによる形状の変化が大きいために検査ステージ1上に置いたときの形状が一定しない製品であって、典型的には、例えばゴム状弾性材料で成形された大型のガスケット又はパッキンが挙げられる。
As shown in FIG. 1, the workpiece W to be inspected by the method of this embodiment has a symmetric shape with the cross-sectional shape having the center in the width direction as the symmetric axis, and the cross-section of each part in the longitudinal direction is the same shape and size A long product that has a large shape change due to its own weight and the like, and has a non-constant shape when placed on the
次に、図2に示されるワーク欠陥検査システムにおいて、参照符号1は、ワークWを載置するXYテーブルからなる検査ステージ、参照符号2は検査ステージ1上を照明する照明装置、参照符号3は、ワークWを撮像する画像入力装置である。
Next, in the workpiece defect inspection system shown in FIG. 2,
検査ステージ1は、XYテーブルからなるものであって、すなわち不図示の駆動装置によって水平方向(XY方向)へ変位し、画像入力装置3によるワークWの撮影部位を任意に移動するものである。また、画像入力装置3は、対物レンズによるワークWの光学像をCCDやCMOS等の撮像素子によって画像信号に変換するカメラであって、ワークWの幅方向全体及び長手方向の一部を含むエリアを撮影視野とするように、対物レンズを下方へ向けて検査ステージ1の上側にセットされている。
The
参照符号4は、画像入力装置3により取り込まれた画像データを処理する画像処理装置、参照符号5は、画像処理部4により画像処理された画像データを順次格納する入力画像メモリ、参照符号6は、本方法の処理プログラムが格納されたプログラムメモリ、参照符号7は、前記処理プログラムによって動作し、入力画像メモリ5から画像データを順次読み出して各種の演算処理を行うCPU(中央演算処理装置)、参照符号8は、CPU7において算出された法線データを格納する法線データ格納メモリ、参照符号9は、CPU7において算出された中心座標データを格納する中心座標データ格納メモリ、参照符号10は、CPU7において直線化処理された画像データを格納する直線化画像格納メモリ、参照符号11は、CPU7において判定された検査結果データを格納する検査結果データ格納メモリ、参照符号12は、欠陥検出の前処理において画像データからノイズを除去するためのMedianフィルタである。
図3は、この実施の形態による処理フローを示すフローチャートである。すなわち、まず、入力画像メモリ5に格納された画像データが、CPU7に読み出される(ステップS1)。この画像データは、図2に示される画像入力装置3によって検査ステージ1上のワークWが撮像され画像処理装置4によって画像処理されたものである。
FIG. 3 is a flowchart showing a processing flow according to this embodiment. That is, first, the image data stored in the
図4は、ワーク画像認識処理画面を示す説明図、図5は、画素照度サンプリング処理を示す説明図である。すなわち、入力画像メモリ5から読み出された画像データは、図4に示されるように、始点Aから画面を一周する経路Lを移動しながら所定のサンプリング周期で画素照度をサンプリングする走査要素Vを有し、この走査要素Vが、経路L上を所定の距離だけ移動して停止する(ステップS2)。なお、図4における参照符号P0はワークWの一部が撮影されたワーク画像、参照符号Qは、ワークWのバリ等による欠陥部の画像、RはワークWの表面に付着した塵埃等によるノイズ画像である。なお、経路Lは必ずしも画面を一周するものでなくても良く、例えば画面内をジグザグに進むものなど、有端の経路であっても良い。
FIG. 4 is an explanatory diagram showing a work image recognition processing screen, and FIG. 5 is an explanatory diagram showing pixel illuminance sampling processing. That is, the image data read from the
次に、画面上における走査要素Vの位置座標が検出され(ステップS3)、走査要素Vが始点A(経路Lが有端である場合は終点)に到達したことが検出された場合は(ステップS3=YES)、画面上にワーク画像が認識されなかったものとして、処理はステップS1にリターンし、入力画像メモリ5から次の画像データの読み出しが行われる。
Next, the position coordinates of the scanning element V on the screen are detected (step S3), and when it is detected that the scanning element V has reached the starting point A (or the end point when the path L is end) (step S3). S3 = YES), assuming that the work image has not been recognized on the screen, the process returns to step S1, and the next image data is read from the
走査要素Vが始点A(経路Lが有端である場合は終点)に未到達であることが検出された場合は(ステップS3=NO)、図5に示されるように、この走査要素Vを中心とする所定範囲における複数のサンプリング点S1〜Snで画素照度をサンプリングする。そして、サンプリングされた各サンプリング点S1〜Snの画素照度を加重平均し、予め設定されたしきい値と比較することにより、走査要素Vがワーク画像P上に到達したかを判定し、言い換えればワーク画像P0の有無を認識する(ステップS4)。なお、画素照度のサンプリングを走査要素Vの位置をサンプリング点として1点のみで行う場合は、検査ステージ1上の汚れや埃等によってワーク画像P0を誤認識するおそれがあるのに対し、複数のサンプリング点S1〜Snでサンプリングした画素照度の平均値は安定した統計量となるので、前記汚れや埃等に起因するノイズ等の影響を受けにくくなり、ワーク画像P0の認識の信頼性を高めることができる。
If it is detected that the scanning element V has not yet reached the starting point A (or the end point when the path L is endless) (step S3 = NO), as shown in FIG. sampling the pixel intensity at a plurality of sampling points S 1 to S n in a predetermined range centered. The weighted average of pixel intensity of each sampling point S 1 to S n sampled, by comparing with a preset threshold value, the scanning element V is determined whether it has reached the workpiece image P, recognizing the presence or absence of the workpiece image P 0 in other words (step S4). Note that when pixel illuminance sampling is performed at only one point with the position of the scanning element V as a sampling point, there is a possibility that the workpiece image P 0 may be erroneously recognized due to dirt or dust on the
そして、上述のサンプリング結果、走査要素Vがワーク画像P0上に未到達であると判定された場合は(ステップS4=NO)、処理はステップS2へリターンする。 The sampling results described above, if the scanning element V is determined to be not reached on the work image P 0 (step S4 = NO), the process returns to step S2.
また、走査要素Vがワーク画像P0上に達したものと判定すなわちワーク画像P0が認識された場合は(ステップS4=YES)、走査要素Vによる画素照度サンプリングを終了し、ステップS5〜S8の循環検出処理へ移行する。 Also, if the scanning element V is determined i.e. recognized workpiece image P 0 to have reached on the work image P 0 is terminated (Step S4 = YES), the pixel intensity sampled by the scanning element V, Step S5~S8 It moves to the circulation detection process.
図6は、循環検出処理における法線検出処理を示す説明図である。すなわち、この法線検出処理(ステップS5)においては、図6(イ)に示されるように、ワーク画像P0上で停止した走査要素Vの位置座標を法線検出点B1として、前記法線検出点B1を通る任意の直線Cを中心とする所定幅でワーク画像ΔP0を切り取って、これを前記直線Cで折り返し、図6(ロ)に示されるように、折り返された画像ΔP0が互いに重合しなければ、前記直線Cの角度を変更して再び折り返し、図6(ハ)に示されるように、折り返された画像ΔP0が互いに重合した場合に、このときの直線Cを法線Nとする。この法線Nのデータは、図2に示される法線データ格納メモリ8に格納し、処理は次の中心検出ステップへ移行する。
FIG. 6 is an explanatory diagram illustrating normal detection processing in the circulation detection processing. That is, in this normal-line detection process (step S5), and as shown in FIG. 6 (b), the position coordinates of the scanning element V was stopped on the workpiece image P 0 as the normal detection points B 1, said method A workpiece image ΔP 0 is cut out with a predetermined width centered on an arbitrary straight line C passing through the line detection point B 1 , and this is folded back along the straight line C. As shown in FIG. If the 0's do not overlap each other, the angle of the straight line C is changed and folded again. When the folded images ΔP 0 overlap each other as shown in FIG. Normal line N. The data of the normal N is stored in the normal
なお、ワーク画像P0は、経路L上での走査要素Vによる走査が終了した後で、走査データ列によって認識することもできる。したがってこのような場合は、走査要素Vはワーク画像P0上で停止しないから、法線検出点B1は、ワーク画像P0内の経路L上における任意の点を選択する。 The work image P 0 can also be recognized by the scanning data string after the scanning by the scanning element V on the path L is completed. Accordingly, in such a case, since the scanning element V does not stop on the work image P 0 , the normal detection point B 1 selects an arbitrary point on the path L in the work image P 0 .
図7は、中心検出処理を示す説明図、図8は、この中心検出過程での照度プロファイルの処理を示す説明図である。すなわち、中心検出(ステップS6)においては、まず図7に示される法線N上に沿って、ワーク画像P0の画素照度を所定のサンプリング間隔でサンプリングすることによって、図8(イ)に示されるような照度プロファイルを生成する。先の図1で説明したように、検査対象のワークWは、断面形状が幅方向中心を対称軸とする対称形状であるため、照度プロファイルも、基本的に、前記法線Nの中点に対してほぼ対称となるような画素照度変化を示す。 FIG. 7 is an explanatory diagram showing the center detection process, and FIG. 8 is an explanatory diagram showing the illuminance profile process in the center detection process. That is, in the center detection (step S6), and first, along a normal line N shown in Figure 7, by sampling the pixel intensity of the workpiece image P 0 at a predetermined sampling interval, shown in FIG. 8 (b) The illuminance profile is generated. As described above with reference to FIG. 1, the workpiece W to be inspected has a cross-sectional shape that is symmetric with the center in the width direction as a symmetric axis, so the illuminance profile is basically at the midpoint of the normal N. On the other hand, a change in pixel illuminance that is substantially symmetrical is shown.
次に、図7に示される法線N上の任意の点Dで照度プロファイルを折り返して重合する。折り返し点Dがワーク画像P0の幅の中心点でない場合は、図8(ロ)に示されるように、重合された照度プロファイルの差が大きくなるので、図8(ハ)に示されるように、重合した照度プロファイルの差が最小となる折り返し点Dを検出し、これを中心点Eとして、その座標データを図2に示される中心座標データ格納メモリ9に格納する。
Next, the illuminance profile is folded at an arbitrary point D on the normal line N shown in FIG. When the turning point D is not the center point of the width of the work image P 0 , as shown in FIG. 8 (B), the difference in the superimposed illuminance profiles becomes large, and as shown in FIG. 8 (C). Then, the turning point D at which the difference between the superimposed illuminance profiles becomes the minimum is detected, and the coordinate data is stored in the central coordinate
なお、中心点Eは、請求項1に記載された「法線上の特定の点」に相当するものであるが、この「特定の点」は、必ずしも中心点Eでなくても良く、例えば検査対象のワークWの断面形状が、幅方向中心を対称軸とする対称形状ではない場合、すなわち法線Nの中点に対してほぼ対称となるような照度プロファイルが得られないようなものである場合は、法線Nとワーク画像P0の輪郭線あるいは連続模様との交点等を用いることができる。
The center point E corresponds to the “specific point on the normal line” described in
図9は、次候補決定処理を示す説明図である。すなわち、上述のようにして中心点Eが検出されたら、図9に示されるように、法線Nに対して垂直で中心点Eを通る直線(中心線)F上で、前記中心点Eから所定距離だけ離れた点を次候補点B2とする(ステップS7)。 FIG. 9 is an explanatory diagram illustrating the next candidate determination process. That is, when the center point E is detected as described above, on the straight line (center line) F perpendicular to the normal line N and passing through the center point E, as shown in FIG. A point separated by a predetermined distance is set as the next candidate point B 2 (step S7).
次に、画面上における次候補点B2の位置座標が検出され(ステップS8)、この次候補点B2が画面データにおけるワーク画像P0の端部に到達していないことが判定された場合は(ステップS8=NO)、処理はステップS5にリターンし、点B2を通る法線検出処理及びその中心点の検出処理が繰り返され、すなわちステップS5〜S8の循環検出処理が行われる。また、次候補点B2が画面データにおけるワーク画像P0の端部に到達したことが判定された場合は(ステップS8=YES)、処理は次の画像直線化ステップへ移行する。 Next, the position coordinates of the next candidate point B 2 on the screen are detected (step S8), and it is determined that this next candidate point B 2 has not reached the end of the work image P 0 in the screen data. (step S8 = NO), the process returns to step S5, the detection processing of the normal detection process and its center point through point B 2 is repeated, i.e. circulation detection processing in step S5~S8 are performed. If it is determined that the next candidate point B 2 has reached the end of the work image P 0 in the screen data (step S8 = YES), the process proceeds to the next image linearization step.
図10は、直線化処理されたワーク画像P1を示すものである。すなわち、先に説明した図4のように曲がりくねったワーク画像P0は、ステップS5〜S7の処理によって繰り返し得られた中心点E及び中心線Fによって、図10のように直線化し(ステップS9)、図2に示される直線化画像格納メモリ10に格納する。
FIG. 10 shows the work image P 1 that has been linearized. That is, the torsional work image P 0 as shown in FIG. 4 described above is linearized as shown in FIG. 10 by the center point E and the center line F repeatedly obtained by the processes of steps S5 to S7 (step S9). The linearized
次に、直線化処理されたワーク画像P1における欠陥部の画像Qの画素数(面積)、長さ、周辺長、照度などの特徴量を、後述の処理ステップで計測することにより、良否を判定し(ステップS10)、図2に示される検査結果データ格納メモリ11に格納する。そして、本発明によれば、本来不規則に曲がりくねったワーク画像P0が、上述の画像直線化処理によって、直線化された二次元画像P1に規格化されるので、画像Qの特徴量を容易に計測することができる。
Next, pass / fail is measured by measuring feature quantities such as the number of pixels (area), length, peripheral length, illuminance, and the like of the image Q of the defective portion in the linearized workpiece image P 1 in the processing steps described later. The determination is made (step S10), and the result is stored in the inspection result
ここで、図10に示される直線化されたワーク画像P1には、図1に示されるワークWの表面性状による画素照度のムラ、図2に示される照明装置2による照明のムラ、ワークWの表面に付着した塵埃に起因するノイズ画像R等、種々のノイズが含まれているため、誤判定を防止して欠陥部の画像Qの判定の信頼性を高めるには、これらのノイズの除去が重要である。
Here, the linearized work image P 1 shown in FIG. 10 includes pixel illuminance unevenness due to the surface properties of the work W shown in FIG. 1, illumination unevenness due to the
図11は、ノイズの除去処理を含む欠陥検出ステップS10の詳細な処理フローを示すフローチャートである。すなわち、まず、上述の画像直線化処理(ステップS9)によって直線化されたワーク画像P1を入力し(ステップS11)、このワーク画像P1を、図2に示されるMedianフィルタ12を用いて平滑化する(ステップS12)。
FIG. 11 is a flowchart showing a detailed processing flow of the defect detection step S10 including noise removal processing. That is, first, the workpiece image P 1 linearized by the above-described image linearization processing (step S9) is input (step S11), and this workpiece image P 1 is smoothed using the
図12は、図11における平滑化処理(ステップS12)の詳細な処理フローを示すフローチャート、図13及び図14は、平滑化のためのフィルタリング処理を模式的に示す説明図である。 FIG. 12 is a flowchart showing a detailed processing flow of the smoothing process (step S12) in FIG. 11, and FIGS. 13 and 14 are explanatory diagrams schematically showing a filtering process for smoothing.
図13(イ)において、PX1,PX2,PX3,・・・は入力されたワーク画像P1を構成する画素であり、各画素PX1,PX2,PX3,・・・に表示された数字は、照度(濃淡)レベルを示している。Medianフィルタ12によるフィルタリング(平滑化)においては、まずこの入力画像P1における連続した複数の画素を指定する窓Mが設定され、この窓M内の画素(図示の例では画素PX1〜PX5)を、図13(ロ)のように照度(濃淡)レベル順に並べ替え、その中央値の画素(図示の例では照度“3”の画素PX1)を検索して、図13(ハ)のように、画像P2へ出力する(ステップS121)。
In FIG. 13 (a), PX 1 , PX 2 , PX 3 ,... Are pixels constituting the input work image P 1 and are displayed on the pixels PX 1 , PX 2 , PX 3 ,. The numbers shown indicate the illuminance (shading) level. In the filtering (smoothing) by
次いで、図14(イ)に示されるように、ワーク画像P1において窓Mを1画素分だけ移動させ、移動によってこの窓Mから出される画素PX1と、新しく窓M内に入る画素PX6を調べ(ステップS122)、図13(ロ)のように照度(濃淡)レベル順に並べ替えられた画素のうち、窓Mの移動によって出て行く画素PX1を、図14(ロ)に示されるように、新しく窓M内に入る画素PX6と入れ替える(ステップS123)。 Next, as shown in FIG. 14A, the window M is moved by one pixel in the work image P 1 , and the pixel PX 1 exited from the window M by the movement and the pixel PX 6 newly entering the window M are moved. the examined (step S122), as shown in Figure 13 (b) like the illuminance (shading) of the sorted pixel level sequence, the pixels PX 1 exiting the movement of the window M, 14 (b) In this manner, the pixel PX 6 newly entering the window M is replaced (step S123).
そして、画素PX1と入れ替わった画素PX6の照度(濃淡)レベルを、隣接する画素と比較し、図14(ハ)に示されるように、照度(濃淡)レベル順となるように並べ替える(ステップS124)。詳しくは、窓M内における新入画素の照度が、その低レベル側に隣接する画素の照度より低レベルの場合は(ステップS124a=YES)、低レベル側に隣接する画素を新入画素と入れ替え(ステップS124b)、逆に新入画素の照度がそれより高レベル側に隣接する画素の照度より高レベルの場合は(ステップS124c=YES)、高レベル側に隣接する画素を新入画素と入れ替える(ステップS124d)といった循環処理を行う。 Then, the illuminance (light / dark) level of the pixel PX 6 replaced with the pixel PX 1 is compared with the adjacent pixels, and rearranged so as to be in the order of the illuminance (light / dark) level as shown in FIG. Step S124). Specifically, when the illuminance of the new pixel in the window M is lower than the illuminance of the pixel adjacent to the low level side (step S124a = YES), the pixel adjacent to the low level side is replaced with the new pixel (step S124b) Conversely, when the illuminance of the new pixel is higher than the illuminance of the pixel adjacent to the higher level side (step S124c = YES), the pixel adjacent to the high level side is replaced with the new pixel (step S124d). Such a circulation process is performed.
次に図14(ニ)に示されるように、その中央値の画素(図示の例では照度“4”の画素PX3)を検索して、画像P2へ出力するといった、ステップS121と同様の処理を行う(ステップS125)。 Next, as shown in FIG. 14 (d), the pixel having the median value (pixel PX 3 having an illuminance “4” in the illustrated example) is retrieved and output to the image P 2 as in step S121. Processing is performed (step S125).
次に、窓部Mがワーク画像P1の端部にあるかどうかを判定し(ステップS126)、端部にある場合は(ステップS126=YES)、フィルタリング処理を終了し、端部に未到達の場合は(ステップS126=NO)、処理はステップS122へリターンする。そしてこのような循環処理によって、図14(ホ)のように、画素照度の変化の緩やかな画像P2が再構築されて行くのである。 Then, the window portion M is determined whether the end of the workpiece image P 1 (step S126), if at the end (step S126 = YES), terminates the filtering process, not reached the end In the case of (step S126 = NO), the process returns to step S122. And by such circulation process, as shown in FIG. 14 (e) is the gentle image P 2 of the change in pixel intensity is gradually reconstructed.
図15は、上述したMedianフィルタ12による平滑化処理で得られる平滑化画像を示すものである。すなわちこの平滑化画像P2は、空間周波数成分が低いものとなるので、ワークWの表面性状による画素照度のムラ、照明のムラなど、照度が緩やかに変化するノイズは残るが、ワークWの表面に付着した塵埃等による、照度が急激に変化する細かいノイズは除去されている。
FIG. 15 shows a smoothed image obtained by the smoothing process by the
説明を図11に戻すと、上述したMedianフィルタ12による平滑化処理後は、入力されたワーク画像P1(図10)から欠陥部の画像Qを抽出するために、この背景処理は、このワーク画像P1から図15に示される平滑化処理画像P2を減算する画像差分処理を行う(ステップS13)。
Returning to FIG. 11, after the smoothing process by the
図16は、この画像差分処理(P1−P2=P3)によって得られる画像P3を示すものである。すなわちこの画像P3は、ワークWの表面性状による画素照度のムラや照明ムラによる画素照度のムラなど、照度が緩やかに変化するノイズが除去され、ワークWの表面に付着した塵埃等による、照度が急激に変化するノイズ画像Rや、欠陥部の画像Qが抽出されたものである。 FIG. 16 shows an image P 3 obtained by this image difference process (P 1 −P 2 = P 3 ). That the image P 3, such as unevenness of pixel illumination by unevenness and uneven illumination of the pixel intensity by the surface texture of the workpiece W, illumination slowly varying noise is removed, by dust deposited on the surface of the workpiece W such as illuminance Are extracted from the noise image R and the defect image Q.
次に、画像P3の照度データの二値化を行うことによって(ステップS14)、周辺との照度差が所定のしきい値以上となる特徴部分のみを抽出した後、抽出された特徴部分の周辺長を計測し、計測された長さが所定のしきい値未満のものは、ノイズとしてこれを除去する処理を行う(ステップS15)。図17は、このノイズ除去処理によって得られる画像P4を示すもので、この画像P4には、欠陥部の画像Qが残っている。 Next, (step S14) by performing binarization of the illuminance data of the image P 3, after the illuminance difference between the surroundings by extracting only feature portions equal to or greater than a predetermined threshold, the extracted feature portion A peripheral length is measured, and if the measured length is less than a predetermined threshold, a process of removing this as noise is performed (step S15). Figure 17 shows the image P 4 obtained by the noise removal process, on the image P 4 has left image Q of the defective portion.
そして、この画像P4における欠陥部の画像Qの特徴量、すなわち例えば画像Qの画素数(面積)、長さ、周辺長、照度などを計測し(ステップS16)、良否の判定を行う(ステップS17)。そして、これらの計測値のうちいずれかが、予め設定されたしきい値以上であった場合は(ステップS17=NG)、図2に示される検査ステージ1上のワークWが不良品として排出される(ステップS18)。
Then, the feature quantity of the image Q of the defect in the image P 4, that is, for example images Q number of pixels (area), length, perimeter, illumination, etc. were measured (step S16), and quality determination performed (step S17). If any of these measured values is equal to or greater than a preset threshold value (step S17 = NG), the workpiece W on the
また、これらの計測値が、いずれも予め設定されたしきい値未満であれば(ステップS17=OK)、不良が存在しなかったものと判定され(図3のステップS10=NO)、処理は図3のステップS1へリターンして、入力画像メモリ5から次の画像データの読み出しが行われる。
If these measured values are both less than a preset threshold value (step S17 = OK), it is determined that no defect exists (step S10 = NO in FIG. 3), and the process is as follows. Returning to step S1 in FIG. 3, the next image data is read from the
1 検査ステージ
2 照明装置
3 画像入力装置
4 画像処理装置
5 入力画像メモリ
6 プログラムメモリ
7 CPU
8 法線データ格納メモリ
9 中心座標データ格納メモリ
10 直線化画像格納メモリ
11 検査結果データ格納メモリ
12 Medianフィルタ
E 中心点(特定の点)
F 中心線
N 法線
S1〜Sn サンプリング点
P ワーク画像
Q 欠陥部の画像
R ノイズ画像
V 走査要素
W ワーク
DESCRIPTION OF
8 Normal
F centerline N normal S 1 to S n sampling points P workpiece image Q defect image R noise image V scanning element W workpiece
Claims (4)
認識されたワーク画像上の任意の位置座標を法線検出点としてこの法線検出点を通る任意の直線を中心とする所定幅でワーク画像を切り取って前記直線で折り返し、折り返された画像が互いに重合しなければ前記直線の角度を変更して再び折り返し、折り返された画像が互いに重合した場合に、このときの前記直線を法線として検出し、この法線上の特定の点でこの法線と直交する直線上にあって前記特定の点から所定距離離れた位置座標を次の法線検出点として前記法線の検出を繰り返す循環検出処理と、
前記法線上の特定の点でこの法線と直交する直線に沿って前記ワーク画像を直線化する画像直線化処理と、
直線化処理された画像から欠陥部を検出してその良否を判定する欠陥検出処理と、
を備えることを特徴とする画像処理によるワーク欠陥検査方法。 Work image recognition that samples pixel illuminance by a scanning element that moves on a screen that displays an image of a work that has the same shape and size as each cross section in the longitudinal direction, and recognizes the work image in the screen from the sampled illuminance value Processing,
An arbitrary position coordinate on the recognized workpiece image is used as a normal detection point, a workpiece image is cut out with a predetermined width centered on an arbitrary straight line passing through the normal detection point, and folded at the straight line. If it does not overlap, the angle of the straight line is changed and folded again, and when the folded images overlap each other, the straight line at this time is detected as a normal line, and this normal line is detected at a specific point on the normal line. Cyclic detection processing that repeats detection of the normal line using a position coordinate that is on a straight line orthogonal to the specific point and separated by a predetermined distance as the next normal line detection point;
An image linearization process for linearizing the workpiece image along a straight line orthogonal to the normal at a specific point on the normal;
A defect detection process for detecting a defective portion from the linearized image and determining its quality;
A work defect inspection method using image processing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007148710A JP4998722B2 (en) | 2007-06-05 | 2007-06-05 | Work defect inspection method by image processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007148710A JP4998722B2 (en) | 2007-06-05 | 2007-06-05 | Work defect inspection method by image processing |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008304958A JP2008304958A (en) | 2008-12-18 |
JP4998722B2 true JP4998722B2 (en) | 2012-08-15 |
Family
ID=40233672
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007148710A Active JP4998722B2 (en) | 2007-06-05 | 2007-06-05 | Work defect inspection method by image processing |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4998722B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
ES2447640B1 (en) * | 2012-08-08 | 2015-03-10 | Consejo Superior Investigacion | METHOD OF TRANSFORMATION OF IMAGES IN CLOUDS OF POINTS OF MULTIDIMENSIONAL SPACES, METHOD OF IDENTIFICATION OF OBJECTS AND INDIVIDUALS, METHOD OF SEGMENTATION, METHOD OF LOCATION OF POINTS OF INTEREST AND USES |
JP6647078B2 (en) * | 2016-02-29 | 2020-02-14 | Nok株式会社 | Work defect inspection method and work defect inspection system by image processing |
CN112862770B (en) * | 2021-01-29 | 2023-02-14 | 珠海迪沃航空工程有限公司 | Defect analysis and diagnosis system, method and device based on artificial intelligence |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000028543A (en) * | 1998-07-13 | 2000-01-28 | Dainippon Printing Co Ltd | Pattern inspecting method and device therefor |
JP2000172863A (en) * | 1998-12-11 | 2000-06-23 | Hitachi Ltd | Stroke extracting and graphic drawing method |
EP1537536B1 (en) * | 2002-08-27 | 2011-09-14 | Koninklijke Philips Electronics N.V. | Method of straightening a reformat for navigation and quantification |
-
2007
- 2007-06-05 JP JP2007148710A patent/JP4998722B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2008304958A (en) | 2008-12-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7012701B2 (en) | Measuring for device for contactless measurement of tires | |
KR20110095344A (en) | Device for examining defect of molded sheet | |
JP5086970B2 (en) | Wood appearance inspection device, wood appearance inspection method | |
CN112200790B (en) | Cloth defect detection method, device and medium | |
KR100687811B1 (en) | Method and apparatus for detecting defects of the welded part | |
CN113155839A (en) | Steel plate outer surface defect online detection method based on machine vision | |
CN114280075A (en) | Online visual inspection system and method for surface defects of pipe parts | |
JP4998722B2 (en) | Work defect inspection method by image processing | |
KR20080060851A (en) | Defect detecting method of log surface | |
JP6199799B2 (en) | Self-luminous material image processing apparatus and self-luminous material image processing method | |
Laucka et al. | Research of the defects in anesthetic masks | |
CN114187269B (en) | Rapid detection method for surface defect edge of small component | |
JP6035124B2 (en) | Defect inspection apparatus and defect inspection method | |
JP4956077B2 (en) | Defect inspection apparatus and defect inspection method | |
TWI493177B (en) | Method of detecting defect on optical film with periodic structure and device thereof | |
CN110634124A (en) | Method and equipment for area detection | |
TWI757590B (en) | Luminance uniform detection system and luminance uniform detection method | |
Mishra et al. | Surface defects detection for ceramic tiles using image processing and morphological techniques | |
JP2003156451A (en) | Defect detecting device | |
JP6647078B2 (en) | Work defect inspection method and work defect inspection system by image processing | |
JPH0718811B2 (en) | Defect inspection method | |
JP2686053B2 (en) | Defect inspection method by visual inspection | |
JP2006226834A (en) | Surface inspection device and surface inspection method | |
JP2005265828A (en) | Flaw detection method and apparatus | |
KR101646838B1 (en) | Counting method for track images |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20100531 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110713 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20111110 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20111207 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120202 |
|
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: 20120418 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20120501 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4998722 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150525 Year of fee payment: 3 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |