Abstract:In order to improve the efficiency and accuracy of bolt positioning and grasping in industrial production, a bolt pose and size detection method based on region of interest was proposed. Firstly, YOLOv5 target recognition algorithm is used to identify the bolt target, and the identified target area is intercepted as the region of interest. Then the ROI region is preprocessed by median filtering and binarization, and the Canny improved algorithm is used to detect the target contour. Then the bolt tilt Angle is calculated based on the best fitting line algorithm, and the bolt center of gravity is calculated by the moment feature algorithm. Finally, the shortest distance algorithm of Hough two straight line segments was used to detect the bolt diameter. After experimental verification, the recognition accuracy of YOLOv5 target recognition algorithm reaches 92.7%, the inspection error of bolt tilt Angle is ±1.2°, and the detection error rate of bolt diameter is ±5.5%, which realizes the identification of bolt pose and size.