A method and system for detecting cell tabs
By combining the Hough circle transform algorithm and the Sauvola algorithm, the R parameter is dynamically adjusted, which solves the problem of detection accuracy caused by the fluctuation of welding parameters in the cell tab inspection, realizes high-precision identification of cell tab defects, and improves the quality of battery production.
Patent Information
- Application Number
- CN202511122537.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2045-08-12
AI Technical Summary
Existing cell tab detection methods struggle to accurately identify welding defects when faced with fluctuations in welding parameters, resulting in insufficient detection accuracy and reliability.
By employing the Hough circle transform algorithm in conjunction with the edges in the battery cell tab image, the R parameter in the Sauvola algorithm is dynamically adjusted by locating the center point of the tab and dividing it into distance groups. The grayscale threshold is adjusted according to the texture complexity of the pixels to improve the accuracy of defect detection.
This effectively improves the accuracy of defect detection results in cell tab images, avoids missegmentation, and enhances battery production quality.
Smart Images

Figure CN120612330B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image recognition processing, and in particular to a detection method and system for a battery cell tab. BACKGROUND
[0002] As a core component of a lithium battery, the production quality of a battery cell directly determines the performance and safety of the battery. The battery cell tab is a key component for connecting the battery cell to an external circuit, and its welding quality and other parameters can affect the conductivity, stability and service life of the battery. Therefore, high-precision and high-efficiency detection of the battery cell tab is an important link for ensuring the production quality of the battery cell.
[0003] At present, in the field of battery cell tab detection, the adaptive threshold segmentation algorithm (Sauvola) can be used to distinguish between foreground and background pixel points in an image. This algorithm calculates a dedicated threshold for each pixel point in a local region to adapt to complex situations such as uneven light and contrast differences in the image. Compared with traditional global threshold segmentation methods, this algorithm exhibits better adaptability when processing battery cell tab images. However, the Sauvola algorithm has obvious limitations. Its threshold calculation formula relies on a fixed preset R parameter (maximum standard deviation dynamic range allowed in the local region) to control the direction of threshold adjustment.
[0004] However, in the actual battery cell tab detection process, the welding defect features of the tab can cause significant differences in pixel distribution in different regions of the image. The fixed R parameter cannot be dynamically adjusted according to the actual features of each region of the battery cell tab image. If the standard deviation of the local region exceeds the reasonable range of the preset R parameter, the algorithm cannot effectively adjust the threshold, resulting in misclassification of foreground and background pixels, and ultimately affecting the accuracy and reliability of battery cell tab detection.
[0005] In summary, how to develop a battery cell tab detection method that can adapt to welding parameter fluctuations and accurately identify welding defects to effectively improve the production quality of the battery is a problem that needs to be solved at present. SUMMARY
[0006] To solve the technical problem of how to develop a battery cell tab detection method that can adapt to welding parameter fluctuations and accurately identify welding defects to effectively improve the production quality of the battery, the present application provides a detection method and system for a battery cell tab.
[0007] In a first aspect, the present application provides a detection method for a battery cell tab, which adopts the following technical solution:
[0008] A detection method for a battery cell tab, comprising the steps of:
[0009] The image of the electrode tab of the battery cell is collected, and the center point of the electrode tab in the image of the electrode tab of the battery cell is located; the distance between each edge pixel point in the image of the electrode tab of the battery cell and the center point of the electrode tab is obtained, the edge pixel points with the same distance are sorted according to the size of the polar angle to obtain a plurality of distance groups; the distance between the edge pixel points in the distance group and the center point of the electrode tab, and the difference between the polar angle difference between adjacent edge pixel point pairs in the distance group and the polar angle difference between adjacent corner points of the rectangle are used to calculate the optimization degree of the distance group as a corner point in the center point of the electrode tab, so as to obtain the electrode tab area in the image of the electrode tab of the battery cell; a local area is set for each pixel point in the electrode tab area, the R parameter adjustment factor of the pixel point in the electrode tab area is calculated according to the standard deviation of the gradient direction angle of the pixel point in the local area, and the R parameter of the pixel point is obtained according to the product of the R parameter adjustment factor and the gray standard deviation in the local area of the pixel point; the gray threshold of each pixel point is obtained by using the R parameter of the pixel point in the Sauvola algorithm, so as to obtain the defect detection result in the image of the electrode tab of the battery cell.
[0010] The application can accurately extract the electrode tab area based on the position of the electrode tab center point, and obtain the defect detection result of the electrode tab area, by using the Hough circle transformation algorithm to accurately locate the electrode tab center point in the image of the electrode tab of the battery cell. In the process of extracting the electrode tab area based on the position of the electrode tab center point, the application considers that the electrode tab area is a rectangular area, and the distance between the corner points of the rectangular area and the electrode tab center point is equal. Therefore, the application divides the edge pixel points into a plurality of distance groups, obtains the optimization degree of the position relationship between each edge pixel point in the distance group and the electrode tab center point, and accurately extracts the electrode tab area in the image of the electrode tab of the battery cell. On this basis, the application dynamically adjusts the R parameter in the Sauvola algorithm by analyzing the texture complexity of each pixel point in the electrode tab area, so that the gray threshold of the pixel point can be adjusted according to the possibility of the pixel point being a defect pixel point, effectively improving the accuracy of the gray threshold of the pixel point and avoiding missegmentation, thereby effectively improving the accuracy of the defect detection result in the image of the electrode tab of the battery cell.
[0011] According to the battery cell electrode tab detection method provided by the application, the image of the battery cell electrode tab is collected, including: preprocessing after shooting the battery cell electrode tab to obtain the image of the battery cell electrode tab, wherein each image of the battery cell electrode tab includes one positive electrode tab and one negative electrode tab, and the length of the electrode tab is obtained.
[0012] The application can significantly improve the quality of the image by preprocessing the photographed battery cell electrode tab photo, and effectively avoid the influence of image quality problems on the subsequent detection result.
[0013] According to the method for detecting the tab of the battery cell, the center point of the tab in the tab image is located, including: setting a radius parameter in a Hough circle detection algorithm according to a length of the tab to obtain a circular region in the tab image of the battery cell; obtaining edge pixel points in the circular region, taking the radius parameter of the circular region minus 1 as a neighborhood radius of the center of the circular region; obtaining the number of all edge pixel points in the neighborhood radius of the center of each circular region to obtain the center point of the tab in the tab image of the battery cell.
[0014] According to the method for detecting the tab of the battery cell, the center point of the tab in the tab image is located, including: setting a radius parameter in a Hough circle detection algorithm according to a length of the tab to obtain a circular region in the tab image of the battery cell; obtaining edge pixel points in the circular region, taking the radius parameter of the circular region minus 1 as a neighborhood radius of the center of the circular region; obtaining the number of all edge pixel points in the neighborhood radius of the center of each circular region to obtain the center point of the tab in the tab image of the battery cell.
[0015] The present application can exclude the interference of other irrelevant circular regions under the premise of ensuring that the center point of the tab is at the center of the circular region by the Hough circle transformation algorithm combined with the edge in the tab image of the battery cell, so that the positive and negative tab center points of the tab of the battery cell can be accurately identified.
[0016] According to the method for detecting the tab of the battery cell, the center point of the tab in the tab image is located, including: setting a radius parameter in a Hough circle detection algorithm according to a length of the tab to obtain a circular region in the tab image of the battery cell; obtaining edge pixel points in the circular region, taking the radius parameter of the circular region minus 1 as a neighborhood radius of the center of the circular region; obtaining the number of all edge pixel points in the neighborhood radius of the center of each circular region to obtain the center point of the tab in the tab image of the battery cell.
[0017] The present application considers that the number of corner points of the tab region is usually four, and the rectangular tab region is a symmetrical structure, so when analyzing the possibility of each distance group as a corner point combination, the distance group with less than four edge pixel points can be excluded to exclude some interference factors in advance and reduce the data processing amount.
[0018] According to the method for detecting the tab of the battery cell, the center point of the tab in the tab image is located, including: setting a radius parameter in a Hough circle detection algorithm according to a length of the tab to obtain a circular region in the tab image of the battery cell; obtaining edge pixel points in the circular region, taking the radius parameter of the circular region minus 1 as a neighborhood radius of the center of the circular region; obtaining the number of all edge pixel points in the neighborhood radius of the center of each circular region to obtain the center point of the tab in the tab image of the battery cell.
[0019] ;
[0020] For the first tab center point, the first distance group as a corner point, for the first distance group, the distance between the first tab center point, the rectangular adjacent corner point polar angle difference, the first a number of groups of adjacent edge pixel pairs in the distance group, is the i-th distance group, is the i-th distance group, is the i-th distance group, is an absolute value of a polar angle difference between the group of adjacent edge pixel pairs, is a linear normalization function, is an exponential function with base e, is an absolute value symbol.
[0021] According to the method for detecting the tab of the battery cell, the edge pixel in the distance group with the largest degree of preference of the distance group as the corner point in the tab center point is taken as the corner point of the tab center point, the corner points of the tab center points are sequentially connected and then subjected to mask processing to obtain the tab area in the tab image of the battery cell.
[0022] According to the method for detecting the tab of the battery cell, the R parameter adjustment factor of the pixel in the tab area is calculated according to the standard deviation of the gradient direction angle of the pixel in the local area of the pixel, and the method comprises the following steps:
[0023] ;
[0024] is the R parameter adjustment factor of the i-th pixel in the tab area, is the standard deviation of the gradient direction angle of the pixel in the local area of the i-th pixel, is the maximum value of the standard deviation of the gradient direction angle of the pixel in the local area of all the pixels in the tab area, is a sign function, is a standard deviation threshold value of the preset gradient direction angle.
[0025] According to the method for detecting the tab of the battery cell, the R parameter of the pixel is used in the Sauvola algorithm to obtain the gray threshold value of each pixel to obtain the defect detection result in the tab image of the battery cell, and the method comprises the following steps: the R parameter of the pixel is substituted into the threshold value formula of the Sauvola algorithm to obtain the gray threshold value of each pixel in the tab area; in response to the gray value of the pixel in the tab area being greater than the gray threshold value of the pixel, a defective pixel in the tab image of the battery cell is obtained.
[0026] The Sauvola algorithm is used to acquire the defects in the tab image of the battery cell, the threshold value can be dynamically adjusted in combination with the local mean value and the standard deviation, the limitations of the global threshold method in the non-uniform illumination scene are reduced, and therefore the accuracy of the defect detection result is effectively improved.
[0027] In a second aspect, the present application provides an electrode tab detection system for a battery cell, which employs the following technical solution:
[0028] An electrode tab detection system for a battery cell comprises a processor and a memory, wherein the memory stores computer program instructions, and the computer program instructions, when executed by the processor, implement the electrode tab detection method.
[0029] By employing the above technical solution, the electrode tab detection method is generated into a computer program and stored in the memory, so as to be loaded and executed by the processor, thereby making a terminal device based on the memory and the processor, and facilitating use.
[0030] The present application has the following technical effects:
[0031] Based on the above technical solution, the present application provides an electrode tab detection method and system, which accurately locates the center point of the electrode tab by combining the Hough circle transformation algorithm with the edge in the electrode tab image, so as to accurately extract the electrode tab region based on the position of the electrode tab center point, and obtain the defect detection result of the electrode tab region. In the process of extracting the electrode tab region based on the position of the electrode tab center point, the present application considers that the electrode tab region is a rectangular region, and the distance between the corner points of the rectangular region and the electrode tab center point is equal. Therefore, the present application divides the edge pixel points into multiple distance groups, obtains the optimal degree of the position relationship between each edge pixel point in the distance group and the electrode tab center point, which conforms to the characteristics of the electrode tab region, and accurately extracts the electrode tab region in the electrode tab image. On this basis, the present application dynamically adjusts the R parameter in the Sauvola algorithm by analyzing the texture complexity of each pixel point in the electrode tab region, so that the gray threshold of the pixel point can be adjusted according to the possibility of the pixel point being a defect pixel point, effectively improving the accuracy of the pixel point gray threshold, avoiding missegmentation, and effectively improving the accuracy of the defect detection result in the electrode tab image. BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1 A flowchart of an electrode tab detection method provided by the present application embodiment is shown in the figure.
[0033] Figure 2 A schematic diagram of an electrode tab image provided by the present application embodiment is shown in the figure. DETAILED DESCRIPTION
[0034] The technical solutions in the present application embodiments will be described clearly and completely below with reference to the accompanying drawings in the present application embodiments. Obviously, the described embodiments are part of the present application, rather than all the embodiments.
[0035] The embodiment of the application discloses a battery cell tab detection method, which can accurately locate the tab area in the battery cell tab image, accurately adjust the gray threshold of each pixel point in the tab area according to the possibility of the pixel point being a defect pixel point, thereby accurately separating the defect pixel point, and finally effectively improving the accuracy of the defect detection result in the obtained battery cell tab image.
[0036] Specifically refer to Figure 1 as shown, Figure 1 A flowchart of a battery cell tab detection method provided by the embodiment of the application, which specifically comprises the following steps:
[0037] S1: Collecting a battery cell tab image.
[0038] It can be understood that the battery production assembly line uses a plurality of battery cell tabs arranged alternately to form a battery module, which is used for subsequent connection with external electrical appliances. The subsequent power-on process is to connect all battery cell tab components in series and parallel and finally connect with external electrical appliances, forming a loop. Therefore, the embodiment of the application can take one positive tab and one negative tab as a group of target objects for shooting, obtaining a battery cell tab image, wherein each battery cell tab image includes one positive battery cell tab and one negative battery cell tab.
[0039] For example, in the embodiment of the application, the battery cell tab image is collected, including: shooting the battery cell tab and then preprocessing to obtain the battery cell tab image.
[0040] Specifically, the high-resolution camera is fixed above the battery cell tab welding area, the angle of the camera is adjusted so that the battery cell tab area is completely located in the camera shooting area, and each battery cell tab photo is shot, the battery cell tab photo has the traceability code corresponding to the battery cell tab, and the information corresponding to the battery cell tab of this type can be obtained through the traceability code, and the information at least includes the tab length corresponding to the tab. After obtaining the battery cell tab photo, the battery cell tab photo can be denoised through Gaussian filtering to reduce noise interference. The angle of the battery cell tab photo is adjusted through geometric correction to avoid image distortion. The contrast of the photo is adjusted through histogram equalization to improve the image details. The battery cell tab photo is converted into a gray image through grayscale processing, and finally the battery cell tab image and the gray value of each pixel point in the battery cell tab image are obtained.
[0041] The preprocessing method can be set according to actual needs, and the embodiment of the application does not make too many limitations here.
[0042] Specifically refer to Figure 2 as shown, Figure 2 A schematic diagram of a battery cell tab image provided by the embodiment of the application, from Figure 2It can be seen that the battery cell tab image contains positive and negative pole symbols, which are respectively located in two circle areas. The leftmost end of the battery cell tab image is the traceability code.
[0043] It should be noted that there may be non-tab areas in the battery cell tab image, such as the top gasket, traceability code, and other background areas. During the lithium battery production process, positive and negative signs are marked in the central circle area to distinguish the positive and negative poles for subsequent assembly. Therefore, in order to reduce the influence of irrelevant areas, the embodiment of the present invention can obtain the tab center point by extracting the central circle area where the positive and negative poles are located, so that the tab area can be accurately obtained based on this, that is, continue to perform the following steps.
[0044] S2: Locate the center point of the battery cell tab in the tab image.
[0045] It should be noted that the Hough circle detection algorithm can extract circular regions in an image. However, if the radius parameter range set for the Hough circle detection algorithm is inaccurate, multiple non-circular regions will be located. Therefore, it is necessary to set the corresponding radius parameter for the Hough circle detection algorithm based on the characteristics of the battery tab image to accurately extract the circular region in the battery tab image. The purpose of setting the battery tab mark is to facilitate staff to distinguish between positive and negative poles, so the radius of the circular region where it is located is much smaller than the tab length.
[0046] Therefore, the embodiment of the present invention can set the radius parameter in the Hough circle detection algorithm according to the length of the tab, so as to accurately obtain the circular area in the battery cell tab image, and obtain the circular area where the center point of the tab is located from all circular areas based on the edge features in the circular area.
[0047] For example, the edge pixel points in the circular area can be obtained by using the Sober edge detection algorithm.
[0048] For example, in an embodiment of the present invention, locating the center point of the tab in the image of the battery cell tab includes: setting the radius parameter in the Hough circle detection algorithm according to the length of the tab to obtain a circular area in the image of the battery cell tab; obtaining the edge pixel points in the circular area, and subtracting 1 from the radius parameter of the circular area as the neighborhood radius of the center of the circle in the circular area; obtaining the number of all edge pixel points within the neighborhood radius of the center of each circular area to obtain the center point of the tab in the image of the battery cell tab.
[0049] When setting the radius parameter in the Hough circle detection algorithm according to the length of the tab, the radius parameter range can be set to (0, ) The ear length is; the radius range can be set according to actual needs, and the present embodiment is not limited too much here. After setting the radius parameter in the Hough circle detection algorithm, the specific steps of extracting the circular region in the cell tab image according to the Hough circle detection algorithm can be realized by the prior art, and the present embodiment is not repeated here.
[0050] For example, in the present embodiment, the number of all edge pixel points in the neighborhood radius of the center of each circular region is obtained to obtain the tab center point in the cell tab image, comprising: arranging all edge pixel points in the neighborhood radius of the center of all circular regions in the cell tab image in descending order, and obtaining the circular regions corresponding to the first two edge pixel points in the descending order, and taking the center of the circular region as the tab center point in the cell tab image.
[0051] It can be understood that the circular regions corresponding to the first two edge pixel points in the descending order are the two circular regions with the most edge pixel points, and the two circular regions are the positive and negative circular regions, and the centers of the two circular regions are the tab center points in the cell tab image, one is the positive tab center point, and the other is the negative tab center point.
[0052] According to the above steps, the tab center point in the cell tab image can be obtained, and by combining the tab center point and the tab edge rectangular feature, the tab region in the cell tab image can be obtained.
[0053] S3: Obtain the distance between each edge pixel point and the tab center point in the cell tab image, and divide to obtain a plurality of distance groups; calculate the preference degree of the tab center point in the distance group as a corner point to obtain the tab region in the cell tab image.
[0054] It can be understood that there are two tab regions in each cell tab image, which are the positive tab region and the negative tab region. The tab region is a rectangular region as a whole, the distance between the four corner points of the rectangular region and the tab center point of the tab region is equal, and the distance between the corner points and the tab center point on the rectangular edge is the farthest, and the polar angle difference between adjacent corner points is Therefore, according to the distance between all edge pixel points and the tab center point and the change of the polar angle, the present embodiment can accurately and completely extract the tab region in the cell tab image.
[0055] Wherein, the polar angle of each edge pixel point can be obtained by the inverse tangent function, and the polar angle of the edge pixel point is the polar angle of the edge pixel point relative to the tab center point of the circular region where the edge pixel point is located.
[0056] For example, the polar angle of the edge pixel point can be obtained by referring to the formula:
[0057] ;
[0058] is the polar angle of the edge pixel point in the circular region where the tab center point is located, is the abscissa of the tab center point, is the ordinate of the tab center point, is the ordinate of the edge pixel point, is the ordinate of the edge pixel point, is the abscissa of the edge pixel point, is the arctangent function, is the ratio of the circumference of a circle to its diameter.
[0059] For example, the edge pixel points with the same distance can be sorted according to the size of the polar angle, to obtain a plurality of distance groups, and the edge pixel points in each distance group have the same distance from the tab center point. The arrangement order of the polar angle can be ascending arrangement or descending arrangement.
[0060] In the sorting, adjacent edge pixel points are a group of adjacent edge pixel point pairs, the first edge pixel point and the last edge pixel point in the distance group are also a group of adjacent edge pixel point pairs, and if the number of edge pixel points in the distance group is , then the number of groups of adjacent edge pixel point pairs in the distance group is .
[0061] It can be understood that the corner points of the tab region are four, and therefore, the distance groups with the number of edge pixel points less than 4 can be removed to reduce the data processing amount.
[0062] For example, in the embodiment of the present application, the edge pixel points with the same distance are sorted according to the size of the polar angle to obtain a plurality of distance groups, and the embodiment further includes: in all distance groups, the distance groups with the number of edge pixel points less than 4 are removed.
[0063] For example, the degree of preference of the distance group in the tab center point as a corner point can be calculated according to the distance between the edge pixel points in the distance group and the tab center point, and the difference between the polar angle difference between adjacent edge pixel point pairs in the distance group and the polar angle difference between adjacent corner points of the rectangle.
[0064] For example, in the embodiment of the present application, the degree of preference of the distance group in the tab center point as a corner point is calculated, including:
[0065] ;
[0066] is the polar angle of the edge pixel point in the circular region where the tab center point is located, is the polar angle of the edge pixel point in the circular region where the tab center point is located, a distance group as the corner point, is the distance between the distance group and the ear center point, is the polar angle difference between adjacent corner points of the rectangle, is the distance between the distance group and the ear center point, is the distance between the distance group and the ear center point, is a linear normalization function, is an exponential function with base e, is an absolute value symbol.
[0067] In this calculation method, is the absolute value of the polar angle difference between all adjacent edge pixel pairs in the distance group in the ear center point, which is used to represent the degree of agreement between the edge pixel distribution and the rectangular corner point distribution in the distance group. The closer this value is to , the closer the shape formed by the edge pixel points in the distance group is to a rectangle.
[0068] Among the edge pixel points in the circular area of the ear center point, the edge pixel points that are farther apart can more completely divide the rectangular shape. Therefore, the distance between the distance group and the ear center point is greater, the greater the possibility that the ear center point is a corner point.
[0069] In summary, when the distance between the distance group and the ear center point is greater, if the absolute value of the polar angle difference between the adjacent edge pixel pairs in the distance group in the ear center point is closer to , it means that the distance group in the ear center point has a higher degree of preference as a corner point.
[0070] For example, in the embodiment of the present application, the distance group of the center point of the tab is taken as the preferred degree of the corner point to obtain the tab area in the tab image of the battery cell, which comprises: taking the edge pixel point in the distance group with the maximum preferred degree of the corner point of the center point of the tab as the corner point of the center point of the tab, and connecting the corner points of the center point of the tab in sequence and then performing mask processing to obtain the tab area in the tab image of the battery cell.
[0071] The specific steps of connecting the corner points of the center point of the tab in sequence and then performing mask processing to obtain the tab area in the tab image of the battery cell can be realized by the prior art, and the embodiment of the present application will not be repeated here.
[0072] The positive tab area and the negative tab area in the tab image of the battery cell can be obtained respectively according to the above steps, and the R parameter of each pixel point can be accurately adjusted by analyzing the possibility of each pixel point in the tab area being a defective pixel point, that is, the following steps are continued to be executed.
[0073] S4: setting a local area for each pixel point in the tab area, calculating an R parameter adjustment factor of the pixel point in the tab area according to the standard deviation of the gradient direction angle of the pixel point in the local area of the pixel point, and obtaining the R parameter of the pixel point according to the product of the R parameter adjustment factor and the standard deviation of the gray value in the local area of the pixel point.
[0074] The size of the local area of the pixel point can be set to 5*5, and can be set according to actual needs. When the local area of the pixel point is constructed, the local area of the pixel point can be constructed with the pixel point as the center.
[0075] It should be noted that, under normal circumstances, the defects in the tab image of the battery cell can be divided into foreground, and the normal pixel points can be divided into background. However, there may be a stain area on the surface of the tab, and a fixed R parameter may make the threshold excessively sensitive or sluggish, misjudging the normal tab area as background or misjudging the noise in the background as a tab defect.
[0076] Specifically, if the R parameter is too small, the gray contrast of the pixel point in the area with welding problems will be low, and since the local area contains defective pixel points of the same degree, the standard deviation of the gray value in the local area is greater than the R parameter, and the defective pixel point may be divided into normal background. Conversely, if the R parameter is too large, the standard deviation of the local gray value of the normal area pixel point will be small, so that the standard deviation of the gray value in the local area is less than the R parameter, and the normal pixel point is divided into a defective foreground.
[0077] Based on this, the embodiment of the present application can calculate the R parameter adjustment factor by obtaining the texture variation degree in each local area, so as to realize the adjustment of the R parameter.
[0078] For example, in the embodiment of the present application, the R parameter adjustment factor of the pixel point in the lug region is calculated according to the standard deviation of the gradient direction angle of the pixel point in the local region of the pixel point, comprising:
[0079]
[0080] is the R parameter adjustment factor of the i th pixel point in the lug region, is the standard deviation of the gradient direction angle of the pixel point in the local region of the i th pixel point, is the maximum value of the standard deviation of the gradient direction angle of the pixel point in the local region of all pixel points in the lug region, is a sign function, is a standard deviation threshold of the preset gradient direction angle.
[0081] Wherein, It can be set to 0.5, and can be set according to actual needs.
[0082] In this calculation method, is the gradient direction angle change in the local region of the i th pixel point in the lug region. The larger the value, the more complex the texture change in the local region of the current pixel point, which means that the current pixel point is more likely to be a welding defect point. At this time, the R parameter adjusted based on the R parameter adjustment factor needs to be greater than the gray scale standard deviation, so as to reduce the gray scale threshold of the pixel point and improve the possibility that the pixel point can be divided into a defect pixel point. Therefore, the corresponding R parameter adjustment factor also needs to be larger.
[0083] On the contrary, the smaller the value, the more consistent the texture change in the local region of the current pixel point, which means that the current pixel point is more likely to be in a normal lug smooth region. At this time, the R parameter adjusted based on the R parameter adjustment factor needs to be less than the gray scale standard deviation, so as to improve the gray scale threshold of the pixel point and improve the possibility that the pixel point can be divided into a normal pixel point. Therefore, the corresponding R parameter adjustment factor also needs to be smaller.
[0084] According to the above steps, the R parameter adjustment factor of each pixel point in the lug region can be obtained. Through the product of the R parameter adjustment factor of each pixel point and the gray scale standard deviation in the corresponding local region, the R parameter of each pixel point can be accurately obtained, so that the gray scale threshold of each pixel point can be accurately obtained based on this.
[0085] S5: using the R parameter of the pixel point in the Sauvola algorithm to obtain the gray scale threshold of each pixel point to obtain the defect detection result in the battery lug image.
[0086] For example, in the embodiment of the present application, the R parameter of the pixel point is substituted into the threshold formula of the Sauvola algorithm to obtain the gray threshold of each pixel point in the tab area, including:
[0087] ;
[0088] is the gray threshold of the i th pixel point in the tab area, is the mean value of the gray scale in the local area of the i th pixel point, is the standard deviation of the gray scale in the local area of the i th pixel point, is the R parameter value of the i th pixel point, is a preset adjustment parameter, which can be set to 0.5.
[0089] After obtaining the gray threshold of each pixel point according to the above formula, the defect area in the tab image of the battery cell can be obtained according to the comparison result of the gray value of each pixel point and the corresponding gray threshold.
[0090] For example, in the embodiment of the present application, the R parameter of the pixel point is used in the Sauvola algorithm to obtain the gray threshold of each pixel point, so as to obtain the defect detection result in the tab image of the battery cell, including: in response to the gray value of the pixel point in the tab area being greater than the gray threshold of the pixel point, obtaining the defect pixel point in the tab image of the battery cell.
[0091] It can be understood that if the gray value of the pixel point in the tab area is not greater than the gray threshold of the pixel point, it means that the pixel point is a normal pixel point. After obtaining the defect pixel point in the tab area, the defect pixel point can also be marked so that the staff can intuitively obtain the defect area in the tab area.
[0092] For example, if the proportion of the defect pixel point in the tab image of the battery cell is greater than the defect threshold, the tab of the battery cell is marked as unqualified.
[0093] The proportion can be obtained by the ratio of the number of defect pixel points in the tab image of the battery cell to the total number of pixel points in the tab image of the battery cell. The defect threshold can be set to 5%, which can be set according to actual needs.
[0094] It can be seen that in the embodiment of the application, when the defect detection result in the battery tab image is acquired, the battery tab image can be collected, and the center point of the tab in the battery tab image is located; the distance between each edge pixel point in the battery tab image and the center point of the tab is acquired, the edge pixel points with the same distance are sorted according to the size of the polar angle to obtain a plurality of distance groups; the distance between the edge pixel points in the distance group and the center point of the tab, and the difference between the polar angle difference between adjacent edge pixel point pairs in the distance group and the polar angle difference between adjacent corner points of the rectangle are used to calculate the preference degree of the distance group in the center point of the tab as a corner point, so as to obtain the tab area in the battery tab image; a local area is set for each pixel point in the tab area, the R parameter adjustment factor of the pixel point in the tab area is calculated according to the standard deviation of the gradient direction angle of the pixel point in the local area, and the R parameter of the pixel point is obtained according to the product of the R parameter adjustment factor and the gray standard deviation in the local area of the pixel point; the gray threshold of each pixel point is obtained by using the R parameter of the pixel point in the Sauvola algorithm, so as to obtain the defect detection result in the battery tab image, and the accuracy of the defect detection result in the battery tab image is effectively improved.
[0095] The embodiment of the application further discloses a battery tab detection system, comprising a processor and a memory, and the memory stores computer program instructions.
[0096] The above system further comprises a communication bus and a communication interface and other components familiar to those skilled in the art, the settings and functions of which are known in the art, and thus will not be described here.
[0097] In the application, the aforementioned memory can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, device or apparatus.
[0098] The above are preferred embodiments of the application, and are not intended to limit the protection scope of the application, therefore: any equivalent changes made on the structure, shape, principle of the application should be covered within the protection scope of the application.
Claims
1. A method of detecting a tab of a battery cell, the method comprising: capturing an image of the tab; and determining a tab type of the tab based on the image. The method comprises the following steps: Collecting a cell tab image, locating a tab center point in the cell tab image; Obtaining the distance between each edge pixel point in the cell tab image and the tab center point, sorting the edge pixel points with the same distance according to the size of the polar angle to obtain a plurality of distance groups; According to the distance between the edge pixel points in the distance group and the tab center point, and the difference between the polar angle difference between adjacent edge pixel point pairs in the distance group and the polar angle difference between adjacent rectangular corner points, the preferred degree of the distance group as a corner point in the tab center point is calculated to obtain the tab area in the cell tab image; Setting a local area for each pixel point in the tab area, calculating the R parameter adjustment factor of the pixel point in the tab area according to the standard deviation of the gradient direction angle of the pixel point in the local area, and obtaining the R parameter of the pixel point according to the product of the R parameter adjustment factor and the gray standard deviation in the local area of the pixel point. Using the R parameter of the pixel point in the Sauvola algorithm to obtain the gray threshold of each pixel point to obtain the defect detection result in the cell tab image.
2. The method of claim 1, wherein the step of detecting the tab comprises: The method comprises the following steps: After shooting the cell tab, preprocessing is performed to obtain the cell tab image, wherein each cell tab image includes a positive electrode cell tab and a negative electrode cell tab, and the length of the tab corresponding to the tab is obtained.
3. The method of claim 2, wherein the step of detecting the tab comprises: The method comprises the following steps: According to the length of the tab, the radius parameter in the Hough circle detection algorithm is set to obtain the circular area in the cell tab image; Obtaining the edge pixel points in the circular area, and taking the radius parameter of the circular area minus 1 as the neighborhood radius of the center of the circular area; obtaining the number of all edge pixel points within the neighborhood radius of the center of each circular area to obtain the tab center point in the cell tab image.
4. The method of claim 3, wherein the step of detecting the tab comprises: The method comprises the following steps: According to the number of all edge pixel points within the neighborhood radius of the center of all circular areas in the cell tab image, the circular areas corresponding to the first two edge pixel point numbers in the descending order are obtained, and the center of the circular area is taken as the tab center point in the cell tab image.
5. The method of claim 1, wherein the step of detecting the tab comprises: The method comprises the following steps: In all distance groups, the distance groups with less than 4 edge pixel points are removed.
6. The method of claim 1, wherein the step of detecting the tab comprises: The method comprises the following steps: ; is the distance between the first distance group and the first tab center point, is the distance between the first distance group and the first tab center point, is the distance between the first distance group and the first tab center point, is the distance between the first distance group and the first tab center point, is the distance between the first distance group and the first tab center point, is the distance between the first distance group and the first tab center point, is the distance between the first distance group and the first tab center point, is the distance between the first distance group and the first tab center point, is the distance between the first distance group and the first tab center point, is the distance between the first distance group and the first tab center point, is the distance between the first distance group and the first tab center point, is the distance between the first distance group and the first tab center point, is the distance between the first distance group and the first tab center point, is the distance between the first distance group and the first tab center point, is the distance between the first distance group and the first tab center point, is the distance between the first distance group and the first tab center point.
7. The method of claim 1, wherein the step of detecting the tab comprises: The method comprises the following steps: The edge pixel points in the distance group with the largest preferred degree of the distance group as a corner point in the tab center point are taken as the corner points of the tab center point, and the corner points of the tab center point are connected in turn and then masked to obtain the tab area in the cell tab image.
8. The method of claim 1, wherein the method further comprises: The method comprises the following steps: ; Ri is a R parameter adjustment factor for the i-th pixel point in the tab area, is a standard deviation of the gradient direction angle of the pixel points in the local area of the i-th pixel point, is a maximum value of the standard deviation of the gradient direction angle of the pixel points in the local area of all the pixel points in the tab area, is a sign function, is a standard deviation threshold of the preset gradient direction angle.
9. The method of claim 1, wherein the step of detecting the tab comprises: The R parameter of the pixel point is used in the Sauvola algorithm to obtain the gray threshold of each pixel point, so as to obtain the defect detection result in the cell tab image, comprising: The R parameter of the pixel point is substituted into the threshold formula of the Sauvola algorithm to obtain the gray threshold of each pixel point in the tab area; in response to the gray value of the pixel point in the tab area being greater than the gray threshold of the pixel point, the defect pixel point in the cell tab image is obtained.
10. An electrode tab detection system for an electric cell, the system comprising: Comprise: A processor and a memory, the memory stores computer program instructions, when the computer program instructions are executed by the processor, a kind of cell tab detection method according to any one of claims 1-9 is realized.
Citation Information
Patent Citations
Visual online detection method for laser welding spot of lithium battery tab
CN111307818A
Defect detection method for oil stain on surface of tab mold
CN116309537A