## 2 Methods
### Point-Cloud Coordinate Transformation and Section Fitting Denoising Based on Huber Loss Function
By calculating the average axis of symmetry direction \(\overline{v}_{sym}\) for all cross-sections and the angle \(\theta^{\prime}\) between it and the XY plane axis, the point-cloud data can be rotated around the Z-axis \(\theta^{\prime}\), thus obtaining the tunnel point cloud that is orthogonal to the XY plane, as shown in Figure 7.  
For a single tunnel cross-section point cloud, in order to improve computational efficiency and make the point cloud easier to fit, a circular model with only two parameters is selected for the fitting, as shown in Equation (12). In this equation, \((h,k)\) represents the center of the fitted circle, and \(R\) is the radius of the fitted circle. The goal is to minimize the residuals between the fitting function and all points, i.e., to make all points fall as close as possible to the fitted circle, as illustrated in Figure 8.  
\[r_{i}=\sqrt{\left(x_{i}-h\right)^{2}+\left(y_{i}-k\right)^{2}}-R \tag{12}\]  
For the fitted circle center \((h_{0},k_{0})\), the direction vector \(d_{i}\) from each point on the cross-section to the circle center can be calculated using Equation (13). After normalizing the  
Figure 8: Schematic diagram of Huber loss function fitting for circular tunnel cross-section. (unit: meters). Figure 7: (a,b) Distribution of tunnel point cloud in the XY plane before and after rotation along the Z-axis (unit: meters). direction vectors using Equation (14), the unit direction vector from the circle center to all points in the cross-section can be used to compute the direction of the symmetry axis \(v_{sym}\) using Equation (15). The angle \(\theta^{\prime}\) by which the point-cloud data need to be rotated around the z-axis to align the symmetry axis direction \(v_{sym}\) with the coordinate axis can be calculated using the inverse trigonometric function in Equation (16). This angle represents the angle between the symmetry axis and the coordinate axis. \[d_{i}=(x_{i},y_{i})-(h_{0},k_{0}) \tag{13}\]  
\[\dot{d}=\frac{d_{i}}{\|d_{i}\|} \tag{14}\]  
\[v_{sym}=\sum_{i=1}^{N}\dot{d} \tag{15}\]  
Figure 6:0  
In the equation, \(\hat{d}\) represents the normalized direction vector from each point in the point cloud to the center of the circle. After the tunnel point cloud is rotated along the axis line based on PCA and the tunnel cross-section is rotated around the z-axis based on the Huber loss function, the resulting tunnel point-cloud data are aligned parallel (and orthogonal) to the axes of the three-dimensional coordinate system. For the point-cloud data with the transformed coordinate system, this study also applies the Huber loss function to fit the tunnel cross-sections and perform point-cloud denoising. In operational tunnels, the tunnel may undergo some deformation due to soil pressure. To better approximate the real cross-section, an elliptical model is used for fitting the cross-sections during the denoising process. The fitted ellipse equation can be expressed as Equation (17). In the ellipse equation, \((h,k)\) represents the center of the fitted ellipse, and \(a\) and \(b\) represent the lengths of the semi-major and semi-minor axes, respectively. Figure 6:1  
For the original point cloud, this study uses the shortest distance projection method to project each point radially onto the boundary of the fitted ellipse. The projection direction is determined by calculating the shortest path from each point to the ellipse. The principle is illustrated in Figure 6:2  
Figure 6:3 Schematic diagram of the shortest distance projection principle for point clouds. For each original tunnel point cloud's XY plane coordinates \((x_{i},y_{i})\), the distance between the point and the center of the ellipse is calculated and normalized, as shown in Equations (18) and (19). Based on the normalized relative distance, the directional factor i for the point-cloud projection can be computed, as shown in Equation (20).