Browse Source

added post processing

Sven Sickert 10 năm trước cách đây
mục cha
commit
ed97e86b85
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  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 );