Commit 5eb03d2e authored by Yan Wang's avatar Yan Wang

Add macro definition to avoid building error.

Signed-off-by: 's avatarYan Wang <yan.wang@linux.intel.com>
parent 06b03a7b
...@@ -119,9 +119,11 @@ namespace cv ...@@ -119,9 +119,11 @@ namespace cv
//Detect all //Detect all
for (int k = 0; k < targetNum; k++) for (int k = 0; k < targetNum; k++)
tmpCandidates[k] = boundingBoxes[k]; tmpCandidates[k] = boundingBoxes[k];
#ifdef HAVE_OPENCL
if (ocl::haveOpenCL()) if (ocl::haveOpenCL())
ocl_detect_all(imageForDetector, image_blurred, tmpCandidates, detectorResults, detect_flgs, trackers); ocl_detect_all(imageForDetector, image_blurred, tmpCandidates, detectorResults, detect_flgs, trackers);
else else
#endif
detect_all(imageForDetector, image_blurred, tmpCandidates, detectorResults, detect_flgs, trackers); detect_all(imageForDetector, image_blurred, tmpCandidates, detectorResults, detect_flgs, trackers);
for (int k = 0; k < targetNum; k++) for (int k = 0; k < targetNum; k++)
...@@ -215,16 +217,20 @@ namespace cv ...@@ -215,16 +217,20 @@ namespace cv
} }
tldModel->integrateRelabeled(imageForDetector, image_blurred, detectorResults[k]); tldModel->integrateRelabeled(imageForDetector, image_blurred, detectorResults[k]);
pExpert.additionalExamples(examplesForModel, examplesForEnsemble); pExpert.additionalExamples(examplesForModel, examplesForEnsemble);
#ifdef HAVE_OPENCL
if (ocl::haveOpenCL()) if (ocl::haveOpenCL())
tldModel->ocl_integrateAdditional(examplesForModel, examplesForEnsemble, true); tldModel->ocl_integrateAdditional(examplesForModel, examplesForEnsemble, true);
else else
#endif
tldModel->integrateAdditional(examplesForModel, examplesForEnsemble, true); tldModel->integrateAdditional(examplesForModel, examplesForEnsemble, true);
examplesForModel.clear(); examplesForEnsemble.clear(); examplesForModel.clear(); examplesForEnsemble.clear();
nExpert.additionalExamples(examplesForModel, examplesForEnsemble); nExpert.additionalExamples(examplesForModel, examplesForEnsemble);
#ifdef HAVE_OPENCL
if (ocl::haveOpenCL()) if (ocl::haveOpenCL())
tldModel->ocl_integrateAdditional(examplesForModel, examplesForEnsemble, false); tldModel->ocl_integrateAdditional(examplesForModel, examplesForEnsemble, false);
else else
#endif
tldModel->integrateAdditional(examplesForModel, examplesForEnsemble, false); tldModel->integrateAdditional(examplesForModel, examplesForEnsemble, false);
} }
else else
...@@ -434,6 +440,7 @@ namespace cv ...@@ -434,6 +440,7 @@ namespace cv
} }
} }
#ifdef HAVE_OPENCL
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, 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,
std::vector<Ptr<Tracker> > &trackers) std::vector<Ptr<Tracker> > &trackers)
{ {
...@@ -644,5 +651,6 @@ namespace cv ...@@ -644,5 +651,6 @@ namespace cv
} }
} }
} }
#endif
} }
\ No newline at end of file
...@@ -51,7 +51,9 @@ namespace cv ...@@ -51,7 +51,9 @@ namespace cv
{ {
void detect_all(const Mat& img, const Mat& imgBlurred, std::vector<Rect2d>& res, std::vector < std::vector < tld::TLDDetector::LabeledPatch > > &patches, void 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, std::vector<Ptr<Tracker> >& trackers); std::vector<bool>& detect_flgs, std::vector<Ptr<Tracker> >& trackers);
#ifdef HAVE_OPENCL
void ocl_detect_all(const Mat& img, const Mat& imgBlurred, std::vector<Rect2d>& res, std::vector < std::vector < tld::TLDDetector::LabeledPatch > > &patches, 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, std::vector<Ptr<Tracker> >& trackers); std::vector<bool>& detect_flgs, std::vector<Ptr<Tracker> >& trackers);
#endif
} }
#endif #endif
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment