VINS-fusion安装

VINS-fusion中用的opencv3,如果安装的opencv4要做一系列替换

VINS-Mono在opencv4环境下的安装问题和解决方法
https://zhuanlan.zhihu.com/p/548140724

Vins-Fusion安装记录
https://zhuanlan.zhihu.com/p/432167383

CV_FONT_HERSHEY_SIMPLEX -> cv::FONT_HERSHEY_SIMPLEX
CV_LOAD_IMAGE_GRAYSCALE  ->  cv::IMREAD_GRAYSCALE

error: ‘CV_RGB2GRAY’ was not declared in this scope
这个问题加头文件
#include

依赖库的问题

编译opencv3.4.10-GPU cuda10.0时glog库出现问题
https://blog.csdn.net/qq_41246375/article/details/119487839

Ubuntu下正确使用cmake编译安装glog
https://blog.csdn.net/qq_22634949/article/details/101718879

ros编译工程的时候出现 -fPIC 报错的解决办法
https://blog.csdn.net/qq_21597761/article/details/102544703

报错rospack: error while loading shared libraries: librospack.so
然后在~/.bashrc中添加了如下

export LD_LIBRARY_PATH=/opt/ros/melodic/lib

https://blog.csdn.net/weixin_43981221/article/details/89885479

用opencv4,编译完成VINS后运行会报错segmentation fault 段错误

网上说是opencv和ROS的版本冲突
https://github.com/iamrajee/drone_ws

https://github.com/HKUST-Aerial-Robotics/VINS-Fusion/issues/106

https://github.com/HKUST-Aerial-Robotics/VINS-Fusion/issues/134

于是重新安转了一个opencv3.4.1,

查看ubuntu下的OpenCV安装版本:

pkg-config opencv --modversion

查看所有opencv的路径

sudo find / -iname "*opencv*"

ubuntu下查询OpenCV版本以及路径

opencv编译的时候指定安装路径:

cmake -DCMAKE_INSTALL_PREFIX=~/opencv-3.4.1/build/installed ..

Ubuntu下多版本OpenCV共存和切换

Ubuntu配置OpenCV及多版本OpenCV共存

安装后有时候还要修改/etc/ld.so.conf
参考 https://blog.csdn.net/qq_42257666/article/details/125673177
有时候要修改/etc/ld.so.conf.d/opencv.conf
参考https://blog.csdn.net/p942005405/article/details/114528833

中间还有cmake问题,版本太低,解决办法如下:

/usr/share$ sudo mkdir cmake-3.27
sudo cp -r  /home/junjieliu/cmake-3.27.0-rc3-linux-x86_64/share/* .

你可能感兴趣的:(计算机视觉)