Skip to content

Commit

Permalink
Added missing OpenCV version check
Browse files Browse the repository at this point in the history
  • Loading branch information
fig committed Sep 20, 2024
1 parent 88d05bb commit 0bbca70
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cc/tracking/tracking.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

#if CV_VERSION_GREATER_EQUAL(3, 2, 0)
#include "./Trackers/TrackerGOTURN.h"
#include "./Trackers/TrackerNano.h"
#endif

#if CV_VERSION_GREATER_EQUAL(3, 4, 0)
Expand All @@ -25,6 +24,10 @@
#include "./Trackers/TrackerCSRT.h"
#endif

#if CV_VERSION_GREATER_EQUAL(4, 7, 0)
#include "./Trackers/TrackerNano.h"
#endif

NAN_MODULE_INIT(Tracking::Init) {
TrackerBoosting::Init(target);
TrackerMedianFlow::Init(target);
Expand All @@ -43,7 +46,6 @@ NAN_MODULE_INIT(Tracking::Init) {

#if CV_VERSION_GREATER_EQUAL(3, 2, 0)
TrackerGOTURN::Init(target);
TrackerNano::Init(target);
#endif

#if CV_VERSION_GREATER_EQUAL(3, 4, 0)
Expand All @@ -52,6 +54,10 @@ NAN_MODULE_INIT(Tracking::Init) {
#if CV_VERSION_GREATER_EQUAL(3, 4, 1)
TrackerCSRT::Init(target);
#endif

#if CV_VERSION_GREATER_EQUAL(4, 7 , 0)
TrackerNano::Init(target);
#endif
};

#endif

0 comments on commit 0bbca70

Please sign in to comment.