Fixed unused tracking for OpenCV 2.x

pull/355/head
AlexeyAB 7 years ago
parent ea09a6e0b3
commit 5424987dd1
  1. 3
      src/yolo_console_dll.cpp
  2. 10
      src/yolo_v2_class.hpp

@ -13,6 +13,7 @@
#define OPENCV #define OPENCV
#endif #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 #include "yolo_v2_class.hpp" // imported functions from DLL
@ -107,7 +108,7 @@ int main(int argc, char *argv[])
auto obj_names = objects_names_from_file(names_file); auto obj_names = objects_names_from_file(names_file);
std::string out_videofile = "result.avi"; std::string out_videofile = "result.avi";
bool const save_output_videofile = true; bool const save_output_videofile = false;
#ifdef TRACK_OPTFLOW #ifdef TRACK_OPTFLOW
Tracker_optflow tracker_flow; Tracker_optflow tracker_flow;
detector.wait_stream = true; detector.wait_stream = true;

@ -8,11 +8,6 @@
#include <opencv2/opencv.hpp> // C++ #include <opencv2/opencv.hpp> // C++
#include "opencv2/highgui/highgui_c.h" // C #include "opencv2/highgui/highgui_c.h" // C
#include "opencv2/imgproc/imgproc_c.h" // C #include "opencv2/imgproc/imgproc_c.h" // C
#include <opencv2/cudaoptflow.hpp>
#include <opencv2/cudaimgproc.hpp>
#include <opencv2/cudaarithm.hpp>
#include <opencv2/core/cuda.hpp>
#endif // OPENCV #endif // OPENCV
#ifdef YOLODLL_EXPORTS #ifdef YOLODLL_EXPORTS
@ -149,6 +144,11 @@ private:
#if defined(TRACK_OPTFLOW) && defined(OPENCV) #if defined(TRACK_OPTFLOW) && defined(OPENCV)
#include <opencv2/cudaoptflow.hpp>
#include <opencv2/cudaimgproc.hpp>
#include <opencv2/cudaarithm.hpp>
#include <opencv2/core/cuda.hpp>
class Tracker_optflow { class Tracker_optflow {
public: public:
const int gpu_count; const int gpu_count;

Loading…
Cancel
Save