Browse Source

adapted HaarFeature for MultiChannelImageT

Sven Sickert 11 years ago
parent
commit
f3ace2410b
1 changed files with 8 additions and 7 deletions
  1. 8 7
      features/fpfeatures/HaarFeature.cpp

+ 8 - 7
features/fpfeatures/HaarFeature.cpp

@@ -87,9 +87,10 @@ HaarFeature::~HaarFeature()
 
 double HaarFeature::val ( const Example *example ) const
 {
-  const NICE::MultiChannelImageT<long> & img = example->ce->getLChannel ( CachedExample::L_INTEGRALIMAGE );
+  NICE::MultiChannelImageT<long> & img = example->ce->getLChannel ( CachedExample::L_INTEGRALIMAGE );
 
-  //const long *integralImage = img.data[0];
+  long **data = img.getDataPointer();
+  const long *integralImage = data[0];
   int xsize = img.width();
   int ysize = img.height();
 
@@ -127,7 +128,7 @@ double HaarFeature::val ( const Example *example ) const
   assert ( pos1 >= 0 );
   assert ( pos2 >= 0 );
 
-#if 0
+//#if 0
   double value;
   if ( type == HaarFeature::HAARTYPE_HORIZONTAL )
   {
@@ -194,10 +195,10 @@ double HaarFeature::val ( const Example *example ) const
   }
 
   assert ( finite ( value ) );
-#else
-  throw("not yet adapted for new MultiChannelImageT!");
-  double value = 0.0;
-#endif
+//#else
+//  throw("not yet adapted for new MultiChannelImageT!");
+//  double value = 0.0;
+//#endif
   return value;
 }