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) 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) if(NOT OpenCV_FOUND)
message(FATAL_ERROR "OpenCV > 4.4 not found.") message(FATAL_ERROR "OpenCV > 3.2 not found.")
endif() endif()
MESSAGE("OPENCV VERSION:") MESSAGE("OPENCV VERSION:")

View File

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

View File

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