瀏覽代碼

post processing as config option

Sven Sickert 10 年之前
父節點
當前提交
456a0edb39
共有 1 個文件被更改,包括 7 次插入3 次删除
  1. 7 3
      progs/testSemSegObliqueTrees.cpp

+ 7 - 3
progs/testSemSegObliqueTrees.cpp

@@ -25,6 +25,7 @@ int main ( int argc, char **argv )
     NICE::Config conf (argc, argv );
     NICE::ResourceStatistics rs;
 
+    bool postProcessing = conf.gB( "SemSegObliqueTree", "post_process", false);
     MultiDataset md ( &conf );
     const ClassNames & classNames = md.getClassNames ( "train" );
     const LabeledSet *testFiles = md["test"];
@@ -86,9 +87,12 @@ int main ( int argc, char **argv )
                       << "\n\n";
 
             // post processing results
-            NICE::Image postIm(segresult.width(), segresult.height());
-            NICE::median(segresult, &postIm, 1);
-            segresult = postIm;
+            if (postProcessing)
+            {
+                NICE::Image postIm(segresult.width(), segresult.height());
+                NICE::median(segresult, &postIm, 1);
+                segresult = postIm;
+            }
 
             // updating confusion matrix
             SemSegTools::updateConfusionMatrix (