电子科技 ›› 2025, Vol. 38 ›› Issue (7): 58-65.doi: 10.16180/j.cnki.issn1007-7820.2025.07.008

• • 上一篇    下一篇

基于灰度梯度共生矩阵的快速布匹瑕疵检测算法

叶瑞帆1, 刘瑜1(), 沈杰1, 任佳1, 章小祥2   

  1. 1.浙江理工大学 信息科学与工程学院,浙江 杭州 310018
    2.浙江灿宇纺织有限公司,浙江 衢州 324209
  • 收稿日期:2024-01-08 修回日期:2024-01-25 出版日期:2025-07-15 发布日期:2025-07-10
  • 通讯作者: 刘瑜(1975-),男,E-mail: liuyu@zstu.edu.cn,博士,副教授。研究方向:智能控制、机器人控制技术等。
  • 作者简介:叶瑞帆(1998-),男,硕士研究生。研究方向:智能检测与控制。
    沈杰(2000-),男,硕士研究生。研究方向:智能检测与控制。
  • 基金资助:
    浙江省“尖兵”研发攻关计划(2023C01062)

A Fast Fabric Defect Detection Algorithm Based on Gray Gradient Co-Occurrence Matrix

YE Ruifan1, LIU Yu1(), SHEN Jie1, REN Jia1, ZHANG Xiaoxiang2   

  1. 1. School of Information Science and Engineering,Zhejiang Sci-Tech University,Hangzhou 310018,China
    2. Zhejiang Canyu Textile Co., Ltd.,Quzhou 324209,China
  • Received:2024-01-08 Revised:2024-01-25 Online:2025-07-15 Published:2025-07-10
  • Supported by:
    "Jianbing" Research and Development Plan of Zhejiang(2023C01062)

摘要:

针对织物质量控制的瑕疵检测方法存在模型复杂、检测速度慢等问题,文中提出一种基于灰度梯度共生矩阵(Gray-Gradient Co-Occurrence Matrix, GGCM)的快速布匹瑕疵检测算法。在传统灰度共生矩阵(Gray Level Co-occurrence Matrix, GLCM)的基础上增添了对图像梯度信息的特征提取过程,并结合支持向量机(Support Vector Machine, SVM)对织物图像进行快速准确的检测分类。分析对比了GLCM与GGCM所提取的特征值,并使用SVM分类器检测布匹瑕疵。通过基于某纺织企业现场收集的织物图像数据集进行训练分类实验,结果表明加入梯度信息后检测效果显著提升,准确率达94.8%,精确率达93.9%。所提算法检测迅速,在提取特征后,每张图片检测仅耗时0.5 ms,适用于工业生产现场。

关键词: 布匹瑕疵检测, 纹理, 灰度梯度共生矩阵, 灰度共生矩阵, 特征值, 自适应中值滤波, 直方图均衡化, 支持向量机

Abstract:

In view of the problems of complex model and slow detection in fabric quality control, a fast fabric defect detection algorithm based on GGCM (Gray-Gradient Co-Occurrence Matrix) is proposed. Based on the traditional GLCM (Gray Level Co-Occurrence Matrix), this algorithm adds feature extraction of image gradient information, and combines with SVM (Support Vector Machine) to detect and classify fabric images quickly and accurately. The eigenvalues extracted from GLCM and GGCM are analyzed and compared, and the fabric defects are detected by SVM classifier. Through the training classification experiment based on the fabric image data set collected from the field of a textile enterprise, the results show that the detection effect is significantly improved after adding gradient information, the accuracy rate is 94.8%, and the accuracy rate is 93.9%. The algorithm is fast for detection, after extracting features, each image detection only takes 0.5 ms, which is suitable for industrial production sites.

Key words: fabric defect detection, texture, gray gradient co-occurrence matrix, gray level co-occurrence matrix, characteristic value, adaptive median filtering, histogram equalization, support vector machine

中图分类号: 

  • TP181