123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- /**
- * @file RSGraphBased.h
- * @brief fast Segmentation Method based on Felzenszwalb2004
- * @author Björn Fröhlich, Alexander Freytag
- * @date 02/22/2010
- */
- #ifndef RSGraphBasedINCLUDE
- #define RSGraphBasedINCLUDE
- #include "core/basics/Config.h"
- #include "RegionSegmentationMethod.h"
- namespace OBJREC {
- class RSGraphBased: public RegionSegmentationMethod
- {
- protected:
-
- /////////////////////////
- /////////////////////////
- // PROTECTED VARIABLES //
- /////////////////////////
- /////////////////////////
-
- double parameter_k;
-
- int parameter_min_size;
-
- double parameter_sigma;
- public:
-
- ///////////////////// ///////////////////// /////////////////////
- // CONSTRUCTORS / DESTRUCTORS
- ///////////////////// ///////////////////// /////////////////////
-
- /** default constructor */
- RSGraphBased();
- /**
- * standard constructor
- * @param conf config file
- */
- RSGraphBased( const NICE::Config * _conf );
- /** simple destructor */
- virtual ~RSGraphBased();
-
- /**
- * @brief Setup internal variables and objects used
- * @author Alexander Freytag
- * @param conf Config file to specify variable settings
- * @param s_confSection
- * @date 08-02-2014 ( dd-mm-yyyy )
- */
- virtual void initFromConfig ( const NICE::Config * _conf, const std::string & _confSection = "RSGraphBased" );
- ///////////////////// ///////////////////// /////////////////////
- // SEGMENTATION STUFF
- ///////////////////// ///////////////////// //////////////////
-
- /**
- * returns the regions of a given image
- * @param img input image
- * @param mask output regions, each region has it own number
- * @return count of region
- */
- virtual int segRegions ( const NICE::Image & img, NICE::Matrix & mask ) const;
- /**
- * returns the regions of a given image
- * @param img input color image
- * @param mask output regions, each region has it own number
- * @return count of region
- */
- virtual int segRegions ( const NICE::ColorImage & img, NICE::Matrix & mask) const;
-
- ///////////////////// INTERFACE PERSISTENT /////////////////////
- // interface specific methods for store and restore
- ///////////////////// INTERFACE PERSISTENT /////////////////////
-
- /**
- * @brief Load object from external file (stream)
- * @author Alexander Freytag
- * @date 08-02-2014 ( dd-mm-yyyy )
- */
- void restore ( std::istream & is, int format = 0 );
-
- /**
- * @brief Save object to external file (stream)
- * @author Alexander Freytag
- * @date 08-02-2014 ( dd-mm-yyyy )
- */
- void store ( std::ostream & os, int format = 0 ) const;
-
- /**
- * @brief Clear object
- * @author Alexander Freytag
- * @date 08-02-2014 ( dd-mm-yyyy )
- */
- void clear ();
- };
- } //namespace
- #endif
|