| Cylindrical lithium-ion batteries are widely used in life and are often used in various electronic devices,such as micro-printers,high-end portable lighting equipment,medical equipment and other commonly used electronic instruments in life.In the production process of lithium batteries,due to the limitation of production conditions and insufficient technology,defects such as scratches,pits,and leakage will inevitably occur on the end face of the battery.These defective batteries will not only affect the overall quality of the product,but even bring safety hazards during the use of the battery.For the defect detection of the end face of cylindrical lithium batteries,relying on manual detection is not only inefficient,but also easily affected by peoples subjective emotions and fatigue,resulting in false detection and missed detection.In order to improve the product quality of cylindrical lithium batteries,under the premise of ensuring the efficiency of defect detection,this topic researches the detection method of end face defects of cylindrical lithium batteries based on machine vision.The main research contents of this paper are as follows:The causes and hazards of each defect on the battery end face are analyzed,the battery end face image is preprocessed,and the ROI region of the battery end face is extracted by image segmentation,feature extraction and template matching.For end-face scratch defects,the gray distribution curve of the image is analyzed,and the candidate scratch pixels are detected based on the relative amplitudes of convex line segments.The interfering pixels are removed by the template and the broken scratches are connected.Finally,the linear features are used to extract and mark the scratches.For end-face pitting defects,the absolute amplitude of the concave line segment is analyzed based on the local minimum value on the gray distribution curve,the seed points of the pitting are located,and then the method of improving the region growth is used to mark the pitting.Two methods are proposed respectively.These are the gradient-based linear region growth method and the surface-based pitted region growth method.After experimental tests,the former has better detection effect.For leakage defects,there are two types,one is minor leakage and the other is serious leakage.For slight liquid leakage,the relative amplitude of the convex line segment is used to locate the edge of the metal hole.In order to ensure the continuity and accuracy of the edge,a filling and leveling method is proposed based on the gray distributioncurve to smooth the transition line segment at the edge of the metal hole.According to the positioning The information marks the outline of the metal hole,and two schemes are proposed to extract the metal hole area,and finally the slight leakage is judged according to the grayscale feature.For serious liquid leakage,after completing the contour positioning and marking of metal holes,it is judged whether serious liquid leakage is caused by the quantitative characteristics of the holes.The final experiments show that the algorithm in this paper can more accurately detect the end-face defects of cylindrical lithium batteries. |