Battery negative pole post defect ultrasonic detection and discrimination method

By employing a combined image processing workflow of binarization, erosion, flooding filling, and dilation, the problem of separating the target area from the interference area in ultrasonic testing of power battery negative electrode posts has been solved, achieving high-precision and high-efficiency defect detection and adapting to automated testing of negative electrode posts of different specifications.

CN121190469BActive Publication Date: 2026-03-17GUANGDONG GOWORLD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-21
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing ultrasonic testing technology cannot effectively separate the target area from the interference area in the ultrasonic image of the negative electrode post of a power battery, resulting in a high rate of missed and false detections of defects. Furthermore, the fixed testing parameters cannot be adapted to negative electrode posts of different specifications, making it difficult to meet the high precision and high efficiency requirements of mass production.

Method used

A combined image processing workflow of binarization, two erosion processes, flooding filling, and dilation is adopted. The erosion kernel eliminates discontinuous connections and background residues, the flooding filling repairs the contours, and the dilation restores the real target area. Combined with pixel value statistics and grayscale value analysis, the target area is accurately extracted and defects are identified.

Benefits of technology

It improves the accuracy and adaptability of defect detection, reduces the rate of missed defects and false defects, realizes automated detection of negative electrode posts of different specifications, shortens changeover time, and ensures the quality consistency of mass production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121190469B_ABST
    Figure CN121190469B_ABST
Patent Text Reader

Abstract

The application discloses a kind of battery negative pole post defect ultrasonic detection discrimination methods, comprising the following steps: (1) ultrasonic image acquisition;(2) contour detection and target area extraction;(2-1) binary image is formed by image binaryzation processing;(2-2) all connected regions in binary image are detected once, to decide connected region is set as background or reserved;(2-3) corrosion processing eliminates intermittent connection;(2-4) flood fill repair;(2-5) second corrosion removes background residue;(2-6) all connected regions in binary image are detected twice, to decide connected region is set as background or reserved;(2-7) inflation processing restores the real contour of target area, and judge whether it is effective connected region;(2-8) center point positioning;(3) based on inner ring pixel value statistics, defect is judged to be discarded, to determine whether the inner ring of the battery negative pole post is normal;(4) based on outer ring gray value statistics, it is discriminated to be placed not straight to determine whether the battery negative pole post is placed straight.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of battery negative electrode post testing technology, and in particular to an ultrasonic testing and discrimination method for defects in battery negative electrode posts. Background Technology

[0002] As the core power source of electric vehicles, the performance and safety of automotive power battery packs directly determine the vehicle's range, operational stability, and driving safety. The negative terminal on the cover of the power battery structure is a key interface component for realizing battery power output. Due to the stringent requirements of power batteries for conductivity, structural strength, and stability, the negative terminal generally adopts a copper-aluminum composite structure. Copper ensures excellent conductivity, while aluminum balances lightweight and structural adaptability. However, controlling the quality of the bonding surface of this heterogeneous metal composite structure is extremely difficult.

[0003] During the manufacturing process, the copper-aluminum bonding surface is prone to defects such as voids, impurities, air pockets, and weak adhesion due to process fluctuations (e.g., deviations in welding parameters, incomplete surface treatment). If these defects are not detected in time, they can directly lead to poor battery pack contact or insufficient conductivity. Minor defects can cause increased internal resistance and accelerated energy loss, significantly reducing the vehicle's driving range (actual measurements show that severe copper-aluminum bonding defects can reduce range by 15%-20%). Severe defects can cause abnormally high local resistance at the bonding surface, generating a large amount of Joule heat during charging or discharging, resulting in a rapid temperature rise. This can not only damage the battery module but also potentially trigger thermal runaway, becoming a major hazard to driving safety. Therefore, defect detection at the copper-aluminum bonding surface is a core aspect of quality control in power battery production, directly impacting the reliability and market reputation of electric vehicles.

[0004] Current technology for inspecting the copper-aluminum interface of the negative electrode post in automotive power batteries employs ultrasonic testing. However, the image processing flow of existing ultrasonic testing technology is simple (mostly single binarization and connected component filtering), which cannot handle the complex scenarios of ultrasonic images of the negative electrode post: the inner and outer regions often exhibit discontinuous connections due to uneven ultrasonic reflection, and residual equipment shadows and image noise in the background are easily misjudged as target areas or defects, resulting in the inability to effectively separate the target area from the interference area. This creates hidden dangers for subsequent defect identification, increasing the rate of missed and false defects.

[0005] In addition, the diameter and inner / outer ring size of the negative terminal of the power battery vary depending on the vehicle model and battery capacity. However, the image processing parameters of the existing detection technology (such as threshold and corrosion / expansion core size) are fixed and cannot be adaptively adjusted according to the image characteristics of negative terminal of different specifications. Frequent shutdowns are required to adjust the parameters, resulting in low production efficiency and difficulty in meeting the high-precision and high-efficiency detection requirements of mass production. Summary of the Invention

[0006] The problem to be solved by the present invention is to provide an ultrasonic detection and discrimination method for defects in battery negative electrode posts. This ultrasonic detection and discrimination method for defects in battery negative electrode posts can accurately extract the target area, has strong anti-interference ability, and has strong adaptability and versatility.

[0007] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0008] A method for ultrasonic detection and identification of defects in a battery negative electrode post, characterized by comprising the following steps:

[0009] (1) Ultrasonic image acquisition: The negative electrode post of the battery is scanned by an ultrasonic probe to obtain a grayscale ultrasonic image of the negative electrode post. The grayscale ultrasonic image includes the inner ring area, the outer ring area and the background area of ​​the negative electrode post.

[0010] (2) Contour detection and target region extraction:

[0011] (2-1) Image binarization processing to form a binary image;

[0012] (2-2) Detect all connected regions in the binarized image at once to determine whether to set the connected regions as background or keep them;

[0013] (2-3) Erosion treatment to eliminate discontinuous connection: To address the phenomenon of discontinuous connection between the inner and outer regions, an erosion kernel of size b×b is used to perform erosion operation on the binarized image to reduce the range of connected regions and break the discontinuous connection between the inner and outer regions; the value of b is 3, 5 or 7.

[0014] (2-4) Flooding Fill Repair: Flooding fill is performed on the eroded image to fill the discontinuous connection area between the inner and outer ring areas, forming a complete outline of the target area;

[0015] (2-5) Secondary erosion to remove background residue: The image after filling is eroded again using an erosion kernel of size c×c to further reduce the connected region and erode the large background area of ​​the battery negative electrode column; the value of c is 13, 15, 17 or 19.

[0016] (2-6) Secondary detection of all connected regions in the binarized image to determine whether the connected regions are set as background or retained, remove interfering connected regions with excessively large or small pixel areas, and remove small background regions of the remaining battery negative electrode pillars.

[0017] (2-7) Dilation process restores the true contour of the target region and determines whether it is a valid connected region;

[0018] (2-8) Center point location: After determining the effective connected regions, calculate the coordinates of the geometric center point of each effective connected region as the reference position in subsequent defect detection and placement judgment;

[0019] (3) Perform defect rejection operation based on the inner circle pixel value statistics to determine whether the inner circle area of ​​the negative electrode post of the battery is normal;

[0020] (4) Perform an improper placement judgment operation based on the outer ring gray value statistics to determine whether the negative terminal of the battery is placed correctly.

[0021] The erosion kernels in steps (2-3) and (2-5) above function to shrink image boundaries or eliminate noise by replacing the central pixel value with a local minimum. Their parameters are typically square or circular, with sizes such as 3×3 or 5×5 (larger sizes result in a coarser effect). Their applications include burr removal and image structure refinement.

[0022] In the preferred embodiment, the specific steps for image binarization in step (2-1) are as follows:

[0023] Set a grayscale threshold 'a', perform binarization on the pixels of the grayscale ultrasound image, and determine whether the grayscale value of each pixel is greater than the grayscale threshold 'a'. The value of 'a' ranges from 18 to 25.

[0024] If the gray value of a pixel is greater than the gray value threshold a, then the gray value of that pixel is set to 255.

[0025] If the gray value of a pixel is not greater than the gray value threshold a, then the gray value of that pixel is set to 0.

[0026] When the grayscale value of all pixels is set to 255 or 0, the resulting image is a binarized image.

[0027] In the preferred embodiment, in step (2-2), all connected regions in the binarized image are detected at once, the pixel area of ​​each connected region is counted, and it is determined whether the pixel area of ​​the connected region is greater than a preset maximum area threshold or less than a preset minimum area threshold.

[0028] If the pixel area of ​​a connected region is greater than a preset maximum area threshold or less than a preset minimum area threshold, then the connected region is set as the background.

[0029] If the pixel area of ​​a connected region is not greater than a preset maximum area threshold and not less than a preset minimum area threshold, then the connected region is retained; 10000 < maximum area threshold < 13000, 800 < minimum area threshold < 1500.

[0030] In the preferred embodiment, in step (2-6), all connected regions in the binarized image are detected a second time, the pixel area of ​​each connected region is counted, and it is determined whether the pixel area of ​​the connected region is greater than a preset maximum area threshold or less than a preset minimum area threshold.

[0031] If the pixel area of ​​a connected region is greater than a preset maximum area threshold or less than a preset minimum area threshold, then the connected region is set as the background.

[0032] If the pixel area of ​​a connected region is not greater than a preset maximum area threshold and not less than a preset minimum area threshold, then the connected region is retained; 3000 < maximum area threshold < 5000, 100 < minimum area threshold < 500.

[0033] In the preferred embodiment, in step (2-7), a dilation kernel of size d×d is used to dilate each of the filtered connected regions to restore the true contour of the target region; the value of d ranges from 9 to 15; an area threshold e for the effective connected region is set, with a value range of 80 to 150; connected regions whose expanded pixel area is greater than the area threshold e are determined to be effective connected regions; if the expanded pixel area is not greater than the area threshold e, the connected region is discarded. The dilation kernel in step (2-7) above has the following functions: it expands the image region by replacing the central pixel value with the local maximum value; its parameters are similar to those of the erosion kernel, but the calculation method is reversed; its application is to connect and separate objects and fill holes.

[0034] In the preferred embodiment, the specific steps of step (3) for defect rejection based on inner circle pixel value statistics are as follows:

[0035] (3-1) Mask creation: Based on the center point position (x) of the effective connected region obtained in step (2-8) i ,y i ), with the central point of the connected region (x) i ,y i Using ) as the center, create a circular mask with radius r, the mask area covering the inner core region of the negative electrode post; the value of r ranges from 5 to 15;

[0036] (3-2) Pixel statistics: Traverse the A pixels in a single circular mask and count the number n of pixels with a gray value greater than 50, where n>0; if any pixel has a gray value greater than 50, then n+=1; then calculate the ratio of the number of pixels n with a gray value greater than 50 to the total number of pixels A in the circular mask according to ratio=n / A.

[0037] (3-3) Scrap judgment: Set a ratio threshold f, the value of f is 0.10-0.18; if the ratio ratio is greater than the ratio threshold f, it is determined that there is a defect in the inner ring area of ​​the negative terminal of the battery and it is scrapped; if the ratio is not greater than the ratio threshold f, it is determined that the inner ring area of ​​the negative terminal of the battery is normal.

[0038] The aforementioned circular mask, centered on the center point of the effectively connected area and with a radius r, precisely covers the core area of ​​the copper-aluminum bonding surface within the inner ring of the negative electrode post. This area is prone to defects (holes, impurities, and voids are mostly concentrated here). This circular mask design avoids interference from the non-core areas of the outer ring, ensuring that the inspection focuses on key risk points and improving the targeting and accuracy of defect identification. By statistically analyzing the proportion ratio of pixels with a gray value > 50 within the circular mask, the degree of defect is quantified into a specific numerical value, rather than relying on subjective observation: pixels with a gray value > 50 correspond to areas with abnormal ultrasonic reflection signals (i.e., where the defect is located). The higher the proportion, the more severe the defect. The proportion threshold f can be adjusted according to production process requirements, achieving standardized and unified rejection, avoiding differences in judgment between different batches and different inspectors, and ensuring the consistency of quality in mass production. The aforementioned pixel-by-pixel traversal statistical method can capture tiny abnormal pixels within the mask. Even small-scale weak adhesions or tiny holes can be identified through the cumulative effect of pixel proportions, improving the sensitivity to minor defects.

[0039] The key parameters a, b, c, d, e, and r mentioned above are all set based on the number of pixels. They can be flexibly adjusted according to the specifications of the negative electrode post (diameter, inner / outer ring size) and the resolution of the ultrasonic image. Without changing the detection equipment or reconstructing the algorithm model, they can be adapted to the detection of negative electrode posts of different vehicle models and power batteries of different capacities, shortening the production changeover time and improving versatility.

[0040] In the preferred embodiment, the specific steps of step (4) for determining misalignment based on the outer ring grayscale value statistics are as follows:

[0041] (4-1) Create a region mask

[0042] Using the effective connected regions determined in step (2-8) as boundaries, create a region mask that matches the outer contour of the battery negative electrode post; assuming there are m battery negative electrode posts in a single image, one battery negative electrode post region corresponds to one mask, and there are m masks in a single image, where m>0;

[0043] (4-2) Calculate the global average gray value B for all negative electrode regions of the battery.

[0044] Iterate through all the pixels contained in these m masks one by one, according to the formula total_value M +=pixel M, The grayscale values ​​of each pixel are summed sequentially to obtain the total grayscale value of all mask regions (total_value). M Simultaneously, count the total number of pixels M during the traversal, M>0; then use the formula B=total_value M / M, calculate the total grayscale value (total_value). MThe ratio to the total number M of pixel points is used to calculate the global average gray value B of all the battery negative pole regions in the image, which serves as a reference benchmark for determining the placement state of a single battery negative pole.

[0045] (4 - 3) Calculate the average gray value C of a single battery negative pole

[0046] For the mask corresponding to each battery negative pole, traverse the N pixel points it contains one by one. According to the formula total_value N += pixel N, The gray values of each pixel point are accumulated in sequence to obtain the total gray value total_value of the mask region N ; At the same time, count the number N of pixel points of the mask, N > 0; Then through the formula C = total_value N / N, calculate the ratio of the total gray value total_value N to the number N of pixel points, and calculate the average gray value C of the region of the single battery negative pole, which serves as the basis for judging the placement state of the battery negative pole;

[0047] (4 - 4) Mean comparison and discrimination

[0048] Based on the global average gray value B, the placement state of each battery negative pole is determined by the proportional relationship between the average gray value C of the region of the single battery negative pole and the global average gray value B:

[0049] If C < B × 0.8, it indicates that the gray value of the region of the battery negative pole is lower than the average level of all the battery negative poles in the image, then it is determined that the placement of the battery negative pole is incorrect;

[0050] If C ≥ B × 0.8, it indicates that the gray value of the region of the battery negative pole is consistent with the global average level of all the battery negative poles in the image, and it is determined that the placement of the battery negative pole is correct.

[0051] In the above step (4 - 4), if the placement of the battery negative pole is incorrect, it will lead to uneven ultrasonic reflection and a low gray value. Furthermore, it is necessary to place the battery negative pole correctly to make the ultrasonic reflection uniform and the gray value stable.

[0052] The above step (4) realizes the automatic determination of the placement state of the battery negative pole through the logic of "first calculate the global average gray value → then calculate the average gray value of a single battery negative pole → mean comparison and discrimination". By calculating the global average gray value B, the influence of overall interference factors such as illumination and the distance of the ultrasonic probe in a single gray ultrasonic image is eliminated, and a unified discrimination benchmark is established; Then, through the comparison between the average gray value C of a single battery negative pole and the global average gray value B, the gray value abnormality caused by incorrect placement is accurately identified, ensuring the accuracy and stability of the discrimination result.

[0053] Compared with the prior art, the present invention has the following advantages:

[0054] This invention addresses issues such as discontinuous connections between inner and outer rings, background residue, and noise interference through a combined image processing workflow of "binarization-double erosion-flood filling-secondary screening-dilation". The first erosion breaks the discontinuous connections, flood filling repairs the complete contour, the second erosion removes background residue, and dilation restores the real target area, improving the accuracy of extracting the final effective connected region. This provides a precise target area basis for subsequent defect detection and placement discrimination, and completely avoids defect omissions caused by region extraction deviations. Attached Figure Description

[0055] Figure 1 This is a flowchart illustrating an embodiment of the present invention;

[0056] Figure 2 This is a flowchart illustrating step (3) of an embodiment of the present invention;

[0057] Figure 3 This is a schematic diagram of step (4) of an embodiment of the present invention;

[0058] Figure 4 This is a schematic diagram of step (1) of an embodiment of the present invention;

[0059] Figure 5 This is a schematic diagram of step (2-1) of an embodiment of the present invention;

[0060] Figure 6 This is a schematic diagram of step (2-2) of an embodiment of the present invention;

[0061] Figure 7 This is a schematic diagram of steps (2-3) in an embodiment of the present invention;

[0062] Figure 8 These are schematic diagrams of steps (2-4) in an embodiment of the present invention;

[0063] Figure 9 These are schematic diagrams of steps (2-5) in an embodiment of the present invention;

[0064] Figure 10 These are schematic diagrams of steps (2-6) in an embodiment of the present invention;

[0065] Figure 11 These are schematic diagrams of steps (2-7) in an embodiment of the present invention;

[0066] Figure 12 This is a schematic diagram (a) of the image detection results of the battery negative electrode post according to an embodiment of the present invention;

[0067] Figure 13This is a schematic diagram (II) of the image detection results of the battery negative electrode post according to an embodiment of the present invention.

[0068] Figure 14 This is a schematic diagram (III) of the image detection results of the battery negative electrode post according to an embodiment of the present invention. Detailed Implementation

[0069] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0070] like Figure 1-11 As shown, the ultrasonic detection and discrimination method for battery negative electrode post defects in this embodiment includes the following steps:

[0071] (1) Ultrasonic image acquisition: The negative electrode post of the battery is scanned by an ultrasonic probe to obtain a grayscale ultrasonic image of the negative electrode post. The grayscale ultrasonic image includes the inner ring area, the outer ring area and the background area of ​​the negative electrode post.

[0072] (2) Contour detection and target region extraction:

[0073] (2-1) Image binarization processing to form a binary image;

[0074] (2-2) Detect all connected regions in the binarized image at once to determine whether to set the connected regions as background or keep them;

[0075] (2-3) Erosion treatment to eliminate discontinuous connection: In response to the phenomenon of discontinuous connection between the inner and outer regions, an erosion kernel of size 3×3 is used to perform erosion operation on the binarized image to reduce the range of connected regions and break the discontinuous connection between the inner and outer regions.

[0076] (2-4) Flooding Fill Repair: Flooding fill is performed on the eroded image to fill the discontinuous connection area between the inner and outer ring areas, forming a complete outline of the target area;

[0077] (2-5) Secondary erosion to remove background residue: The image after filling is eroded again using an erosion kernel of size 17×17 to further reduce the connected area and erode the large background area of ​​the battery negative electrode column.

[0078] (2-6) Secondary detection of all connected regions in the binarized image to determine whether the connected regions are set as background or retained, remove interfering connected regions with excessively large or small pixel areas, and remove small background regions of the remaining battery negative electrode pillars.

[0079] (2-7) Dilation process restores the true contour of the target region and determines whether it is a valid connected region;

[0080] (2-8) Center point location: After determining the effective connected regions, calculate the coordinates of the geometric center point of each effective connected region as the reference position in subsequent defect detection and placement judgment;

[0081] (3) Perform defect rejection operation based on the inner circle pixel value statistics to determine whether the inner circle area of ​​the negative electrode post of the battery is normal;

[0082] (4) Perform an improper placement judgment operation based on the outer ring gray value statistics to determine whether the negative terminal of the battery is placed correctly.

[0083] In step (2-1), the specific steps for image binarization are as follows:

[0084] Set the grayscale threshold a=20, perform binarization on the pixels of the grayscale ultrasound image, and determine whether the grayscale value of each pixel is greater than 20:

[0085] If the gray value of a pixel is greater than 20, then set the gray value of that pixel to 255;

[0086] If the gray value of a pixel is not greater than 20, then the gray value of that pixel is set to 0.

[0087] When the grayscale value of all pixels is set to 255 or 0, the resulting image is a binarized image.

[0088] In step (2-2), all connected regions in the binarized image are detected at once, the pixel area of ​​each connected region is counted, and it is determined whether the pixel area of ​​the connected region is greater than 12000 or less than 1000.

[0089] If the pixel area of ​​a connected region is greater than 12000 or less than 1000, then the connected region is set as the background.

[0090] If the pixel area of ​​a connected region is not greater than 12000 and not less than 1000, then the connected region is preserved.

[0091] In steps (2-6), all connected regions in the binarized image are detected a second time, the pixel area of ​​each connected region is counted, and it is determined whether the pixel area of ​​the connected region is greater than 4000 or less than 200.

[0092] If the pixel area of ​​a connected region is greater than 4000 or less than 200, then the connected region is set as the background.

[0093] If the pixel area of ​​a connected region is not greater than 4000 and not less than 200, then the connected region is preserved.

[0094] In step (2-7), a 12×12 dilation kernel is used to dilate each of the filtered connected regions to restore the true contour of the target region. An area threshold e=110 is set for the effective connected regions. Connected regions with an area greater than 110 after dilation are considered effective connected regions; if the area of ​​the dilated pixels is not greater than 110, the connected region is discarded. The dilation kernel in step (2-7) functions to expand the image region by replacing the central pixel value with a local maximum. Its parameters are similar to those of the erosion kernel, but the calculation method is reversed. Its applications include connecting separated objects and filling holes.

[0095] The specific steps for defect rejection based on inner circle pixel value statistics in step (3) are as follows:

[0096] (3-1) Mask creation: Based on the center point position (x) of the effective connected region obtained in step (2-8) i ,y i ), with the central point of the connected region (x) i ,y i Using ) as the center, create a circular mask with radius r, the mask area covering the inner core region of the negative electrode post; the value of r ranges from 5 to 15;

[0097] (3-2) Pixel statistics: Traverse the A pixels in a single circular mask and count the number n of pixels with a gray value greater than 50, where n>0; if any pixel has a gray value greater than 50, then n+=1; then calculate the ratio of the number of pixels n with a gray value greater than 50 to the total number of pixels A in the circular mask according to ratio=n / A.

[0098] (3-3) Scrap judgment: Set the ratio threshold f=0.12; if the ratio ratio is greater than 0.12, it is determined that there is a defect in the inner ring area of ​​the negative terminal of the battery and it is scrapped; if the ratio is not greater than 0.12, it is determined that the inner ring area of ​​the negative terminal of the battery is normal.

[0099] The aforementioned circular mask, centered on the center point of the effectively connected area and with a radius r, precisely covers the core area of ​​the copper-aluminum bonding surface within the inner ring of the negative electrode post. This area is prone to defects (holes, impurities, and voids are mostly concentrated here). This circular mask design avoids interference from the non-core areas of the outer ring, ensuring that the inspection focuses on key risk points and improving the targeting and accuracy of defect identification. By statistically analyzing the proportion ratio of pixels with a gray value > 50 within the circular mask, the degree of defect is quantified into a specific numerical value, rather than relying on subjective observation: pixels with a gray value > 50 correspond to areas with abnormal ultrasonic reflection signals (i.e., where the defect is located). The higher the proportion, the more severe the defect. The proportion threshold f can be adjusted according to production process requirements, achieving standardized and unified rejection, avoiding differences in judgment between different batches and different inspectors, and ensuring the consistency of quality in mass production. The aforementioned pixel-by-pixel traversal statistical method can capture tiny abnormal pixels within the mask. Even small-scale weak adhesions or tiny holes can be identified through the cumulative effect of pixel proportions, improving the sensitivity to minor defects.

[0100] The key parameters a, b, c, d, e, and r mentioned above are all set based on the number of pixels. They can be flexibly adjusted according to the specifications of the negative electrode post (diameter, inner / outer ring size) and the resolution of the ultrasonic image. Without changing the detection equipment or reconstructing the algorithm model, they can be adapted to the detection of negative electrode posts of different vehicle models and power batteries of different capacities, shortening the production changeover time and improving versatility.

[0101] The specific steps for step (4) of judging misplacement based on the statistics of outer ring gray values ​​are as follows:

[0102] (4-1) Create a region mask

[0103] Using the effective connected regions determined in step (2-8) as boundaries, create a region mask that matches the outer contour of the battery negative electrode post; assuming there are m battery negative electrode posts in a single image, one battery negative electrode post region corresponds to one mask, and there are m masks in a single image, where m>0;

[0104] (4-2) Calculate the global average gray value B for all negative electrode regions of the battery.

[0105] Iterate through all the pixels contained in these m masks one by one, according to the formula total_value M +=pixel M, The grayscale values ​​of each pixel are summed sequentially to obtain the total grayscale value of all mask regions (total_value). M Simultaneously, count the total number of pixels M during the traversal, M>0; then use the formula B=total_value M / M, calculate the total grayscale value (total_value). MThe ratio to the total number M of pixel points is used to calculate the global average gray value B of all the battery negative electrode post regions in the image, which serves as a reference benchmark for determining the placement state of a single battery negative electrode post;

[0106] (4-3) Calculate the average gray value C of a single battery negative electrode post

[0107] For the mask corresponding to each battery negative electrode post, traverse the N pixel points it contains one by one. According to the formula total_value N += pixel N, The gray values of each pixel point are successively accumulated to obtain the total gray value total_value of the mask region N ; At the same time, count the number N of pixel points in the mask, N>0; Then, through the formula C = total_value N / N, calculate the ratio of the total gray value total_value N to the number N of pixel points, and calculate the average gray value C of the single battery negative electrode post region, which serves as the basis for judging the placement state of the battery negative electrode post;

[0108] (4-4) Mean comparison and discrimination

[0109] Based on the global average gray value B, judge the placement state of each battery negative electrode post through the proportional relationship between the average gray value C of the single battery negative electrode post region and the global average gray value B:

[0110] If C < B×0.8, it means that the gray value of the battery negative electrode post region is lower than the average level of all the battery negative electrode posts in the image, then it is determined that the placement of the battery negative electrode post is incorrect;

[0111] If C ≥ B×0.8, it means that the gray value of the battery negative electrode post region is consistent with the global average level of all the battery negative electrode posts in the image, and it is determined that the placement of the battery negative electrode post is correct.

[0112] In the above step (4-4), if the placement of the battery negative electrode post is incorrect, it will cause uneven ultrasonic reflection and a low gray value. Furthermore, it is necessary to correct the placement of the battery negative electrode post to make the ultrasonic reflection uniform and the gray value stable.

[0113] The above step (4) realizes the automatic determination of the placement state of the battery negative electrode post through the logic of "first calculate the global average gray value → then calculate the average gray value of a single battery negative electrode post → mean comparison and discrimination". By calculating the global average gray value B, the influence of overall interference factors such as illumination and the distance of the ultrasonic probe in a single gray ultrasonic image is eliminated, and a unified discrimination benchmark is established; Then, through the comparison between the average gray value C of a single battery negative electrode post and the global average gray value B, the gray value abnormality caused by incorrect placement is accurately identified, ensuring the accuracy and stability of the discrimination result.

[0114] like Figure 12-14 As shown, after the rejection judgment in step (3-3), the normal negative terminal of the battery is marked with a blue circle, and the ratio is marked in blue, for example: Figure 12 As shown, the ratio at position A1 is 0.00 and the ratio at position D1 is 0.03.

[0115] The negative terminal of an abnormal battery is marked with a red circle, and the outer frame of the battery is also circled in red, with its location and ratio indicated in red. For example: Figure 12 As shown, the ratio at position B5 is 0.52.

[0116] After the judgment in step (4-4), the misplaced battery is circled in purple and its position is marked in red. For example, Figure 12 As shown, position C1 is circled in purple; Figure 14 As shown, position E4 is circled in purple.

[0117] Finally, the total number of abnormal and misplaced battery negative terminals is marked in red in the lower left corner of the image, for example: Figure 12 The Anomaly score in the bottom left corner is 7. Figure 13 The Anomaly value in the bottom left corner is 0. Figure 14 The Anomaly score in the bottom left corner is 6.

[0118] Furthermore, it should be noted that the names of the various parts of the specific embodiments described in this specification may differ. All equivalent or simple variations made to the structure, features, and principles described in this invention are included within the scope of protection of this invention. Those skilled in the art can make various modifications or additions to the described specific embodiments or use similar methods to replace them, as long as they do not deviate from the structure of this invention or exceed the scope defined in these claims, all of which should fall within the scope of protection of this invention.

Claims

1. A battery negative post defect ultrasonic detection discrimination method, characterized in that The method comprises the following steps: (1) ultrasonic image acquisition: scanning the negative pole of the battery by using an ultrasonic probe to obtain a gray ultrasonic image of the negative pole, wherein the gray ultrasonic image comprises an inner ring region, an outer ring region and a background region of the negative pole; (2) contour detection and target region extraction: (2-1) image binarization processing to form a binary image; (2-2) detecting all connected regions in the binary image once to determine whether the connected regions are background or reserved; (2-3) corrosion processing to eliminate intermittent connections: for the intermittent connection phenomenon between the inner ring region and the outer ring region, a corrosion kernel with a size of b*b is used to perform corrosion operation on the binary image, thereby reducing the range of the connected region and breaking the intermittent connection between the inner ring region and the outer ring region; the value of b is 3, 5 or 7; (2-4) flood fill repair: performing flood fill processing on the corroded image to fill the intermittent connection region between the inner ring region and the outer ring region, thereby forming a complete target region contour; (2-5) secondary corrosion to remove background residues: performing secondary corrosion on the filled image by using a corrosion kernel with a size of c*c, thereby further reducing the connected region and corroding the large background region of the negative pole of the battery; the value of c is 13, 15, 17 or 19; (2-6) secondary detection: detecting all connected regions in the binary image processed in step (2-5) to determine whether the connected regions are background or reserved, thereby removing the small background region of the negative pole of the battery; (2-7) dilation processing to restore the real contour of the target region and determine whether it is a valid connected region; (2-8) center point positioning: after determining the valid connected region, the geometric center point coordinates of each valid connected region are calculated as the reference position in subsequent defect detection and placement judgment; (3) defect judgment and rejection operation based on inner ring pixel value statistics to determine whether the inner ring region of the negative pole of the battery is normal: (3-1) Mask creation: according to the effective connected region center point position (x i ,y i ) obtained in step (2-8), a circular mask with a radius of r is created with the connected region center point (x i ,y i ) as the center, and the mask range covers the inner ring area of the negative pole; the value range of r is 5-15; (3-2) pixel statistics: traversing A pixel points in a single circular mask, counting the number n of pixel points with a gray value greater than 50, n>0; if the gray value of a pixel point is greater than 50, n+=1; then according to ratio=n / A, the ratio of the number n of pixel points with a gray value greater than 50 to the total number A of pixel points in the circular mask is calculated; (3-3) rejection judgment: setting a proportion threshold f, the value range of f is 0.10-0.18; if the ratio is greater than the proportion threshold f, it is determined that the inner ring region of the negative pole of the battery has defects and is rejected; if the ratio is not greater than the proportion threshold f, it is determined that the inner ring region of the negative pole of the battery is normal; (4) placement misalignment judgment operation based on outer ring gray value statistics to determine whether the negative pole of the battery is placed upright: (4-1) creating a region mask: creating a region mask matching the outer contour of the negative pole of the battery based on the valid connected region determined in step (2-8); (4-2) calculating the global average gray value B of all negative pole regions of the battery; (4-3) calculating the average gray value C of a single negative pole of the battery; (4-4) Average contrast discrimination: Taking the global average gray value B as the reference, the average gray value C of the single battery negative pole area is compared with the global average gray value B to determine the placement state of each battery negative pole.

2. The method of claim 1, wherein the method further comprises: determining the presence of the defect in the battery negative post based on the ultrasonic signal. The specific steps of the image binarization processing in the step (2-1) are as follows: ​ Set the gray threshold value a, and perform binarization conversion on the pixel points of the gray ultrasound image, and determine whether the gray value of the pixel point is greater than the gray threshold value a, and the value range of a is 18-25; If the gray value of the pixel point is greater than the gray threshold value a, the gray value of the pixel point is set to 255; If the gray value of the pixel point is not greater than the gray threshold value a, the gray value of the pixel point is set to 0; After the gray values of all pixel points are set to 255 or 0, a binary image is obtained.

3. The method of claim 1, wherein the method further comprises: determining the presence of the defect in the battery negative post based on the ultrasonic signal. In the step (2-2), all connected regions in the binary image are detected once, the pixel areas of the connected regions are counted, and it is determined whether the pixel area of the connected region is greater than a preset maximum area threshold or less than a preset minimum area threshold: ​ If the pixel area of the connected region is greater than the preset maximum area threshold or less than the preset minimum area threshold, the connected region is set as background; If the pixel area of the connected region is not greater than the preset maximum area threshold and not less than the preset minimum area threshold, the connected region is retained; 10000<maximum area threshold<13000, 800<minimum area threshold<1500.

4. The ultrasonic detection and discrimination method for battery negative electrode post defects as described in claim 1, characterized in that: In the step (2-6), all connected regions in the binary image are detected twice, the pixel areas of the connected regions are counted, and it is determined whether the pixel area of the connected region is greater than a preset maximum area threshold or less than a preset minimum area threshold: If the pixel area of the connected region is greater than the preset maximum area threshold or less than the preset minimum area threshold, the connected region is set as background; If the pixel area of the connected region is not greater than the preset maximum area threshold and not less than the preset minimum area threshold, the connected region is retained; 3000<maximum area threshold<5000, 100<minimum area threshold<500.

5. The ultrasonic detection and discrimination method for defects in the negative electrode post of a battery as described in claim 1, characterized in that: In the step (2-7), an inflation kernel with a size of dxd is used to perform inflation operation on the screened connected regions, and the true contour of the target region is restored; the value range of d is 9-15; an effective connected region area threshold e is set, and the value range of e is 80-150; the connected region with an inflated pixel area greater than the area threshold e is determined as an effective connected region; if the connected region with an inflated pixel area not greater than the area threshold e is discarded.

6. The battery negative pole defect ultrasonic detection and discrimination method of claim 1, wherein: After the region mask matching the battery negative pole outer contour is created in the step (4-1), the following operations are further performed: it is assumed that there are m battery negative poles in a single image, one battery negative pole region corresponds to one mask, there are m masks in a single image, and m>0. The specific operation of the step (4-2) of calculating the global average gray value B of all battery negative pole regions is as follows: all pixel points contained in the m masks are traversed one by one, and the gray value total_value M of all mask regions is obtained by sequentially accumulating the gray value of each pixel point according to the formula total_value M, +=pixel M ; meanwhile, the total number M of all pixel points in the traversal process is counted, and M>0; and then the ratio of the total gray value total_value M to the total number M of pixel points is obtained by the formula B=total_value M / M, so as to calculate the global average gray value B of all battery negative pole regions in the image as a reference benchmark for judging the placement state of a single battery negative pole. The specific operation of the step (4-3) calculating the average gray value C of the single battery negative pole is as follows: for each mask corresponding to the single battery negative pole, N pixel points contained in the mask are traversed one by one, and the total value of the gray values of the N pixel points is calculated according to the formula total_value N +=pixel N, The gray value of each pixel point is sequentially accumulated to obtain the total value of the gray values of the mask region total_value N ; meanwhile, the number of pixel points N of the mask is counted, and N>0; and then the ratio of the total gray value total_value N to the number of pixel points N is calculated by the formula C=total_value N / N to obtain the average gray value C of the single battery negative pole region, which is used as the basis for judging the placement state of the battery negative pole. The specific operation of determining the placement state of each battery negative pole column in step (4-4) based on the global average gray value B through the proportional relationship between the average gray value C of the single battery negative pole column area and the global average gray value B is as follows: If C < B x 0.8, it indicates that the gray value of the battery negative pole column area is lower than the average level of all battery negative pole columns in the image, and it is determined that the battery negative pole column is not placed correctly. If C >= B x 0.8, it indicates that the gray value of the battery negative pole column area is consistent with the global average level of all battery negative pole columns in the image, and it is determined that the battery negative pole column is placed correctly.

Citation Information

Patent Citations

  • Battery pole defect detection method and device, computer equipment and storage medium

    CN119624887A

  • Lithium battery end face defect detection method and device, electronic equipment and medium

    CN119991572A