LocalFeature.cpp 874 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /**
  2. * @file LocalFeature.cpp
  3. * @brief local feature interface
  4. * @author Erik Rodner
  5. * @date 02/05/2008
  6. */
  7. #include "core/image/Convert.h"
  8. #include <iostream>
  9. #include "vislearning/features/localfeatures/LocalFeature.h"
  10. using namespace OBJREC;
  11. using namespace std;
  12. using namespace NICE;
  13. LocalFeature::LocalFeature()
  14. {
  15. }
  16. LocalFeature::~LocalFeature()
  17. {
  18. }
  19. void LocalFeature::visualizeFeatures ( NICE::Image & mark,
  20. const VVector & positions,
  21. size_t color ) const
  22. {
  23. fprintf (stderr, "LocalFeature::visualizeFeatures: not yet implemented\n");
  24. exit(-1);
  25. }
  26. int LocalFeature::getDescriptors ( const NICE::ColorImage & cimg, VVector & positions, VVector & descriptors) const
  27. {
  28. cerr << "this local feature is not a color descriptor - using grayimage instead" << endl;
  29. Image img;
  30. rgbToGray(cimg, &img);
  31. return getDescriptors(img, positions, descriptors);
  32. }