Commit 6e96bb2c authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #2382 from kunaltyagi:multi_tld_patch

parents 0a8d841b c98a434f
...@@ -127,6 +127,7 @@ namespace cv ...@@ -127,6 +127,7 @@ namespace cv
#endif #endif
detect_all(imageForDetector, image_blurred, tmpCandidates, detectorResults, detect_flgs, trackers); detect_all(imageForDetector, image_blurred, tmpCandidates, detectorResults, detect_flgs, trackers);
bool success = false;
for (int k = 0; k < targetNum; k++) for (int k = 0; k < targetNum; k++)
{ {
//TLD Tracker data extraction //TLD Tracker data extraction
...@@ -174,10 +175,11 @@ namespace cv ...@@ -174,10 +175,11 @@ namespace cv
data->confident = false; data->confident = false;
data->failedLastTime = true; data->failedLastTime = true;
return false; continue;
} }
else else
{ {
success = true;
boundingBoxes[k] = candidates[k][it - candidatesRes[k].begin()]; boundingBoxes[k] = candidates[k][it - candidatesRes[k].begin()];
data->failedLastTime = false; data->failedLastTime = false;
if (trackerNeedsReInit[k] || it != candidatesRes[k].begin()) if (trackerNeedsReInit[k] || it != candidatesRes[k].begin())
...@@ -244,7 +246,7 @@ namespace cv ...@@ -244,7 +246,7 @@ namespace cv
} }
return true; return success;
} }
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, 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,
......
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