| Cylinder liner is a key part of the engine.The appearance quality defects in casting and machining molding will directly affect the performance and service life of the engine.At present,the appearance quality detection of cylinder liner mainly relies on manual visual judgment,which is easily affected by subjective factors of testers.This paper studies the application of machine vision for cylinder liner surface defect detection to achieve automatic detection.There are various morphologies of cylinder liner surface defects.Some types of defects need to be quantitatively measured and identified,and some types need to be detected if they exist or not.The traditional image processing methods are difficult to identify various types of defects at the same time,so they cannot adopt the correct quantitative measurement algorithm.Therefore,this paper uses the excellent feature extraction ability of convolutional neural network to extract the feature of defect images,and realizes defect detection to obtain the category information and position information of defects,and then uses the corresponding image processing algorithm to realize quantitative analysis according to the category.The main research work and results of this paper are as follows :(1)The cylinder liner surface defects and image morphology were statistically analyzed,and the cylinder liner surface image acquisition system was constructed,and the camera was calibrated.The data set required for the defect detection model is constructed under this system,and the collected images are preprocessed to improve the quality of the images.(2)Through theoretical analysis of the target detection model based on convolutional neural network,the basic detection model-YOLOv4 is determined,and its structure and detection principle are analyzed in depth.According to the requirement characteristics of cylinder liner surface defect image processing,the YOLOv4 model was improved in three aspects,including attention mechanism,feature fusion mode and backbone network,and the improved model was built.Through four groups of comparative experiments,the effects of attention module improvement,feature fusion module improvement and backbone network improvement on the detection accuracy and detection speed of the detection model are studied.The experimental results show that the improvement effect on the detection model is good.(3)On the basis of the defect classification realized by the improved detection model,the sizes of several types of defects were quantitatively measured and analyzed.The defect region is extracted by using the defect information obtained by the detection model,and the corresponding image processing algorithm is used to extract the contour of the defect and calculate its size.The defect size calculation in the real world is realized on the basis of camera calibration.(4)The intelligent inspection system of cylinder liner appearance quality is designed,and the corresponding hardware system and software system are built.In this system,the two functions of cylinder liner appearance defect detection and defect quantitative analysis are realized,and the results are visualized and saved.The main innovation of this study is to improve the YOLOv4 detection model to realize the classification and positioning of cylinder liner surface defects,and then according to the characteristics of various defects for image quantitative processing,realize the automatic detection of cylinder liner surface defects and improve the accuracy and accuracy of detection.The research results are expected to be applied in practice to solve the existing technical problems of cylinder liner appearance quality automatic detection. |