123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- /**
- * @file LFPatches.h
- * @brief simple patch based approach
- * @author Erik Rodner
- * @date 02/06/2008
- */
- #ifndef LFPATCHESINCLUDE
- #define LFPATCHESINCLUDE
- #ifdef NOVISUAL
- #include <vislearning/nice_nonvis.h>
- #else
- #include <vislearning/nice.h>
- #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<InterestDetector> 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
|