Mercurial > hg > nsaunier > traffic-intelligence
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 176:9323427aa0a3 | 177:ae2286b1a3fd |
|---|---|
| 276 success = trajectoryDB->trajectoryIdStartingAt(trajectoryIds, frameNum); | 276 success = trajectoryDB->trajectoryIdStartingAt(trajectoryIds, frameNum); |
| 277 cout << "frame " << frameNum << " " << success << endl; | 277 cout << "frame " << frameNum << " " << success << endl; |
| 278 cout << trajectoryIds.size() << " trajectories " << endl; | 278 cout << trajectoryIds.size() << " trajectories " << endl; |
| 279 BOOST_FOREACH(int trajectoryId, trajectoryIds) { | 279 BOOST_FOREACH(int trajectoryId, trajectoryIds) { |
| 280 //cout << trajectoryId << " " << endl; | 280 //cout << trajectoryId << " " << endl; |
| 281 boost::shared_ptr<Trajectory<cv::Point2f> > trajectory; | 281 // boost::shared_ptr<Trajectory<cv::Point2f> > trajectory; |
| 282 success = trajectoryDB->read(trajectory, trajectoryId, "positions"); // velocities | 282 // success = trajectoryDB->read(trajectory, trajectoryId, "positions"); // velocities |
| 283 //stringstream ss;ss << *trajectory; cout << ss.str() << endl; | 283 FeatureTrajectoryPtr ft = FeatureTrajectoryPtr(new FeatureTrajectory(trajectoryId, *trajectoryDB, "positions", "velocities")); |
| 284 stringstream ss;ss << *ft; cout << ss.str() << endl; | |
| 284 } | 285 } |
| 285 | 286 |
| 286 // should the trajectory be loaded one by one? yes | 287 // should the trajectory be loaded one by one? yes |
| 287 | 288 |
| 288 } | 289 } |
