| China is the world’s largest photovoltaic producer,in which the output of monocrystalline silicon cells also has a considerable proportion.A variety of surface defects occur in the production process of monocrystalline silicon cell,which can be summarized as knock edge,knock Angle,holes,scratches and smudges.As the energy carrier of monocrystalline silicon cell,the manual visual inspection method used for surface defect detection is inefficient,costly and easy to cause secondary defects.With the development of machine vision technology,automatic detection of battery surface defects using machine vision technology has become more and more extensive.In this paper,aiming at the disadvantages of the traditional manual detection method with low efficiency and high cost,a battery surface defect detection system is designed by using the internationally popular Halcon image processing software and C#programming language.The content is as follows:(1)Design of machine vision detection system.First of all,through the analysis of other vision detection systems,the machine vision detection platform is built,and the real-time collection of high-definition images of battery pieces is realized.The visual inspection platform is composed of three parts: motion control system,visual system and software system.(2)Research on image algorithm.Firstly,on the basis of obtaining high quality battery image,the median filter algorithm is used to effectively denoise the image,and the edge information of the battery is preserved.Secondly,in order to enhance the background area and the target area of the battery image,the linear transformation is carried out to enhance the contrast of the image.Then,aiming at the problem that the edge of the battery is not smooth enough,an image segmentation method combining smooth filtering and sub-pixel segmentation algorithm is used to segment the contour of the battery image,and affine transformation technology is used to realize the position correction of the battery image.According to the types of battery defects,the common contour analysis algorithms,corner detection algorithms and morphological analysis algorithms are studied.(3)Battery defect detection.In this paper,three detection methods based on contour analysis,corner detection and morphological analysis are used to detect the edge and Angle defects of battery images.Finally,in view of,smudgy,holes and scratches defects,remove the battery surface is studied delete line is designed by the method of the interference of an edge to step search and grey value filling algorithm is used to remove the battery delete line,surface and traditional features(area,rectangle,aspect ratio,outline the perimeter)removal methods,the algorithm has good performance in removing,the characteristics of fast speed,after statistics,the algorithm the average run time around 300 ms.Finally,all defects can be detected by multi-feature filtering and local threshold segmentation algorithm.(4)Software system design.A software system is designed with C# language,and a group of 1000 images are detected by the image processing function of the software system,which verifies the feasibility of the vision detection system. |