X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=src%2FTracker.cpp;h=098a24ec4e4b1f0310c3249f521bb3e3a6bc2eec;hb=81741fb5b3fe86bf29a130f367ea102e3aa99b0b;hp=b7da36323e9685c914e866b208ad80a050688df3;hpb=be96459d3e098508417f07ed0e1952b6e05215c4;p=trackerpp.git diff --git a/src/Tracker.cpp b/src/Tracker.cpp index b7da363..098a24e 100644 --- a/src/Tracker.cpp +++ b/src/Tracker.cpp @@ -54,7 +54,10 @@ void Tracker::updateState(const Mat& image) void Tracker::addPatch(PatchPtr p) { - this->patches.push_back(p); + patches.insert(patches.begin(), p); + if (patches.size() > MaxPatch){ + patches.erase(patches.end()); + } } void Tracker::correct(const cv::Mat& image, const Detection& detection)