纺织学报 ›› 2020, Vol. 41 ›› Issue (10): 58-66.doi: 10.13475/j.fzxb.20200102909

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

基于相似性定位和超像素分割的织物疵点检测

朱磊(), 任梦凡, 潘杨, 李博涛   

  1. 西安工程大学 电子信息学院, 陕西 西安 710048
  • 收稿日期:2020-01-20 修回日期:2020-06-04 出版日期:2020-10-15 发布日期:2020-10-27
  • 作者简介:朱磊(1979—),男,教授,博士。主要研究方向为图像处理。E-mail:zhulei791014@163.com
  • 基金资助:
    国家自然科学基金项目(61971339);陕西省重点研发计划项目(2019GY-113);西安市科技局创新引导计划项目(201805030YD8C G146)

Fabric defect detection based on similarity location and superpixel segmentation

ZHU Lei(), REN Mengfan, PAN Yang, LI Botao   

  1. School of Electronics and Information, Xi'an Polytechnic University, Xi'an, Shaanxi 710048, China
  • Received:2020-01-20 Revised:2020-06-04 Online:2020-10-15 Published:2020-10-27

摘要:

为解决周期性纹理织物图像的疵点检测及其轮廓精确分割问题,提出一种基于相似性定位和超像素分割的织物疵点检测方法。将待检测图像进行中值滤波和对数增强,并利用FT算法估计增强图像的显著图实现待检测图像的预处理;将基于归一化局部均值差分的灰度相似性检测参量和结构相似性检测参量结合,构建可测量更多类型周期性纹理织物图像的相似性度量函数,通过阈值化增强图像分块的相似性测量值实现疵点在显著图中的粗定位;最后对显著图粗定位图像分块进行超像素细分割及其二值化处理,并借助连通域分析剔除孤立点,获得完整的疵点轮廓。结果表明,本方法与常规3种方法相比,对周期性纹理织物图像的疵点检测准确率更高,且提取出的疵点轮廓更精确。

关键词: 织物疵点检测, 相似性定位, 超像素分割, 相似性度量函数, 归一化局部均值差分

Abstract:

Aiming at the problem in defect detection and accurate contour segmentation of periodic texture fabric image, a method of fabric defect detection was proposed based on similarity location and superpixel segmentation techniques. The median filter and logarithm enhancement were applied for the detected image, and the saliency image of the enhancement image was estimated by frequency-tuned algorithm to facilitate the preprocessing of the detected image. Combining gray similarity detection parameters based on the normalized local mean difference with structural similarity detection parameters, a similarity metric function capable of measuring more types of periodic texture fabric images was constructed. The rough localization of defects was identified by thresholding the similarity measurement value of the enhancement image blocks. Finally, superpixel fine segmentation and binarization were performed on the rough localization image blocks, and the outliers were eliminated via connected domain analysis to obtain a complete defect contour. The experimental results show that, compared with the three conrentional methods, the proposed method has a higher accuracy in detecting the defects in the periodic texture fabric image, and the extracted defect contour is more accurate.

Key words: fabric defect detection, similarity location, superpixel segmentation, similarity metric function, normalized local mean difference

中图分类号: 

  • TS101.9

图1

测试图像及各方法的疵点检测结果 注:1#为带疵点简单纹理织物图像;2#为带疵点复杂横向条纹织物图像;3#为带疵点复杂纵向条纹织物图像;4#为无疵点织物图像。"

图2

基于相似性定位和超像素分割的织物疵点检测方法流程框图"

图3

SSIM方法和本文方法对疵点的相似性粗定位结果比较"

图4

α取不同值时对疵点的相似性粗定位检测"

图5

全局阈值与超像素分割对图3相似性粗定位图像的分割结果比较"

表1

本文方法的计算流程"

方法1:基于相似性定位和超像素分割的织物疵点检测方法
输入:织物图像Ir
输出:检测结果B
1:使用式(1)将待检测图像Ir进行处理得到亮度信息Iv
2:对Iv进行中值滤波和对数增强,得到增强图像I
3: 利用式(4)估计增强图像I对应的显著图Ism
4:将I分为大小相同且互不重叠的N个小块Pn(n=1,2,,N)和 以20为步长互相重叠的M个小块Qi(i=1,2,,M)
5:for n=1:N
6: for i=1:M
7: if PnQi
8: S(Pn,Qi)=α×SSIM(Pn,Qi)+(1-α)×GRAY(Pn,Qi)
9: end if
10: end for
11: 使用式(11)对Pn进行处理,得到相似性粗定位图像Ic
12: end for
13:对Ic进行超像素分割,并使用式(13)对其进行二值化得到Bc
14:对Bc进行连通域分析,得到检测结果B

图6

各方法对简单纹理织物图像的疵点检测结果比较 注:a1,a2,a3为带有较明显疵点的织物图像;b1,b2,b3为带有细微疵点的织物图像;c1为无疵点织物图像。"

图7

各方法对复杂纹理织物图像的疵点检测结果比较 注:a1,a2,a3为带有较明显疵点的织物图像;b1,b2,b3为带有细微疵点的织物图像;c1为无疵点织物图像。"

表2

各方法对织物图像检测结果的参数比较"

检测
方法
输入织物
图像类型
正确检
测数量
错误检
测数量
TPR FPR ACC T/s
文献[7] 含疵点 55 15 78.57 64.29 57.14 3.41
不含疵点 25 45
文献[9] 含疵点 54 16 77.14 71.43 52.86 0.16
不含疵点 20 50
文献[15] 含疵点 57 13 81.43 57.14 62.14 23.45
不含疵点 30 40
本文 含疵点 68 2 97.14 1.43 97.86 4.85
不含疵点 69 1
[1] 杜帅, 李岳阳, 王孟涛, 等. 基于改进局部自适应对比法的织物疵点检测[J]. 纺织学报, 2019,40(2):44-50.
DU Shuai, LI Yueyang, WANG Mengtao, et al. Fabric defect detection based on improved local adaptive contrast method[J]. Journal of Textile Research, 2019,40(2):44-50.
[2] 王明景, 白瑞林, 何薇, 等. 图案布匹瑕疵的在线视觉检测[J]. 光电工程, 2014,41(6):19-26.
WANG Mingjing, BAI Ruilin, HE Wei, et al. Online visual inspection of pattern fabric defects[J]. Opto-Electronic Engineering, 2014,41(6):19-26.
[3] 李文羽, 程隆棣. 基于机器视觉和图像处理的织物疵点检测研究新进展[J]. 纺织学报, 2014,35(3):158-164.
LI Wenyu, CHENG Longdi. New development of fabric defect detection based on machine vision and image processing[J]. Journal of Textile Research, 2014,35(3):158-164.
[4] 胡克满, 罗少龙, 胡海燕. 应用Canny算子的织物疵点检测改进算法[J]. 纺织学报, 2019,40(1):153-158.
HU Keman, LUO Shaolong, HU Haiyan. Improved algorithm of fabric defect detection using Canny ope-rator[J]. Journal of Textile Research, 2019,40(1):153-158.
[5] LI Y, LUO H, YU M, et al. Fabric defect detection algorithm using RDPSO-based optimal Gabor filter[J]. Journal of The Textile Institute, 2018,110(4):487-495.
doi: 10.1080/00405000.2018.1489951
[6] ZHANG B, TANG C M. A method for defect detection of yarn-dyed fabric based on frequency domain filtering and similarity measurement[J]. Autex Research Journal, 2019,19(3):257-262.
doi: 10.1515/aut-2018-0040
[7] CAO J J, WANG N N, ZHANG J, et al. Detection of varied defects in diverse fabric images via modified RPCA with noise term and defect prior[J]. International Journal of Clothing Science & Technology, 2016,28(4):516-529.
[8] 祝双武, 郝重阳. 基于纹理周期性分析的织物疵点检测方法[J]. 计算机工程与应用, 2012,48(21):163-166.
ZHU Shuangwu, HAO Chongyang. Fabric defect detection method based on texture periodicity ana-lysis[J]. Computer Engineering and Applications, 2012,48(21):163-166.
[9] HOU X D, ZHANG L Q. Saliency detection: a spectral residual approach[C]// IEEE Conference on Computer Vision and Pattern Recognition. Minneapolis:IEEE, 2007: 18-23.
[10] ZHANG K B, YAN Y D, LI P F, et al. Fabric defect detection using salience metric for color dissimilarity and positional aggregation[J]. IEEE Access, 2018,6:49170-49181.
doi: 10.1109/ACCESS.2018.2868059
[11] 钱晓亮, 张鹤庆, 张焕龙, 等. 基于视觉显著性的太阳能电池片表面缺陷检测[J]. 仪器仪表学报, 2017,38(7):1570-1578.
QIAN Xiaoliang, ZHANG Heqing, ZHANG Huanlong, et al. Detection of solar cell surface defects based on visual significance[J]. Chinese Journal of Scientific Instrument, 2017,38(7):1570-1578.
[12] 景军锋, 范晓婷, 李鹏飞, 等. 应用深度卷积神经网络的色织物缺陷检测[J]. 纺织学报, 2017,38(2):68-74.
JING Junfeng, FAN Xiaoting, LI Pengfei, et al. Defect detection of dyed fabrics using deep convolution neural network[J]. Journal of Textile Research, 2017,38(2):68-74.
[13] 王理顺, 钟勇, 李振东, 等. 基于深度学习的织物缺陷在线检测算法[J]. 计算机应用, 2019,39(7):2125-2128.
WANG Lishun, ZHONG Yong, LI Zhendong, et al. On line detection algorithm of fabric defects based on deep learning[J]. Journal of Computer Applications, 2019,39(7):2125-2128.
[14] 吴志洋, 卓勇, 李军, 等. 基于卷积神经网络的单色布匹瑕疵快速检测算法[J]. 计算机辅助设计与图形学学报, 2018,30(12):2262-2270.
WU Zhiyang, ZHUO Yong, LI Jun, et al. Fast detection algorithm of single color fabric defects based on convolution neural network[J]. Journal of Computer-Aided Design & Computer Graphics, 2018,30(12):2262-2270.
[15] CAO J J, ZHANG J, WEN Z J, et al. Fabric defect inspection using prior knowledge guided least squares regression[J]. Multimedia Tools and Applications, 2017,76(3):4141-4157.
doi: 10.1007/s11042-015-3041-3
[16] ACHANTA R, HEMAMI S, ESTRADA F, et al. Frequency-tuned salient region detection[C]// 2009 IEEE Conference on Computer Vision and Pattern Recognition, Florida: IEEE, 2009: 1597-1604.
[17] ACHANTA R, SHAJI A, SMITH K, et al. SLIC superpixels compared to state-of-the-art superpixel methods[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2012,34(11):2274-2282.
doi: 10.1109/TPAMI.2012.120
[18] WANG Z, BOVIK A C, SHEIKH H R, et al. Image quality assessment: from error visibility to structural similarity[J]. IEEE Transactions on Image Processing, 2004,13(4):600-612.
doi: 10.1109/tip.2003.819861 pmid: 15376593
[1] 张缓缓, 马金秀, 景军锋, 李鹏飞. 基于改进的加权中值滤波与K-means聚类的织物缺陷检测[J]. 纺织学报, 2019, 40(12): 50-56.
[2] 尉苗苗 李岳阳 蒋高明 丛洪莲. 应用最优Gabor滤波器的经编织物疵点检测[J]. 纺织学报, 2016, 37(11): 48-54.
[3] 石美红 张正 郭仙草 陈永当. 基于显著纹理特征的织物疵点检测方法[J]. 纺织学报, 2016, 37(10): 42-049.
[4] 厉征鑫 周建 潘如如 刘建立 高卫东. 应用单演小波分析的织物疵点检测[J]. 纺织学报, 2016, 37(09): 59-64.
[5] 景军锋 范晓婷 李鹏飞 张蕾 张宏伟. 应用Gaussian回代交替方向图像分解算法的色织物疵点检测[J]. 纺织学报, 2016, 37(06): 136-141.
[6] 景军锋 李江南 李鹏飞. 改进型奇异值分解在织物疵点检测上的应用[J]. 纺织学报, 2014, 35(6): 62-0.
[7] 管声启 高照元 吴宁 徐帅华. 基于视觉显著性的平纹织物疵点检测[J]. 纺织学报, 2014, 35(4): 56-0.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!