Эх сурвалжийг харах

SemSegContextTree3D: removed support for von-Weijer color features

Sven Sickert 7 жил өмнө
parent
commit
802a80e9c3

+ 0 - 34
semseg/SemSegContextTree3D.cpp

@@ -40,7 +40,6 @@ using namespace NICE;
 
 SemSegContextTree3D::SemSegContextTree3D () : SemanticSegmentation ()
 {
-    this->lfcw                = NULL;
     this->firstiteration      = true;
     this->run3Dseg            = false;
     this->maxSamples          = 2000;
@@ -53,7 +52,6 @@ SemSegContextTree3D::SemSegContextTree3D () : SemanticSegmentation ()
     this->randomTests         = 10;
     this->useAltTristimulus   = false;
     this->useGradient         = true;
-    this->useWeijer           = false;
     this->useAdditionalLayer  = false;
     this->numAdditionalLayer  = 0;
     this->useHoiemFeatures    = false;
@@ -88,7 +86,6 @@ SemSegContextTree3D::SemSegContextTree3D (
     string section = "SSContextTree";
     string featsec = "Features";
 
-    this->lfcw                = NULL;
     this->firstiteration      = true;
     this->maxSamples          = conf->gI ( section, "max_samples", 2000 );
     this->minFeats            = conf->gI ( section, "min_feats", 50 );
@@ -101,7 +98,6 @@ SemSegContextTree3D::SemSegContextTree3D (
 
     this->useAltTristimulus   = conf->gB ( featsec, "use_alt_trist", false );
     this->useGradient         = conf->gB ( featsec, "use_gradient", true );
-    this->useWeijer           = conf->gB ( featsec, "use_weijer", true );
     this->useHoiemFeatures    = conf->gB ( featsec, "use_hoiem_features", false );
     this->useAdditionalLayer  = conf->gB ( featsec, "use_additional_layer", false );
     if (useAdditionalLayer)
@@ -127,9 +123,6 @@ SemSegContextTree3D::SemSegContextTree3D (
     else
         this->fasthik = NULL;
 
-    if ( useWeijer )
-        this->lfcw    = new LocalFeatureColorWeijer ( conf );
-
     this->classnames = (*classNames);
 
     string forbidden_classes_s = conf->gS ( "analysis", "forbidden_classes", "" );
@@ -546,9 +539,6 @@ void SemSegContextTree3D::train ( const LabeledSet * trainp )
             rawChannels *= 3;   // gx, gy
     }
 
-    if ( useWeijer )      // Weijer Colornames
-        rawChannels += 11;
-
     if ( useHoiemFeatures )       // geometrische Kontextmerkmale
         rawChannels += 8;
 
@@ -1214,30 +1204,6 @@ void SemSegContextTree3D::addFeatureMaps (
 
     }
 
-    // Weijer color names
-    if ( useWeijer )
-    {
-        if ( imagetype == IMAGETYPE_RGB )
-        {
-            int currentsize = imgData.channels();
-            imgData.addChannel ( 11 );
-            for ( int z = 0; z < zsize; z++ )
-            {
-                NICE::ColorImage img = imgData.getColor ( z );
-                NICE::MultiChannelImageT<double> cfeats;
-                lfcw->getFeats ( img, cfeats );
-                for ( int c = 0; c < cfeats.channels(); c++)
-                    for ( int y = 0; y < ysize; y++ )
-                        for ( int x = 0; x < xsize; x++ )
-                            imgData.set(x, y, z, cfeats.get(x,y,(uint)c), c+currentsize);
-            }
-        }
-        else
-        {
-            cerr << "Can't compute weijer features of a grayscale image." << endl;
-        }
-    }
-
     // arbitrary amount of additional layers as feature maps
     if ( useAdditionalLayer )
     {

+ 0 - 7
semseg/SemSegContextTree3D.h

@@ -12,7 +12,6 @@
 #include <core/vector/VVector.h>
 
 // nice-vislearning includes
-#include <vislearning/features/localfeatures/LocalFeatureColorWeijer.h>
 #include <vislearning/classifier/fpclassifier/gphik/FPCGPHIK.h>
 
 // nice-segmentation includes
@@ -38,9 +37,6 @@ private:
   /** tree -> saved as vector of nodes */
   std::vector<std::vector<TreeNode> > forest;
 
-  /** local features */
-  LocalFeatureColorWeijer *lfcw;
-
   /** whether to use a particular feature type or not */
   bool useFeat0, useFeat1, useFeat2, useFeat3, useFeat4;
 
@@ -109,9 +105,6 @@ private:
   /** use Gradient image or not */
   bool useGradient;
 
-  /** use Color features from van de Weijer or not */
-  bool useWeijer;
-
   /** use additional input layers or not */
   bool useAdditionalLayer;