@@ -23,10 +23,10 @@ NAN_MODULE_INIT(MultiTracker::Init) {
23
23
Nan::SetPrototypeMethod (ctor, " addKCF" , MultiTracker::AddKCF);
24
24
#if CV_VERSION_GREATER_EQUAL(3, 4, 0)
25
25
Nan::SetPrototypeMethod (ctor, " addMOSSE" , MultiTracker::AddTLD);
26
- #endif
26
+ #endif // CV_VERSION_GREATER_EQUAL(3, 4, 0)
27
27
#if CV_VERSION_GREATER_EQUAL(3, 4, 1)
28
28
Nan::SetPrototypeMethod (ctor, " addCSRT" , MultiTracker::AddKCF);
29
- #endif
29
+ #endif // CV_VERSION_GREATER_EQUAL(3, 4, 1)
30
30
Nan::SetPrototypeMethod (ctor, " update" , MultiTracker::Update);
31
31
32
32
Nan::Set (target, FF::newString (" MultiTracker" ), FF::getFunction (ctor));
@@ -38,9 +38,9 @@ NAN_METHOD(MultiTracker::New) {
38
38
MultiTracker* self = new MultiTracker ();
39
39
#if CV_VERSION_GREATER_EQUAL(4, 5, 2)
40
40
self->setNativeObject (cv::makePtr<cv::legacy::MultiTracker>());
41
- #else
41
+ #else // CV_VERSION_GREATER_EQUAL(4, 5, 2)
42
42
self->setNativeObject (cv::makePtr<cv::MultiTracker>());
43
- #endif
43
+ #endif // CV_VERSION_GREATER_EQUAL(4, 5, 2)
44
44
self->Wrap (info.Holder ());
45
45
info.GetReturnValue ().Set (info.Holder ());
46
46
};
@@ -57,9 +57,9 @@ NAN_METHOD(MultiTracker::AddMIL) {
57
57
cv::Ptr <cv::legacy::Tracker> type = cv::legacy::TrackerMIL::create ();
58
58
#elif CV_VERSION_GREATER_EQUAL(3, 3, 0)
59
59
cv::Ptr <cv::Tracker> type = cv::TrackerMIL::create ();
60
- #else
60
+ #else // CV_VERSION_GREATER_EQUAL(3, 3, 0)
61
61
const std::string type (" MIL" );
62
- #endif
62
+ #endif // CV_VERSION_GREATER_EQUAL(4, 5, 2)
63
63
bool ret = MultiTracker::unwrapSelf (info)->add (type, image, boundingBox);
64
64
info.GetReturnValue ().Set (Nan::New (ret));
65
65
}
@@ -76,9 +76,9 @@ NAN_METHOD(MultiTracker::AddBOOSTING) {
76
76
cv::Ptr <cv::legacy::Tracker> type = cv::legacy::TrackerBoosting::create ();
77
77
#elif CV_VERSION_GREATER_EQUAL(3, 3, 0)
78
78
cv::Ptr <cv::Tracker> type = cv::TrackerBoosting::create ();
79
- #else
79
+ #else // CV_VERSION_GREATER_EQUAL(3, 3, 0)
80
80
const std::string type (" BOOSTING" );
81
- #endif
81
+ #endif // CV_VERSION_GREATER_EQUAL(4, 5, 2)
82
82
bool ret = MultiTracker::unwrapSelf (info)->add (type, image, boundingBox);
83
83
info.GetReturnValue ().Set (Nan::New (ret));
84
84
}
@@ -95,9 +95,9 @@ NAN_METHOD(MultiTracker::AddMEDIANFLOW) {
95
95
cv::Ptr <cv::legacy::Tracker> type = cv::legacy::TrackerMedianFlow::create ();
96
96
#elif CV_VERSION_GREATER_EQUAL(3, 3, 0)
97
97
cv::Ptr <cv::Tracker> type = cv::TrackerMedianFlow::create ();
98
- #else
98
+ #else // CV_VERSION_GREATER_EQUAL(3, 3, 0)
99
99
const std::string type (" MEDIANFLOW" );
100
- #endif
100
+ #endif // CV_VERSION_GREATER_EQUAL(4, 5, 2)
101
101
bool ret = MultiTracker::unwrapSelf (info)->add (type, image, boundingBox);
102
102
info.GetReturnValue ().Set (Nan::New (ret));
103
103
}
@@ -114,9 +114,9 @@ NAN_METHOD(MultiTracker::AddTLD) {
114
114
cv::Ptr <cv::legacy::Tracker> type = cv::legacy::TrackerTLD::create ();
115
115
#elif CV_VERSION_GREATER_EQUAL(3, 3, 0)
116
116
cv::Ptr <cv::Tracker> type = cv::TrackerTLD::create ();
117
- #else
117
+ #else // CV_VERSION_GREATER_EQUAL(3, 3, 0)
118
118
const std::string type (" TLD" );
119
- #endif
119
+ #endif // CV_VERSION_GREATER_EQUAL(4, 5, 2)
120
120
bool ret = MultiTracker::unwrapSelf (info)->add (type, image, boundingBox);
121
121
info.GetReturnValue ().Set (Nan::New (ret));
122
122
}
@@ -133,9 +133,9 @@ NAN_METHOD(MultiTracker::AddKCF) {
133
133
cv::Ptr <cv::legacy::Tracker> type = cv::legacy::TrackerKCF::create ();
134
134
#elif CV_VERSION_GREATER_EQUAL(3, 3, 0)
135
135
cv::Ptr <cv::Tracker> type = cv::TrackerKCF::create ();
136
- #else
136
+ #else // CV_VERSION_GREATER_EQUAL(3, 3, 0)
137
137
const std::string type (" KCF" );
138
- #endif
138
+ #endif // CV_VERSION_GREATER_EQUAL(4, 5, 2)
139
139
bool ret = MultiTracker::unwrapSelf (info)->add (type, image, boundingBox);
140
140
info.GetReturnValue ().Set (Nan::New (ret));
141
141
}
@@ -151,6 +151,7 @@ NAN_METHOD(MultiTracker::Update) {
151
151
MultiTracker::unwrapSelf (info)->update (image, rects);
152
152
info.GetReturnValue ().Set (Rect::ArrayConverter::wrap (rects));
153
153
}
154
+
154
155
#if CV_VERSION_GREATER_EQUAL(3, 4, 0)
155
156
156
157
NAN_METHOD (MultiTracker::AddMOSSE) {
@@ -163,14 +164,14 @@ NAN_METHOD(MultiTracker::AddMOSSE) {
163
164
}
164
165
#if CV_VERSION_GREATER_EQUAL(4, 5, 2)
165
166
cv::Ptr <cv::legacy::Tracker> type = cv::legacy::TrackerMOSSE::create ();
166
- #else
167
+ #else // CV_VERSION_GREATER_EQUAL(4, 5, 2)
167
168
cv::Ptr <cv::Tracker> type = cv::TrackerMOSSE::create ();
168
- #endif
169
+ #endif // CV_VERSION_GREATER_EQUAL(4, 5, 2)
169
170
bool ret = MultiTracker::unwrapSelf (info)->add (type, image, boundingBox);
170
171
info.GetReturnValue ().Set (Nan::New (ret));
171
172
}
173
+ #endif // CV_VERSION_GREATER_EQUAL(3, 4, 0)
172
174
173
- #endif
174
175
#if CV_VERSION_GREATER_EQUAL(3, 4, 1)
175
176
176
177
NAN_METHOD (MultiTracker::AddCSRT) {
@@ -183,14 +184,14 @@ NAN_METHOD(MultiTracker::AddCSRT) {
183
184
}
184
185
#if CV_VERSION_GREATER_EQUAL(4, 5, 2)
185
186
cv::Ptr <cv::legacy::Tracker> type = cv::legacy::TrackerCSRT::create ();
186
- #else
187
+ #else // CV_VERSION_GREATER_EQUAL(4, 5, 2)
187
188
cv::Ptr <cv::Tracker> type = cv::TrackerCSRT::create ();
188
- #endif
189
+ #endif // CV_VERSION_GREATER_EQUAL(4, 5, 2)
189
190
bool ret = MultiTracker::unwrapSelf (info)->add (type, image, boundingBox);
190
191
info.GetReturnValue ().Set (Nan::New (ret));
191
192
}
192
- #endif
193
+ #endif // CV_VERSION_GREATER_EQUAL(3, 4, 1)
193
194
194
- #endif
195
+ #endif // CV_VERSION_GREATER_EQUAL(3, 1, 0)
195
196
196
- #endif
197
+ #endif // HAVE_OPENCV_TRACKING
0 commit comments