# HG changeset patch # User Nicolas Saunier # Date 1319670590 14400 # Node ID a234a5e818f322b3114f1286728908b5401414f2 # Parent ec9734015d53fbbc86f2abd97a0c552773aa19ce using single view for frame_numbers and getting max trajectory length diff -r ec9734015d53 -r a234a5e818f3 c/feature-based-tracking.cpp --- a/c/feature-based-tracking.cpp Wed Oct 26 17:46:11 2011 -0400 +++ b/c/feature-based-tracking.cpp Wed Oct 26 19:09:50 2011 -0400 @@ -263,8 +263,11 @@ // c_end = std::clock(); // cout << "Loaded " << trajectories.size() << " trajectories one by one in " << 1000.0 * (c_end-c_start) / CLOCKS_PER_SEC << " CPU seconds" << endl; - trajectoryDB->createViewInstants("first"); - trajectoryDB->createViewInstants("last"); + trajectoryDB->createViewInstants(); + //trajectoryDB->createViewInstants("last"); + int maxTrajectoryLength; + trajectoryDB->maxTrajectoryLength(maxTrajectoryLength); + cout << "max trajectory length " << maxTrajectoryLength << endl; // main loop // TODO version que l'on peut interrompre ? @@ -277,7 +280,7 @@ //cout << trajectoryId << " " << endl; boost::shared_ptr > trajectory; success = trajectoryDB->read(trajectory, trajectoryId, "positions"); // velocities - stringstream ss;ss << *trajectory; cout << ss.str() << endl; + //stringstream ss;ss << *trajectory; cout << ss.str() << endl; } // should the trajectory be loaded one by one? yes