@@ -119,9 +119,11 @@ namespace cv
119
119
// Detect all
120
120
for (int k = 0 ; k < targetNum; k++)
121
121
tmpCandidates[k] = boundingBoxes[k];
122
+ #ifdef HAVE_OPENCL
122
123
if (ocl::haveOpenCL ())
123
124
ocl_detect_all (imageForDetector, image_blurred, tmpCandidates, detectorResults, detect_flgs, trackers);
124
125
else
126
+ #endif
125
127
detect_all (imageForDetector, image_blurred, tmpCandidates, detectorResults, detect_flgs, trackers);
126
128
127
129
for (int k = 0 ; k < targetNum; k++)
@@ -215,16 +217,20 @@ namespace cv
215
217
}
216
218
tldModel->integrateRelabeled (imageForDetector, image_blurred, detectorResults[k]);
217
219
pExpert.additionalExamples (examplesForModel, examplesForEnsemble);
220
+ #ifdef HAVE_OPENCL
218
221
if (ocl::haveOpenCL ())
219
222
tldModel->ocl_integrateAdditional (examplesForModel, examplesForEnsemble, true );
220
223
else
224
+ #endif
221
225
tldModel->integrateAdditional (examplesForModel, examplesForEnsemble, true );
222
226
examplesForModel.clear (); examplesForEnsemble.clear ();
223
227
nExpert.additionalExamples (examplesForModel, examplesForEnsemble);
224
228
229
+ #ifdef HAVE_OPENCL
225
230
if (ocl::haveOpenCL ())
226
231
tldModel->ocl_integrateAdditional (examplesForModel, examplesForEnsemble, false );
227
232
else
233
+ #endif
228
234
tldModel->integrateAdditional (examplesForModel, examplesForEnsemble, false );
229
235
}
230
236
else
@@ -434,6 +440,7 @@ namespace cv
434
440
}
435
441
}
436
442
443
+ #ifdef HAVE_OPENCL
437
444
void ocl_detect_all (const Mat& img, const Mat& imgBlurred, std::vector<Rect2d>& res, std::vector < std::vector < tld::TLDDetector::LabeledPatch > > &patches, std::vector<bool > &detect_flgs,
438
445
std::vector<Ptr<Tracker> > &trackers)
439
446
{
@@ -644,5 +651,6 @@ namespace cv
644
651
}
645
652
}
646
653
}
654
+ #endif
647
655
648
656
}
0 commit comments