[opencv] 18/53: backport of PR #8207
Nobuhiro Iwamatsu
iwamatsu at moszumanska.debian.org
Sun Aug 27 23:27:04 UTC 2017
This is an automated email from the git hooks/post-receive script.
iwamatsu pushed a commit to annotated tag 2.4.13.3
in repository opencv.
commit ab806b63a759335faf27816841628df03a8be6e3
Author: StevenPuttemans <steven.puttemans at kuleuven.be>
Date: Mon Mar 6 14:03:26 2017 +0100
backport of PR #8207
---
apps/traincascade/cascadeclassifier.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/apps/traincascade/cascadeclassifier.cpp b/apps/traincascade/cascadeclassifier.cpp
index 7e8f343..e25c2bd 100644
--- a/apps/traincascade/cascadeclassifier.cpp
+++ b/apps/traincascade/cascadeclassifier.cpp
@@ -140,7 +140,7 @@ bool CvCascadeClassifier::train( const string _cascadeDirName,
double acceptanceRatioBreakValue)
{
// Start recording clock ticks for training time output
- const clock_t begin_time = clock();
+ double time = (double)getTickCount();
if( _cascadeDirName.empty() || _posFilename.empty() || _negFilename.empty() )
CV_Error( CV_StsBadArg, "_cascadeDirName or _bgfileName or _vecFileName is NULL" );
@@ -268,7 +268,7 @@ bool CvCascadeClassifier::train( const string _cascadeDirName,
fs << "}";
// Output training time up till now
- float seconds = float( clock () - begin_time ) / CLOCKS_PER_SEC;
+ double seconds = ( (double)getTickCount() - time)/ getTickFrequency();
int days = int(seconds) / 60 / 60 / 24;
int hours = (int(seconds) / 60 / 60) % 24;
int minutes = (int(seconds) / 60) % 60;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git
More information about the debian-science-commits
mailing list