diff --git a/apps/sft/fpool.cpp b/apps/sft/fpool.cpp index 39e81565f7..7b7c2fa73c 100644 --- a/apps/sft/fpool.cpp +++ b/apps/sft/fpool.cpp @@ -150,7 +150,7 @@ void glob(const string& path, svector& ret) ret.clear(); ret.reserve(glob_result.gl_pathc); - for(uint i = 0; i < glob_result.gl_pathc; ++i) + for(unsigned int i = 0; i < glob_result.gl_pathc; ++i) { ret.push_back(std::string(glob_result.gl_pathv[i])); dprintf("%s\n", ret[i].c_str()); diff --git a/modules/ml/src/octave.cpp b/modules/ml/src/octave.cpp index b9e59d1a56..8154d20e19 100644 --- a/modules/ml/src/octave.cpp +++ b/modules/ml/src/octave.cpp @@ -186,7 +186,7 @@ void cv::Octave::setRejectThresholds(cv::OutputArray _thresholds) for (int si = 0; si < nsamples; ++si) { float decision = dptr[si] = predict(trainData.col(si), stab, false, false); - mptr[si] = cv::saturate_cast((uint)( (responses.ptr(si)[0] == 1.f) && (decision == 1.f))); + mptr[si] = cv::saturate_cast((unsigned int)( (responses.ptr(si)[0] == 1.f) && (decision == 1.f))); } int weaks = weak->total; @@ -350,7 +350,7 @@ void cv::Octave::traverse(const CvBoostTree* tree, cv::FileStorage& fs, int& nfe void cv::Octave::write( cv::FileStorage &fso, const FeaturePool* pool, InputArray _thresholds) const { CV_Assert(!_thresholds.empty()); - cv::Mat used( 1, weak->total * (pow(2, params.max_depth) - 1), CV_32SC1); + cv::Mat used( 1, weak->total * ( pow(2.f, params.max_depth) - 1), CV_32SC1); int* usedPtr = used.ptr(0); int nfeatures = 0; cv::Mat thresholds = _thresholds.getMat();