浏览代码

some format changes

Bjoern Froehlich 13 年之前
父节点
当前提交
396fd79b94

+ 0 - 3
features/fpfeatures/HaarFeature.cpp

@@ -12,10 +12,7 @@
 #include "vislearning/cbaselib/FeaturePool.h"
 
 using namespace OBJREC;
-
 using namespace std;
-// refactor-nice.pl: check this substitution
-// old: using namespace ice;
 using namespace NICE;
 
 

+ 3 - 6
features/localfeatures/LFColorWeijer.cpp

@@ -458,12 +458,11 @@ void LFColorWeijer::visualizeFeatures ( const NICE::ColorImage & cimg, NICE::Col
 	showImage(combinedout, "Ergebnis");
 }
 
-void LFColorWeijer::getFeats(const ColorImage &img, vector<vector<vector<double> > > &feats)
+void LFColorWeijer::getFeats(const ColorImage &img, MultiChannelImageT<double> &feats)
 {
 	int width = (int)img.width();
 	int height = (int)img.height();
-	
-	feats = vector<vector<vector<double> > >(width,vector<vector<double> >(height,vector<double>(hist.size(),0.0)));
+	feats.reInit(width, height, hist.size(), true);
 	
 	NICE::MultiChannelImageT<double> genimg, imglab;
 	
@@ -484,12 +483,10 @@ void LFColorWeijer::getFeats(const ColorImage &img, vector<vector<vector<double>
 					val = std::max(val, 0);
 					b[j] = val;
 				}
-				feats[x][y][i] = hist[i][b[0]][b[1]][b[2]];
+				feats.set(x, y, hist[i][b[0]][b[1]][b[2]], i);
 			}
 		}
 	}
 	
 	return;
 }
-
-

+ 2 - 1
features/localfeatures/LFColorWeijer.h

@@ -11,6 +11,7 @@
 #include "core/vector/MatrixT.h"
 #include "core/image/ImageT.h"
 #include "core/imagedisplay/ImageDisplay.h"
+#include "core/image/MultiChannelImageT.h"
 
 #include "LocalFeature.h"
 #include "core/basics/Config.h"
@@ -183,7 +184,7 @@ class LFColorWeijer : public LocalFeature
 		 * @param img input image
 		 * @param feats feature vector for each pixel
 		 */
-		void getFeats(const NICE::ColorImage &img, std::vector<std::vector<std::vector<double> > > &feats);
+		void getFeats(const NICE::ColorImage &img, NICE::MultiChannelImageT<double> &feats);
 };
 
 

+ 3 - 1
features/localfeatures/LFColorWeijer.h~

@@ -10,6 +10,8 @@
 #include "core/vector/VectorT.h"
 #include "core/vector/MatrixT.h"
 #include "core/image/ImageT.h"
+#include "core/imagedisplay/ImageDisplay.h"
+#include "core/image/MultiChannelImageTb.h"
 
 #include "LocalFeature.h"
 #include "core/basics/Config.h"
@@ -182,7 +184,7 @@ class LFColorWeijer : public LocalFeature
 		 * @param img input image
 		 * @param feats feature vector for each pixel
 		 */
-		void getFeats(const NICE::ColorImage &img, std::vector<std::vector<std::vector<double> > > &feats);
+		void getFeats(const NICE::ColorImage &img, MultiChannelImageT<double> &feats);
 };