Skip to content

Commit 68bd41b

Browse files
committed
Fix OpenCV 4.0+ dep in CMake, log algorithm type
1 parent f2f65c0 commit 68bd41b

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

programs/sceneReconstruction/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
if(NOT DEFINED ENABLE_sceneReconstruction OR ENABLE_sceneReconstruction)
2-
if(NOT TARGET opencv_rgbd)
3-
message(WARNING "OpenCV/rgbd module not found, disabling sceneReconstruction program")
2+
if(NOT TARGET opencv_rgbd OR NOT OpenCV_VERSION VERSION_GREATER_EQUAL 4.0)
3+
message(WARNING "OpenCV 4.0+/rgbd module not found, disabling sceneReconstruction program")
44
elseif(NOT YARP_cv_FOUND)
55
message(WARNING "YARP_cv package not found, disabling sceneReconstruction program")
66
endif()
77
endif()
88

99
cmake_dependent_option(ENABLE_sceneReconstruction "Enable/disable sceneReconstruction program" ON
10-
"TARGET opencv_rgbd;YARP_cv_FOUND" OFF)
10+
"TARGET opencv_rgbd;OpenCV_VERSION VERSION_GREATER_EQUAL 4.0;YARP_cv_FOUND" OFF)
1111

1212
if(ENABLE_sceneReconstruction)
1313

programs/sceneReconstruction/DynaFu.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ std::unique_ptr<KinectFusion> makeDynaFu(const yarp::os::Searchable & config, co
1515

1616
auto params = Params::defaultParams();
1717

18+
CD_INFO("algorithm: DynaFu\n");
19+
1820
params->frameSize = cv::Size(width, height);
1921
CD_INFO("dimensions: width = %d, height = %d\n", width, height);
2022

programs/sceneReconstruction/KinFu.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ std::unique_ptr<KinectFusion> makeKinFu(const yarp::os::Searchable & config, con
2828

2929
auto params = Params::defaultParams();
3030

31+
CD_INFO("algorithm: KinFu\n");
32+
3133
params->frameSize = cv::Size(width, height);
3234
CD_INFO("dimensions: width = %d, height = %d\n", width, height);
3335

0 commit comments

Comments
 (0)