编译GitHub上的A-LOAM开源项目出现error: ‘CV_LOAD_IMAGE_GRAYSCALE’ was not declared in this scope

A-LOAM链接:https://github.com/HKUST-Aerial-Robotics/A-LOAM

catkin_make后出些如下错误:

/home/caohaojie/SLAM/LOAM/src/A-LOAM/src/kittiHelper.cpp: In function ‘int main(int, char**)’:
/home/caohaojie/SLAM/LOAM/src/A-LOAM/src/kittiHelper.cpp:91:64: error: ‘CV_LOAD_IMAGE_GRAYSCALE’ was not declared in this scope
   91 |         cv::Mat left_image = cv::imread(left_image_path.str(), CV_LOAD_IMAGE_GRAYSCALE);
      |                                                                ^~~~~~~~~~~~~~~~~~~~~~~

解决措施:

找到对应的kittiHelper.cpp文件,将91行与93行的CV_LOAD_IMAGE_GRAYSCALE改为cv::IMREAD_GRAYSCALE

更改后如图所示:

编译GitHub上的A-LOAM开源项目出现error: ‘CV_LOAD_IMAGE_GRAYSCALE’ was not declared in this scope_第1张图片

 

参考链接:https://stackoverflow.com/questions/27424285/cv-load-image-grayscale-is-not-definedpy

你可能感兴趣的:(SLAM,linux,ubuntu)