| Cylindrical lithium batteries are the main power source for new energy vehicles,household appliances,and mobile electronic devices.However,in the manufacturing process,defects such as scratches,depressions,pinholes,and dirt on the surface may occur due to external factors.These defects may lead to electrolyte leakage and internal short circuit.It seriously affects battery performance and even causes fire and other safety hazards.Therefore,in the process of battery production,the industry has higher and higher requirements for the detection of battery appearance defects.Defect recognition technology based on machine vision is widely used in industrial scenes with the advantages of high efficiency,high precision and low cost.However,for weak defects with small scale and less feature information,the traditional image acquisition method often has the problem that the weak defect imaging is not significant,and the recognition of weak defects based on twodimensional image processing method is difficult,which cannot meet the current highprecision recognition requirements.It is still a bottleneck problem in the field of recognition.The defect recognition technology based on three-dimensional image has become the current research hotspot due to its high precision and other advantages.Therefore,it is of great theoretical research significance and practical application value to study a robust and efficient three-dimensional weak defect recognition method on battery surface.In this paper,the surface defects of cylindrical lithium battery are taken as the research object.In order to solve the problems of low efficiency and low accuracy of defect recognition,a set of surface defect recognition method of cylindrical battery based on improved photometric stereo method is designed.The research on the battery surface photometric stereo imaging system scheme,morphology three-dimensional reconstruction method,weak defect feature enhancement method and defect recognition is carried out.The main work contents are as follows.(1)The overall scheme design of battery surface defect recognition system.Firstly,aiming at the problem that the gray difference of scratches,bumps and other defects in the two-dimensional gray image of the battery surface is small under the illumination of the traditional single-direction light source,by analyzing the research object and recognition requirements,an improved fast photometric stereo near-field light source illumination scheme is studied.A partition ring light source image acquisition system is designed for the battery end face,and a linear array stripe light source image acquisition system is designed for the battery circumference surface.On this basis,the spatial layout of the acquisition device is optimized.Secondly,the appropriate signal triggering method is compared and studied,and the acquisition signal timing diagram is designed to coordinate the orderly change of the trigger camera and the light source to collect the multi-angle illumination image of the battery surface.Finally,according to the characteristics of battery defects,an effective image processing algorithm is studied and designed,and a multi-station,multi-thread parallel processing software flow is designed to improve the recognition efficiency of the system.(2)A three-dimensional reconstruction method of battery surface based on improved photometric stereo.Firstly,aiming at the problem that it is difficult to collect multi-angle illumination images at the same position by using a linear array camera on the circumference of the battery,this paper constructs a multi-angle near-field illumination imaging model of the circumference through a stripe light source,and proposes an image data splitting method to split and reorganize the circumference image to obtain a multi-angle illumination image of the circumference.Secondly,aiming at the limitations of the classical photometric stereo method,such as the requirement that the surface is Lambertian reflection property and the light is parallel light,and the problem of slow reconstruction speed,a calibration method based on diffuse reflection calibration ball and calibration plate is proposed to correct the calculation error under the near-field illumination model.The normal vector solution process is optimized by using the prior information such as the pitch angle and azimuth angle of the light source,and the time consumption is reduced to 52 % of the classical algorithm.According to the image size,the height is pre-constructed to solve the sparse matrix to realize the fast threedimensional reconstruction of the battery morphology.Finally,aiming at the problem that the smooth circumference of the battery is easy to produce high reflection during image acquisition,a specular reflection component removal algorithm based on Mask dodging and guided filtering is proposed.The YUV chromaticity space brightness channel is used as the guide map.After the difference between the estimated specular reflection component map and the original image,the gray stretch is performed to suppress the high reflection area and improve the accuracy of the three-dimensional shape reconstruction of the battery.(3)Weak defect enhancement method based on multi-channel image fusion.The photometric three-dimensional reconstruction effectively enhances the contrast of large-scale defect features in the image,but it is still not significant for weak defect textures such as shallow scratches and shallow depressions.Aiming at the problem of low recognition rate of weak defects with sensitive direction and little change in height,a multi-channel image fusion algorithm based on normal vector map and depth map is proposed by analyzing the angle sensitivity characteristics of weak defect height characteristics and combining the direction difference of depth information.Firstly,according to the correlation between different channel component images of color images and defect feature information,the contrast of weak defects on different channel images is analyzed.Secondly,the single channel component images with high correlation of depth features are extracted respectively.Finally,the optimal weight coefficient ratio is given by cross test for fusion.The fused single image contains more weak defect feature information.Compared with the depth map,the PSNR is increased by166.7 %,the clarity is increased by 240.7 %,and the variance is increased by 65.2 %.Thereby enhancing the prominence of weak defects,better input into the subsequent recognition model,and improving the recognition rate of weak defects.(4)Battery surface defect recognition method based on multi-scale network.Due to the complex and diverse surface profiles of the battery,there are many kinds of defects,large scale variation range and random location.Aiming at the problem that the traditional image processing algorithm has weak recognition ability for battery surface defects,a battery surface defect recognition method based on improved YOLOv5 is proposed.Firstly,the original network convolution module is replaced by constructing the Ghost Bottleneck module in the backbone layer to extract more feature maps and reduce the computation of the backbone layer.Secondly,a multi-attention fusion mechanism is constructed on the basis of the original network neck layer,which makes full use of the feature information extracted from the presequence backbone layer for fusion,and introduces the CBAM module to ensure the accuracy of the detection position.The m AP@0.5 of the improved network training prediction is increased by 1.35 %,which effectively improves the network ’s ability to identify weak defects.Finally,a multi-level model fusion method and a fusion decision criterion are designed to finally determine the multi-view recognition results of each surface of the battery.In summary,this paper studies the high contrast imaging method,fast three-dimensional reconstruction method,weak defect enhancement and recognition method of battery surface.A set of cylindrical battery surface defect recognition system and control software are designed by using the integrated development environment,which mainly includes login module,automatic detection module,offline teaching module,parameter setting module and data management module.The battery production data of the system in the actual industrial field are tested and verified.The results show that the defect recognition system can detect the battery surface defects up to 99.8 %,and the average recognition accuracy and recall rate of each defect are 95.02 % and 95.9 %,respectively.It can effectively identify the weak defects on the battery surface.The running time of each module of the system meets the requirements of the detection beat,and the stability and real-time performance are good.It has good practicability in industrial scenarios. |