LocalFeature.cpp 904 B

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