## 4 Feature Extraction
### Light Spot Feature Extraction
Since the tangent function is monotonic on the interval \(\left(-\frac{\pi}{2},\frac{\pi}{2}\right)\), the tangent can be found for both sides of Equation (25) simultaneously, which gives the following:  
\[\tan\left[\frac{F(x,y)}{E_{max}}-\frac{\pi}{2}\right]=-\frac{(x-x_{0})^{2}}{a_{x }^{2}}-\frac{(y-y_{0})^{2}}{a_{y}^{2}}+\alpha \tag{26}\]  
On the left side of (26), the equivalent transformation is made by using the induction formula, and the right side is expanded and sorted out:  
\[\cot\left[\frac{F(x,y)}{E_{max}}\right]=\frac{1}{a_{x}^{2}}x^{2}+\frac{1}{a_{y }^{2}}y^{2}-\frac{2x_{0}}{a_{x}^{2}}x-\frac{2y_{0}}{a_{y}^{2}}y+\frac{x_{0}^{2} }{a_{x}^{2}}+\frac{y_{0}^{2}}{a_{y}^{2}}-\alpha \tag{27}\]  
Let \(a=\frac{1}{a_{x}^{2}}\), \(b=\frac{1}{a_{y}^{2}}\), \(c=-\frac{2x_{0}}{a_{y}^{2}}\), \(d=-\frac{2y_{0}}{a_{y}^{2}}\), and \(e=\frac{x_{0}^{2}}{a_{x}^{2}}+\frac{y_{0}^{2}}{a_{y}^{2}}-\alpha\); then, we have \(a_{x}^{2}=\frac{1}{a}\), \(a_{y}^{2}=\frac{1}{b}\), \(x_{0}=\frac{c}{2a}\), \(y_{0}=\frac{d}{2b}\), and \(\alpha=\frac{c+d}{2}-e\). At this point, this nonlinear problem can be solved using linear methods. Taking an extraction window of size n \(\times\) n as an example, for each of these pixels, let  
\[A_{n^{2}\times 5}= \begin{bmatrix}x_{1}^{2}&y_{1}^{2}&-x_{1}&-y_{1}&1\\ x_{1}^{2}&y_{2}^{2}&-x_{1}&-y_{2}&1\\ \vdots&\vdots&\vdots&\vdots&\vdots\\ x_{1}^{2}&y_{2}^{2}&-x_{i}&-y_{j}&1\\ \vdots&\vdots&\vdots&\vdots&\vdots\\ x_{n}^{2}&y_{n}^{2}&-x_{n}&-y_{n}&1\end{bmatrix} ,\]  
\[X_{5\times 1}= \begin{bmatrix}a\\ b\\ c\\ d\\ e\end{bmatrix} ,\]  
\[B_{n^{2}\times 1}= \begin{bmatrix}\cot\left(\frac{F(x_{1},y_{1})}{E_{max}} \right)\\ \cot\left(\frac{F(x_{1},y_{2})}{E_{max}}\right)\\ \cot\left(\frac{F(x_{1},y_{2})}{E_{max}}\right)\\ \vdots\\ \cot\left(\frac{F(x_{i},y_{j})}{E_{max}}\right)\\ \vdots\\ \cot\left(\frac{F(x_{i},y_{n})}{E_{max}}\right)\end{bmatrix} ,\]  
where \(\left(x_{i},x_{j}\right)\) is the coordinates of each pixel in the window and requires \(1\leq x_{i}\), \(x_{j}\leq n\). Then, according to Equation (27), the following equations can be obtained:  
\[AX=B \tag{28}\]  
Therefore, the least square solution can be obtained as follows:  
\[\overline{X}= \begin{bmatrix}\overline{a}\\ \overline{b}\\ \overline{c}\\ \overline{d}\\ \overline{e}\end{bmatrix} =\left(A^{T}A\right)^{-1}A^{T}B \tag{29}\]Further, the following can be obtained:  
\[ \begin{split}\overline{x}_{0}&=\frac{\overline{x}}{2 \overline{a}}\\ \overline{y}_{0}&=\frac{\overline{q}}{2\overline{b}} \end{split}  \tag{30}\]  
where \((\overline{x}_{0},\overline{y}_{0})\) are the spot center coordinates obtained via 2D arctangent function fitting. To validate the performance of the laser spot center extraction method proposed in this paper, the author directed a laser pointer at three different positions on a coal wall, generating three distinct spots. Images of the coal wall containing these spots were captured using a fixed-position camera. Each spot was photographed for 3 min (totaling 180 images), and the spot centers were extracted using ellipse fitting, Gaussian fitting, and the method proposed in this paper. The results are presented in Figure 5, showing the processing outcomes of the first image for each spot. From Figure 5, it can be seen intuitively that both the method in this paper and the Gaussian fitting method better obtain the center of the light spot. However, due to the irregularity of the spot edge, the extraction accuracy of the ellipse fitting method is poor. It can be seen from the data in Table 1 that for spot 1 and spot 2, the stability of the proposed method is better than the other two methods, while for spot 3, the results of our method and the Gaussian fitting method are close. In addition, comparing the average  
Figure 5: Extraction results of spot center using three methods. standard deviation of the extraction results of the three methods, it can be seen that the extraction stability of the proposed method is the best.