RFBoVCodebook.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /**
  2. * @file RFBoVCodebook.h
  3. * @brief Bag of Visual Words with an local feature
  4. * @author Björn Fröhlich
  5. * @date 02-11-2010
  6. */
  7. #ifndef RFBoVCodebookINCLUDE
  8. #define RFBoVCodebookINCLUDE
  9. #include <vislearning/nice.h>
  10. #include "core/basics/Config.h"
  11. #include "vislearning/cbaselib/LabeledSet.h"
  12. #include "vislearning/segmentation/RegionGraph.h"
  13. #include "vislearning/features/localfeatures/LocalFeature.h"
  14. #include "vislearning/math/ftransform/PCA.h"
  15. #include "vislearning/math/cluster/GMM.h"
  16. #include "vislearning/features/regionfeatures/RegionFeatures.h"
  17. #include "vislearning/features/regionfeatures/RFBoV.h"
  18. #include "vislearning/features/simplefeatures/Codebook.h"
  19. namespace OBJREC {
  20. class RFBoVCodebook : public RFBoV
  21. {
  22. protected:
  23. //! codebook
  24. Codebook *cb;
  25. public:
  26. /** simple constructor */
  27. RFBoVCodebook( const NICE::Config *_conf, LocalFeature *_lf );
  28. /** simple destructor */
  29. virtual ~RFBoVCodebook();
  30. /**
  31. * set the codebook
  32. * @param _cb codebook
  33. */
  34. void setCodebook(Codebook *_cb);
  35. /**
  36. * bags the features for each region
  37. * @param mask region mask
  38. * @param rg region graph
  39. * @param infeats input features for image
  40. * @param outfeats output features for regions
  41. * @param positions positions of the input features
  42. */
  43. void convert(const NICE::Matrix &mask, const RegionGraph &rg, NICE::VVector &infeats, NICE::VVector &outfeats, NICE::VVector
  44. &positions);
  45. };
  46. } // namespace
  47. #endif