@@ -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 );