Mercurial Hosting > traffic-intelligence
comparison include/testutils.hpp @ 654:045d05cef9d0
updating to c++11 capabilities
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 07 May 2015 16:09:47 +0200 |
parents | f7ddfc4aeb1e |
children |
comparison
equal
deleted
inserted
replaced
653:107f1ad02b69 | 654:045d05cef9d0 |
---|---|
3 | 3 |
4 #include "Motion.hpp" | 4 #include "Motion.hpp" |
5 | 5 |
6 #include "opencv2/core/core.hpp" | 6 #include "opencv2/core/core.hpp" |
7 | 7 |
8 #include <boost/shared_ptr.hpp> | 8 inline std::shared_ptr<FeatureTrajectory> createFeatureTrajectory(const unsigned int& id, const unsigned int& firstInstant, const unsigned int& lastInstant, const cv::Point2f& firstPosition, const cv::Point2f& velocity) { |
9 | |
10 inline boost::shared_ptr<FeatureTrajectory> createFeatureTrajectory(const unsigned int& id, const unsigned int& firstInstant, const unsigned int& lastInstant, const cv::Point2f& firstPosition, const cv::Point2f& velocity) { | |
11 cv::Mat emptyHomography; | 9 cv::Mat emptyHomography; |
12 boost::shared_ptr<FeatureTrajectory> t = boost::shared_ptr<FeatureTrajectory>(new FeatureTrajectory(firstInstant, firstPosition, emptyHomography)); | 10 std::shared_ptr<FeatureTrajectory> t = std::shared_ptr<FeatureTrajectory>(new FeatureTrajectory(firstInstant, firstPosition, emptyHomography)); |
13 cv::Point2f p = firstPosition; | 11 cv::Point2f p = firstPosition; |
14 for (unsigned int i=firstInstant+1; i<=lastInstant; ++i) { | 12 for (unsigned int i=firstInstant+1; i<=lastInstant; ++i) { |
15 p = p+velocity; | 13 p = p+velocity; |
16 t->addPoint(i, p, emptyHomography); | 14 t->addPoint(i, p, emptyHomography); |
17 } | 15 } |