|
@@ -1965,23 +1965,29 @@ void SemSegContextTree::semanticseg ( CachedExample *ce, NICE::Image & segresult
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //compute integral image
|
|
|
- int channels = ( int ) labelmap.size() + feats.channels();
|
|
|
-
|
|
|
- if ( integralImg.width() == 0 )
|
|
|
+ if(depth < maxDepth)
|
|
|
{
|
|
|
- int xsize = feats.width();
|
|
|
- int ysize = feats.height();
|
|
|
+ //compute integral image
|
|
|
+ int channels = ( int ) labelmap.size() + feats.channels();
|
|
|
+
|
|
|
+ if ( integralImg.width() == 0 )
|
|
|
+ {
|
|
|
+ int xsize = feats.width();
|
|
|
+ int ysize = feats.height();
|
|
|
|
|
|
- integralImg.reInit ( xsize, ysize, channels );
|
|
|
- integralImg.setAll ( 0.0 );
|
|
|
+ integralImg.reInit ( xsize, ysize, channels );
|
|
|
+ integralImg.setAll ( 0.0 );
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- computeIntegralImage ( currentfeats, feats, integralImg );
|
|
|
+ if(depth < maxDepth)
|
|
|
+ {
|
|
|
+ computeIntegralImage ( currentfeats, feats, integralImg );
|
|
|
#ifdef TEXTONMAP
|
|
|
- computeIntegralImage ( textonMap, integralTexton );
|
|
|
+ computeIntegralImage ( textonMap, integralTexton );
|
|
|
#endif
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// cout << forest[0][currentfeats.get ( xpos, ypos, 0 ) ].dist << endl;
|