| With the rapid development of social economy,the requirement of industrial production for welding quality and automatic welding inspection is becoming higher and higher.The shape and size of weld groove are the basis of weld quality.At present,weld groove detection is mainly based on vision.Compared with manual inspection,machine vision inspection has the advantages of high efficiency and low cost.In this paper,the image recognition technology of weld seam is studied,and a weld V-groove detection system based on machine vision is designed.First of all,based on the CMOS industrial camera and the linear laser transmitter,a V-groove weld machine vision sensing system is designed,built and calibrated.Using Matlab and Visual Studio 2017 to develop a groove image processing program,to achieve image denoising,filtering,threshold segmentation,binarization and other preprocessing,and the use of mathematical morphology to smooth repair image to meet the requirements of image processing.Based on the analysis of existing techniques,this paper presents an edge detection operator which fuses the minimum with morphology,obtains all the minimum points of the groove laser fringe curve by the quadratic derivative of the grayscale curve.Aiming at corner detection of V-groove,this paper proposes an algorithm which combines type recognition with fast corner detection.The algorithm can recognize different kinds of grooves according to the change of the horizontal and vertical coordinates,and realize the fast corner detection with FAST operator.Compared with Harris and Shi-Tomasi corner detection,the fast corner detection algorithm proposed in this paper has advantages of less time and higher precision.Finally,by using the least square method and Hough linear transformation,the mapping relation of distance and angle between feature points is given,and the 2D image coordinates are transformed into 3D world coordinates.The results show that the errors of width,depth,root clearance,and single inspection are 0.15 mm,0.14 mm,0.083 mm and 817 ms respectively.V-groove detection algorithm presented in this paper has high precision,high stability and short time consumption,which can meet the actual production needs. |