纺织学报 ›› 2019, Vol. 40 ›› Issue (12): 50-56.doi: 10.13475/j.fzxb.20181200407

• 纺织工程 • 上一篇    下一篇

基于改进的加权中值滤波与K-means聚类的织物缺陷检测

张缓缓(), 马金秀, 景军锋, 李鹏飞   

  1. 西安工程大学 电子信息学院, 陕西 西安 710048
  • 收稿日期:2018-12-03 修回日期:2019-06-02 出版日期:2019-12-15 发布日期:2019-12-18
  • 作者简介:张缓缓(1986—),女,讲师,硕士。主要研究方向为图像处理、模式识别。E-mail:zhanghuanhuan0557@163.com
  • 基金资助:
    国家自然科学基金项目(61902302);陕西省高校科协青年人才托举计划项目(20180115);陕西省教育厅科研计划项目(18JK0338)

Fabric defect detection method based on improved fast weighted median filtering and K-means

ZHANG Huanhuan(), MA Jinxiu, JING Junfeng, LI Pengfei   

  1. School of Electronic and Information, Xi'an Polytechnic University, Xi'an, Shaanxi 710048, China
  • Received:2018-12-03 Revised:2019-06-02 Online:2019-12-15 Published:2019-12-18

摘要:

为检测纹理织物在生产过程中产生的各种疵点,提出一种基于改进的加权中值滤波与K-means聚类相结合的纹理织物疵点检测方法。首先利用改进的加权中值滤波对纹理织物图像进行预处理,以减少纹理信息对疵点检测产生的影响,同时通过联合直方图动态数据分配权重和像素,减少寻求中位数的时间来有效地缩短检测时间,提高了执行速度;然后采用K-means算法对滤波后的织物图像进行聚类,计算织物图像疵点和非疵点的聚类中心,进而实现图像疵点区域的分割。实验结果表明,该方法可有效地检测出方格、点形、星形、平纹、斜纹等多类型纹理织物的疵点,并显著提高检测速度。

关键词: 织物疵点检测, 改进加权中值滤波, 联合直方图, K-means聚类

Abstract:

In order to detect various defects in the production process of textured fabrics, a texture fabric defect detection method based on improved weighted median filtering and K-means clustering was proposed. Firstly, the fabric image was preprocessed by the improved weighted median filter to reduce the influence of texture information on the defect detection. At the same time, by assigning weights and pixels to the histogram dynamic data, the time to seek the median was effectively shortened to increase the execution speed. Then, the K-means algorithm was adopted to cluster the filtered fabric images, and the cluster centers of the fabric image defects and non-defects were calculated, thereby realizing the segmentation of the image defect regions. The experimental results show that the method can effectively detect the defects of various types of textured fabrics such as square, dot, star, plain, and twill and significantly increase the detection speed.

Key words: fabric defect detection, improved weighted median filtering, joint histogram, K-means clustering

中图分类号: 

  • TP391

图1

织物检测流程框图"

图2

联合直方图图解"

图3

切点与平衡点的分布"

图4

K-means算法对织物疵点进行分割"

图5

不同窗口半径r对应的检测结果"

图6

不同σ值对应的检测结果"

表1

改进的快速加权中值滤波的参数设置"

织物类型 r σ
方格 [12.5~13.0] [135.0~245.0]
点形 [8.0~11.0] [90.0~200.0]
星形 [55.0~58.0] [250.0~390.0]
平纹 [5.0~10.0] [12.0~25.0]
斜纹 [9.0~10.0] [21.5~25.0]

图7

本文方法对部分方格点形及星形织物样本检测结果"

图8

本文方法对部分平纹及斜纹样本检测结果"

图9

不同方法检测结果对比"

表2

使用不同方法检测所用平均时间"

方法 方格
织物
点形
织物
星形
织物
平纹
织物
斜纹
织物
文献[3] 9.156 7 14.998 6 8.536 5 10.015 8 38.782 4
文献[17] 0.941 5 0.913 4 1.095 7 0.974 1 49.459 7
本文方法 0.193 7 0.233 4 0.312 2 0.049 5 0.507 7

表3

使用不同方法的准确率对比"

织物类型 检测方法 ACC/% TPR/% FPR/%
文献[3] 93.93 95.07 12.87
方格 文献[17] 92.50 94.29 20.00
本文方法 97.50 98.09 6.67
文献[3] 92.49 96.01 29.97
点形 文献[17] 95.09 97.82 20.00
本文方法 94.17 95.24 13.57
文献[3] 93.62 97.14 25.88
星形 文献[17] 91.67 97.73 13.29
本文方法 94.36 95.89 19.73
文献[3] 95.83 98.09 20.05
平纹 文献[17] 90.94 95.23 30.48
本文方法 94.23 96.84 25.75
文献[3] 91.58 98.56 10.98
斜纹 文献[17] 92.79 96.76 17.79
本文方法 94.64 93.42 5.96
[1] CONCI A, PROENÇA C B. A fractal image analysis system for fabric inspection based on a box-counting method[J]. Computer Networks & Isdn Systems, 1998,30(20/21):1887-1895.
[2] 朱丹丹, 潘如如, 高卫东. 基于傅里叶特征谱和相关系数的织物瑕疵检测[J]. 计算机工程与应用, 2014,50(19):182-186.
ZHU Dandan, PAN Ruru, GAO Weidong. Fabric defect detection using characteristic spectrum of Fourier transform and correlation coefficient[J]. Computer Engineering and Applications, 2014,50(19):182-186.
[3] JING J F, YANG P, LI P F. Supervised defect detection on textile fabrics via optimal Gabor filter[J]. Journal of Industrial Textile, 2013,44(1):40-57.
[4] LI W, XUE W, CHENG L. Intelligent detection of defects of yarn-dyed fabrics by energy-based local binary patterns[J]. Textile Research Journal, 2012,82(19):1960-1972.
[5] AMET A L, ERTÜZÜN A, ERÇIL A. An efficient method for texture defect detection: sub-band domain co-occurrence matrices[J]. Image and Vision Computing, 2000,18(6/7):543-553.
doi: 10.1016/S0262-8856(99)00062-1
[6] KUMBHAR P Y, MATHPATI T. Textile fabric defects detection and sorting using image processing[J]. International Journal for Research in Emerging Science and Technology, 2016,3(3):19-24.
[7] KUMAR A, PANG G K H. Defect detection in textured materials using Gabor filters[J]. IEEE Transactions on Industry Applications, 2002,38(2):425-440.
[8] TSAI I S, HU M C. Automatic inspection of fabric defects using an artificial neural network technique[J]. Textile Research Journal, 1996,66(7):474-482.
[9] HAJIMOWLANA S H, MUSCEDERE R, JULLIEN G A. et al. 1D autoregressive modeling for defect detection in web inspection systems[C]// Midwest Symposium on Systems & Circuits. [S. l.]: IEEE Computer Society, 1998: 318-321.
[10] 李敏, 崔树芹, 谢治平. 高斯混合模型在印花织物瑕疵检测中的应用[J]. 纺织学报, 2015,36(8):94-98.
LI Min, CUI Shuqin, XIE Zhiping. Application of Gaussian mixture model on defect detection of print fabric[J]. Textile Research Journal, 2015,36(8):94-98.
[11] MEI S, WANG Y, WEN G. Automatic fabric defect detection with a multi-scale convolutional denoising autoencoder network model[J]. Sensors, 2018,18(4):1064.
[12] YAPI D, MEJRI M, ALLILI M S. A Learning-based approach for automatic defect detection in textile images[J]. Biochemical & Biophysical Research Communications, 2015,48(3):2423-2428.
[13] TSANG C S C, NGAN H Y T, PANG G K H. Fabric inspection based on the Elo rating method[J]. Pattern Recognition, 2016,51(4):378-394.
[14] LI Y, ZHAO W, PAN J. Deformable patterned fabric defect detection with fisher criterion-based deep lear-ning[J]. IEEE Transactions on Automation Science and Engineering, 2017,14(2):1256-1264.
[15] ZHANG Q, XU L, JIA J. 100+ times faster weighted median filter[C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Columbus: CUPR, 2014: 2830-2837.
[16] NG M K, NGAN H Y T, YUAN X, et al. Patterned Fabric Inspection and Visualization by the Method of Image Decomposition[J]. IEEE Transactions on Automation Science & Engineering, 2014,11(3):943-947.
[17] 张缓缓, 李仁忠, 景军锋. Frangi滤波器和模糊C均值算法相结合的织物瑕疵检测[J]. 纺织学报, 2015,36(9):120-124.
ZHANG Huanhuan, LI Renzhong, JING Junfeng. Fabric defect detection based on Frangi filter and fuzzy C-means algorithm in combination[J]. Journal of Textile Research, 2015,36(9):120-124.
[1] 朱磊, 任梦凡, 潘杨, 李博涛. 基于相似性定位和超像素分割的织物疵点检测[J]. 纺织学报, 2020, 41(10): 58-66.
[2] 夏凤勤 毋戈 谢昊洋 钟跃崎. 基于人体纵截面特征曲线的体型分类[J]. 纺织学报, 2017, 38(06): 86-91.
[3] 尉苗苗 李岳阳 蒋高明 丛洪莲. 应用最优Gabor滤波器的经编织物疵点检测[J]. 纺织学报, 2016, 37(11): 48-54.
[4] 石美红 张正 郭仙草 陈永当. 基于显著纹理特征的织物疵点检测方法[J]. 纺织学报, 2016, 37(10): 42-049.
[5] 厉征鑫 周建 潘如如 刘建立 高卫东. 应用单演小波分析的织物疵点检测[J]. 纺织学报, 2016, 37(09): 59-64.
[6] 景军锋 范晓婷 李鹏飞 张蕾 张宏伟. 应用Gaussian回代交替方向图像分解算法的色织物疵点检测[J]. 纺织学报, 2016, 37(06): 136-141.
[7] 倪世明 金娟凤 庞程方 邹奉元. 基于纵向轮廓曲线的青年女性体型细分研究[J]. 纺织学报, 2014, 35(8): 87-0.
[8] 景军锋 李江南 李鹏飞. 改进型奇异值分解在织物疵点检测上的应用[J]. 纺织学报, 2014, 35(6): 62-0.
[9] 管声启 高照元 吴宁 徐帅华. 基于视觉显著性的平纹织物疵点检测[J]. 纺织学报, 2014, 35(4): 56-0.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!