comparison include/Motion.hpp @ 138:c1b260b48d2a

corrected initialization bugs and feature shortening before saving
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Fri, 19 Aug 2011 12:15:23 -0400
parents 0f790de9437e
children 47329bd16cc0
comparison
equal deleted inserted replaced
137:445e773c9be3 138:c1b260b48d2a
16 16
17 unsigned int length(void) const { return positions.size();} 17 unsigned int length(void) const { return positions.size();}
18 18
19 void setId(const unsigned int& id) { positions.setId(id);velocities.setId(id);} 19 void setId(const unsigned int& id) { positions.setId(id);velocities.setId(id);}
20 20
21 /// indicates whether the sum of the last nDisplacements displacements have been superior to minFeatureDisplacement 21 /// indicates whether the sum of the last nDisplacements displacements has been inferior to minFeatureDisplacement
22 bool largeDisplacement(const unsigned int& nDisplacements, const float& minTotalFeatureDisplacement) const; 22 bool smallDisplacement(const unsigned int& nDisplacements, const float& minTotalFeatureDisplacement) const;
23
24 //void shorten(void);
25 23
26 void addPoint(const int& frameNum, const cv::Point2f& p); 24 void addPoint(const int& frameNum, const cv::Point2f& p);
25
26 void shorten(void);
27 27
28 void write(TrajectoryDBAccess<cv::Point2f>& trajectoryDB) const; 28 void write(TrajectoryDBAccess<cv::Point2f>& trajectoryDB) const;
29 29
30 #ifdef USE_OPENCV 30 #ifdef USE_OPENCV
31 void draw(cv::Mat& img, const cv::Scalar& color) const; 31 void draw(cv::Mat& img, const cv::Scalar& color) const;