# HG changeset patch # User Nicolas Saunier # Date 1319583681 14400 # Node ID e508bb0cbb64de80048ae3e064b61e59d8a38a35 # Parent 8e7b354666ecbe2638ce38666980f4b96b49ebb6 modified comments diff -r 8e7b354666ec -r e508bb0cbb64 c/feature-based-tracking.cpp --- a/c/feature-based-tracking.cpp Mon Oct 17 14:16:50 2011 -0400 +++ b/c/feature-based-tracking.cpp Tue Oct 25 19:01:21 2011 -0400 @@ -245,7 +245,7 @@ bool success = trajectoryDB->connect(params.databaseFilename.c_str()); vector > > trajectories; cout << trajectories.size() << endl; - success = trajectoryDB->read(trajectories, "positions"); // TODO load velocities as well + success = trajectoryDB->read(trajectories, "positions"); // TODO load velocities as well in a FeatureTrajectory object // attention, velocities lack the first instant cout << "Loaded " << trajectories.size() << " trajectories" << endl; // for (int i=0; i<5; ++i) { // stringstream ss; @@ -253,11 +253,6 @@ // cout << ss.str() << endl; // } - // create views for first and last instants for each trajectory - // CREATE VIEW IF NOT EXISTS trajectory_first_instants AS select trajectory_id, min(frame_number) as first_instant from positions group by trajectory_id - // CREATE VIEW IF NOT EXISTS trajectory_last_instants AS select trajectory_id, max(frame_number) as last_instant from positions group by trajectory_id - //select trajectory_id from trajectory_first_instants where first_instant = 49 - trajectoryDB->createViewInstants("first"); trajectoryDB->createViewInstants("last"); @@ -266,9 +261,13 @@ for (int frameNum = params.frame1; ((frameNum-params.frame1 < params.nFrames) || (params.nFrames < 0)); frameNum++) { vector ids; cout << "frame " << frameNum << " " << trajectoryDB->trajectoryIdStartingAt(ids, frameNum) << endl; + cout << ids.size() << ": "; BOOST_FOREACH(int i, ids) cout << i << " "; cout << endl; + + // should the trajectory be loaded one by one? yes + } trajectoryDB->endTransaction();