Mercurial > hg > nsaunier > traffic-intelligence
comparison include/cvutils.hpp @ 139:47329bd16cc0
cleaned code, added condition on smooth displacement
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Tue, 23 Aug 2011 13:14:47 -0400 |
| parents | 3a11dba30655 |
| children | b32947b002da |
comparison
equal
deleted
inserted
replaced
| 138:c1b260b48d2a | 139:47329bd16cc0 |
|---|---|
| 3 | 3 |
| 4 #include "opencv2/core/core.hpp" | 4 #include "opencv2/core/core.hpp" |
| 5 #include "opencv2/features2d/features2d.hpp" | 5 #include "opencv2/features2d/features2d.hpp" |
| 6 | 6 |
| 7 class CvCapture; | 7 class CvCapture; |
| 8 //template<typename T> class Point_<T>; | |
| 8 | 9 |
| 9 /// constant that indicates if the image should be flipped | 10 /// constant that indicates if the image should be flipped |
| 10 //static const int flipImage = CV_CVTIMG_FLIP; | 11 //static const int flipImage = CV_CVTIMG_FLIP; |
| 12 | |
| 13 template<typename T> | |
| 14 float scalarProduct(const cv::Point_<T>& v1, const cv::Point_<T>& v2) { return v1.x*v2.x+v1.y*v2.y;} | |
| 11 | 15 |
| 12 void keyPoints2Points(const std::vector<cv::KeyPoint>& kpts, std::vector<cv::Point2f>& pts, const bool& clearPts = true); | 16 void keyPoints2Points(const std::vector<cv::KeyPoint>& kpts, std::vector<cv::Point2f>& pts, const bool& clearPts = true); |
| 13 | 17 |
| 14 /** Allocates a new IplImage. */ | 18 /** Allocates a new IplImage. */ |
| 15 IplImage* allocateImage(const int& width, const int& height, const int& depth, const int& channels); | 19 IplImage* allocateImage(const int& width, const int& height, const int& depth, const int& channels); |
