Mercurial Hosting > traffic-intelligence
comparison c/feature-based-tracking.cpp @ 168:6ec7f6c61daf
small steps for feature grouping
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Fri, 30 Sep 2011 19:27:27 -0400 |
parents | ed2de414e5f6 |
children | 5f705809d37a |
comparison
equal
deleted
inserted
replaced
167:ed2de414e5f6 | 168:6ec7f6c61daf |
---|---|
266 // create views for first and last instants for each trajectory | 266 // create views for first and last instants for each trajectory |
267 // CREATE VIEW IF NOT EXISTS trajectory_first_instants AS select trajectory_id, min(frame_number) as first_instant from positions group by trajectory_id | 267 // CREATE VIEW IF NOT EXISTS trajectory_first_instants AS select trajectory_id, min(frame_number) as first_instant from positions group by trajectory_id |
268 // CREATE VIEW IF NOT EXISTS trajectory_last_instants AS select trajectory_id, max(frame_number) as last_instant from positions group by trajectory_id | 268 // CREATE VIEW IF NOT EXISTS trajectory_last_instants AS select trajectory_id, max(frame_number) as last_instant from positions group by trajectory_id |
269 //select trajectory_id from trajectory_first_instants where first_instant = 49 | 269 //select trajectory_id from trajectory_first_instants where first_instant = 49 |
270 | 270 |
271 | 271 trajectoryDB->createViewInstants("first"); |
272 | 272 trajectoryDB->createViewInstants("last"); |
273 | |
274 // main loop | |
275 // TODO version que l'on peut interrompre ? | |
276 for (int frameNum = params.frame1; ((frameNum-params.frame1 < params.nFrames) || (params.nFrames < 0)); frameNum++) { | |
277 vector<int> ids; | |
278 cout << "frame " << frameNum << " " << trajectoryDB->trajectoryIdStartingAt(ids, frameNum) << endl; | |
279 BOOST_FOREACH(int i, ids) | |
280 cout << i << " "; | |
281 cout << endl; | |
282 } | |
273 | 283 |
274 trajectoryDB->endTransaction(); | 284 trajectoryDB->endTransaction(); |
275 trajectoryDB->disconnect(); | 285 trajectoryDB->disconnect(); |
276 } | 286 } |
277 | 287 |