Abstract:Aiming at problems of existing measuring edges image detection models such as complex and difficult to solve, low detecting accuracy and slow speed, an edge detection algorithm was proposed based on the ruled surface model. In the algorithm, the sigmoid surface model was used instead of the traditional Gaussian integral surface model to represent the edges of the measured image. Combining the characteristics of the solution model, the gray value of the image was normalized in advance, and a logarithmic gray difference matrix was constructed. The light intensity compensation value was added to the transformed matrix elements to calibrate the errors caused by insufficient saturation or interference in the image. A visual measurement system and capture clear measurement images were built by using backlight illumination. The pixel equivalent Ar=19.4721μm/pixel and the light intensity compensation coefficient ΔLs=0.13 were determined by using dot matrix calibration plate and measuring block as objects. The experimental results of measuring block edge positioning error showed that compared with the Gaussian surface fitting algorithm, the edge detection algorithm based on the ruled surface model located sub-pixel edges smoother, with an edge straightness error of 0.6μm. Under the same software and hardware conditions, the computational efficiency was increased by 3.3 times, the measurement accuracy was improved from 3.3μm to 1μm. The algorithm proposed was applied to internal gear measurement of tooth profile total deviation. The gear images were collected, sub-pixel edge points of the outer arc and inner gear profile of the gear ring were located, the center of the inner gear from the outer arc edge points was determined, the initial phase angle of the tooth profile edge points was calculated, and the model based on the total deviation of the tooth profile was calculated. The calculation results of the total deviation of the tooth profile indicated that the error values were all lower than the maximum allowable value of the national standard. This visual edge localization algorithm had the potential to be applied to highprecision mechanical part measurement.