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"
38 // The edges will be order as follow: First the nb_locations *
39 // nb_time_steps inside the node pairs, which will have lengths
40 // equal to the opposite of the detection scores, then the ones
41 // between node pairs, and finally the ones from source and to
43 scalar_t *_edge_lengths;
45 int early_pair_node(int t, int l);
46 int late_pair_node(int t, int l);
50 // The spatial structure
51 int nb_locations, nb_time_steps;
52 int **allowed_motions;
53 int **entrances, **exits;
55 // The detection scores at each location and time
56 scalar_t **detection_scores;
61 void allocate(int nb_time_steps, int nb_locations);
64 void write(ostream *os);
65 void read(istream *is);
66 void write_trajectories(ostream *os);
68 // Build or print the graph needed for the tracking per se
71 void print_graph_dot(ostream *os);
73 // Compute the optimal set of trajectories
77 // Read-out of the optimal trajectories
79 int nb_trajectories();
80 scalar_t trajectory_score(int k);
81 int trajectory_entrance_time(int k);
82 int trajectory_duration(int k);
83 int trajectory_location(int k, int time_from_entry);