X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=src%2FTracker.cpp;h=2d4f2b04e4d879e2dd1c6a0fd4e0f44c21ceea5b;hb=97b147e9106cb549dd7dd62829b9d29b326738c7;hp=098a24ec4e4b1f0310c3249f521bb3e3a6bc2eec;hpb=70532232dd98f31467eff7baaaff6e68f803bb45;p=trackerpp.git diff --git a/src/Tracker.cpp b/src/Tracker.cpp index 098a24e..2d4f2b0 100644 --- a/src/Tracker.cpp +++ b/src/Tracker.cpp @@ -9,10 +9,6 @@ static const int MaxLost = 5; Tracker::Tracker(const cv::Mat& image, const Detection& detection, int id) : id(id) { - status = TrackerStatus::Fire; - preStatus = TrackerStatus::Fire; - - // TODO: Kalman filter KF.transitionMatrix = (Mat_(4, 4) << 1, 0, 1, 0, 0, 1, 0, 1, @@ -26,8 +22,6 @@ Tracker::Tracker(const cv::Mat& image, const Detection& detection, int id) KF.processNoiseCov = 1e-5 * Mat_::eye(4, 4); KF.measurementNoiseCov = 1e-1 * Mat_::ones(2, 2); KF.errorCovPost = 1. * Mat_::ones(4, 4); - //this->kf.statePre = 0.1 * Matx_::randn(4, 1); - //??? TODO randn(KF.statePre, Scalar::all(0), Scalar::all(0.1)); KF.statePost = (Mat_(4, 1) << detection.center_x, detection.center_y, 0, 0); } @@ -56,7 +50,7 @@ void Tracker::addPatch(PatchPtr p) { patches.insert(patches.begin(), p); if (patches.size() > MaxPatch){ - patches.erase(patches.end()); + patches.pop_back(); } } @@ -72,5 +66,6 @@ void Tracker::correct(const cv::Mat& image, const Detection& detection) void Tracker::predict() { age++; - //detection = KF.predict(); + // TODO + Mat temp = KF.predict(); }