File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -263,7 +263,7 @@ void MotionDetector(int argc, char** argv)
263263 int64 t2 = cv::getTickCount ();
264264
265265 allTime += t2 - t1;
266- int currTime = static_cast < int > (1000 * (t2 - t1) / freq + 0.5 );
266+ int currTime = cvRound (1000 * (t2 - t1) / freq);
267267
268268 std::cout << " Frame " << framesCounter << " : tracks = " << tracker.tracks .size () << " , time = " << currTime << std::endl;
269269
@@ -427,7 +427,7 @@ void FaceDetector(int argc, char** argv)
427427 int64 t2 = cv::getTickCount ();
428428
429429 allTime += t2 - t1;
430- int currTime = static_cast < int > (1000 * (t2 - t1) / freq + 0.5 );
430+ int currTime = cvRound (1000 * (t2 - t1) / freq);
431431
432432 std::cout << " Frame " << framesCounter << " : tracks = " << tracker.tracks .size () << " , time = " << currTime << std::endl;
433433
@@ -607,7 +607,7 @@ void PedestrianDetector(int argc, char** argv)
607607 int64 t2 = cv::getTickCount ();
608608
609609 allTime += t2 - t1;
610- int currTime = static_cast < int > (1000 * (t2 - t1) / freq + 0.5 );
610+ int currTime = cvRound (1000 * (t2 - t1) / freq);
611611
612612 std::cout << " Frame " << framesCounter << " : tracks = " << tracker.tracks .size () << " , time = " << currTime << std::endl;
613613
You can’t perform that action at this time.
0 commit comments