Mercurial Hosting > traffic-intelligence
comparison c/feature-based-tracking.cpp @ 154:668710d4c773
updated computeTranslation with cv2
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Wed, 07 Sep 2011 16:35:51 -0400 |
parents | 0089fb29cd26 |
children | cde87a07eb58 |
comparison
equal
deleted
inserted
replaced
153:c8a149fccfda | 154:668710d4c773 |
---|---|
163 | 163 |
164 if (!prevPts.empty()) { | 164 if (!prevPts.empty()) { |
165 //::keyPoints2Points(prevKpts, prevPts); | 165 //::keyPoints2Points(prevKpts, prevPts); |
166 currPts.clear(); | 166 currPts.clear(); |
167 calcOpticalFlowPyrLK(previousFrameBW, currentFrameBW, prevPts, currPts, status, errors, window, params.pyramidLevel, TermCriteria(3 /*static_cast<int>(TermCriteria::COUNT)+static_cast<int>(TermCriteria::EPS)*/, params.maxNumberTrackingIterations, params.minTrackingError), 0.5 /* unused */, 0); // OPTFLOW_USE_INITIAL_FLOW | 167 calcOpticalFlowPyrLK(previousFrameBW, currentFrameBW, prevPts, currPts, status, errors, window, params.pyramidLevel, TermCriteria(3 /*static_cast<int>(TermCriteria::COUNT)+static_cast<int>(TermCriteria::EPS)*/, params.maxNumberTrackingIterations, params.minTrackingError), 0.5 /* unused */, 0); // OPTFLOW_USE_INITIAL_FLOW |
168 /// \todo try calcOpticalFlowFarneback | |
168 | 169 |
169 vector<Point2f> trackedPts; | 170 vector<Point2f> trackedPts; |
170 vector<FeaturePointMatch>::iterator iter = featurePointMatches.begin(); | 171 vector<FeaturePointMatch>::iterator iter = featurePointMatches.begin(); |
171 while (iter != featurePointMatches.end()) { | 172 while (iter != featurePointMatches.end()) { |
172 bool deleteFeature = false; | 173 bool deleteFeature = false; |