Update.
[mtp.git] / tracker.h
diff --git a/tracker.h b/tracker.h
new file mode 100644 (file)
index 0000000..d37e46a
--- /dev/null
+++ b/tracker.h
@@ -0,0 +1,47 @@
+
+///////////////////////////////////////////////////////////////////////////
+// This program is free software: you can redistribute it and/or modify  //
+// it under the terms of the version 3 of the GNU General Public License //
+// as published by the Free Software Foundation.                         //
+//                                                                       //
+// This program is distributed in the hope that it will be useful, but   //
+// WITHOUT ANY WARRANTY; without even the implied warranty of            //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      //
+// General Public License for more details.                              //
+//                                                                       //
+// You should have received a copy of the GNU General Public License     //
+// along with this program. If not, see <http://www.gnu.org/licenses/>.  //
+//                                                                       //
+// Written by and Copyright (C) Francois Fleuret                         //
+// Contact <francois.fleuret@idiap.ch> for comments & bug reports        //
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef TRACKER_H
+#define TRACKER_H
+
+#include "misc.h"
+#include "mtp_graph.h"
+
+class Tracker {
+  int _nb_locations, _nb_time_steps;
+  MTPGraph *_graph;
+  scalar_t **_detection_score;
+  int **_allowed_motion;
+
+public:
+  Tracker(int nb_locations, int nb_time_steps);
+  ~Tracker();
+
+  void set_allowed_motion(int from_location, int to_location);
+  void set_detection_score(int location, int time, scalar_t score);
+  void make_graph();
+
+  void track();
+
+  int nb_trajectories();
+  int trajectory_start_time(int k);
+  int trajectory_end_time(int k);
+  int trajectory_location(int k, int time);
+};
+
+#endif