Abstract:In view of the problem of edge segmentation caused by workpiece adhesion and noise interference when the point cloud data obtained by the traditional 3D industrial camera is used for workpiece detection, considering the factors that the large amount of point cloud data affects the real-time detection and the inaccurate selection of 3D feature points leads to large measurement error, a preprocessing method based on 2D edge detection is proposed to realize the rapid segmentation and measurement of point cloud. In the first place, the improved Canny algorithm is applied to detect the edge of the texture image of the ordered point cloud, and the detected image is separated by mathematical morphology operation and contours detection, which avoids the segmentation process in 3D space and effectively reduces the number of point clouds. In the second place, combined with the shape characteristics and placement mode of the workpiece, the ordered point cloud data was extracted by mask operation, and the adaptive threshold filtering was performed on the segmented point cloud based on the RANSAC and conditional filtering method to effectively remove the noise point cloud. Finally, the workpiece size and normal vector are calculated based on the bounding box of PCA for the preprocessed target point cloud. We could know from results that compared with the traditional 3D algorithm, it can extract the target point cloud more accurately, efficaciously decrease the amount of point cloud data, and improve the segmentation efficiency by about 20%. The average relative error of workpiece size is 1. 24%, which can meet the needs of measurement.