comparison include/Feature.hpp @ 132:45c64e68053c

added drawing function for features
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 17 Aug 2011 19:03:25 -0400
parents 4742b2b6d851
children 63dd4355b6d1
comparison
equal deleted inserted replaced
131:3a11dba30655 132:45c64e68053c
1 #ifndef FEATURE_HPP 1 #ifndef FEATURE_HPP
2 #define FEATURE_HPP 2 #define FEATURE_HPP
3 3
4 #include "opencv2/core/core.hpp"
5
6 #include "src/Trajectory.h" 4 #include "src/Trajectory.h"
7 5
6 #include <boost/shared_ptr.hpp>
7
8 /** Class for feature data
9 positions, velocities and other statistics to evaluate their quality
10 before saving. */
8 class FeatureTrajectory { 11 class FeatureTrajectory {
12 public:
13 FeatureTrajectory(const int& frameNum, const cv::Point2f& p);
9 14
10 void addPoint(const int& frameNum, const cv::Point2f& p); 15 void addPoint(const int& frameNum, const cv::Point2f& p);
16
17 #ifdef USE_OPENCV
18 void draw(cv::Mat& img, const cv::Scalar& color) const;
19 #endif
11 20
12 protected: 21 protected:
13 Trajectory<cv::Point2f> positions; 22 Trajectory<cv::Point2f> positions;
14 Trajectory<cv::Point2f> velocities; 23 Trajectory<cv::Point2f> velocities;
15 24
17 26
18 void computeMotionData(const int& frameNum); 27 void computeMotionData(const int& frameNum);
19 28
20 }; 29 };
21 30
31 typedef boost::shared_ptr<FeatureTrajectory> FeatureTrajectoryPtr;
32
22 #endif 33 #endif