NegativeFactory.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /**
  2. * @file NegativeFactory.h
  3. * @brief obtain negative examples from some images
  4. * @author Erik Rodner
  5. * @date 11/13/2008
  6. */
  7. #ifndef NEGATIVEFACTORYINCLUDE
  8. #define NEGATIVEFACTORYINCLUDE
  9. #include "core/vector/VectorT.h"
  10. #include "core/vector/MatrixT.h"
  11. #include <vector>
  12. #include <string>
  13. #include "vislearning/cbaselib/LabeledSet.h"
  14. #include "core/vector/VVector.h"
  15. #include "vislearning/features/fpfeatures/ImageFeatures.h"
  16. #include "vislearning/classifier/classifierbase/FeaturePoolClassifier.h"
  17. namespace OBJREC {
  18. /** obtain negative examples from some images */
  19. class NegativeFactory
  20. {
  21. protected:
  22. public:
  23. /** simple constructor */
  24. NegativeFactory();
  25. /** simple destructor */
  26. virtual ~NegativeFactory();
  27. void createNegatives ( Examples & examples,
  28. std::vector<CachedExample *> & cexamples,
  29. const LabeledSet *ls,
  30. ImageFeatures & imgf,
  31. int noImages,
  32. int examplesPerImage,
  33. int negativeClassSRC,
  34. int negativeClassDST,
  35. FeaturePoolClassifier *fpc,
  36. double & falsePositiveEstimate,
  37. const NICE::VVector & bb);
  38. void createNegativesFromText ( Examples & examples,
  39. std::vector<CachedExample *> & cexamples,
  40. const std::string & filename,
  41. ImageFeatures & imgf,
  42. int negativeClassDST );
  43. void createNegativesExhaustiveSearch ( Examples & examples,
  44. std::vector<CachedExample *> & cexamples,
  45. const LabeledSet *ls,
  46. ImageFeatures & imgf,
  47. int examplesPerImage,
  48. int negativeClassSRC,
  49. int negativeClassDST,
  50. FeaturePoolClassifier *fpc,
  51. double & falsePositiveEstimate,
  52. const NICE::VVector & bb,
  53. int subsample );
  54. };
  55. } // namespace
  56. #endif