int nb_time_steps = 8;
int motion_amplitude = 1;
- Tracker *tracker = new Tracker(nb_time_steps, nb_locations);
+ Tracker *tracker = new Tracker();
+
+ tracker->allocate(nb_time_steps, nb_locations);
// We define the spatial structures by stating what are the possible
// motions of targets, and what are the entrances and the
// Does the tracking per se
+ {
+ ofstream out_tracker("/tmp/tracker.dat");
+ tracker->write(&out_tracker);
+
+ ifstream in_tracker("/tmp/tracker.dat");
+ Tracker tracker2;
+ tracker2.read(&in_tracker);
+ tracker2.build_graph();
+ tracker2.track();
+ ofstream out_traj("/tmp/result.trj");
+ tracker2.write_trajectories(&out_traj);
+ }
+
tracker->track();
// Prints the detected trajectories