#include #include #include "mp_gabor.h" #include "rimage.h" #include "simplematrix.hpp" typedef Matrix2d Feature; namespace mpt { class GaborPyramid : public MP_Gabor { public: GaborPyramid( const RImage &_pixels, int width, int height, bool _sub_proc = false ); bool importPaddedFilters( const std::string &file ); Feature featureFromImage( RImage &patch ); private: double Fmax; // = 8; double dF; // = 1.4; % frequency bandwidth = 1.4 octave double dOmega; // = 40; %orientation bandwidth = 40 degree double dTheta; // = 22.5; int szx; //=96; int szy; //=96; int nLayers; // = 5; // calculated from other parameters double Ka; ///< Bandwidth // normal double Kb; ///< Bandwidth \perp normal double nDir; // rawFilters; std::vector< std::vector< std::vector > > paddedFilters; // Maybe change this to a simple matrix? bool getSize( std::istream &is, int &width, int &height ); bool getOneFilter( std::istream &is, int width, int height, std::vector &oneFilter ); // For generating the pyramid, not yet implemented void baseLayer(); void spGabor( double omega, double F, RImage &rawFilter ); void padFFTImage( RImage &in ); }; } // end namespace mpt