From cd8a3dcb4ca42f22ad8f46a95e00977c92be6bbd Mon Sep 17 00:00:00 2001 From: AlexeyAB Date: Fri, 9 Feb 2018 02:22:42 +0300 Subject: [PATCH] Compile fixes --- src/yolo_console_dll.cpp | 2 +- src/yolo_v2_class.hpp | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/yolo_console_dll.cpp b/src/yolo_console_dll.cpp index 6aaebc52..686ea33c 100644 --- a/src/yolo_console_dll.cpp +++ b/src/yolo_console_dll.cpp @@ -14,7 +14,7 @@ #endif // To use tracking - uncomment the following line. Tracking is supported only by OpenCV 3.x -#define TRACK_OPTFLOW +//#define TRACK_OPTFLOW #include "yolo_v2_class.hpp" // imported functions from DLL diff --git a/src/yolo_v2_class.hpp b/src/yolo_v2_class.hpp index 1eaafb82..7d0516ee 100644 --- a/src/yolo_v2_class.hpp +++ b/src/yolo_v2_class.hpp @@ -144,8 +144,8 @@ private: }; -#ifdef OPENCV -#ifdef TRACK_OPTFLOW + +#if defined(TRACK_OPTFLOW) && defined(OPENCV) #include #include @@ -324,9 +324,11 @@ public: class Tracker_optflow {}; -#endif // TRACK_OPTFLOW +#endif // defined(TRACK_OPTFLOW) && defined(OPENCV) +#ifdef OPENCV + cv::Scalar obj_id_to_color(int obj_id) { int const colors[6][3] = { { 1,0,1 },{ 0,0,1 },{ 0,1,1 },{ 0,1,0 },{ 1,1,0 },{ 1,0,0 } }; int const offset = obj_id * 123457 % 6; @@ -469,4 +471,3 @@ public: } }; #endif // OPENCV -