| Lithium batteries are widely used and have been commonly used in the electronic age,and the emergence of new energy vehicles has greatly promoted the development of lithium batteries.As a core component of new energy vehicles,the quality of cylindrical lithium batteries is very important.In recent years,the safety of cylindrical lithium battery has been widely concerned because of the thermal runaway of lithium battery,which leads to the fire and explosion of electric vehicles.The manufacturing process of cylindrical lithium battery is complicated,and improper operation of each link can cause scratches,pits or film damage on its surface.Among them,pits are serious surface defects,which can directly affect the welding effect of battery pack and have certain potential safety hazards.Therefore,it is of great significance to detect the pit defects on the surface of cylindrical lithium battery.At present,surface defects of cylindrical lithium battery are mainly detected by manual visual inspection.This method has low detection efficiency and low detection rate,and it is difficult to meet the needs of automatic production.There are few researches on machine vision-based surface defect detection methods for cylindrical lithium battery.The research on slight pits with uneven background brightness,uneven reflection and small contrast between light and shade is still vacant.In this paper,the detection of pits with different depths on the circumferential surface and end face of cylindrical lithium battery is deeply studied,and the solutions based on machine vision are proposed.The slight pits under strong interference signals are the key research objects of this paper.The main work of this paper is as follows.(1)The brightness of the circumferential surface image is uneven along the axial and circumferential directions,and the slight pits with low light dark contrast are easily affected by interferences such as shallow dirt,which makes the automatic detection of slight pits very difficult.After in-depth analysis of pit image features,it is found that there is a certain gray level mutation of pits in the axial direction of the image,and the shapes of pits are different from those of interferers in the gray-scale distribution curve.Therefore,a pit detection algorithm based on grayscale difference model and curvature change is proposed.First,the self-defined grayscale difference model which is insensitive to illumination distribution and interferences is used to calculate the abrupt change on the axial grayscale distribution curve,and combined with the concave-convex curve segment merging algorithm designed in this paper.The candidate areas of pits can be determined,and the fluctuations caused by uneven reflection and shallow dirt on the circumferential surface can be eliminated.Finally,the defined curvature variation is used to quantify the waveform characteristics of the gray-scale distribution curve to further eliminate the interferences.The images collected in the field are tested,the results indicate the uneven brightness has no effect on pit extraction,and there is no false detection caused by interferences.This method can not only effectively solve the influence of uneven brightness on pit detection,but also solve the problem that slight pits on circumferential surface are difficult to detect.(2)Due to uneven illumination and uneven reflection of metal surface,the image background of metal surface at the end surface is not uniform,and there are a lot of bright spots,dark spots and other strong noises.The contrast between slight pits and background is weak,and weak information is easily covered by noise.Therefore,it is difficult to extract pit with different degrees of depression simultaneously by using gray threshold segmentation method.To address the above problems,this paper proposes two pit detection algorithms of the end surface.Method 1: The pit detection algorithm based on double Gaussian texture filter template and extreme point Weber contrast is proposed.First,in order to reduce the noise and retain the grayscale mutation feature of the pit,according to the shape of pits in the gray-scale distribution curve,the image is convolved with the defined double Gaussian texture filter template.Finally,according to the characteristics of significant local variation of pits,the defined extreme point Weber contrast is used to enhance the difference between pit information and interference information.By extracting the pixels with significant local changes on the gray distribution curve,the pit is segmented from the complex image.The images collected in the field are tested,the results show that the algorithm can improve the detection rate of slight pits and reduce the false detection rate.However,the algorithm has the following problems.The algorithm missed the pits with small height and low local contrast.Because there are only bright areas in the pits at the edge of the metal surface,there is no gray mutation feature,so there is a missed detection.Multiple bright scratches have a large contrast with the background,resulting in being wrongly detected as pits.Method 2: Aiming at the problems existing in method 1,this paper further proposes a pit detection algorithm based on average deviation feature and concave-convex curve segment feature by fusing multiple image information of lithium battery.First,according to the pit imaging principle,six images of the same lithium battery are averaged in spatial space and outliers are removed to establish the datum image.At the same time,the spatial filtering method based on concave-convex curve segment is used to remove the interference noise with strong information intensity.The filtering algorithm is not limited by the window size.Secondly,the average deviation which can reflect the information of slight pits and pits located at the edge of metal surface is calculated according to the error analysis theory.Because the low-frequency components can reflect the overall characteristics of the image,the concave-convex curve segment combination algorithm designed in this paper can reflect the internal differences of pits without changing the gray value.Then the peak-to-valley difference,peak-to-peak difference and width ratio of concave-convex curve segment are extracted.Finally,BP neural network is used to establish a detection model to realize pit detection.By testing the images collected on site,the results show that the algorithm can solve the problem of method 1.This paper provides new ideas and solutions for the defect detection technology of coating surface and metal surface.The concave-convex curve segment merging algorithm proposed in this paper can effectively solve the on-line detection problem of weak signal under strong interference signal.It can be applied to the defect detection problem with light and dark difference on other surfaces.It has great application value and engineering application prospect. |