LocalFeatureOpponnentSift.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. /**
  2. * @file LocalFeatureOpponnentSift.h
  3. * @brief local feature with color sift
  4. * @author Björn Fröhlich, Alexander Freytag
  5. * @date 03/08/2010
  6. */
  7. #ifndef LocalFeatureOpponnentSiftINCLUDE
  8. #define LocalFeatureOpponnentSiftINCLUDE
  9. // nice-core includes
  10. #include <core/basics/Config.h>
  11. //
  12. #include <core/image/ImageT.h>
  13. //
  14. #include <core/imagedisplay/ImageDisplay.h>
  15. //
  16. #include <core/vector/VectorT.h>
  17. #include <core/vector/MatrixT.h>
  18. // nice-vislearning includes
  19. #include "LocalFeatureRGBSift.h"
  20. namespace OBJREC
  21. {
  22. /** local feature with sift */
  23. class LocalFeatureOpponnentSift : public LocalFeatureRGBSift
  24. {
  25. protected:
  26. /////////////////////////
  27. /////////////////////////
  28. // PROTECTED VARIABLES //
  29. /////////////////////////
  30. /////////////////////////
  31. //TODO check why those member variables have been declared here originally. In the source code, they're not used at all...
  32. // int octaves;
  33. //
  34. // int levels;
  35. //
  36. // bool normalizeFeature;
  37. //
  38. // int first_octave;
  39. //
  40. // double magnif;
  41. public:
  42. ///////////////////// ///////////////////// /////////////////////
  43. // CONSTRUCTORS / DESTRUCTORS
  44. ///////////////////// ///////////////////// /////////////////////
  45. /**
  46. * @brief default constructor
  47. * @date 09-02-2014 (dd-mm-yyyy )
  48. * @author Alexander Freytag
  49. */
  50. LocalFeatureOpponnentSift ( );
  51. /**
  52. * @brief recommended constructor, calls initFromConfig
  53. * @date 09-02-2014 (dd-mm-yyyy )
  54. * @author Alexander Freytag
  55. */
  56. LocalFeatureOpponnentSift ( const NICE::Config * _conf );
  57. /**
  58. * @brief simple destructor
  59. */
  60. virtual ~LocalFeatureOpponnentSift();
  61. /**
  62. * @brief Jobs previously performed in the config-version of the constructor, read settings etc.
  63. * @author Alexander Freytag
  64. * @date 09-02-2014 ( dd-mm-yyyy )
  65. */
  66. virtual void initFromConfig ( const NICE::Config * _conf, const std::string & _confSection = "LocalFeatureOpponnentSift");
  67. ///////////////////// ///////////////////// /////////////////////
  68. // FEATURE STUFF
  69. ///////////////////// ///////////////////// //////////////////
  70. /**
  71. * get the descriptor
  72. * @param img input image
  73. * @param positions positions for the SIFT features
  74. * @param descriptors output
  75. * @return 0
  76. */
  77. int getDescriptors ( const NICE::ColorImage & cimg, NICE::VVector & positions, NICE::VVector & descriptors ) const;
  78. ///////////////////// INTERFACE PERSISTENT /////////////////////
  79. // interface specific methods for store and restore
  80. ///////////////////// INTERFACE PERSISTENT /////////////////////
  81. /**
  82. * @brief Load object from external file (stream)
  83. * @author Alexander Freytag
  84. * @date 09-02-2014 ( dd-mmyyyy)
  85. */
  86. virtual void restore ( std::istream & is, int format = 0 );
  87. /**
  88. * @brief Save object to external file (stream)
  89. * @author Alexander Freytag
  90. * @date 09-02-2014 ( dd-mmyyyy)
  91. */
  92. virtual void store( std::ostream & os, int format = 0 ) const;
  93. /**
  94. * @brief Clear object
  95. * @author Alexander Freytag
  96. * @date 09-02-2014 ( dd-mmyyyy)
  97. */
  98. virtual void clear ();
  99. };
  100. } // namespace
  101. #endif