/** * @file LFPatches.h * @brief simple patch based approach * @author Erik Rodner * @date 02/06/2008 */ #ifndef LFPATCHESINCLUDE #define LFPATCHESINCLUDE #ifdef NOVISUAL #include #else #include #endif #include "core/basics/Config.h" #include "vislearning/image/ImagePyramid.h" #include "LocalFeatureRepresentation.h" #include "vislearning/features/localfeatures/InterestDetector.h" namespace OBJREC { /** simple patch based approach */ class LFPatches: public LocalFeatureRepresentation { protected: enum { NORMALIZE_N01 = 0, NORMALIZE_NONE, NORMALIZE_STDDEV, NORMALIZE_MEAN }; int xsize; int ysize; int normalization; std::auto_ptr id; int maxLevels; double scaleSpacing; int detectormode; int numPatches; void calcDescriptors(const ImagePyramid & imp, NICE::VVector & positions, NICE::VVector & features) const; public: /** simple constructor */ LFPatches(const NICE::Config *conf, int numPatches); /** simple destructor */ virtual ~LFPatches(); int getDescSize() const; int extractFeatures(const NICE::Image & img, NICE::VVector & features, NICE::VVector & positions) const; void correctPositions(const ImagePyramid & imp, NICE::VVector & positions, NICE::VVector & positions_corrected) const; void visualize(NICE::Image & img, const NICE::Vector & feature) const; void visualizeFeatures(NICE::Image & mark, const NICE::VVector & positions, size_t color) const; //DIRTY for bofCreationSingleImage int calcDescriptor(const ImagePyramid & imp, const NICE::Vector & position, NICE::Vector & desc) const; }; } // namespace #endif