Bjoern Froehlich 13 жил өмнө
parent
commit
375c6b332d

+ 2 - 2
progs/getRelevantClasses.cpp

@@ -16,7 +16,7 @@
 #include <objrec/baselib/ICETools.h>
 
 #include "objrec/cbaselib/MultiDataset.h"
-#include "objrec/image/GenericImage.h"
+#include "core/image/MultiChannelImageT.h"
 
 #include <fstream>
 
@@ -52,7 +52,7 @@ int main(int argc, char **argv)
 		std::string file = info.img();
 
 		NICE::Image lm;
-		GenericImage<double> probabilities;
+		NICE::MultiChannelImageT<double> probabilities;
 		
 		if (info.hasLocalizationInfo())
 		{

+ 1 - 1
progs/testSemanticSegmentation.cpp

@@ -125,7 +125,7 @@ int main(int argc, char **argv)
 		std::string file = info.img();
 
 		NICE::Image lm;
-		GenericImage<double> probabilities;
+		NICE::MultiChannelImageT<double> probabilities;
 		
 		if (info.hasLocalizationInfo())
 		{

+ 1 - 7
semseg/FIShotton.cpp

@@ -5,12 +5,6 @@
 * @date 05/30/2008
 
 */
-#ifdef NOVISUAL
-#include <objrec/nice_nonvis.h>
-#else
-#include <objrec/nice.h>
-#endif
-
 #include <iostream>
 
 #include "FIShotton.h"
@@ -82,7 +76,7 @@ void FIShotton::buildSemanticMap ( CachedExample *ce,
     int xsize_s = xsize / subsamplex;
     int ysize_s = ysize / subsampley;
 
-    GenericImage<double> & priorMap = ce->getDChannel ( CachedExample::D_INTEGRALPRIOR );
+    NICE::MultiChannelImageT<double> & priorMap = ce->getDChannel ( CachedExample::D_INTEGRALPRIOR );
     priorMap.reInit ( xsize_s, ysize_s, numClasses, true );
     priorMap.setAll ( 0.0 );
     

+ 2 - 3
semseg/SemSegContextTree.cpp

@@ -100,7 +100,7 @@ SemSegContextTree::SemSegContextTree( const Config *conf, const MultiDataset *md
 	
 	grid = conf->gI(section, "grid", 10 );
 	
-	maxSamples = conf->gI(section, "max_samples", 200);
+	maxSamples = conf->gI(section, "max_samples", 2000);
 	
 	minFeats = conf->gI(section, "min_feats", 50 );
 	
@@ -300,7 +300,6 @@ void SemSegContextTree::getBestSplit(const vector<vector<vector<vector<double> >
 				double p = (double)(*mapit).second/(double)counterL;
 				leftent -= p*log2(p);
 			}
-
 			
 			double rightent = 0.0;
 			for ( mapit=eR.begin() ; mapit != eR.end(); mapit++ )
@@ -619,7 +618,7 @@ void SemSegContextTree::train ( const MultiDataset *md )
 #endif
 }
 
-void SemSegContextTree::semanticseg ( CachedExample *ce, NICE::Image & segresult,GenericImage<double> & probabilities )
+void SemSegContextTree::semanticseg ( CachedExample *ce, NICE::Image & segresult,NICE::MultiChannelImageT<double> & probabilities )
 {
 	int xsize;
 	int ysize;

+ 1 - 1
semseg/SemSegContextTree.h

@@ -145,7 +145,7 @@ class SemSegContextTree : public SemanticSegmentation
 	 * @param segresult segmentation results
 	 * @param probabilities probabilities for each pixel
 	 */
-	void semanticseg ( CachedExample *ce,   NICE::Image & segresult,  GenericImage<double> & probabilities );
+	void semanticseg ( CachedExample *ce,   NICE::Image & segresult,  NICE::MultiChannelImageT<double> & probabilities );
 	
 	/**
 	 * the main training method

+ 4 - 4
semseg/SemSegCsurka.cpp

@@ -1204,7 +1204,7 @@ void SemSegCsurka::trainpostprocess ( const MultiDataset *md )
 
 			NICE::Image segresult;
 
-			GenericImage<double> probabilities ( xsize,ysize,classno,true );
+			NICE::MultiChannelImageT<double> probabilities ( xsize,ysize,classno,true );
 
 			Examples regions;
 
@@ -1277,7 +1277,7 @@ void SemSegCsurka::trainpostprocess ( const MultiDataset *md )
 	cout << "finished postprocess" << endl;
 }
 
-void SemSegCsurka::classifyregions ( CachedExample *ce, NICE::Image & segresult, GenericImage<double> & probabilities, Examples &Regionen, NICE::Matrix & mask )
+void SemSegCsurka::classifyregions ( CachedExample *ce, NICE::Image & segresult, NICE::MultiChannelImageT<double> & probabilities, Examples &Regionen, NICE::Matrix & mask )
 {
 	/* die einzelnen Testschritte:
 	1.x  auf dem Testbild alle SIFT Merkmale an den Gitterpunkten bei allen Auflösungen bestimmen
@@ -1428,7 +1428,7 @@ void SemSegCsurka::classifyregions ( CachedExample *ce, NICE::Image & segresult,
 	// Wahrscheinlichkeitskarten erstellen //
 	/////////////////////////////////////////
 	int klassen = probabilities.numChannels;
-	GenericImage<double> preMap ( xsize,ysize,klassen*scales.size(),true );
+	NICE::MultiChannelImageT<double> preMap ( xsize,ysize,klassen*scales.size(),true );
 
 	long int offset = 0;
 
@@ -1788,7 +1788,7 @@ getchar();*/
 
 void SemSegCsurka::semanticseg ( CachedExample *ce,
 								NICE::Image & segresult,
-								GenericImage<double> & probabilities )
+								NICE::MultiChannelImageT<double> & probabilities )
 {
 
 	Examples regions;

+ 2 - 2
semseg/SemSegCsurka.h

@@ -229,7 +229,7 @@ class SemSegCsurka : public SemanticSegmentation
 	  */
 	void semanticseg ( CachedExample *ce, 
                        NICE::Image & segresult,
-                       GenericImage<double> & probabilities );
+                       NICE::MultiChannelImageT<double> & probabilities );
 
     /** this procedure is equal semanticseg, if there is no post process
 	  * @param ce image data
@@ -238,7 +238,7 @@ class SemSegCsurka : public SemanticSegmentation
 	  * @param Regionen the output regions
 	  * @param mask the positions of the regions
 	  */
-	void classifyregions ( CachedExample *ce, NICE::Image & segresult, GenericImage<double> & probabilities, Examples &Regionen, NICE::Matrix &mask );
+	void classifyregions ( CachedExample *ce, NICE::Image & segresult, NICE::MultiChannelImageT<double> & probabilities, Examples &Regionen, NICE::Matrix &mask );
     void getFeats(NICE::Image arg1, VVector arg2, VVector arg3);
 };
 

+ 1 - 3
semseg/SemSegLocal.cpp

@@ -89,10 +89,8 @@ SemSegLocal::~SemSegLocal()
 
 
 void SemSegLocal::semanticseg ( CachedExample *ce, 
-			   // refactor-nice.pl: check this substitution
-			   // old: Image & segresult,
 			   NICE::Image & segresult,
-			   GenericImage<double> & probabilities )
+			   NICE::MultiChannelImageT<double> & probabilities )
 {
     // for speed optimization
     FPCRandomForests *fpcrf = dynamic_cast<FPCRandomForests *> ( fpc );

+ 2 - 5
semseg/SemSegLocal.h

@@ -27,8 +27,7 @@ class SemSegLocal : public SemanticSegmentation
     protected:
 	bool save_cache;
 	bool read_cache;
-	// refactor-nice.pl: check this substitution
-	// old: string cache;
+
 	std::string cache;
 	FeaturePoolClassifier *fpc;
 
@@ -43,10 +42,8 @@ class SemSegLocal : public SemanticSegmentation
 	void train ( const Config *conf, const MultiDataset *md );
 
 	void semanticseg ( CachedExample *ce, 
-			   // refactor-nice.pl: check this substitution
-			   // old: Image & segresult,
 			   NICE::Image & segresult,
-			   GenericImage<double> & probabilities );
+			   NICE::MultiChannelImageT<double> & probabilities );
 
 };
 

+ 1 - 1
semseg/SemSegRegionBased.cpp

@@ -664,7 +664,7 @@ void SemSegRegionBased::classify(const vector<vector<FeatureType> > &feats, Exam
 	#endif
 }
 
-void SemSegRegionBased::semanticseg(CachedExample *ce, NICE::Image & segresult,	GenericImage<double> & probabilities)
+void SemSegRegionBased::semanticseg(CachedExample *ce, NICE::Image & segresult,	NICE::MultiChannelImageT<double> & probabilities)
 {
 	#ifdef DEBUG_PRINTS
 	cout << "SemSegRegionBased::semanticseg starts" << endl;

+ 1 - 1
semseg/SemSegRegionBased.h

@@ -90,7 +90,7 @@ namespace OBJREC
 			 * @param segresult result of the semantic segmentation with a label for each pixel
 			 * @param probabilities multi-channel image with one channel for each class and corresponding probabilities for each pixel
 			 */
-			void semanticseg(CachedExample *ce, NICE::Image & segresult,  GenericImage<double> & probabilities);
+			void semanticseg(CachedExample *ce, NICE::Image & segresult,  NICE::MultiChannelImageT<double> & probabilities);
 			/**
 			 * get all features for an Image and save them in Examples
 			 * @param cimg input image

+ 1 - 1
semseg/SemSegSTF.cpp

@@ -164,7 +164,7 @@ void SemSegSTF::fillCachePixel ( CachedExample *ce )
 
 void SemSegSTF::semanticseg ( CachedExample *ce, 
 			   NICE::Image & segresult,
-			   GenericImage<double> & probabilities )
+			   NICE::MultiChannelImageT<double> & probabilities )
 {
     int xsize;
     int ysize;

+ 1 - 1
semseg/SemSegSTF.h

@@ -88,7 +88,7 @@ class SemSegSTF : public SemanticSegmentation
 			   // refactor-nice.pl: check this substitution
 			   // old: Image & segresult,
 			   NICE::Image & segresult,
-			   GenericImage<double> & probabilities );
+			   NICE::MultiChannelImageT<double> & probabilities );
 
 };
 

+ 1 - 1
semseg/SemanticSegmentation.cpp

@@ -164,7 +164,7 @@ SemanticSegmentation::~SemanticSegmentation()
 
 void SemanticSegmentation::semanticseg ( const std::string & filename,
 			   NICE::Image & segresult,
-			   GenericImage<double> & probabilities)
+			   NICE::MultiChannelImageT<double> & probabilities)
 {
     Globals::setCurrentImgFN(filename);
     CachedExample *ce;

+ 2 - 2
semseg/SemanticSegmentation.h

@@ -57,7 +57,7 @@ class SemanticSegmentation
 	*/
 	virtual void semanticseg ( CachedExample *ce, 
 			   NICE::Image & segresult,
-			   GenericImage<double> & probabilities ) = 0;
+			   NICE::MultiChannelImageT<double> & probabilities ) = 0;
 			   
 	/**
 	 * convert different datatypes
@@ -72,7 +72,7 @@ class SemanticSegmentation
 	/** load img from file call localize(CachedExample *ce) etc. */
 	void semanticseg ( const std::string & filename,
 			   NICE::Image & segresult,
-	  GenericImage<double> & probabilities);
+	  NICE::MultiChannelImageT<double> & probabilities);
 
 };
 

+ 1 - 1
semseg/postsegmentation/PPGraphCut.cpp

@@ -90,7 +90,7 @@ void PPGraphCut::optimizeImage(RegionGraph &regions, vector<vector<double> > & p
 	}
 }
 
-void PPGraphCut::optimizeImage(Examples &regions, NICE::Matrix &mask, GenericImage<double> & probabilities)
+void PPGraphCut::optimizeImage(Examples &regions, NICE::Matrix &mask, NICE::MultiChannelImageT<double> & probabilities)
 {
 	RegionGraph g;
 	g.computeGraph(regions, mask);

+ 2 - 2
semseg/postsegmentation/PPGraphCut.h

@@ -10,7 +10,7 @@
 
 #include <objrec/nice.h>
 
-#include "objrec/image/GenericImage.h"
+#include "core/image/MultiChannelImageT.h"
 
 #include "objrec/cbaselib/CachedExample.h"
 #include "objrec/baselib/Preprocess.h"
@@ -92,7 +92,7 @@ class PPGraphCut : public Persistent
 		 * @param mask 
 		 * @param probabilities probability maps for each pixel
 		 */
-		void optimizeImage(Examples &regions, NICE::Matrix &mask, GenericImage<double> & probabilities);
+		void optimizeImage(Examples &regions, NICE::Matrix &mask, NICE::MultiChannelImageT<double> & probabilities);
 		
 		/**
 		 * use shape pp

+ 1 - 1
semseg/postsegmentation/PPSuperregion.cpp

@@ -32,7 +32,7 @@ PPSuperregion::~PPSuperregion()
 }
 
 
-void PPSuperregion::optimizeShape(Examples &regions, NICE::Matrix &mask, GenericImage<double> & probabilities)
+void PPSuperregion::optimizeShape(Examples &regions, NICE::Matrix &mask, NICE::MultiChannelImageT<double> & probabilities)
 {
 #ifdef NICE_USELIB_ICE
 	vector<ice::Region> superregions;

+ 3 - 3
semseg/postsegmentation/PPSuperregion.h

@@ -11,7 +11,7 @@
 
 #include <objrec/nice.h>
 
-#include "objrec/image/GenericImage.h"
+#include "core/image/MultiChannelImageT.h"
 
 #include "objrec/cbaselib/CachedExample.h"
 #include "objrec/baselib/Preprocess.h"
@@ -75,7 +75,7 @@ class PPSuperregion : public Persistent
 		 * @param classes the classlabels of the superregions
 		 */
 #ifdef NICE_USELIB_ICE
-		void getSuperregions(const Examples &regions, const NICE::Matrix &mask, vector<ice::Region> &superregions, vector<int> &classes, NICE::Matrix &smask);
+		void getSuperregions(const Examples &regions, const NICE::Matrix &mask, std::vector<ice::Region> &superregions, std::vector<int> &classes, NICE::Matrix &smask);
 #endif
 				
 		/**
@@ -95,7 +95,7 @@ class PPSuperregion : public Persistent
 		 * @param regions 
 		 * @param mask 
 		 */
-		void optimizeShape(Examples &regions, NICE::Matrix &mask, GenericImage<double> & probabilities);
+		void optimizeShape(Examples &regions, NICE::Matrix &mask, NICE::MultiChannelImageT<double> & probabilities);
 		
 		/**
 		 * load data from an input stream

+ 2 - 12
semseg/postsegmentation/PSSBackgroundModel.cpp

@@ -5,12 +5,6 @@
 * @date 03/19/2009
 
 */
-#ifdef NOVISUAL
-#include <objrec/nice_nonvis.h>
-#else
-#include <objrec/nice.h>
-#endif
-
 #include <iostream>
 
 #include "PSSBackgroundModel.h"
@@ -18,8 +12,7 @@
 using namespace OBJREC;
 
 using namespace std;
-// refactor-nice.pl: check this substitution
-// old: using namespace ice;
+
 using namespace NICE;
 
 
@@ -35,10 +28,7 @@ PSSBackgroundModel::~PSSBackgroundModel()
 {
 }
 
-	
-// refactor-nice.pl: check this substitution
-// old: void PSSBackgroundModel::postprocess ( Image & result, GenericImage<double> & probabilities )
-void PSSBackgroundModel::postprocess ( NICE::Image & result, GenericImage<double> & probabilities )
+void PSSBackgroundModel::postprocess ( NICE::Image & result, NICE::MultiChannelImageT<double> & probabilities )
 {
     if ( backgroundModelType == BGM_FIXED_ENTROPY_THRESHOLD )
     {

+ 1 - 9
semseg/postsegmentation/PSSBackgroundModel.h

@@ -8,12 +8,6 @@
 #ifndef PSSBACKGROUNDMODELINCLUDE
 #define PSSBACKGROUNDMODELINCLUDE
 
-#ifdef NOVISUAL
-#include <objrec/nice_nonvis.h>
-#else
-#include <objrec/nice.h>
-#endif
- 
 #include "PostSemSeg.h"
 
 
@@ -44,9 +38,7 @@ class PSSBackgroundModel : public PostSemSeg
 	/** simple destructor */
 	virtual ~PSSBackgroundModel();
 	
-	// refactor-nice.pl: check this substitution
-	// old: virtual void postprocess ( Image & result, GenericImage<double> & probabilities );
-	virtual void postprocess ( NICE::Image & result, GenericImage<double> & probabilities );
+	virtual void postprocess ( NICE::Image & result, NICE::MultiChannelImageT<double> & probabilities );
      
 };
 

+ 2 - 8
semseg/postsegmentation/PSSImageLevelPrior.cpp

@@ -5,11 +5,6 @@
 * @date 03/19/2009
 
 */
-#ifdef NOVISUAL
-#include <objrec/nice_nonvis.h>
-#else
-#include <objrec/nice.h>
-#endif
 
 #include <iostream>
 #include <set>
@@ -20,8 +15,7 @@
 using namespace OBJREC;
 
 using namespace std;
-// refactor-nice.pl: check this substitution
-// old: using namespace ice;
+
 using namespace NICE;
 
 
@@ -42,7 +36,7 @@ void PSSImageLevelPrior::setPrior ( FullVector & prior )
     this->prior = prior;
 }
 
-void PSSImageLevelPrior::postprocess ( NICE::Image & result, GenericImage<double> & probabilities )
+void PSSImageLevelPrior::postprocess ( NICE::Image & result, NICE::MultiChannelImageT<double> & probabilities )
 {
     assert ( prior.size() == (int)probabilities.numChannels );
     int xsize = probabilities.xsize;

+ 1 - 10
semseg/postsegmentation/PSSImageLevelPrior.h

@@ -8,12 +8,6 @@
 #ifndef PSSIMAGELEVELPRIORINCLUDE
 #define PSSIMAGELEVELPRIORINCLUDE
 
-#ifdef NOVISUAL
-#include <objrec/nice_nonvis.h>
-#else
-#include <objrec/nice.h>
-#endif
-  
 #include "PostSemSeg.h"
 #include "objrec/math/mathbase/FullVector.h"
 
@@ -46,10 +40,7 @@ class PSSImageLevelPrior : public PostSemSeg
 	
 	void setPrior ( FullVector & prior );
 
-	// refactor-nice.pl: check this substitution
-	// old: void postprocess ( Image & result, GenericImage<double> & probabilities );
-	void postprocess ( NICE::Image & result, GenericImage<double> & probabilities );
-     
+	void postprocess ( NICE::Image & result, NICE::MultiChannelImageT<double> & probabilities ); 
 };
 
 

+ 3 - 26
semseg/postsegmentation/PSSLocalizationPrior.cpp

@@ -5,12 +5,6 @@
 * @date 03/19/2009
 
 */
-#ifdef NOVISUAL
-#include <objrec/nice_nonvis.h>
-#else
-#include <objrec/nice.h>
-#endif
-
 #include <iostream>
 #include <limits>
 
@@ -23,14 +17,8 @@
 using namespace OBJREC;
 
 using namespace std;
-// refactor-nice.pl: check this substitution
-// old: using namespace ice;
 using namespace NICE;
 
-
-
-// refactor-nice.pl: check this substitution
-// old: PSSLocalizationPrior::PSSLocalizationPrior( const string & detectiondir, 
 PSSLocalizationPrior::PSSLocalizationPrior( const std::string & detectiondir, 
 					    const ClassNames *classNames,
 					    double alphaDetectionPrior,
@@ -46,8 +34,6 @@ PSSLocalizationPrior::~PSSLocalizationPrior()
 {
 }
 
-// refactor-nice.pl: check this substitution
-// old: void PSSLocalizationPrior::loadDetectionResults ( const string & dir,
 void PSSLocalizationPrior::loadDetectionResults ( const std::string & dir,
 				       map<string, LocalizationResult *> & results,
 				       const ClassNames *classNames )
@@ -59,11 +45,9 @@ void PSSLocalizationPrior::loadDetectionResults ( const std::string & dir,
     for ( vector<string>::const_iterator i = files.begin();
 	    i != files.end(); i++ )
     {
-	// refactor-nice.pl: check this substitution
-	// old: string file = *i;
+
 	std::string file = *i;
-	// refactor-nice.pl: check this substitution
-	// old: string classtext = StringTools::baseName ( file, false );
+
 	std::string classtext = StringTools::baseName ( file, false );
 	int classno = classNames->classno(classtext);
 	if ( classno < 0 ) {
@@ -75,16 +59,9 @@ void PSSLocalizationPrior::loadDetectionResults ( const std::string & dir,
     }
 }
 
-	
-// refactor-nice.pl: check this substitution
-// old: void PSSLocalizationPrior::postprocess ( Image & result, GenericImage<double> & probabilities )
-void PSSLocalizationPrior::postprocess ( NICE::Image & result, GenericImage<double> & probabilities )
+void PSSLocalizationPrior::postprocess ( NICE::Image & result, NICE::MultiChannelImageT<double> & probabilities )
 {
-    // refactor-nice.pl: check this substitution
-    // old: string currentFilename = Globals::getCurrentImgFN();
     std::string currentFilename = Globals::getCurrentImgFN();
-    // refactor-nice.pl: check this substitution
-    // old: string base = StringTools::baseName ( currentFilename, false );
     std::string base = StringTools::baseName ( currentFilename, false );
     map<string, LocalizationResult *>::const_iterator i = detresults.find ( base );
 

+ 3 - 15
semseg/postsegmentation/PSSLocalizationPrior.h

@@ -8,12 +8,7 @@
 #ifndef PSSLOCALIZATIONPRIORINCLUDE
 #define PSSLOCALIZATIONPRIORINCLUDE
 
-#ifdef NOVISUAL
-#include <objrec/nice_nonvis.h>
-#else
-#include <objrec/nice.h>
-#endif
- 
+
 #include "objrec/cbaselib/LocalizationResult.h"
 #include "PostSemSeg.h"
 
@@ -30,9 +25,6 @@ class PSSLocalizationPrior : public PostSemSeg
 	double alphaDetectionPrior;
 	map<string, LocalizationResult *> detresults;
 
-
-	// refactor-nice.pl: check this substitution
-	// old: void loadDetectionResults ( const string & dir,
 	void loadDetectionResults ( const std::string & dir,
 			       map<string, LocalizationResult *> & results,
 			       const ClassNames *classNames );
@@ -40,17 +32,13 @@ class PSSLocalizationPrior : public PostSemSeg
     public:
   
 	/** simple constructor */
-	// refactor-nice.pl: check this substitution
-	// old: PSSLocalizationPrior( const string & detectiondir, const ClassNames *classNames,
 	PSSLocalizationPrior( const std::string & detectiondir, const ClassNames *classNames,
 			      double alphaDetectionPrior,  int subsamplex = 1, int subsampley = 1 );
       
 	/** simple destructor */
 	virtual ~PSSLocalizationPrior();
-	
-	// refactor-nice.pl: check this substitution
-	// old: virtual void postprocess ( Image & result, GenericImage<double> & probabilities );
-	virtual void postprocess ( NICE::Image & result, GenericImage<double> & probabilities );
+
+	virtual void postprocess ( NICE::Image & result, NICE::MultiChannelImageT<double> & probabilities );
 
 
      

+ 1 - 8
semseg/postsegmentation/PostSemSeg.cpp

@@ -5,12 +5,6 @@
 * @date 03/19/2009
 
 */
-#ifdef NOVISUAL
-#include <objrec/nice_nonvis.h>
-#else
-#include <objrec/nice.h>
-#endif
-
 #include <iostream>
 
 #include "PostSemSeg.h"
@@ -18,8 +12,7 @@
 using namespace OBJREC;
 
 using namespace std;
-// refactor-nice.pl: check this substitution
-// old: using namespace ice;
+
 using namespace NICE;
 
 

+ 2 - 10
semseg/postsegmentation/PostSemSeg.h

@@ -8,13 +8,7 @@
 #ifndef POSTSEMSEGINCLUDE
 #define POSTSEMSEGINCLUDE
 
-#ifdef NOVISUAL
-#include <objrec/nice_nonvis.h>
-#else
-#include <objrec/nice.h>
-#endif
-
-#include "objrec/image/GenericImage.h"
+#include "core/image/MultiChannelImageT.h"
 
 
 namespace OBJREC {
@@ -33,9 +27,7 @@ class PostSemSeg
 	/** simple destructor */
 	virtual ~PostSemSeg();
 
-	// refactor-nice.pl: check this substitution
-	// old: virtual void postprocess ( Image & result, GenericImage<double> & probabilities ) = 0;
-	virtual void postprocess ( NICE::Image & result, GenericImage<double> & probabilities ) = 0;
+	virtual void postprocess ( NICE::Image & result, NICE::MultiChannelImageT<double> & probabilities ) = 0;
      
 };
 

+ 5 - 5
semseg/postsegmentation/RelativeLocationPrior.cpp

@@ -32,7 +32,7 @@ void RelativeLocationPrior::Init()
 	//Priorsmaps erzeugen
 	for(int i = 0; i < classno; i++)
 	{
-		GenericImage<double> *tmp  = new GenericImage<double>(mapsize, mapsize, classno, true);
+		NICE::MultiChannelImageT<double> *tmp  = new NICE::MultiChannelImageT<double>(mapsize, mapsize, classno, true);
 		tmp->setAll(0.0);
 		priormaps.push_back(tmp);
 	}
@@ -237,7 +237,7 @@ void RelativeLocationPrior::finishPriorsMaps(ClassNames &cn)
 #endif
 }
 
-void RelativeLocationPrior::trainClassifier(Examples &regions, GenericImage<double> & probabilities)
+void RelativeLocationPrior::trainClassifier(Examples &regions, NICE::MultiChannelImageT<double> & probabilities)
 {
 	// für alle Regionen einen Merkmalsvektor erzeugen und diesen der Trainingsmenge hinzufügen
 	getFeature(regions, probabilities);
@@ -302,7 +302,7 @@ void RelativeLocationPrior::finishClassifier()
 	trainingsdata.clear();
 }
 
-void RelativeLocationPrior::postprocess ( Examples &regions, GenericImage<double> & probabilities)
+void RelativeLocationPrior::postprocess ( Examples &regions, NICE::MultiChannelImageT<double> & probabilities)
 {
 	getFeature(regions, probabilities);
 	
@@ -372,7 +372,7 @@ void RelativeLocationPrior::convertCoords(int &x, int xsize)
 	x = std::max(x,0);
 }
 
-void RelativeLocationPrior::getFeature(Examples &regions, GenericImage<double> & probabilities)
+void RelativeLocationPrior::getFeature(Examples &regions, NICE::MultiChannelImageT<double> & probabilities)
 {
 
 	int xsize, ysize;
@@ -499,7 +499,7 @@ void RelativeLocationPrior::restore (istream & is, int format)
 	//Priorsmaps erzeugen
 	for(int i = 0; i < classno; i++)
 	{
-		GenericImage<double> *tmp  = new GenericImage<double>(mapsize, mapsize, classno, true);
+		NICE::MultiChannelImageT<double> *tmp  = new NICE::MultiChannelImageT<double>(mapsize, mapsize, classno, true);
 		tmp->setAll(0.0);
 		priormaps.push_back(tmp);
 	}

+ 5 - 5
semseg/postsegmentation/RelativeLocationPrior.h

@@ -10,7 +10,7 @@
 
 #include <objrec/nice.h>
 
-#include "objrec/image/GenericImage.h"
+#include "core/image/MultiChannelImageT.h"
 
 #include "objrec/cbaselib/CachedExample.h"
 #include "objrec/baselib/Preprocess.h"
@@ -30,7 +30,7 @@ class RelativeLocationPrior : public Persistent
 
 	protected:
 		//! the priormaps
-		vector<GenericImage<double> *> priormaps;
+		vector<NICE::MultiChannelImageT<double> *> priormaps;
 		
 		//! the configfile
 		const Config *conf;
@@ -89,7 +89,7 @@ class RelativeLocationPrior : public Persistent
 		 * @param regions input regions with size and position
 		 * @param probabilities the probabiltiy maps
 		 */
-		void trainClassifier(Examples &regions, GenericImage<double> & probabilities);
+		void trainClassifier(Examples &regions, NICE::MultiChannelImageT<double> & probabilities);
 		
 		/**
 		 * finish the classfiers
@@ -101,7 +101,7 @@ class RelativeLocationPrior : public Persistent
 		 * @param regions input regions with size and position
 		 * @param probabilities the probabiltiy maps
 		 */
-		void getFeature(Examples &regions, GenericImage<double> & probabilities);
+		void getFeature(Examples &regions, NICE::MultiChannelImageT<double> & probabilities);
 		
 		/**
 		 * uses the rlp for reclassification
@@ -109,7 +109,7 @@ class RelativeLocationPrior : public Persistent
 		 * @param result 
 		 * @param probabilities 
 		 */
-		void postprocess ( Examples &regions, GenericImage<double> & probabilities);
+		void postprocess ( Examples &regions, NICE::MultiChannelImageT<double> & probabilities);
 		
 		/**
 		 * load data from an input stream