EAO-SLAM安装

本文解决了CMake在配置RapidJSON和OpenCV过程中出现的问题,包括找不到配置文件及成员函数错误等,并提供了多版本OpenCV共存时的解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Error:

CMake Warning at CMakeLists.txt:189 (FIND_PACKAGE):
  By not providing "FindRapidJSON.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "RapidJSON", but CMake did not find one.

  Could not find a package configuration file provided by "RapidJSON" with
  any of the following names:

    RapidJSONConfig.cmake
    rapidjson-config.cmake

  Add the installation prefix of "RapidJSON" to CMAKE_PREFIX_PATH or set
  "RapidJSON_DIR" to a directory containing one of the above files.  If
  "RapidJSON" provides a separate development package or SDK, be sure it has
  been installed.

Ref 安装RapidJSON,单独安装Line3Dpp

/home/k402/EAO-SLAM/Thirdparty/Line3Dpp/line3D.cc: In static member function ‘static void L3DPP::Line3D::undistortImage(const cv::Mat&, cv::Mat&, const Vector3d&, const Vector2d&, const Matrix3d&):
/home/k402/EAO-SLAM/Thirdparty/Line3Dpp/line3D.cc:106:9: error: ‘initUndistortRectifyMap’ is not a member of ‘cv’
         cv::initUndistortRectifyMap(cvK,cvDistCoeffs,I,cvK,cv::Size(inImg.cols,
         ^
/home/k402/EAO-SLAM/Thirdparty/Line3Dpp/line3D.cc: In member function ‘L3DPP::DataArray<float4>* L3DPP::Line3D::detectLineSegments(unsigned int, const cv::Mat&):
/home/k402/EAO-SLAM/Thirdparty/Line3Dpp/line3D.cc:256:40: error: ‘CV_RGB2GRAY’ was not declared in this scope
             cv::cvtColor(image,imgGray,CV_RGB2GRAY);
                                        ^
CMakeFiles/line3Dpp.dir/build.make:62: recipe for target 'CMakeFiles/line3Dpp.dir/line3D.cc.o' failed

当opencv多版本共存,指定路径,在CmakeList.txt中加入:

find_package(OpenCV 3.4.1 REQUIRED HINTS /usr/local/opencv3)

Error:段错误,跑不完整

ref:github

你可以试试将所有 CMakeLists.txt (包括第三方库)中的 -march=native 删掉,重新编译试试。

自制数据集

GitHub yolo_batch
报错参考:博客

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值