Add resources folder
[trackerpp.git] / src / MultiTracker.cpp
index 547a195..138657e 100644 (file)
@@ -11,9 +11,7 @@ using namespace std;
 
 static const std::string TAG = "MultiTracker";
 static const cv::Size PREFERRED_SIZE = Size(64, 128);
-
 static const double MaxCost  = 100000;
-static const int MaxPatch  = 5;
 static const double ProbThreshold = 0.05;
 
 MultiTracker::MultiTracker(EngineWPtr e)
@@ -75,7 +73,7 @@ double MultiTracker::distance(TrackerPtr tracker, const cv::Mat& image, const De
         ss = similarity(i, patch);
         features.insert(features.end(),  ss.begin(), ss.end());
     }
-    double prob = predictor->predict(MaxPatch - 1, features); // TODO ???
+    double prob = predictor->predict(Tracker::MaxPatch - 1, features); // TODO why is MaxPatch-1
     if (prob > ProbThreshold)
         return -log(prob);
     else 
@@ -94,7 +92,7 @@ void MultiTracker::update(unsigned int total, const Detection* detections, const
         t->predict();
     }
 
-    // match the trackers with the detections
+    // match the trackers with the detections using linear sum assignment (hungarian)
     int row = trackers.size();
     int col = total;
     Eigen::MatrixXi cost_matrix = Eigen::MatrixXi::Zero(row, col);