Abstract:In order to solve the problem of dynamic detection of both sides of round holes on rails, a dynamic measurement method of round holes based on machine vision was proposed. Firstly, the image of the round hole is dynamically collected by an industrial camera and preprocessed. The radius of the outer circle and the inner circle of the image corresponds to the dimensions of both sides of the round hole. Secondly, the center and radius of outer circle are obtained by edge detection and gradient method, and the influence of irrelevant edges is reduced by mnemonic search during edge detection. Then, the contour points of the inner circle were obtained by searching the outer circle region in the polar coordinate system, and the inner circle size was finally obtained by iterative fitting, and the dynamic measurement of the dimensions of the two sides of the hole was realized. The experimental results show that this method has high precision, and the measurement errors of both sides of the circular hole are less than 1 pixel when the illumination is 2000 lx.