## 2 Measurement Principles and Methods
### Monocular Vision Sinkage Detection Method
Hough circle detection is used to identify the wheel center position and wheel radius. Assume that point \(H\) is a pixel point of the transformed image. The image is first grayed out, and its gray value \(H_{Y}\) can be calculated by  
\[H_{Y}=0.299\times H_{R}+0.587\times H_{G}+0.114\times H_{B} \tag{11}\]  
where \(H_{R}\), \(H_{G}\), and \(H_{B}\) are color channel values of point \(H\). Assuming that the coordinates of point \(H\) are \((i,j)\), a Gaussian filter is applied to reduce the noise, and the process can be expressed as  
\[H_{Y}=\begin{bmatrix}1/16&2/16&1/16\\ 2/16&4/16&2/16\\ 1/1 where \(A_{Y(i-1,j-1)}\dots A_{Y(i+1,j+1)}\) represent the pixel value around point \(H_{(i,j)}\). Subsequently the image is subjected to edge detection and the center and radius of the circle are detected using the Hough gradient method. Suppose the Equation of the circle is  
\[(x-m)^{2}+(y-n)^{2}=r^{2} \tag{13}\]  
where \((m,n)\) represents the center coordinate and \(r\) represents the radius. From the above equation and Figure 2, it can be seen that the gradient direction of any point P on the circle is directed to the center of the circle. In other words, the line in the direction of the gradient through any point on the circle must pass through the center of the circle. Establishing a straight line in the gradient direction for each pixel point \((x_{i},y_{i})\) in the edge detection according to Equation (9) can be expressed as  
\[y=\frac{G_{y_{i}}}{G_{x_{i}}}x+y_{i}-\frac{G_{y_{i}}}{G_{x_{i}}}x_{i} \tag{14}\]  
where \(G_{x_{i}}\) and \(G_{y_{i}}\) are the gradients in the x-direction and y-direction. As shown in Figure 3a, the weight of the non-zero pixel points is added one in the above line, and ultimately, the point \((x_{0},y_{0})\) with the largest weight on the entire image is the wheel center. According to Figure 3b, the distance of all non-zero pixel points of the edge image to the wheel center is calculated according to Equation (15), and the number of times this distance has occurred is recorded using \(C_{r_{i}}\). The Hough transform utilizes the transformation relationship between two spaces to convert a curve or straight line with identical shape in one space into a point in another coordinate space, creating a peak. This transformation translates the circle detection problem in an image into a statistical peak problem. \[ \begin{cases}r_{i}=\sqrt{\left(x_{i}-x_{0}\right)^{2}+\left(y_{i}-y_{0}\right) ^{2}}\\ C_{r_{i}}=C_{r_{i}}+1\end{cases}  \tag{15}\]  
The distance \(r_{0}\) that occurs most is the radius of the wheel. In order to reduce the amount of computation, the radius is limited to between 350 and 400 pixels based on the wheel information. The wheel center position (WCP) \((x_{0},y_{0})\) and the wheel pixel radius \(r_{0}\) can be obtained from the results. Figure 2: The gradient direction of a point on the circle. Following the aforementioned processing steps, we obtain the pixel radius of the wheel, the coordinates of the wheel center, and the fitted line that represents the wheel-terrain boundary. Combined with Equations (3) and (4), the wheel sinkage \(z\) can be calculated by  
\[ \begin{cases}l_{p}=\frac{|ax_{0}-y_{0}+b|}{\sqrt{a^{2}+1}}\\ \quad z=\frac{r_{0}-l_{p}}{r_{0}}R\end{cases}  \tag{16}\]  
In the Equation, \(r_{0}\) is the pixel radius of the wheel, \(R\) is the actual radius of the wheel, and \(l_{p}\) is the pixel distance from the wheel center to the fitted line.