## 5 Conclusions  
In visual SLAM, both operational efficiency and localization accuracy are crucial. The research purpose of our work is to improve operational efficiency while maintaining high positioning accuracy. We address two specific issues: (1) the multi-level feature extraction in visual SLAM significantly contributes to the computational cost of the front-end. (2) The BOW-based loop closure detection method requires pre-trained vocabularies, limiting its practical use. Therefore, we propose an enhanced visual SLAM method that incorporates principal direction information during pose estimation to ensure accuracy and utilizes grayscale and gradient information to construct feature descriptors for loop-closure detection. Based on our research and experimental evaluation, we can obtain the following conclusions:  
1. Incorporating principal direction information during pose estimation can improve the estimation accuracy. When maintaining the same number of feature-extraction layers, the RMSE of the position estimation can be reduced by up to 23% in the best case compared to ORB SLAM3 with only an additional approximate 1 ms of computation time, providing satisfactory results. 2. Based on aggregated feature descriptors, the proposed loop-closure-detection method outperforms comparative methods in both computational efficiency and detection accuracy. It is adaptable to various image types, including around-view and fisheye images. 3. The experimental data were collected from various devices with different image types and application scenarios, demonstrating the strong generalization capability of the proposed enhanced method across different sensors and environments. This aligns well with the design purposes. Certainly, the proposed detection method does have its limitations, with occlusion being the most significant challenge. Large areas of occlusion can alter the global features of an image, impacting the detection precision of the method. In future work, we plan to mitigate the effects of dynamic occlusion by incorporating stereo-based joint detection or image sequence-based methods. Integrating contextual information could also further enhance the detection performance. We will further optimize the storage structure of the aggregated descriptors to accelerate detection, particularly for long-term detection tasks. Additionally, we will continue to focus on improving the operational efficiency of SLAM systems. Conceptualization, Y.Y. and F.L. ; methodology, Y.Y., F.L., and X.L. ; software, Y.Y., F.L., and J.C.; validation, Y.Y. and J.C.; formal analysis, Y.Y. and F.L. ; investigation, Y.Y. and F.L. ; writing--original draft preparation, Y.Y. ; writing--review and editing, Y.Y. and X.L. ; visualization, Y.Y. ; supervision, X.L. ; project administration, X.L. ; funding acquisition, X.L. All authors have read and agreed to the published version of the manuscript. This research was funded by the National Natural Science Foundation of China, grant number U20A20193. The data presented in this study are available on request from the corresponding author. The data are not publicly available due to privacy or ethical restrictions. The authors declare no conflicts of interest. To provide a clearer presentation of the multi-layer detection algorithm, we have detailed its implementation steps in Algorithm A1. The function firstLayerFilter primarily narrows the range of candidate frames, using only one aggregated feature vector and a fast similarity calculation method. The function secondLayerFilter utilizes all feature vectors and a more precise similarity calculation to obtain the final reliable candidate frames. ```
1:Input:
2:kf_db: keyframes database
3:cur_kf: current keyframe
4:Output:
5:n: the number of candidate frames
6:v: the vector of candidate frames
7:function firstLayerFilter (kf_db, cur_kf):
8:for each frame in kf_db:
9:dis \(\leftarrow\) manhattanDistance (frame.vr, cur_kf.vr)-vr is row aggregation feature vector
10:if dis < distanceHeap.top( )-Max-Heap. The maximum value is at the top.