3 * mtp is the ``Multi Tracked Paths'', an implementation of the
4 * k-shortest paths algorithm for multi-target tracking.
6 * Copyright (c) 2012 Idiap Research Institute, http://www.idiap.ch/
7 * Written by Francois Fleuret <francois.fleuret@idiap.ch>
9 * This file is part of mtp.
11 * mtp is free software: you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License version 3 as
13 * published by the Free Software Foundation.
15 * mtp is distributed in the hope that it will be useful, but WITHOUT
16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
18 * License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with selector. If not, see <http://www.gnu.org/licenses/>.
33 #include "mtp_graph.h"
36 scalar_t **_detection_score;
37 int **_allowed_motion;
38 int *_entrances, *_exits;
41 scalar_t *_edge_lengths;
43 int early_pair_node(int t, int l);
44 int late_pair_node(int t, int l);
48 // The spatial structure
49 int nb_locations, nb_time_steps;
51 int *entrances, *exits;
53 // The detection scores at each location and time
54 scalar_t **detection_scores;
59 void allocate(int nb_time_steps, int nb_locations);
62 void write(ostream *os);
63 void read(istream *is);
64 void write_trajectories(ostream *os);
66 // Build or print the graph needed for the tracking per se
69 void print_graph_dot(ostream *os);
71 // Compute the optimal set of trajectories
75 // Read-out of the optimal trajectories
77 int nb_trajectories();
78 scalar_t trajectory_score(int k);
79 int trajectory_entrance_time(int k);
80 int trajectory_duration(int k);
81 int trajectory_location(int k, int time_from_entry);