## 3 Method
### Dynamic Objects Removal  
PSMS-SLAM is a multi-sensor framework SLAM method, so below, we describe the algorithm in dynamic scenes in two parts, vision, and LiDAR. (1) Visual-inertial system:  
Figure 2: PSMS-SLAM system framework. The panoptic component is denoted in red, the vision component in green, the LiDAR component in blue, the IMU component in orange, and the back end in gray. This part considers the frames that receive the panoptic segmentation information as a panoptic keyframe. Algorithm 1 shows the entire process for eliminating dynamic object feature points in the visual-inertial system. ```
0: Image frame \(F\)
0: Processed feature points
1: Track feature points with LK method as point set \(\mathbf{S}_{1}\)
2:if\(F\) is not key frame then
3: Obtain new feature points as point set \(\mathbf{S}_{2}\)
4:if Size of \(\mathbf{S}_{2}\) is bigger than a threshold then
5: Perform an LK optical flow match between the current frame and the nearest panoptic keyframe
6: Obtain the dynamic probability of successfully matching feature points in \(\mathbf{S}_{2}\) and add them to \(\mathbf{S}_{1}\)
7:endif
8:else
9: Fusion of panoptic segmentation information and image into a probability image
10: Calculate the dynamic probability \(p_{t}^{\prime}\) of each feature point by local convolution
11: Calculate the dynamic probability \(p_{t}\) of all feature points by probability propagation
12:endif
```  
**Algorithm 1** Dynamic object feature points removal in the visual-inertial system  
When the panoptic segmentation information is obtained from the panoptic keyframes, we first map to a probability image according to the object categories. As described in [33], we define the dynamic probability of categories such as people and cars as 1.0 and the dynamic probability of buildings as 0. However, the feature point extraction window may capture some dynamic feature points outside the dynamic region of the image, which will move with the dynamic object. To calculate the dynamic probability of feature points, we use a convolution kernel of size \(k\) that is aligned with the coordinates of the feature points to perform a local convolution. \[M_{ij}=1-(\frac{1}{2})^{k-d_{ij}} \tag{1}\]  
where \(k\) is the window size for feature point extraction. \(d_{ij}\) is the Manhattan distance from \(M_{ij}\) to the centre. We then take the maximum value of the local convolution's result matrix as the feature points' dynamic probability. To address the occasional false and missed detections in panoptic segmentation, we use a probabilistic propagation method to propagate the probability between adjacent panoptic keyframes, as shown in the following equation:  
\[p_{t}=(1-\alpha)p_{t-1}+\alpha p_{t}^{\prime} \tag{2}\]  
Here, \(p_{t}\) is the final result of probability at panoptic key frame \(t\). \(p_{t}^{\prime}\) is the calculation result of panoptic key frame \(t\). \(\alpha\) is a probabilistic propagation parameter with values ranging from 0.2 to 0.5 and decreases as the camera frame rate increases. We use the Lucas-Kanade optical flow method to track the obtained matches and obtain their dynamic probabilities for feature points that are not on panoptic keyframes. However, there may be cases where feature points are not detected in new image frames when tracked using the LK method. To address this, we extract new feature points for most frames in the visual-inertial process to reach a certain number. These new feature points are ignored until a new keyframe arrives, or when their number reaches a threshold, we use the LK optical flow method to perform matching and obtain the feature point matching information between that frame and the nearest panoptic keyframe. We then use the previous method to determine the dynamic probability. If a few feature points for which the match fails, these points will be ignored until the next panoptic key frame arrives.