superpoint_vo_with_fpga

准备工作

依赖库

  • opencv(包含contrib)
  • Eigen3
  • g2o
  • DNNDK

数据集

数据集的文件结构应与TUM的存储结构相同:

$DATA_DIR
├─ rgb
│  ├─ *.png
│  └─ …
├─ depth
│  ├─ *.png
│  └─ …
├─ rgb.txt
├─ depth.txt
└─ match.txt

其中match.txt由TUM官网上的associate.py生成:

python associate.py ./rgb.txt ./depth.txt

简单运行

修改src/visodo.cpp文件中的get_Name_and_Scale()函数的代码:

char listFileDir[200] = "/home/linaro/dataset/tum/rgbd_dataset_freiburg2_desk/";

替换为你的数据集的地址。修改相机的编号为你的数据集对应的相机:

#define K_FREIBURG 2

运行指令:

mkdir build
cd build
cmake .. && make
sudo ./main

修改参数

src/visodo.cpp文件中可修改的参数

  • 最大运行帧数(运行到最大帧数或数据集结束都会停止)
#define MAX_FRAME 5000
  • 特征点检测方法:orb/sift/superpoint
#define DETECTOR "superpoint"

src/vo_features.cpp文件中可修改的参数

  • NMS的阈值
#define NMS_Threshold 4
  • 特征点数量
#define KEEP_K_POINTS 200
  • descriptor匹配间距的阈值
#define NN_thresh 0.7
  • descriptor匹配方法
    • BF:暴力匹配
    • FlannBased:Fast Library forApproximate Nearest Neighbors,一种近似方法
#define MATCHER "BF"