From fff99af7754c62249f833bf1d41b0206e378cbea Mon Sep 17 00:00:00 2001 From: TinyOh Date: Mon, 1 Apr 2019 18:13:34 +0800 Subject: [PATCH 1/2] fix(api): opencv 2 complie --- src/mynteye/api/processor/disparity_processor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mynteye/api/processor/disparity_processor.cc b/src/mynteye/api/processor/disparity_processor.cc index 4408bed..4537ce4 100644 --- a/src/mynteye/api/processor/disparity_processor.cc +++ b/src/mynteye/api/processor/disparity_processor.cc @@ -17,8 +17,9 @@ #include #include +#ifndef WITH_OPENCV2 #include - +#endif #include "mynteye/logger.h" MYNTEYE_BEGIN_NAMESPACE From 43e356e61781fdc94ba9bc8106fe6f9de3e8d72c Mon Sep 17 00:00:00 2001 From: TinyOh Date: Mon, 1 Apr 2019 18:20:55 +0800 Subject: [PATCH 2/2] fix(api): opencv 2 complie. --- src/mynteye/api/processor/disparity_processor.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mynteye/api/processor/disparity_processor.cc b/src/mynteye/api/processor/disparity_processor.cc index 4537ce4..f946e75 100644 --- a/src/mynteye/api/processor/disparity_processor.cc +++ b/src/mynteye/api/processor/disparity_processor.cc @@ -106,6 +106,7 @@ void DisparityProcessor::SetDisparityComputingMethodType( } bool DisparityProcessor::ConfigFromFile(const std::string& config_file) { +#ifndef WITH_OPENCV2 cv::FileStorage fsSettings(config_file, cv::FileStorage::READ); if (!fsSettings.isOpened()) { std::cerr << "ERROR: Wrong path to settings" << std::endl; @@ -121,6 +122,9 @@ bool DisparityProcessor::ConfigFromFile(const std::string& config_file) { bm_matcher->read(node_bm); } return true; +#else + return false; +#endif } std::string DisparityProcessor::Name() {