Mercurial > hg > nsaunier > traffic-intelligence
comparison c/Motion.cpp @ 654:045d05cef9d0
updating to c++11 capabilities
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Thu, 07 May 2015 16:09:47 +0200 |
| parents | f86f5f25730a |
| children | 85af65b6d531 |
comparison
equal
deleted
inserted
replaced
| 653:107f1ad02b69 | 654:045d05cef9d0 |
|---|---|
| 11 #include <iostream> | 11 #include <iostream> |
| 12 #include <vector> | 12 #include <vector> |
| 13 #include <map> | 13 #include <map> |
| 14 #include <algorithm> | 14 #include <algorithm> |
| 15 #include <utility> | 15 #include <utility> |
| 16 #include <memory> | |
| 16 | 17 |
| 17 using namespace std; | 18 using namespace std; |
| 18 using namespace cv; | 19 using namespace cv; |
| 19 using namespace boost; | 20 using namespace boost; |
| 20 | 21 |
| 31 positions = _positions; | 32 positions = _positions; |
| 32 velocities = _velocities; | 33 velocities = _velocities; |
| 33 positions->computeInstants(firstInstant, lastInstant); | 34 positions->computeInstants(firstInstant, lastInstant); |
| 34 } | 35 } |
| 35 | 36 |
| 36 FeatureTrajectory::FeatureTrajectory(const int& id, TrajectoryDBAccessList<Point2f>& trajectoryDB, const string& positionsTableName, const string& velocitiesTableName) { | 37 FeatureTrajectory::FeatureTrajectory(const int& id, TrajectoryDBAccess<Point2f>& trajectoryDB, const string& positionsTableName, const string& velocitiesTableName) { |
| 37 bool success = trajectoryDB.read(positions, id, positionsTableName); | 38 bool success = trajectoryDB.read(positions, id, positionsTableName); |
| 38 if (!success) | 39 if (!success) |
| 39 cout << "problem loading positions" << endl; | 40 cout << "problem loading positions" << endl; |
| 40 success = trajectoryDB.read(velocities, id, velocitiesTableName); | 41 success = trajectoryDB.read(velocities, id, velocitiesTableName); |
| 41 if (!success) | 42 if (!success) |
