| With the development of society,the application range of glass is more and more extensive and the demand of glass is greater than before,so the output of glass increases accordingly.However,the current glass detection technology is unable to cope with the increasingly high output of glass,unable to meet the modern industry’s pursuit of high efficiency,high speed and high precision detection requirements.Therefore,this paper will use CCD detection technology to detect the boundary dimensions of flat glass,so as to improve the efficiency,speed and accuracy of detection.The object of this paper is automobile flat glass.The purpose is to detect the boundary dimensions of flat glass.The dimensions to be detected in this paper are the errors in the normal directions of the detection points,so for the special detection criteria,the corresponding detection algorithm is designed,and the software and hardware system is developed.The main research contents of this paper include:(1)The image acquisition system is constructed.By analyzing the characteristics of different industrial cameras,a suitable camera is selected.Through theoretical analysis and experimental comparison,the appropriate light source,lighting mode and background color are selected,so the lighting system is determined.(2)The image acquisition system is used to take pictures.According to the characteristics of the images,the appropriate image processing algorithm is used to process the images to get the boundary images.The image processing algorithms include image distortion correction,threshold segmentation,filtering processing and boundary extraction.(3)Image registration is completed by image translation and image rotation.In the image translation part,the centroid coordinates of the images are used as reference points to complete the image translation.In the image rotation part,a beehive sorting algorithm and a cross-correlation algorithm are proposed to extract the boundary pixels and obtain the rotation angle.(4)The curves are fitted and the errors are calculated.In curve fitting,a line judgment algorithm is proposed and used to distinguish lines and curves.To improve the fitting accuracy,the least square method is used to fit the straight line,and the cubic b-spline curve is used to fit the curve.In the error calculation,an image intersection method and a solving equations method are proposed to calculate the errors.And then the error result is displayed in a dialog box.(5)The Visual Studio 2010 software is used for algorithm writing and system development,and eventually form a complete set of software.This software includes rapid detection module,step-by-step analysis module and result display module.It is convenient for users to use and realizes the measurement of the boundary dimensions of automobile flat glass. |