diff c/feature-based-tracking.cpp @ 177:ae2286b1a3fd

added loading FeatureTrajectory from database, printing
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Sun, 30 Oct 2011 11:25:51 -0400
parents 9323427aa0a3
children d7df8ecf5ccd
line wrap: on
line diff
--- a/c/feature-based-tracking.cpp	Thu Oct 27 13:56:46 2011 -0400
+++ b/c/feature-based-tracking.cpp	Sun Oct 30 11:25:51 2011 -0400
@@ -278,9 +278,10 @@
     cout << trajectoryIds.size() << " trajectories " << endl;
     BOOST_FOREACH(int trajectoryId, trajectoryIds) {
       //cout << trajectoryId << " " << endl;
-      boost::shared_ptr<Trajectory<cv::Point2f> > trajectory;
-      success = trajectoryDB->read(trajectory, trajectoryId, "positions"); // velocities
-      //stringstream ss;ss << *trajectory; cout << ss.str() << endl;
+      // boost::shared_ptr<Trajectory<cv::Point2f> > trajectory;
+      // success = trajectoryDB->read(trajectory, trajectoryId, "positions"); // velocities
+      FeatureTrajectoryPtr ft = FeatureTrajectoryPtr(new FeatureTrajectory(trajectoryId, *trajectoryDB, "positions", "velocities"));
+      stringstream ss;ss << *ft; cout << ss.str() << endl;
     }
 
     // should the trajectory be loaded one by one? yes