Abstract:Aiming at the problems of low efficiency and high error detection rate in the traditional manual sampling measurement of automobile pipe flange, a measurement system of automobile pipe flange size based on machine vision was developed to improve the detection efficiency and measurement accuracy. Use software HALCON of camera calibration, image using median filter to test to deal with the noise, then method of gray-scale image enhancement, complete the image preprocessing, image using Canny operator after the subpixel edge detection, using the least squares fitting to the extraction of subpixel edge information get continuous aperture outline, the flange end face size was obtained, and the measurement results were displayed through HALCON and C# joint programming. Finally, the measurement results were compared with those of image measuring instrument. The experimental results show that the measurement accuracy of the system can reach 0.08 mm, which meets the requirements of measurement accuracy. Flange detection time is 1.2 s, compared with the traditional manual detection, detection efficiency is increased by 70%, can be applied to the actual production site.