diff c/feature-based-tracking.cpp @ 1020:9fb82fe0156f

added quiet tracking mode
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Tue, 05 Jun 2018 14:33:31 -0400
parents 6c5ce3ec497e
children 05ccd8ef150c
line wrap: on
line diff
--- a/c/feature-based-tracking.cpp	Mon Jun 04 23:35:50 2018 -0400
+++ b/c/feature-based-tracking.cpp	Tue Jun 05 14:33:31 2018 -0400
@@ -160,7 +160,7 @@
     if (frame.empty()) {
       cout << "Empty frame " << frameNum << ", breaking (" << frame.empty() << " [" << frame.size().width << "x" << frame.size().height << "])" << endl;
       break;
-    } else if (frameNum%50 ==0)
+    } else if (!params.quiet && (frameNum%50 ==0))
       cout << "frame " << frameNum << endl;
     
     cvtColor(frame, currentFrameBW, CV_RGB2GRAY);
@@ -296,7 +296,7 @@
   for (frameNum = firstFrameNum; frameNum<lastFrameNum; frameNum ++) {
     vector<int> trajectoryIds;
     success  = trajectoryDB->trajectoryIdEndingAt(trajectoryIds, frameNum);
-    if (frameNum%100 ==0)
+    if (!params.quiet && (frameNum%100 ==0))
       cout << "frame " << frameNum << endl;
 #if DEBUG
     cout << trajectoryIds.size() << " trajectories " << endl;
@@ -321,7 +321,7 @@
       }
     }
     
-    if (frameNum%100 ==0)
+    if (!params.quiet && (frameNum%100 ==0))
       cout << featureGraph.informationString() << endl;
   }