Journal of Textile Research ›› 2019, Vol. 40 ›› Issue (01): 62-66.doi: 10.13475/j.fzxb.20180300706

• Textile Engineering • Previous Articles     Next Articles

Image recognition algorithm based on yarn hairiness compensation and adaptive median filter

SUN Qiaoyan1(), CHEN Xiangguang2, LIU Meina1, SUN Yumei1, XIN Binjie1   

  1. 1. College of Engineering, Yantai Nanshan University, Yantai, Shandong 265713, China
    2. School of Chemical Engineering and Environment, Beijing Institute of Technology, Beijing 100081, China
  • Received:2018-03-01 Revised:2018-09-30 Online:2019-01-15 Published:2019-01-18

Abstract:

In order to solve the influence of yarn hairiness on image recognition of yarn body in the process of yarn parameter recognition and calculation,an algorithm based on gray scale compensation and adaptive median filtering was proposed. R data were used to binarize the RGB image collected by the image scanner into a grayscale image. The image of the black yarn with white background was recognized according to the change of the vertical gray value in the feather form and then compensated by 3 layer push from small to large. The image of the white yarn with black background was recognized and the background gray value was compensated according to the gray value of the feather pixel. Each of the two compensated images were subjected adaptive median filtering (ANF) with a maximum window smaller than 11.The results of MatLab simulation show that the algorithm can recognize and compensate some pixels of yarn hairiness quickly and acquire clear main yarn image. The results can meet the requirements of accuracy.

Key words: hairiness compensation, adaptive median filter, recognition of gray threshold value, vertical direction recognition and push-wipe

CLC Number: 

  • TP319

Fig.1

Black background white transverse yarn original image"

Fig.2

Images processed by adaptive median filtering (a) and by inflation and corrosion operations (b)"

Fig.3

Image after black background transverse yarn compensation"

Fig.4

Images of black background longitudinal yarn compensation. (a)Original image; (b)Image after processing"

Fig.5

White background black yarn original image"

Fig.6

Flow chart of vertical direction recognition and pushing algorithm"

Fig.7

Result of processing images in Fig.5 with r=1 (a) and r=2 (b)"

Fig.8

Image processed by vertical direction recognition and massage compensation algorithm"

Fig.9

Final processed images."

Tab.1

Results comparison"

图片 理论直径/mm 测量直径/mm 误差率%
黑底横向白线 0.202 0.207 2.48
黑底纵向白线 0.202 0.205 1.49
白底黑线 0.205 0.203 1.00
[1] 姬建正, 刘建立, 高卫东, 等. 基于数字图像处理的纱线线密度测量[J]. 纺织学报, 2011,32(10):42-46.
JI Jianzheng, LIU Jianli, GAO Weidong, et al. Measurement of yarn linear density based on digital image processing[J]. Journal of Textile Research, 2011,32(10):42-46.
[2] 方珩, 辛斌杰, 刘晓霞, 等. 一种新型纱线毛羽图像特征识别算法的研究[J]. 河北科技大学学报, 2015,36(1):63-72.
FANG Heng, XIN Binjie, LIU Xiaoxia, et al. Research of a novel methed for measuring yarn hairiness based on image recognition[J]. Journal of Hebei University of Science and Technology, 2015,36(1):63-72.
[3] 郭燕蕾, 顾平. 纤维和纱线检测中的图像处理技术[J]. 江苏丝绸, 2008(2):1-4.
GUO Yanlei, GU Ping. Image processing technology in fiber and yarn[J]. Jiangsu Silk, 2008(2):1-4.
[4] 孙银银, 潘如如, 高卫东. 基于数字图像处理的纱线毛羽检测[J]. 纺织学报, 2013,34(6):102-106.
SUN Yinyin, PAN Ruru, GAO Weidong. Detection of yarn hairiness based on digital image processing[J]. Journal of Textile Research, 2013,34(6):102-106.
[5] 张增康, 马卫红. 基于线阵CCD的纱线毛羽检测[J]. 上海纺织科技, 2017(10):43-46.
ZHANG Zengkang, MA Weihong. Yarn hairiness detection based on linear CCD[J]. Shanghai Textile Science & Technology, 2017(10):43-46.
[6] 章国红, 辛斌杰. 图像处理技术在纱线毛羽检测方面的应用[J]. 河北科技大学学报, 2016,37(1):76-81.
ZHANG Guohong, XIN Binjie. Application of image processing technology in yarn hairiness detection[J]. Journal of Hebei University of Science and Technology, 2016,37(1):76-81.
[7] 陈健, 郑绍华, 余轮, 等. 基于方向的多阈值自适应中值滤波改进算法[J]. 电子测量与仪器学报, 2013,27(2):156-161.
CHEN Jian, ZHENG Shaohua, YU Lun, et al. Improved algorithm for adaptive median filter with multi-threshold based on direction information[J]. Journal of Electronic Measurement and Instrument, 2013,27(2):156-161.
doi: 10.3724/SP.J.1187.2013.00156
[8] 孙海英, 李锋, 商慧亮. 改进的变分自适应中值滤波算法[J]. 电子与信息学报, 2011,33(7):1743-1747.
SUN Haiying, LI Feng, SHANG Huiliang. Salt-and-pepper noise removal by variational method based on improved adative median filter[J]. Journal of Electronics & Information Technology, 2011,33(7):1743-1747.
[9] 罗玲, 王修信. 一种高效去除椒盐噪声的中值滤波方法[J]. 微电子学与计算机, 2011,28(11):118-121.
LUO Ling, WANG Xiuxin. An efficient salt-and-pepper noise removal by median filter[J]. Microelectronics & Computer, 2011,28(11):118-121.
[10] 阮秋琦. 数字图像处理的MATLAB实现 [M].2版. 北京: 清华大学出版社, 2016: 142-144.
RUAN Qiuqi. Digital Image Processing Using MATLAB[M]. 2nd ed. Beijing: Tsinghua University Press, 2016: 142-144.
No related articles found!
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!