opencv版本要一致

master
laobai 2022-04-25 23:28:43 +08:00
parent 009e985d93
commit 7369f6baac
3 changed files with 21 additions and 17 deletions

View File

@ -30,9 +30,11 @@ endif()
LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_modules)
find_package(OpenCV 4.4)
# opencvdbowros
# 3 4
find_package(OpenCV 3.2)
if(NOT OpenCV_FOUND)
message(FATAL_ERROR "OpenCV > 4.4 not found.")
message(FATAL_ERROR "OpenCV > 3.2 not found.")
endif()
MESSAGE("OPENCV VERSION:")

View File

@ -30,13 +30,12 @@ endif()
LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../../../cmake_modules)
find_package(OpenCV 3.0 QUIET)
if(NOT OpenCV_FOUND)
find_package(OpenCV 2.4.3 QUIET)
# opencvdbowros
# 3 4
find_package(OpenCV 3.2)
if(NOT OpenCV_FOUND)
message(FATAL_ERROR "OpenCV > 2.4.3 not found.")
message(FATAL_ERROR "OpenCV > 3.2 not found.")
endif()
endif()
find_package(Eigen3 3.1.0 REQUIRED)
find_package(Pangolin REQUIRED)
@ -46,6 +45,7 @@ ${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/../../../
${PROJECT_SOURCE_DIR}/../../../include
${PROJECT_SOURCE_DIR}/../../../include/CameraModels
${PROJECT_SOURCE_DIR}/../../../Thirdparty/Sophus
${Pangolin_INCLUDE_DIRS}
)
@ -69,15 +69,16 @@ ${LIBS}
)
# Node for monocular camera (Augmented Reality Demo)
rosbuild_add_executable(MonoAR
src/AR/ros_mono_ar.cc
src/AR/ViewerAR.h
src/AR/ViewerAR.cc
)
# cv::mat SOPUS
# rosbuild_add_executable(MonoAR
# src/AR/ros_mono_ar.cc
# src/AR/ViewerAR.h
# src/AR/ViewerAR.cc
# )
target_link_libraries(MonoAR
${LIBS}
)
# target_link_libraries(MonoAR
# ${LIBS}
# )
# Node for stereo camera
rosbuild_add_executable(Stereo

View File

@ -28,8 +28,9 @@ set(SRCS_DUTILS
DUtils/Random.cpp
DUtils/Timestamp.cpp)
find_package(OpenCV 4 QUIET)
# opencvdbowros
# 3 4
find_package(OpenCV 3.2 QUIET)
if(NOT OpenCV_FOUND)
find_package(OpenCV 3.0 QUIET)
if(NOT OpenCV_FOUND)