fix build inder mac
authormarina.kolpakova <marina.kolpakova@itseez.com>
Wed, 9 Jan 2013 17:07:53 +0000 (21:07 +0400)
committermarina.kolpakova <marina.kolpakova@itseez.com>
Fri, 1 Feb 2013 10:34:40 +0000 (14:34 +0400)
apps/sft/fpool.cpp
modules/ml/src/octave.cpp

index 39e8156..7b7c2fa 100644 (file)
@@ -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());
index b9e59d1..8154d20 100644 (file)
@@ -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<uchar>((uint)( (responses.ptr<float>(si)[0] == 1.f) && (decision == 1.f)));
+        mptr[si] = cv::saturate_cast<uchar>((unsigned int)( (responses.ptr<float>(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<int>(0);
     int nfeatures = 0;
     cv::Mat thresholds = _thresholds.getMat();