Next Article in Journal
Microstructure, Mechanical Properties, and Lead–Bismuth Eutectic Corrosion Behaviors of FeCrAlY-Al2O3 Nanoceramic Composite Coatings
Previous Article in Journal
Synthesis and Characterization of Silica-Titanium Oxide Nano-Coating on NiTi Alloy
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Defects Detection of Lithium-Ion Battery Electrode Coatings Based on Background Reconstruction and Improved Canny Algorithm

1
Faculty of Printing, Packaging Engineering and Digital Media Technology, Xi’an University of Technology, Xi’an 710054, China
2
Shaanxi Beiren Printing Machinery Co., Ltd., Weinan 714000, China
*
Author to whom correspondence should be addressed.
Coatings 2024, 14(4), 392; https://doi.org/10.3390/coatings14040392
Submission received: 29 February 2024 / Revised: 25 March 2024 / Accepted: 25 March 2024 / Published: 27 March 2024

Abstract

:
Aiming to address the problems of uneven brightness and small defects of low contrast on the surface of lithium-ion battery electrode (LIBE) coatings, this study proposes a defect detection method that combines background reconstruction with an enhanced Canny algorithm. Firstly, we acquire and pre-process the electrode coating image, considering the characteristics of the electrode coating process and defects. Secondly, background reconstruction and the difference method are introduced to achieve the rough localization of coating defects. Furthermore, the image with potential defects undergoes enhancement through improved Gamma correction, and the PSO-OTSU algorithm with adaptive searching is applied to determine the optimal segmentation. Finally, precise defect detection is accomplished using the improved Canny algorithm and morphological processing. The experimental results show that, compared with the maximum entropy method, the region growth method, and the traditional Canny algorithm, the algorithm in this paper has a higher segmentation accuracy for defects. It better retains defect edge features and provides a more accurate detection effect for defects like scratches, dark spots, bright spots, metal leakage, and decarburization, which are difficult to recognize on the background of coating areas of electrodes. The proposed method is suitable for the online real-time defect detection of LIBE coating defects in actual lithium-ion battery industrial production.

1. Introduction

As new energy vehicles emerge as the future trend in the global automotive market, lithium-ion batteries (LIB), as the core components of these vehicles, are expected to witness rapid growth in their market demand. While the LIB industry is booming, the safety issues of LIBs cannot be ignored. The electrode is an essential component of LIBs [1]. The coating process of lithium-ion battery electrodes (LIBEs) is undertaken in an assembly line, and the effect of coating has an important impact on the battery capacity, internal resistance, cycle life, and safety [2]. According to statistics, the proportion of lithium battery failures caused by an improper electrode coating process has exceeded 10% [3]. Therefore, strict control of the production of LIBEs, the accurate detection of surface defects caused by the coating process, and the removal of defective LIBEs from the production process are essential ways to ensure the high quality of LIB production.
Artificial inspection was the main means for the defect detection of LIBEs in the past, which is susceptible to the influence of human factors, resulting in leakage or misdetection, meaning it cannot meet the requirements of the continuous optimization and upgrading of LIBE production lines. Machine vision detection technology has a fast processing speed and high detection accuracy, presenting clear advantages in detecting large quantities of defects on electrode coating surfaces. The Deep Learning Defect Detection Algorithm (DLDDA) may not achieve excellent defect diagnosis results when there are insufficient training data to train the neural network. Additionally, if the neural network model is complex, it is less likely to achieve online real-time defect detection [4]. Therefore, traditional machine vision-based defect detection algorithms (MV-DDA) are still widely applied to various products, such as steel [5], fabric [6], and electronic devices [7].
In order to improve the surface defect detection method for LIBEs, many scholars introduced machine vision technology into the defect detection field. Just et al. [8] proposed an LIBE surface defect detection method based on infrared thermal imaging technology. This method is unaffected by the shape and size of particulate contaminants, as well as the direction and wrinkles on the surface of the electrode. It can effectively detect defects caused by particulate contaminants on the surface of the electrode. Etiemble et al. [9] used X-ray imaging technology to detect the coating quality of LIBEs. This method detects air bubbles, thick edges, and scratches on the surface of LIBEs. Additionally, it monitors variations in the coating thickness of the electrode and the uniformity of the distribution of the coating slurry on the metal foil. Xu et al. [10] achieved the detection and classification of six types of defects on the surfaces of LIBEs, including dark spots, bright spots, metal leakage, decarburization, streaks, and bubbles, through centralized compensation algorithms and eccentricity decision rules. Liu et al. [11] improved the K-nearest neighbor (KNN) and Euclidean clustering segmentation methods for defect detection. They attempted to improve the clustering segmentation strategy to distinguish point clouds with defect features, and then used the contour fitting algorithm of the least squares method to determine the geometric features of each surface defect. Liu et al. [12] proposed a fast background compensation algorithm in order to reduce the effect of uneven illumination and uneven LIBE thickness on the background of the region of interest. Xu et al. [13] integrated Gamma correction with an LOG algorithm for the defect detection of LIBEs. Sun et al. [14] applied topological filtering and a Canny operator for electrode defect detection, aiming to solve the problems of uneven brightness and a low defect contrast in electrode images. Tao et al. [15] proposed a way to detect the defects of LIBEs based on a combination of mean shift and gray-level co-occurrence matrix (GLCM). But this method has a low accuracy in detecting low-contrast defects.
In the study of LIBE coating defect detection, although the performances of the existing algorithms have been improved to a certain extent, these algorithms do not exclude the interference of image background bright and dark stripes, and the detection accuracy of low-contrast scratches, dark spots, particles, and other defects still needs to be improved. In order to effectively improve the accuracy of LIBE coating defect detection, this paper proposes an LIBE coating defect detection method based on a combination of background reconstruction and the improved Canny algorithm. The specific structure of the paper is as follows: Section 2 combines the characteristics of the electrode coating process and electrode coating defects, builds an electrode coating image acquisition system, and pre-processes the acquired images. Section 3 adopts background reconstruction and the difference method to realize the rough localization of the electrode coating defects; the PSO-OTSU algorithm is used to obtain the optimal segmentation threshold by adaptive searching; improved Gamma correction is used to enhance the image; and the Canny operator realizes the accurate detection of the electrode coating defects. Section 4 provides experimental validation of the proposed filtering, enhancement algorithm, and defect detection method. Section 5 summarizes the full paper.

2. Electrode Coating Image Acquisition and Pre-Processing

2.1. Electrode Coating Process Analysis and Image Acquisition

The coating process of LIBEs includes evenly coating the mixed slurry with a thickness of 6–30 μm on the copper or aluminum foil [16]. The coating process of LIBEs is extremely complex, as shown in Figure 1. There are many factors affecting the coating effect, such as the manufacturing precision of the coating equipment, the smoothness of the equipment operation, the control of the dynamic tension in the coating process, the magnitude of the air volume in the drying process, and the temperature control curve, which will all affect the effect of the coating [17]. As a result of these factors, coating defects such as scratches (SC), bright spots (BS), dark spots (DS), metal leakage (ML), particles (PA), and decarburization (DE) may appear on the surface of the battery electrode during the coating process, as shown in Figure 2.
Combined with the actual process of electrode coating, the acquisition of electrode coating images is facilitated by the automatic optical inspection system (AOIS) depicted in Figure 3, which consists of a line array camera, lighting equipment, transmission system, labeling machine, industrial control machine, and programmable logic controller (PLC). The line array camera, situated within the lighting equipment, ensures stable lighting conditions for capturing images of the battery electrode coating. These images are then transmitted to the industrial control machine for the corresponding detection of defects on the battery electrode coating. If the results of the defect detection surpass the predetermined quality threshold, the industrial control machine communicates with the PLC to issue a control signal. This signal directs the labeling machine to apply a label to the areas of the electrode coating that do not meet the quality requirements.

2.2. Pre-Processing of Electrode Coating Image

2.2.1. Image ROI Extraction

The LIBE image acquired by the line array camera contains the bottom background region in addition to the electrode coating region, as shown in Figure 4a. In order to eliminate the interference introduced by the bottom background region to the electrode coating detection, the ROI extraction method [18] based on grayscale projection is used to extract the LIBE coated region, and the specific process is as follows:
If the width of the image is w and the height is h, the gray value sum of each column of the image g (x, y) is calculated and saved in the gray value sum array Ax, which is denoted by:
A x = { a 0 , a 1 , , a k x , , a w }
where a k x denotes the sum of the gray value of the kx-th column, and a k x is calculated by the equation:
a k x = j = 1 h g ( j , k x )
where g ( j , k x ) denotes the j-th column of the image and the gray value of the kx-th column.
Similarly, the gray value sum of each row of the image is calculated and saved in the gray value sum array Ay, which is denoted by:
A y = { a 0 , a 1 , , a k y , , a h }
The calculation of a k y is the same as that of a k x .
The most drastic jump in the gray value in Ax and Ay corresponds to the electrode coating edge position in the image, as shown in Figure 4c. The edge in the original image is marked and segmentation is performed to obtain the ROI image, which is the actual image of the battery electrode coating region, as shown in Figure 4d.

2.2.2. Image Denoising

The production environment of LIBs is complex. Their surfaces not only exist in an environment of fine dust, but there is also a tiny texture generated during the coating process on these surfaces, which will cause interference in subsequent defect detection. Therefore, bilateral filtering is used to de-noise the extracted electrode coating region. While considering the spatial distance between pixels, bilateral filtering adds the pixel value similarity to achieve edge preservation. In this paper, (i, j) is defined as the central point coordinate, and point (k, l) is any point in the neighborhood S centered at (i, j). The spatial distance d (i, j, k, l) and the grayscale difference range matrix r (i, j, k, l) from point (k, l) to point (i, j) are defined as the following equation:
d ( i , j , k , l ) = e ( i k ) 2 + ( j l ) 2 2 σ d 2
r ( i , j , k , l ) = e f ( k , l ) f ( i , j ) 2 2 σ r 2
Combining the spatial distance and grayscale difference matrix, the weight matrix factor formula for bilateral filtering is obtained by multiplying Equations (4) and (5), as shown in Equation (6).
ω ( i , j , k , l ) = e ( i k ) 2 + ( j l ) 2 2 σ d 2 + f ( k , l ) f ( i , j ) 2 2 σ r 2
where σd is the distance weight coefficient and σr is the pixel similarity weight coefficient.
Finally, the neighborhood S of the coordinate point is weighted and filtered to replace the initial value of the point, as shown in Equation (7):
g ( i , j ) = ( k , l ) S f ( i , j ) ω ( i , j , k , l ) ( k , l ) S ω ( i , j , k , l )
where g ( i , j ) denotes the pixel value after the bilateral filtering of the electrode coating image. f ( i , j ) is the original pixel value. ω ( i , j , k , l ) denotes the weight factor.

3. Electrode Coating Defects Detection

The image pre-processing suppresses much of the noise interference in the LIBE coating region, but there still exists an impact from bright and dark stripes. To enhance the defect detection accuracy in electrode coatings and mitigate the impact of bright and dark stripes in the background, we propose a method involving the rough localization and precise segmentation of potential defects. The main steps include: (1) obtaining potential defect regions for rough localization through background reconstruction and image differencing; (2) enhancing the processed potential defect region; and (3) adaptively obtaining the optimal segmentation threshold using the PSO-OTSU algorithm and extracting defect contours based on the improved Canny algorithm and morphological processing. The specific process is shown in Figure 5.

3.1. Rough Localization of Electrode Coating Defect

The pre-processed image signal h(x, y) is defined as follows:
h ( x , y ) = b ( x , y ) + d ( x , y ) + n ( x , y )
where b(x, y), d(x, y), and n(x, y) denote the background signal, defective signal, and noise signal, respectively.
From the perspective of the frequency domain, the background b(x, y) is mainly a low-frequency signal, the noise n(x, y) is generally a high-frequency signal, and the defect d(x, y) is in between, so the method of discrete cosine transform (DCT) is applied to separate the high- and low-frequency information in order to preliminarily eliminate the effect of uneven brightness from the background of the image. For an M × N image h (x, y), performing a discrete cosine transform can be expressed as:
C ( u , v ) = α ( u ) α ( v ) x = 0 M 1 y = 0 N 1 h ( x , y ) × cos [ π ( 2 x + 1 ) u 2 M ] × cos [ π ( 2 y + 1 ) v 2 N ]
where x , u = 0 , 1 , 2 , , M 1 ,   y , v = 0 , 1 , 2 , , N 1 ,   C ( u , v ) are the transformed DCT coefficients.
α ( u ) = { 1 M   for   u = 0 2 M   for   u 0 , α ( v ) = { 1 N   for   v = 0 2 N   for   v 0
The elements of the two columns C(u, 0) and C(0, v) in the coefficient matrix C(u, v) are the low-frequency part of the image, corresponding to the background information of the image. In order to suppress the effect of streak noise, the inflection points of the DCT coefficients in u = 0 and v = 0 are searched as the cutoff frequencies in the u and v directions, respectively, and are used as the DCT coefficients for the initial background reconstruction, as shown in Equation (11):
C B ( u , v ) = { C ( u , v ) , u = 0   or   v = 0 ;   u < h u   or   v < h v 0 ,   otherwise  
where h u and h v denote the cutoff frequencies in the u and v directions, respectively.
The DCT background reconstructed image can be obtained by applying the following discrete cosine inverse transformation to the coefficients:
B ( x , y ) = u = 0 M 1 v = 0 N 1 α ( u ) α ( v ) C B ( u , v ) × cos [ π ( 2 x + 1 ) u 2 M ] × cos [ π ( 2 y + 1 ) v 2 N ]
The DCT background reconstructed image is subtracted from the original image to generate the difference image, which separates the defects from the background, effectively isolating defects from the background and addressing the issue of uneven brightness. On this basis, the difference image undergoes row and column processing using probability statistics theory. This process identifies potential defective regions in each row and column, which are then merged using logical OR operations. The result is the final predicted defective region location. The gray value within the predicted defective region is assigned a value of 1, while the rest is set to 0.
After labeling the possible defective regions, the pixels in these regions are eliminated and the remaining pixel data (Irest(x, y)) are used to reconstruct the background image. Since the background gray level of the image can be approximated by a k-th order binary polynomial model fk(x,y) and the reconstruction accuracy is high, the polynomial surface fitting method is used to reconstruct the background of the remaining pixel data Irest(x, y):
f k ( x , y ) = m 0 , n 0 , m + n k a m n x m y n
In order to achieve a better balance between the computational speed and accuracy, k = 3 is taken and the specific equation is:
I rest   ( x , y ) = a 00 + a 10 x + a 01 y + a 20 x 2 + a 02 y 2 + a 11 x y + a 12 x y 2 + a 21 x 2 y + a 30 x 3 + a 03 y 3 + ε
where x, y are the coordinate values of the pixels used to reconstruct the background image, ε is the error term, and a00, a01, …, a30 are the corresponding coefficients in the polynomial.
Least squares regression is applied to solve for the model parameters by minimizing the sum of squared residuals:
I rest   ( x , y ) = Z A A = ( Z T Z ) 1 Z T I rest   ( x , y )
where Z = {1, x, y, x2, y2, xy, xy2, x2y, x3, y3}N×10, N is the number of pixels remaining after eliminating the predicted defective region, A = [a00, a10, a01, a20, a02, a11, a12, a21, a30, a03]T is the coefficient matrix to be solved, and the reconstructed background image r(x, y) can be obtained by solving the coefficient matrix according to Equation (15), as shown in Figure 6b. After obtaining the reconstructed background image r(x, y), the potential defect image I(x, y) can be obtained by subtracting the original image h(x, y) from the reconstructed background image r(x, y), as shown in Figure 6c. The acquired potential defect image I(x, y) is sliced into one or more ROI sub-images Ir(x, y) by morphological transformation and region-minimum outer rectangle transformation operations, as shown in Figure 6d.

3.2. Precision Detection of Electrode Coating Defect

3.2.1. Defective Image Enhancement

Given the elevated overall gray level of the image, the contrast between the defective target and the background lacks sufficient distinctiveness. Consequently, the edges of defects, including dark spots and particles, remain unclear. To accentuate the detailed information of the defects and facilitate precise defect detection, it is imperative to conduct enhancement processing on the obtained potential defective image.
In this paper, image enhancement is performed using improved Gamma correction. Gamma correction is an image enhancement method that performs a nonlinear operation on the gray values of the input image. It is commonly used to enhance the dark details of an image so that the gray values of the output image are exponentially related to the gray values of the input image [19]. The enhancement equation is as follows:
f ( x ) = x γ
where x is the normalized image; f(x) is the output image; and γ is the image enhancement parameter.
Gamma correction can enhance low-light images significantly. However, when there are both dark and bright parts in an image, traditional Gamma correction can only enhance in one direction. If the low-light part is enhanced, the bright part will be excessively enhanced, resulting in a loss of image details; if the high-light part is reduced, the low-light part will be darker. It also blurs the details of the image. For detecting electrode coating defects at the same time as bright defects, this paper proposes an improved Gamma correction method, which can enhance the dark part of the image, adjust the high-light part of the image, and enhance the low-light and high-light parts of the image as much as possible at the same time. The improved Gamma correction curve is expressed by:
f ( x ) = ln ( 255 x + a ) / b + 0.022 b + 0.5 , δ x 1
where δ is the value of x when f(x) = 0; and a and b are the adjustment parameters of the function, which can be jointly involved in adjusting the magnitude, as well as the range of the enhancement of the pixel points by the improved Gamma function. a and b are solved by the following equations:
{ z = log 10 0.5 / log 10 m b = 3 + 18.5 e g 0.32 a = e b ( 0.022 b 0.5 ) 1
where m is the normalized mean of pixels with a pixel value lower than 97 in the illumination component. When there is both light and dark information in the image, improved Gamma correction can be used to enhance the dark part of the image, and the luminance of the luminance component V is maintained or lowered according to the brightness information of the image, so as to realize the enhancement of the luminance of the dark part of the image and, at the same time, ensure the details of the bright part of the image are preserved and intact. An image of the improved Gamma correction function is shown in Figure 7b, with the curves y = x, z = 0.9, z = 0.7, z = 0.5, z = 0.3, and z = 0.2 from bottom to top:
The potential defect images are enhanced using the improved Gamma correction. Figure 8(a1–a3) show scratches, dark spots, and decarburization defects, respectively, and Figure 8(b1–b3) show the corresponding enhanced images. It can be clearly seen that the contrast of the defect images has been significantly improved, and there is a certain sharpening effect. Figure 9(a1–a3) show the grayscale histogram of the defect image before enhancement, whose grayscale values are mainly concentrated within a range of 50–100; Figure 9(b1–b3) show the grayscale histogram of the defect image after enhancement, with the range of the concentrated area of grayscale values becoming larger, the grayscale values in the dark part being more uniformly distributed, and both the bright and dark regions being enhanced.

3.2.2. Defective Image Segmentation

Defect image segmentation is performed to extract the defective region from the image background, including threshold segmentation [20], edge detection [21], region growing [22], and other methods. These algorithms have the common problem of a contradiction between segmentation accuracy and noise immunity. The Canny algorithm seeks to find the best compromise between anti-noise interference and accurate localization [23]. The Canny algorithm is more widely used because of its large signal-to-noise ratio and good edge detection.
Aiming at addressing the shortcomings of the traditional Canny algorithm, this paper makes improvements to the Canny algorithm, as shown in Figure 10.
  • Bilateral filtering is used instead of Gaussian filtering for defective image filtering to solve the problem of Gaussian filtering blurring the edges of defects.
  • The 45° and 135° direction Sobel gradient templates are added.
  • Gradient computation is performed with amplitude enhancement.
  • PSO-OTSU is used to obtain a double threshold automatically, which enhances the adaptability of the threshold and solves the problem of the poor adaptability of fixed thresholds.
  • Defect contour extraction and morphological processing are conducted.
The traditional Canny algorithm only uses the horizontal and vertical directions for first-order differential gradient computation, and the two-direction operator is more sensitive to noise edges, which often results in edge loss [24]. In order to obtain the edge gradient information from multiple directions, it is proposed to add 45° and 135° direction Sobel gradient templates, and the extended four-direction Sobel operator template is shown in Figure 11. The four-direction operator template convolution is carried out on the image, where gx, gy, g45°, and g135° are the gradient magnitudes of the defect image obtained from the convolution results of the four directions, respectively. Then the four-direction gradient magnitudes are sorted from smallest to largest as g1, g2, g3, and g4, the larger and smaller values of which are processed by the addition of a parameter. Parameter α1 is used to suppress the directions of the gradient magnitude that are smaller, and α2 is enhanced for the direction of the gradient magnitude that is larger. On the one hand, this method solves the limitation of two-direction template calculation, and on the other hand, it has a good enhancement effect on the edge. The gradient magnitude can be expressed as:
g ( x , y ) = α 1 g 1 2 + g 2 2 + g 3 2 + α 2 g 4 2
where α1 = 1/3, α2 = 3, g1, g2, g3, and g4 are the results of the template convolution in four directions after sorting from small to large, respectively.
The gradient direction is obtained by the following equation:
θ = arctan ( g y g x )
PSO-OTSU adaptive threshold selection is performed. In the process of the defect segmentation of LIBE coatings, defective targets occupy a relatively small area and the defective edges are fuzzy. If the traditional Canny algorithm is directly used for detection, the high and low thresholds need to be set manually. Once the threshold is too high, the details of the defective edges will be removed, and the tiny defects will even be ignored. If the threshold is too low, noise will interfere with the detection results. Therefore, the maximum inter-class variance method (otsu algorithm, OTSU) is introduced to adaptively obtain the high and low thresholds to segment the defects, avoiding the influence of improper thresholds.
The OTSU algorithm divides an image into two parts, the target and the background, and determines the threshold by utilizing the maximum interclass variance between these two parts [25]. The inter-class variance criterion between the target and background is expressed as:
σ 2 ( t ) = P 1 ( t ) U 1 2 ( t ) + P 2 ( t ) U 2 2 ( t )
where P1(t) and P2(t) are denoted as the probabilities of the target and the background, respectively, and U1(t) and U2(t) represent the average gray levels of the target and the background, respectively. The gray level of the image is traversed such that the threshold t at which σ2(t) is maximized is the preferred segmentation threshold tbest.
The original OTSU algorithm has problems such as high computation and being time-consuming. The OTSU algorithm is optimized by using the inter-class variance σ2 as the fitness function in the particle swarm optimizer algorithm (PSO), namely, the PSO-OTSU algorithm [26]. The PSO-OTSU algorithm uses PSO to search for the best value on the basis of OTSU, and the execution process is shown in Figure 12. Initially, a certain number of particles are uniformly cast on a one-dimensional plane, and then the variance corresponding to the particle gray value is calculated to obtain the maximum variance value. Then, according to the PSO update speed and position, iterative particle updating and a threshold value search are performed. Finally, according to the limitation of the number of iterations, the gray level of the point corresponding to the maximum variance is taken as the optimal threshold value for image segmentation. The way to update the position and velocity of the particles is shown in Equation (22).
v t + 1 = α v t + β 1 r 1 ( pbest t x t ) + β 2 r 2 ( gbest t x t ) x t + 1 = x t + v t + 1
where α represents the inertia weights, and β1 and β2 represent the acceleration factors of the individual cognitive and social cognitive. The parameters r1 and r2 are random numbers within [0, 1]. The position and velocity of particle i after the t-th update are denoted by xt and vt, respectively, and the best positions of the particle and population are denoted by pbestt and gbestt in Equation (22).
Defect edges are detected and connected using dual thresholds obtained by the PSO-OTSU algorithm, with a low threshold of Tl, a high threshold of Th, and a ratio of high to low thresholds of 3:1.
The edges of the electrode coating defects are detected by the improved Canny algorithm, as shown in Figure 13(a1–a6). However, the detected edges are incomplete and not closed. In order to connect the breakpoints and extract the complete defect contour, it is also necessary to combine the morphological closure operation to process the detected edge image. The morphological closure operation can fill small holes and bridge small cracks while the total position and shape remain unchanged, which is based on the principle of expanding and then eroding the image [27]. The shape of the defect contour becomes continuous and complete after performing the morphological closure operation on the defect edge image detected by the Canny algorithm, as shown in Figure 13(b1–b6).

4. Experimental Validation and Analysis

4.1. Filtering Algorithm Results and Analysis

In order to visualize the actual effect of bilateral filtering, bilateral filtering is compared with median filtering, Gaussian filtering, and mean filtering. The convolution kernel of median filtering, Gaussian filtering, and mean filtering is taken as 7, and the template of bilateral filtering is taken as 7. The experiments are carried out with six sets of electrode coating defect images as examples, and the results are shown in Figure 14. Through comparison, it can be seen that both median filtering and bilateral filtering are able to retain the edges of the target defects better, but the result of median filtering processing still contains interference noise, and some edge details will be lost for low-contrast defects, as shown in Figure 14(b2,b5). The result of bilateral filtering can effectively smooth the image and highlight the defective targets. In order to objectively compare the noise reduction effects of different filtering algorithms, this paper introduces the peak signal–noise ratio (PSNR) as an index to evaluate the denoising effect. When the PSNR is larger, the image after filtering noise reduction is closer to the original image, and the noise reduction effect is better. The experimental results are shown in Figure 15. It can be seen that the PSNRs of the bilateral filtering algorithms used in this paper are all higher than those of the median filtering, Gaussian filtering, and mean filtering algorithms, so bilateral filtering has a better filtering effect on the background noise, and the edge-preserving denoising also has a better effect.

4.2. Enhanced Algorithm Results and Analysis

In order to verify the enhancement effect of the improved Gamma correction proposed in this paper on low-contrast images of electrode coating defects, the images (six electrode coating defect images) selected for experiments are processed using the Laplace algorithm (LA), the classical histogram equalization (HE) algorithm, the Retinex algorithm (RE), the general Gamma correction (GA), and the algorithm in this paper, respectively. The experimental results are shown in Figure 16. Observation of Figure 16 reveals that, subjectively speaking, various algorithms play certain roles in image enhancement, but after comparing the image enhancement effects of each algorithm, it is not difficult to see that the HE algorithm and Retinex algorithm over-enhance the bright region of the defective image, making the edge of the image blurred. The Laplace algorithm does not have a significant enhancement effect on the dark spots and decarburization, the general Gamma correction is not effective for the enhancement of dark defects, and this paper’s algorithm has a poor enhancement effect on dark defects. While the enhancement is not effective, the algorithm in this paper has a greater contrast than the other algorithms in the processed image, both dark and bright defects are enhanced, and the demarcation between the defect edge and the background region is more obvious.
We objectively analyze the experimental results using Information Entropy (IE) and Average Gradient (AG) as evaluation indicators. Comparing the same indexes of different enhancement algorithms for processing defective images, it can be seen from Table 1 that our method enhances the image with the largest information entropy, which means that the image retains the largest amount of detail information, and the average gradient is the largest, which means that the image has the highest contrast and the richest detail information. In general, the improved Gamma correction image enhancement algorithm proposed in this paper not only retains the image detail information and improves the image contrast, but also enhances both light and dark types of defects and realizes a better enhancement effect.

4.3. Defect Segmentation Results and Analysis

In order to verify the actual effectiveness of the improved Canny algorithm in defect detection, the improved Canny algorithm is compared with maximum entropy threshold segmentation, the region-growing method, and the traditional Canny algorithm in terms of defect segmentation performance and algorithm average running time (ART). We segment six types of defect samples, including scratches, dark spots, bright spots, metal leakage, particles, and decarburization, on the coating of lithium battery electrodes. From Figure 17, it can be seen that the maximum entropy threshold segmentation, region-growing method, and traditional Canny algorithm have poor segmentation effects on defects such as scratches and particles, and may mistake defect-free areas for defect areas. When using maximum entropy threshold segmentation, the image is over-segmented and a large amount of noise appears. Although the region-growing method can effectively separate the background and defects, the loss of defect features and edge information is severe, and the segmentation accuracy of the traditional Canny algorithm is not high. However, the improved Canny algorithm in this article can effectively segment weak edge defects such as scratches, dark spots, and particles. Compared with the other three methods, it has a higher segmentation accuracy and better noise resistance. It can accurately segment defects while preserving their contour features. From the perspective of ART, for test sample images of the same size, the detection speed of our algorithm is the fastest among all the algorithms. The average running time of the improved Canny algorithm is less than 0.05 s, which meets the time requirements for online real-time defect detection. In summary, whether from the perspective of ART or defect segmentation performance, the algorithm proposed in this article is more suitable for the online real-time defect detection of LIBE coating defects in actual LIB industrial production.

5. Conclusions

Aiming to address the problem that it is difficult to detect low-contrast tiny defects on the coating surfaces of LIBEs, this paper proposes a detection method including the coarse localization of potential defects and the precise segmentation of defects. The method detects the defects of coated LIBEs by using background reconstruction and the improved Canny algorithm, and the main conclusions are as follows.
(1)
Bilateral filtering is used for denoising the electrode coating image. The results show that bilateral filtering can preserve the edge information of defect images, and the peak signal-to-noise ratio is higher than that of the other filtering algorithms, which is beneficial for subsequent detection.
(2)
Through background reconstruction and image difference, the defects in electrode coatings are roughly located, eliminating the adverse effects of light and dark stripes in the background area. This method can quickly obtain potential defect images, reduce the range of image precision detection, and improve the efficiency of defect detection.
(3)
By improving Gamma correction to enhance low-contrast images of electrode coating defects, both light and dark defects are enhanced simultaneously, and the boundary between the defect edge and the background area is enhanced. The improved Canny algorithm is used to segment defect images, solving the problem of the difficult detection of low-contrast weak edge defects such as scratches, dark spots, and particles. Compared with the other three methods, the method proposed in this article has a higher segmentation accuracy, faster algorithm running time, and is more suitable for the online real-time defect detection of LIBE coating defects in actual LIB industrial production.

Author Contributions

Writing—original draft, X.W.; Writing—review & editing, X.W., S.L., H.Z., Y.L. and H.R.; Project administration, S.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Key Research and Development Program of Shaanxi Province (grant number 2023-YBGY-329 and 2020ZDLGY14-06), and Key Research and Development Program of Weinan City (grant number ZDYFJH-108).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

Yinfeng Li was employed by the company Shaanxi Beiren Printing Machinery Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. Kim, T.; Song, W.; Son, D.Y.; Ono, L.K.; Qi, Y. Lithium-ion batteries: Outlook on present, future, and hybridized technologies. J. Mater. Chem. A 2019, 7, 2942–2964. [Google Scholar] [CrossRef]
  2. Koshtyal, Y.; Olkhovskii, D.; Rumyantsev, A.; Maximov, M. Applications and Advantages of Atomic Layer Deposition for Lithium-Ion Batteries Cathodes: Review. Batteries 2022, 8, 184. [Google Scholar] [CrossRef]
  3. Bailey, J.J.; Wade, A.; Boyce, A.M.; Zhang, Y.S.; Brett, D.J.; Shearing, P.R. Quantitative assessment of machine-learning segmentation of battery electrode materials for active material quantification. J. Power Sources 2023, 557, 232503. [Google Scholar] [CrossRef]
  4. Badmos, O.; Kopp, A.; Bernthaler, T.; Schneider, G. Image-based defect detection in lithium-ion battery electrode using convolutional neural networks. J. Intell. Manuf. 2020, 31, 885–897. [Google Scholar] [CrossRef]
  5. Wang, H.; Zhang, J.; Tian, Y.; Chen, H.; Sun, H.; Liu, K. A simple guidance template-based defect detection method for strip steel surfaces. IEEE Trans. Ind. Inform. 2018, 15, 2798–2809. [Google Scholar] [CrossRef]
  6. Guan, M.; Zhong, Z.; Rui, Y. Automatic defect segmentation for plain woven fabric images. In Proceedings of the 2019 International Conference on Communications, Information System and Computer Engineering, Haikou, China, 5–7 July 2019; pp. 465–468. [Google Scholar]
  7. Meiju, L.; Rui, Z.; Xifeng, G.; Junrui, Z. Application of improved Otsu threshold segmentation algorithm in mobile phone screen defect detection. In Proceedings of the 2020 Chinese Control and Decision Conference, Hefei, China, 22–24 August 2020; pp. 4919–4924. [Google Scholar]
  8. Just, P.; Ebert, L.; Echelmeyer, T.; Roscher, M.A. Infrared particle detection for battery electrode foils. Infrared Phys. Technol. 2013, 61, 254–258. [Google Scholar] [CrossRef]
  9. Etiemble, A.; Besnard, N.; Adrien, J.; Tran-Van, P.; Gautier, L.; Lestriez, B.; Maire, E. Quality control tool of electrode coating for lithium-ion batteries based on X-ray radiography. J. Power Sources 2015, 298, 285–291. [Google Scholar] [CrossRef]
  10. Xu, J.; Liu, Y.; Xie, H.; Luo, F. Surface quality assurance method for lithium-ion battery electrode using concentration compensation and partiality decision rules. IEEE Trans. Instrum. Meas. 2019, 69, 3157–3169. [Google Scholar] [CrossRef]
  11. Liu, X.; Wu, L.; Guo, X.; Andriukaitis, D.; Li, Z. A novel approach for surface defect detection of lithium battery based on improved K-nearest neighbor and Euclidean clustering segmentation. Int. J. Adv. Manuf. Tech. 2023, 127, 971–985. [Google Scholar] [CrossRef]
  12. Liu, Y.; Chen, Y.; Xu, J. An automatic defects detection scheme for lithium-ion battery electrode surface. In Proceedings of the 2020 International Symposium on Autonomous Systems, Guangzhou, China, 6–8 December 2020; pp. 94–99. [Google Scholar]
  13. Xu, C.; Li, L.; Li, J.; Wen, C. Surface defects detection and identification of lithium battery pole piece based on multi-feature fusion and PSO-SVM. IEEE Access 2021, 9, 85232–85239. [Google Scholar] [CrossRef]
  14. Haoran, S.U.N.; Yawen, L.I.; Youjun, H.A.N.; Yueming, H.U. Lithium-Ion battery electrode defect detection based on topological filtering and improved canny operator. Energy Storage Sci. Technol. 2022, 11, 3297. [Google Scholar]
  15. Tao, Y.; Li, L.; Mao, W.; Zhou, W. Lithium Battery Pole Piece Defect Detection Method Based on Mean Shift and Gray-level Co-occurrence Matrix. In Proceedings of the 2022 2nd International Conference on Electrical Engineering and Control Science, Nanjing, China, 16–18 December 2022; pp. 695–699. [Google Scholar]
  16. Schmitt, M.; Baunach, M.; Wengeler, L.; Peters, K.; Junges, P.; Scharfer, P.; Schabel, W. Slot-die processing of lithium-ion battery electrodes—Coating window characterization. Chem. Eng. Process 2013, 68, 32–37. [Google Scholar] [CrossRef]
  17. Guan, P.; Zhou, L.; Yu, Z.; Sun, Y.; Liu, Y.; Wu, F.; Jiang, Y.; Chu, D. Recent progress of surface coating on cathode materials for high-performance lithium-ion batteries. J. Energy Chem. 2020, 43, 220–235. [Google Scholar] [CrossRef]
  18. Chong, W.; Jinghua, W.; Jing, W.; Huan, D. Fabric Defect Detection Method Based on Projection Location and Superpixel Segmentation. In Proceedings of the 2022 4th International Conference on Natural Language Processing, Xi’an, China, 25–27 March 2022; pp. 20–25. [Google Scholar]
  19. Cao, G.; Huang, L.; Tian, H.; Huang, X.; Wang, Y.; Zhi, R. Contrast enhancement of brightness-distorted images by improved adaptive gamma correction. Compu. Electr. Eng. 2018, 66, 569–582. [Google Scholar] [CrossRef]
  20. Cao, G.; Ruan, S.; Peng, Y.; Huang, S.; Kwok, N. Large-complex-surface defect detection by hybrid gradient threshold segmentation and image registration. IEEE Access 2018, 6, 36235–36246. [Google Scholar] [CrossRef]
  21. Lapušinskij, A.; Suzdalev, I.; Goranin, N.; Janulevičius, J.; Ramanauskaitė, S.; Stankūnavičius, G. The application of Hough transform and Canny edge detector methods for the visual detection of cumuliform clouds. Sensors 2021, 21, 5821. [Google Scholar] [CrossRef] [PubMed]
  22. Xiao, D.; Mao, J.; Qin, M.; Zhou, X.; Zhou, X.; Zhu, Q.; Wang, Y. Photovoltaic Panel Defect Detection Method Combining High-Pass Filter and MSRCR Algorithm with Improved Region Growth. In Proceedings of the 2023 42nd Chinese Control Conference, Tianjin, China, 24–26 July 2023; pp. 7989–7994. [Google Scholar]
  23. Luo, L.; Liu, W.; Lu, Q.; Wang, J.; Wen, W.; Yan, D.; Tang, Y. Grape berry detection and size measurement based on edge image processing and geometric morphology. Machines 2021, 9, 233. [Google Scholar] [CrossRef]
  24. Huang, M.; Liu, Y.; Yang, Y. Edge detection of ore and rock on the surface of explosion pile based on improved Canny operator. Alexandria Eng. J. 2022, 61, 10769–10777. [Google Scholar] [CrossRef]
  25. Chen, X.; Li, J.; Huang, S.; Cui, H.; Liu, P.; Sun, Q. An automatic concrete crack-detection method fusing point clouds and images based on improved otsu’s algorithm. Sensors 2021, 21, 1581. [Google Scholar] [CrossRef] [PubMed]
  26. Du, Y.; Yuan, H.; Jia, K.; Li, F. Research on Threshold Segmentation Method of Two-Dimensional Otsu Image Based on Improved Sparrow Search Algorithm. IEEE Access 2023, 11, 70459–70469. [Google Scholar] [CrossRef]
  27. Hassanin, A.A.I.; Abd El-Samie, F.E.; El Banby, G.M. A real-time approach for automatic defect detection from PCBs based on SURF features and morphological operations. Multimed. Tools Appl. 2019, 78, 34437–34457. [Google Scholar] [CrossRef]
Figure 1. Coating process for LIBEs.
Figure 1. Coating process for LIBEs.
Coatings 14 00392 g001
Figure 2. Types of coating defects on LIBE.
Figure 2. Types of coating defects on LIBE.
Coatings 14 00392 g002
Figure 3. AOIS for electrode detection.
Figure 3. AOIS for electrode detection.
Coatings 14 00392 g003
Figure 4. ROI extraction of electrode coating images. (a) Input image; (b) binarization image; (c) grayscale projection searching for electrode coating edge; and (d) actual battery electrode coating image.
Figure 4. ROI extraction of electrode coating images. (a) Input image; (b) binarization image; (c) grayscale projection searching for electrode coating edge; and (d) actual battery electrode coating image.
Coatings 14 00392 g004
Figure 5. Defect detection process for electrode coatings.
Figure 5. Defect detection process for electrode coatings.
Coatings 14 00392 g005
Figure 6. Background reconstruction of electrode coating image. (a) Background image with defects; (b) background reconstruction image; (c) difference image; and (d) potential defect image ROI.
Figure 6. Background reconstruction of electrode coating image. (a) Background image with defects; (b) background reconstruction image; (c) difference image; and (d) potential defect image ROI.
Coatings 14 00392 g006
Figure 7. Gamma correction curve. (a) Original Gamma correction curve and (b) improved Gamma correction curve.
Figure 7. Gamma correction curve. (a) Original Gamma correction curve and (b) improved Gamma correction curve.
Coatings 14 00392 g007
Figure 8. Comparison of defect images before and after enhancement. (a1a3) Original images of scratch, dark spot, and decarburization defects; and (b1b3) images of scratch, dark spot, and decarburization defects after the improved Gamma correction.
Figure 8. Comparison of defect images before and after enhancement. (a1a3) Original images of scratch, dark spot, and decarburization defects; and (b1b3) images of scratch, dark spot, and decarburization defects after the improved Gamma correction.
Coatings 14 00392 g008
Figure 9. Histograms of grayscale values before and after defect image enhancement. (a1a3) Histograms of scratch, dark spot, and decarburization defects; and (b1b3) histograms of scratch, dark spot, and decarburization defects after the improved Gamma correction.
Figure 9. Histograms of grayscale values before and after defect image enhancement. (a1a3) Histograms of scratch, dark spot, and decarburization defects; and (b1b3) histograms of scratch, dark spot, and decarburization defects after the improved Gamma correction.
Coatings 14 00392 g009
Figure 10. Improved Canny algorithm process.
Figure 10. Improved Canny algorithm process.
Coatings 14 00392 g010
Figure 11. Sobel operator four directional gradient operator template.
Figure 11. Sobel operator four directional gradient operator template.
Coatings 14 00392 g011
Figure 12. The process of obtaining segmentation thresholds using PSO-OTSU algorithm.
Figure 12. The process of obtaining segmentation thresholds using PSO-OTSU algorithm.
Coatings 14 00392 g012
Figure 13. Canny detection and morphological processing. (a1a6) Defect edge contour images detected using the improved Canny algorithm; and (b1b6) defect contour images after morphological processing.
Figure 13. Canny detection and morphological processing. (a1a6) Defect edge contour images detected using the improved Canny algorithm; and (b1b6) defect contour images after morphological processing.
Coatings 14 00392 g013
Figure 14. Comparison of various filtering algorithms on coating defect images.
Figure 14. Comparison of various filtering algorithms on coating defect images.
Coatings 14 00392 g014
Figure 15. PSNR of electrode coating images after different filtering.
Figure 15. PSNR of electrode coating images after different filtering.
Coatings 14 00392 g015
Figure 16. Comparison of various enhancement algorithms on coating defect images.
Figure 16. Comparison of various enhancement algorithms on coating defect images.
Coatings 14 00392 g016
Figure 17. Comparison of various segmentation methods on coating defect images.
Figure 17. Comparison of various segmentation methods on coating defect images.
Coatings 14 00392 g017
Table 1. Objective evaluation of various enhancement algorithms.
Table 1. Objective evaluation of various enhancement algorithms.
Enhanced AlgorithmEvaluating IndicatorSCDSBSMLPADE
LAIE6.66296.54125.15663.50957.01014.6177
AG0.01800.02210.01040.00770.03230.0135
HEIE5.58034.61315.26313.41085.05322.7011
AG0.00840.00660.00970.00610.00520.0045
REIE5.03854.14634.65442.84244.66862.1668
AG0.00440.00430.00550.00330.00340.0025
GAIE6.88934.89916.84765.86375.45122.8839
AG0.02050.00630.03610.04890.00510.0037
OursIE6.96197.21396.87675.82257.48335.7076
AG0.02430.05250.03840.07480.01710.1337
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Wang, X.; Liu, S.; Zhang, H.; Li, Y.; Ren, H. Defects Detection of Lithium-Ion Battery Electrode Coatings Based on Background Reconstruction and Improved Canny Algorithm. Coatings 2024, 14, 392. https://doi.org/10.3390/coatings14040392

AMA Style

Wang X, Liu S, Zhang H, Li Y, Ren H. Defects Detection of Lithium-Ion Battery Electrode Coatings Based on Background Reconstruction and Improved Canny Algorithm. Coatings. 2024; 14(4):392. https://doi.org/10.3390/coatings14040392

Chicago/Turabian Style

Wang, Xianju, Shanhui Liu, Han Zhang, Yinfeng Li, and Huiran Ren. 2024. "Defects Detection of Lithium-Ion Battery Electrode Coatings Based on Background Reconstruction and Improved Canny Algorithm" Coatings 14, no. 4: 392. https://doi.org/10.3390/coatings14040392

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop