Mercurial > hg > nsaunier > traffic-intelligence
comparison c/feature-based-tracking.cpp @ 176:9323427aa0a3
changed positions and velocities to shared pointers and renamed methods
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Thu, 27 Oct 2011 13:56:46 -0400 |
| parents | a234a5e818f3 |
| children | ae2286b1a3fd |
comparison
equal
deleted
inserted
replaced
| 175:a234a5e818f3 | 176:9323427aa0a3 |
|---|---|
| 172 bool deleteFeature = false; | 172 bool deleteFeature = false; |
| 173 | 173 |
| 174 if (status[iter->pointNum]) { | 174 if (status[iter->pointNum]) { |
| 175 iter->feature->addPoint(frameNum, currPts[iter->pointNum], homography); | 175 iter->feature->addPoint(frameNum, currPts[iter->pointNum], homography); |
| 176 | 176 |
| 177 deleteFeature |= iter->feature->smallDisplacement(params.nDisplacements, minTotalFeatureDisplacement) | 177 deleteFeature |= iter->feature->isDisplacementSmall(params.nDisplacements, minTotalFeatureDisplacement) |
| 178 || !iter->feature->motionSmooth(params.accelerationBound, params.deviationBound); | 178 || !iter->feature->isMotionSmooth(params.accelerationBound, params.deviationBound); |
| 179 if (deleteFeature) | 179 if (deleteFeature) |
| 180 iter->feature->shorten(); | 180 iter->feature->shorten(); |
| 181 } else | 181 } else |
| 182 deleteFeature = true; | 182 deleteFeature = true; |
| 183 | 183 |
