Mercurial Hosting > traffic-intelligence
diff c/cvutils.cpp @ 127:d19d6e63dd77
simple feature tracking and drawing working
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Wed, 17 Aug 2011 01:25:13 -0400 |
parents | 336926453b28 |
children | 536510f60854 |
line wrap: on
line diff
--- a/c/cvutils.cpp Wed Aug 17 00:20:31 2011 -0400 +++ b/c/cvutils.cpp Wed Aug 17 01:25:13 2011 -0400 @@ -10,12 +10,12 @@ using namespace std; using namespace cv; -void keypPoints2Points(const vector<KeyPoint>& kpts, vector<Point2f>& points) { - points.clear(); - points.resize(kpts.size()); +void keyPoints2Points(const vector<KeyPoint>& kpts, vector<Point2f>& pts) { + pts.clear(); + pts.reserve(kpts.size()); for (unsigned int i=0; i<kpts.size(); i++) - points[i] = kpts[i].pt; + pts.push_back(kpts[i].pt); } IplImage* allocateImage(const int& width, const int& height, const int& depth, const int& channels) { return ::allocateImage(cvSize(width, height), depth, channels);}