A method for extracting and detecting adhesive in lithium batteries
By combining depth images and 2D images, the centerline of the lithium battery adhesive coating is extracted and 3D point cloud data is generated, which solves the problems of accuracy and efficiency in lithium battery adhesive coating inspection, and realizes accurate evaluation of adhesive quality and improvement of product yield.
Patent Information
- Application Number
- CN202511200737.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2045-08-26
AI Technical Summary
The coating process for lithium batteries presents challenges such as complex adhesive path morphology that makes accurate detection difficult, limitations of traditional detection methods, and the high computational complexity and susceptibility to interference in 3D detection technology. These issues result in low accuracy in adhesive path detection, affecting battery consistency and safety.
By combining depth and 2D images, 3D point cloud data is generated through image preprocessing, centerline extraction, topology analysis, multi-segment polyline approximation, and edge search to calculate the three-dimensional dimensions of the adhesive path, thereby achieving accurate extraction and detection of the adhesive path.
It improves the accuracy and efficiency of lithium battery adhesive testing, reduces data processing volume, ensures accurate assessment of adhesive quality, and improves product yield.
Smart Images

Figure CN120726039B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computers based on specific computational models, specifically to a method for extracting and detecting adhesive coatings from lithium batteries. Background Technology
[0002] As a key energy storage technology in the new energy era, the coating process in the production of lithium batteries directly determines the battery's sealing performance, structural strength, and waterproofing. This process uses automated equipment to precisely coat key components such as the battery casing, tabs, and cover plates with adhesive, and implements quality control with the help of visual inspection or sensor systems. However, due to multiple factors such as dynamic changes in adhesive viscosity, the precision of the coating equipment, and the influence of temperature and humidity environments, actual production still suffers from process defects such as adhesive path deviation, discontinuous adhesive layers, air bubbles trapped in the adhesive, and uneven adhesive thickness. These anomalies, if not corrected in real time, can lead to safety hazards such as electrolyte leakage, reduced battery cycle life, and even thermal runaway, becoming a bottleneck problem restricting the improvement of lithium battery consistency and large-scale manufacturing.
[0003] Currently, the main technical difficulties and challenges facing the testing of lithium battery coatings are as follows:
[0004] (1) The glue path is complex and difficult to detect accurately: The glue path has an irregular shape. Due to the influence of glue flow and equipment precision, its width, height and continuity are difficult to maintain. Existing detection methods are insufficient in accurately identifying three-dimensional contours.
[0005] (2) Traditional detection methods have limitations: Traditional detection mainly relies on industrial cameras combined with image processing technology. However, due to changes in glue color and transparency as well as the influence of lighting environment, traditional visual detection is ineffective when detecting low-contrast glue (such as transparent glue). Moreover, 2D image detection is difficult to accurately obtain glue thickness and volume information, which affects the detection accuracy.
[0006] (3) Application challenges of point cloud data or 3D detection technology: Although 3D sensors (such as laser profilometers, structured light, etc.) can provide three-dimensional information of adhesive path, data processing is complex, computation is large, and they are easily interfered with by surface reflection characteristics (such as highly reflective metal battery shells), making it difficult to extract adhesive path features and identify anomalies. Summary of the Invention
[0007] The purpose of this invention is to provide a method for extracting and detecting the adhesive used in lithium batteries, thereby overcoming the aforementioned problems in the prior art.
[0008] To achieve the objective, the present invention provides the following technical solution:
[0009] A method for extracting and detecting the adhesive coating of lithium batteries, comprising the following steps:
[0010] Step S1: Acquire depth and 2D images of the lithium battery under test;
[0011] Step S2: Preprocess the 2D image to extract the adhesive path;
[0012] Step S3: Extract the center line of the adhesive path using an image thinning algorithm;
[0013] Step S4: Analyze the topology of the centerline and extract its endpoints and nodes; where endpoints are the starting or ending points of the centerline; nodes are the points where the centerline branches or intersects.
[0014] Step S5: Using two adjacent points in the endpoints and nodes as breakpoints, divide the entire centerline into several segments according to the topological structure; use the depth-first search algorithm to extract the path of each segment of the centerline;
[0015] Step S6: Use multi-segment polyline approximation to approximate the path as several straight line segments;
[0016] Step S7: Perform equally spaced linear interpolation on several straight line segments of each path to generate several sampling points; assign a direction vector to each sampling point according to the direction of the straight line segment it is located on;
[0017] Step S8: Perform an edge search operation on each sampling point along the direction perpendicular to the direction vector to determine and extract the edge points of the adhesive path in the width direction;
[0018] Step S9: Convert the depth image into 3D point cloud data;
[0019] Step S10: Based on the coordinate information of the sampling points and their edge points, obtain the cross-sectional area of the adhesive path in the 3D point cloud data; based on the cross-sectional area, calculate the three-dimensional dimensions of the adhesive path.
[0020] Furthermore, it also includes step S11: based on the calculated three-dimensional dimensions, filtering out areas in the adhesive path that do not meet the requirements.
[0021] Further, step S2 specifically involves: converting the 2D image to grayscale to obtain a grayscale image; using a noise filtering algorithm to denoise the grayscale image, making the image smoother; employing image enhancement technology to improve the contrast between the adhesive path and the background, making the adhesive path features more obvious; using an edge detection algorithm to extract all coarsely selected areas of suspected adhesive paths in the 2D image; and filtering the coarsely selected areas based on preset parameters such as contour area and shape features, removing small areas or irregular redundant contours, thereby retaining selected areas that conform to the shape of the adhesive path, and using the selected areas as the final extracted adhesive path.
[0022] Furthermore, step S3 specifically involves: performing binarization on the extracted adhesive path to convert it into a binary image containing only foreground and background pixels; using a distance transform-based image thinning algorithm to perform thinning processing with the foreground and background information of the binary image, and gradually eliminating redundant pixels at the edge of the adhesive path through repeated iterations, ultimately obtaining a skeleton line with a single pixel width, which is the center line of the adhesive path.
[0023] Furthermore, step S4 specifically involves: analyzing the topological structure of the centerline using a chain code tracing method; starting from one end of the centerline, tracing pixel by pixel in a certain direction, recording the direction and changes of the centerline; during the tracing process, when the starting or ending point of the centerline is encountered, it is marked as an endpoint; when the centerline forks or intersects, it is marked as a node; simultaneously, using a corner detection algorithm in image processing, corner detection is performed on the centerline to further determine the positions of endpoints and nodes, thereby establishing a topological model of the centerline, providing a basis for subsequent extraction of the centerline segments and paths.
[0024] Furthermore, step S5 specifically involves: for each centerline segment, using a depth-first search algorithm, starting from the beginning of the centerline segment, gradually traversing and recording the coordinates of all pixels on the centerline segment along its extension direction to form a continuous path sequence, thereby completely extracting the path of each centerline segment and preparing for subsequent geometric analysis and feature extraction of the path.
[0025] Furthermore, step S7 specifically involves: setting an equal-interval interpolation distance, performing linear interpolation sequentially along the straight segments of each path according to the set interval distance, generating a series of uniformly distributed sampling points; for each sampling point, calculating the direction vector of the straight segment based on the coordinates of the start and end points of the straight segment it is located on, and assigning this direction vector to the sampling point.
[0026] Furthermore, step S8 specifically involves: extending a certain distance to both sides of the sampling point along the direction perpendicular to the direction vector to form a search area; performing edge detection pixel by pixel within the search area; and when an edge is detected, recording the position coordinates of the edge and determining it as the edge point of the adhesive path in the vertical direction at that sampling point, providing key data for subsequent calculation of the three-dimensional size parameters of the adhesive path.
[0027] Further, step S10 specifically involves: determining the corresponding point cloud position in the 3D point cloud data in step S9 based on the coordinates of the edge points extracted in step S8; taking the edge points as boundaries, and along the width direction of the adhesive path (i.e., the vertical direction of the sampling point), extracting a cross-sectional area in the 3D point cloud data, which contains all the 3D point cloud data of the adhesive path between the sampling point and its two side edge points; and calculating the three-dimensional dimensions of the adhesive path at the cross-sectional area by analyzing and fitting the point cloud data within the cross-sectional area.
[0028] Compared with the prior art, the present invention has the following advantages:
[0029] This invention innovatively proposes to extract the centerline of the adhesive path using 2D images, and construct the path by segmenting it. It uses multi-segment polylines to approximate straight line segments, extracts edge points through equal-interval interpolation and edge search, and then uses the coordinates of the edge points to extract the cross-sectional area from the point cloud data of the depth image. Finally, it calculates the three-dimensional dimensions of the adhesive path. This greatly reduces the amount of data processing while ensuring the accuracy of adhesive path extraction, enabling precise evaluation of adhesive coating quality.
[0030] As can be seen, this invention, based on computer vision technology and combined with 3D point cloud data, can more flexibly extract and measure the glue path after dispensing in the lithium battery industry's glue coating scenario. Compared with manual visual inspection methods, it greatly improves the efficiency and accuracy of defect detection and increases the product yield. Attached Figure Description
[0031] Figure 1 This is a flowchart of the present invention.
[0032] Figure 2 The images show the original dispensing pattern (a) and the extracted adhesive path pattern (b).
[0033] Figure 3 The auxiliary visualization result (g) based on the search edge points based on the red line and the local magnified view (h) of part A are shown.
[0034] Figure 4 This is a flowchart of the process of converting a depth image into 3D point cloud data in this invention. Detailed Implementation
[0035] Specific embodiments of the present invention will now be described with reference to the accompanying drawings. Many details are described below to provide a comprehensive understanding of the invention; however, those skilled in the art will be able to implement the invention without these details.
[0036] like Figure 1 As shown, a method for extracting and detecting adhesive in lithium battery coatings includes the following steps:
[0037] Step S1: Acquire depth and 2D images of the lithium battery under test.
[0038] Specifically, depth images are images containing three-dimensional spatial information. Since adhesive paths primarily exhibit two types of features in their morphological representation: one is geometric continuity features, including physical parameters such as the length, width, height, and cross-sectional area of the adhesive path, which need to be obtained through 3D point cloud data; the other is structural integrity features, including positional deviations and adhesive breaks in the adhesive path, which are more intuitively represented in 2D images. Therefore, to comprehensively acquire adhesive path information, both depth images and 2D images are collected. The depth images are used to calculate the dimensional parameters of the adhesive path, while the 2D images are used to assist in identifying positional deviations and adhesive breakage states.
[0039] Step S2: Preprocess the 2D image to extract the adhesive path.
[0040] Specifically, considering that the original image may contain interference information such as background, noise, and device structure, preprocessing of the acquired 2D image is necessary to ensure detection accuracy. Specifically:
[0041] First, the 2D image is converted to grayscale, such as... Figure 2 The original dispensing pattern (a) is shown, reducing the amount of data and computational complexity.
[0042] Then, noise filtering algorithms, such as Gaussian filtering and median filtering, are used to denoise the grayscale image, making the image smoother.
[0043] Next, image enhancement techniques, such as histogram equalization and contrast-limited adaptive histogram equalization, are used to improve the contrast between the adhesive path and the background in the image, making the adhesive path features more obvious.
[0044] Next, edge detection algorithms, such as Canny edge detection or Sobel edge detection, are used to extract coarsely selected regions of all suspected adhesive paths in the 2D image.
[0045] Finally, based on preset parameters such as contour area and shape features, the coarsely selected area is filtered to remove small areas or irregular redundant contours. For example, an area threshold is set, and contours with areas smaller than this threshold are identified as small redundant contours and discarded. Simultaneously, shape feature parameters, such as contour perimeter, area, aspect ratio, and roundness, are compared with preset adhesive path shape feature standards to remove irregular contours that do not conform to the adhesive path morphology. This retains a selected area that conforms to the adhesive path morphology, which is then used as the final extracted adhesive path. Figure 2 The adhesive path extraction diagram (b) is shown, providing accurate adhesive path image data for subsequent feature extraction and analysis.
[0046] Step S3: Use an image thinning algorithm to extract the center line of the adhesive path.
[0047] Specifically, based on the image thinning algorithm, by continuously eroding the foreground pixels in the image while maintaining the topological structure of the object, a skeleton line (i.e., the center line) with a single pixel width is finally obtained. The specific operation is as follows:
[0048] First, the extracted adhesive path is binarized to convert it into a binary image containing only foreground and background pixels.
[0049] Then, image thinning algorithms based on distance transform, such as the Zhang-Suen algorithm, are used to thin the image using foreground and background information, removing redundant pixels at the edges of the adhesive path. Through iterative processing, redundant pixels at the edges of the adhesive path are gradually removed, ultimately yielding a skeleton line with a single pixel width. This skeleton line is the centerline of the adhesive path, accurately representing its direction and shape characteristics, providing a foundation for further topological analysis.
[0050] Step S4: Analyze the topology of the centerline and extract the endpoints and nodes of the centerline; where the endpoints are the starting or ending points of the centerline; and the nodes are the points where the centerline branches or intersects.
[0051] Specifically, a chain code-based tracing method is used to analyze the topological structure of the centerline. The process involves starting from one end of the centerline and tracing pixel-by-pixel in a specific direction, recording the direction and changes of the centerline. During tracing, the starting or ending point of the centerline is marked as an endpoint; points where the centerline branches or intersects are marked as nodes. Simultaneously, to accurately extract the coordinate information of endpoints and nodes, corner detection algorithms from image processing, such as the Harris corner detection algorithm, are used to detect corners on the centerline, further determining the positions of endpoints and nodes. This establishes a topological model of the centerline, providing a basis for subsequent extraction of centerline segments and paths.
[0052] Step S5: Using two adjacent points in the endpoints and nodes as breakpoints, divide the entire centerline into several segments according to the topological structure; use the depth-first search algorithm to extract the path of each segment of the centerline.
[0053] Specifically, based on the endpoint and node information extracted in step S4, the centerline segments between two adjacent points are determined according to the connection relationship of the centerline. These segments are divided into three types: endpoint-to-endpoint, endpoint-to-node, and node-to-node. Then, for each centerline segment, a depth-first search algorithm is used to traverse and record the coordinates of all pixels along the extension direction of the centerline, starting from the starting point of the segment, forming a continuous path sequence. This process completely extracts the path of each centerline segment, preparing for subsequent geometric analysis and feature extraction of the path.
[0054] Step S6: Use multi-segment polyline approximation to approximate the path as several straight line segments.
[0055] Specifically, for each path extracted in step S5, a polyline approximation, such as the Douglas-Peucker algorithm, is used to approximate the curved path as several straight line segments, each consisting of a start point and an end point. Simultaneously, the direction vector of each straight line segment is calculated based on its start and end point coordinates. This polyline approximation not only simplifies the path structure but also provides a clear geometric basis for subsequent direction interpolation and detection.
[0056] Step S7: Perform equally spaced linear interpolation on several straight line segments of each path to generate several sampling points; assign a direction vector to each sampling point based on the direction of the straight line segment it is located on, and use the perpendicular direction of the direction vector as the width direction of the path at that sampling point. These sampling points will serve as reference points for adhesive path measurement. The direction vector is used to guide the measurement of width and height. Using the reference points as the starting point of the search, search for adhesive path boundary points on both sides of the image perpendicular to the direction vector. These points constitute the adhesive path cross-section for calculating the width and height of the adhesive path.
[0057] Specifically, first, the interval distance for equal-spaced interpolation is set; then, linear interpolation is performed sequentially along the straight segments of each path according to the set interval distance to generate a series of uniformly distributed sampling points; finally, for each sampling point, the direction vector of the straight segment where the sampling point is located is assigned to the sampling point.
[0058] Step S8: Perform an edge search operation on each sampling point along the direction perpendicular to the direction vector to determine and extract the edge points of the adhesive path in the width direction.
[0059] Specifically, a search region is formed by extending a certain distance to both sides of the sampling point along the direction vector perpendicular to it. Within the search region, edge detection is performed pixel-by-pixel. When an edge is detected, its position coordinates are recorded, and it is identified as the edge point of the adhesive path in the vertical direction at that sampling point. By performing edge search operations on each sampling point, the two edge points of the adhesive path in the vertical direction at each sampling point are finally extracted, such as... Figure 3 The auxiliary visualization result (g) based on the search edge points based on the red line and its local magnified view of part A are shown, providing key data for subsequent calculation of the three-dimensional dimensional parameters of the adhesive path.
[0060] Step S9: Convert the depth image into 3D point cloud data.
[0061] By utilizing the depth value of each pixel in a depth image, combined with the intrinsic and extrinsic parameter matrices of a 3D camera, and applying the projection principle of solid geometry, the 2D depth image is mapped onto 3D space to generate 3D point cloud data. Specifically, a depth image is actually a representation of a 3D point cloud, and it shares fixed transformation coefficients with the 3D point cloud: x_res, y_res, and z_res. x_res represents the actual distance between pixels in the same row, y_res represents the actual distance between pixels in the same column, and z_res represents the ratio of pixel value size to actual height in the depth image. These three transformation parameters are fixed parameters in the 3D camera settings and can be obtained from the 3D camera.
[0062] like Figure 4 As shown, the specific calculation method for the transformation is as follows: Given a depth image and its corresponding transformation coefficients, first obtain the size of the rows and columns of the depth image. Let i=0, where i represents the row of the image; j=0, where j represents the column of the image. Obtain the depth value value of the i-th row and j-th column of the depth image. Then, the spatial coordinates of this pixel are X=i * x_res, Y=j * y_res, Z=value * z_res. Let the point cloud set be cloud, and this spatial point belongs to the point cloud set. When j>column_res, proceed to the next step; otherwise, j=j+1. When i>rows, end and output the point cloud set; otherwise, i=i+1.
[0063] Step S10: Based on the coordinate information of the sampling points and their edge points, obtain the cross-sectional area of the adhesive path in the 3D point cloud data; based on the cross-sectional area, calculate the three-dimensional dimensions of the adhesive path.
[0064] Specifically, based on the coordinates of the edge points extracted in step S8, the corresponding point cloud positions are determined in the 3D point cloud data of step S9. Taking the positions of two edge points in the vertical direction of the same sampling point as boundaries, a cross-sectional area is extracted from the 3D point cloud data along the width direction of the adhesive path (i.e., the vertical direction of the sampling point). This cross-sectional area contains all the 3D point cloud data of the adhesive path between the sampling point and its two adjacent edge points. By analyzing and fitting the point cloud data within the cross-sectional area, the three-dimensional dimensions of the adhesive path at the cross-sectional area are calculated. The three-dimensional dimensions include, but are not limited to, width, height, and cross-sectional area.
[0065] Step S11: Based on the calculated three-dimensional dimensions, filter out areas in the adhesive path that do not meet the requirements.
[0066] Specifically, based on the pre-set glue path size standards and tolerance ranges, the three-dimensional dimensions at each sampling point calculated in step S10 are compared with the pre-set glue path size standards and tolerance ranges. Glue path areas whose three-dimensional dimensions exceed the pre-set glue path size standards and tolerance ranges are identified as non-compliant areas for glue coating quality control.
[0067] The above are merely specific embodiments of the present invention, but the design concept of the present invention is not limited thereto. Any non-substantial modifications made to the present invention using this concept shall be considered as infringing upon the protection scope of the present invention.
Claims
1. A method for extracting and detecting adhesive in lithium battery coatings, characterized in that, Includes the following steps: Step S1: Acquire depth and 2D images of the lithium battery under test; Step S2: Preprocess the 2D image to extract the adhesive path; Step S3: Extract the center line of the adhesive path using an image thinning algorithm; Step S4: Analyze the topology of the centerline and extract its endpoints and nodes; where endpoints are the starting or ending points of the centerline; nodes are the points where the centerline branches or intersects. Step S5: Using two adjacent points in the endpoints and nodes as breakpoints, divide the entire centerline into several segments according to the topological structure; use a depth-first search algorithm to extract the path of each segment of the centerline; Step S6: Use multi-segment polyline approximation to approximate the path as several straight line segments; Step S7: Perform equally spaced linear interpolation on several straight line segments of each path to generate several sampling points; assign a direction vector to each sampling point according to the direction of the straight line segment it is located on; Step S8: Perform an edge search operation on each sampling point along the direction perpendicular to the direction vector to determine and extract the edge points of the adhesive path in the width direction; Step S9: Convert the depth image into 3D point cloud data; Step S10: Based on the coordinate information of the sampling point and its edge points, take the edge points as the boundary and extract a cross-sectional area in the 3D point cloud data along the width direction of the adhesive path. This cross-sectional area contains all the 3D point cloud data of the adhesive path between the sampling point and its two side edge points. By analyzing and fitting the point cloud data in the cross-sectional area, the three-dimensional dimensions of the adhesive path at the cross-sectional area are calculated. Step S11: Based on the calculated three-dimensional dimensions, filter out areas in the adhesive path that do not meet the requirements.
2. The method for extracting and detecting lithium battery adhesive according to claim 1, characterized in that, Specifically, step S2 involves: converting the 2D image to grayscale to obtain a grayscale image; applying a noise filtering algorithm to denoise the grayscale image; and using image enhancement technology to improve the contrast between the adhesive path and the background. An edge detection algorithm is used to extract coarsely selected regions of all suspected adhesive paths in the 2D image; Based on preset parameters, the coarse selection area is filtered to remove small areas or irregular redundant outlines, thereby retaining the selected area that conforms to the glue path shape, and the selected area is used as the final extracted glue path.
3. The method for extracting and detecting lithium battery adhesive according to claim 1, characterized in that, Step S3 specifically involves: binarizing the extracted adhesive path to convert it into a binary image containing only foreground and background pixels; using a distance transform-based image thinning algorithm to thin the image using foreground and background information from the binary image; and iteratively removing redundant pixels from the edges of the adhesive path to obtain a skeleton line with a single pixel width, which is the center line of the adhesive path.
4. The method for extracting and detecting lithium battery adhesive according to claim 1, characterized in that, Step S4 specifically involves: analyzing the topological structure of the centerline using a chain code tracing method; starting from one end of the centerline, tracing pixel by pixel in a certain direction, recording the direction and changes of the centerline; during the tracing process, when the starting or ending point of the centerline is encountered, it is marked as an endpoint; when the centerline forks or intersects, it is marked as a node; simultaneously, using a corner detection algorithm in image processing, corner detection is performed on the centerline to further determine the positions of endpoints and nodes, thereby establishing a topological model of the centerline, providing a basis for subsequent extraction of the centerline segments and paths.
5. The method for extracting and detecting lithium battery adhesive according to claim 1, characterized in that, Specifically, step S5 involves using a depth-first search algorithm for each centerline segment. Starting from the beginning of the centerline segment, the algorithm iterates along the direction of the centerline and records the coordinates of all pixels on the centerline segment, forming a continuous path sequence. This process extracts the path of each centerline segment completely, preparing for subsequent geometric analysis and feature extraction.
6. The method for extracting and detecting lithium battery coating according to claim 1, characterized in that, Specifically, step S7 involves: setting an equal-interval interpolation distance, performing linear interpolation sequentially along the straight segments of each path according to the set interval distance, and generating a series of uniformly distributed sampling points; for each sampling point, calculating the direction vector of the straight segment based on the coordinates of the start and end points of the straight segment it is located on, and assigning this direction vector to the sampling point.
7. The method for extracting and detecting lithium battery adhesive according to claim 1, characterized in that, Specifically, step S8 involves: extending a certain distance to both sides of the sampling point along the direction perpendicular to the direction vector to form a search area; performing edge detection pixel by pixel within the search area; and recording the position coordinates of the edge when an edge is detected, identifying it as the edge point of the adhesive path in the vertical direction at that sampling point, thus providing key data for subsequent calculation of the three-dimensional size parameters of the adhesive path.
8. The method for extracting and detecting lithium battery coating according to claim 1, characterized in that, Specifically, step S10 involves: determining the corresponding point cloud position in the 3D point cloud data from step S9 based on the coordinates of the edge points extracted in step S8; taking the edge points as boundaries, extracting a cross-sectional area in the 3D point cloud data along the width direction of the adhesive path, which contains all the 3D point cloud data of the adhesive path between the sampling point and its two side edge points; and calculating the three-dimensional dimensions of the adhesive path at the cross-sectional area by analyzing and fitting the point cloud data within the cross-sectional area.
Citation Information
Patent Citations
Glue road defect detection method and device
CN117054441A
Glue path quality detection method and device, electronic equipment and storage medium
CN118351097A