LocalFeatureSift.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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 "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. namespace OBJREC {
  15. /** local feature with sift */
  16. class LocalFeatureSift : public LocalFeature
  17. {
  18. protected:
  19. int octaves;
  20. int levels;
  21. bool normalizeFeature;
  22. int first_octave;
  23. double magnif;
  24. bool deletemode;
  25. bool integerValues;
  26. float threshold;
  27. float edgeThreshold;
  28. public:
  29. /** simple constructor */
  30. LocalFeatureSift ( const NICE::Config *conf );
  31. /** simple destructor */
  32. virtual ~LocalFeatureSift();
  33. /**
  34. * returns the size of each the SIFT-Feature
  35. * @return 128
  36. */
  37. int getDescSize() const { return 128; };
  38. /**
  39. * get the descriptor
  40. * @param img input image
  41. * @param positions positions for the SIFT features
  42. * @param descriptors output
  43. * @return 0
  44. */
  45. virtual int getDescriptors ( const NICE::Image & img,
  46. NICE::VVector & positions,
  47. NICE::VVector & descriptors ) const;
  48. /**
  49. * computes the descriptor for a single image
  50. * @param img
  51. * @param positions
  52. * @param descriptors
  53. */
  54. void computeDesc( const NICE::Image & img, NICE::VVector & positions, NICE::VVector & descriptors ) const;
  55. /**
  56. * sort positions by scales for faster computing of the Keypoint orientation
  57. * @param positions
  58. */
  59. void sortPositions(NICE::VVector & positions) const;
  60. void visualizeFeatures ( NICE::Image & mark, const NICE::VVector & positions, size_t color ) const;
  61. };
  62. } // namespace
  63. #endif