소스 검색

problem with features workaround

Bjoern Froehlich 12 년 전
부모
커밋
7ae5691ca9
1개의 변경된 파일6개의 추가작업 그리고 8개의 파일을 삭제
  1. 6 8
      semseg/SemSegContextTree.cpp

+ 6 - 8
semseg/SemSegContextTree.cpp

@@ -370,16 +370,14 @@ double SemSegContextTree::getBestSplit (std::vector<NICE::MultiChannelImageT<dou
       feat.rProbs = &regionProbs[(*it) [0]];
       feat.rProbs = &regionProbs[(*it) [0]];
       
       
       double val = featsel[f]->getVal (feat, (*it) [1], (*it) [2]);
       double val = featsel[f]->getVal (feat, (*it) [1], (*it) [2]);
-      if(isfinite(val))
+      if(!isfinite(val))
       {
       {
-        vals.push_back (val);
+        val = 0.0;
-        maxval = std::max (val, maxval);
+        //cerr << "non finite value for " << featsel[f]->writeInfos() <<  endl << (*it) [1] << " " <<  (*it) [2] << endl;
-        minval = std::min (val, minval);
-      }
-      else
-      {
-        cerr << "non finite value for " << featsel[f]->writeInfos() <<  endl << (*it) [1] << " " <<  (*it) [2] << endl;
       }
       }
+      vals.push_back (val);
+      maxval = std::max (val, maxval);
+      minval = std::min (val, minval);
     }
     }
 
 
     if (minval == maxval)
     if (minval == maxval)