| Window combination switch is one of the necessary parts of passenger cars,in the production process of window combination switch,easy to produce scratches,holes and other surface defects,affecting the quality of the window switch.At present,the window switch detection method of domestic auto parts manufacturers is still manual detection,which has low efficiency and is easy to be disturbed.It is of great significance to study the window combination switch defect detection method for improving product quality.In this paper,the surface defect detection technology of the window combination switch is studied,and combined with the characteristics of the window combination switch,the surface defect detection scheme of the window combination switch is determined,and the window switch image defect detection algorithm is designed.The research content of this paper is as follows:1.Construction of image acquisition system: The image acquisition system in this study is composed of imaging system,positioning system and defect detection system.An imaging system based on telecentric lens was designed to solve the problem of uneven illumination and the influence of reflection light.In order to solve the problem of small field of view,the positioning system is designed so that the image acquisition system can collect one window switch image each time.2.Image preprocessing and region of interest extraction: In order to remove the noise in the collected images,Gaussian filtering method is used to remove the noise;In order to extract the ROI region of the image,the classical edge detection operator and subpixel edge detection methods are compared,and the classical Canny edge detection operator is selected to obtain the contour of the image and extract the target region.The image deflection Angle of window switch is obtained by using the Hough transform method,and the window switch is adjusted by affine transformation according to the deflection Angle.In order to accurately segment window switch images by threshold,a multi-direction OTSU threshold method was proposed to partition window switch images and extract shape features and HOG features.3.Good product judgment of window opening: Analyze the basic principle of support vector machine.A SVM-based multi-kernel classifier is proposed by combining Gauss kernel function and Sigmoid kernel function,with an average accuracy of 94%. |