|
@@ -177,116 +177,86 @@ void SemSegContextTree::initOperations()
|
|
|
// operation prototypes
|
|
|
vector<Operation*> tops0, tops1, tops2, tops3, tops4, tops5;
|
|
|
|
|
|
- if ( conf->gB ( featsec, "minus", true ) )
|
|
|
- tops0.push_back ( new Minus() );
|
|
|
- if ( conf->gB ( featsec, "minus_abs", true ) )
|
|
|
- tops0.push_back ( new MinusAbs() );
|
|
|
- if ( conf->gB ( featsec, "addition", true ) )
|
|
|
- tops0.push_back ( new Addition() );
|
|
|
- if ( conf->gB ( featsec, "only1", true ) )
|
|
|
- tops0.push_back ( new Only1() );
|
|
|
- if ( conf->gB ( featsec, "rel_x", true ) )
|
|
|
- tops0.push_back ( new RelativeXPosition() );
|
|
|
- if ( conf->gB ( featsec, "rel_y", true ) )
|
|
|
- tops0.push_back ( new RelativeYPosition() );
|
|
|
- if ( conf->gB ( featsec, "rel_z", true ) )
|
|
|
- tops0.push_back ( new RelativeZPosition() );
|
|
|
-
|
|
|
- tops1.push_back ( new RegionFeat() );
|
|
|
-
|
|
|
- if ( conf->gB ( featsec, "int", true ) )
|
|
|
- tops2.push_back ( new IntegralOps() );
|
|
|
- if ( conf->gB ( featsec, "bi_int_cent", true ) )
|
|
|
- tops2.push_back ( new BiIntegralCenteredOps() );
|
|
|
- if ( conf->gB ( featsec, "int_cent", true ) )
|
|
|
- tops2.push_back ( new IntegralCenteredOps() );
|
|
|
- if ( conf->gB ( featsec, "haar_horz", true ) )
|
|
|
- tops2.push_back ( new HaarHorizontal() );
|
|
|
- if ( conf->gB ( featsec, "haar_vert", true ) )
|
|
|
- tops2.push_back ( new HaarVertical() );
|
|
|
- if ( conf->gB ( featsec, "haar_stack", true ) )
|
|
|
- tops2.push_back ( new HaarStacked() );
|
|
|
- if ( conf->gB ( featsec, "haar_diagxy", true ) )
|
|
|
- tops2.push_back ( new HaarDiagXY() );
|
|
|
- if ( conf->gB ( featsec, "haar_diagxz", true ) )
|
|
|
- tops2.push_back ( new HaarDiagXZ() );
|
|
|
- if ( conf->gB ( featsec, "haar_diagyz", true ) )
|
|
|
- tops2.push_back ( new HaarDiagYZ() );
|
|
|
- if ( conf->gB ( featsec, "haar3_horz", true ) )
|
|
|
- tops2.push_back ( new Haar3Horiz() );
|
|
|
- if ( conf->gB ( featsec, "haar3_vert", true ) )
|
|
|
- tops2.push_back ( new Haar3Vert() );
|
|
|
- if ( conf->gB ( featsec, "haar3_stack", true ) )
|
|
|
- tops2.push_back ( new Haar3Stack() );
|
|
|
-
|
|
|
if ( conf->gB ( featsec, "int", true ) )
|
|
|
{
|
|
|
+ tops2.push_back ( new IntegralOps() );
|
|
|
Operation* o = new IntegralOps();
|
|
|
o->setContext(true);
|
|
|
tops3.push_back ( o );
|
|
|
}
|
|
|
if ( conf->gB ( featsec, "bi_int_cent", true ) )
|
|
|
{
|
|
|
+ tops2.push_back ( new BiIntegralCenteredOps() );
|
|
|
Operation* o = new BiIntegralCenteredOps();
|
|
|
o->setContext(true);
|
|
|
tops3.push_back ( o );
|
|
|
}
|
|
|
if ( conf->gB ( featsec, "int_cent", true ) )
|
|
|
{
|
|
|
+ tops2.push_back ( new IntegralCenteredOps() );
|
|
|
Operation* o = new IntegralCenteredOps();
|
|
|
o->setContext(true);
|
|
|
tops3.push_back ( o );
|
|
|
}
|
|
|
if ( conf->gB ( featsec, "haar_horz", true ) )
|
|
|
{
|
|
|
+ tops2.push_back ( new HaarHorizontal() );
|
|
|
Operation* o = new HaarHorizontal();
|
|
|
o->setContext(true);
|
|
|
tops3.push_back ( o );
|
|
|
}
|
|
|
if ( conf->gB ( featsec, "haar_vert", true ) )
|
|
|
{
|
|
|
+ tops2.push_back ( new HaarVertical );
|
|
|
Operation* o = new HaarVertical();
|
|
|
o->setContext(true);
|
|
|
tops3.push_back ( o );
|
|
|
}
|
|
|
if ( conf->gB ( featsec, "haar_stack", true ) )
|
|
|
{
|
|
|
+ tops2.push_back ( new HaarStacked() );
|
|
|
Operation* o = new HaarStacked();
|
|
|
o->setContext(true);
|
|
|
tops3.push_back ( o );
|
|
|
}
|
|
|
if ( conf->gB ( featsec, "haar_diagxy", true ) )
|
|
|
{
|
|
|
+ tops2.push_back ( new HaarDiagXY() );
|
|
|
Operation* o = new HaarDiagXY();
|
|
|
o->setContext(true);
|
|
|
tops3.push_back ( o );
|
|
|
}
|
|
|
if ( conf->gB ( featsec, "haar_diagxz", true ) )
|
|
|
{
|
|
|
+ tops2.push_back ( new HaarDiagXZ() );
|
|
|
Operation* o = new HaarDiagXZ();
|
|
|
o->setContext(true);
|
|
|
tops3.push_back ( o );
|
|
|
}
|
|
|
if ( conf->gB ( featsec, "haar_diagyz", true ) )
|
|
|
{
|
|
|
+ tops2.push_back ( new HaarDiagYZ() );
|
|
|
Operation* o = new HaarDiagYZ();
|
|
|
o->setContext(true);
|
|
|
tops3.push_back ( o );
|
|
|
}
|
|
|
if ( conf->gB ( featsec, "haar3_horz", true ) )
|
|
|
{
|
|
|
+ tops2.push_back ( new Haar3Horiz() );
|
|
|
Operation* o = new Haar3Horiz();
|
|
|
o->setContext(true);
|
|
|
tops3.push_back ( o );
|
|
|
}
|
|
|
if ( conf->gB ( featsec, "haar3_vert", true ) )
|
|
|
{
|
|
|
+ tops2.push_back ( new Haar3Vert() );
|
|
|
Operation* o = new Haar3Vert();
|
|
|
o->setContext(true);
|
|
|
tops3.push_back ( o );
|
|
|
}
|
|
|
if ( conf->gB ( featsec, "haar3_stack", true ) )
|
|
|
{
|
|
|
+ tops2.push_back ( new Haar3Stack() );
|
|
|
Operation* o = new Haar3Stack();
|
|
|
o->setContext(true);
|
|
|
tops3.push_back ( o );
|
|
@@ -294,28 +264,38 @@ void SemSegContextTree::initOperations()
|
|
|
|
|
|
if ( conf->gB ( featsec, "minus", true ) )
|
|
|
{
|
|
|
+ tops0.push_back ( new Minus() );
|
|
|
Operation* o = new Minus();
|
|
|
o->setContext(true);
|
|
|
tops4.push_back ( o );
|
|
|
}
|
|
|
if ( conf->gB ( featsec, "minus_abs", true ) )
|
|
|
{
|
|
|
+ tops0.push_back ( new MinusAbs() );
|
|
|
Operation* o = new MinusAbs();
|
|
|
o->setContext(true);
|
|
|
tops4.push_back ( o );
|
|
|
}
|
|
|
if ( conf->gB ( featsec, "addition", true ) )
|
|
|
{
|
|
|
+ tops0.push_back ( new Addition() );
|
|
|
Operation* o = new Addition();
|
|
|
o->setContext(true);
|
|
|
tops4.push_back ( o );
|
|
|
}
|
|
|
if ( conf->gB ( featsec, "only1", true ) )
|
|
|
{
|
|
|
+ tops0.push_back ( new Only1() );
|
|
|
Operation* o = new Only1();
|
|
|
o->setContext(true);
|
|
|
tops4.push_back ( o );
|
|
|
}
|
|
|
+ if ( conf->gB ( featsec, "rel_x", true ) )
|
|
|
+ tops0.push_back ( new RelativeXPosition() );
|
|
|
+ if ( conf->gB ( featsec, "rel_y", true ) )
|
|
|
+ tops0.push_back ( new RelativeYPosition() );
|
|
|
+ if ( conf->gB ( featsec, "rel_z", true ) )
|
|
|
+ tops0.push_back ( new RelativeZPosition() );
|
|
|
|
|
|
if ( conf->gB ( featsec, "ray_diff", false ) )
|
|
|
tops5.push_back ( new RayDiff() );
|