| In traditional industrial production environments,teaching robots need to move and execute tasks through pre-set paths,and usually require the use of physical templates and manual measurements to accurately identify targets.While this method can complete most assembly tasks,it has certain limitations and shortcomings.With the rapid development of digital and intelligent technologies,vision-based flexible assembly technology is gradually becoming mainstream due to its good adaptability,high flexibility,and safety and reliability advantages.As the core of flexible assembly technology,the vision guidance system needs to use computer vision technology to achieve target size recognition and pose detection.Therefore,research on target recognition and positioning technology based on vision sensors has important practical value.This article focuses on using a visual guidance system to obtain information about the size and position of target objects,and conducts in-depth research on the design of the system’s hardware and software platforms,as well as the processing methods for target 3D point clouds.Based on an analysis of the principles and specific parameters of commonly used visual sensors,a hardware platform using the Kinect v2 depth camera as the visual sensor is implemented.The software functional modules for camera calibration,image acquisition,target extraction,size recognition,and pose calculation are designed.Based on the point cloud obtained by the visual sensor,point cloud filtering is used to remove the environmental part of the point cloud.The Random Sample Consensus(RANSAC)segmentation algorithm and the Euclidean clustering segmentation algorithm are used to extract the point cloud of the target object.By constructing the projection section of the point cloud of the target object and calculating its size,the size of the target object is recognized,and the recognition accuracy can reach the millimeter level.Finally,based on the extracted target object point cloud and selected template point cloud,the point pair matching is performed using the Fast Point Feature Histogram(FPFH),the initial pose of the target object is calculated using the Sample Consensus Initial Alignment(SAC-IA)algorithm,and the Iterative Closest Point(ICP)fine alignment algorithm is used to optimize the object pose.In order to avoid getting trapped in local extreme values during the optimization process,Trimmed ICP fine alignment algorithm is used to optimize the object pose on the basis of coarse alignment.The two alignment results are compared and analyzed.Finally,the pose of the target object is calculated using the pose description method.The results show that the convergence speed and alignment accuracy of the SAC-IA and Trimmed ICP fine alignment are significantly improved,and the system can recognize and detect the size and pose of different targets in any pose,meeting the requirements of the visual guidance system in practical applications. |