Mercurial Hosting > traffic-intelligence
comparison c/Motion.cpp @ 163:cde87a07eb58
added graph structures
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 27 Sep 2011 01:38:05 -0400 |
parents | 0089fb29cd26 |
children | 9323427aa0a3 |
comparison
equal
deleted
inserted
replaced
162:61fd5aff418c | 163:cde87a07eb58 |
---|---|
7 #include "src/TrajectoryDBAccessList.h" | 7 #include "src/TrajectoryDBAccessList.h" |
8 | 8 |
9 using namespace std; | 9 using namespace std; |
10 using namespace cv; | 10 using namespace cv; |
11 | 11 |
12 FeatureTrajectory::FeatureTrajectory(const int& frameNum, const cv::Point2f& p, const Mat& homography) { | 12 /******************** FeatureTrajectory ********************/ |
13 | |
14 FeatureTrajectory::FeatureTrajectory(const int& frameNum, const cv::Point2f& p, const Mat& homography) | |
15 : lost(false) { | |
13 addPoint(frameNum, p, homography); | 16 addPoint(frameNum, p, homography); |
14 } | 17 } |
15 | 18 |
16 bool FeatureTrajectory::smallDisplacement(const unsigned int& nDisplacements, const float& minTotalFeatureDisplacement) const { | 19 bool FeatureTrajectory::smallDisplacement(const unsigned int& nDisplacements, const float& minTotalFeatureDisplacement) const { |
17 bool result = false; | 20 bool result = false; |
93 velocities.add(frameNum, displacement); | 96 velocities.add(frameNum, displacement); |
94 float dist = norm(displacement); | 97 float dist = norm(displacement); |
95 displacementDistances.push_back(dist); | 98 displacementDistances.push_back(dist); |
96 } | 99 } |
97 } | 100 } |
101 | |
102 /******************** FeatureGraph ********************/ |