# Laser Spot Centering Algorithm of Double-Area Shrinking Iteration Based on Baseline Method
## 1 Introduction  
With the development of industrial manufacturing and other industries, the process level has been improving, and measurement and positioning work as a guarantee of product quality has become more and more important, while the realization of high-precision automatic positioning has become a difficult research point. Compared with manual positioning, laser positioning has the advantages of high detection accuracy, good safety, and convenient operation, but the traditional laser center position detection algorithm does not meet the demand of high accuracy, and the calculation results may have large errors in a noisy environment. Therefore, there is a need to improve the accuracy of laser spot center detection in complex situations to ensure the smooth completion of the measurement work. Laser spot center location, which is widely applied in various measurement systems, including optical communication systems, optical path auto-collimation systems, and optical displacement angle measurement systems, is an important topic in the field of photoelectric detection and image processing [1; 2; 3; 4]. The possible accurate positioning of the laser spot center directly determines the level of measurement accuracy. Pixel-level centering was commonly used to locate the center to an image element early on, but the system could not achieve the required accuracy in some demanding situations. Therefore, a higher-accuracy center sub-pixel positioning algorithm is needed, which can position the result to sub-pixel level and, thus, greatly improve the measurement accuracy of the system. At present, algorithms that determine the laser spot center are divided into two categories: those based on edge detection and those based on gray values. The edge detection-based algorithm assumes that the ideal spot geometry is a circle or an ellipse and largely adopts approaches, such as circle fitting [5; 6; 7; 8]. The gray value-based algorithm mainly analyzes the surface characteristics of image intensity function to determine the laser spot center, which largely includes the centroid algorithm and the Gaussian fitting algorithm [9; 10; 11]. The aforementioned algorithms have some shortcomings in terms of positioning accuracy and computational complexity. The shape of the laser spot in practical measurements is often unpredictable. However, the circle fitting algorithm has high requirements for spot integrity, as well as poor interference resistance; the accuracy of the center operation is significantly reduced when in a noisy environment, and the obtained circle center may even produce obvious errors when encountering very strong external interference, representing serious limitations [12]. The Gaussian fitting method is computationally intensive, has high computational complexity, and exhibits poor real-time performance. In comparison, the gray centroid method, which does not require any prior knowledge about the spot shape, is widely used in various measurement systems because of its simplicity and robustness [13; 14; 15; 16; 17]. Based on the gray centroid method, many scholars have proposed improved methods, such as the square-weighted centroid method. It is inevitable that the result is affected by the noise of the CCD and the environmental background noise in the process of laser spot center positioning, which has a certain impact on the spot image and results in relatively low positioning accuracy. The impact of CCD noise mainly comes from the discrete and incomplete sampling error of CCD, photon noise error, readout noise error, CCD background noise error, etc. Therefore, it is necessary to operate the image algorithm on the CCD acquired spot image before the measurement to reduce the influence of noise as much as possible. Image denoising is commonly used to improve the accuracy of spot center location [18]. Existing image denoising methods primarily include the threshold method, matching window method, and image interpolation method.