# A Lightweight Visual Odometry Based on LK Optical Flow Tracking
## 3 Experiment and Analysis  
In this section, the proposed lightweight VO based on optical flow tracking is quantitatively evaluated from the perspectives of positioning accuracy and efficiency, and its accuracy and running speed are analyzed. All experiments were run on Ubuntu 18.04 LTS using an Inter(R) Core(TM) i5-6300 @2.30 GHz CPU and 8 GB RAM. To verify the effectiveness of the system in different indoor scenarios, four representative sequences are selected from both the TUM dataset [32] and the ICL-NUIM dataset [33] for testing purposes. To minimize the influence of the random errors of the system on the experimental results, take all data with the average value of 20 experiments. Tables 1 and 2 show the positioning accuracy of the two systems under 13 different sequences and the per-frame average runtime. RMSE represents the root mean square error of the absolute trajectory error and the average runtime represents the time required to process each image. \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Sequence**} & \multicolumn{2}{c}{**RMSE (m)**} & \multirow{2}{*}{**Improvement**} \\ \cline{2-2} \cline{4-4}  & **Ours** & & **ORB-SLAM3** \\ \hline fr1-xyz & 0.012 & **0.011** & - \\ fr1-room & **0.042** & 0.045 & 6.67\% \\ fr1-desk2 & **0.023** & 0.025 & 8.00\% \\ fr2-large & 0.12 & **0.107** & - \\ fr2-rpy & 0.003 & 0.003 & - \\ fr2-person & **0.005** & 0.006 & 16.67\% \\ fr3-office & **0.011** & 0.013 & **15.38\%** \\ fr3-notx-near & **0.018** & 0.021 & **14.29\%** \\ fr3-tx-near & 0.012 & **0.01** & - \\ \hline office2 & **0.017** & 0.02 & **15.00\%** \\ office3 & 0.066 & **0.06** & - \\ living2 & 0.021 & **0.019** & - \\ living3 & **0.012** & 0.013 & 7.69\% \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of RMSE. From the analysis of Table 1, it can be seen that both the system proposed in this paper and the ORB-SLAM3 system have high precision and robustness in all 13 sequences. However, the system proposed in this paper performs slightly better in 7 of the sequences, in which positioning accuracy is close to and slightly improved compared with the ORB-SLAM3 system; the reason for the poor accuracy in the other six sequences is that the image texture in the sequence is clear and rich in key points, motion model prediction error is larger than the original tracking error. From the analysis of Table 2, in average runtime, the system proposed in this paper is significantly better than ORB-SLAM3 in all 13 sequences. The improvement is most evident in the fr1-room sequence which achieves 34.8%. The reason is that the key point-matching relationship between adjacent images is established in the proposed system without calculating descriptors, which results in a significant improvement in efficiency and real-time performance. Since the sequences, fr1-desk2 and office2, are relatively stable and have clear trajectories, they were selected for comparison. Via the EVO toolkit [34], the parameters in the absolute pose error (APE) and relative pose error (RPE) of the two system trajectories are quantitatively analyzed for further testing of the system performance. At the same time, to observe the differences between the trajectories more clearly, the original trajectory is projected onto a two-dimensional plane for comparison. Figure 7 shows the comparison projected onto the \(x\)-\(o\)-\(y\) plane between the ground truth and the trajectories generated by the proposed system and the ORB-SLAM3 system under the fr1-desk2 sequence. The dashed line represents the ground truth of the dataset, while the blue and orange curves represent the trajectories of the proposed system and the ORB-SLAM3 system. Both systems passed the test under this sequence, indicating that both systems have good robustness. However, the trajectory of the system proposed in this paper is closer to the ground truth in some local areas. Figure 8 shows the APE comparison between the two systems under the fr1-desk2 sequence.