LFGenericLocal.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /**
  2. * @file LFGenericLocal.h
  3. * @brief generic local features ( Random Sampling of POIs and SIFT as descriptor)
  4. * @author Erik Rodner
  5. * @date 02/05/2008
  6. */
  7. #ifndef LFGENERICLOCALINCLUDE
  8. #define LFGENERICLOCALINCLUDE
  9. #include "core/vector/VectorT.h"
  10. #include "core/vector/MatrixT.h"
  11. #include "core/image/ImageT.h"
  12. #include "core/basics/Config.h"
  13. #include "LocalFeatureRepresentation.h"
  14. #include "InterestDetector.h"
  15. #include "LocalFeature.h"
  16. namespace OBJREC {
  17. /** generic local features */
  18. /** @class LFGenericLocal
  19. * @brief Generic local features ( actually: Random Sampling of POIs followed by SIFT as descriptor)
  20. */
  21. class LFGenericLocal : public LocalFeatureRepresentation
  22. {
  23. protected:
  24. LocalFeature *lf;
  25. InterestDetector *id;
  26. public:
  27. /** simple constructor */
  28. LFGenericLocal( const NICE::Config *conf, int numFeatures );
  29. /** simple destructor */
  30. virtual ~LFGenericLocal();
  31. int getDescSize () const;
  32. int extractFeatures ( const NICE::Image & img,
  33. NICE::VVector & features,
  34. NICE::VVector & positions) const;
  35. void visualizeFeatures ( NICE::Image & mark,
  36. const NICE::VVector & positions,
  37. size_t color ) const;
  38. ///////////////////// INTERFACE PERSISTENT /////////////////////
  39. // interface specific methods for store and restore
  40. ///////////////////// INTERFACE PERSISTENT /////////////////////
  41. /**
  42. * @brief Load object from external file (stream)
  43. * @author Alexander Freytag
  44. * @date 10-02-2014 ( dd-mmyyyy)
  45. */
  46. virtual void restore ( std::istream & is, int format = 0 );
  47. /**
  48. * @brief Save object to external file (stream)
  49. * @author Alexander Freytag
  50. * @date 10-02-2014 ( dd-mmyyyy)
  51. */
  52. virtual void store( std::ostream & os, int format = 0 ) const;
  53. /**
  54. * @brief Clear object
  55. * @author Alexander Freytag
  56. * @date 10-02-2014 ( dd-mmyyyy)
  57. */
  58. virtual void clear ();
  59. };
  60. } // namespace
  61. #endif