LocalFeatureLFInterface.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /**
  2. * @file LocalFeatureLFInterface.h
  3. * @brief Interface to use a LocalFeature (Descriptor only) with routines of LocalFeatureRepresentations (Detector + Descriptor)
  4. * @author Björn Fröhlich
  5. * @date 09/07/2010
  6. */
  7. #ifndef LocalFeatureLFInterfaceINCLUDE
  8. #define LocalFeatureLFInterfaceINCLUDE
  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 "LocalFeature.h"
  14. #include "LocalFeatureRepresentation.h"
  15. namespace OBJREC {
  16. /** @class LocalFeatureLFInterface
  17. * @brief Interface to use a LocalFeature (Descriptor only) with routines of LocalFeatureRepresentations (Detector + Descriptor)
  18. *
  19. */
  20. class LocalFeatureLFInterface : public LocalFeature
  21. {
  22. protected:
  23. LocalFeatureRepresentation *lfpres;
  24. public:
  25. /** simple constructor */
  26. LocalFeatureLFInterface ( const NICE::Config *conf, LocalFeatureRepresentation *_lfpres );
  27. /** simple destructor */
  28. virtual ~LocalFeatureLFInterface();
  29. /**
  30. * @brief returns the size of each the SIFT-Feature
  31. */
  32. int getDescSize() const { return lfpres->getDescSize(); };
  33. /**
  34. * @brief get the descriptor
  35. * @param img input image
  36. * @param positions positions for local features
  37. * @param descriptors output
  38. * @return 0
  39. */
  40. int getDescriptors ( const NICE::Image & img, NICE::VVector & positions, NICE::VVector & descriptors ) const;
  41. /**
  42. * @brief get the descriptor
  43. * @param img input color image
  44. * @param positions positions for the SIFT features
  45. * @param descriptors output
  46. * @return 0
  47. */
  48. int getDescriptors ( const NICE::ColorImage & img, NICE::VVector & positions, NICE::VVector & descriptors) const;
  49. void visualizeFeatures ( NICE::Image & mark, const NICE::VVector & positions, size_t color ) const;
  50. };
  51. } // namespace
  52. #endif