diff c/feature-based-tracking.cpp @ 188:1435965d8181

work on connected components
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Thu, 01 Dec 2011 19:18:32 -0500
parents 6c48283a78ca
children 1116f0a1ff31
line wrap: on
line diff
--- a/c/feature-based-tracking.cpp	Thu Dec 01 18:13:10 2011 -0500
+++ b/c/feature-based-tracking.cpp	Thu Dec 01 19:18:32 2011 -0500
@@ -246,8 +246,8 @@
   boost::shared_ptr<TrajectoryDBAccessList<Point2f> > trajectoryDB = boost::shared_ptr<TrajectoryDBAccessList<Point2f> >(new TrajectoryDBAccessList<Point2f>());
   //TODO write generic methods for blob and list versions TrajectoryDBAccess<Point2f>* trajectoryDB = new TrajectoryDBAccessBlob<Point2f>();
   bool success = trajectoryDB->connect(params.databaseFilename.c_str());
-  vector<boost::shared_ptr<Trajectory<Point2f> > > trajectories;
-  cout << trajectories.size() << endl;
+  // vector<boost::shared_ptr<Trajectory<Point2f> > > trajectories;
+  // cout << trajectories.size() << endl;
   // std::clock_t c_start = std::clock();
   // success = trajectoryDB->read(trajectories, "positions"); // TODO load velocities as well in a FeatureTrajectory object // attention, velocities lack the first instant
   // std::clock_t c_end = std::clock();
@@ -262,7 +262,6 @@
   // cout << "Loaded " << trajectories.size() << " trajectories one by one in " << 1000.0 * (c_end-c_start) / CLOCKS_PER_SEC << " CPU seconds" << endl;
 
   trajectoryDB->createViewInstants();
-  //trajectoryDB->createViewInstants("last");
   int maxTrajectoryLength;
   trajectoryDB->maxTrajectoryLength(maxTrajectoryLength);
   cout << "max trajectory length " << maxTrajectoryLength << endl;
@@ -286,7 +285,10 @@
       featureGraph.addFeature(ft);
     }
 
-    // should the trajectory be loaded one by one? yes
+    // check for connected components that are old enough (no chance to match with trajectories to be added later
+    if (frameNum%10 == 0) {
+      
+    }
 
     cout << featureGraph.informationString() << endl;
   }