InterestDetector.cpp 604 B

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * @file InterestDetector.cpp
  3. * @brief interest detector interface
  4. * @author Erik Rodner
  5. * @date 02/05/2008
  6. */
  7. #include <iostream>
  8. #include "vislearning/features/localfeatures/InterestDetector.h"
  9. using namespace OBJREC;
  10. using namespace std;
  11. using namespace NICE;
  12. InterestDetector::InterestDetector()
  13. {
  14. }
  15. InterestDetector::~InterestDetector()
  16. {
  17. }
  18. void InterestDetector::reducePositionsRandom(
  19. std::vector<NICE::Vector> & positions, size_t numsamples) const
  20. {
  21. while(positions.size()> numsamples)
  22. {
  23. size_t pos = rand() % positions.size();
  24. positions.erase(positions.begin()+pos);
  25. }
  26. }