|
@@ -281,7 +281,26 @@ void LocalFeatureColorWeijer::getFeats( const NICE::ColorImage &img, MultiChanne
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- return;
|
|
|
+}
|
|
|
+
|
|
|
+void LocalFeatureColorWeijer::getFeats( const ColorImage &img, NICE::ImageT<double> &feats, int color )
|
|
|
+{
|
|
|
+ assert ( feats.width() > 0 );
|
|
|
+ assert ( feats.height() > 0 );
|
|
|
+
|
|
|
+ int width = ( int )img.width();
|
|
|
+ int height = ( int )img.height();
|
|
|
+
|
|
|
+ for ( int y = 0; y < height; y++ )
|
|
|
+ for ( int x = 0; x < width; x++ )
|
|
|
+ {
|
|
|
+ int r = img(x,y,0)/8;
|
|
|
+ int g = img(x,y,1)/8;
|
|
|
+ int b = img(x,y,2)/8;
|
|
|
+
|
|
|
+ feats.setPixel( x, y, hist[r][g][b][color] );
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
///////////////////// INTERFACE PERSISTENT /////////////////////
|