# An Improved Visual SLAM Based on Map Point Reliability under Dynamic Environments
## 2 Proposed Method
### Unreliable Map Points Processing Strategy
#### 2.3.1 Map Points Selection Operation  
In the stage of pose calculation, we use R-MPs to calculate the pose. However, in the actual processing, we need a certain number of matching point pairs to achieve enough redundancy. When the number of these R-MPs is insufficient, we need to choose some temporary reliable points (called TR-MPs) from the map points for pose calculation. So, we propose a map point selection operation (MPS). The basic idea of MPS is introduced as follows.  
We think that a point has a higher probability of being reliable if most of the points around it are reliable. Our method is to triangulate all feature points in the current frame by the Delaunay triangulation. Triangulation is the process of obtaining a set of triangles from a set of planar points. Delaunay triangulation is one of the best triangulations with a lot of advantages, including maximizing the minimum angles of the triangles and forming a triangle with the closest three points. With the Delaunay triangulation, each point is connected to its surrounding points by edges. We rank the map points from greatest to smallest in terms of their overall reliability with the surrounding points, and the top 20% of the map points are set as TR-MPs to calculate the frame pose. The details of the proposed MPS operation are shown as Algorithm 2.  
The examples of the proposed MPS operation based on the Delaunay triangulation are shown in Figure 5. The green points are the feature points of R-MPs, which are used for pose calculation. The blue and red points are the feature points of TR-MPs and U-MPs, respectively. Finally, it should be noted that there is no R-MP in the early stage of SLAM. So, we set all the U-MPs as TR-MPs in this stage.  
Figure 4: The difference between a static map point and a dynamic map point. For a static map point, the error between its reprojection and its feature point can always keep within a reasonable range. However, for a dynamic map point, its position in SLAM is just the position at timestamp \(K\). With time going on, its true position will change, and the reprojection error will become larger. Finally, in timestamp \(K+2\), the error exceeds the threshold and is detected.  
Figure 5: Examples of Delaunay triangulation. The green points are the feature points of R-MPs. The larger the point, the greater the reliability is. The red points are the feature points of U-MPs, and the blue points are the feature points of TR-MPs.  
```
0:\(P\): Map points in current frame;
0:\(P_{te}\): Temporary reliable map points;
1:\(\mathcal{P}=P.feature()\);
2:\(\%P.feature()\) is the function used to get the set of feature points of \(P\);
3:\(\mathcal{T}=Dela\_T(\mathcal{P})\);
4:\(\%Dela\_T(\cdot)\) is the function used to convert a point set to a triangle set;
5:for each \(p\in\mathcal{P}\)do
6:\(\varrho=\{\}\); %Set up a sub triangle set;
7:for each \(t\in\mathcal{T}\)do
8:if\(p\in t\)then
9:\(\varrho.insert(t)\); %Insert \(t\) into the end of \(\varrho\);
10:endif
11:endfor
12:\(\vartheta=\text{Get\_U}(\varrho)\);
13:\(\%\text{Get\_U}(\cdot)\) is the function used to get all unique points in \(\varrho\);
14:\(v=0\);
15:for each \(\varsigma\in\vartheta\)do
16:\(\gamma=Reliability(\varsigma)\)
17:\(\%\text{Get the reliability of the map point with the feature point }\varsigma\);
18:if\(\varsigma.Reliability==1\)then
19:\(\%\varsigma.Reliability\) is the flag to denote whether \(\varsigma\) belongs to a reliable map point;
20:\(v=v+3\gamma\)
21:else
22:\(v=v+\gamma\)
23:endif
24:endfor
25:\(p.value=v\); %\(p.value\) denotes the reliability weight of the feature point \(p\);
26:endfor
27:\(P=\text{Sort}(P)\);
28:\(\%\text{Sort the map points according to the reliability weight of their feature point;
29:\(P_{te}=\text{Select}(P)\);
30:\(\%\text{Select the top 20 percent of }P\) as \(P_{te}\);
```  
**Algorithm 2** The proposed MPS operation