# A Survey of Visual SLAM Based on RGB-D Images Using Deep Learning and Comparative Study for VOE
## 5 Comparative Study for VOE
### Preparing GT Trajectory for Evaluating VOE
 \tag{16}\]  
Figure 8: Illustration of marker application and the marker results collected on a color image. In the camera's coordinate system, the coordinates of four points in 3D space/point cloud are defined in Formula (17). \[ \begin{bmatrix}1&z_{1}&y_{1}&x_{1}\\ 1&z_{2}&y_{2}&x_{2}\\ 1&z_{3}&y_{3}&x_{3}\\ 1&z_{4}&y_{4}&x_{4}\end{bmatrix}  \tag{17}\]  
The transformation matrix according to the \(x,y,z\) axes is presented by \(\theta_{1},\theta_{2},\theta_{3}\) in Formula (18). \[\theta_{1}= \begin{bmatrix}T_{1}\\ Ro_{13}\\ Ro_{12}\\ Ro_{11}\end{bmatrix} \theta_{2}= \begin{bmatrix}T_{2}\\ Ro_{23}\\ Ro_{22}\\ Ro_{21}\end{bmatrix} \theta_{3}= \begin{bmatrix}T_{3}\\ Ro_{33}\\ Ro_{32}\\ Ro_{31}\end{bmatrix}  \tag{18}\]  
The results of the transformation are shown in the vector \(X^{\prime},Y^{\prime},Z^{\prime}\) in Formula (19)  
\[X^{\prime}= \begin{bmatrix}x_{1}^{\prime}\\ x_{2}^{\prime}\\ x_{3}^{\prime}\\ x_{4}^{\prime}\end{bmatrix} Y^{\prime}= \begin{bmatrix}y_{1}^{\prime}\\ y_{2}^{\prime}\\ y_{3}^{\prime}\\ y_{4}^{\prime}\end{bmatrix} Z^{\prime}= \begin{bmatrix}z_{1}^{\prime}\\ z_{2}^{\prime}\\ z_{3}^{\prime}\\ z_{4}^{\prime}\end{bmatrix}  \tag{19}\]  
where \((x_{1}^{\prime},y_{1}^{\prime},z_{1}^{\prime}),(x_{2}^{\prime},y_{2}^{\prime},z_{2}^{\prime}),(x_{3}^{\prime},y_{3}^{\prime},z_{3}^{\prime}),(x_{4}^{\prime },y_{4}^{\prime},z_{4}^{\prime})\) are the coordinates of four points of point cloud data in the real-world coordinate system. From this, we have a linear equation, presented as Formula (20). \[ \begin{split} X^{\prime}=& A\times\theta_{1}\\ Y^{\prime}=& A\times\theta_{2}\\ Z^{\prime}=& A\times\theta_{3}\end{split}  \tag{20}\]  
To estimate \(\theta_{1},\theta_{2},\theta_{3}\), we use the least squares method [233], as defined in Formula (21). \[ \begin{split}\theta_{1}=&(A^{\top}A)^{-1}A^{\top}X^{ \prime}\\ \theta_{2}=&(A^{\top}A)^{-1}A^{\top}Y^{ \prime}\\ \theta_{3}=&(A^{\top}A)^{-1}A^{\top}Z^{ \prime}\end{split}  \tag{21}\]  
Finally, the conversion matrix between the camera coordinate system and the real-world coordinate system is of the form \((\theta_{1};\theta_{2};\theta_{3})\). The coordinates of the center of the marker \((x_{c},y_{c},z_{c})\) in the real-world coordinate system are calculated via Formula (22). \[ \begin{split} x_{c}=&\frac{x_{1}^{\prime}+x_{2}^{ \prime}+x_{3}^{\prime}+x_{4}^{\prime}}{4}\\ y_{c}=&\frac{y_{1}^{\prime}+y_{2}^{\prime}+y_{3}^{ \prime}+y_{4}^{\prime}}{4}\\ z_{c}=&\frac{z_{1}^{\prime}+z_{2}^{\prime}+z_{3}^{ \prime}+z_{4}^{\prime}}{4}\end{split}  \tag{22}\]  
The GT data results of the motion trajectory in the real-world coordinate system are shown in Figure 9.  
In this paper, we cross-divided the TQU-SLAM benchmark dataset into 12 subdatasets (Sub1 to Sub12) for training and testing the model, as shown in Table 15. Since the MLF-VO framework accepts the input image data with the size \(640\times 192\) pixels, we resized the RGB-D images of the TQU-SLAM benchmark dataset to the size \(640\times 192\) pixels. In this paper, we used the MLF-VO framework to fine-tune the VOE model on the TQU-SLAM benchmark dataset. The MLF-VO source code was developed in Python v3.x language and programmed on Ubuntu 18.04, Pytorch 1.7.1, and CUDA 10.1. We used the code in the link ([[https://github.com/[PERSON]/MLF-VO](https://github.com/Beniko95J/MLF-VO)]([https://github.com/[PERSON]/MLF-VO](https://github.com/Beniko95J/MLF-VO)), accessed on 6 May 2024)) on computers with the following configuration: CPU i5 12400f, 16 G DDr4, GPU RTX and 3060 12 GB. We performed fine-tuning of the VOE model with 20 epochs, and the parameters were default ones in the MLF-VO framework. To evaluate the results of VOE, we calculated the trajectory error (\(Err_{d}\)), which is the distance error between the GT \(\hat{AT_{i}}\) and the estimated motion \(AT_{i}\) trajectory. The \(Err_{d}\) is calculated according to Formula (23). \[Err_{d}=\frac{1}{N}\sqrt{||AT_{i}-\hat{AT_{i}}||^{2}} \tag{23}\]