A method and system for detecting surface defects in lithium battery electrodes based on image recognition
Patent Information
- Application Number
- CN202610226655.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-26
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2046-02-26
AI Technical Summary
然而,这类方法在实际应用中面临多重技术挑战
1、本发明通过获取极片表面的多帧图像,引入基于运动参数的帧间空间偏移计算与亚像素级插值对齐机制,将不同时间采集的图像精确映射至同一物理位置,有效消除了极片连续运动带来的位移误差和形变干扰。在此基础上构建多维图像数据,使同一像素点在多帧下形成稳定的观测集合,从而显著提高法向量场与反照率场求解的准确性。本发明能够稳定刻画极片表面的微小几何起伏与细微亮度变化,对针孔、微凸起等早期缺陷具有更高的检测灵敏度和空间一致性。
Smart Images

Figure CN122090154B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition technology, specifically to a method and system for detecting surface defects in lithium battery electrodes based on image recognition. Background Technology
[0002] The surface quality of lithium battery electrodes directly affects the safety performance and lifespan of the battery. During electrode production, processes such as coating and rolling can introduce various surface defects. Existing methods for detecting electrode surface defects mainly rely on grayscale image analysis, identifying abnormal areas by setting grayscale thresholds or training classification models. However, these methods face multiple technical challenges in practical applications. In the rolling process, minute imperfections on the roller surface can form periodic marks on the electrode, overlapping with actual defects in image features, making them difficult to accurately remove using traditional methods. Furthermore, some foreign particles are pressed into the electrode during rolling, weakening surface features but increasing internal risks; existing single-process detection methods cannot identify these latent defects. The fundamental reason is that existing methods only utilize grayscale information from images for analysis, lacking effective means of representing surface geometry, failing to distinguish between reflectivity changes and geometric deformation in a physically fundamental way, and struggling to establish a cross-process defect evolution tracking mechanism.
[0003] To address this, a method and system for detecting surface defects in lithium battery electrodes based on image recognition are proposed. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for detecting surface defects of lithium battery electrode sheets based on image recognition. The method constructs multi-dimensional image data by aligning subpixel data of multiple frames of images, solves the algorithm vector field and albedo field, distinguishes between true and false defects by combining Gaussian curvature and albedo gradient, and accurately identifies and determines embedded high-risk defects by using dynamic background modeling and inter-process strain mapping.
[0005] To achieve the above objectives, the present invention provides the following technical solution: A method for detecting surface defects in lithium battery electrode sheets based on image recognition, comprising: Acquire multiple frames of images of the electrode surface, calculate the inter-frame spatial offset based on motion parameters, align the multiple frames of images to the same physical position, and output the aligned multidimensional image data. Based on the multidimensional image data, the normal vector field and albedo field of each pixel are calculated, the Gaussian curvature of the normal vector field and the gradient magnitude of the albedo field are calculated, and the distribution difference of the Gaussian curvature and gradient magnitude in the feature space is classified. The high gradient and low curvature regions are marked as pseudo-defect generation masks, and the real defect candidate regions and normal vector data are output. Establish a mapping between mechanical phase and image coordinates. Based on the true defect candidate region, construct a dynamic background library using a weighted moving average. Calculate the residual and make an adaptive threshold decision. After removing periodic imprints, output a list of net defect coordinates. Based on the measured strain field, an inter-process coordinate mapping is established, the defect location of the data in the net defect coordinate list is obtained, and the Gaussian curvature integral value and albedo integral value are extracted. When the curvature integral decreases and the albedo integral remains unchanged, it is determined to be an embedded defect.
[0006] Preferably, the multidimensional image data acquisition process includes: acquiring pulse interval data output by the encoder; taking the average value of multiple consecutive pulse intervals using a sliding window to obtain the current motion speed; calculating the spatial offset of each frame image relative to the reference frame based on the time difference between the current motion speed and the acquisition time of each frame image; converting the spatial offset into pixel offsets; resampling non-integer pixel offsets using an interpolation kernel function to obtain aligned frame images; organizing the aligned multi-frame images into a three-dimensional data structure according to the acquisition order, and outputting the multidimensional image data.
[0007] Preferably, the normal vector field and albedo field of each pixel are calculated, specifically including: The grayscale values of the same pixel position in different frames are extracted from the multidimensional image data to construct the multidimensional grayscale vector of the pixel. Based on the preset light source direction matrix, the multidimensional grayscale vector is solved to obtain an intermediate vector containing the product of the normal vector component and the albedo. The intermediate vector is normalized to separate the unit normal vector and the albedo scalar value. The calculation is completed by traversing all pixels to construct the normal vector field and the albedo field respectively.
[0008] Preferably, classification is based on the difference in the distribution of Gaussian curvature and gradient magnitude in the feature space, specifically including: for each pixel position in the normal vector field, calculating the spatial partial derivative of the normal vector in the neighborhood, and constructing a shape operator matrix; solving the eigenvalues of the shape operator matrix to obtain two principal curvature values, and multiplying the two principal curvature values to obtain the Gaussian curvature of the pixel; The gradient components in the horizontal and vertical directions are calculated using a difference operator on the albedo field, and the magnitude of the gradient components is taken as the gradient magnitude of the albedo. The global distribution characteristics of Gaussian curvature and gradient magnitude in the current image are statistically analyzed, and their respective standard deviations are calculated as noise level references. Based on the noise level references, curvature thresholds and gradient thresholds are set, and pixels whose albedo gradient magnitude exceeds the gradient threshold and whose Gaussian curvature is lower than the curvature threshold are marked as pseudo-defects.
[0009] Preferably, the adaptive threshold decision specifically includes: reading the current angle value of the mechanical rotary encoder, discretizing the current angle value to a preset phase resolution to obtain the current phase index; establishing a dynamic background library with the phase index and horizontal pixel coordinates as two-dimensional indexes to store the historical grayscale average value of each phase position; for each row of the current image, reading the background reference value from the background array according to the corresponding phase index; and updating the dynamic background library by weighted fusion of the current observation value and the background reference value, wherein the weight of the current observation value is less than the weight of the historical value. The absolute value of the difference between the current observation value and the background reference value is calculated as the residual; the median and median absolute deviation of all residual values in the current frame are calculated, and a two-layer threshold decision condition is constructed by combining the standard deviation of the local neighborhood residuals; pixels whose residuals exceed the two-layer threshold are judged as non-periodic defects, and the rest are judged as periodic imprints and removed.
[0010] Preferably, the inter-process coordinate mapping is established based on the measured strain field, specifically including: Images of electrode edge markers are acquired in both the preceding and subsequent processes, and the center coordinates of the markers are identified. The coordinate difference of the same marker in the preceding and subsequent processes is calculated to obtain the longitudinal and lateral displacements of the marker positions. The longitudinal displacement is divided by the longitudinal coordinate in the preceding process to obtain the longitudinal strain value. The lateral displacement is divided by the lateral coordinate in the preceding process to obtain the lateral strain value. The discretely distributed marker strain values are interpolated using a surface fitting method to construct a continuous strain field covering the entire electrode surface. For the defect coordinates detected in the preceding process, their predicted coordinates in the subsequent process are calculated based on the strain values at their locations, and a spatial tolerance window is set as the search range.
[0011] Preferably, the embedded defect determination process specifically includes: in the preceding process, spatial integration of the Gaussian curvature of all pixels in the defect region is performed to obtain the preceding curvature integral value; spatial integration of the albedo gradient magnitude of all pixels in the defect region is performed to obtain the preceding albedo integral value; in the following process, Gaussian curvature field and albedo field are extracted based on the search range corresponding to the predicted coordinates, and the following curvature integral value and following albedo integral value are calculated respectively. If the preceding curvature integral value is greater than the background curvature noise level, it is confirmed that the defect in the preceding process is in a raised state. If the following conditions are met, it is confirmed that the surface in the following process tends to be flat. If the following conditions are met, it is confirmed that the defect in the preceding process is in a raised state. If the following conditions are met, it is confirmed that the surface in the following process tends to be flat. If the following conditions are met, it is confirmed that the material has not disappeared. When the three conditions of preceding bulge, subsequent flatness, and material retention are met at the same time, the defect is determined to be an embedded defect and marked with the highest risk level.
[0012] A lithium battery electrode surface defect detection system based on image recognition, comprising: The multi-frame image spatial alignment module is used to acquire multi-frame images of the electrode surface, calculate the inter-frame spatial offset based on motion parameters, align the multi-frame images to the same physical position, and output the aligned multi-dimensional image data. The true and false defect feature separation module is used to solve the normal vector field and albedo field of each pixel based on the multidimensional image data, calculate the Gaussian curvature of the normal vector field and the gradient magnitude of the albedo field, classify according to the difference in the distribution of Gaussian curvature and gradient magnitude in the feature space, mark the high gradient and low curvature region as the false defect generation mask, and output the true defect candidate region and its normal vector data. The periodic noise elimination module is used to establish a mapping between mechanical phase and image coordinates. Based on the true defect candidate region, a dynamic background library is constructed using a weighted moving average. The residual is calculated and judged by an adaptive threshold. After removing periodic imprints, a list of net defect coordinates is output. The cross-process evolution tracking module is used to establish inter-process coordinate mapping based on the measured strain field, obtain the defect location of the data in the net defect coordinate list, extract the Gaussian curvature integral value and albedo integral value, and determine the embedded defect when the curvature integral decreases and the albedo integral remains unchanged.
[0013] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention acquires multiple frames of images of the electrode surface and introduces an inter-frame spatial offset calculation based on motion parameters and a sub-pixel level interpolation alignment mechanism. This accurately maps images acquired at different times to the same physical location, effectively eliminating displacement errors and deformation interference caused by continuous electrode movement. Based on this, multi-dimensional image data is constructed, enabling the same pixel to form a stable observation set across multiple frames, thereby significantly improving the accuracy of solving the normal vector field and albedo field. This invention can stably characterize minute geometric undulations and subtle brightness changes on the electrode surface, exhibiting higher detection sensitivity and spatial consistency for early defects such as pinholes and micro-protrusions.
[0014] 2. This invention, for the first time, introduces the Gaussian curvature of the normal vector field and the gradient magnitude of the albedo field into a unified feature space for joint discrimination. By analyzing the differences in the statistical distribution of these two types of features, it effectively distinguishes between genuine defects on the electrode surface and false defects such as process textures and coating marks. It utilizes a combination of "high gradient, low curvature" features to mask and mark false defects, reducing the entry of false alarm regions at the source. With clear physical meaning and stable statistical criteria, it can significantly reduce the false detection rate under complex lighting and surface texture conditions, improving the reliability and interpretability of the detection results.
[0015] 3. This invention establishes a precise correspondence between defects in preceding and subsequent processes by introducing an inter-process coordinate mapping mechanism based on measured strain fields, overcoming the limitation of existing technologies that restrict defect judgment to a single process. By combining comparative analysis of Gaussian curvature integrals and albedo integrals, the evolutionary characteristics of defects are characterized from two dimensions: geometric morphology changes and material retention. This allows for accurate identification of embedded defects where the surface tends to be flat but material remains. This invention can mark these defects as high-risk, providing a reliable basis for quality traceability and process optimization. Attached Figure Description
[0016] Figure 1 A schematic diagram of the process for detecting surface defects of lithium battery electrode sheets based on image recognition, provided by the present invention; Figure 2 A schematic diagram of a lithium battery electrode surface defect detection system based on image recognition provided by the present invention; Figure 3 This is a schematic diagram illustrating the process for determining embedded defects provided by the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention.
[0018] Example 1:
[0019] Please see Figures 1 to 2This invention provides an image recognition-based method for detecting surface defects on lithium-ion battery electrodes, applied to an image recognition-based lithium-ion battery electrode surface defect detection system. The image recognition-based lithium-ion battery electrode surface defect detection system includes a multi-frame image spatial alignment module, a genuine / fake defect feature separation module, a periodic noise elimination module, and a cross-process evolution tracking module. The technical solution is as follows: Multiple frames of images of the electrode surface are acquired; the inter-frame spatial offset is calculated based on motion parameters; the multiple frames are aligned to the same physical position; and the aligned multi-dimensional image data is output. Based on the multi-dimensional image data, the normal vector field and albedo field of each pixel are calculated; and the Gaussian curvature and reflectance of the normal vector field are calculated. The gradient magnitude of the illumination field is classified according to the difference in distribution between Gaussian curvature and gradient magnitude in the feature space. High gradient and low curvature regions are marked as pseudo-defect generation masks, and candidate regions for true defects and normal vector data are output. A mapping between mechanical phase and image coordinates is established. Based on the candidate regions for true defects, a dynamic background library is constructed using a weighted moving average. The residual is calculated and judged by an adaptive threshold. After removing periodic imprints, a list of net defect coordinates is output. An inter-process coordinate mapping is established based on the measured strain field. The defect positions of the data in the list of net defect coordinates are obtained. The integral values of Gaussian curvature and albedo are extracted. When the integral of curvature decreases and the integral of albedo remains unchanged, it is determined to be an embedded defect.
[0020] Furthermore, the multidimensional image data acquisition process includes: acquiring pulse interval data output by the encoder, taking the average value of multiple consecutive pulse intervals using a sliding window to obtain the current motion speed; calculating the spatial offset of each frame image relative to the reference frame based on the time difference between the current motion speed and the acquisition time of each frame image; converting the spatial offset into pixel offsets, resampling the non-integer pixel offsets using an interpolation kernel function to obtain aligned frame images; organizing the aligned multi-frame images into a three-dimensional data structure according to the acquisition order, and outputting the multidimensional image data.
[0021] Specifically, during the high-speed movement of the electrode, the image acquisition system acquires multiple frames of images of the electrode surface at a fixed frequency. Because the electrode is in continuous motion, there are spatial positional deviations between the frames, requiring precise alignment.
[0022] The image acquisition system establishes a communication connection with the production line encoder, acquiring the pulse interval data output by the encoder in real time. A sliding window averaging method is used to smooth five to ten consecutive pulse intervals to obtain an estimate of the motion velocity at the current moment. The preferred length of the sliding window is seven pulse intervals, which ensures both accuracy in velocity estimation and good response speed. After acquiring the current motion velocity, the spatial offset of each image frame relative to the reference frame is calculated based on the time difference between the acquisition time of each frame and the acquisition time of the reference frame. The spatial offset is equal to the product of the motion velocity and the time difference. The spatial offset is divided by the physical pixel size of the image sensor to obtain the offset in pixels.
[0023] Since the calculated pixel offsets are usually non-integer values, a bicubic interpolation kernel is used to resample the image at the sub-pixel level. For each target pixel position, a weighted interpolation calculation is performed within a four-by-four neighborhood of the surrounding two pixels, based on its corresponding non-integer coordinates in the original image. After completing the alignment processing of each frame, the aligned multi-frame images are organized into a three-dimensional data structure according to the acquisition order, and multi-dimensional image data is output.
[0024] Furthermore, the normal vector field and albedo field of each pixel are calculated, specifically including: The grayscale values of the same pixel position in different frames are extracted from the multidimensional image data to construct the multidimensional grayscale vector of the pixel. Based on the preset light source direction matrix, the multidimensional grayscale vector is solved to obtain an intermediate vector containing the product of the normal vector component and the albedo. The intermediate vector is normalized to separate the unit normal vector and the albedo scalar value. The calculation is completed by traversing all pixels to construct the normal vector field and the albedo field respectively.
[0025] Specifically, based on the aligned multidimensional image data, the normal vector and albedo are calculated for each pixel location. In this embodiment, multiple frames of images correspond to different incident angles of illumination conditions, and the solution is obtained by utilizing the relationship between surface reflection characteristics and illumination direction. For each pixel location in the image, the grayscale value of that location in different frames is extracted from the multidimensional image data to construct the multidimensional grayscale vector of that pixel. The dimension of the grayscale vector is equal to the number of image frames, and each component corresponds to a grayscale observation value under a certain illumination condition.
[0026] According to the Lambertian reflection model, the gray value of a point on a surface under specific lighting conditions is equal to the product of the albedo of that point and the dot product of the light source direction vector and the surface normal vector. Based on a pre-calibrated light source direction matrix, a system of linear equations is established between the gray value vector, the normal vector, and the albedo. Each row of the light source direction matrix corresponds to the three-dimensional direction vector of a light source, and the number of rows in the matrix equals the number of light sources. Through matrix solving operations, an intermediate vector containing the product of each component of the normal vector and the albedo is obtained. The three components of this intermediate vector correspond to the products of the three direction components of the normal vector and the albedo, respectively. The magnitude of the intermediate vector is calculated, which is the albedo value of that pixel. Dividing the intermediate vector by its magnitude yields the normalized unit normal vector.
[0027] The above calculation process is performed on each pixel in the image, traversing all pixel positions to finally construct a normal vector field and an albedo field covering the entire image area. Each element in the normal vector field is a three-dimensional unit vector, representing the surface orientation at the corresponding position. Each element in the albedo field is a scalar value, representing the surface reflectivity at the corresponding position.
[0028] Furthermore, classification is performed based on the difference in the distribution of Gaussian curvature and gradient magnitude in the feature space. Specifically, this includes: calculating the spatial partial derivative of the normal vector in the neighborhood for each pixel position in the normal vector field, and constructing a shape operator matrix; solving for the eigenvalues of the shape operator matrix to obtain two principal curvature values, and multiplying the two principal curvature values to obtain the Gaussian curvature of the pixel. The gradient components in the horizontal and vertical directions are calculated using a difference operator on the albedo field, and the magnitude of the gradient components is taken as the gradient magnitude of the albedo. The global distribution characteristics of Gaussian curvature and gradient magnitude in the current image are statistically analyzed, and their respective standard deviations are calculated as noise level references. Based on the noise level references, curvature thresholds and gradient thresholds are set, and pixels whose albedo gradient magnitude exceeds the gradient threshold and whose Gaussian curvature is lower than the curvature threshold are marked as pseudo-defects.
[0029] Specifically, after obtaining the normal vector field and albedo field, the separation of true and false defects is achieved by calculating the Gaussian curvature and albedo gradient and the difference in their distribution in the feature space. For each pixel position in the normal vector field, the spatial rate of change of the normal vector is calculated within a five-by-five neighborhood centered on that pixel. The central difference method is used to calculate the partial derivatives of the normal vector along the horizontal and vertical directions respectively. The partial derivative in the horizontal direction is equal to half the difference between the normal vector of the right neighboring pixel and the normal vector of the left neighboring pixel. The partial derivative in the vertical direction is equal to half the difference between the normal vector of the lower neighboring pixel and the normal vector of the upper neighboring pixel.
[0030] Based on the partial derivatives of the normal vector, a shape operator matrix is constructed. The shape operator matrix is a second-order square matrix whose elements are composed of the dot product of the partial derivatives of the normal vector and the surface tangent vector. By solving the eigenvalues of the shape operator matrix, the two principal curvature values of the point are obtained. The two principal curvature values represent the degree of curvature of the surface along the two principal directions. Multiplying the two principal curvature values, the Gaussian curvature at the pixel position is obtained. A positive Gaussian curvature indicates that the surface is elliptical, a negative value indicates that the surface is saddle-shaped, and zero indicates that the surface is planar or cylindrical.
[0031] For the albedo field, the gradient at each pixel position is calculated using a difference operator; the horizontal gradient component and the vertical gradient component are calculated separately. The horizontal gradient component is equal to the difference in albedo values between adjacent column pixels, and the vertical gradient component is equal to the difference in albedo values between adjacent row pixels; the square root of the sum of the squares of the two gradient components is used to obtain the albedo gradient magnitude at that position.
[0032] To accommodate the differences in surface characteristics between different batches of electrodes, an adaptive threshold determination method is adopted. The distribution of Gaussian curvature values for all pixels in the current image is statistically analyzed, and its standard deviation is calculated as a measure of curvature noise level. Similarly, the distribution of albedo gradient values is statistically analyzed, and its standard deviation is calculated as a measure of gradient noise level. The curvature threshold is set to 2.5 to 3.5 times the curvature noise level, preferably three times, and the gradient threshold is set to 2.5 to 3.5 times the gradient noise level, preferably three times. Smaller multipliers result in higher detection sensitivity but a slightly increased false detection rate, while larger multipliers result in a lower false detection rate but may miss some minor defects. In industrial applications, three times is recommended as the standard configuration.
[0033] Based on a defined threshold, each pixel is classified. If the albedo gradient magnitude of a pixel exceeds the gradient threshold and the absolute value of its Gaussian curvature is lower than the curvature threshold, it is classified as a pseudo-defect. This type of pixel corresponds to areas such as planar stains and color differences that only change the surface reflectivity without altering the geometric shape. If the absolute value of a pixel's Gaussian curvature exceeds the curvature threshold, it is classified as a true defect candidate. This type of pixel corresponds to areas such as pits and scratches that have geometric deformation. A pseudo-defect mask image is generated, and pseudo-defect regions are marked as suppressed, while true defect candidate regions are marked as retained for subsequent processing.
[0034] Furthermore, the adaptive threshold decision specifically includes: reading the current angle value of the mechanical rotary encoder, discretizing the current angle value to a preset phase resolution to obtain the current phase index; establishing a dynamic background library with the phase index and horizontal pixel coordinates as two-dimensional indexes to store the historical grayscale average value of each phase position; for each row of the current image, reading the background reference value from the background array according to the corresponding phase index; and weighting and fusing the current observation value and the background reference value to update the dynamic background library, wherein the weight of the current observation value is less than the weight of the historical value. The absolute value of the difference between the current observation value and the background reference value is calculated as the residual; the median and median absolute deviation of all residual values in the current frame are calculated, and a two-layer threshold decision condition is constructed by combining the standard deviation of the local neighborhood residuals; pixels whose residuals exceed the two-layer threshold are judged as non-periodic defects, and the rest are judged as periodic imprints and removed.
[0035] Specifically, in the rolling process, minute defects on the roller surface will leave periodic marks on the electrode, forming background noise that interferes with detection. This embodiment establishes a mapping relationship between mechanical phase and image coordinates and uses a dynamic background library to achieve accurate removal of periodic noise.
[0036] The production line is equipped with a rotary encoder installed on the end of the roller shaft, which outputs the current rotation angle of the roller in real time; the image acquisition system establishes a synchronization mechanism with the rotary encoder, and records the corresponding roller phase angle synchronously when acquiring each line of images; the phase angle is converted into a phase index after discretization, and the resolution of the discretization is determined according to the detection accuracy requirements.
[0037] A two-dimensional background array is established, with the phase index as the first dimension index and the horizontal pixel coordinate of the image as the second dimension index. Each element in the background array stores the historical grayscale average value of the corresponding phase position and horizontal position, which represents the stable background features of that position during multiple roller rotations.
[0038] During the detection process, for each currently acquired image row, its phase index is first determined based on the synchronously recorded roller phase angle. Then, the background reference row corresponding to that phase index is read from the background array. The current observation row is compared with the background reference row, and the absolute value of the difference pixel by pixel is calculated as the residual.
[0039] A weighted fusion method is used to update the background array. The weight of the current observation is alpha, and the weight of the historical background value is one minus alpha. The preferred alpha value is between 0.02 and 0.1, with a recommended value of 0.05. The new background value is equal to 0.05 multiplied by the current observation plus 0.95 multiplied by the original background value. This design allows the background array to slowly adapt to gradual changes in the roller surface while remaining insensitive to sudden defects. When a roller replacement event is detected, the alpha can be temporarily increased to 0.2, and then restored to 0.05 after 50 to 100 frames to accelerate background reconstruction.
[0040] After residual calculation, a two-layer adaptive threshold is used for decision-making; at the global level, the median of all residual values in the current frame is calculated, and the absolute deviation of the median is used as a robust estimate of the global noise level; at the local level, the 5-bit threshold of each pixel is calculated. The standard deviation of the residuals within a neighborhood is used as the local noise level; the final threshold is the larger of the global median plus three times the absolute deviation of the median and the local median plus 2.5 times the local standard deviation.
[0041] Pixels with residual values exceeding the threshold are judged as non-periodic defects, which do not conform to the periodicity of roller imprints and belong to defects of the electrode itself; pixels with residual values below the threshold are judged as periodic imprints and are removed; after periodic noise elimination, a net defect coordinate list is output, which contains the position information of all pixels judged as real defects.
[0042] Furthermore, an inter-process coordinate mapping is established based on the measured strain field, specifically including: Images of electrode edge markers are acquired in both the preceding and subsequent processes, and the center coordinates of the markers are identified. The coordinate difference of the same marker in the preceding and subsequent processes is calculated to obtain the longitudinal and lateral displacements of the marker positions. The longitudinal displacement is divided by the longitudinal coordinate in the preceding process to obtain the longitudinal strain value. The lateral displacement is divided by the lateral coordinate in the preceding process to obtain the lateral strain value. The discretely distributed marker strain values are interpolated using a surface fitting method to construct a continuous strain field covering the entire electrode surface. For the defect coordinates detected in the preceding process, their predicted coordinates in the subsequent process are calculated based on the strain values at their locations, and a spatial tolerance window is set as the search range.
[0043] Since the marker points are discretely distributed, a continuous strain field needs to be constructed using interpolation methods. This embodiment employs a thin-plate spline interpolation method, which constructs a smooth surface by minimizing the bending energy of the surface. The smoothing parameter in the fitting process is preferably set between 0.01 and 0.05, with a recommended value of 0.01. After fitting, the strain field covers the entire surface of the electrode, and natural boundary conditions are used at the edges to avoid unreasonable bending at the boundaries.
[0044] For each defect detected in the preceding process, the strain value at the corresponding location in the strain field is retrieved based on its coordinates in the preceding process. The coordinates of the preceding process are multiplied by the strain value to obtain the predicted coordinates of the defect in the subsequent process. Considering the errors in strain measurement and interpolation, a search window of ±20 to ±40 pixels is set with the predicted coordinates as the center, preferably ±30 pixels. The corresponding defect is searched for within this window in the image of the subsequent process.
[0045] Furthermore, the process for determining embedded defects refers to... Figure 3Specifically, this includes: in the preceding process, spatially integrating the Gaussian curvature of all pixels within the defect region to obtain the preceding curvature integral value; spatially integrating the albedo gradient magnitude of all pixels within the defect region to obtain the preceding albedo integral value; and in the subsequent process, extracting the Gaussian curvature field and albedo field within the search range corresponding to the predicted coordinates, and calculating the subsequent curvature integral value and the subsequent albedo integral value respectively. If the preceding curvature integral value is greater than the background curvature noise level, it is confirmed that the defect in the preceding process is in a raised state. If the following conditions are met, it is confirmed that the surface in the following process tends to be flat. If the following conditions are met, it is confirmed that the defect in the preceding process is in a raised state. If the following conditions are met, it is confirmed that the surface in the following process tends to be flat. If the following conditions are met, it is confirmed that the material has not disappeared. When the three conditions of preceding bulge, subsequent flatness, and material retention are met at the same time, the defect is determined to be an embedded defect and marked with the highest risk level.
[0046] Specifically, after coordinate mapping is completed, the topological features of the same defect in the preceding and following processes are compared and analyzed. In the preceding process, within a circular area with the defect center as the center and a radius of fifteen to thirty pixels, the absolute values of the Gaussian curvature of all pixels are spatially integrated and accumulated to obtain the preceding curvature integral value, which characterizes the overall concavity and convexity of the defect area. At the same time, the albedo values of all pixels in the defect area are spatially integrated to obtain the preceding albedo integral value, which characterizes the total reflected energy of the defect area.
[0047] In subsequent processes, Gaussian curvature field and albedo field data are extracted from the search window corresponding to the predicted coordinates, and the subsequent curvature integral value and subsequent albedo integral value are calculated using the same integration method.
[0048] Embedded defects are determined based on the curvature integral value and albedo integral value of the preceding and following processes; the determination logic includes a joint judgment of three conditions: First, determine whether the integral value of the preceding curvature is greater than twice the curvature noise level of the background region. The background curvature noise level is obtained by selecting a normal region with an area of not less than 200 by 200 pixels in the image and calculating the average of the absolute values of the Gaussian curvature of all pixels within that region. If the integral value of the preceding curvature is greater than twice the background noise level multiplied by the number of pixels in the defect region, it indicates that the defect exhibits a convex shape in the preceding process. Second, determine whether the subsequent curvature integral value is less than 1.2 times the background curvature noise level multiplied by the number of pixels in the subsequent region. If this condition is met, it indicates that the surface at this location tends to be flat in subsequent processes, and the original protrusion features disappear. Here, the 1.2 multiplier allows for a 20% measurement error. Third, determine whether the ratio of the subsequent albedo integral value to the preceding albedo integral value is not less than 0.7. This threshold is set between 0.7 and 0.9, with a recommended value of 0.8. If the ratio is greater than this threshold, it indicates that the total amount of material in the defect area is basically maintained, and no shedding or disappearance has occurred.
[0049] When all three conditions above are met, the defect is determined to be an embedded defect. The physical meaning of an embedded defect is that foreign particles that originally protrude from the surface of the electrode are pressed into the interior of the electrode during the rolling process. The surface appears flat, but there are foreign particles remaining inside. This type of defect may puncture the separator and cause an internal short circuit during battery use. It is a high-risk defect type. The system marks it as the highest risk level and generates a special alarm.
[0050] If only the first and second conditions are met, but the third condition is not met (i.e., the total amount of material is significantly reduced), it is judged as a detachment type defect, indicating that the original foreign matter has detached from the electrode surface during the rolling process, and the risk level is low. If the second condition is not met (i.e., the raised feature is still maintained in subsequent processes), it is judged as a surface residue type defect, and the risk needs to be assessed based on the degree of protrusion.
[0051] This invention achieves high-precision, low-false-detection detection of surface defects on lithium-ion battery electrodes by introducing sub-pixel-level alignment of multi-frame images, joint modeling of surface geometry and reflection characteristics, and cross-process defect evolution analysis. Overall, under high-speed continuous electrode movement conditions, the system utilizes production line encoders to acquire motion parameters and performs precise spatial alignment of multi-frame images, significantly improving the consistency of pixel-level observations and laying a reliable foundation for subsequent 3D feature calculation. Based on this, by solving the algorithm vector field and albedo field, and introducing a combination of physical features of Gaussian curvature and albedo gradient, it effectively distinguishes between geometrically deformed defects and pseudo-defects that only cause grayscale changes, reducing false detections caused by coating textures, stains, and uneven illumination. Furthermore, a dynamic background library is constructed by combining mechanical phase information, and an adaptive threshold is used to remove periodic imprint interference during the rolling process, making the output defect results purer and more stable. At the process level, this invention achieves precise tracking of defects between preceding and subsequent processes through coordinate mapping based on measured strain fields. Furthermore, by comparing curvature integrals with albedo integrals, it accurately identifies embedded high-risk defects that are "flattened but not eliminated" by rolling. The overall solution balances physical interpretability, testing stability, and engineering applicability, significantly improving the reliability and safety assurance capabilities of lithium battery electrode quality inspection.
[0052] Example 2:
[0053] This embodiment first acquires multiple frames of images of the electrode surface, calculates the current motion speed based on the pulse interval data output by the encoder, and then determines the spatial offset of each frame of image relative to the reference frame. The non-integer pixel offsets are resampled by a bicubic interpolation kernel function to complete the sub-pixel level spatial alignment of the multiple frames of images and output multi-dimensional image data.
[0054] Based on multidimensional image data, using the Lambertian reflection model and a preset light source direction matrix, the multidimensional grayscale vectors of each pixel are solved and normalized to obtain the normal vector field and albedo field. Spatial partial derivatives are calculated for the normal vector field, and a shape operator matrix is constructed. The principal curvature is obtained by solving for the eigenvalues, and then the Gaussian curvature is calculated. The gradient magnitude is calculated for the albedo field using a difference operator. An adaptive threshold is determined by statistically analyzing global distribution characteristics. Regions with high gradients and low curvature are marked as pseudo-defects, and candidate regions for true defects are output.
[0055] A mapping relationship between mechanical phase and image coordinates is established. A dynamic background library is constructed using weighted moving average. Periodic imprints are removed through a two-layer adaptive threshold decision, and a list of net defect coordinates is output. An inter-process coordinate mapping is established based on the measured strain field. Embedded defects are determined through comparative analysis of curvature integral and albedo integral.
[0056] After separating genuine and fake defects, morphological subdivision is performed on candidate pixels identified as genuine defects. In actual production, concave and convex defects have different causes and different impacts on battery performance, requiring different treatment.
[0057] Therefore, after marking pixels with albedo gradients exceeding a gradient threshold and Gaussian curvatures below a curvature threshold as pseudo-defects, the method further includes the following steps: For true defect candidate pixels whose Gaussian curvature exceeds the curvature threshold, calculate their average curvature, which is the arithmetic mean of two principal curvature values; Defect morphology is classified based on the combination of Gaussian curvature sign and mean curvature sign. When the Gaussian curvature is positive and the mean curvature is negative, the pixel is determined to be a concave defect; when the Gaussian curvature is positive and the mean curvature is positive, the pixel is determined to be a convex defect. The number of pixels for concave and convex defects is counted separately, and a defect morphology distribution report is generated.
[0058] For a true defect candidate pixel whose Gaussian curvature exceeds the curvature threshold, the average curvature of the pixel is calculated based on the two principal curvature values already obtained. The average curvature is equal to the arithmetic mean of the two principal curvature values, that is, the sum of the first and second principal curvatures divided by two. The physical meaning of the average curvature is to characterize the overall bending tendency of the surface relative to the normal vector direction, and its sign indicates the concavity or convexity orientation of the surface.
[0059] Based on the combined relationship between the signs of Gaussian curvature and average curvature, morphological classification is performed on candidate pixels for true defects. When the Gaussian curvature of a pixel is positive, it indicates that the two principal curvatures at that location have the same sign, and the surface is elliptical. Furthermore, if the average curvature is negative, it means that both principal curvatures are negative, and the surface bends in the opposite direction to the normal vector, i.e., the surface is concave relative to the surrounding area, classifying the pixel as a recessed defect. Recessed defects typically correspond to surface pits formed by pinholes, pores, or particle detachment. If the average curvature is positive, it means that both principal curvatures are positive, and the surface bends in the direction of the normal vector, i.e., the surface is convex relative to the surrounding area, classifying the pixel as a convex defect. Convex defects typically correspond to surface protrusions formed by foreign particle adhesion or coating accumulation.
[0060] After traversing all candidate pixels for true defects to complete morphological classification, the number of concave and convex defect pixels is counted separately, and the proportion of each type to the total number of defect pixels is calculated, generating a defect morphology distribution report. This report records the quantity and spatial distribution of concave and convex defects in the current inspection batch, providing data support for targeted adjustments to the production process.
[0061] The output of true defect candidate regions is pixel-level labeling, and these scattered pixel labels are difficult to use directly for defect counting and size evaluation. To transform the pixel-level detection results into region-level defect objects, connected component analysis is performed on the true defect candidate pixels. The specific steps include: Connectivity labeling is performed on pixels in the true defect candidate region. Neighborhood search is used to aggregate spatially adjacent defect pixels into independent defect regions, and a unique region identifier is assigned to each defect region. For each defective region, count the number of pixels it contains to get the region area, and trace the boundary pixels of the region to calculate the boundary length as the region perimeter. Calculate the compactness characteristic of each defect region, where compactness is the ratio of the square of the region's perimeter to the region's area; Set a minimum area threshold and an effective compactness range. Areas smaller than the minimum area threshold are identified as noise points and filtered out, while areas with compactness exceeding the effective range are identified as abnormal areas and marked.
[0062] A neighborhood search method is used to label connected components of true defect candidate pixels. Starting from the top left corner of the image, the image is scanned line by line. When an unlabeled true defect candidate pixel is encountered, it is used as a seed point to initiate a region growing process. The eight neighboring pixels of the seed point are checked. If a neighboring pixel is also a true defect candidate and has not yet been labeled, it is added to the current region, and the neighboring pixels of that pixel are checked again. This process is repeated until the current region no longer expands, and a unique region identifier is assigned to that region. The image is then scanned again to find the next unlabeled seed point until all true defect candidate pixels have been labeled. After connected component labeling, spatially adjacent defect pixels are aggregated into independent defect regions, each region corresponding to a potential independent defect.
[0063] Geometric features are extracted for each defect region, and the number of pixels contained in the region is counted. The actual area of the region is obtained by multiplying the number of pixels by the physical area per unit pixel. A boundary tracing method is used to determine the outer contour of the region. Starting from any pixel on the region boundary, adjacent boundary pixels are visited sequentially in a clockwise or counterclockwise direction, and the length of the boundary pixel sequence is recorded as the perimeter of the region. During boundary tracing, the connection methods for adjacent pixels are divided into horizontal and vertical connections and diagonal connections. The step size for horizontal and vertical connections is one pixel unit, and the step size for diagonal connections is one pixel unit multiplied by the square root of two. All step sizes are summed to obtain the perimeter value.
[0064] The compactness characteristic of a defect region is calculated based on its area and perimeter. Compactness is defined as the ratio of the square of the region's perimeter to its area. For a regularly shaped circular region, the compactness reaches its minimum value, approximately four times pi. The more irregular the shape and the more tortuous the boundary of the region, the greater the compactness. The compactness characteristic can be used to distinguish between regular, genuine defects and noise interference with irregular boundaries.
[0065] A minimum area threshold and an effective compactness range are set to filter defect areas. Areas smaller than the minimum area threshold are identified as noise points and filtered out. These areas are usually caused by sensor noise or isolated false detections during image processing and do not have actual defect significance. Areas with compactness exceeding the upper limit of the effective range are identified as abnormal areas and marked. The boundaries of these areas are too tortuous and may be caused by the merging of multiple adjacent but unconnected defects, requiring further manual verification. The defect areas retained after filtering are considered valid detection results and used for subsequent defect statistics and analysis.
[0066] Defects of varying geometric severity have different impacts on battery performance. Deep indentations may expose the current collector, while high protrusions may puncture the separator. To achieve a quantitative assessment of defect risk, the geometric severity of defects is characterized based on curvature integrals. The specific steps include: after generating the defect morphology distribution report, the following steps are also included: For regions identified as concave defects, the Gaussian curvature values are spatially integrated within the region, and the absolute value of the integration result is used as a measure of the concave depth. For regions identified as protruding defects, the Gaussian curvature values are spatially integrated within the region, and the integration result is used as a characterization of the protrusion height. The depth of the depression or the height of the protrusion is compared with a preset risk threshold. When the value exceeds the risk threshold, the corresponding defect area is marked as high-risk.
[0067] Specifically, for regions identified as concave defects, the Gaussian curvature values of all pixels within that region are spatially integrated. Since the Gaussian curvature of concave defects is positive and the principal curvature is negative, the curvature integral result is positive, and its magnitude is positively correlated with the depth and extent of the concave defect. The absolute value of the curvature integral result is used as a measure of the concave depth. A larger depth measure indicates a deeper or wider concave defect, and a more severe impact on the electrode quality.
[0068] For regions identified as protruding defects, spatial integration is performed on the Gaussian curvature values of all pixels within that region. Since the Gaussian curvature and principal curvature of a protruding defect are both positive, the curvature integral is positive, and this result is directly used as a measure of the protrusion height. A larger height measure indicates a higher or wider protrusion, and a higher risk of puncturing the diaphragm.
[0069] The depth of the dent or the height of the bulge is compared with a preset risk threshold. The risk threshold is determined based on product quality standards and historical defect data; different thresholds can be set for different product specifications. When the depth of the defect exceeds the risk threshold, the area is marked as high-risk, and the system generates a special alarm to alert operators to pay close attention. Areas with depths below the risk threshold are marked as low-risk and handled according to standard procedures.
[0070] Through the aforementioned risk quantification mechanism, the detection system can distinguish the severity of defects, prioritize the handling of high-risk defects, and improve the pertinence and efficiency of quality control.
[0071] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for detecting surface defects of lithium battery electrodes based on image recognition, characterized in that, include: Acquire multiple frames of images of the electrode surface, calculate the inter-frame spatial offset based on motion parameters, align the multiple frames of images to the same physical position, and output the aligned multidimensional image data. Based on the multidimensional image data, the normal vector field and albedo field of each pixel are calculated, the Gaussian curvature of the normal vector field and the gradient magnitude of the albedo field are calculated, and the distribution difference of the Gaussian curvature and gradient magnitude in the feature space is classified. The high gradient and low curvature regions are marked as pseudo-defect generation masks, and the real defect candidate regions and normal vector data are output. Establish a mapping between mechanical phase and image coordinates. Based on the true defect candidate region, construct a dynamic background library using a weighted moving average. Calculate the residual and make an adaptive threshold decision. After removing periodic imprints, output a list of net defect coordinates. The adaptive threshold decision specifically includes: reading the current angle value of the mechanical rotary encoder, discretizing the current angle value to a preset phase resolution to obtain the current phase index; establishing a dynamic background library with the phase index and horizontal pixel coordinates as two-dimensional indexes to store the historical grayscale average value of each phase position; for each row of the current image, reading the background reference value from the background array according to the corresponding phase index; and updating the dynamic background library by weighted fusion of the current observation value and the background reference value, wherein the weight of the current observation value is less than the weight of the historical value. The absolute value of the difference between the current observation value and the background reference value is calculated as the residual; the median and median absolute deviation of all residual values in the current frame are calculated, and combined with the standard deviation of the local neighborhood residuals, a two-layer threshold decision condition is constructed; pixels whose residuals exceed the two-layer threshold are judged as non-periodic defects, and the rest are judged as periodic imprints and removed. Based on the measured strain field, an inter-process coordinate mapping is established, the defect location of the data in the net defect coordinate list is obtained, and the Gaussian curvature integral value and albedo integral value are extracted. When the curvature integral decreases and the albedo integral remains unchanged, it is determined to be an embedded defect.
2. The method for detecting surface defects of lithium battery electrodes based on image recognition according to claim 1, characterized in that: The multidimensional image data acquisition process includes: acquiring pulse interval data output by the encoder; taking the average value of multiple consecutive pulse intervals using a sliding window to obtain the current motion speed; calculating the spatial offset of each frame image relative to the reference frame based on the time difference between the current motion speed and the acquisition time of each frame image; converting the spatial offset into pixel offsets; resampling non-integer pixel offsets using an interpolation kernel function to obtain aligned frame images; and organizing the aligned multi-frame images into a three-dimensional data structure according to the acquisition order to output the multidimensional image data.
3. The method for detecting surface defects of lithium battery electrodes based on image recognition according to claim 1, characterized in that: Solving for the normal vector field and albedo field of each pixel specifically includes: The grayscale values of the same pixel position in different frames are extracted from the multidimensional image data to construct the multidimensional grayscale vector of the pixel. Based on the preset light source direction matrix, the multidimensional grayscale vector is solved to obtain an intermediate vector containing the product of the normal vector component and the albedo. The intermediate vector is normalized to separate the unit normal vector and the albedo scalar value. The calculation is completed by traversing all pixels to construct the normal vector field and the albedo field respectively.
4. The method for detecting surface defects of lithium battery electrodes based on image recognition according to claim 1, characterized in that: The classification is based on the difference in the distribution of Gaussian curvature and gradient magnitude in the feature space. Specifically, it includes: calculating the spatial partial derivative of the normal vector in the neighborhood for each pixel position in the normal vector field, and constructing a shape operator matrix; solving the eigenvalues of the shape operator matrix to obtain two principal curvature values, and multiplying the two principal curvature values to obtain the Gaussian curvature of the pixel. The gradient components in the horizontal and vertical directions are calculated using a difference operator on the albedo field, and the magnitude of the gradient components is taken as the gradient magnitude of the albedo. The global distribution characteristics of Gaussian curvature and gradient magnitude in the current image are statistically analyzed, and their respective standard deviations are calculated as noise level references. Based on the noise level references, curvature thresholds and gradient thresholds are set, and pixels whose albedo gradient magnitude exceeds the gradient threshold and whose Gaussian curvature is lower than the curvature threshold are marked as pseudo-defects.
5. The method for detecting surface defects of lithium battery electrodes based on image recognition according to claim 1, characterized in that: Establishing inter-process coordinate mapping based on measured strain fields specifically includes: Images of electrode edge markers are acquired in both the preceding and subsequent processes, and the center coordinates of the markers are identified. The coordinate difference of the same marker in the preceding and subsequent processes is calculated to obtain the longitudinal and lateral displacements of the marker positions. The longitudinal displacement is divided by the longitudinal coordinate in the preceding process to obtain the longitudinal strain value. The lateral displacement is divided by the lateral coordinate in the preceding process to obtain the lateral strain value. The discretely distributed marker strain values are interpolated using a surface fitting method to construct a continuous strain field covering the entire electrode surface. For the defect coordinates detected in the preceding process, their predicted coordinates in the subsequent process are calculated based on the strain values at their locations, and a spatial tolerance window is set as the search range.
6. The method for detecting surface defects of lithium battery electrodes based on image recognition according to claim 1, characterized in that: The embedded defect determination process specifically includes: in the preceding process, spatial integration is performed on the Gaussian curvature of all pixels in the defect area to obtain the preceding curvature integral value; spatial integration is performed on the albedo gradient magnitude of all pixels in the defect area to obtain the preceding albedo integral value; in the following process, the Gaussian curvature field and albedo field are extracted based on the search range corresponding to the predicted coordinates, and the following curvature integral value and following albedo integral value are calculated respectively. If the preceding curvature integral value is greater than the background curvature noise level, it is confirmed that the defect in the preceding process is in a raised state. If the following conditions are met, it is confirmed that the surface in the following process tends to be flat. If the following conditions are met, it is confirmed that the defect in the preceding process is in a raised state. If the following conditions are met, it is confirmed that the surface in the following process tends to be flat. If the following conditions are met, it is confirmed that the material has not disappeared. When the three conditions of preceding bulge, subsequent flatness, and material retention are met at the same time, the defect is determined to be an embedded defect and marked with the highest risk level.
7. A lithium battery electrode surface defect detection system based on image recognition, characterized in that, A method for detecting surface defects of lithium battery electrode sheets based on image recognition as described in any one of claims 1-6, comprising: The multi-frame image spatial alignment module is used to acquire multi-frame images of the electrode surface, calculate the inter-frame spatial offset based on motion parameters, align the multi-frame images to the same physical position, and output the aligned multi-dimensional image data. The true and false defect feature separation module is used to solve the normal vector field and albedo field of each pixel based on the multidimensional image data, calculate the Gaussian curvature of the normal vector field and the gradient magnitude of the albedo field, classify according to the difference in the distribution of Gaussian curvature and gradient magnitude in the feature space, mark the high gradient and low curvature region as the false defect generation mask, and output the true defect candidate region and its normal vector data. The periodic noise elimination module is used to establish a mapping between mechanical phase and image coordinates. Based on the true defect candidate region, a dynamic background library is constructed using a weighted moving average. The residual is calculated and judged by an adaptive threshold. After removing periodic imprints, a list of net defect coordinates is output. The cross-process evolution tracking module is used to establish inter-process coordinate mapping based on the measured strain field, obtain the defect location of the data in the net defect coordinate list, extract the Gaussian curvature integral value and albedo integral value, and determine the embedded defect when the curvature integral decreases and the albedo integral remains unchanged.
Citation Information
Patent Citations
Appearance defect detection method, intelligent terminal and storage device
CN113870342A
Unsupervised three-dimensional face model reconstruction system and method
CN117975525A