Method for detecting whether battery is qualified or not
Through CT tomographic image analysis and line feature extraction, the battery OverHang is calculated and compared with the standard value, which solves the problem of low battery safety inspection efficiency in the prior art, and achieves fast and accurate battery detection.
Patent Information
- Application Number
- CN202510122819.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-26
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-01-26
AI Technical Summary
In the prior art, the battery safety inspection is inefficient and difficult to achieve rapid detection. Especially in electric vehicles and energy storage systems, the performance, life and safety of the battery become crucial.
By obtaining the CT tomographic image of the vertical cross section of the roll core area of the battery to be detected as the two-dimensional feature image to be detected, the grayscale value of each horizontal pixel sequence number is accumulated, the straight line segment is extracted, the pole piece is divided, the battery OverHang is calculated, and the standard battery OverHang is compared to the standard battery OverHang to determine whether the battery is qualified.
It realizes rapid detection of the battery, improves detection efficiency, ensures battery safety, and improves the accuracy of battery OverHang detection.
Smart Images

Figure CN120070351A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of battery safety inspection, and particularly to a method for detecting whether a battery is qualified. Background Art
[0002] In recent years, with the growth of the demand for electric vehicles and energy storage systems, the performance, lifespan, and safety of batteries have become crucial.
[0003] In the prior art, a dedicated CT software is relied on to manually mark and assist in positioning the anode and cathode of the battery electrode sheet, thereby calculating the battery OverHang value to achieve the safety inspection of the battery. This method is not only time-consuming but also requires a large amount of manual operation, and it is difficult to achieve rapid detection of the battery for application in battery production.
[0004] Therefore, there is an urgent need for a technical solution that can quickly detect whether a battery is qualified. Summary of the Invention
[0005] In view of the above analysis, an embodiment of the present invention aims to provide a method for detecting whether a battery is qualified to solve the problem of low efficiency in the safety inspection of batteries in the prior art.
[0006] An embodiment of the present invention provides a method for detecting whether a battery is qualified, and the method includes:
[0007] Obtain a CT tomographic image including the longitudinal cross-section of the core area of the battery to be detected as the two-dimensional feature image to be detected; wherein, the abscissa and ordinate of each pixel point in the two-dimensional feature image to be detected are pixel numbers.
[0008] Accumulate the gray values of the pixel points corresponding to each abscissa pixel number at all ordinate pixel numbers in the two-dimensional feature image to be detected to obtain the total gray value corresponding to each abscissa pixel number; determine the abscissa pixel numbers corresponding to all electrode sheets in the battery to be detected according to the total gray value corresponding to each abscissa pixel number.
[0009] Perform line feature extraction on the two-dimensional feature image to be detected to obtain all straight line segments in the two-dimensional feature image to be detected; divide all straight line segments among all electrode sheets according to the electrode sheet thickness and the abscissa pixel numbers corresponding to all electrode sheets to determine the pixel points corresponding to each electrode sheet.
[0010] Determine the difference in the ordinate pixel numbers between the adjacent cathode and anode electrode sheets according to the maximum ordinate pixel number of the pixel points corresponding to each electrode sheet, and combine with the height of each pixel point to obtain the OverHang of the battery to be detected.
[0011] Compare the OverHang of the battery to be detected with the OverHang of the standard battery to determine whether the battery to be detected is qualified.
[0012] Based on a further improvement of the above method, obtaining a CT tomographic image including a longitudinal cross-section of the core region of the battery to be detected as the two-dimensional feature image to be detected includes:
[0013] Place the electrode tab direction of the battery to be detected perpendicular to the channel direction of the CT scanner, and obtain all CT tomographic images parallel to the electrode tab direction of the battery to be detected;
[0014] Determine the tomographic serial numbers where the battery core is located in all CT tomographic images according to the design parameters of the battery to obtain the range of core tomographic serial numbers;
[0015] Select a serial number from the range of core tomographic serial numbers as the preset intermediate serial number, and use all pixel points in the tomographic image of the preset intermediate serial number as the two-dimensional feature image to be detected.
[0016] Based on a further improvement of the above method, the preset intermediate serial number is the central tomographic serial number in the range of core tomographic serial numbers.
[0017] Based on a further improvement of the above method, the comparing the OverHang of the battery to be detected with the OverHang of the standard battery to determine whether the battery to be detected is qualified includes:
[0018] Determine the threshold range of the OverHang of the standard battery according to the design parameters of the standard battery;
[0019] Compare and judge the OverHang of all electrode tabs in the OverHang of the battery to be detected with the threshold range of the OverHang of the standard battery;
[0020] Among them, if the OverHang of all electrode tabs in the OverHang of the battery to be detected is within the threshold range of the OverHang of the standard battery, the battery to be detected is qualified; otherwise, the battery to be detected is unqualified.
[0021] Based on a further improvement of the above method, the determining the abscissa pixel serial numbers corresponding to all electrode tabs in the battery to be detected according to the total gray value corresponding to each abscissa pixel serial number includes:
[0022] Use the moving average method to smooth the total gray value corresponding to all abscissa pixel serial numbers to obtain a smoothed gray value sequence;
[0023] Adopt the peak-valley value judgment method to determine multiple gray value local peaks and multiple gray value local valleys in the smoothed gray value sequence;
[0024] Take the abscissa pixel number corresponding to each grayscale local peak as the abscissa pixel number of an anode plate, and at the same time take the abscissa pixel number corresponding to each grayscale local valley as the abscissa pixel number of a cathode plate.
[0025] Based on a further improvement of the above method, the line feature extraction is performed on the two-dimensional feature image to be detected to obtain all straight line segments in the two-dimensional feature image to be detected, including:
[0026] Use a preset mask to respectively determine the gradient magnitude and horizontal line angle of each pixel point in the two-dimensional feature image to be detected, delete the pixel points in the two-dimensional feature image to be detected whose gradient magnitude is lower than the preset gradient threshold, and obtain the remaining pixel points;
[0027] According to the gradient magnitude and horizontal line angle of the remaining pixel points, combine the preset tolerance value to divide the remaining pixel points into multiple line support regions;
[0028] According to the gradient magnitude of all pixel points in each line support region, determine the center and orientation angle of the approximation rectangle corresponding to each line support region; after satisfying the center and orientation angle of the approximation rectangle corresponding to each line support region, use the smallest circumscribed rectangle containing all pixel points in each line support region as the approximation rectangle corresponding to each line support region, and obtain the approximation rectangles corresponding to multiple line support regions;
[0029] Screen the approximation rectangles corresponding to each line support region, and use the screened approximation rectangles as straight line segments to obtain all straight line segments in the two-dimensional feature image to be detected.
[0030] Based on a further improvement of the above method, the step of using a preset mask to respectively determine the gradient magnitude and horizontal line angle of each pixel point in the two-dimensional feature image to be detected includes:
[0031] Calculate the gradient magnitude of each pixel point in the abscissa pixel number direction and the gradient magnitude of each pixel point in the ordinate pixel number direction through the preset mask;
[0032] Calculate the gradient magnitude and horizontal line angle of each pixel point through the following formula:
[0033]
[0034] where G(x, y) represents the gradient magnitude of each pixel point, x and y represent the abscissa pixel number and ordinate pixel number of each pixel point, θ represents the horizontal line angle of each pixel point, and g x (x, y) represents the gradient magnitude of each pixel point in the abscissa pixel number direction, and g y (x, y) represents the gradient magnitude of each pixel point in the ordinate pixel number direction.
[0035] Based on further improvements to the above method, each line support region is determined through the following steps:
[0036] Step S801: Use the pixel point with the largest gradient magnitude among the remaining pixel points as the seed pixel point of the line support region. Take the horizontal line angle of the pixel point with the largest gradient magnitude as the first deflection angle of the line support region. Add the seed pixel point to the pixel set of the line support region, and at the same time, delete the seed pixel point from the remaining pixel points;
[0037] Step S802: Determine the eight-neighbor pixel points of each pixel point in the pixel set from the remaining pixel points, and compare the deviation angle between the horizontal line angle of the eight-neighbor pixel points and the first deflection angle of the line support region; if the deviation angle is less than the preset tolerance value, add the corresponding eight-neighbor pixel point to the pixel set, and at the same time, delete the corresponding eight-neighbor pixel point from the remaining pixel points, and update the first deflection angle of the line support region based on the horizontal line angles of all pixel points in the pixel set;
[0038] Step S803: Loop and execute Step S802 until the deviation angles of the eight-neighbor pixel points of each pixel point in the pixel set are not less than the preset tolerance value, then take the obtained pixel set as the pixel points finally included in the line support region.
[0039] Based on further improvements to the above method, calculate the center and orientation angle of the approximation rectangle corresponding to each line support region through the following formula:
[0040]
[0041] Mv = λv;
[0042]
[0043]
[0044] where c x and c y respectively represent the abscissa pixel serial number coordinate and the ordinate pixel serial number coordinate of the center. G(j) represents the gradient magnitude of the j-th pixel point in each line support region. x(j) represents the abscissa pixel serial number of the j-th pixel point in each line support region. y(j) represents the ordinate pixel serial number of the j-th pixel point in each line support region. region represents the pixel point set included in each line support region; M represents the inertia matrix of the approximation rectangle, λ represents the minimum eigenvalue of the inertia matrix, v represents the eigenvector associated with the minimum eigenvalue, v y represents the component of the eigenvector in the direction of the ordinate pixel serial number, v xrepresents the component of the feature vector in the direction of the abscissa pixel number, θ′ represents the orientation angle of the approximation rectangle, and m xx 、m yy and m xy respectively represent the elements of the inertia matrix.
[0045] Based on a further improvement of the above method, the screening of the approximation rectangles corresponding to each line support region, and the screened approximation rectangles are used as straight line segments, including:
[0046] Calculate the second deflection angle between the horizontal line angle of each pixel point in each line support region and the orientation angle of the approximation rectangle respectively;
[0047] Take the pixel points with the second deflection angle lower than the preset second deflection angle as the alignment points of each approximation rectangle, and combine all the pixel points included in the approximation rectangle to determine the alignment point density of each approximation rectangle;
[0048] Judge whether the alignment point density of each approximation rectangle is greater than the preset alignment point density; if so, take this approximation rectangle as a straight line segment in the two-dimensional feature image to be detected.
[0049] Compared with the prior art, the present invention can at least achieve one of the following beneficial effects:
[0050] 1. By using the CT tomographic image of the longitudinal cross-section of the winding core region of the battery to be detected as the two-dimensional feature image to be detected, and then analyzing the gray values of the composed two-dimensional feature image to determine the abscissa pixel numbers corresponding to all the pole pieces of the battery to be detected, determining the pixel points corresponding to all the pole pieces of the battery to be detected according to the straight line segments extracted from the two-dimensional feature image to be detected, obtaining the battery OverHang of the battery to be detected, and quickly judging whether the battery is qualified by combining the standard battery OverHang, the detection efficiency of the battery is improved;
[0051] 2. Optimize and update the two-dimensional feature image to be detected, improve the contrast of the gray values of each pixel, reduce the background pixels in the two-dimensional feature image to be detected, improve the accuracy of battery OverHang detection, and further improve the accuracy of battery safety inspection.
[0052] In the present invention, the above technical solutions can also be combined with each other to achieve more preferred combination schemes. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can be made obvious from the description, or understood by implementing the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the content specifically pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The accompanying drawings are only for the purpose of showing specific embodiments and are not considered to be a limitation of the present invention. Throughout the drawings, the same reference numerals represent the same components.
[0054] Figure 1 It is a schematic flow chart of a method for detecting whether a battery is qualified provided by an embodiment of the present invention;
[0055] Figure 2 It is a schematic structural diagram of a two-dimensional feature image to be detected provided by an embodiment of the present invention;
[0056] Figure 3 It is a schematic curve diagram of a smoothed gray level sequence provided by an embodiment of the present invention;
[0057] Figure 4 It is a schematic flow chart of determining each line support region provided by an embodiment of the present invention. Detailed Embodiment
[0058] Next, the preferred embodiments of the present invention will be specifically described in conjunction with the accompanying drawings. Among them, the accompanying drawings form a part of this application and are used together with the embodiments of the present invention to explain the principle of the present invention, and are not used to limit the scope of the present invention.
[0059] A specific embodiment of the present invention discloses a method for detecting whether a battery is qualified. As Figure 1 shown, the method includes:
[0060] Step S101: Obtain a CT tomographic image including the longitudinal cross-section of the core region of the battery to be detected as the two-dimensional feature image to be detected; wherein, the abscissa and ordinate of each pixel point in the two-dimensional feature image to be detected are both pixel numbers;
[0061] Step S102: Accumulate the gray values of the pixel points corresponding to each abscissa pixel number in all ordinate pixel numbers of the two-dimensional feature image to be detected to obtain the total gray value corresponding to each abscissa pixel number; determine the abscissa pixel numbers corresponding to all the electrodes in the battery to be detected according to the total gray value corresponding to each abscissa pixel number;
[0062] Step S103: Perform line feature extraction on the two-dimensional feature image to be detected to obtain all the straight line segments in the two-dimensional feature image to be detected; divide all the straight line segments among all the electrodes according to the electrode thickness and the abscissa pixel numbers corresponding to all the electrodes, and determine the pixel points corresponding to each electrode;
[0063] Step S104: Determine the difference in the ordinate pixel numbers between the adjacent cathode and anode electrodes according to the maximum ordinate pixel number of the pixel points corresponding to each electrode, and combine the height of each pixel point to obtain the OverHang of the battery to be detected;
[0064] Step S105: Compare the OverHang of the battery to be detected with that of the standard battery to determine whether the battery to be detected is qualified.
[0065] Specifically, as Figure 1 shown, in step S101, select an industrial CT scanner with high-resolution imaging ability that can clearly present the internal structure of the battery, place the battery to be detected in the detection area of the industrial CT scanner, ensure that the entire structure of the battery to be detected can be completely and clearly captured by the CT scanner, and collect the CT tomographic images of the battery to be detected including the longitudinal cross-section of the core area, as Figure 2 shown, as the two-dimensional feature image to be detected.
[0066] Specifically, as Figure 2 shown, the two-dimensional feature image to be detected includes multiple pixel points on the abscissa and ordinate respectively. Locate each pixel point and use the abscissa pixel serial number and the ordinate pixel serial number.
[0067] Preferably, the obtaining of the CT tomographic image of the battery to be detected including the longitudinal cross-section of the core area as the two-dimensional feature image to be detected includes:
[0068] Place the electrode tab direction of the battery to be detected perpendicular to the channel direction of the CT scanner, and obtain all CT tomographic images parallel to the electrode tab direction of the battery to be detected;
[0069] Determine the tomographic serial number where the battery core is located in all CT tomographic images according to the design parameters of the battery to obtain the core tomographic serial number range;
[0070] Select a serial number from the core tomographic serial number range as the preset intermediate serial number, and use all pixel points in the tomographic image of the preset intermediate serial number as the two-dimensional feature image to be detected.
[0071] Specifically, in the channel of the CT scanner, the radiation source and the detector are symmetrically arranged on both sides of the channel, and the radiation emitted by the radiation source passes through the battery to be detected and is received and imaged by the detector. The electrode tab direction of the battery to be detected is the direction from the head to the tail of the battery, and the OverHang data of the battery is reflected in the head of the battery, and the electrode tab heights at the tail of the battery are the same.
[0072] It should be noted that when the battery to be detected is placed in the channel of the CT scanner and the electrode tab direction of the battery to be detected is perpendicular to the channel direction, all CT tomographic images of the battery to be detected in the longitudinal cross-section can be obtained at this time, as Figure 2 shown.
[0073] Specifically, in order to obtain all the OverHang of the electrodes in the battery to be detected, image information of all the electrodes is required in the two-dimensional feature image to be detected. According to the design parameters of the battery, the tomographic serial number of the battery core can be determined, and the tomographic serial number range of the battery core to be detected is obtained. Any tomographic serial number is selected from the tomographic serial number range as the preset intermediate serial number, and the CT tomographic image corresponding to the preset intermediate serial number is used as the two-dimensional feature image to be detected.
[0074] Preferably, the preset intermediate serial number is the central tomographic serial number in the tomographic serial number range of the battery core.
[0075] Exemplarily, the battery to be detected is placed at the central position of the channel of the CT scanner. The tomographic serial number range of the battery core in the CT tomographic image can be determined through the design parameters of the battery. The center of the tomographic serial number range of the battery core is selected. The visibility of the battery core area at the center is higher. As Figure 2 shown, at the same time, the image features of the electrodes on both sides are relatively obvious. Using the central tomographic serial number can further improve the detection result of the OverHang of the battery to be detected and improve the detection efficiency of whether the battery is qualified.
[0076] Preferably, after obtaining the two-dimensional feature image to be detected in step S101, the two-dimensional feature image to be detected is optimized and updated. The optimization and update include:
[0077] Performing gray level adjustment and filtering processing on the two-dimensional feature image to be detected, and deleting the pixel points with gray levels greater than the preset gray level threshold to obtain an intermediate two-dimensional feature image;
[0078] Calculating the gradient value of each pixel point in the two-dimensional intermediate feature image in the direction of the abscissa pixel serial number by using the Sobel operator to obtain the horizontal gradient value of each pixel point in the two-dimensional intermediate feature image;
[0079] Comparing the horizontal gradient value of each pixel point in the two-dimensional intermediate feature image with the preset gradient change threshold respectively, and deleting the pixel points with horizontal gradient values less than the gradient change threshold in the two-dimensional intermediate feature image to obtain the updated two-dimensional feature image to be detected.
[0080] Specifically, as Figure 2 shown, when optimizing and updating the two-dimensional feature image to be detected, the two-dimensional feature image to be detected may be weak in image contrast or have a large amount of noise, and the two-dimensional feature image to be detected is enhanced through gray level adjustment and filtering processing.
[0081] Specifically, when performing gray level adjustment, a linear gray level stretching algorithm is adopted to expand the gray level range of the two-dimensional feature image to be detected to the entire display range, making the details in the image clearer and more visible. Exemplarily, the entire display range is set to (0, 255).
[0082] Specifically, during the filtering process, Gaussian filtering is used to remove random noise in the two-dimensional feature image to be detected, while retaining the edge and detail information of the image.
[0083] Specifically, as Figure 2 shown, the battery housing appears as a high gray value area in the image, with a significant gray level difference from the battery electrode tab. To eliminate the influence of the housing, a threshold segmentation algorithm is adopted. By setting the gray level threshold, the pixel points with gray values greater than the gray level threshold are regarded as the housing area and deleted, obtaining an intermediate two-dimensional feature image.
[0084] Specifically, the horizontal gradient value of each pixel point in the intermediate two-dimensional feature image can highlight the areas with large gray level changes in the image, thereby effectively identifying the areas of the cathode and anode electrode tabs of the battery to be detected. Furthermore, the areas of the cathode and anode electrode tabs of the battery to be detected are retained for the next calculation, reducing the amount of calculation and enabling faster detection of the battery OverHang.
[0085] Specifically, the Sobel operator is selected to calculate the gradient value of each pixel point in the intermediate two-dimensional feature image in the direction of the abscissa pixel serial number, obtaining the horizontal gradient value of each pixel point in the intermediate two-dimensional feature image. Set the gradient change threshold. If the gradient value of a certain pixel point in the direction of the abscissa pixel serial number, that is, the horizontal gradient value, is greater than the gradient change threshold, it indicates that the certain pixel point may be the cathode and anode electrode tabs of the battery to be detected, and then it is retained, obtaining an optimized and updated two-dimensional feature image to be detected.
[0086] Specifically, in step S102, as Figure 2 shown, accumulate the gray values of the pixel points corresponding to each abscissa pixel serial number in the two-dimensional feature image to be detected at all ordinate pixel serial numbers, and the total gray value corresponding to each abscissa pixel serial number among the 0 - M abscissa pixel serial numbers can be obtained; determine the abscissa pixel serial numbers corresponding to all the electrode tabs in the battery to be detected according to the total gray value corresponding to each abscissa pixel serial number.
[0087] Preferably, the determining the abscissa pixel serial numbers corresponding to all the electrode tabs in the battery to be detected according to the total gray value corresponding to each abscissa pixel serial number includes:
[0088] Smoothing the total gray values corresponding to all abscissa pixel serial numbers by using the moving average method to obtain a smoothed gray sequence;
[0089] Adopting the peak-valley value judgment method to determine multiple gray local peaks and multiple gray local valleys in the smoothed gray sequence;
[0090] Take the abscissa pixel number corresponding to each grayscale local peak as the abscissa pixel number of an anode plate, and at the same time take the abscissa pixel number corresponding to each grayscale local valley as the abscissa pixel number of a cathode plate.
[0091] Specifically, smooth the total grayscale values corresponding to all abscissa pixel numbers according to the moving average method. The moving window can be selected as 3, that is, the total grayscale value corresponding to each abscissa pixel number after smoothing is the average of the total grayscale values corresponding to each abscissa pixel number, the previous abscissa pixel number, and the next abscissa pixel number before smoothing. It should be noted that when the window moves to the edge of the data sequence, it may exceed the range of the data sequence. The data sequence can be extended by repeating the boundary points so that the window is always within the data range, and finally a smoothed grayscale sequence is obtained, as Figure 3 shown.
[0092] Specifically, in the peak-valley value judgment method, compare the total grayscale values corresponding to a certain abscissa pixel number and the abscissa pixel numbers of the two adjacent ones before and after. If the total grayscale value corresponding to a certain abscissa pixel number is greater than the total grayscale values corresponding to the two adjacent abscissa pixel numbers before and after at the same time, it can be determined that the total grayscale value corresponding to a certain abscissa pixel number is a grayscale local peak; similarly, if the total grayscale value corresponding to a certain abscissa pixel number is less than the total grayscale values corresponding to the two adjacent abscissa pixel numbers before and after at the same time, it can be determined that the total grayscale value corresponding to a certain abscissa pixel number is a grayscale local valley.
[0093] Specifically, according to the imaging characteristics of the battery electrode plate, it can be known that the grayscale local peak corresponds to the column where the anode plate is located, and the grayscale local valley corresponds to the column where the cathode plate is located, that is, the abscissa pixel numbers of the anode plate and the cathode plate in the battery to be detected are determined.
[0094] It can be understood that in the battery to be detected, there are multiple cathode plates and anode plates arranged in sequence. The adjacent cathode plate and anode plate are taken as a group, and the height difference between the adjacent cathode plate and anode plate is determined as the battery OverHang.
[0095] Specifically, in step S103, line feature extraction is performed on the two-dimensional feature image to be detected to obtain all straight line segments in the two-dimensional feature image to be detected. It should be noted that due to the uneven distribution of the grayscale values of the pixel points of the electrode plate, each electrode plate may correspond to multiple straight line segments.
[0096] Preferably, the performing line feature extraction on the two-dimensional feature image to be detected to obtain all straight line segments in the two-dimensional feature image to be detected includes:
[0097] Using a preset mask, respectively determine the gradient magnitude and horizontal line angle of each pixel in the two-dimensional feature image to be detected, delete the pixels in the two-dimensional feature image to be detected whose gradient magnitude is lower than the preset gradient threshold, and obtain the remaining pixels;
[0098] According to the gradient magnitude and horizontal line angle of the remaining pixels, and in combination with a preset tolerance value, divide the remaining pixels into multiple line support regions;
[0099] According to the gradient magnitude of all pixels in each line support region, determine the center and orientation angle of the approximation rectangle corresponding to each line support region; after satisfying the center and orientation angle of the approximation rectangle corresponding to each line support region, use the minimum circumscribed rectangle containing all pixels in each line support region as the approximation rectangle corresponding to each line support region, and obtain the approximation rectangles corresponding to multiple line support regions;
[0100] Screen the approximation rectangles corresponding to each line support region, and use the screened approximation rectangles as straight line segments to obtain all straight line segments in the two-dimensional feature image to be detected.
[0101] Specifically, select a 2×2 preset mask, and calculate the gradient magnitude and horizontal line angle of each pixel respectively, that is, calculate the gradient magnitude of each pixel in the horizontal pixel serial number direction and the gradient magnitude of each pixel in the vertical pixel serial number direction.
[0102] Preferably, the step of using a preset mask to respectively determine the gradient magnitude and horizontal line angle of each pixel in the two-dimensional feature image to be detected includes:
[0103] Calculate the gradient magnitude of each pixel in the horizontal pixel serial number direction and the gradient magnitude of each pixel in the vertical pixel serial number direction through the preset mask;
[0104] Calculate the gradient magnitude and horizontal line angle of each pixel through the following formula:
[0105]
[0106] Among them, G(x, y) represents the gradient magnitude of each pixel, x and y represent the horizontal pixel serial number and vertical pixel serial number of each pixel, θ represents the horizontal line angle of each pixel, and g x (x, y) represents the gradient magnitude of each pixel in the horizontal pixel serial number direction, and g y (x, y) represents the gradient magnitude of each pixel in the vertical pixel serial number direction.
[0107] Specifically, calculate the gradient magnitude of each pixel in the horizontal pixel serial number direction and the gradient magnitude of each pixel in the vertical pixel serial number direction through the following formula:
[0108]
[0109] Among them, i(x, y) represents the gray value corresponding to the pixel point with the abscissa pixel serial number x and the ordinate pixel serial number y.
[0110] It should be noted that the pixel points with small gradient magnitudes correspond to the smooth or changing regions in the image, and they will cause large gradient calculation errors during quantization calculation. By screening out the pixel points with gradient magnitudes less than the gradient threshold through the preset gradient threshold, the calculation accuracy is improved, and further the accuracy of detecting the battery OverHang is improved.
[0111] Specifically, after determining the remaining pixel points, the remaining pixel points are divided into multiple line support regions by combining the gradient magnitudes and horizontal line angles of the remaining pixel points with a preset tolerance value.
[0112] Preferably, as Figure 4 shown, each line support region is determined through the following steps:
[0113] Step S801: Use the pixel point with the largest gradient magnitude among the remaining pixel points as the seed pixel point of this line support region, use the horizontal line angle of the pixel point with the largest gradient magnitude as the first deflection angle of this line support region, add the seed pixel point to the pixel set of this line support region, and at the same time delete the seed pixel point from the remaining pixel points;
[0114] Step S802: Determine the eight-neighbor pixel points of each pixel point in the pixel set from the remaining pixel points, and compare the deviation angle between the horizontal line angle of the eight-neighbor pixel points and the first deflection angle of this line support region; if the deviation angle is less than the preset tolerance value, add the corresponding eight-neighbor pixel point to the pixel set, and at the same time delete the corresponding eight-neighbor pixel point from the remaining pixel points, and update the first deflection angle of this line support region based on the horizontal line angles of all pixel points in the pixel set;
[0115] Step S803: Loop and execute Step S802 until the deviation angles of the eight-neighbor pixel points of each pixel point in the pixel set are not less than the preset tolerance value, then use the obtained pixel set as the pixel points finally included in this line support region.
[0116] It should be noted that, as Figure 2 shown, for multiple pixel points in the area where the same pole piece is located, the gradient magnitudes and horizontal line angles are almost the same. Through Step S801, Step S802, and Step S803, multiple pixel points in the area where each pole piece is located are jointly divided into a set as a line support region. It can be understood that considering the problem of uneven gray distribution of the same pole piece, the area where the same pole piece is located may be divided into multiple line support regions.
[0117] Specifically, as Figure 4 shown, in step S801, when determining each line support region, a pixel set of this line support region is established. The pixel point with the largest gradient magnitude is selected from the remaining pixel points as the seed pixel point of this line support region and added to the pixel set of this line support region. The horizontal line angle of the pixel point with the largest gradient magnitude is used as the first deflection angle of this line support region. At the same time, the seed pixel point of this line support region is deleted from the remaining pixel points, and the remaining pixel points are updated.
[0118] It should be noted that by setting the seed pixel points, the regions where the electrodes with higher contrast are located can be screened out in an orderly manner until all the regions where the electrodes are located are screened out.
[0119] Specifically, in step S802, the eight-neighborhood pixel points of each pixel point in the pixel set of this line support region are determined from the remaining pixel points. The remaining pixel points are further updated according to step S802. At the same time, the first deflection angle of this line support region is updated according to the following formula:
[0120]
[0121] where θ region represents the updated first deflection angle of this line support region, θ j represents the horizontal line angle of the j-th pixel point in the pixel set of this line support region, and ∑ j represents all the pixel points in the pixel set of this line support region.
[0122] Specifically, as Figure 4 shown, in step S803, by repeatedly executing step S802 until all the pixel points that satisfy this line support region are determined, the obtained pixel set is used as the pixel points finally included in this line support region.
[0123] Specifically, by repeatedly executing step S801, step S802, and step S803, the remaining pixel points can be divided into multiple line support regions, and each line support region corresponds to multiple pixel points.
[0124] Specifically, according to the gradient magnitudes of all the pixel points in each line support region, the center and orientation angle of the approximation rectangle corresponding to each line support region are determined.
[0125] Preferably, the center and orientation angle of the approximation rectangle corresponding to each line support region are calculated by the following formula:
[0126]
[0127]
[0128] Mv = λv;
[0129]
[0130] where c s and c y respectively represent the abscissa pixel serial number coordinate and the ordinate pixel serial number coordinate of the center, G(j) represents the gradient amplitude of the j-th pixel point in each line support region, x(j) represents the abscissa pixel serial number of the j-th pixel point in each line support region, y(j) represents the ordinate pixel serial number of the j-th pixel point in each line support region, region represents the set of pixel points included in each line support region; M represents the inertia matrix of the approximated rectangle, λ represents the minimum eigenvalue of the inertia matrix, v represents the eigenvector associated with the minimum eigenvalue, v y represents the component of the eigenvector in the direction of the ordinate pixel serial number, v x represents the component of the eigenvector in the direction of the abscissa pixel serial number, θ′ represents the orientation angle of the approximated rectangle, m xx and m yy and m xy respectively represent the elements of the inertia matrix.
[0131] Specifically, after determining the center and orientation angle of the approximated rectangle corresponding to each line support region, the minimum circumscribed rectangle containing all pixel points in each line support region is used as the approximated rectangle corresponding to each line support region, and approximated rectangles corresponding to multiple line support regions are obtained, with each line support region corresponding to one approximated rectangle.
[0132] It should be noted that, as Figure 2 shown, each line support region includes multiple pixel points, and the distribution of the multiple pixel points is irregular. Calculating the approximated rectangle corresponding to each line support region, that is, the pixel points included in the approximated rectangle need to include multiple pixel points of the line support region, reducing the influence of partial unevenness of the pole piece gray value and improving the detection accuracy.
[0133] Specifically, the approximated rectangles corresponding to each line support region are screened, and the screened approximated rectangles are used as straight line segments to obtain all straight line segments in the two-dimensional feature image to be detected.
[0134] Preferably, the screening of the approximated rectangles corresponding to each line support region, and using the screened approximated rectangles as straight line segments, includes:
[0135] Calculating the second deflection angle between the horizontal line angle of each pixel point in each line support region and the orientation angle of the approximated rectangle respectively;
[0136] Pixels with a second deflection angle lower than a preset second deflection angle are used as alignment points for each approximation rectangle, and the alignment point density of each approximation rectangle is determined by combining all the pixels included in the approximation rectangle.
[0137] Determine whether the alignment point density of each approximation rectangle is greater than a preset alignment point density; if so, regard this approximation rectangle as a straight line segment in the two-dimensional feature image to be detected.
[0138] Specifically, calculate the angular deviation between the horizontal line angle of all pixels in each line support region and the orientation angle of the approximation rectangle corresponding to this line support region as the second deviation angle. In combination with the preset second deflection angle, alignment points are determined, and the alignment point density is calculated by the following formula:
[0139]
[0140] where D(r) represents the alignment point density of the r-th approximation rectangle, k represents the number of alignment points of the approximation rectangle, length(r) and width(r) respectively represent the number of pixels included in the approximation rectangle in the direction of the abscissa pixel number and the number of pixels included in the direction of the ordinate pixel number.
[0141] Specifically, compare the alignment point density of each approximation rectangle with the preset alignment point density, and screen out the approximation rectangles with an alignment point density greater than the preset alignment point density as a straight line segment in the two-dimensional feature image to be detected, and finally obtain all the straight line segments in the two-dimensional feature image to be detected.
[0142] It should be noted that, as Figure 2 shown, the straight line segment corresponds to the local line feature in the figure, and the approximation rectangle describes a pixel region. When the alignment point density in the approximation rectangle is too small, that is, the alignment points account for a small proportion among all the pixels included in the approximation rectangle, the matching degree between the approximation rectangle and the line feature is poor and cannot fit the actual line feature well. At this time, it needs to be discarded to further improve the detection result of the straight line segment.
[0143] Specifically, as Figure 1 shown, in step S103, according to the pole piece thickness and the abscissa pixel numbers corresponding to all the pole pieces, all the straight line segments are assigned to all the pole pieces to determine the pixels corresponding to each pole piece.
[0144] Preferably, the step of assigning all the straight line segments to all the pole pieces according to the pole piece thickness and the abscissa pixel numbers corresponding to all the pole pieces to determine the pixels corresponding to each pole piece includes:
[0145] Determine the range of the abscissa pixel numbers corresponding to this pole piece according to the abscissa pixel number corresponding to this pole piece and the pole piece thickness;
[0146] Select the straight line segments whose abscissa pixel numbers are within the abscissa pixel number range corresponding to the current electrode tab as the straight line segments corresponding to the current electrode tab, and all the pixel points in the straight line segments are used as the pixel points corresponding to the current electrode tab.
[0147] Specifically, in step S102, the abscissa pixel numbers corresponding to all the electrode tabs in the battery to be detected are obtained. Combining with the thickness of the electrode tab, the abscissa pixel number range where the current electrode tab is located can be determined, and all the straight line segments within the abscissa pixel number range where the current electrode tab is located are used as the straight line segments corresponding to the current electrode tab.
[0148] It should be noted that theoretically, each electrode tab corresponds to one straight line segment. However, due to the uneven gray distribution of the electrode tab, each electrode tab may correspond to multiple straight line segments, and all the pixel points in the straight line segments are used as the pixel points corresponding to the current electrode tab.
[0149] Specifically, as Figure 1 shown, in step S104, all the pixel points corresponding to each electrode tab are determined, and at this time, the maximum value of the ordinate pixel numbers among all the pixel points is determined.
[0150] Specifically, as Figure 2 shown, it can be understood that the abscissa of each pixel point is the abscissa pixel number and the ordinate is the ordinate pixel number. Calculate the difference in the ordinate pixel numbers between the adjacent cathode electrode tab and the anode electrode tab, that is, how many pixel points are the distance between the adjacent cathode electrode tab and the anode electrode tab in the direction of the ordinate pixel number. Combining with the height of each pixel point set and saved when the CT scanner scans the battery to be detected, the height difference between the adjacent cathode electrode tab and the anode electrode tab can be calculated, and the height differences between all the cathodes and anodes in the battery to be detected are obtained in turn, that is, the OverHang of the battery to be detected is obtained.
[0151] Specifically, as Figure 1 shown, in step S105, the OverHang of the battery to be detected obtained in step S104 is compared with the OverHang of the standard battery.
[0152] Preferably, the comparison of the OverHang of the battery to be detected with the OverHang of the standard battery to determine whether the battery to be detected is qualified includes:
[0153] Determine the threshold range of the OverHang of the standard battery according to the design parameters of the standard battery;
[0154] Compare and judge the OverHang of all the electrode tabs in the OverHang of the battery to be detected with the threshold range of the OverHang of the standard battery;
[0155] Among them, if the OverHang of all the electrode sheets in the OverHang of the battery to be detected is within the threshold range of the OverHang of the standard battery, the battery to be detected is qualified; otherwise, the battery to be detected is unqualified.
[0156] Specifically, when producing a certain type of battery, the threshold range of the OverHang of the standard battery is determined. When comparing the OverHang of the battery to be detected with the threshold range of the OverHang of the standard battery: if the OverHang of all the electrode sheets in the OverHang of the battery to be detected is within the threshold range of the OverHang of the standard battery, the battery to be detected is qualified; if the OverHang of any one electrode sheet in the OverHang of the battery to be detected exceeds the threshold range of the OverHang of the standard battery, the battery to be detected is unqualified.
[0157] It should be noted that by judging whether the battery to be detected is qualified through step S105, rapid detection of the battery is achieved, ensuring the safety of the battery.
[0158] Compared with the prior art, the method for detecting whether a battery is qualified provided by the embodiment of the present invention uses the CT tomographic image including the longitudinal cross-section of the core area of the battery to be detected as the two-dimensional feature image to be detected, and then analyzes the gray values of the composed two-dimensional feature image to be detected to determine the abscissa pixel numbers corresponding to all the electrode sheets of the battery to be detected. According to the straight line segments extracted from the two-dimensional feature image to be detected, the pixel points corresponding to all the electrode sheets of the battery to be detected are determined, and the OverHang of the battery to be detected is obtained. By combining with the OverHang of the standard battery, it quickly judges whether the battery is qualified, improving the detection efficiency of the battery; at the same time, optimizing and updating the two-dimensional feature image to be detected, improving the contrast of the gray values of each pixel, reducing the background pixels in the two-dimensional feature image to be detected, improving the accuracy of the OverHang detection of the battery, and further improving the accuracy of the battery safety inspection.
[0159] Those skilled in the art can understand that all or part of the processes of implementing the above method embodiments can be completed by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. Among them, the computer-readable storage medium is a magnetic disk, an optical disk, a read-only memory, or a random access memory, etc.
[0160] The above is only a specific and preferred embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention.
Claims
1. A method for detecting whether a battery is qualified, characterized in that: The method comprises: Obtain a CT tomographic image of a longitudinal cross section of a core region of the battery to be detected as a two-dimensional feature image to be detected; wherein the horizontal coordinate and the vertical coordinate of each pixel point in the two-dimensional feature image to be detected are both pixel numbers; Accumulate the grayscale values of the pixels corresponding to each horizontal axis pixel number on all vertical axis pixel numbers in the two-dimensional feature image to be detected, and obtain the total grayscale value corresponding to each horizontal axis pixel number; determine the horizontal axis pixel numbers corresponding to all the pole pieces in the battery to be detected according to the total grayscale value corresponding to each horizontal axis pixel number; Line feature extraction is performed on the two-dimensional feature image to be detected to obtain all straight line segments in the two-dimensional feature image to be detected; all straight line segments are divided into all pole pieces according to the thickness of the pole piece and the horizontal coordinate pixel sequence numbers corresponding to all pole pieces, and the pixel points corresponding to each pole piece are determined; Determine the difference in the ordinate pixel numbers of the adjacent cathode and anode pole pieces according to the maximum ordinate pixel number of the pixel point corresponding to each pole piece, and obtain the OverHang of the battery to be tested in combination with the height of each pixel point; Compare the OverHang of the battery to be tested with the OverHang of the standard battery to determine whether the battery to be tested is qualified.
2. The method according to claim 1, characterized in that The step of obtaining a CT tomographic image of a longitudinal cross section of a core region of the battery to be detected as a two-dimensional characteristic image to be detected includes: Place the pole piece direction of the battery to be tested perpendicular to the channel direction of the CT scanner, and obtain all CT tomographic images parallel to the pole piece direction of the battery to be tested; Determine the slice number of the battery core in all CT slice images according to the design parameters of the battery, and obtain the slice number range of the core; A number is selected from the range of core tomographic numbers as a preset intermediate number, and all pixel points in the tomographic image of the preset intermediate number are used as the two-dimensional feature image to be detected.
3. The method according to claim 2, characterized in that The preset middle serial number is the central fault serial number in the core fault serial number range.
4. The method according to claim 1, characterized in that: The step of comparing the OverHang of the battery to be tested with the OverHang of the standard battery to determine whether the battery to be tested is qualified includes: Determine the OverHang threshold range of the standard battery according to the design parameters of the standard battery; Compare and judge the OverHang of all pole pieces in the OverHang of the battery to be tested with the threshold range of the OverHang of the standard battery; Among them, if the OverHang of all pole pieces in the battery to be tested is within the threshold range of the standard battery OverHang, the battery to be tested is qualified; otherwise, the battery to be tested is unqualified.
5. The method according to claim 1, characterized in that The method of determining the horizontal coordinate pixel numbers corresponding to all the electrodes in the battery to be tested according to the total grayscale value corresponding to each horizontal coordinate pixel number includes: The total grayscale values corresponding to all horizontal coordinate pixel numbers are smoothed using the sliding average method to obtain a smooth grayscale sequence; A peak-valley value judgment method is used to determine a plurality of gray-level local peak values and a plurality of gray-level local valley values in a smooth gray-level sequence; The horizontal axis pixel number corresponding to each grayscale local peak value is used as the horizontal axis pixel number of an anode electrode piece, and the horizontal axis pixel number corresponding to each grayscale local valley value is used as the horizontal axis pixel number of a cathode electrode piece.
6. The method according to claim 5, characterized in that The line feature extraction is performed on the two-dimensional feature image to be detected to obtain all straight line segments in the two-dimensional feature image to be detected, including: Using a preset mask, the gradient amplitude and horizontal line angle of each pixel point in the two-dimensional feature image to be detected are determined respectively, and the pixel points whose gradient amplitude in the two-dimensional feature image to be detected is lower than the preset gradient threshold are deleted to obtain the remaining pixel points; According to the gradient amplitude and horizontal line angle of the remaining pixels and the preset tolerance value, the remaining pixels are divided into multiple line support areas; According to the gradient amplitude of all pixels in each line support area, the center and orientation angle of the approximation rectangle corresponding to each line support area are determined; after satisfying the center and orientation angle of the approximation rectangle corresponding to each line support area, the minimum circumscribed rectangle containing all pixels in each line support area is used as the approximation rectangle corresponding to each line support area, and the approximation rectangles corresponding to multiple line support areas are obtained; The approximate rectangle corresponding to each line support area is screened, and the screened approximate rectangle is used as a straight line segment to obtain all the straight line segments in the two-dimensional feature image to be detected.
7. The method according to claim 6, characterized in that The method of using a preset mask to respectively determine the gradient amplitude and the horizontal line angle of each pixel point in the two-dimensional feature image to be detected includes: Calculate the gradient amplitude of each pixel point in the direction of the horizontal pixel number and the gradient amplitude in the direction of the vertical pixel number by using a preset mask; The gradient amplitude and horizontal line angle of each pixel are calculated by the following formula: Among them, G(x, y) represents the gradient amplitude of each pixel point, x and y represent the horizontal coordinate pixel number and vertical coordinate pixel number of each pixel point, θ represents the horizontal line angle of each pixel point, and g x (x, y) represents the gradient amplitude of each pixel in the direction of the horizontal coordinate pixel number, g y (x, y) represents the gradient amplitude of each pixel in the direction of the vertical coordinate pixel number.
8. The method according to claim 7, characterized in that Determine each line support region by following these steps: Step S801: taking the pixel with the largest gradient amplitude among the remaining pixels as the seed pixel of the line support area, taking the horizontal line angle of the pixel with the largest gradient amplitude as the first deflection angle of the line support area, adding the seed pixel to the pixel set of the line support area, and deleting the seed pixel from the remaining pixels; Step S802: Determine eight neighborhood pixel points of each pixel point in the pixel set from the remaining pixel points, and compare the deviation angle between the horizontal line angle of the eight neighborhood pixel points and the first deflection angle of the line support area; if the deviation angle is less than a preset tolerance value, add the corresponding eight neighborhood pixel points to the pixel set, delete the corresponding eight neighborhood pixel points from the remaining pixel points, and update the first deflection angle of the line support area based on the horizontal line angle of all pixel points in the pixel set; Step S803: looping through step S802 until the deviation angles of the eight neighborhood pixels of each pixel in the pixel set are no less than the preset tolerance value, and then taking the obtained pixel set as the pixel points finally included in the line support area.
9. The method according to claim 8, characterized in that The center and orientation angle of the approximate rectangle corresponding to each line support area are calculated using the following formula: Mv=λv; Among them, c x 、c y Respectively represent the horizontal and vertical pixel number coordinates of the center, G(j) represents the gradient amplitude of the j-th pixel point in each line support area, x(j) represents the horizontal pixel number of the j-th pixel point in each line support area, y(j) represents the vertical pixel number of the j-th pixel point in each line support area, reglon represents the set of pixels contained in each line support area; M represents the inertia matrix of the approximate rectangle, λ represents the minimum eigenvalue of the inertia matrix, v represents the eigenvector associated with the minimum eigenvalue, v y Represents the component of the feature vector in the direction of the vertical pixel number, v x represents the component of the feature vector in the direction of the horizontal pixel number, θ′ represents the orientation angle of the approximate rectangle, and m xx 、m yy and m xy They represent the elements of the inertia matrix respectively.
10. The method according to claim 6, characterized in that The filtering of the approximate rectangle corresponding to each line support area, and using the filtered approximate rectangle as a straight line segment, includes: Calculate the second deflection angle of the horizontal line angle of each pixel point in each line support area and the orientation angle of the approximate rectangle respectively; Using the pixel points whose second deflection angle is lower than the preset second deflection angle as the alignment points of each approximation rectangle, and determining the alignment point density of each approximation rectangle in combination with all the pixel points included in the approximation rectangle; It is determined whether the alignment point density of each approximation rectangle is greater than a preset alignment point density; if so, the approximation rectangle is used as a straight line segment in the two-dimensional feature image to be detected.
Citation Information
Patent Citations
Method for extracting line features of picture
CN111310769A
X-Ray process supervision feedback regulation closed-loop control method and system
CN114894821A
Method and equipment for detecting alignment degree of cathode and anode pieces of battery cell of wound lithium battery
CN116503348A
Method and equipment for detecting alignment degree of cathode and anode pieces of battery cell of laminated lithium battery
CN116721055A
Lithium battery winding OverHang detection method and system based on image projection
CN117704968A