|
@@ -1734,22 +1734,25 @@ void SemSegContextTree::train ( const MultiDataset *md )
|
|
|
|
|
|
for(uint i = 0; i < textonMap.size(); i++)
|
|
for(uint i = 0; i < textonMap.size(); i++)
|
|
{
|
|
{
|
|
- set<int> classes;
|
|
|
|
- for ( int x = 0; x < labels[i].cols(); x++ )
|
|
|
|
|
|
+ set<int> usedclasses;
|
|
|
|
+ for ( int x = 0; x < labels[i].rows(); x++ )
|
|
{
|
|
{
|
|
- for ( int y = 0; y < labels[i].rows(); y++ )
|
|
|
|
|
|
+ for ( int y = 0; y < labels[i].cols(); y++ )
|
|
{
|
|
{
|
|
int classno = labels[i] ( x, y );
|
|
int classno = labels[i] ( x, y );
|
|
|
|
|
|
if ( forbidden_classes.find ( classno ) != forbidden_classes.end() )
|
|
if ( forbidden_classes.find ( classno ) != forbidden_classes.end() )
|
|
continue;
|
|
continue;
|
|
|
|
|
|
- classes.insert(classno);
|
|
|
|
|
|
+ usedclasses.insert(classno);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ cout << "labels.cols: " << labels[i].cols() << " labels.rows " << labels[i].rows() << endl;
|
|
|
|
+ cout << "currentfeats : " << allfeats[i].width() << " allfeats[i].height(); " << allfeats[i].height() << endl;
|
|
|
|
+
|
|
set<int>::iterator it;
|
|
set<int>::iterator it;
|
|
- for ( it=classes.begin() ; it != classes.end(); it++ )
|
|
|
|
|
|
+ for ( it=usedclasses.begin() ; it != usedclasses.end(); it++ )
|
|
outstream << *it << " ";
|
|
outstream << *it << " ";
|
|
outstream << endl;
|
|
outstream << endl;
|
|
integralTexton[i](integralTexton[i].width()-1, integralTexton[i].height()-1).store(outstream);
|
|
integralTexton[i](integralTexton[i].width()-1, integralTexton[i].height()-1).store(outstream);
|
|
@@ -1759,7 +1762,7 @@ void SemSegContextTree::train ( const MultiDataset *md )
|
|
|
|
|
|
#endif
|
|
#endif
|
|
cout << "uniquenumber " << uniquenumber << endl;
|
|
cout << "uniquenumber " << uniquenumber << endl;
|
|
- getchar();
|
|
|
|
|
|
+ //getchar();
|
|
#ifdef DEBUG
|
|
#ifdef DEBUG
|
|
for ( int tree = 0; tree < nbTrees; tree++ )
|
|
for ( int tree = 0; tree < nbTrees; tree++ )
|
|
{
|
|
{
|