LocalFeatureSift.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /**
  2. * @file LocalFeatureSift.h
  3. * @brief local feature with sift
  4. * @author Erik Rodner
  5. * @date 02/05/2008
  6. */
  7. #ifndef LOCALFEATURESIFTINCLUDE
  8. #define LOCALFEATURESIFTINCLUDE
  9. #include <vislearning/nice.h>
  10. #include "core/basics/Config.h"
  11. #include "LocalFeature.h"
  12. namespace OBJREC {
  13. /** local feature with sift */
  14. class LocalFeatureSift : public LocalFeature
  15. {
  16. protected:
  17. int octaves;
  18. int levels;
  19. bool normalizeFeature;
  20. int first_octave;
  21. double magnif;
  22. bool deletemode;
  23. bool integerValues;
  24. float threshold;
  25. float edgeThreshold;
  26. public:
  27. /** simple constructor */
  28. LocalFeatureSift ( const NICE::Config *conf );
  29. /** simple destructor */
  30. virtual ~LocalFeatureSift();
  31. /**
  32. * returns the size of each the SIFT-Feature
  33. * @return 128
  34. */
  35. int getDescSize() const { return 128; };
  36. /**
  37. * get the descriptor
  38. * @param img input image
  39. * @param positions positions for the SIFT features
  40. * @param descriptors output
  41. * @return 0
  42. */
  43. virtual int getDescriptors ( const NICE::Image & img,
  44. NICE::VVector & positions,
  45. NICE::VVector & descriptors ) const;
  46. /**
  47. * computes the descriptor for a single image
  48. * @param img
  49. * @param positions
  50. * @param descriptors
  51. */
  52. void computeDesc( const NICE::Image & img, NICE::VVector & positions, NICE::VVector & descriptors ) const;
  53. /**
  54. * sort positions by scales for faster computing of the Keypoint orientation
  55. * @param positions
  56. */
  57. void sortPositions(NICE::VVector & positions) const;
  58. void visualizeFeatures ( NICE::Image & mark, const NICE::VVector & positions, size_t color ) const;
  59. };
  60. } // namespace
  61. #endif