## 2 Proposed Method
### Image Preprocessing  
In the visual system process, due to the presence of a lot of non-interest points and spot noise in the image, directly using the visual measurement system to coordinate the laser line extraction, the system can have a large complexity, slow processing speed, and low accuracy. Therefore, it is necessary to preprocess the image acquired by the visual system, which includes segmentation cropping, binarization, blurring, etc. The image preprocessing operation enhances the quality of the original laser line image and improves the accuracy of image acquisition.  
As shown in Figure 3, the image of the original laser line is obtained from the camera. The laser line information includes the lithium battery plane information and the experimental platform plane information. The lithium battery plane information is the area of interest; the retained image should ensure the integrity of the object as much as possible. The computational complexity is reduced by decreasing the amount of data to reduce pixel points in the image processing, so the image needs to be cropped to draw the ROI area. In order to improve the speed of the laser line area and highlight the regional characteristics, the image needs to be grayed out. Because of some problems with the original grayscale image, there is a cliff-like change in the gray degree of the light-dark junction. As shown in the Gaussian blur of Figure 3, one of the grayscale lines need to be smoothed to allow for more complete extraction of bright areas.  
The Gaussian filtering, median filtering, and mean filtering are classical image smoothing fuzzy processing methods. These methods are low-pass filters optimized for smooth processing in high-frequency parts of the image in areas such as edges, brightness jumps, and fast changes. The mean filter is to calculate the average of the gray value in the filter range and replace it. The median filter is to sort the gray value in the filter range and replace it with the median value. The Gaussian filtering gives the weights to the surrounding pixel points and is replaced by averages based on the weights and grayscale values of each pixel point. After dealing with the filtering method, the grayscale value is more in accordance with the light intensity distribution mode, so the Gaussian blur is used for smooth operation in this work; the principle is shown in Figure 4.  
Figure 2: The 3D reconstruction process based on the laser triangulation measuring method.  
In order to select the appropriate parameters for the Gaussian blur, the pixel point on the line of the laser line is selected to evaluate the grayscale value. The results of using Gaussian blur different radius threshold processing are compared with the grayscale value of the original image, which is shown in Figure 5.  
Figure 4: The schematic diagram of the Gaussian blur.  
Figure 3: The flow chart of the preprocessing method.  
Three cases of filter radius \(r=3\), \(r=5\), and \(r=7\) are compared in this work, respectively. It can be seen that the change curve of the gray value is smoother after filtering, and the peak of the gray degree is decreased with the increase of filter radius. However, the grayscale peak reaches 255 (the grayscale peak of the original map) only when \(r=3\), and has a smoother curve compared to the grayscale curve, so taking \(r=3\), setting the grayscale threshold of 35.  
The extracted area is shown in Figure 6, where the main three lines are the laser line regions and some reflective noise in the data acquisition. In Figure 5(b), Considering the small volume of the noise area, the volume threshold area is greater than 500 to obtain the full laser line area. Obtaining a good laser line area is an important prerequisite for extracting the centerline, which can effectively reduce the noise interference during the centerline extraction.