/** * @file RSCache.h * @brief read and save the RegionSegmentation * @author Björn Fröhlich * @date 05/07/2009 */ #ifndef RSCACHE #define RSCACHE #include "core/basics/Config.h" #include "RegionSegmentationMethod.h" namespace OBJREC { class RSCache: public RegionSegmentationMethod { protected: //! the RegionSegmentation method RegionSegmentationMethod *rsmethod; //! where to save or to load the caches data std::string cachedir; //! just write features, don't read them bool forcedwrite; public: /** simple constructor */ RSCache ( const NICE::Config *conf, RegionSegmentationMethod *_rsmethod ); /** simple destructor */ ~RSCache(); /** * 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 colorimage * @param mask output regions, each region has it own number * @return count of region */ virtual int segRegions ( const NICE::ColorImage & cimg, NICE::Matrix & mask ) const; }; } // namespace #endif