Explorar o código

added post processing

Sven Sickert %!s(int64=10) %!d(string=hai) anos
pai
achega
ed97e86b85
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      progs/testSemSegConvTrees.cpp

+ 6 - 0
progs/testSemSegConvTrees.cpp

@@ -9,6 +9,7 @@
 #include "core/basics/StringTools.h"
 #include "core/basics/ResourceStatistics.h"
 #include "core/basics/Timer.h"
+#include "core/image/Morph.h"
 
 #include "semseg/semseg/SemSegConvolutionalTree.h"
 #include "semseg/semseg/SemSegTools.h"
@@ -84,6 +85,11 @@ int main ( int argc, char **argv )
             std::cout << "Time for Classification: " << timer.getLastAbsolute()
                       << "\n\n";
 
+            // post processing results
+            NICE::Image postIm(segresult.width(), segresult.height());
+            NICE::median(segresult, &postIm, 1);
+            segresult = postIm;
+
             // updating confusion matrix
             SemSegTools::updateConfusionMatrix (
                         segresult, gtruth, M, forbiddenClasses );