Mercurial Hosting > traffic-intelligence
diff include/Motion.hpp @ 362:cc8e54997d4c
corrected error in tests and changed sstream to ostream for FeatureTrajectory operator<<
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Fri, 12 Jul 2013 00:22:09 -0400 |
parents | 249d65ff6c35 |
children | 03dbecd3a887 |
line wrap: on
line diff
--- a/include/Motion.hpp Thu Jul 11 15:21:13 2013 -0400 +++ b/include/Motion.hpp Fri Jul 12 00:22:09 2013 -0400 @@ -53,7 +53,7 @@ void draw(cv::Mat& img, const cv::Mat& homography, const cv::Scalar& color) const; #endif - friend std::stringstream& operator<<(std::stringstream& out, const FeatureTrajectory& ft); + friend std::ostream& operator<<(std::ostream& out, const FeatureTrajectory& ft); protected: /// first frame number @@ -63,7 +63,7 @@ TrajectoryPoint2fPtr positions; /** one fewer velocity than position - v_n = p_n+1 - p_n*/ + v_n = p_n - p_n-1*/ TrajectoryPoint2fPtr velocities; /// norms of velocities for feature constraints, one fewer positions than positions @@ -75,7 +75,7 @@ typedef boost::shared_ptr<FeatureTrajectory> FeatureTrajectoryPtr; // inlined -inline std::stringstream& operator<<(std::stringstream& out, const FeatureTrajectory& ft) { +inline std::ostream& operator<<(std::ostream& out, const FeatureTrajectory& ft) { out << *(ft.positions); out << "\n"; out << *(ft.velocities);