纺织学报 ›› 2024, Vol. 45 ›› Issue (09): 212-219.doi: 10.13475/j.fzxb.20230603701

• 机械与设备 • 上一篇    下一篇

基于改进凸包缺陷算法的扎带定位方法

周其洪1(), 陈唱1, 任佳伟1, 洪巍2, 岑均豪2   

  1. 1.东华大学 机械工程学院, 上海 201620
    2.广州盛原成自动化科技有限公司, 广东 广州 511400
  • 收稿日期:2023-06-19 修回日期:2023-11-27 出版日期:2024-09-15 发布日期:2024-09-15
  • 作者简介:周其洪(1976—),男,教授,博士。主要研究方向为高端纺织装备机电一体化和智能化,机器人与机器视觉。E-mail: zhouqihong@dhu.edu.cn
  • 基金资助:
    中央高校基本科研业务费专项资金资助项目(22D110321);国家重点研发计划项目(2017YFB13040)

Tie-positioning method based on improved convex hull defect algorithm

ZHOU Qihong1(), CHEN Chang1, REN Jiawei1, HONG Wei2, CEN Junhao2   

  1. 1. College of Mechanical Engineering, Donghua University, Shanghai 201620, China
    2. Guangzhou Seyouth Automation Technology Co., Ltd., Guangzhou, Guangdong 511400, China
  • Received:2023-06-19 Revised:2023-11-27 Published:2024-09-15 Online:2024-09-15

摘要:

针对传统视觉在检测捆扎带时存在难检、漏检、定位扎带位置困难和速度慢等问题,提出一种基于改进凸包缺陷算法的扎带定位方法。采用自适应直方图均衡化图像增强算法,以增强编织袋区域与背景的对比度;利用快速凸包算法获得编织袋轮廓的凸包,减少获取凸包的时间;最后,通过改进凸包缺陷算法对编织袋轮廓凸包进行缺陷检测,根据检测结果中凸包缺陷点的位置和缺陷深度进行筛选得到扎带定位点。同时为验证该算法的准确性与鲁棒性,在具有复杂背景干扰的环境下进行实验,将传统凸包缺陷算法与改进后的凸包缺陷算法进行对比分析。实验结果表明:相比于传统凸包缺陷算法无法检测出编织袋轮廓的全部缺陷从而存在漏检,改进后的凸包缺陷算法漏检率为0,定位误差小于4 mm,可有效定位扎带位置并具有较高的鲁棒性。

关键词: 扎带定位, 凸包算法, 缺陷检测, 图像增强, 直方图均衡化, 筒子纱包装

Abstract:

Objective Aiming at difficult detection, missed detection, difficulty in locating the position of ties and slow speed in conventional algorithms when detecting ties due to the color similarity between ties and woven bags, as well as the small area occupied by ties, the conventional vision is difficult to detect the position of ties, and deep learning algorithms are difficult to create datasets. Therefore, a strap positioning method based on improved convex hull defect algorithm is proposed.

Method An adaptive histogram equalization image enhancement algorithm was adopted to increase the contrast between the woven bag contour area and the background, and to improve the extraction accuracy of the woven bag contour. A fast convex hull algorithm was then adopted to obtain the convex hull of the woven bag contour, aiming at reducing the time required to obtain the convex hull of the woven bag contour. Consequently, an improved convex hull defect algorithm was established and used for defect detection of woven bags. Based on the location and depth of the convex hull defect points in the detection results, defect points were screened to obtain the final required defect point, which is the tie positioning point.

Results In order to verify the accuracy and robustness of the algorithm, experiments were conducted in an environment with complex background interference, based on the fact that the number of ties commonly used for bundling woven bags is 2 or 3 in practice. In order to fit the actual situation, three types of woven bag images were captured using a ZED camera with a number of 2-4 ties. Due to the small pixel difference between the woven bag and the surrounding environment, direct image pre-processing may result in low accuracy of the subsequently extracted woven bag contour. In order to retain more details of the woven bag contour, the image was first processed using adaptive histogram equalization, and then the woven bag contour was obtained by image pre-processing, morphological processing, contour rendering and filtering. Afterwards, a fast convex hull algorithm was adopted to solve the convex hull of the woven bag contour, reducing the time required to solve the convex hull of the woven bag contour. Three algorithms were adopted to solve the convex hull of woven bags. The Andrew algorithm took 0.07 s, the Graham algorithm took 0.04 s, and the fast convex hull algorithm took 0.02 s, which is 0.05 s faster than the Andrew algorithm and 0.02 s faster than the Graham algorithm, verifying the feasibility of the fast convex hull algorithm. Next, the conventional convex hull defect algorithm and the improved convex hull defect algorithm were adopted, respectively to detect the convex hull of the woven bag contour. The conventional convex hull defect algorithm only detects the deepest defect point between the defect starting point and the defect ending point. In the case of multiple defects between the defect starting point and the defect ending point, some defects may not be detected leading to the increased number of missed detection. Where the positioning points of the ties cannot be fully detected with conventional methods, the improved algorithm demonstrated that all defects cpuld be detected with a missed detection rate of 0. The positioning error was less than 4 mm, and could accurately locate the positions of all ties. The feasibility and robustness of the algorithm were verified.

Conclusion The experimental results show that the improved convex hull defect algorithm can solve the problem of missed detection in conventional convex hull defect methods, detect all defects in woven bags, accurately locate the position of ties, and the algorithm can be applied to the positioning of various colored ties, indicating the effectiveness and applicability of the algorithm.

Key words: tie positioning, convex hull, defect detection, image enhancement, histogram equalization, cylinder yarn packaging

中图分类号: 

  • TS103.9

图1

改进凸包算法的扎带定位流程"

图2

编织袋图像"

图3

不同图像增强算法处理编织袋结果图"

图4

凸包算法"

图5

扎带数目为2~4的编织袋图像"

图6

扎带数目为2~4的编织袋轮廓凸包图像"

图7

不同凸包缺陷算法检测结果"

图8

扎带定位中点图"

图9

不同情况扎带捆绑图"

图10

不同凸包缺陷算法检测结果"

图11

扎带定位图"

表1

扎带定位结果统计表"

扎带数目/条 水平捆绑 倾斜捆绑
检测数量 耗时/ms 成功率/% 定位误差/mm 检测数量 耗时/ms 成功率/% 定位误差/mm
2 4 114 100 2 4 114 100 4
3 6 146 100 2 6 146 100 4
4 8 165 100 2 8 165 100 4
[1] 彭来湖, 祝孝裕, 张少明, 等. 筒子纱包装自动配重方法研究[J]. 纺织学报, 2020, 41(6): 147-152.
PENG Laihu, ZHU Xiaoyu, ZHANG Shaoming, et al. Research on automatic counterweight scheme for cheese yarn packaging[J]. Journal of Textile Research, 2020, 41(6): 147-152.
[2] 周鹏飞, 吕汉明, 谢楠, 等. 筒子纱编织袋包装与码垛控制系统的开发[J]. 棉纺织技术, 2018, 46(5): 27-32.
ZHOU Pengfei, LV Hanming, XIE Nan, et al. Development of package and palletizing control system for package and palletizing of package yarn[J]. Cotton Textile Technology, 2018, 46(5): 27-32.
[3] 钟飞, 赵子丹, 夏军勇, 等. 基于机器视觉的编织袋表面缺陷检测系统设计与实现[J]. 包装工程, 2022, 43(13): 247-256.
ZHONG Fei, ZHAO Zidan, XIA Junyong, et al. Design and implementation of surface defect detection system for woven bag based on machine vision[J]. Packaging Engineering, 2022, 43(13): 247-256.
[4] 牟新刚, 蔡逸超, 周晓, 等. 基于机器视觉的筒子纱缺陷在线检测系统[J]. 纺织学报, 2018, 39(1): 139-145.
MOU Xingang, CAI Yichao, ZHOU Xiao, et al. On-line yarn cone defects detection system based on machine vision[J]. Journal of Textile Research, 2018, 39(1):139-145.
[5] 路浩, 陈原. 基于机器视觉的碳纤维预浸料表面缺陷检测方法[J]. 纺织学报, 2020, 41(4): 51-57.
LU Hao, CHEN Yuan. Surface defect detection method of carbon fiber prepreg based on machine vision[J]. Journal of Textile Research, 2020, 41(4): 51-57.
[6] TAN J, LI L, WANG Y, et al. The quality detection of surface defect in dispensing dack-end based on HALCON[C]// 2016 International Conference on Cybernetics, Robotics and Control (CRC). Hongkong: IEEE, 2016: 95-98.
[7] 黄露, 夏军勇, 吴庆华, 等. 基于遗传算法与二维最大熵的编织袋缺陷检测[J]. 轻工机械, 2021, 39(5): 69-73,78.
HUANG Lu, XIA Junyong, WU Qinghua, et al. Woven bag defect detection based on genetic algorithm and two-dimensional maximum entropy[J]. Light Industry Machinery, 2021, 39(5): 69-73,78.
[8] YAO M H, LI J, WANG X B. Solar cells surface defects detection using RPCA method[J]. Chinese Journal of Computers, 2013, 36(9): 1943-1952.
[9] 董亚涵, 李永强, 李鹏鹏, 等. 基于改进凸包算法的树冠轮廓点提取与体积计算[J]. 测绘工程, 2018, 27(8): 66-71.
DONG Yahan, LI Yongqiang, LI Pengpeng, et al. Tree crown outline points extracting and volume calculation based on improved convex hull algorithm[J]. Engineering of Surveying and Mapping, 2018, 27(8): 66-71.
[10] LI B, YAN H, WANG Z, et al. Algorithm of convex hull generation for point sets based on sorted coordi-nates[J]. Science of Surveying and Mapping, 2017, 42(2): 14-17.
[11] 高晨, 张亚军. 基于凸包算法的指尖识别方法[J]. 北京化工大学学报(自然科学版), 2017, 44(2): 70-75.
doi: 10.13543/j.bhxbzr.2017.02.011
GAO Chen, ZHANG Yajun. Fingertip recognition based on a convex hull algorithm[J]. Journal of Beijing University of Chemical Technology(Natural Science Edition), 2017, 44(02): 70-75.
[12] 毛伟生, 李林升, 周文一, 等. 基于小波阈值与区域分裂合并的锂电池极片缺陷检测方法[J]. 国外电子测量技术, 2022, 41(8): 46-53.
MAO Weisheng, LI Linsheng, ZHOU Wenyi, et al. Defect detection method of lithium battery pole piece based on wavelet threshold and region splitting merging[J]. Foreign Electronic Measurement Technology, 2022, 41(8): 46-53.
[1] 陈育帆, 郑小虎, 徐修亮, 刘冰. 基于机器视觉的缝纫线迹缺陷检测方法[J]. 纺织学报, 2024, 45(07): 173-180.
[2] 杨金鹏, 景军锋, 李吉国, 王渊博. 基于机器视觉的玻璃纤维合股纱缺陷检测系统设计[J]. 纺织学报, 2024, 45(05): 193-201.
[3] 郑兆伦, 鲁玉军. 基于奇异值分解的双算法织物缺陷检测[J]. 纺织学报, 2022, 43(11): 59-67.
[4] 路浩, 陈原. 基于机器视觉的碳纤维预浸料表面缺陷检测方法[J]. 纺织学报, 2020, 41(04): 51-57.
[5] 景军锋, 张君扬, 张缓缓, 苏泽斌. 梯度空间下的丝饼表面缺陷检测[J]. 纺织学报, 2020, 41(02): 44-51.
[6] 肖志涛, 郭永敏, 耿磊, 吴骏, 张芳, 王雯, 刘彦北. 基于超声相控阵的机织层合复合薄板试件内部缺陷检测方法[J]. 纺织学报, 2019, 40(11): 81-87.
[7] 朱浩, 丁辉, 尚媛园, 邵珠宏. 多纹理分级融合的织物缺陷检测算法[J]. 纺织学报, 2019, 40(06): 117-124.
[8] 蔡逸超, 周晓, 宋明峰, 牟新刚. 应用多尺度多方向模板卷积的筒子纱缺陷检测[J]. 纺织学报, 2019, 40(04): 152-157.
[9] 景军锋 范晓婷 李鹏飞 洪良. 应用深度卷积神经网络的色织物缺陷检测[J]. 纺织学报, 2017, 38(02): 68-74.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!