Mercurial > hg > nsaunier > traffic-intelligence
comparison include/Motion.hpp @ 399:c389fae9689a
Added a class to read list of image instead of video. This is controlled by the use of the database-filename and folder-data parameters in the config file.
| author | Jean-Philippe Jodoin <jpjodoin@gmail.com> |
|---|---|
| date | Mon, 29 Jul 2013 17:12:45 -0400 |
| parents | 03dbecd3a887 |
| children | b6ad86ee7033 |
comparison
equal
deleted
inserted
replaced
| 398:3399bd48cb40 | 399:c389fae9689a |
|---|---|
| 2 #define MOTION_HPP | 2 #define MOTION_HPP |
| 3 | 3 |
| 4 #include "src/Trajectory.h" | 4 #include "src/Trajectory.h" |
| 5 #include <boost/shared_ptr.hpp> | 5 #include <boost/shared_ptr.hpp> |
| 6 #include <boost/graph/adjacency_list.hpp> | 6 #include <boost/graph/adjacency_list.hpp> |
| 7 | |
| 7 | 8 |
| 8 template<typename T> class TrajectoryDBAccess; | 9 template<typename T> class TrajectoryDBAccess; |
| 9 template<typename T> class TrajectoryDBAccessList; | 10 template<typename T> class TrajectoryDBAccessList; |
| 10 | 11 |
| 11 typedef boost::shared_ptr<TrajectoryPoint2f> TrajectoryPoint2fPtr; | 12 typedef boost::shared_ptr<TrajectoryPoint2f> TrajectoryPoint2fPtr; |
| 12 | 13 |
| 13 /** Class for feature data | 14 /** Class for feature data |
| 14 positions, velocities and other statistics to evaluate their quality | 15 positions, velocities and other statistics to evaluate their quality |
| 15 before saving. */ | 16 before saving. */ |
| 16 class FeatureTrajectory { | 17 class FeatureTrajectory |
| 18 { | |
| 17 public: | 19 public: |
| 18 FeatureTrajectory(const unsigned int& frameNum, const cv::Point2f& p, const cv::Mat& homography); | 20 FeatureTrajectory(const unsigned int& frameNum, const cv::Point2f& p, const cv::Mat& homography); |
| 19 | 21 |
| 20 FeatureTrajectory(TrajectoryPoint2fPtr& _positions, TrajectoryPoint2fPtr& _velocities); | 22 FeatureTrajectory(TrajectoryPoint2fPtr& _positions, TrajectoryPoint2fPtr& _velocities); |
| 21 | 23 |
| 73 }; | 75 }; |
| 74 | 76 |
| 75 typedef boost::shared_ptr<FeatureTrajectory> FeatureTrajectoryPtr; | 77 typedef boost::shared_ptr<FeatureTrajectory> FeatureTrajectoryPtr; |
| 76 | 78 |
| 77 // inlined | 79 // inlined |
| 78 inline std::ostream& operator<<(std::ostream& out, const FeatureTrajectory& ft) { | 80 inline std::ostream& operator<<(std::ostream& out, const FeatureTrajectory& ft) |
| 81 { | |
| 79 out << *(ft.positions); | 82 out << *(ft.positions); |
| 80 out << "\n"; | 83 out << "\n"; |
| 81 out << *(ft.velocities); | 84 out << *(ft.velocities); |
| 85 | |
| 82 return out; | 86 return out; |
| 83 } | 87 } |
| 84 | 88 |
| 85 // class MovingObject {} | 89 // class MovingObject {} |
| 86 // roadUserType, group of features | 90 // roadUserType, group of features |
