/** * @file InterestDetector.h * @brief interest detector interface * @author Erik Rodner * @date 02/05/2008 */ #ifndef INTERESTDETECTORINCLUDE #define INTERESTDETECTORINCLUDE #include "core/vector/VectorT.h" #include "core/vector/MatrixT.h" #include "core/image/ImageT.h" #include "vislearning/image/ImagePyramid.h" namespace OBJREC { /** interest detector interface */ class InterestDetector { protected: public: /** simple constructor */ InterestDetector(); /** simple destructor */ virtual ~InterestDetector(); virtual int getInterests(const NICE::Image & img, std::vector & positions) const = 0; virtual int getInterests(const ImagePyramid & imp, std::vector & positions) const = 0; inline void getRandomInterests(const NICE::Image & img, std::vector< NICE::Vector> & positions, size_t numsamples) const { getInterests(img, positions); reducePositionsRandom(positions, numsamples); } inline void getRandomInterests(const ImagePyramid & imp, std::vector< NICE::Vector> & positions, size_t numsamples) const { getInterests(imp, positions); reducePositionsRandom(positions, numsamples); } private: void reducePositionsRandom(std::vector & positions, size_t numsamples) const; }; } // namespace #endif