Mercurial Hosting > traffic-intelligence
comparison c/feature-based-tracking.cpp @ 418:ca5784652d57
updated use of calcOpticalFlowPyrLK for new signature, added minEigThreshold parameter in configuration file
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 03 Oct 2013 17:43:15 -0400 |
parents | 97cb5c969ef2 |
children | f43bc0b0ba74 |
comparison
equal
deleted
inserted
replaced
417:a2ff03a52b73 | 418:ca5784652d57 |
---|---|
162 // detector.detect(currentFrameBW, currKpts); // see video_homography c++ sample | 162 // detector.detect(currentFrameBW, currKpts); // see video_homography c++ sample |
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), /* int flags = */ 0, params.minFeatureEigThreshold); |
168 /// \todo try calcOpticalFlowFarneback | 168 /// \todo try calcOpticalFlowFarneback |
169 | 169 |
170 std::vector<Point2f> trackedPts; | 170 std::vector<Point2f> trackedPts; |
171 std::vector<FeaturePointMatch>::iterator iter = featurePointMatches.begin(); | 171 std::vector<FeaturePointMatch>::iterator iter = featurePointMatches.begin(); |
172 while (iter != featurePointMatches.end()) { | 172 while (iter != featurePointMatches.end()) { |