## 4 Comparative Study of Building VO Based on Feature-Based Methods
### PySLAM  
The PySLAM framework was proposed by [PERSON] [15; 22]. It includes an open-source library developed for the PySLAM framework. The PySLAM framework allows the embedding of many types of features, including both traditional features automatically extracted from feature descriptors and DL features extracted from DL models. The source code of the PySLAM framework we used is shown in the link ([[https://github.com/l](https://github.com/l)]([https://github.com/l](https://github.com/l)) uigifreda/pyslam, accessed on 6 May 2024). From there, it is possible to check and select good features for the process of building models to estimate a camera's motion trajectory, helping to build pathfinding systems for robots and blind people. At the same time, PySLAM framework was developed in the C++ and Python programming languages. Just like the knowledge-based methods presented in Figure 1, the PySLAM framework also performs 6-DOF VO estimation with several steps. The feature-extraction step, or keypoint detection, comprises the process of detecting features/keypoints between two consecutive frames. The features can be edges, corners, or blobs. Typically, the features are detected and extracted according to a feature descriptor such as SHI_TOMASI, SIFT, SURF, ORB, ORB2, AKAZE, KAZE [18], or BRISK. At the same time, feature extraction through DL networks is also performed, for features such as VGG [19] and D2-Net [47]. Figure 8 shows the match between the corresponding ORB features in two consecutive frames of the TQU-SLAM benchmark dataset. The set of ORB features in two consecutive frames  
Figure 7: Illustration of the real-world coordinate system we defined and the camera’s motion trajectory. The ground truth of the camera’s motion trajectory is the black points. is small; the features can only be detected from the image area of the marker and railing in the moving journey. This also shows that the TQU-SLAM benchmark dataset contains many challenges for feature descriptors. In the motion-estimation step, features are extracted from the monitored frame sequence, from which the camera motion is estimated through the transformation matrix in Equation (11):  
\[T_{i,i-1} \begin{bmatrix}Ro_{i,i-1}&t_{i,i-1}\\ 0&1\end{bmatrix}  \tag{11}\]  
where \(Ro_{i,i-1}\) is the rotation matrix between two consecutive frames \(i\) and \(i-1\), and \(t_{i,i-1}\) is the translation vector between two consecutive frames \(i\) and \(i-1\). The spatial correlation matrix between frames \(i\) and \(i-1\) is calculated based on Equation (12):  
\[E=\alpha \begin{bmatrix}0&-t_{z}&t_{y}\\ t_{z}&0&-t_{x}\\ -t_{y}&t_{x}&0\end{bmatrix} R_{o} \tag{12}\]  
where \(t\) is a translation matrix in the \(x,y,z\) direction. The motion trajectory in 3D space is also calculated. A scale factor \(\alpha\) is the shift factor between two consecutive frames. The calculation of the essential matrix is performed in the epipolar plane system using \"epipolar constraints\". To solve this problem, one can use the five-point algorithm, or 5-point RANSAC [22; 48]. The RANSAC algorithm used here is to estimate the correspondence between two sets of keypoints. The points converted from the input set within a certain limit are called inliers. The algorithm iterates about \(K\) times [49] and outputs the largest number of inliers. \(K\) is calculated according to Equation (13):  
\[K=\frac{log(1-p)}{log(1-w^{s})} \tag{13}\]  
where \(p\) is the probability of finding a descriptors keypoints, \(s=2\) is the minimum number of samples needed to estimate a line model, and \(w\) is the likelihood ratio of the points being inliers. In the local-optimization step, camera pose estimation and motion trajectory errors are accumulated from camera pose estimation and transformation. Currently, there are two methods commonly applied to optimize a camera's movement trajectory in an environment. In the first method, the entire motion trajectory and camera pose are rechecked to minimize errors.