NoveltyDetector.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /**
  2. * @file NoveltyDetector.h
  3. * @brief abstract interface for novelty detection algorithms
  4. * @author Alexander Freytag
  5. * @date 02-05-2013 (dd-mm-yyyy)
  6. */
  7. #ifndef _INCLUDENOVELTYDETECTOR
  8. #define _INCLUDENOVELTYDETECTOR
  9. #define ROADWORKSNOVDET fthrow(NICE::Exception, "Novelty Detector -- not yet implemented!");
  10. // STL
  11. #include <string>
  12. //core
  13. #include <core/basics/Config.h>
  14. namespace OBJREC
  15. {
  16. /**
  17. * @class NoveltyDetector
  18. * @brief abstract interface for novelty detection algorithms
  19. * @author Alexander Freytag
  20. * @date 02-05-2013 (dd-mm-yyyy)
  21. */
  22. class NoveltyDetector
  23. {
  24. protected:
  25. /************************
  26. *
  27. * protected variables
  28. *
  29. **************************/
  30. //! section information for parsing config files
  31. std::string section;
  32. //! Configuration File
  33. const NICE::Config *conf;
  34. /************************
  35. *
  36. * protected methods
  37. *
  38. **************************/
  39. public:
  40. /**
  41. * @brief simple constructor
  42. * @author Alexander Freytag
  43. * @date 02-05-2013 (dd-mm-yyyy)
  44. * @param _conf global settings
  45. * @param _section section information for parsing config files
  46. */
  47. NoveltyDetector ( const NICE::Config *_conf, const std::string & _section = "noveltyDetector" );
  48. /** simple destructor */
  49. virtual ~NoveltyDetector();
  50. /**
  51. * @brief Evaluate whether or not the image of the specified filename is novel with respect to the current known examples or not
  52. * @author Alexander Freytag
  53. * @date 02-05-2013 (dd-mm-yyyy)
  54. * @param _filename of the new image
  55. * @return bool (true: class/content/... of image is novel, false: class/content/... of image is known)
  56. * @note This function has to be overloaded by all subclasses!
  57. */
  58. virtual bool evaluateNoveltyOfImage ( const std::string & _filename) = 0;
  59. };
  60. } // namespace
  61. #endif