Mercurial Hosting > traffic-intelligence
comparison 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 |
comparison
equal
deleted
inserted
replaced
132:45c64e68053c | 133:63dd4355b6d1 |
---|---|
2 #define FEATURE_HPP | 2 #define FEATURE_HPP |
3 | 3 |
4 #include "src/Trajectory.h" | 4 #include "src/Trajectory.h" |
5 | 5 |
6 #include <boost/shared_ptr.hpp> | 6 #include <boost/shared_ptr.hpp> |
7 | |
8 template<typename T> class TrajectoryDBAccess; | |
7 | 9 |
8 /** Class for feature data | 10 /** Class for feature data |
9 positions, velocities and other statistics to evaluate their quality | 11 positions, velocities and other statistics to evaluate their quality |
10 before saving. */ | 12 before saving. */ |
11 class FeatureTrajectory { | 13 class FeatureTrajectory { |
12 public: | 14 public: |
13 FeatureTrajectory(const int& frameNum, const cv::Point2f& p); | 15 FeatureTrajectory(const int& frameNum, const cv::Point2f& p); |
14 | 16 |
17 void setId(const unsigned int& id) { positions.setId(id);velocities.setId(id);} | |
18 | |
15 void addPoint(const int& frameNum, const cv::Point2f& p); | 19 void addPoint(const int& frameNum, const cv::Point2f& p); |
20 | |
21 void write(TrajectoryDBAccess<cv::Point2f>& trajectoryDB) const; | |
16 | 22 |
17 #ifdef USE_OPENCV | 23 #ifdef USE_OPENCV |
18 void draw(cv::Mat& img, const cv::Scalar& color) const; | 24 void draw(cv::Mat& img, const cv::Scalar& color) const; |
19 #endif | 25 #endif |
20 | 26 |