1.opencv/cv.h: 没有那个文件或目录
将opencv/cv.h:修改为
#include
2.‘CvMat’ has not been declared
添加头文件
#include
3.‘CV_REDUCE_SUM’ was not declared in this scope
添加头文件
#include
4.‘cvCreateMat’ was not declared in this scope;
等以下的报错
在这里插入图片描述
添加头文件
#include
或
#include
5. 编译DBoW2等出现"OpenCV > 2.4.3 not found."
make[2]: *** No rule to make target '../Thirdparty/DBoW2/lib/libDBoW2.so', needed by '../lib/libORB_SLAM2.so'
将CMakeLists.txt的opencv改称对应版本
6.‘CV_LOAD_IMAGE_UNCHANGED’ was not declared in this scope
修改为
cv::IMREAD_UNCHANGED
7. ‘CV_GRAY2BGR’ was not declared in this scope
修改方法为:将CV_BGR2GRAY改为cv::COLOR_BGR2GRAY
或者加入头文件
#include
8. error: ‘CV_CALIB_CB_ADAPTIVE_THRESH’ was not declared in this scope
#include
9.‘CV_AA’ was not declared in this scope
#include
10.‘CV_FONT_HERSHEY_SIMPLEX’ was not declared in this scope
修改方法:将CV_FONT_HERSHEY_SIMPLEX改为cv::FONT_HERSHEY_SIMPLEX
11. error: ‘CV_REDUCE_SUM’ was not declared in this scope
#include
12.error: static assertion failed: std::map must have the same value_type as its allocator
在loopClosing.h:50修改
typedef map
std::less
Eigen::aligned_allocator
> KeyFrameAndPose;
为
typedef map
std::less
Eigen::aligned_allocator
> KeyFrameAndPose;