## 3 Method
### Dynamic Objects Removal
(2) LiDAR-inertial system:  
For the LiDAR-inertial system, we employ the feature extraction method from [19] to obtain two types of feature points: edge feature points and plane feature points. For the edge feature points on the LiDAR frame \(i\), we use the nearest-neighbor algorithm to find the five nearest feature points and then determined whether they were collinear. If they formed a straight line, we use a point-independent representation to represent the line using its normalized direction vector \((a,b,c)\). For the \(n\) edge feature points on frame \(i\), we obtain \(n\) vectors \(l_{1,i}\) to \(l_{n,i}\). Next, we match the edge feature points of frame \(i\) with those of frame \(i+1\) using the scan-to-scan method from [7] to obtain the corresponding straight lines \(l_{1,i+1}\) to \(l_{n,i+1}\). We combine the data from \(m\) frames into a matrix \(M_{l}\) of the form  
\[ \begin{bmatrix}l_{1,i}&l_{1,i}&\cdots&l_{1,i+m}\\ l_{2,i+1}&l_{2,i+1}&\cdots&l_{2,i+m}\\ \vdots&\vdots&\ddots&\vdots\\ l_{n,i+m}&l_{n,i+1}&\cdots&l_{n,i+m}\end{bmatrix}  \tag{3}\]  
The method for the plane feature points is similar. For the plane feature points on frame \(i\) of the LiDAR frame, we use the nearest-neighbor algorithm to find the five nearest feature points and then determine whether they belong to the same plane. If so, we use \((a,b,c,d)\) to represent the plane, where \(ax+by+cz+d=0\) is the standard form of the plane equation. We obtain a matrix \(M_{p}\) about the planes  
\[ \begin{bmatrix}p_{1,i}&p_{1,i}&\cdots&p_{1,i+m}\\ p_{2,i+1}&p_{2,i+1}&\cdots&p_{2,i+m}\\ \vdots&\vdots&\ddots&\vdots\\ p_{n,i+m}&p_{n,i+1}&\cdots&p_{n,i+m}\end{bmatrix}  \tag{4}\]  
We then use PCA to process the two matrices \(M_{l}\) and \(M_{p}\). We perform SVD decomposition to obtain \(dim\times m\) eigenvalues and eigenvectors for the two matrices, where \(m\) is the number of frames used, and \(dim\) is the dimension described (3 for \(M_{l}\) and 4 for \(M_{p}\)). The eigenvectors are then sorted in descending order of their corresponding eigenvalues to construct an orthogonal basis. We project the original data onto this basis to obtain the new data matrices \(X_{l}\) and \(X_{p}\). Next, we compute the sample covariance matrices \(S_{p}\) and \(S_{l}\) using the following equation:  
\[S=\frac{1}{n-1}\sum_{i=1}^{n}(X_{*,i}-\bar{X})(X_{*,i}-\bar{x})^{T} \tag{5}\]  
where \(X_{*,i}\) is the \(i\)-th column of \(X\) and \(n\) is the number of samples. Then, we use the following equations to calculate [PERSON]'s T-squared statistic value. \[T^{2}=n(\bar{x}-\mu)^{T}S^{-1}(\bar{X}-\mu) \tag{6}\]  
where \(\bar{x}\) is the sample mean of \(X\), \(\mu\) is the overall mean, and \(S\) is the sample covariance matrix. Then the clustering of \(T_{l}^{2}\) and \(T_{p}^{2}\) is performed using thedensity-based spatial clustering of applications with noise (DBSCAN) method. For the clustering results, we use the following equations to map these feature points extracted by LiDAR to the panoptic segmentation keyframes and find the corresponding class cases of the feature points. \[p(u,v,1)=F_{\text{LiDAR}}^{\text{World}}P_{\text{LiDAR}}(X,Y,Z) \tag{7}\]  
When the ratio of static to dynamic feature points of a cluster is above 5, we identify it as a static cluster and the others as dynamic clusters. Figure 3 shows the results of the clustering algorithm, where it can be seen that the static principal component clustering works very well. In the subsequent module of the LIDAR inertial system, we use only the feature points in the static cluster for pose estimation and map building.