| With the increasing demand for product inspection efficiency and quality in The Chinese market,manual inspection has been unable to meet the requirements,and machine vision inspection has become an important part of industrial inspection.Bearing,as the main metal part,is widely used in automobile parts.Bearing roller as an important part of bearing,the quality of roller directly affects the service life and performance of bearing,so the detection of bearing roller surface defects and size has become an important link.At present,bearing rollers on the market are visually measured by manual labor,which has problems of low efficiency and strong empirical dependence.However,the detection method based on vision can effectively replace manual detection by using the way of machine replacement,with high detection efficiency and strong adaptability.This topic is based on the method of machine vision,for bearing roller surface defects and size detection.The specific research contents are as follows:(1)According to the detection content and objectives,the overall scheme design of bearing roller surface defect detection and size measurement is carried out,and the platform construction of the detection system is completed.(2)According to the design scheme,the selection of camera,light source,lens and other hardware,followed by the design of lighting mode,completed the image collection of parts.(3)In the aspect of defect detection,HALCON was used to complete the defect detection of the bearing roller size end face,and the deep learning model based on VGG16 network was used to identify the defect,and the accuracy of defect identification was 95.64%.(4)In order to achieve accurate measurement of size,this paper first uses industrial software HALCON programming to achieve,and uses QT to complete the man-machine interaction interface of size measurement,can quickly display whether the measured size is qualified,and statistics the time used.Aiming at the disadvantage of the traditional Canny algorithm of low measurement accuracy and easy to be disturbed,an improved Canny algorithm is used for coarse positioning of the image edge,and then the third order gray moment is used to extract the sub-pixel edge points,and the least square fitting method is used to fit the edge points,to complete the measurement of the diameter and roundness of the roller end face.The sub-pixel edges obtained by interpolation method and Zernike moment method with adaptive threshold were compared.Aiming at the inaccuracy of end face roundness evaluation,an improved MZC roundness measurement method was used to effectively measure the cylindricity error of roller roundness,and the measurement results were compared with the parts sizes obtained by spiral micrometer and 3D contour scanner.Experiments show that the diameter measurement error of the improved algorithm is controlled below 10 um and the roundness cylindricity error is controlled below 15 um,which has good practicability and meets the actual measurement requirements.The experimental results show that the traditional algorithm and deep learning are used to complete the defect identification,and the proposed dimensional measurement algorithm can effectively realize the precise measurement,which has a good engineering practical value. |