A rapid image acquisition method for external defect inspection of battery can Authors: Wei Yang, Chunfeng Huang, Pengfei Ji Published: 2026 ABSTRACT AbstractDuring the manufacturing process, battery cans may have appearance defects such as scratches, dents, and stains. The reliability of the battery will be reduced if these defects are not detected. Machine vision based inspection methods have high inspection accuracy and stability, gradually replacing manual inspection. The efficiency of machine vision inspection method is constrained by the efficiency of image acquisition. In this paper, an image acquisition method based on magnet roller is proposed, which can realize the rapid loading and unloading of the battery cans and the high-speed image acquisition. The efficiency of the inspection system has increased from 140 per minute to 240, and the inspection accuracy reaches 99.6%.Keywords: Defect inspection, Machine vision, Image acquisition, Inspection efficiencySubject terms: Mechanical engineering, Electrical and electronic engineering Introduction Battery cans are cold-rolled product with high quality requirements. The surface defects, including scratches, pits and stains, may cause coating damage, posing a threat to battery safety1. Due to the huge demand for battery production, the traditional manual visual inspection method cannot adapt to the current development in terms of inspection efficiency and inspection accuracy. With the development of machine vision technology, the detection method based on image processing has gradually replaced the manual visual inspection2,3. The defect inspection process of machine vision includes image acquisition, image preprocess, feature extraction and recognition, detection and classification4. Guo5 studied the detection algorithm of pit defects, established a pit defect database, and identified such defects based on gray difference model and curvature change. Neogi6 proposed a global adaptive percentage threshold algorithm for gradient images, which changes the percentile value used for thresholding depending on the number of pixels above some specific values of gray level of the gradient image. Badmos7 used learning computer vision methods to evaluate the quality of lithium-ion battery electrode for automated detection of microstructural defects from light microscopy images of the sectioned cells. Haoran Sun8 proposed An electrode defect detection algorithm using topology filtering and an improved Canny operator is proposed to address the problems of uneven brightness of electrode images and low defect contrast. Xinhua Liu9 proposed a novel defect detection approach based on improved K-nearest neighbor (KNN) and Euclidean clustering segmentation which improves accuracy to 99.2%. Wang Jian10 proposed a lithium battery defect detection device based on battery temperature field and visible light image, including visual information sensor, defect sensing computer and defect actuator. Tan Wen11 developed an on-line detection device for 360° curved surface of cylindrical battery based on HV&VHS algorithm, which can quickly separate the object from the background through the efficient adaptive region segmentation algorithm of transverse gradient longitudinal scanning. Most of these researches are about image processing algorithms, but few on image acquisition methods. Note that image acquisition is the start of defect detection, high quality images can highlight the characteristics of defects and make post-processing easier. Not only is the quality of image acquisition, but efficiency is also very important. The image acquisition process is highly related to the automation level of detection equipment. The battery cans constantly enter and exit the detection position, and rotate at the detection position according to the image acquisition method. Therefore, the research on high-quality and efficient image acquisition method is important. Ma12 proposed a detection device, which can transport the cylindrical battery cans and make the battery cans rotate one circle at the detection position. The method uses a clamping device to clamp the battery can from both ends and drive the battery can to rotate at the detection position. Huang13 designed a magnetic suction handling manipulator, with a single conveying efficiency of 10 per cycle, but it cannot solve the problem that the battery can needs to rotate in the detection position. Eun14 proposed an external detection system for batteries, which uses multiple rows of pallets to transport battery cans vertically, and deploys a line scan camera to obtain a set of bottom images of multiple battery cans at a time. This method is used to detect the end surface defects of the battery case, but not the side defects. For the cylindrical external surface, there are two methods of image acquisition. One is to use plane array cameras to capture the image of the battery can from multiple angles, as shown in Fig. 1a. The advantage is that it does not need additional movement of the battery can at the detection position, so the conveying mechanism is simplified. However, the image captured has distortion in the edge part, and it is not easy to obtain consistent illumination intensity, which is not conducive to image segmentation and feature extraction. Another method is to deploy one linear array camera for image acquisition, which requires the battery can rotates for one circle at the detection position, as shown in Fig. 1b. Image acquisition based on linear array camera can obtain higher quality images, but this method involves some other technical difficulties. Image acquisition of cylindrical external surface of battery can. The multi-view area scan camera solution does not require the battery can to rotate at the inspection position, making the conveying mechanism relatively simple. However, this solution has the following limitations. First, due to constraints in camera installation angles and illumination angles, it is difficult to ensure uniform illumination across the entire cylindrical surface, and distortion and shadows are prone to occur at the image edges, which is detrimental to subsequent image segmentation and feature extraction. Second, to ensure the integrity of image stitching, typically 3 to 6 cameras are required, resulting in high equipment costs and complex multi-camera calibration. Additionally, the images captured by each camera need to be stitched together, increasing algorithm complexity and inspection time. The drum-type system drives the battery can to rotate via a rotating drum, achieving relatively stable rotational motion and high image quality. However, this solution has the following drawbacks. First, the battery can must be precisely placed in the groove or fixture of the drum, making the loading and unloading mechanism complex and affecting the overall inspection efficiency. Second, due to limitations of the drum size and rotational speed, further improvement in inspection efficiency is difficult to achieve. In contrast, the solution using a line scan camera combined with battery can rotation offers the following advantages. The line scan camera operates in a line-by-line scanning mode, and when combined with the uniform rotation of the battery can, it produces a fully unfolded image of the cylindrical surface with low distortion, high resolution, and good illumination uniformity. A single line scan camera can capture the entire surface image, resulting in relatively low equipment costs. The acquired image is a continuously unfolded image that does not require stitching, making subsequent defect detection algorithms simpler and more efficient. The magnetic roller-based rapid loading and unloading mechanism proposed in this paper further addresses the efficiency shortcomings of traditional rotation-based solutions. This paper focuses on the image acquisition method of the battery cans for the defect inspection system, but does not pay much attention to the image acquisition algorithms. An image acquisition method for linear array camera is proposed, which can make the battery case quickly complete the loading, rotation and unloading actions. The chapters are arranged as follows: “Defect inspection system of Battery cans” section introduces the composition, parameter optimization and improvement. In Chapter 3, the feasibility and performance of this method are verified by experiments. Chapter 4 draws the conclusions. Defect inspection system of battery cans Composition and principle The detection system of battery cans is composed of conveyors, rollers, magnet, linear array camera, industrial computer and sorting device, as shown in Fig. 2. The front conveyor is used to carry the battery cans from the hopper to the front roller. The roller is used for loading and driving the rotation of battery cans. There are through-holes on the rollers to embed slender magnets. Line array camera is arranged directly above the inspection position for image acquisition. The rear conveyor is used to unload the battery can from the rear roller. The collected images are sent to the computer for processing, and then after defect recognition, commands are sent to the PLC to drive the sorting device. Composition of defect inspection system. The working principle of the two rollers is shown in Fig. 3. As the front roller rotates, the battery can is carried to the detection position through the magnetic force. When the battery can comes to the gap between the two rollers, which is the inspection position, battery can stays at the gap and rotate until the magnet on the rear roller turns to the gap and takes the battery can away. Note that the rotation speed and phase of the front and rear rollers must be strictly consistent, so they have to be driven by one motor to keep synchronized. Principle of image acquisition method. The mechanical analysis of the battery can is shown in Fig. 4. Where f1 is the friction force between the battery can and the front roller, f2 is the friction force between the battery can and the rear roller, Gc is the magnetic force between the battery can and the magnet, N1 is the positive pressure of the front roller on the battery can, and N2 is the positive pressure of rear roller on the battery can. The moment balance equation is as follows: where α is the angular acceleration, R is the radius of the battery can, and J is the rotational inertia of the battery can. Under normal working conditions, f1 is the static friction, which is a variable less than the maximum static friction. At the detection position, the battery can is accelerated and then rotated at a uniform speed. Force on battery can. Design and optimization of rollers The geometric dimensions of the battery can and the two rollers are shown in Fig. 5. Geometric dimensions of the battery can and the two rollers. Where θ is the rotation angle of the roller corresponding to a full rotation of the battery can. R is the radius of the roller, r is the radius of the battery can, and d is the gap between the two rollers. The radius R of the roller can be calculated according to the following equations. where k is the margin coefficient, which is set to ensure the integrity of the collected image, taking k = 1.1 ~ 1.2. It can be found that the circumference of the roller is equal to the circumference of the battery can plus a part of the empty stroke. Define the efficiency of image acquisition in each cycle as η where n is the number of battery cases detected per revolution of the roller. Increasing the value of η is helpful to improve the efficiency of the image acquisition device, and then improve the efficiency of the battery can inspection system. Theoretically, the efficiency of each cycle of acquisition reaches 74%. In traditional continuous image acquisition systems, robotic arms are utilized for loading and unloading. The total time consists of the handling time plus the image acquisition time. The ratio of image acquisition time to the total time is defined as the cycle efficiency, which corresponds to the per-cycle efficiency η proposed in this paper. The cycle efficiency of traditional methods is typically less than 50%, significantly lower than the 74% achieved by proposed approach. The radius of different types of battery cases ranges from 5 to 20 mm. For example, when the radius of the battery can is 5 mm, the radius of the roller is less than 7 mm. This structure is so small that there is no space for the arrangement of bearings and magnets. Some improvements have been made to solve this problem, as shown in Fig. 6. The radius of the roller is increased, and three magnets are equally distributed on the roller, so that the image of three battery cans can be acquired as the roller rotates for one cycle. Principle of improved image acquisition method. In Fig. 6a, the red magnet of the front roller brings the battery can marked by the solid line to the detection position, the blue magnet of the front roller brings the magnet marked by the next centerline to the roller, and the blue magnet of the rear roller brings the battery can marked by the previous dotted line and takes it out of the detection position. Figure 6b and Fig. 6c show that when the rollers rotate, the battery can marked with solid line rotates for one cycle, and the image acquisition is completed with the linear array camera. Figure 6d shows that the blue magnet of the front roller will bring the battery case marked with the center line to the detection position, and the green magnet of the rear roller will bring the battery can marked with the solid line out of the detection position. When entering the detection position, the battery can marked with the center line shall avoid collision with the battery can marked with the solid line. So the value of gap δ must be greater than zero, as shown in Fig. 7. Geometric dimensions of the improved roller. The radius of the improved roller can be calculated by the following equation. where k is the margin coefficient, n is the number of battery cases detected per revolution of the roller, R is the radius of the roller before improvement, r is the radius of the battery can, R' is the radius of the roller after improvement. Defect inspection algorithm There are many types of defects on the surface of battery cans, including scratches, strains, pits, stains, sand holes and different types of defects correspond to different algorithms. The common defect inspection process is shown in Fig. 8. The traditional edge detection algorithm is used to detect pit and scratch defects. Since the algorithm is not the main research content of this paper, there is no algorithm optimization in this paper. Defect inspection process. Experiments In this paper, the performance of image acquisition method is studied, the feasibility of image acquisition device is verified, and its parameters are optimized. Experiments of magnet clearance The magnet is used to take battery cans into or away from the rollers and increase the force between the battery can and the roller. To increase the magnetic force, it is necessary to reduce the clearance c between the embedded magnet and the surface of the roller, as shown in Fig. 1. However, reducing the clearance leads to the weak mechanical strength and short service life of the roller. The purpose of this experiment is to obtain the optimal clearance c. The clearance c is adjusted from 1 to 4 mm by adding non-magnetic shims. Figure 9 shows the acquired image of battery cans as the rotating speed of roller is 60 rpm. Image of battery cans at different magnet clearance. It can be observed that when the clearance c is 3 mm or 4 mm, the acquired image is severely distorted due to sliding between the battery can and the roller. The quality of acquired images is improved at magnet clearance of 2 mm or 1 mm. Figure 10 shows the inspection accuracy at different clearance. The number of samples in this experiment is 500. Inspection accuracy rate at different clearance. The accuracy rate is extremely low when the clearance is 4 mm, indicating that the image acquisition device is defective. The accuracy rate is less than 80% at the clearance of 3 mm, incompetent for industrial applications. The accuracy rate is 99.6% at the clearance of 1 mm or 2 mm, which can meet the industrial demand. Experiments of roller rotating speed In order to improve the inspection efficiency, it is necessary to increase the rotating speed of the roller. However, the higher the rotational speed of the roller, the greater the angular acceleration of the battery can. According to Eq. (1), a greater frictional force is required. When the friction is insufficient, the battery can slips on the roller, causing the failure of image acquisition. To get the optimal roller rotating speed while ensuring the inspection accuracy rate, a series of experiments were carried out. The rotating speed of roller ranges from 40 to 100 rpm, and the corresponding efficiency is 120 per minute to 300 per minute. The acquired images are shown in Fig. 11. Images of battery cans at different rotating speed of roller. There is significant distortion in the acquired images as the rotating speed of the roller reaches 100 rpm. Group experiments were carried out to obtain the inspection accuracy rate at different rotating speed of the roller, the results are shown in Fig. 12. Inspection accuracy rate at different roller rotating speed. The inspection accuracy rate is 99.4% ~ 99.6% as the roller rotating speed ranges from 40 to 80 rpm. When the roller rotating speed is 60 rpm, the inspection accuracy rate is 99.4%, which can be inferred that a random event caused the incorrect detection of defects in a certain battery can. The accuracy rate is 91.2% at the roller rotating speed of 90 rpm, which is not acceptable for industrial applications. Therefore, the optimal roller rotating speed is 80 rpm, corresponding to the inspection efficiency of 240 per minute. Experiments of various battery can radius Common radius specifications for cylindrical lithium batteries include 5 mm, 7 mm, 8 mm, 8.5 mm, 9 mm, 10.5 mm, 13 mm, and 16 mm. To validate the universality of the proposed method, comparative experiments were conducted on battery can with radius of 5 mm, 9 mm, and 13 mm. After parameter optimization, the defect detection accuracy rates for battery cases with radius of 5 mm and 9 mm reached 99.2% and 99.6%, respectively, which were comparable to that of the 13 mm ones. Furthermore, it was observed that regardless of the battery can radius, the defect recognition accuracy dropped significantly when the roller speed exceeded a certain threshold. This threshold speeds corresponding to different battery can radius are presented in Table 1. Table 1Performance comparison of various battery can radius.Battery can radius/mmAccuracy rate/%Threshold speed/rpmCorresponding linear speed mm/s599.219099999.61201131399.690122 Performance comparison of various battery can radius. Experimental results indicate that although threshold rotational speeds vary significantly across battery can of different radius, the corresponding threshold linear velocities remain relatively consistent. Previous studies have shown that when the linear velocity exceeds a certain threshold, the defect detection accuracy decreases markedly. It can therefore be concluded that the linear velocity of the battery case surface is a critical factor influencing image acquisition quality. Experiments of various algorithms To evaluate the universality of the improved image acquisition method, a comparative experiment was conducted. Based on an image dataset of battery cases with a radius of 13 mm, the grayscale difference model, the improved KNN algorithm, and the proposed method were respectively applied for defect detection. By comparing the recognition results of the three approaches, a quantitative analysis was performed to assess the performance improvement of the algorithms resulting from the enhanced image quality. The experimental results are shown in Fig. 13. Inspection accuracy rate of different algorithm. The comparative experiments reveal that although different detection algorithms were employed, the image acquisition method proposed in this study maintains a comparable level of defect recognition accuracy to conventional methods, with no significant differences observed. However, the proposed method demonstrates a substantial improvement in image acquisition efficiency. These results fully validate that the proposed image acquisition method offers excellent universality, reliability, and practical engineering value. Statistical analysis of detection performance To further verify the reliability and statistical stability of the proposed image acquisition method, this section provides a detailed analysis of the composition of the experimental dataset, multi-dimensional evaluation metrics of detection performance, and recognition results for different defect types. The experimental dataset comprises a total of 6000 battery can samples, including 3000 non-defective samples and 3000 defective samples. The defective samples cover five types of defects: scratches, pits, stains, strains, and sand holes, with sample sizes of 1500, 900, 300, 200, and 100, respectively. Regarding the sample distribution, the two common defect types, scratches and pits, have relatively abundant samples, while strains and sand holes have fewer samples. To more comprehensively evaluate the detection performance of the proposed method for different defect types, a multi-class confusion matrix is introduced in this section. Table 2 presents the confusion matrix of detection results for the five defect types on the test set, where the diagonal elements represent the number of samples correctly identified for each defect type, and the off-diagonal elements represent misclassification cases. Table. 2Confusion matrix for various defect detection results.Actual\PredictedScratchPitStainStrainSand holeNon-defectiveScratch149711010Pit18952101Stain01298100Strain10119710Sand hole1001971Non-defective211002996 Confusion matrix for various defect detection results. Based on the confusion matrix, the recognition accuracy for each defect type is calculated as follows: scratches 99.8%, pits 99.4%, stains 99.3%, strains 98.5%, and sand holes 97.0%. This variation in accuracy can be attributed to the distinct visual characteristics of different defects. Scratches and pits typically exhibit clear linear or circular edge features with relatively high contrast against the background, making them easier to detect. In contrast, sand holes and strains often present as subtle surface irregularities with lower contrast and more gradual intensity variations, posing greater challenges for accurate detection. The overall accuracy is calculated to be 99.65%, the macro-average recall is 99.2%, and the false negative rate is 0.53%. In industrial applications, the false negative rate is particularly important because it directly affects the risk of defective battery cans entering subsequent processes. The false negative rate achieved by the proposed method meets the reliability requirements of industrial production. Regarding missed detections across different defect types, the false negative rates for sand holes and strains, two defect categories with relatively small sample sizes, are slightly higher. This can be further improved by expanding the sample size for these defect types in future work. In summary, through multi-class confusion matrix analysis, and performance evaluation by defect type, this section verifies the statistical reliability, detection accuracy, and adaptability to different defect types of the proposed image acquisition method from multiple dimensions. Conclusion An image acquisition method deploying magnetic rollers for external defect inspection of cylindrical battery can is proposed in this paper. This method can rapidly bring the battery can into and out of the inspection position, and rotate the battery can stably at the inspection position. The optimal clearance between the magnet and the surface of the roller was determined through experiments to be 1–2 mm. The inspection efficiency reaches 240 per minute while maintaining high inspection accuracy rate of 99.6%. Compared with 140 per minute by methods based on mechanical arm, the efficiency has increased by 42%. The further research focuses on the improvement of the accuracy and reliability of the defect inspection system for battery cans under long-term continuous operation. Acknowledgements This work was supported by the Key Scientific Research Projects of Higher Education Institutions in Henan Province of China under Grant 25B460015. Author contributions Wei Yang wrote the main manuscript text, Chunfeng Huang and Pengfei Ji collected and sorted out the experimental data. All authors reviewed the manuscript. Data availability Data is provided within the manuscript. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References Associated Data Data Availability Statement Data is provided within the manuscript.