| Surface defect detection is the key point to ensure the quality and beauty of production and the bottleneck to realize the total automation of production line.In recent years,the research on automatic detection of surface defects of diffuse reflection has attracted more and more enterprises,including automobile production companies.At present,manufacturers generally adopt manual detectors in the detection processing,that is,using the human to detect the painting surface of production surface under different light intensity and different angles.This method has the troubles of great labor intensity,poor working environment,low detection efficiency and high detection cost.The purpose of this study is to avoid the above problems by optimizing the detection method to realize automatic detection of surface defects of diffuse reflection.This paper presents a method of automatic detection of diffuse surface defects based on convolutional neural network,improves detection experiment platform that simulate the production line conditions,describes the structure of the hardware and software structure of the system,improves the preprocess method and adaptive Canny edge detection operator made is suitable for the improvement of the research,uses machine vision method to classify the types of defects and combines the template matching method with mathematical morphology in order to improve the robust of the processing.The main contents of this paper are as follows:(1)Detection experiment platform which is able to simulate production line conditions is designed,the platform can make the workpiece to be detected moving on a fixed speed of uniform linear motion and rotation within a certain range,at the same time,the CCD camera installed at the top of platform can acquire images of workpiece in the process of its movement.The experimental results show that the improved experimental platform reduces the acquisition time of the surface image of a single workpiece from 2.8 seconds to 0.9 seconds.(2)The images are smoothed under the condition that the details of images can be saved enough by choosing the right size(3×3)Gaussian kernel,and the images be enhanced by histogram equalization and the SMD2 shows the clarity of the image has been increased.(3)In defect detection stage,edge detection is used to detect the defects on the painting surface.Canny edge detection,Sobel edge detection,Scharr edge detection and Laplacian edge detection are compared in order to find the best method and we find out that the Canny edge detection is suitable for this research.Besides,a new method to set threshold based on the Gaussian filter size is proposed and the testing results show it is effective.Using both of edge detection and corner detection to detect the defect surface leads to full detection.(4)Using the machine vision to judge the defect images whether there is a defect or defects in the image.Besides,the template matching method combined with mathematical morphology is developed for those the contents of the detection images are complicated.In all,this paper presents a new method based on machine vision for automatic detection of diffuse surface defects based on three most common defects in the process of automobile coating.The experimental results show the effectiveness of this study. |