diff c/feature-based-tracking.cpp @ 141:6f10a227486c

modifications to get nframes option working on the command line
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 24 Aug 2011 01:34:27 -0400
parents 8de5e8256224
children a3532db00c28
line wrap: on
line diff
--- a/c/feature-based-tracking.cpp	Tue Aug 23 19:04:41 2011 -0400
+++ b/c/feature-based-tracking.cpp	Wed Aug 24 01:34:27 2011 -0400
@@ -133,7 +133,7 @@
     
   int key = '?';
   unsigned int savedFeatureId=0;
-  for (int frameNum = params.frame1; ((params.frame1+frameNum < params.nFrames) || (params.nFrames < 0)) && !::interruptionKey(key); frameNum++) {
+  for (int frameNum = params.frame1; ((frameNum-params.frame1 < params.nFrames) || (params.nFrames < 0)) && !::interruptionKey(key); frameNum++) {
       capture >> frame;
       cout << frameNum << " " << capture.get(CV_CAP_PROP_POS_FRAMES) << " " << prevPts.size() << endl;
       while (frame.empty())