Graph-Cut RANSAC来自于https://gitee.com/fuyawangye/graph-cut-ransac
链接中说明该算法的配置环境为
Windows下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添加路径
Windows下Graph-Cut RANSAC算法环境配置
(2)第一次configure
Windows下Graph-Cut RANSAC算法环境配置
会出现error,如下:
Windows下Graph-Cut RANSAC算法环境配置
Windows下Graph-Cut RANSAC算法环境配置

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路径

Windows下Graph-Cut RANSAC算法环境配置
Windows下Graph-Cut RANSAC算法环境配置
Windows下Graph-Cut RANSAC算法环境配置
(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文件
设置启动项目
Windows下Graph-Cut RANSAC算法环境配置
Windows下Graph-Cut RANSAC算法环境配置
在build下创建文件夹results(用于Graph-Cut RANSAC源码保存文件):
Windows下Graph-Cut RANSAC算法环境配置
(7)最后点击本地Windows调试器开始调试
Windows下Graph-Cut RANSAC算法环境配置
Windows下Graph-Cut RANSAC算法环境配置
至此,完成配置!

相关文章:

  • 2021-04-29
  • 2021-07-06
  • 2021-04-01
  • 2021-11-17
  • 2021-07-11
  • 2021-11-06
  • 2021-07-25
  • 2021-05-28
猜你喜欢
  • 2021-07-06
  • 2022-12-23
  • 2021-05-21
  • 2021-11-19
  • 2021-05-30
  • 2022-01-01
相关资源
相似解决方案