LocalFeatureLFInterface.h 1.5 KB

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