12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- /**
- * @file LFPatches.h
- * @brief simple patch based approach
- * @author Erik Rodner
- * @date 02/06/2008
- */
- #ifndef LFPATCHESINCLUDE
- #define LFPATCHESINCLUDE
- #include "core/vector/VectorT.h"
- #include "core/vector/MatrixT.h"
- #include "core/image/ImageT.h"
- #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
|