|
@@ -147,7 +147,7 @@ void SemSegObliqueTree::train ( const MultiDataset *md )
|
|
{
|
|
{
|
|
if ( saveLoadData && FileMgt::fileExists( fileLocation ) )
|
|
if ( saveLoadData && FileMgt::fileExists( fileLocation ) )
|
|
{
|
|
{
|
|
- read( fileLocation );
|
|
|
|
|
|
+ read( fileLocation, 1 );
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
@@ -180,7 +180,7 @@ void SemSegObliqueTree::train ( const MultiDataset *md )
|
|
fpc->train( fp, examples);
|
|
fpc->train( fp, examples);
|
|
|
|
|
|
// save trained classifier to file
|
|
// save trained classifier to file
|
|
- if (saveLoadData) save( fileLocation );
|
|
|
|
|
|
+ if (saveLoadData) save( fileLocation, 1 );
|
|
|
|
|
|
// Cleaning up
|
|
// Cleaning up
|
|
for ( vector<CachedExample *>::iterator i = imgexamples.begin();
|
|
for ( vector<CachedExample *>::iterator i = imgexamples.begin();
|
|
@@ -254,9 +254,9 @@ void SemSegObliqueTree::semanticseg(
|
|
pce.y = y;
|
|
pce.y = y;
|
|
pce.z = z;
|
|
pce.z = z;
|
|
ClassificationResult r = fpcrf->classify ( pce );
|
|
ClassificationResult r = fpcrf->classify ( pce );
|
|
- segresult.set ( x, y, z, r.classno );
|
|
|
|
|
|
+ segresult.set ( x, y, r.classno, (unsigned int)z );
|
|
for ( int i = 0 ; i < ( int ) probabilities.channels(); i++ )
|
|
for ( int i = 0 ; i < ( int ) probabilities.channels(); i++ )
|
|
- probabilities[i](x,y,z) = r.scores[i];
|
|
|
|
|
|
+ probabilities.set ( x, y, z, r.scores[i], i );
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|