readme file
[trackerpp.git] / src / Tracker.cpp
index 098a24e..37595b4 100644 (file)
@@ -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_<double>(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_<double>::eye(4, 4);
     KF.measurementNoiseCov = 1e-1 * Mat_<double>::ones(2, 2);
     KF.errorCovPost = 1. * Mat_<double>::ones(4, 4);
-    //this->kf.statePre = 0.1 * Matx_<int, 4, 1>::randn(4, 1);
-    //??? TODO
     randn(KF.statePre, Scalar::all(0), Scalar::all(0.1));
     KF.statePost = (Mat_<double>(4, 1) << detection.center_x, detection.center_y, 0, 0);
 }
@@ -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();
 }