FeatureLearningGeneric.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /**
  2. * @file FeatureLearningGeneric.h
  3. * @brief abstract interface for feature learning algorithms
  4. * @author Alexander Freytag
  5. * @date 16-04-2013 (dd-mm-yyyy)
  6. */
  7. #ifndef _INCLUDEFEATURELEARNING
  8. #define _INCLUDEFEATURELEARNING
  9. #define ROADWORKS fthrow(NICE::Exception, "Feature Learning -- not yet implemented!");
  10. #include <string>
  11. #include <core/basics/Config.h>
  12. #include <vislearning/cbaselib/CachedExample.h>
  13. namespace OBJREC
  14. {
  15. /** abstract interface for feature learning algorithms */
  16. class FeatureLearningGeneric
  17. {
  18. protected:
  19. //! Configuration File
  20. const NICE::Config *conf;
  21. public:
  22. /** simple constructor
  23. @param conf global settings
  24. */
  25. FeatureLearningGeneric ( const NICE::Config *_conf );
  26. /** simple destructor */
  27. virtual ~FeatureLearningGeneric();
  28. //TODO possibly move this to protected...
  29. /** this function has to be overloaded by all subclasses
  30. @param imgWithNovelContent
  31. */
  32. virtual void learnNewFeatures ( OBJREC::CachedExample *_ce ) = 0;
  33. virtual void learnNewFeatures ( const std::string & _filename );
  34. virtual void evaluateCurrentCodebook ( const std::string & filename ) = 0;
  35. };
  36. } // namespace
  37. #endif