LocalFeatureRepresentation.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /**
  2. * @file LocalFeatureRepresentation.h
  3. * @brief Absract class for Local Feature Representations (Detector + Descriptor)
  4. * @author Erik Rodner, Alexander Freytag
  5. * @date 11/19/2007
  6. */
  7. #ifndef LOCALFEATUREREPRESENTATIONINCLUDE
  8. #define LOCALFEATUREREPRESENTATIONINCLUDE
  9. // STL includes
  10. #include <vector>
  11. // nice-core includes
  12. #include <core/basics/Exception.h>
  13. //
  14. #include <core/image/ImageT.h>
  15. #include <core/imagedisplay/ImageDisplay.h>
  16. //
  17. #include <core/vector/VectorT.h>
  18. #include <core/vector/MatrixT.h>
  19. #include <core/vector/VVector.h>
  20. namespace OBJREC {
  21. /** absract class for the representation of an image with local feature descriptors */
  22. /** NOTE: This class returns Descriptors, which DO NOT need any given positions. All Descriptors calculate there own positions, on DIFFERENT ways. **/
  23. /** @class LocalFeatureRepresentation
  24. * @brief Absract class for Local Feature Representations (Detector + Descriptor)
  25. *
  26. */
  27. class LocalFeatureRepresentation
  28. {
  29. protected:
  30. public:
  31. /** simple constructor */
  32. LocalFeatureRepresentation();
  33. /** simple destructor */
  34. virtual ~LocalFeatureRepresentation();
  35. virtual int getDescSize () const = 0;
  36. virtual int extractFeatures ( const NICE::Image & img,
  37. NICE::VVector & features,
  38. NICE::VVector & positions ) const = 0;
  39. virtual int extractFeatures ( const NICE::ColorImage & img,
  40. NICE::VVector & features,
  41. NICE::VVector & positions ) const;
  42. virtual void visualizeFeatures ( NICE::Image & mark,
  43. const NICE::VVector & positions,
  44. size_t color ) const;
  45. virtual void visualize ( NICE::Image & img,
  46. const NICE::Vector & feature ) const;
  47. };
  48. } // namespace
  49. #endif