1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- /**
- * @file InterestDetector.h
- * @brief interest detector interface
- * @author Erik Rodner
- * @date 02/05/2008
- */
- #ifndef INTERESTDETECTORINCLUDE
- #define INTERESTDETECTORINCLUDE
- #ifdef NOVISUAL
- #include <vislearning/nice_nonvis.h>
- #else
- #include <vislearning/nice.h>
- #endif
- #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<NICE::Vector> & positions) const = 0;
- virtual int getInterests(const ImagePyramid & imp,
- std::vector<NICE::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<NICE::Vector> & positions,
- size_t numsamples) const;
- };
- } // namespace
- #endif
|