Bjoern Froehlich vor 13 Jahren
Ursprung
Commit
f4037145eb

+ 1 - 7
semseg/SemSegCsurka.h

@@ -41,9 +41,7 @@
 
 #include "objrec-froehlichexp/semseg/postsegmentation/PSSImageLevelPrior.h"
 #include "objrec-froehlichexp/semseg/postsegmentation/RelativeLocationPrior.h"
-#ifdef NICE_USELIB_ICE
- #include "objrec-froehlichexp/semseg/postsegmentation/PPSuperregion.h"
-#endif
+#include "objrec-froehlichexp/semseg/postsegmentation/PPSuperregion.h"
 #include "objrec-froehlichexp/semseg/postsegmentation/PPGraphCut.h"
 
 
@@ -150,12 +148,8 @@ class SemSegCsurka : public SemanticSegmentation
 	//! the relative location features
 	RelativeLocationPrior *relloc;
 	
-#ifdef NICE_USELIB_ICE
 	//! Shape pp
 	PPSuperregion *srg;
-#else
-	int *srg;
-#endif
 	
 	//! Graph Cut pp
 	PPGraphCut *gcopt;

+ 6 - 1
semseg/postsegmentation/PPSuperregion.cpp

@@ -196,7 +196,7 @@ void PPSuperregion::optimizeShape(Examples &regions, NICE::Matrix &mask, Generic
 	throw("PPSuperRegion.cpp: please use ice library for this function");
 #endif
 }
-
+#ifdef NICE_USELIB_ICE
 void PPSuperregion::getSuperregions(const Examples &regions, const NICE::Matrix &mask, vector<ice::Region> &superregions, vector<int> &classes, NICE::Matrix &smask)
 {
 	NICE::Image tmp (mask.rows(), mask.cols());
@@ -233,9 +233,11 @@ void PPSuperregion::getSuperregions(const Examples &regions, const NICE::Matrix
 		}
 	}
 }
+#endif
 
 void PPSuperregion::trainShape(Examples &regions, NICE::Matrix &mask)
 {
+#ifdef NICE_USELIB_ICE
 	// bestimme Superregionen
 	vector<ice::Region> superregions;
 	vector<int> classes;
@@ -253,6 +255,9 @@ void PPSuperregion::trainShape(Examples &regions, NICE::Matrix &mask)
 		NICE::Vector *tmp2 = new NICE::Vector(tmp);
 		shapefeats.push_back(pair<int, Example>(classes[i], Example(tmp2)));
 	}
+#else
+	throw("PPSuperRegion.cpp: please use ice library for this function");
+#endif
 }
 		
 void PPSuperregion::finishShape(ClassNames &cn)

+ 2 - 2
semseg/postsegmentation/PPSuperregion.h

@@ -6,8 +6,6 @@
 
  */
 
-#ifdef NICE_USELIB_ICE
-
 #ifndef PPSUPERREGIONINCLUDE
 #define PPSUPERREGIONINCLUDE
 
@@ -74,7 +72,9 @@ class PPSuperregion : public Persistent
 		 * @param superregions the superregions
 		 * @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);
+#endif
 				
 		/**
 		 * Lerne Form der Regionen an