VCNormalize.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /**
  2. * @file VCNormalize.h
  3. // refactor-nice.pl: check this substitution
  4. // old: * @brief interface to Vector Transformation
  5. * @brief interface to NICE::Vector Transformation
  6. * @author Michael Koch
  7. * @date 11/28/2007
  8. */
  9. #ifndef VCNormalizeINCLUDE
  10. #define VCNormalizeINCLUDE
  11. #include "core/vector/VectorT.h"
  12. #include "core/vector/MatrixT.h"
  13. #include "vislearning/math/ftransform/FTransform.h"
  14. #include "vislearning/classifier/classifierbase/VecClassifier.h"
  15. namespace OBJREC
  16. {
  17. /** VC with Feature Transformation */
  18. class VCNormalize: public VecClassifier
  19. {
  20. protected:
  21. VecClassifier * classifier;
  22. LabeledSetVector transformedSet;
  23. uint mode;
  24. NICE::Vector vector_max;
  25. NICE::Vector vector_min;
  26. NICE::Vector vector_span;
  27. NICE::Vector getNormalizedVector(const NICE::Vector &x) const;
  28. public:
  29. /** simple constructor */
  30. VCNormalize(const NICE::Config *conf, VecClassifier * classifier);
  31. /** simple destructor */
  32. virtual ~VCNormalize();
  33. /** classify using simple vector */
  34. ClassificationResult classify(const NICE::Vector & x) const;
  35. void teach(const LabeledSetVector & teachSet);
  36. void finishTeaching();
  37. void restore(std::istream & is, int format = 0);
  38. void store(std::ostream & is, int format = 0) const;
  39. void clear();
  40. };
  41. } // namespace
  42. #endif