FeatureLearningClusterBased.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /**
  2. * @file FeatureLearningClusterBased.h
  3. * @brief compute new histogram entries by clustering new features and take centers of clusters which are relevant and novel
  4. * @author Alexander Freytag
  5. * @date 16-04-2013 (dd-mm-yyyy)
  6. */
  7. #ifndef _INCLUDEFEATURELEARNINGCLUSTERBASED
  8. #define _INCLUDEFEATURELEARNINGCLUSTERBASED
  9. #include "FeatureLearningPrototypes.h"
  10. #include <string>
  11. namespace OBJREC
  12. {
  13. /**
  14. * @class FeatureLearningClusterBased
  15. * @brief compute new histogram entries by clustering new features and take centers of clusters which are relevant and novel
  16. * @author Alexander Freytag
  17. * @date 16-04-2013 (dd-mm-yyyy)
  18. */
  19. class FeatureLearningClusterBased : public FeatureLearningPrototypes
  20. {
  21. protected:
  22. /************************
  23. *
  24. * protected variables
  25. *
  26. **************************/
  27. //! define the number of clusters we want to compute for an unseen image
  28. int numberOfClustersForNewImage;
  29. /************************
  30. *
  31. * protected methods
  32. *
  33. **************************/
  34. void setClusterAlgo( const std::string & _clusterAlgoString, const bool & _setForInitialTraining);
  35. public:
  36. /** constructor
  37. * @param _conf needs a configfile
  38. * @param _md and a MultiDataset (contains images and other things)
  39. */
  40. FeatureLearningClusterBased ( const NICE::Config *_conf, const OBJREC::MultiDataset *_md , const std::string & _section = "featureLearning");
  41. /** simple destructor */
  42. virtual ~FeatureLearningClusterBased();
  43. /** this function has to be overloaded by all subclasses
  44. @param imgWithNovelContent
  45. */
  46. virtual void learnNewFeatures ( const std::string & filename ) ;
  47. };
  48. } // namespace
  49. #endif