Windows下Graph-Cut RANSAC算法环境配置

Graph-Cut RANSAC来自于https://gitee.com/fuyawangye/graph-cut-ransac
链接中说明该算法的配置环境为
在这里插入图片描述
本人的环境为Eigen 3.3.7、Cmake 3.17.0、opencv-4.2.0、 opencv_contrib-4.2.0、vs2019 Community
下面是我的配置过程:
1. Eigen编译
Eigen编译参考链接:https://blog.csdn.net/hrq3333/article/details/81265893
Eigen源码下载链接:https://pan.baidu.com/s/1xgyU-I37hOxfi3dfjPseWQ 提取码:6km7
Eigen编译版下载链接:https://pan.baidu.com/s/1WfM6E7S18kbrVyTxj-yH7g 提取码:6h1l
2.Opencv编译
Opencv编译参考链接:https://blog.csdn.net/ezhchai/article/details/80557936
opencv-4.2.0源码下载链接:https://pan.baidu.com/s/17YtrC9rDnjggLoEsnXrzMg 提取码:5iq4
opencv_contrib-4.2.0源码下载链接:https://pan.baidu.com/s/1adBec0qs7HjkBP1LW1uFKA 提取码:60of
3.Graph-Cut RANSAC环境配置
Graph-Cut RANSAC源码:链接:https://pan.baidu.com/s/1ieZjJ0bLsCIqGXjx3raE7w 提取码:8btl
(1)cmake添加路径
在这里插入图片描述
(2)第一次configure
在这里插入图片描述
会出现error,如下:
在这里插入图片描述
在这里插入图片描述

CMake Warning at CMakeLists.txt:12 (find_package): By not providing
“FindOpenCV.cmake” in CMAKE_MODULE_PATH this project has asked CMake
to find a package configuration file provided by “OpenCV”, but CMake
did not find one.
Could not find a package configuration file provided by “OpenCV”
with any of the following names:
OpenCVConfig.cmake
opencv-config.cmake
Add the installation prefix of “OpenCV” to CMAKE_PREFIX_PATH or set
“OpenCV_DIR” to a directory containing one of the above files. If
“OpenCV” provides a separate development package or SDK, be sure it
has been installed.
Found OpenMP_CXX: -openmp (found version “2.0”) Found OpenMP: TRUE
(found version “2.0”) CMake Error at CMakeLists.txt:37
(find_package): By not providing “FindEigen3.cmake” in
CMAKE_MODULE_PATH this project has asked CMake to find a package
configuration file provided by “Eigen3”, but CMake did not find one.
Could not find a package configuration file provided by “Eigen3”
with any of the following names:
Eigen3Config.cmake
eigen3-config.cmake
Add the installation prefix of “Eigen3” to CMAKE_PREFIX_PATH or set
“Eigen3_DIR” to a directory containing one of the above files. If
“Eigen3” provides a separate development package or SDK, be sure it
has been installed.

即没有识别到Eigen和opencv
(3)在红色处添加Eigen和opencv的build路径

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
(4)第二次configure

Found OpenCV: D:/opencv/build (found version “4.2.0”) Found
OpenMP_CXX: -openmp Found OpenMP: TRUE The C compiler
identification is MSVC 19.25.28614.0 Check for working C compiler:
C:/Program Files (x86)/Microsoft Visual
Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe

  • works Detecting C compiler ABI info Detecting C compiler ABI info - done Detecting C compile features Detecting C compile features - done
    Found PythonInterp: D:/Python/Python38/python.exe (found version
    “3.8.3”) Found PythonLibs: D:/Python/Python38/libs/Python38.lib
    pybind11 v2.1.1 Performing Test HAS_MSVC_GL_LTCG Performing Test
    HAS_MSVC_GL_LTCG - Success LTO enabled
    Configuring done

出现上面的,说明configure成功
(5)点击Generate

Generating done

出现上面的,说明Generate成功
(6)打开Generate生成的sln文件
设置启动项目
在这里插入图片描述
在这里插入图片描述
在build下创建文件夹results(用于Graph-Cut RANSAC源码保存文件):
在这里插入图片描述
(7)最后点击本地Windows调试器开始调试
在这里插入图片描述
在这里插入图片描述
至此,完成配置!

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值