## 3 Monitoring Methods
### Sub-Pixel Algorithm for Calculating Coordinates of Center of Ring Mark
#### 3.2.2 Sub-Pixel Corner Detection  
In the actual image processing, due to the influence of hardware and the environment, the image exhibits excessive noise, which complicates the coordinate recognition in landmark images. Therefore, preprocessing is required. The main purpose of image preprocessing is to eliminate irrelevant information in the image, restore useful real information, enhance the detectability of relevant information, and simplify data to the \begin{table}
\begin{tabular}{c c} \hline \hline
**Calibration Content** & **Calibration Value** \\ \hline Principal point \(x_{0}\) (pixels) & 2828.054 \\ Principal point \(y_{0}\) (pixels) & 2296.051 \\ Focal length \(f\) (pixels) & 14025.32 \\ Radial distortion \(k_{1}\) & 0.21835 \\ Radial distortion \(k_{2}\) & \(-8.12935\) \\ Radial distortion \(k_{3}\) & 0 \\ Tangential distortion \(p_{1}\) & 0.00690 \\ Tangential distortion \(p_{2}\) & \(-0.00825\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Camera calibration parameters. Figure 4: Ring mark. Figure 3: Common artificial markers. maximum extent. The processes include image graying, binarization, image denoising, and image enhancement. The subpixel method is used to detect the corner points of the circular contour of landmarks. The Harris corner detection principle is required before detection. The Harris corner detection principle involves using a moving window to calculate the gray change value in the image. The key processes include transformation into the gray image, calculating the differential image, Gaussian smoothing, calculating the local extremum, and confirming corners [23]. The [PERSON] corner detection algorithm steps are summarized as follows:  
1. When the window (small image fragment) moves in both the \(x\) and \(y\) directions, the pixel value change, \(E(u,v)\), inside the window is calculated. Let the center of a window be located at a position \((x,y)\) in the gray image, and the pixel gray value of this position be denoted by \(I(x,y)\). If the window moves a small displacement \(u\) and \(v\) to a new position in the directions of \(x\) and \(y\), respectively, the pixel gray value of this position is \(I(x+u,y+v)\). The variation formula of the pixel gray value caused by window moving \((u,v)\) in all directions is given as follows:  
\[E(u,v)=\sum\limits_{(x,y)}w(x,y)\times\left[I(x+u,y+v)-I(x,y)\right]^{2} \tag{4}\]  
where \(w(x,y)\) is the window function of position \((x,y)\), which represents the weight of each pixel in the window. Equation (5) below is obtained by simplifying Equation (4):  
\[E(u,v)=\sum\limits_{(x,y)}w(x,y)\times\left[u^{2}l_{x}^{2}+v^{2}l_{y}^{2}+2 uvl _{x}l_{y}\right] \tag{5}\]  
where \(l_{x}=\frac{\partial I(x,y)}{\partial x}\), \(l_{y}=\frac{\partial I(x,y)}{\partial y}\). Variables \(u\) and \(v\) are taken out to obtain the final form:  
\[E(u,v)\approx[u,v]M\left[ \begin{array}{c}u\\ v\end{array} \right] \tag{6}\]  
where \(M=\sum\limits_{(x,y)}w(x,y)\left[ \begin{array}{cc}I_{x}^{2}&I_{x}I_{y}\\ I_{x}I_{y}&I_{y}^{2}\end{array} \right]\). 2. For each window, its corresponding corner response function \(R\) is calculated. The size of \(R\) depends on the matrix \(M\), which can be performed using the eigenvalues of the matrix. The corner response function \(R\) corresponding to each window is calculated. \[R=\det(M)-k(trace(M))^{2} \tag{7}\]  
where \(\det(M)\) is the determinant of the matrix, \(trace(M)\) is the trace of the matrix, and \(k\) is an empirical constant between the range (0.04, 0.06). Supposing that \(\lambda_{1}\) and \(\lambda_{2}\) are characteristic of matrix \(M\), then Equation (7) can be written as follows:  
\[R=\lambda_{1}\lambda_{2}-k(\lambda_{1}+\lambda_{2})^{2} \tag{8}\]  
3. According to the value of \(R\), the area in which the window is located may be divided into planes, edges, or corners. Then, a reasonable threshold is set; if \(R\) is larger than the threshold, this indicates that the window corresponds to a corner.