论文中文题名: | 基于图像处理的PCB板缺陷检测方法研究 |
姓名: | |
学号: | 20207223077 |
保密级别: | 公开 |
论文语种: | chi |
学科代码: | 085400 |
学科名称: | 工学 - 电子信息 |
学生类型: | 硕士 |
学位级别: | 工学硕士 |
学位年度: | 2023 |
培养单位: | 西安科技大学 |
院系: | |
专业: | |
研究方向: | 数字图像处理 |
第一导师姓名: | |
第一导师单位: | |
论文提交日期: | 2023-06-16 |
论文答辩日期: | 2023-06-06 |
论文外文题名: | Research on PCB defect detection method based on image processing |
论文中文关键词: | |
论文外文关键词: | PCB defect detection ; Image processing ; Feature extraction ; Target detection ; YOLOv5 |
论文中文摘要: |
印刷电路板(Printed circuit board,PCB)作为电子产品中重要的零部件之一,正在向高密度、细间距、超薄化方向发展,这给传统的PCB缺陷检测算法带来了巨大的挑战。传统的人工检测方法依赖于人的主观意识,存在着检测效率低、漏检率高等问题,无法满足技术和生产的需求,如何快速高效地完成对PCB的缺陷检测是当下电子工业领域需要解决的问题。同时随着中小型企业对PCB缺陷检测需求的不断增长,实现低成本、高精度的检测方案成为首要任务。因此,研究如何利用图像处理技术提高PCB缺陷检测的精度,具有非常重要的研究意义。本文针对可以快速准确地提取到PCB图像特征并且精准检测出缺陷,分别在预处理和图像识别阶段展开研究。 考虑传统中值滤波算法在PCB图像信噪比较低时滤波效果不佳的问题,提出了一种改进的PCB图像中值滤波算法。该算法以中值滤波算法为基础,通过计算邻域内像素的均值和方差进行甄别噪声强度与信号大小,并采用大尺寸邻域和小尺寸邻域相结合的方式来改进现有中值滤波算法。仿真结果表明,该算法的均方误差(MSE)、峰值信噪比(PSNR)和结构相似性(SSIM)值均优于现有算法。 针对PCB图像中存在的缺陷,提出了一种多方向Sobel边缘检测算法,该算法以标准Sobel边缘检测算法为准则建立多方向边缘模板,从而实现对PCB覆铜线路轮廓的检测。同时采用形态学处理优化轮廓信息,通过创建出的标准模板与待测图像进行差分处理,得到更准确的缺陷位置信息,根据缺陷位置信息将原始图像分割成深度学习网络所需像素大小。仿真结果表明,该算法对轮廓的检测效果优于现有算法。 另外在PCB缺陷检测阶段应用了YOLOv5网络模型,并构建了基于改进的YOLOv5PCB缺陷检测学习网络。针对YOLOv5算法对PCB缺陷检测存在精度低的问题,一方面通过利用通道注意力机制(SENet)提高网络对图像特征的提取能力;另一方面构建双向特征金字塔(BiFPN)增强深层和浅层特征信息的融合,使得整个网络的检测精度得以提高;同时采用性能更高的EIoU作为回归框损失函数,可以加快网络的收敛速度。仿真结果表明,该算法在保证检测速率的前提下较YOLOv5的mAP、准确率和召回率分别提升了2.06%、1.55%和1.59%,具有更好的PCB缺陷检测性能。 |
论文外文摘要: |
As one of the important components in electronic products, printed circuit boards (Printed circuit board,PCB) are developing towards high density, fine pitch, and ultra-thinization. Therefore, traditional PCB defect detection algorithms are facing enormous challenges. Traditional manual inspection methods rely on subjective human consciousness, resulting in low detection efficiency and high missed detection rates, which cannot meet the needs of technology and production. How to quickly and efficiently complete PCB defect detection is a problem that needs to be solved in the current field of the electronics industry. At the same time, with the continuous growth of the demand for PCB defect detection by small and medium-sized enterprises, achieving low-cost and high-precision detection solutions has become a top priority. Therefore, it is of great research significance to study how to use image processing technology to improve the accuracy of PCB defect detection. This article focuses on the research of fast and accurate extraction of PCB image features and precise defect detection, and conducts research in the preprocessing and image recognition stages. Considering the problem that the traditional median filtering algorithm has poor filtering effect when the signal-to-noise ratio of the PCB image is low, an improved PCB image median filtering algorithm is proposed. Based on the median filtering algorithm, this algorithm detects noise intensity and signal size by calculating the mean and variance of pixels in the neighborhood, and improves the existing median filtering algorithm by combining large and small neighborhood sizes. The simulation results show that the mean square error (MSE), peak signal-to-noise ratio (PSNR), and structural similarity (SSIM) values of this algorithm are superior to existing algorithms. A multi-directional Sobel detection algorithm is proposed to address the defects in PCB images. The algorithm establishes a multi-directional edge template based on the standard Sobel edge detection algorithm, enabling the detection of the copper circuit board outline of the PCB. Morphological processing is used to optimize the contour information. By performing differential processing on the created standard template and the test image, more accurate defect position information is obtained. Based on the defect position information, the original image is segmented into pixel sizes required by the deep learning network. Simulation results show that the algorithm has better detection performance for contours than existing algorithms. In addition, the YOLOv5 network model was applied in the PCB defect detection stage, and an improved YOLOv5-based PCB defect detection learning network was constructed. To address the issue of low accuracy in PCB defect detection using the YOLOv5 algorithm, on one hand, the channel attention mechanism (SENet) was utilized to improve the network's ability to extract image features; on the other hand, a bidirectional feature pyramid network (BiFPN) was constructed to enhance the fusion of deep and shallow feature information, thereby improving the detection accuracy of the entire network. Additionally, a higher performance EIoU was used as the regression box loss function, which can accelerate the network's convergence speed. Simulation results show that the algorithm improves the mAP, precision, and recall of YOLOv5 by 2.06%, 1.55%, and 1.59%, respectively, while maintaining detection speed, and has better PCB defect detection performance. |
参考文献: |
[6] 吴一全, 赵朗月, 苑玉彬, 等. 基于机器视觉的PCB缺陷检测算法研究现状及展望[J]. 仪器仪表学报, 2022, 43(8): 8-16. [7] 王淑青, 鲁濠, 鲁东林, 等. 基于轻量化人工神经网络的PCB板缺陷检测[J]. 仪表技术与传感器, 2022, 472(5): 98-104. [19] 任永强, 吕华鑫, 晏文彬, 等. 一种基于PCB板图像配准优化算法[J]. 合肥工业大学学报(自然科学版), 2022, 45(10): 1305-1309. [23] 贾正伟, 黄海松, 张松松. 基于彩色图像模板匹配的PCB多缺陷集中检测[J]. 组合机床与自动化加工技术, 2021, 571(9): 125-129. [24] 丁小艳, 王婷. 基于交叉检验ORB和MCC的图像模板匹配算法[J]. 电子测量与仪器学报, 2019, 33(5): 39-45. [26] 钱万明, 朱红萍, 朱泓知, 等. 基于自适应加权特征融合的PCB裸板缺陷检测研究[J]. 电子测量与仪器学报, 2022, 36(10): 92-96. [32] 颛瑞壮志. 基于图像处理的PCB裸板表明缺陷检测系统[D]. 成都: 电子科技大学, 2022. [35] 张鹏宇, 申亮, 黄晓涛, 等. 基于对称结构特征的探地雷达图像模板匹配算法[J]. 地球物理学进展, 2022, 37(6): 2657-2661. [37] 曾晟, 梁乃兴, 杨遂中, 等. HSI空间在低照度沥青混合料图像处理中的应用[J]. 重庆交通大学学报(自然科学版), 2020, 39(11): 86-91. [39] 王潇, 于炯, 杨嘉能, 等. 优化动态直方图均衡的水下图像增强方法[J]. 计算机仿真, 2022, 39(10): 259-264. [41] Raihan D, Chakravorty S. Particle Gaussian mixture filters-I[J]. Automatica, 2018, 98: 334-340. [42] 焦瑾瑾. 基于Roberts边缘检测的数字媒体激光重现方法[J]. 激光杂志, 2022, 43(5): 197-200. [43] 姚智超, 楚晓亮, 范筠益, 等. 基于Prewitt算子的X波段雷达有效波高反演研究[J]. 系统工程与电子技术, 2022, 44(4): 1182-1187. [44] 侯劲尧, 高爱华, 刘卫国, 等. 基于形态学运算和图像融合的疵病图像分割算法[J]. 探测与控制学报, 2021, 43(5): 55-59. [45] 童胜杰, 江明, 焦传佳. 一种改进工件边缘检测方法的研究[J]. 电子测量与仪器学报, 2021, 35(1): 128-134. [48] 冉光再, 徐雷, 李大双, 等. 基于图像差分和残差学习的PCB图像去噪算法[J]. 激光与光电子学进展, 2022, 59(12): 123-130. [51] 李健伟, 曲长文, 彭书娟. 基于级联CNN的SAR图像舰船目标检测算法[J]. 控制与决策, 2019, 34(10): 2192-2195. [52] 陈庆超, 韩松, 毛钧毅. 采用多层次特征融合SPP-net的暂态稳定多任务预测[J]. 控制与决策, 2022, 37(5): 1279-1282.f [53] 李东洁, 李若昊. 基于改进Faster RCNN的马克杯缺陷检测方法[J]. 激光与光电子学进展, 2020, 57(4): 2-4. [54] 宋爽, 张悦, 张琳娜, 等. 基于深度学习的轻量化目标检测算法[J]. 系统工程与电子技术, 2022, 44(9): 2717-2720. [55] 李袁. 基于改进YOLOv4的目标检测方法[D]. 重庆: 重庆邮电大学, 2021. [56] 方斌, 周辉奎, 陈家益, 等. 去除脉冲噪声的快速开关中值图像滤波[J]. 控制工程, 2021, 28(6): 1243-1246. [59] 刘逢丁, 曹杰, 王营博, 等. 激光雷达距离像的实时边缘检测[J]. 光学技术, 2021, 47(4): 404-409. [60] 董立红, 彭业勋, 符立梅. 基于Sobel边缘检测的圆周Harris角点检测算法[J]. 西安科技大学学报, 2019: 39(2): 375-177. [61] 刘源, 夏春蕾. 一种基于Sobel算子的带钢表明缺陷图像边缘检测算法[J]. 电子测量技术, 2021, 44(3): 139-141. [63] 吕禾丰, 陆华才. 基于YOLOv5算法的交通标志识别技术研究[J]. 电子测量与仪器学报, 2021, 35(10): 138-140. |
中图分类号: | TP391.4 |
开放日期: | 2023-06-16 |