A method, apparatus, and storage medium for subpixel edge detection of battery cell images.

By combining Zernike matrix subpixel edge detection and Firefly algorithm maximum entropy multi-threshold segmentation, the problem of high-precision edge detection for solar cells is solved, achieving high-precision and high-speed edge detection for solar cells, which is suitable for photovoltaic module production equipment.

CN116309275BActive Publication Date: 2025-10-28CHANGZHOU UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211593764.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-13
Publication Date
2025-10-28
Estimated Expiration
2042-12-13

AI Technical Summary

Technical Problem

Existing technologies make it difficult to achieve high-precision edge detection in solar cell production. Traditional algorithms cannot meet the high-precision requirements of cell appearance inspection and visual positioning, and are greatly affected by noise. The traditional maximum entropy threshold segmentation algorithm is slow.

Method used

The algorithm combines the Zernike moment subpixel edge detection algorithm with the firefly algorithm's maximum entropy multi-threshold segmentation algorithm. The edge points are initially located using the Canny operator, the optimal threshold is optimized using the firefly algorithm, the subpixel edge parameters are calculated using the Zernike moment, and the outline of the battery cell, the fine grid, and the main grid edge are extracted by least squares fitting.

Benefits of technology

The edge detection accuracy is reduced to within one pixel, the noise impact is reduced, the detection speed and accuracy are improved, and it can effectively identify and extract multiple target edges of the battery cell, which is suitable for the positioning and defect detection of photovoltaic module production equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116309275B_ABST
    Figure CN116309275B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, and storage medium for sub-pixel edge detection of battery cell images. The method includes: acquiring a preprocessed battery cell image; edge localization processing based on the Canny operator to obtain pixel-level edge point images; obtaining an optimal threshold using a maximum entropy multi-threshold segmentation algorithm based on the Firefly algorithm; calculating Zernike parameters for the pixel-level edge points using a Zernike moment sub-pixel edge detection algorithm; separating contour edge points, fine grid edge points, and main grid edge points based on the Zernike parameters and the optimal threshold; and performing least-squares fitting processing on these points to obtain the contour line, fine grid edge line, and main grid edge line of the battery cell. This invention, through the Zernike moment sub-pixel edge detection algorithm, reduces the edge detection accuracy to within one pixel and minimizes the impact of noise on detection accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method, apparatus, and storage medium for subpixel edge detection of battery cell images, belonging to the field of digital image technology. Background Technology

[0002] The automated production and processing of solar cells is cumbersome and complex. Silicon wafers are extremely brittle, easily damaged by process defects or environmental factors, resulting in surface defects such as chipped corners, broken edges, scratches, cracks, broken grids, and dirt. These defects reduce the yield of finished cells, and if not removed, will further affect the conversion efficiency. Therefore, it is crucial to inspect solar cells for defects before stringing and to remove defective cells. Machine vision-based defect inspection is gradually replacing traditional manual visual inspection due to its advantages of speed, efficiency, low cost, and non-contact operation. Defect inspection typically involves edge detection of the cells in an image to extract grid lines and contours. Furthermore, the grid lines printed on the front of the cells are used for positioning during stringing and dicing to guide the robotic arm's gripping.

[0003] Solar cells have low grayscale values ​​under visible light, and their grid lines are often only tens to hundreds of micrometers in size. Traditional image edge detection algorithms (such as Prewitt, Sobel, Canny, etc.) are designed for pixel-level edges, and their highest accuracy can only locate one pixel. Therefore, in actual production, it is difficult to meet the high-precision requirements for appearance inspection and visual positioning of solar cells.

[0004] The information disclosed in this background section is intended only to enhance the understanding of the overall background of the invention and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method, device and storage medium for subpixel edge detection of battery cell images. On the one hand, by using the Zernike moment subpixel edge detection algorithm, the edge detection accuracy is reduced to within one pixel and the impact of noise on the detection accuracy is reduced. On the other hand, the maximum entropy multi-threshold segmentation algorithm based on the firefly algorithm overcomes the problem of slow running speed of the traditional maximum entropy threshold segmentation algorithm.

[0006] To achieve the above objectives, the present invention is implemented using the following technical solution:

[0007] In a first aspect, the present invention discloses a method for sub-pixel edge detection of battery cell images, comprising,

[0008] Obtain the preprocessed image of the battery cell;

[0009] Based on the battery cell image, edge localization processing using the Canny operator is performed to obtain a pixel-level edge point image;

[0010] Based on the pixel-level edge point image, the optimal threshold is obtained using the maximum entropy multi-threshold segmentation algorithm based on the firefly algorithm.

[0011] Based on the pixel-level edge point image, the Zernike parameters of the pixel-level edge points are calculated using the Zernike moment subpixel edge detection algorithm.

[0012] Based on the Zernike parameters and optimal threshold of the pixel-level edge points, the contour edge points, fine gate edge points, and main gate edge points are separated.

[0013] The contour edge points, fine grid edge points, and main grid edge points are respectively subjected to least squares fitting to obtain the contour line, fine grid edge line, and main grid edge line of the battery cell;

[0014] Based on the outline, fine grid edge line, and main grid edge line, the sub-pixel edge detection result of the battery cell image is output.

[0015] Furthermore, the preprocessing of the battery cell image includes the following steps:

[0016] Obtain the raw battery cell image;

[0017] The original battery cell image is converted to grayscale and subjected to Gaussian filtering to obtain a preprocessed battery cell image.

[0018] Furthermore, the maximum entropy multi-threshold segmentation algorithm based on the firefly algorithm includes the following steps:

[0019] Initialize the firefly algorithm parameters based on the pixel-level edge point image;

[0020] Calculate the entropy function value of each firefly as its brightness, and sort them to obtain the position of the firefly with the highest brightness.

[0021] If the maximum number of iterations has not been reached, update the firefly position and return to the previous step to recalculate.

[0022] The three thresholds that output the firefly with the highest brightness when the maximum number of iterations is reached are taken as the optimal thresholds.

[0023] Furthermore, the expression for the entropy function value of the firefly is:

[0024]

[0025] In the formula, k1, k2, and k3 are the three thresholds for segmenting the image; p A1 pA2 p A3 p A4 Let p be the probability of the occurrence of the four divided regions A1, A2, A3, and A4, respectively. i Let be the probability of the i-th pixel-level edge point appearing.

[0026] Furthermore, the Zernike matrix subpixel edge detection algorithm includes:

[0027] The pixel-level edge point image is convolved based on a preset Zernike moment template to obtain the Zernike moment of the corresponding order;

[0028] Based on the Zernike moments and the three-grayscale transition model, the Zernike parameters of pixel-level edge points are calculated.

[0029] The formula for calculating the Zernike moment is as follows:

[0030] Z nm =P*M nm

[0031] Among them, Z nm Represents the nth-order m-th Zernike moment; P represents the convolution window matrix centered on pixel-level edge points; * denotes convolution; M nm Let represent the Zernike moment template matrix of order n and degree m.

[0032] Furthermore, the Zernike parameters of the pixel-level edge points include the vertical distance from the pixel-level edge point to the actual edge line, the angle between the perpendicular line from the actual edge line and the x-axis, and the step grayscale threshold.

[0033] The expression is as follows:

[0034]

[0035] Where l represents the vertical distance from the pixel-level edge point to the actual edge line; Represents the angle between the perpendicular line to the actual edge and the x-axis; k represents the step grayscale threshold; Re[Z] 11 [] represents the first-order Zernike moment Z. 11 The real part; Im[Z 11 [] represents the first-order Zernike moment Z. 11 The imaginary part of the transition; Δk represents the step gray level in the transition region; l1 represents the distance between the center and the left boundary of the transition region; l2 represents the distance between the center and the right boundary of the transition region.

[0036] Furthermore, the optimal threshold includes a first optimal threshold, a second optimal threshold, and a third optimal threshold;

[0037] Subpixel-level edge points are obtained based on the step grayscale threshold and the first optimal threshold of the Zernike parameters;

[0038] Based on the step grayscale threshold and the second optimal threshold of the Zernike parameters, the contour edge points of sub-pixel level edge points are obtained;

[0039] Based on the step grayscale threshold and the third optimal threshold of the Zernike parameters, the fine gate edge points and the main gate edge points of the sub-pixel level edge points are separated.

[0040] Furthermore, the expression for the sub-pixel level edge point is as follows:

[0041]

[0042] The constraints are:

[0043] k≥k1∩l≤l b

[0044] Where (x,y) are the pixel-level edge coordinates to be detected; (x s ,y s ) represents the sub-pixel level edge coordinates corresponding to the pixel-level edge point; N is the Zernike moment template size; k1 is the first optimal threshold; l b This is the distance threshold.

[0045] In a second aspect, the present invention discloses a sub-pixel edge detection device for battery cell images, including a processor and a storage medium;

[0046] The storage medium is used to store instructions;

[0047] The processor is configured to operate according to the instructions to perform the steps of the method according to any one of the first aspects.

[0048] Thirdly, the present invention discloses a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in any of the first aspects.

[0049] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:

[0050] The present invention provides a method, apparatus and storage medium for subpixel edge detection of battery cell images. On the one hand, by using the Zernike moment subpixel edge detection algorithm, the edge detection accuracy is reduced to within one pixel, and the impact of noise on the detection accuracy is reduced. On the other hand, the maximum entropy multi-threshold segmentation algorithm based on the firefly algorithm overcomes the problem of slow running speed of the traditional maximum entropy threshold segmentation algorithm.

[0051] This invention introduces a three-grayscale transition model into the Zernike moment subpixel edge detection algorithm, which is more practical than the traditional ideal step edge model.

[0052] This invention achieves adaptive multi-threshold segmentation through the maximum entropy multi-threshold algorithm, and can identify and extract multiple target edges of the cell outline, fine grid and main grid respectively.

[0053] This invention has the advantages of high precision, high speed and robustness, and can be effectively applied to the positioning and defect detection of solar cells in photovoltaic module production equipment. Attached Figure Description

[0054] Figure 1 This is a flowchart of a method for subpixel edge detection in battery cell images;

[0055] Figure 2 These are raw images of the battery cells taken by the camera;

[0056] Figure 3 This is a flowchart of the maximum entropy multi-threshold segmentation algorithm based on the firefly algorithm;

[0057] Figure 4 This is a schematic diagram of a three-grayscale transition model for sub-pixel edge detection;

[0058] Figure 5 It is an extracted image of the battery cell outline;

[0059] Figure 6 It is an extracted image of the main grid of the battery cell;

[0060] Figure 7 It is an extracted image of the fine grid pattern of the battery cell. Detailed Implementation

[0061] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.

[0062] Example 1

[0063] This embodiment 1 discloses a sub-pixel edge detection method for battery cell images, such as... Figure 1 As shown, including,

[0064] Obtain the preprocessed image of the battery cell;

[0065] Based on the battery cell image, edge localization processing using the Canny operator is performed to obtain a pixel-level edge point image;

[0066] Based on the pixel-level edge point image, the optimal threshold is obtained using the maximum entropy multi-threshold segmentation algorithm based on the firefly algorithm.

[0067] Based on the pixel-level edge point image, the Zernike parameters of the pixel-level edge points are calculated using the Zernike moment subpixel edge detection algorithm.

[0068] Based on the Zernike parameters and optimal threshold of the pixel-level edge points, the contour edge points, fine gate edge points, and main gate edge points are separated.

[0069] The contour edge points, fine grid edge points, and main grid edge points are respectively subjected to least squares fitting to obtain the contour line, fine grid edge line, and main grid edge line of the battery cell;

[0070] Based on the outline, fine grid edge line, and main grid edge line, the sub-pixel edge detection result of the battery cell image is output.

[0071] The technical concept of this invention is as follows: on the one hand, by using the Zernike matrix subpixel edge detection algorithm, the edge detection accuracy is reduced to within one pixel, and the impact of noise on the detection accuracy is reduced; on the other hand, the maximum entropy multi-threshold segmentation algorithm based on the firefly algorithm overcomes the problem of slow running speed of the traditional maximum entropy threshold segmentation algorithm.

[0072] like Figure 1 As shown, the specific steps are as follows:

[0073] 1. Battery cell image acquisition;

[0074] Using an area array or line array industrial camera, the solar cell is photographed under direct overhead lighting from a surface light source. The original image of the solar cell is shown below. Figure 2 As shown.

[0075] 2. Image grayscale conversion and denoising preprocessing;

[0076] Image preprocessing includes: weighting the R, G, and B channels of the original battery cell image into a single channel to achieve image grayscale conversion; then using a 3×3 Gaussian kernel to convolve the image to achieve image denoising, resulting in a preprocessed battery cell image.

[0077] 3. Use the Canny operator to coarsely locate the edges;

[0078] The Canny operator is used to coarsely locate pixel-level edges in the preprocessed image, obtaining pixel-level edge points and thus a pixel-level edge point image.

[0079] 4. Obtain the optimal thresholds k1, k2, and k3 based on the maximum entropy algorithm;

[0080] In traditional Zernike matrix subpixel edge detection, the step grayscale threshold used to determine boundary rejection needs to be set manually. Manually selecting the threshold makes it difficult to obtain the optimal edge position. If the threshold is too small, it will lead to redundant noise information, and if it is too large, it will cause the loss of edge information. Moreover, due to the influence of the shooting environment, it is difficult for the optimal step grayscale threshold to be consistent in the actual captured images, resulting in a large error in the final subpixel edge detection points. Therefore, it is necessary to introduce adaptive threshold segmentation in traditional Zernike matrix subpixel edge detection.

[0081] Furthermore, the grid lines of the battery cell are divided into main grids and fine grids. This invention aims to identify and distinguish them. Therefore, multi-target edge detection requires multiple thresholds for differentiation. Thus, this invention adopts the maximum entropy multi-threshold segmentation algorithm.

[0082] However, the traditional maximum entropy threshold segmentation algorithm is slow. Therefore, this invention improves the maximum entropy algorithm based on the firefly algorithm in swarm intelligence optimization algorithms, ultimately obtaining the optimal thresholds k1, k2, and k3. The algorithm flowchart is as follows: Figure 3 As shown, the specific steps are as follows:

[0083] 4.1 Input pixel-level edge point image;

[0084] 4.2 Initialize the firefly algorithm parameters;

[0085] Initialize the number of fireflies n, the initial positions of the fireflies X(k1,k2,k3), the initial attraction β0, the light intensity absorption γ, the step size factor α, and the maximum number of iterations T.

[0086] Initialize the number of fireflies n: Set according to the actual situation. The more fireflies, the more accurate the optimization will be, but the longer the optimization time will be. Based on experiments, it is set to 50 here; Set the initial position Xi(k1,k2,k3) of each firefly: The initial position is the three-dimensional position of the coordinate axes k1, k2, and k3 respectively. The initial position of each firefly is set randomly; Set the initial maximum attraction β0: Set to 1 here; Set the light intensity absorption coefficient γ: Set to 1 here; Set the step size factor α: A constant between 0 and 1, set to 0.02 here; Set the maximum number of iterations T: Set to 100 here.

[0087] 4.3 Calculate the entropy function value H(k1,k2,k3) of each firefly as the brightness l0;

[0088] In single threshold segmentation, for an image with L gray levels, let threshold k divide the image into two classes: background (A) and target (B). The probabilities of the background and target regions are respectively:

[0089]

[0090]

[0091] In the formula, p i Let p be the probability of the i-th pixel appearing. A With p B The sum of the probabilities is 1. The information entropy corresponding to the background and the target is expressed as:

[0092]

[0093]

[0094] The information entropy of the entire image is:

[0095]

[0096] Extending this to three-threshold segmentation, the total image entropy is then:

[0097]

[0098] In the formula, k1, k2, and k3 are the three thresholds for segmenting the image, and A1, A2, A3, and A4 are the four regions to be segmented; p A1 p A2 p A3 p A4 Let p be the probability of the occurrence of the four divided regions A1, A2, A3, and A4, respectively. i The probability of the i-th pixel-level edge point occurring. The threshold at which the total entropy reaches its maximum value. The optimal threshold is:

[0099]

[0100] Therefore, in the firefly algorithm, the information entropy function value H(k1,k2,k3) of each firefly is calculated and set as the brightness l0.

[0101] 4.4. Sort the positions corresponding to the fireflies with the highest brightness;

[0102] The relative brightness of fireflies in the colony is:

[0103]

[0104] In the formula, l0 is the information entropy function value H(k1,k2,k3) of each firefly, γ is the light intensity absorption coefficient, and r ij Let be the spatial distance between firefly i and firefly j.

[0105] 4.5. Determine if the maximum number of iterations T has been reached. If it has, proceed to step 4.6. If not, update the firefly's position and return to step 4.3.

[0106] The position of the firefly is updated by the following formula:

[0107] X i =X i +β(X j -X i )+α(rand-0.5),

[0108] In the formula, X i and X j Let represent the spatial positions of firefly i and firefly j, respectively; α is the step size factor; rand is a random factor uniformly distributed on [0,1]; (rand-0.5) is a perturbation term used to avoid prematurely falling into local optima; β is the attraction of firefly j to firefly i, and its calculation formula is:

[0109]

[0110] In the formula, β0 is the maximum attraction, which can be set according to the situation.

[0111] 4.6 The three thresholds k1, k2, and k3 of the firefly when the output brightness is maximum are taken as three optimal thresholds; where k1 is the first optimal threshold, k2 is the second optimal threshold, and k3 is the third optimal threshold.

[0112] 5. Calculate Zernike moments using a 7×7 convolution kernel;

[0113] 5.1 Constructing the Zernike rectangular template;

[0114] Select a 7×7 template and divide it into unit circles using a uniform 7×7 grid. Let S be the square region in the i-th row and j-th column. ij Let C be the unit circle region, then the template coefficient M corresponding to this square region is... nm (i,j) is:

[0115]

[0116] In the formula, V is an nth-order m-degree Zernike polynomial nm The conjugate polynomial of (ρ,θ), V nm (ρ,θ) is defined as follows:

[0117] V nm (ρ,θ)=R nm (ρ)e jmθ ,

[0118] In the formula, R nm (ρ) is a real-valued radial polynomial, defined as:

[0119]

[0120] This invention requires the use of Z to calculate Zernike parameters. 00 , Z 11 , Z 20 and Z 31 Four Zernike moments are required, therefore a corresponding 7×7 template M needs to be constructed. 00 、M 11 、M 20 、M 31 Then, the template is used to convolve the pixel-level edge point image after coarse localization to obtain the Zernike moments of the required order.

[0121] 5.2 Obtain the Zernike moments of the corresponding order;

[0122] The Zernike moments of the corresponding order are obtained using the following formula:

[0123] Z nm =P*M nm ,

[0124] In the formula, P is the convolution window matrix centered on pixel-level edge points, and M... nm Let be the template matrix of n-th order m-th Zernike moments, and * denote convolution.

[0125] The above expression can be represented in convolution form as follows:

[0126]

[0127] In the formula, N represents the size of the Zernike rectangular template, which is 7 in this case.

[0128] Therefore, it is necessary to use the constructed template to convolve the pixel-level edge point image after coarse localization to obtain the Zernike moments of the corresponding order.

[0129] 6. Calculate parameters using Zernike moments k, l;

[0130] In the Zernike parameters, l is the vertical distance from a pixel-level edge point to the actual edge line, which is the distance from the center pixel of the convolution window matrix P to the boundary tangent line. Let θ be the angle between the perpendicular line to the actual edge and the x-axis, and k be the gray-level difference between the background and the target, i.e., the step gray-level threshold. Rotating the edge by -θ, the Zernike moments of the image before and after the rotation have the following relationship:

[0131] Z' nm =Z nm e -jθ ,

[0132] Therefore, Zernike moments are rotationally invariant, meaning that only the phase angle changes before and after rotation, while the magnitude remains unchanged. Since the moments are symmetric about the x-axis after rotation, the imaginary part of Z1'1 is 0, and the angle θ can be solved using the imaginary and real parts of the first-order Zernike moments.

[0133]

[0134] In the formula, Re[Z 11 ] and Im[Z 11 ] respectively represent Z 11 The real and imaginary parts.

[0135] Traditional Zernike moment edge detection algorithms are based on an ideal step model of edges. However, in reality, due to non-ideal discrete sampling and diffraction effects of optical systems, transition regions often exist near edges in images. To describe grayscale values ​​that correspond to actual transition regions and thus improve detection accuracy, this invention uses... Figure 4 The figure shows a three-grayscale transition model of the edge. In the figure, h represents the background grayscale, h+Δk represents the grayscale value of the transition area, h+k represents the target grayscale value, and l1 and l2 represent the distances between the center and the left and right boundaries of the transition area, respectively.

[0136] according to Figure 4 The sub-pixel edge detection three-grayscale transition model shown below has edge parameters l1, l2, Δk, and k as follows:

[0137]

[0138] pass Figure 4 The geometric relationship of the three-grayscale transition model, and the relationship between the sub-pixel distance l and l1, l2, Δk, and k, can be expressed as follows:

[0139]

[0140] 7. Obtain precise sub-pixel level edge points based on Zernike parameters;

[0141] Precise sub-pixel level edge point coordinates are obtained using the following formula:

[0142]

[0143] In the formula, (x,y) are the pixel-level edge coordinates to be detected, (x... s ,y s Let be the coordinates of the sub-pixel-level edge point corresponding to the pixel-level edge point. For obtaining accurate sub-pixel-level edge points, the selection of parameters l and k is crucial; points on the boundary should satisfy the constraint k ≥ k. b ∩l≤l b , where k b and lb These are the grayscale threshold and the distance threshold, respectively. b The range of values ​​for is relatively small; based on the template effect, it is generally taken as . Here, N is the template number, which is 7; for k b In this invention, the threshold k1 at which the information entropy is maximized, optimized based on the firefly algorithm, is used as k. b .

[0144] 8. Obtain the contour lines and grid lines using least squares fitting.

[0145] The first optimal threshold k1 obtained in step 4 is selected to extract the outline of the solar cell; the second optimal threshold k2 is selected to extract the fine grid of the solar cell; and the third optimal threshold k3 is selected to extract the main grid of the solar cell.

[0146] For a battery cell image, the grayscale value is lowest in the outline of the battery cell, followed by the fine grid, and highest in the main grid.

[0147] Response to k≥k1∩l≤l b At the same time, it can acquire sub-pixel level edge points and remove background points;

[0148] When k≥k2, the contour points can be further separated;

[0149] When k≥k2, the fine gate edge points can be further separated, leaving the main gate edge points.

[0150] Finally, the least squares method was used to fit the sub-pixel level edge points of each part to obtain the accurate cell outline, fine grid edge line and main grid edge line respectively.

[0151] like Figure 5-7The figures show the battery cell outline, main grid, and fine grid images extracted by the sub-pixel edge detection method of this invention. As can be seen from the figures, the sub-pixel edge detection method for battery cell images based on Zernike moments provided by this invention can accurately detect edges with a detection error of less than 0.1 pixels. For a 4000×3000 pixel image in this embodiment, the detection runtime is approximately 500 milliseconds. This is higher than pixel-level edge detection methods, achieving a detection accuracy within one pixel. Compared to sub-pixel edge detection based on difference and fitting, because moments are obtained based on integration and can reflect local image features, the method has stronger noise resistance and higher positioning accuracy. Compared to grayscale moment and spatial moment sub-pixel edge detection algorithms, which are also based on moment methods, the Zernike moment-based method has lower computational complexity and orthogonality, resulting in higher detection accuracy and faster detection time. This method introduces a three-grayscale transition model into the traditional Zernike-based subpixel edge detection algorithm; it also utilizes a maximum entropy multi-threshold segmentation algorithm to achieve adaptive threshold segmentation; and it separately identifies and extracts multiple target edges, including the cell outline, fine grids, and main grids. Furthermore, it improves the slower maximum entropy algorithm by employing the firefly algorithm from swarm intelligence optimization algorithms. This invention has advantages such as high precision, high speed, and robustness, and can be effectively applied to the positioning and defect detection of solar cells in photovoltaic module production equipment.

[0152] Example 2

[0153] This embodiment 2 discloses a subpixel edge detection device for battery cell images, including a processor and a storage medium;

[0154] Storage media are used to store instructions;

[0155] The processor is configured to operate according to instructions to perform the steps of any of the methods according to Embodiment 1.

[0156] Example 3

[0157] This embodiment 3 discloses a storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of any of the methods in embodiment 1.

[0158] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0159] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0160] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0161] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0162] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for sub-pixel edge detection in battery cell images, characterized in that, include, Obtain the preprocessed image of the battery cell; Based on the battery cell image, edge localization processing using the Canny operator is performed to obtain a pixel-level edge point image; Based on the pixel-level edge point image, the optimal threshold is obtained using the maximum entropy multi-threshold segmentation algorithm based on the firefly algorithm. Based on the pixel-level edge point image, the Zernike parameters of the pixel-level edge points are calculated using the Zernike moment subpixel edge detection algorithm. Based on the Zernike parameters and optimal threshold of the pixel-level edge points, the contour edge points, fine gate edge points, and main gate edge points are separated. The contour edge points, fine grid edge points, and main grid edge points are respectively subjected to least squares fitting to obtain the contour line, fine grid edge line, and main grid edge line of the battery cell; Based on the outline, fine grid edge line and main grid edge line, the sub-pixel edge detection result of the battery cell image is output; The Zernike subpixel edge detection algorithm includes: The pixel-level edge point image is convolved based on a preset Zernike moment template to obtain the Zernike moment of the corresponding order; Based on the Zernike moments and the three-grayscale transition model, the Zernike parameters of pixel-level edge points are calculated. The formula for calculating the Zernike moment is as follows: ; in, Represents the Zernike moment of order m, of degree n; This represents a convolutional window matrix centered on pixel-level edge points; Represents convolution; Represents the Zernike moment template matrix of order n and degree m; The Zernike parameters of the pixel-level edge point include the vertical distance from the pixel-level edge point to the actual edge line, the angle between the perpendicular line of the actual edge line and the x-axis, and the step grayscale threshold, expressed as follows: ; Where l represents the vertical distance from the pixel-level edge point to the actual edge line; θ represents the angle between the perpendicular line of the actual edge line and the x-axis; and k represents the step grayscale threshold. Represents the first-order Zernike moment. The real part; Represents the first-order Zernike moment. The imaginary part of the value; ∆k represents the step gray level in the transition region; l1 represents the distance between the center and the left boundary of the transition region; l2 represents the distance between the center and the right boundary of the transition region; The optimal threshold includes a first optimal threshold, a second optimal threshold, and a third optimal threshold; Subpixel-level edge points are obtained based on the step grayscale threshold and the first optimal threshold of the Zernike parameters; Based on the step grayscale threshold and the second optimal threshold of the Zernike parameters, the contour edge points of sub-pixel level edge points are obtained; Based on the step grayscale threshold and the third optimal threshold of the Zernike parameters, the fine gate edge points and the main gate edge points of the sub-pixel level edge points are separated.

2. The method for sub-pixel edge detection of battery cell images according to claim 1, characterized in that, The preprocessing of the battery cell image includes the following steps: Obtain the raw battery cell image; The original battery cell image is converted to grayscale and subjected to Gaussian filtering to obtain a preprocessed battery cell image.

3. The method for sub-pixel edge detection of battery cell images according to claim 1, characterized in that, The maximum entropy multi-threshold segmentation algorithm based on the firefly algorithm includes the following steps: Initialize the firefly algorithm parameters based on the pixel-level edge point image; Calculate the entropy function value of each firefly as its brightness, and sort them to obtain the position of the firefly with the highest brightness. If the maximum number of iterations has not been reached, update the firefly position and return to the previous step to recalculate. The three thresholds that output the firefly with the highest brightness when the maximum number of iterations is reached are taken as the optimal thresholds.

4. The method for sub-pixel edge detection of battery cell images according to claim 3, characterized in that, The expression for the entropy function value of the firefly is: ; In the formula, k1, k2, and k3 are the three thresholds for segmenting the image; p A1 p A2 p A3 p A4 Let A1, A2, A3, and A4 be the probabilities of the four divided regions A1, A2, A3, and A4 respectively. p i Let be the probability of the i-th pixel-level edge point appearing.

5. The method for sub-pixel edge detection of battery cell images according to claim 1, characterized in that, The expression for the sub-pixel level edge point is as follows: ; The constraints are: ; in, The coordinates of the pixel-level edge points to be detected; N represents the coordinates of the sub-pixel level edge point corresponding to the pixel-level edge point; N is the Zernike rectangular template size. This is the first optimal threshold; This is the distance threshold.

6. A device for subpixel edge detection of battery cell images, characterized in that, Including processor and storage media; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps of the method according to any one of claims 1 to 5.

7. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Solar cell panel recognition method based on improved Canny operator and contour area threshold value

    CN107895376A

  • Image perspective correction method and device based on camera view angle transformation

    CN115115550A