当前位置:网站首页>常用库安装
常用库安装
2022-07-26 11:00:00 【AutoGalaxy】
一. DBoW2
github的DBoW2不能替代ORBSLAM2内部的库,ORBSLAM2多实现了一些函数在内部,别再尝试了,再尝试得动源码。
之所以下载这个库,是因为你目前想手写一个ORBSLAM2,谁知道,ORBSLAM2内部自带的词袋模型只适用DBoW2,而不适用DBoW3,因此,你必须得自己引入DBoW2,这里就需要对比ORBSLAM2里面的DBoW2的CMakeLists文件了!
1. 先给出库的github下载地址:dorian3d/DBoW2: Enhanced hierarchical bag-of-word library for C++ (github.com)
https://github.com/dorian3d/DBoW2
下面是github的CMakeList文件

下面是ORBSLAM2里面的DBoW2的CMakeLists文件

可以看到orbslam2的dbow2代码跟github上的有一些区别
2. 开始正式移植
首先,移植关注的点应该在于:
(1)add_library生成的库包含什么文件
(2)生成的库名是什么样,生成的库类型(静态/共享)
(3)库链接了什么库
针对第(1)点
ORBSLAM2包含如下的文件


而github里面包含的文件如下
![]()
可以看见 第一点是不相同的,因此若编译出错,可以考虑一下这里是否少了DUtils库的内容
针对第(2)点
ORBSLAM2的是DBoW2
github的是${PROJECT_NAME},而${PROJECT_NAME}的值又是DBoW2,因此二者相同
针对第(3)点
ORBSLAM2 链接了如下

库类型是SHARED
github里面链接了如下
库类型是SHARED
综述所上可得,只有第一点不太相同,因此如果运行出错,大概率是由于第(1)点少了DUtils库导致的。
3. 最后也是最重要的一点,既然没有选择安装这个库,那么ORBSLAM2是如何包含头文件的呢?
我们都知道引用一个库包含以下两步骤
(1)包含头文件目录
(2)链接库文件
orbslam2太残暴了,它直接下面这样引用的

边栏推荐
- postman 导出导入
- PyQt5快速开发与实战 3.1 Qt Designer快速入门
- The assignment of member pointer defined in C structure and the use of structure pointer as member function parameter
- ThreadPoolExecutor是怎样执行任务的
- [学习进度]5月
- ISO 639:1988 : Code for the representation of names of languages
- 数据可视化-《白蛇2:青蛇劫起》(2)
- ESXi6.5补丁更新
- -bash: ./build.sh: /bin/bash^M: 坏的解释器: 没有那个文件或目录
- MySQL数据库的简单使用
猜你喜欢
随机推荐
PyQt5快速开发与实战 3.1 Qt Designer快速入门
BLE之ATT请求
Bash shell learning notes (6)
mysql学习笔记
MySQL basic knowledge summary
Scrapy shell出现的一个错误
Wireshark basic tutorial Ethernet frame analysis.
Why give up NPM and turn to yarn
SparseArray of the source code for novices
In depth interpretation of happens before principle
36.【const函数放在函数前后的区别】
Synchronized与ReentrantLock
Le audio specification overview
Logging learning final edition - configured different levels of log printing colors
3dunity game project practice - first person shooting game
PyQt5快速开发与实战 第1章 认识PyQt5
ThreadPoolExecutor是怎样执行任务的
SCADA and three industrial control systems PLC, DCS and FCS
Visual conversion of nmap vulnerability scanning results
线程之间的几种通信方式
https://github.com/dorian3d/DBoW2








