## 2 Materials and Methods
### Trajectory Accuracy  
This section primarily evaluates the localization performance and computational efficiency of the proposed method. The metrics for evaluating localization performance include the maximum value and root mean square error (RMSE), while computational efficiency is compared using the average processing time. The first comparison method is ORB-SLAM3, one of the most advanced visual SLAM methods. We also compare the benefits with the method, which integrates line features, to evaluate the proposed method further. As previously described, the principal direction information can represent the geometric properties of feature points, while line features directly reflect the geometric edges of the environment. For the second comparison, we selected ORB-LINE-SLAM [28], one of the advanced SLAMs based on point and line features, where the line feature descriptor used is the Line Band Descriptor (LBD). A comparison with it will further explore the potential of principal direction information in enhancing localization accuracy. We first assess the accuracy and effect of incorporating the principal direction information, then evaluate computational efficiency, and finally, perform a comprehensive comparison of the localization performance of the visual SLAM systems. The datasets used for testing are KITTI, EuRoC, and TUM. First, we evaluate the localization performance gain after incorporating principal direction information with the same number of ORB extraction levels. The number of levels is 8, with a factor of 1.2. The comparison method and proposed method all use the same number of levels. To clearly display the results, we turned off loop-closure detection and only compared odometry errors. We selected KITTI sequences 03 to 07. Each group of results was run five times, and then, we averaged the Max and RMSE results, as shown in Table 5. The experimental results show that the proposed method outperforms the comparison method ORB SLAM3 based on all test sequences, with particularly significant effects on sequences 05 and 06. The RMSE decreased by 12.62% and 23.06%, and the maximum values decreased by 22.55% and 24.37%, respectively. ORB-LINE-SLAM integrates line features, which improve overall localization performance compared to ORB-SLAM3. In sequence 03, ORB-LINE-SLAM outperforms our proposed method. In sequence 07, the RMSE of our method is reduced by 16.15% at the maximum. In comparison, except for sequence 03, the proposed method demonstrates superior localization performance. Figure 13 shows a 2D trajectory comparison result, selecting the significant sequences 05 and 06. The solid trajectory represents the proposed method, while the dashed and dotted trajectories represent the ground truth and ORB SLAM3. The dash-dot trajectory represents ORB-LINE-SLAM. The results show that the proposed method is closer to the ground truth. Figure 12: Maximum recall at 100% precision in low-luminance scenarios. There is no definitive method for selecting the number of levels and factors of the feature pyramid. Generally, it relates to the size of the image to be extracted and the scale of the objects to be detected. A larger factor leads to faster image size decay, so the number of pyramid levels is usually not very high. In ORB SLAM3, the number of levels is 8 with a factor of 1.2, which incurs a significant computational cost. In Reference [16], the authors compared the effects of feature extraction with different numbers of levels, from 1 to 5, using the Matier dataset, with feature point accuracy and repeatability as evaluation metrics. The results show that at levels 4 and 5, feature point accuracy and repeatability decrease rapidly. The down-sampling rate chosen is 2 in Reference [16], and at the third level (with level 1 as the starting level), where the effect is relatively good, the image size becomes \(1/16\) of the original. The benefits brought by higher-level features are limited.