Abstract:
Aiming at the difficult problem of measuring small size external threads, a method for measuring key parameters of threads based on machine vision was proposed to obtain accurate information about the edge of the external thread profile, which solved the problem that the scanning probe tip was too large to measure small size threads. Firstly, a median filter was used for preprocessing to remove salt and pepper noise and pulse interference contained in the image, and Otsu was used to select the optimal threshold value to binarize the image. An improved Gaussian filter and adaptive threshold canny operator were used to extract the contour edge of the thread. At the same time, a minimum rectangle fitting algorithm for the measurement area was designed to correct the inclination angle of the screw image. Finally, the least square linear fitting method was used to calculate the dimension parameters of the thread. The experimental results showed that the measuring accuracy of the screw pitch and the middle diameter of the thread reached 0.001 4 mm and 0.002 7 mm, which realized the high precision measurement of the key parameters of the thread.