Abstract:Aiming at the problems of low efficiency and difficult to guarantee the accuracy of traditional stamping parts manual dimension measurement, a sub-pixel precision dimension measurement method for rotor punching based on machine vision is proposed. This method adopts the image preprocessing method of first graying the collected image and then applying the median filter to reduce the noise interference. The adaptive threshold edge detection is realized through the combination of Canny operator and Otsu method, and then the improved Zernike moment method is used for sub-pixel positioning to obtain sub-pixel coordinates. Then design the contour segmentation algorithm, which mainly extracts the sub-pixel contour of the inner and outer circles. At the same time, set the region of interest and segment the outline of the skeleton line segment based on the K-Means clustering algorithm. Finally, use the least squares fitting method to solve the diameter of the inner and outer circles of the rotor punch and the skeleton Spacing size. The experimental results show that the measurement accuracy of this method can reach 0.01mm, the measurement accuracy is high, the speed is fast, and it has high practical value.