Research on PCB Defect Detection Using 2D and 3D Segmentation
摘要
The detection of defects in PCB components has always been a popular field, with the main challenge being the presence of defects that cannot be recognized by 2D machine vision. This paper investigates PCB component defect detection using a combination of 2D and 3D techniques. We propose some image enhancement and contour extraction methods, and employ Contrast Limited Adaptive Histogram Equalization (CLAHE) to correct the color differences caused by inter-board illumination. By incorporating morphological adaptive anisotropic diffusion filtering, we have improved the performance of PCB board and component contour extraction. And we find that contour extraction based on polygon approximation outperforms diagonal circular regression. In the 2D defect detection method, masked template matching has been used to reduce the calculation of similarity involving non-component pixels, thereby improving recognition accuracy. To address defects that cannot be identified by 2D techniques, we have generated the original point cloud by fusing RGB-D data of PCB components. By utilizing RANSAC and DBSCAN algorithms, the point cloud is segmented into reference planes of component, upper planes of component and point clouds of pins. Based on the geometric description operators for calculating depth of point clouds, features have be made such as difference of depth between reference and upper planes and cross-sectional area to identify defects. Experimental results demonstrate that the combination of 2D and 3D machine vision techniques can accurately address various types of PCB component defects.