# Battery Surface and Edge Defect Inspection Based on Sub-Regional Gaussian and Moving Average Filter
## 1 Introduction  
The battery is an essential product that has been widely used in many fields, such as electronics, communication, instrument, transportation, and machinery manufacturing [1; 2; 3; 4]. The demand for a battery with high surface, performance, and quality increases annually given the rapid development of modern science and technology. Various defects, such as scratch [5], concave, and convex, appear on the battery's surface during production due to defects of raw material, rolling equipment, and processing technology [6; 7]. These defects would not only affect the battery's appearance, but also the product's quality and performance. The battery's surface defect inspection is repetitive and needs tremendous concentration. Traditional inspection methods, including artificial visual [8], frequency flight [9], infrared [10], magnetic flux leakage [11], and ultrasonic [12], have disadvantages, such as being time consuming and having a high missing rate and low inspection precision due to complex and extreme environment. Among these problems, edge defect detection has always been difficult to solve because of curved edges and uneven reflections (Figure 1). Thus, the results of the traditional methods do not satisfy the requirements. In addition, companies need to store the data information of the battery's surface, especially its defect information, to revalidate its quality upon completion.  
Computer vision has been widely used and has been proven to have advantages, such as high speed, effective, and high inspection precision [13; 14; 15]. Defects are caused by different factors and appear in various types. The core of image processing is to extract useful features from the surface images and to track and address the cause of the different types of defects. Several popular feature extraction methods can be used in image processing. [PERSON] proposed an efficient scale-invariant feature transform (SIFT) algorithm to accelerate feature extraction [16]. [PERSON] proposed other efficient speed-up robust feature (SURF) algorithms to further accelerate feature extraction based on SIFT [17]. [PERSON] presented a local binary pattern (LBP) algorithm, which was a redefinition of the grayscale values of the original image and a simple combination of histograms [18]. [PERSON] presented a segmentation algorithm based on Canny edge defects on the surface of the battery cathode [19]. [PERSON] introduced an extreme learning machine algorithm combined with a genetic algorithm for the surface defect identification of hot-rolled steel plates, which improved detection accuracy by self-learning through training samples [20]. [PERSON] used Gabor filters and the pulse coupled neural network (PCNN) to identify defects. Gabor filters are used to enhance the contrast of images captured by camera, and the defect areas are automatically segmented by PCNN with an adaptive parameter setting [21]. [PERSON] used local normalization (LN) to enhance image contrast, which was nonlinear and illumination independent, and to detect defects using the defect localization based on the projection profile (DLBP), which was robust to noise and prompt [22].  
There are few articles that detect concave and convex defects of the battery we mentioned; the above image detection methods are generally used for the detection of defects on the surface of metal plates. Therefore, we proposed an efficient algorithm for battery surface and edge defect inspection based on sub-regional Gaussian and moving average filtering. The algorithm mainly identifies the concave and convex defects on the surface and batteries' edges because these are defects that affect the batteries' quality during the production process. Moreover, detecting defects on edges has always been difficult.  
Figure 1: The red mark indicates the hard-to-detect area and the yellow mark indicates a defect that is not easily detected on the edge.