From 89cd87107fc13444dfc67dd2d146d264b044b9e5 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Fri, 4 Jul 2014 10:57:08 +0400 Subject: [PATCH] fixed warnings --- modules/tracking/src/PFSolver.hpp | 2 +- modules/tracking/src/onlineBoosting.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/tracking/src/PFSolver.hpp b/modules/tracking/src/PFSolver.hpp index d36cce998..fce34bb31 100644 --- a/modules/tracking/src/PFSolver.hpp +++ b/modules/tracking/src/PFSolver.hpp @@ -136,7 +136,7 @@ namespace cv{ } _logweight.create(1,_particles.rows); - _logweight.setTo(-log(_particles.rows)); + _logweight.setTo(-log((double)_particles.rows)); return 0.0; } diff --git a/modules/tracking/src/onlineBoosting.cpp b/modules/tracking/src/onlineBoosting.cpp index 874d53d11..3254c0b5c 100644 --- a/modules/tracking/src/onlineBoosting.cpp +++ b/modules/tracking/src/onlineBoosting.cpp @@ -132,9 +132,9 @@ int StrongClassifierDirectSelection::getSwappedClassifier() const bool StrongClassifierDirectSelection::update( const Mat& image, int target, float importance ) { - m_errorMask.assign( numAllWeakClassifier, 0 ); - m_errors.assign( numAllWeakClassifier, 0 ); - m_sumErrors.assign( numAllWeakClassifier, 0 ); + m_errorMask.assign( (size_t)numAllWeakClassifier, false ); + m_errors.assign( (size_t)numAllWeakClassifier, 0.0f ); + m_sumErrors.assign( (size_t)numAllWeakClassifier, 0.0f ); baseClassifier[0]->trainClassifier( image, target, importance, m_errorMask ); for ( int curBaseClassifier = 0; curBaseClassifier < numBaseClassifier; curBaseClassifier++ )