Non-contact defect detection method for battery piece
By performing edge positioning, subpixel edge contour processing and defect distance judgment on the cell image, the problem of low detection accuracy during cell movement is solved, high-precision contactless defect detection is achieved, and hardware cost and misjudgment rate are reduced.
Patent Information
- Application Number
- CN202411669548.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-04-15
AI Technical Summary
The existing non-contact defect detection methods of battery cells are difficult to achieve high-precision detection during battery cells movement, especially when shooting online when scanning cameras, the edges of the battery cells are easily distorted, resulting in low detection accuracy and high cost.
By acquiring the battery cell image, positioning each edge of the battery cell in the image, frame the detection area, extracting the sub-pixel edge profile, performing smoothness and continuity processing, forming an updated detection area, accurately positioning the defect position, and calculating the distance between the defect and the sub-pixel edge profile to determine whether it is a defect.
Without the need to improve the hardware, the battery cell detection accuracy is improved, hardware costs are saved, the number of misjudgments is reduced, production efficiency is improved, and the number of manual re-inspections is reduced.
Smart Images

Figure CN119831927A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of battery cell detection, and in particular relates to a non-contact defect detection method for a battery cell. Background Art
[0002] As an important power generation carrier, solar cells have the advantages of high light energy conversion efficiency, long service life, mature production technology and low cost. However, due to the complicated production process during the processing and manufacturing process, the cells are prone to various defects. Therefore, defect detection of solar cells is an indispensable part of the production process.
[0003] In the past, the detection of defects (collapsed edges, notches) on the edges of battery cells was done through manual visual inspection. The detection efficiency and quality were relatively low, and the detection repeatability was poor and the cost was high. Therefore, traditional manual inspection can no longer meet on-site needs. Battery cells are thin and fragile, and non-contact inspection methods can better ensure that the battery cells are not damaged.
[0004] At present, non-contact defect detection of battery cells is based on area array cameras and line scan cameras. Area array cameras are suitable for taking pictures in a static state, while line scan cameras are suitable for taking pictures in a moving state. Under certain production conditions, the battery cells cannot meet the requirements of static photography, and only line scan cameras can be used. However, the battery cells are prone to slight shaking during the movement on the belt, causing the edges of the cells photographed by the line scan camera to be distorted to form irregular edges. At the same time, only two or three pixels are shown in the image of the line scan camera. In this case, it becomes more difficult to achieve high-precision detection of broken edges and gaps in the battery cells. Improving the detection accuracy by improving the resolution of the camera and lens is costly.
[0005] When further analyzing the product image, the four sides of the product in the image are first located, and four straight lines are fitted based on the four sides to form a closed area. Then, pixel-level thresholding, morphological processing, and feature screening are used in the closed area to extract defects. However, a large number of false detections are likely to occur, affecting the accuracy of detection, making it difficult to achieve accurate defect detection. Summary of the invention
[0006] The object of the present invention is to provide a non-contact defect detection method for a battery cell, which determines the real defect based on the precise edge of the battery cell.
[0007] To achieve the above object, a technical solution adopted by the present invention is:
[0008] A non-contact defect detection method for a battery cell includes acquiring a battery cell image, processing and judging the acquired battery cell image, wherein the processing and judging steps include:
[0009] S1: Locate the edges of the battery cell in the image, frame the detection area where the edges are located, make the actual contours of the corresponding edges all within the detection area, and extract the sub-pixel edge contours of the corresponding edges within the detection area.
[0010] S2: performing smoothness and / or continuity processing on the sub-pixel edge contour, translating the processed sub-pixel edge contour inward to form a translated edge contour, connecting the processed sub-pixel edge contour and the upper and lower ends of the translated edge contour to form an updated detection area,
[0011] S3: extract the exact location of the chipped edge or gap in the updated detection area, calculate the distance from the defect to the sub-pixel edge contour, and determine whether it is a defect.
[0012] Preferably, in S1, when defining the detection area of each edge, first fit the straight line segments corresponding to each edge, translate the straight line segments of each edge outward to form an outer straight line segment, and translate them inward to form an inner straight line segment, and connect the upper and lower ends of the outer straight line segment and the inner straight line segment to form a detection area.
[0013] Further preferably, when fitting the straight line segments corresponding to each edge: first find points through calipers, set the number of calipers n, find n edge points of the actual contour of the corresponding edge, and then perform straight line fitting on the n edge point sets to obtain the corresponding straight line segments.
[0014] Preferably, in the above technical solution, in S1, extracting the sub-pixel edge contour by using the Canny algorithm includes:
[0015] (1) Use Gaussian filtering to smooth the image and reduce noise.
[0016] (2) Use the Sobel operator to calculate the horizontal and vertical gradient values of each pixel in the image, and calculate the gradient amplitude and direction of each pixel based on the gradient value.
[0017] (3) Through non-maximum suppression, pixels that are not edges are removed.
[0018] (4) According to the set high threshold and low threshold, the pixels in the gradient amplitude image are divided into three categories: strong edge, weak edge and non-edge. The high threshold and low threshold are selected so that the gradient amplitude of the strong edge pixel is greater than the high threshold, the gradient amplitude of the non-edge pixel is less than the low threshold, and the gradient amplitude of the weak edge pixel is between the high threshold and the low threshold.
[0019] (5) By connecting strong edge pixels and their adjacent weak edge pixels, a complete sub-pixel edge contour is obtained.
[0020] Preferably, in the above technical solution, in S2, when the sub-pixel edge contour is subjected to smoothness processing: a certain number of contour points are taken, and the contour points are projected onto a local regression line, so that the sub-pixel edge contour is smoothed to be close to a straight line.
[0021] Preferably, in S2, when the continuity of the sub-pixel edge contour is processed: the sub-pixel edge contour is segmented according to the line_circle segmentation method, the valid contours are screened and then merged, and the coordinates are interpolated and connected according to the disconnected breakpoint coordinates, the starting and ending points of the two contours and the distance between the two points, and the point set is filled through the approximate straight line points to form the sub-pixel edge contour into a coherent straight line.
[0022] Preferably, in the above technical solution, in S2, the edge contour is translated 5-15 pixels inwards of the processed sub-pixel edge contour, so that all the broken edges or gaps are located within the updated detection area.
[0023] Preferably, in S3, the above technical solution uses Gaussian filtering and edge detection technology to extract sub-pixel contours of broken edges or gaps, converts the sub-pixel contours of broken edges or gaps into point set coordinates, and calculates the distance value from the point set coordinates to the processed sub-pixel edge contour.
[0024] Further preferably, in S3, when judging whether it is a defect, a standard value is first set, and the calculated distance value is compared with the standard value. When the distance value is greater than the standard value, it is judged to be a defect; when the distance value is less than the standard value, it is judged to be normal.
[0025] Preferably, the above technical solution acquires the cell image by a line scan camera.
[0026] To achieve the above object, another technical solution adopted by the present invention is:
[0027] A non-contact defect detection method for a cell comprises acquiring a cell image by a line scan camera and processing the acquired cell image, wherein the processing steps include:
[0028] S1: Locate the edges of the battery cell in the image; find points with a caliper, set the number of calipers n, find n edge points of the actual contour of the corresponding edge, and then perform straight line fitting on the n edge point sets to obtain the corresponding straight line segments, thereby fitting the straight line segments corresponding to each edge; translate the straight line segment of each edge outward to form an outer straight line segment, translate it inward to form an inner straight line segment, connect the upper and lower ends of the outer straight line segment and the inner straight line segment to form a detection area, so that the actual contour of the corresponding edge is all within the detection area; extract the sub-pixel edge contour of the corresponding edge in the detection area through the Canny algorithm,
[0029] S2: Smoothness processing of sub-pixel edge contour: smoothing the sub-pixel edge contour to a nearly straight line; continuity processing of sub-pixel edge contour: segmenting the sub-pixel edge contour according to the segmentation method of line_circle, merging after screening the valid contours, and filling the point set with approximate straight line points according to the coordinates of the disconnected breakpoints; translating the processed sub-pixel edge contour inward to form a translated edge contour, connecting the processed sub-pixel edge contour and the upper and lower ends of the translated edge contour to form an updated detection area, so that all the broken edges or gaps are located in the updated detection area,
[0030] S3: Use Gaussian filtering and edge detection technology to extract the exact location of the broken edge or gap in the updated detection area; convert the sub-pixel contour line of the broken edge or gap into point set coordinates, and calculate the distance value from the point set coordinates to the processed sub-pixel edge contour; set a standard value, and compare the calculated distance value with the standard value. When the distance value is greater than the standard value, it is judged as a defect; when the distance value is less than the standard value, it is judged as normal.
[0031] Due to the application of the above technical solution, the present invention has the following advantages compared with the prior art:
[0032] The present invention eliminates the irregular concave and convex edges of the battery cell, locates the precise edge of the battery cell, and then accurately locates the position of the defect, thereby improving the detection accuracy without the need to upgrade the hardware, saving hardware costs, reducing the number of misjudgments during the detection process, improving production efficiency, reducing the number of manual re-inspections, and saving labor costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Attached Figure 1a It is a schematic diagram of the whole cell image;
[0034] Attached Figure 1b It is a schematic diagram of two half-cell images;
[0035] Attached Figure 2 A schematic diagram of the detection area framed in a battery cell image;
[0036] Attached Figure 3 It is a schematic diagram of the straight line segment corresponding to the fitted edge in the battery cell image;
[0037] Attached Figure 4a Schematic diagram of sub-pixel edge contour extracted from a cell image;
[0038] Attached Figure 4b This is a schematic diagram of the sub-pixel edge contour in the cell image after smoothing;
[0039] Attached Figure 5aA schematic diagram of discontinuous sub-pixel edge contours in a cell image;
[0040] Attached Figure 5b It is a schematic diagram of the sub-pixel edge contour after being connected in the battery cell image;
[0041] Attached Figure 5c It is a schematic diagram of a battery cell image with a small disconnection distance;
[0042] Attached Figure 5d Schematic diagram of the sub-pixel edge contour after the continuation in 5c;
[0043] Attached Figure 5e A schematic diagram of a region with a large disconnection gap in a cell image;
[0044] Attached Figure 5f This is a schematic diagram of the sub-pixel edge contour after the continuity in 5e;
[0045] Attached Figure 6 is a schematic diagram of the updated detection area in the battery cell image;
[0046] Attached Figure 7 Detect sub-pixel contours of edge collapse in the cell image; DETAILED DESCRIPTION
[0047] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] A non-contact defect detection method for a battery cell is suitable for detecting the entire battery cell, such as Figure 1a As shown, it is also suitable for testing half-cell batteries. Figure 1b shown.
[0049] In this embodiment: the whole cell is divided into two half-cells, and the half-cells are inspected. The half-cell images are acquired. In this embodiment, a line scan camera is used to acquire the cell images. Since the line scan camera is used to capture the cell images during the cell movement, the cell edges are distorted. The edges of the cell images are irregular after being magnified. Therefore, the cell images need to be processed before judgment.
[0050] Processing the obtained cell image includes:
[0051] Locate the edges of the battery cell in the image. The image shows the four edges of the battery cell: top, bottom, left, and right. First, define the detection area where the left edge is located, so that the actual contour of the left edge is completely within the detection area. Figure 2 As shown in the figure, the red edge is the actual contour corresponding to the left edge, and the blue box is the detection area where the left edge is located.
[0052] In this embodiment, the following method is used to fit the straight line segment corresponding to the left side: first find points with a caliper, set the number of calipers n, find n edge points of the actual contour of the left side, and then perform straight line fitting on the n edge point sets to obtain the corresponding straight line segment. n can be 20, 30, 40, 50, etc. In theory, the larger the number of n, the higher the accuracy of the fitted straight line segment.
[0053] In this embodiment, the following method is used to select the detection area: the straight line segment on the left side is translated outward to form an outer straight line segment, and translated inward to form an inner straight line segment, and the upper and lower ends of the outer straight line segment and the inner straight line segment are connected to form a detection area. The translation distance between the outer straight line segment and the inner straight line segment is generally 5-15 pixels, ensuring that the actual contour of the left side is entirely within the detection area.
[0054] The sub-pixel edge contour on the left side of the detection area is extracted using the Canny algorithm, including:
[0055] (1) Reduce the impact of noise, such as using Gaussian filtering to smooth the image and reduce noise.
[0056] (2) Use the Sobel operator to calculate the horizontal and vertical gradient values of each pixel in the image, and calculate the gradient amplitude and direction of each pixel based on the gradient value.
[0057] (3) Through non-maximum suppression, pixels that are not edges are removed.
[0058] (4) According to the set high threshold and low threshold, the pixels in the gradient amplitude image are divided into three categories: strong edge, weak edge and non-edge. The high threshold and low threshold are selected so that the gradient amplitude of the strong edge pixel is greater than the high threshold, the gradient amplitude of the non-edge pixel is less than the low threshold, and the gradient amplitude of the weak edge pixel is between the high threshold and the low threshold.
[0059] (5) By connecting strong edge pixels and their adjacent weak edge pixels, a complete sub-pixel edge contour is obtained.
[0060] In order to make the contour of the defective position as close as possible to the contour shape without defects, such as Figure 4a As shown, the sub-pixel edge contour needs to be smoothed to be roughly close to a straight line, such as Figure 4b When smoothing: first take a certain number of contour points, the number of contour points can be set, by projecting the contour points to the local regression line (that is, the least squares approximate straight line), the larger the number of contour points selected, the greater the degree of smoothing.
[0061] The extracted sub-pixel edge contour is sometimes not a continuous contour line, such as Figure 5a As shown, it is necessary to process the sub-pixel edge contour continuously, as shown in Figure 5b shown.
[0062] In this embodiment: the sub-pixel edge contour is segmented according to the line_circle segmentation method, and the valid contours are screened and merged. If the distance between the edges is relatively small, such as Figure 5c As shown, the contours within the distance of 1 or 2 pixels can be directly merged into one contour. Figure 5d As shown; if the area with a larger gap is disconnected, such as Figure 5e As shown, according to the disconnected breakpoint coordinates, the coordinates of the start and end points of the two contours and the distance between the two points are interpolated to connect them, and the point set is filled by approximate straight line points to form a coherent straight line for the sub-pixel edge contour, as shown in Figure 5f shown.
[0063] Smoothing and continuity processing are performed individually according to the extracted sub-pixel edge contour problem, or are processed in sequence, such as first continuity processing and then smoothing processing.
[0064] The processed sub-pixel edge contour is translated inward to form a translated edge contour, and the upper and lower ends of the processed sub-pixel edge contour and the translated edge contour are connected to form an updated detection area. In fact, 5-15 pixels are translated so that all the broken edges or gaps are located in the updated detection area. Figure 6 shown.
[0065] The precise location of the chipped edge or gap is extracted in the updated detection area, and the distance from the defect to the sub-pixel edge contour is calculated to determine whether it is a defect.
[0066] In this embodiment, Gaussian filtering and edge detection technology are used to extract the sub-pixel contour line of the broken edge or gap. Specifically, the sub-pixel contour line of the broken edge or gap is converted into point set coordinates, and the distance value from the point set coordinates to the processed sub-pixel edge contour is calculated, such as Figure 7 shown.
[0067] In this embodiment: when judging whether it is a defect, first set a standard value, such as setting the standard value to 5, and compare the calculated distance value with the standard value. When the distance value is greater than the standard value of 5, it is judged to be a defect; when the distance value is less than the standard value of 5, it is judged to be normal.
[0068] Since there may be multiple points in the actual point set coordinates, the number of values greater than the distance is generally set as the judgment standard. For example, if there are 10 distance values, the distance standard is 5, and the standard is set to 3 points: check how many of the 10 values have distances greater than 5. If 4 points have values greater than 5, it is judged as a defect, and if less than 3 points exceed the distance 5, it is judged to be normal; or the average value of multiple distance values (or to prevent interference, remove the maximum and minimum values and then calculate the average value) is used as the judgment basis.
[0069] After completing the defect detection on the left side, the above steps are performed on the right side, the top side, and the bottom side. After completing the detection of one half of the battery cell, the above steps are performed on the other half of the battery cell, and finally the defect detection is completed.
[0070] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made according to the spirit of the present invention should be included in the protection scope of the present invention.
Claims
1. A non-contact defect detection method for a battery cell, characterized in that: The method includes obtaining a cell image, processing and judging the obtained cell image, and the processing and judging steps include: S1: Locate the edges of the battery cell in the image, frame the detection area where the edges are located, make the actual contours of the corresponding edges all within the detection area, and extract the sub-pixel edge contours of the corresponding edges within the detection area. S2: performing smoothness and / or continuity processing on the sub-pixel edge contour, translating the processed sub-pixel edge contour inward to form a translated edge contour, connecting the processed sub-pixel edge contour and the upper and lower ends of the translated edge contour to form an updated detection area, S3: extract the exact location of the chipped edge or gap in the updated detection area, calculate the distance from the defect to the sub-pixel edge contour, and determine whether it is a defect.
2. The non-contact defect detection method for a battery cell according to claim 1, characterized in that: In S1, when defining the detection area of each edge: first fit the straight line segment corresponding to each edge, translate the straight line segment of each edge outward to form an outer straight line segment, translate it inward to form an inner straight line segment, and connect the upper and lower ends of the outer straight line segment and the inner straight line segment to form a detection area.
3. The non-contact defect detection method for a battery cell according to claim 2, characterized in that: When fitting the straight line segments corresponding to each edge: first find points using calipers, set the number of calipers n, find n edge points corresponding to the actual contour of the edge, and then perform straight line fitting on the n edge point sets to obtain the corresponding straight line segments.
4. The non-contact defect detection method for a battery cell according to claim 1, characterized in that: In S1, the sub-pixel edge contour is extracted by the Canny algorithm, including: (1) Use Gaussian filtering to smooth the image and reduce noise. (2) Use the Sobel operator to calculate the horizontal and vertical gradient values of each pixel in the image, and calculate the gradient amplitude and direction of each pixel based on the gradient value. (3) Through non-maximum suppression, pixels that are not edges are removed. (4) According to the set high threshold and low threshold, the pixels in the gradient amplitude image are divided into three categories: strong edge, weak edge and non-edge. The high threshold and low threshold are selected so that the gradient amplitude of the strong edge pixel is greater than the high threshold, the gradient amplitude of the non-edge pixel is less than the low threshold, and the gradient amplitude of the weak edge pixel is between the high threshold and the low threshold. (5) By connecting strong edge pixels and their adjacent weak edge pixels, a complete sub-pixel edge contour is obtained.
5. The non-contact defect detection method for a battery cell according to claim 1, characterized in that: In S2, when the sub-pixel edge contour is smoothed: a certain number of contour points are taken, and the contour points are projected onto the local regression line, so that the sub-pixel edge contour is smoothed to be close to a straight line.
6. The non-contact defect detection method for a battery cell according to claim 1, characterized in that: In S2, when the continuity of the sub-pixel edge contour is processed: the sub-pixel edge contour is segmented according to the segmentation method of line_circle, the valid contours are screened and merged, and the coordinates are interpolated and connected according to the disconnected breakpoint coordinates, the start and end points of the two contours and the distance between the two points, and the point set is filled through the approximate straight line points to form a coherent straight line for the sub-pixel edge contour.
7. The non-contact defect detection method for a battery cell according to claim 1, characterized in that: In S2, the edge contour is translated 5-15 pixels inward of the processed sub-pixel edge contour, so that all the broken edges or gaps are located within the updated detection area.
8. The non-contact defect detection method for a battery cell according to claim 1, characterized in that: In S3, Gaussian filtering and edge detection technology are used to extract the sub-pixel contour lines of the broken edge or gap, convert the sub-pixel contour lines of the broken edge or gap into point set coordinates, and calculate the distance value from the point set coordinates to the processed sub-pixel edge contour.
9. The non-contact defect detection method for a battery cell according to claim 8, characterized in that: In S3, when judging whether it is a defect, a standard value is first set, and the calculated distance value is compared with the standard value. When the distance value is greater than the standard value, it is judged to be a defect; when the distance value is less than the standard value, it is judged to be normal.
10. The non-contact defect detection method for a battery cell according to claim 1, characterized in that: The cell image is acquired using a line scan camera.