Browse Source

option for only negative z (window)

Sven Sickert 12 năm trước cách đây
mục cha
commit
e34f2980df
1 tập tin đã thay đổi với 8 bổ sung1 xóa
  1. 8 1
      semseg/SemSegContextTree.cpp

+ 8 - 1
semseg/SemSegContextTree.cpp

@@ -365,8 +365,15 @@ double SemSegContextTree::getBestSplit ( std::vector<NICE::MultiChannelImage3DT<
       f2 = ( int ) ( ( double ) rand() / ( double ) RAND_MAX * ( double ) classes );
     }
 
-    Operation *op = ops[ft][o]->clone();
+    // only depth-values in front of the current pixel are allowed
+    bool z_negative_only = conf->gB ( "SSContextTree", "z_negative_only", false );
+    if (z_negative_only)
+    {
+      z1 = -abs(z1);
+      z2 = -abs(z2);
+    }
 
+    Operation *op = ops[ft][o]->clone();
     op->set ( x1, y1, z1, x2, y2, z2, f1, f2, calcVal[ft] );
     op->setFeatType ( ft );