Mercurial Hosting > traffic-intelligence
diff include/Feature.hpp @ 133:63dd4355b6d1
saving of feature positions in sqlite database
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Wed, 17 Aug 2011 22:26:01 -0400 |
parents | 45c64e68053c |
children | a617d0808bbc |
line wrap: on
line diff
--- a/include/Feature.hpp Wed Aug 17 19:03:25 2011 -0400 +++ b/include/Feature.hpp Wed Aug 17 22:26:01 2011 -0400 @@ -5,6 +5,8 @@ #include <boost/shared_ptr.hpp> +template<typename T> class TrajectoryDBAccess; + /** Class for feature data positions, velocities and other statistics to evaluate their quality before saving. */ @@ -12,8 +14,12 @@ public: FeatureTrajectory(const int& frameNum, const cv::Point2f& p); + void setId(const unsigned int& id) { positions.setId(id);velocities.setId(id);} + void addPoint(const int& frameNum, const cv::Point2f& p); + void write(TrajectoryDBAccess<cv::Point2f>& trajectoryDB) const; + #ifdef USE_OPENCV void draw(cv::Mat& img, const cv::Scalar& color) const; #endif