RSSlic.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /**
  2. * @file RSSlic.h
  3. * @brief SLIC Superpixels from "SLIC Superpixels Compared to State-of-the-art Superpixel Methods,"
  4. * @author Björn Fröhlich
  5. * @date 02/02/2013
  6. */
  7. #ifndef RSSlicINCLUDE
  8. #define RSSlicINCLUDE
  9. #include "core/basics/Config.h"
  10. #include "RegionSegmentationMethod.h"
  11. namespace OBJREC {
  12. class RSSlic: public RegionSegmentationMethod
  13. {
  14. protected:
  15. int spcount; //number of regions
  16. double compactness; //value between 0 and 40
  17. int regionsize; //average size of each region
  18. bool lab; //use lab space or not
  19. public:
  20. /** simple constructor */
  21. RSSlic();
  22. /** simple constructor */
  23. RSSlic(double t);
  24. /**
  25. * standard constructor
  26. * @param conf config file
  27. */
  28. RSSlic(const NICE::Config *conf );
  29. /** simple destructor */
  30. ~RSSlic();
  31. /**
  32. * returns the regions of a given image
  33. * @param img input image
  34. * @param mask output regions, each region has it own number
  35. * @return count of region
  36. */
  37. virtual int segRegions ( const NICE::Image & img, NICE::Matrix & mask ) const;
  38. /**
  39. * returns the regions of a given image
  40. * @param img input color image
  41. * @param mask output regions, each region has it own number
  42. * @return count of region
  43. */
  44. virtual int segRegions ( const NICE::ColorImage & img, NICE::Matrix & mask) const;
  45. };
  46. } //namespace
  47. #endif