目的 提升柔性印刷电路(FPC)软排线缺陷图像的分割与检测精度、效率,解决传统方法在低对比度、强干扰及细微缺陷图像中的分割模糊和检测误差等问题,提出一种高鲁棒性、高效率的包装缺陷处理方法。方法 构建基于并行动态角色记忆灰狼优化算法(PDM-GWO)的图像分割和缺陷检测方法。通过动态角色分配和历史位置记忆提升优化能力,引入主从并行架构,提高计算效率;分割阶段采用PDM-GWO优化多阈值策略提取清晰边缘;在检测阶段,基于边缘检测获取排线坐标,融合RANSAC拟合提取几何特征,结合Z-score统计分析,实现多类缺陷的识别。结果 多组图像实验证明,该方法在PSNR、SSIM、IoU等3项指标上的平均值为22.42 dB、0.964、0.933,均优于标准GWO和典型改进型算法。在缺陷检测方面,平均检测精度达到0.990 6,处理速度为9.63 帧/s,优于YOLOv9、Faster-RCNN等主流方法。结论 所提方法在图像分割质量、检测准确率、运行效率等方面均展现出显著优势,适用于包装自动线复杂工况下的微小缺陷检测,具备良好的工程实用性和推广价值。
Abstract
The work aims to propose a high-robustness and high-efficiency packaging defect processing method to address the challenges of segmentation blur and detection errors in traditional methods when dealing with low-contrast, highly interfered, and subtle defect images of flexible printed circuit (FPC) ribbon cables, and to enhance the accuracy and efficiency of FPC defect image segmentation and detection. An image segmentation and defect detection method was constructed based on a Parallel Dynamic Role Memory Grey Wolf Optimization (PDM-GWO) algorithm. The optimization capabilities were improved through dynamic role assignment and historical position memory, while introducing a master-slave parallel architecture to enhance computational efficiency. In the segmentation phase, a PDM-GWO optimized multi-threshold strategy was adopted to extract clear edges. In the detection stage, the coordinates of the wiring were obtained based on edge detection, the geometric features were extracted by integrating RANSAC fitting, and the Z-score statistical analysis was combined to realize the recognition of multiple types of defects. Extensive image experiments demonstrated that the proposed method achieved average values of 22.42 dB for PSNR, 0.964 for SSIM, and 0.933 for IoU, all surpassing standard GWO and typical improved algorithms. For defect detection, the average mean average precision reached 0.990 6, with a processing speed of 9.63 frames per second, outperforming mainstream methods such as YOLOv9 and Faster-RCNN. The proposed method exhibits significant advantages in image segmentation quality, detection accuracy, and operational efficiency. It is well-suited for micro-defect detection in complex industrial conditions on automated packaging lines, demonstrating excellent engineering practicality and promising generalization value.
关键词
柔性印刷电路 /
包装缺陷检测 /
图像分割 /
灰狼优化算法 /
动态角色 /
历史记忆 /
并行计算
Key words
flexible printed circuit /
packaging defect detection /
image segmentation /
grey wolf optimization algorithm /
dynamic role /
historical memory /
parallel computing
{{custom_sec.title}}
{{custom_sec.title}}
{{custom_sec.content}}
参考文献
[1] 张德海, 祝志逢, 李艳芹, 等. 基于机器视觉的二维图像质量缺陷检测研究进展[J]. 包装工程, 2023, 44(23): 198-207.
ZHANG D H, ZHU Z F, LI Y Q, et al.Research Progress of Two-Dimensional Image Quality Defect Detection Based on Machine Vision[J]. Packaging Engineering, 2023, 44(23): 198-207.
[2] LUO W R, LUO J X, YANG Z Y.FPC Surface Defect Detection Based on Improved Faster R-CNN with Decoupled RPN[C]// 2020 Chinese Automation Congress (CAC). Shanghai: IEEE, 2020: 7035-7039.
[3] XIONG W J, CHEN G Z, LIAO X J, et al.Adaptive Dual Teacher Incremental Learning for Defect Detection of Flexible Printed Circuit[J]. Computers and Electrical Engineering, 2024, 118: 109337.
[4] SHEN X L, XING Y L, LU J H, et al.Detection of Surface Defect on Flexible Printed Circuit via Guided Box Improvement in GA-Faster-RCNN Network[J]. PLoS One, 2023, 18(12): e0295400.
[5] 黄亮. 基于机器视觉的FPC表面缺陷检测系统及应用研究[D]. 柳州: 广西科技大学, 2023: 24-26.
HUANG L.Research on FPC Surface Defect Detection System Based on Machine Vision and Its Application[D]. Liuzhou: Guangxi University of Science and Technology, 2023: 24-26.
[6] LUO J X, CHEN J X.Mask Inpainting-Based Data Generation Architecture for Surface Defect Images with Complex Backgrounds[J]. Signal, Image and Video Processing, 2025, 19(5): 405.
[7] HOU Y X, GAO H B, WANG Z J, et al.Improved Grey Wolf Optimization Algorithm and Application[J]. Sensors, 2022, 22(10): 3810.
[8] YU X B, DUAN Y C, CAI Z J, et al.An Adaptive Learning Grey Wolf Optimizer for Coverage Optimization in WSNS[J]. Expert Systems with Applications, 2024, 238: 121917.
[9] MIRJALILI S, LEWIS A.Adaptive Gbest-Guided Gravitational Search Algorithm[J]. Neural Computing and Applications, 2014, 25(7): 1569-1584.
[10] SADEGHIAN Z, AKBARI E, NEMATZADEH H, et al.A Review of Feature Selection Methods Based on Meta-Heuristic Algorithms[J]. Journal of Experimental & Theoretical Artificial Intelligence, 2025, 37(1): 1-51.
[11] LONG W, JIAO J J, LIANG X M, et al.An Exploration-Enhanced Grey Wolf Optimizer to Solve High-Dimensional Numerical Optimization[J]. Engineering Applications of Artificial Intelligence, 2018, 68: 63-80.
[12] BIMANTARA I M S, YUNIARTI A. Multilevel Thresholding of Color Image Segmentation Using Memory-Based Grey Wolf Optimizer with Otsu Method, Kapur, and M.Masi Entropy[J]. Jurnal Nasional Pendidikan Teknik Informatika, 2023, 12(2): 304-337.
[13] BANAIE-DEZFOULI M, NADIMI-SHAHRAKI M H, BEHESHTI Z. R-GWO: Representative-Based Grey Wolf Optimizer for Solving Engineering Problems[J]. Applied Soft Computing, 2021, 106: 107328.
[14] DHARGUPTA S, GHOSH M, MIRJALILI S, et al.Selective Opposition Based Grey Wolf Optimization[J]. Expert Systems with Applications, 2020, 151: 113389.
[15] HUANG G J, HUANG Y B, LI H Y, et al.An Improved YOLOv9 and Its Applications for Detecting Flexible Circuit Boards Connectors[J]. International Journal of Computational Intelligence Systems, 2024, 17(1): 261.
[16] 陈小强, 陈立锋, 黄泓. 改进的ZS细化算法在FPC缺陷定位的应用[J]. 湖南科技大学学报(自然科学版), 2023, 38(3): 42-48.
CHEN X Q, CHEN L F, HUANG H.Application of Improved ZS Thinning Algorithm to FPC Defect Location[J]. Journal of Hunan University of Science and Technology (Natural Science Edition), 2023, 38(3): 42-48.
基金
国家自然科学基金(62104157); 广东省普通高校青年创新人才项目(2019GKQNCX009)