Mercurial > hg > nsaunier > traffic-intelligence
comparison c/feature-based-tracking.cpp @ 194:09c7881073f3
connected commponents works, but issue with removing the vertices
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Mon, 12 Dec 2011 18:32:10 -0500 |
| parents | a728fce85881 |
| children | b0b964ba9489 |
comparison
equal
deleted
inserted
replaced
| 193:a728fce85881 | 194:09c7881073f3 |
|---|---|
| 296 } | 296 } |
| 297 | 297 |
| 298 // check for connected components that are old enough (no chance to match with trajectories to be added later | 298 // check for connected components that are old enough (no chance to match with trajectories to be added later |
| 299 // we could check only when some features are getting old enough? | 299 // we could check only when some features are getting old enough? |
| 300 if (frameNum%10 == 0) { | 300 if (frameNum%10 == 0) { |
| 301 vector<vector<FeatureGraph::vertex_descriptor> > objects = featureGraph.connectedComponents(frameNum-maxTrajectoryLength+params.minFeatureTime); | 301 featureGraph.connectedComponents(frameNum-maxTrajectoryLength+params.minFeatureTime); |
| 302 cout << objects.size() << " objects" << endl; | 302 vector<vector<unsigned int> > featureGroups = featureGraph.getFeatureGroups(); |
| 303 | |
| 304 if (!objects.empty()) { | |
| 305 vector<vector<unsigned int> > featureGroups = featureGraph.getFeatureGroups(objects); | |
| 306 } | |
| 307 } | 303 } |
| 308 | 304 |
| 309 cout << featureGraph.informationString() << endl; | 305 cout << featureGraph.informationString() << endl; |
| 310 } | 306 } |
| 311 | 307 |
