LFGenericLocal.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. ///////////////////// ///////////////////// /////////////////////
  28. // CONSTRUCTORS / DESTRUCTORS
  29. ///////////////////// ///////////////////// /////////////////////
  30. /**
  31. * @brief default constructor
  32. * @date 10-02-2014 (dd-mm-yyyy )
  33. * @author Alexander Freytag
  34. */
  35. LFGenericLocal();
  36. /** simple constructor */
  37. LFGenericLocal( const NICE::Config *conf, int numFeatures );
  38. /** simple destructor */
  39. virtual ~LFGenericLocal();
  40. ///////////////////// ///////////////////// /////////////////////
  41. // FEATURE STUFF
  42. ///////////////////// ///////////////////// //////////////////
  43. int getDescSize () const;
  44. int extractFeatures ( const NICE::Image & img,
  45. NICE::VVector & features,
  46. NICE::VVector & positions) const;
  47. void visualizeFeatures ( NICE::Image & mark,
  48. const NICE::VVector & positions,
  49. size_t color ) const;
  50. ///////////////////// INTERFACE PERSISTENT /////////////////////
  51. // interface specific methods for store and restore
  52. ///////////////////// INTERFACE PERSISTENT /////////////////////
  53. /**
  54. * @brief Load object from external file (stream)
  55. * @author Alexander Freytag
  56. * @date 10-02-2014 ( dd-mmyyyy)
  57. */
  58. virtual void restore ( std::istream & is, int format = 0 );
  59. /**
  60. * @brief Save object to external file (stream)
  61. * @author Alexander Freytag
  62. * @date 10-02-2014 ( dd-mmyyyy)
  63. */
  64. virtual void store( std::ostream & os, int format = 0 ) const;
  65. /**
  66. * @brief Clear object
  67. * @author Alexander Freytag
  68. * @date 10-02-2014 ( dd-mmyyyy)
  69. */
  70. virtual void clear ();
  71. };
  72. } // namespace
  73. #endif