diff 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
line wrap: on
line diff
--- a/include/cvutils.hpp	Fri Aug 19 12:15:23 2011 -0400
+++ b/include/cvutils.hpp	Tue Aug 23 13:14:47 2011 -0400
@@ -5,10 +5,14 @@
 #include "opencv2/features2d/features2d.hpp"
 
 class CvCapture;
+//template<typename T> class Point_<T>;
 
 /// constant that indicates if the image should be flipped
 //static const int flipImage = CV_CVTIMG_FLIP;
 
+template<typename T> 
+float scalarProduct(const cv::Point_<T>& v1, const cv::Point_<T>& v2) { return v1.x*v2.x+v1.y*v2.y;}
+
 void keyPoints2Points(const std::vector<cv::KeyPoint>& kpts, std::vector<cv::Point2f>& pts, const bool& clearPts = true);
 
 /** Allocates a new IplImage. */