Mercurial Hosting > traffic-intelligence
comparison c/cvutils.cpp @ 128:536510f60854
new features generated as needed
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Wed, 17 Aug 2011 02:44:28 -0400 |
parents | d19d6e63dd77 |
children | 3a11dba30655 |
comparison
equal
deleted
inserted
replaced
127:d19d6e63dd77 | 128:536510f60854 |
---|---|
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 using namespace std; | 10 using namespace std; |
11 using namespace cv; | 11 using namespace cv; |
12 | 12 |
13 void keyPoints2Points(const vector<KeyPoint>& kpts, vector<Point2f>& pts) { | 13 void keyPoints2Points(const vector<KeyPoint>& kpts, vector<Point2f>& pts, const bool& clearPts /* = true */) { |
14 pts.clear(); | 14 if (clearPts) |
15 pts.clear(); | |
15 pts.reserve(kpts.size()); | 16 pts.reserve(kpts.size()); |
16 | 17 |
17 for (unsigned int i=0; i<kpts.size(); i++) | 18 for (unsigned int i=0; i<kpts.size(); i++) |
18 pts.push_back(kpts[i].pt); | 19 pts.push_back(kpts[i].pt); |
19 } | 20 } |