PSSLocalizationPrior.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /**
  2. * @file PSSLocalizationPrior.h
  3. * @brief incorporate prior from localization results
  4. * @author Erik Rodner
  5. * @date 03/19/2009
  6. */
  7. #ifndef PSSLOCALIZATIONPRIORINCLUDE
  8. #define PSSLOCALIZATIONPRIORINCLUDE
  9. #ifdef NOVISUAL
  10. #include <objrec/nice_nonvis.h>
  11. #else
  12. #include <objrec/nice.h>
  13. #endif
  14. #include "objrec/cbaselib/LocalizationResult.h"
  15. #include "PostSemSeg.h"
  16. namespace OBJREC {
  17. /** incorporate prior from localization results */
  18. class PSSLocalizationPrior : public PostSemSeg
  19. {
  20. protected:
  21. int subsamplex;
  22. int subsampley;
  23. double alphaDetectionPrior;
  24. map<string, LocalizationResult *> detresults;
  25. // refactor-nice.pl: check this substitution
  26. // old: void loadDetectionResults ( const string & dir,
  27. void loadDetectionResults ( const std::string & dir,
  28. map<string, LocalizationResult *> & results,
  29. const ClassNames *classNames );
  30. public:
  31. /** simple constructor */
  32. // refactor-nice.pl: check this substitution
  33. // old: PSSLocalizationPrior( const string & detectiondir, const ClassNames *classNames,
  34. PSSLocalizationPrior( const std::string & detectiondir, const ClassNames *classNames,
  35. double alphaDetectionPrior, int subsamplex = 1, int subsampley = 1 );
  36. /** simple destructor */
  37. virtual ~PSSLocalizationPrior();
  38. // refactor-nice.pl: check this substitution
  39. // old: virtual void postprocess ( Image & result, GenericImage<double> & probabilities );
  40. virtual void postprocess ( NICE::Image & result, GenericImage<double> & probabilities );
  41. };
  42. } // namespace
  43. #endif