shape_based_matching
shape_based_matching copied to clipboard
如何修改opencv 配置在CMakeLists.txt?
一定要用opencv 3.0吗?
opencv
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} /opt/ros/kinetic) find_package(OpenCV 3 REQUIRED) include_directories(${OpenCV_INCLUDE_DIRS}) 默认配置如上,如何在CMakeLists.txt修改opencv 配置为4.5.5? 我装的最新版OpenCV 4.5.5, 路径在D:\OpenCV\install\opencv\build\x64\vc15,当运行CMake时,得到以下错误提示。
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044. CMake Error at cuda_icp/CMakeLists.txt:3 (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" (requested version 3) 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.
Configuring incomplete, errors occurred! See also "D:/source/shape_based_matching4/CMakeFiles/CMakeOutput.log".
set(OpenCV_DIR D:/opencv/build/install) find_package(OpenCV 3 REQUIRED) include_directories(${OpenCV_INCLUDE_DIRS})
应该是需要opencv 3.0,OpenCV_DIR 想我类似那样配置,opencv 3.0最好也自己编译一下,我网上下的,在训练的时候居然不能用
4也可以