|
@@ -332,7 +332,7 @@ double SemSegContextTree::getBestSplit ( std::vector<NICE::MultiChannelImage3DT<
|
|
if ( ft > 1 )
|
|
if ( ft > 1 )
|
|
{
|
|
{
|
|
//use larger window size for context features
|
|
//use larger window size for context features
|
|
- tmpws *= 2;
|
|
|
|
|
|
+ tmpws *= 3;
|
|
}
|
|
}
|
|
|
|
|
|
if ( ft == 1 )
|
|
if ( ft == 1 )
|
|
@@ -346,10 +346,12 @@ double SemSegContextTree::getBestSplit ( std::vector<NICE::MultiChannelImage3DT<
|
|
// random value range between (-window-size/2) and (window-size/2)
|
|
// random value range between (-window-size/2) and (window-size/2)
|
|
double z_ratio = conf->gB ( "SSContextTree", "z_ratio", 1.0 );
|
|
double z_ratio = conf->gB ( "SSContextTree", "z_ratio", 1.0 );
|
|
int tmp_z = ( int ) floor( (tmpws * z_ratio) + 0.5 );
|
|
int tmp_z = ( int ) floor( (tmpws * z_ratio) + 0.5 );
|
|
|
|
+ double y_ratio = conf->gB ( "SSContextTree", "y_ratio", 1.0 );
|
|
|
|
+ int tmp_y = ( int ) floor( (tmpws * y_ratio) + 0.5 );
|
|
x1 = ( int ) ( ( double ) rand() / ( double ) RAND_MAX * ( double ) tmpws ) - tmpws / 2;
|
|
x1 = ( int ) ( ( double ) rand() / ( double ) RAND_MAX * ( double ) tmpws ) - tmpws / 2;
|
|
x2 = ( int ) ( ( double ) rand() / ( double ) RAND_MAX * ( double ) tmpws ) - tmpws / 2;
|
|
x2 = ( int ) ( ( double ) rand() / ( double ) RAND_MAX * ( double ) tmpws ) - tmpws / 2;
|
|
- y1 = ( int ) ( ( double ) rand() / ( double ) RAND_MAX * ( double ) tmpws ) - tmpws / 2;
|
|
|
|
- y2 = ( int ) ( ( double ) rand() / ( double ) RAND_MAX * ( double ) tmpws ) - tmpws / 2;
|
|
|
|
|
|
+ y1 = ( int ) ( ( double ) rand() / ( double ) RAND_MAX * ( double ) tmp_y ) - tmp_y / 2;
|
|
|
|
+ y2 = ( int ) ( ( double ) rand() / ( double ) RAND_MAX * ( double ) tmp_y ) - tmp_y / 2;
|
|
z1 = ( int ) ( ( double ) rand() / ( double ) RAND_MAX * ( double ) tmp_z ) - tmp_z / 2;
|
|
z1 = ( int ) ( ( double ) rand() / ( double ) RAND_MAX * ( double ) tmp_z ) - tmp_z / 2;
|
|
z2 = ( int ) ( ( double ) rand() / ( double ) RAND_MAX * ( double ) tmp_z ) - tmp_z / 2;
|
|
z2 = ( int ) ( ( double ) rand() / ( double ) RAND_MAX * ( double ) tmp_z ) - tmp_z / 2;
|
|
|
|
|
|
@@ -1892,11 +1894,11 @@ void SemSegContextTree::semanticseg ( NICE::MultiChannelImage3DT<double> & imgDa
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-#undef VISUALIZE
|
|
|
|
|
|
+#define VISUALIZE
|
|
#ifdef VISUALIZE
|
|
#ifdef VISUALIZE
|
|
for ( int z = 0; z < zsize; z++ )
|
|
for ( int z = 0; z < zsize; z++ )
|
|
{
|
|
{
|
|
- for ( int j = 0 ; j < ( int ) probabilities.numChannels; j++ )
|
|
|
|
|
|
+ for ( int j = 0 ; j < ( int ) probabilities.channels(); j++ )
|
|
{
|
|
{
|
|
//cout << "class: " << j << endl;//" " << cn.text (j) << endl;
|
|
//cout << "class: " << j << endl;//" " << cn.text (j) << endl;
|
|
|
|
|
|
@@ -1923,7 +1925,7 @@ void SemSegContextTree::semanticseg ( NICE::MultiChannelImage3DT<double> & imgDa
|
|
|
|
|
|
std::string s;
|
|
std::string s;
|
|
std::stringstream out;
|
|
std::stringstream out;
|
|
- out << "tmpprebmap" << j << ".ppm";
|
|
|
|
|
|
+ out << "tmpprebmap" << z << "_" << j << ".ppm";
|
|
s = out.str();
|
|
s = out.str();
|
|
imgrgb.write ( s );
|
|
imgrgb.write ( s );
|
|
//showImage(imgrgb, "Ergebnis");
|
|
//showImage(imgrgb, "Ergebnis");
|