Mercurial Hosting > traffic-intelligence
diff c/Motion.cpp @ 391:03dbecd3a887
modified feature grouping to return vectors of pointers to feature trajectories
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 25 Jul 2013 18:58:55 -0400 |
parents | 21f14fadd098 |
children | f43bc0b0ba74 |
line wrap: on
line diff
--- a/c/Motion.cpp Thu Jul 25 16:01:12 2013 -0400 +++ b/c/Motion.cpp Thu Jul 25 18:58:55 2013 -0400 @@ -201,8 +201,8 @@ } } -vector<vector<unsigned int> > FeatureGraph::getFeatureGroups(void) { - vector<vector<unsigned int> > featureGroups; +void FeatureGraph::getFeatureGroups(vector<vector<FeatureTrajectoryPtr> >& featureGroups) { + featureGroups.clear(); for (unsigned int i=0; i<objectHypotheses.size(); ++i) { // check that there is on average at least minNFeaturesPerGroup features at each frame in the group @@ -218,9 +218,9 @@ #if DEBUG cout << "save group " << i << " of " << objectHypotheses[i].size() << " features " << endl; #endif - featureGroups.push_back(vector<unsigned int>()); + featureGroups.push_back(vector<FeatureTrajectoryPtr>()); for (unsigned int j=0; j<objectHypotheses[i].size(); ++j) { - featureGroups.back().push_back(graph[objectHypotheses[i][j]].feature->getId()); + featureGroups.back().push_back(graph[objectHypotheses[i][j]].feature); #if DEBUG cout << featureGroups.size() << " " << objectHypotheses[i][j] << endl; #endif @@ -229,8 +229,6 @@ } } } - - return featureGroups; } string FeatureGraph::informationString(void) const {