VDO-SLAM 配置 2022 Ubuntu20.04

一、配置

1. opencv

OpenCV version >= 3.4
查看方式:pkg-config --modversion opencv
安装方式:OpenCV源码安装

2. g2o

g2o >= 3.1.0

3. 下载

cd && git clone https://gitcode.net/mirrors/halajun/VDO_SLAM.git VDO-SLAM
cd VDO-SLAM
chmod +x build.sh
./build.sh

4. 编译

4.1 缺少xfeatures2d文件

https://gitcode.net/opencv/opencv_contrib/-/tree/4.x/modules/xfeatures2d/include/opencv2
处下载文件和文件夹,粘贴到/usr/include/opencv2

4.2 DRAW_OVER_OUTIMG

cv::drawKeypoints(… , 1); 改为 cv::drawKeypoints(… , cv::DrawMatchesFlags::DRAW_OVER_OUTIMG);

4.3 CV_GRAY2RGB not declared

/home/howtoloveyou/VDO-SLAM/src/Tracking.cc:496:35: error: ‘CV_GRAY2RGB’ was not declared in this scope
496 | cvtColor(mImGray, mImBGR, CV_GRAY2RGB);
| ^~~~~~~~~~~
添加头文件:#include <opencv2/imgproc/types_c.h>

4.4 error: ‘CV_FILLED’ was not declared in this scope

CV_FILLED改为:cv::FILLED

4.5 error: ‘CV_LOAD_IMAGE_UNCHANGED’ was not declared in this scope

添加头文件:#include <opencv2/opencv.hpp>
CV_LOAD_IMAGE_UNCHANGED替换为cv::IMREAD_UNCHANGED

4.6 error: ‘readOpticalFlow’ is not a member of ‘cv::optflow’; did you mean ‘calcOpticalFlowSF’?

cv::optflow::readOpticalFlow改为:cv::readOpticalFlow

5. 运行

下载 demo-kitti,解压到VDO-SLAM下,通过如下的命令运行:
cd ~/VDO_SLAM && ./example/vdo_slam example/kitti-0000-0013.yaml demo-kitti/请添加图片描述

  • 6
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值