Mercurial Hosting > traffic-intelligence
diff 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 |
line wrap: on
line diff
--- a/c/cvutils.cpp Wed Aug 17 01:25:13 2011 -0400 +++ b/c/cvutils.cpp Wed Aug 17 02:44:28 2011 -0400 @@ -10,8 +10,9 @@ using namespace std; using namespace cv; -void keyPoints2Points(const vector<KeyPoint>& kpts, vector<Point2f>& pts) { - pts.clear(); +void keyPoints2Points(const vector<KeyPoint>& kpts, vector<Point2f>& pts, const bool& clearPts /* = true */) { + if (clearPts) + pts.clear(); pts.reserve(kpts.size()); for (unsigned int i=0; i<kpts.size(); i++)