10 #define __SEGMMODULE__
15 #include <yarp/os/all.h>
16 #include <yarp/sig/all.h>
17 #include <yarp/os/RFModule.h>
18 #include <yarp/os/ResourceFinder.h>
19 #include <yarp/os/Stamp.h>
29 #include "SegmentationModuleInterface.h"
46 yarp::os::BufferedPort<yarp::sig::ImageOf<yarp::sig::PixelRgb> > _imgPort;
48 yarp::os::BufferedPort<yarp::sig::ImageOf<yarp::sig::PixelRgb> > _viewPort;
51 yarp::os::Port _configPort;
54 yarp::os::Stamp _stamp;
60 virtual bool configure (yarp::os::ResourceFinder &rf);
63 virtual bool interruptModule();
64 virtual bool updateModule();
66 bool attach(yarp::os::Port &source)
68 return this->yarp().attachAsServer(source);
72 virtual void set_sigma(
const double newValue);
73 virtual void set_k(
const double newValue);
76 virtual double get_k();
virtual std::vector< yarp::sig::Pixel > get_component_around(const yarp::sig::Pixel &objCenter)
Get the list of pixels corresponding to the component to which a given pixel belongs.
virtual void set_k(const double newValue)
Set k (scale factor for boundary-detection threshold function) parameter for the algorithm.
virtual double get_minRegion()
Get minRegion parameter for the algorithm, i.e., the minimum size of any segmented component.
virtual void set_sigma(const double newValue)
Set sigma (smoothing) parameter for the algorithm.
virtual double get_k()
Get k (scale factor for boundary-detection threshold function) parameter for the algorithm.
virtual int32_t get_num_components()
Get the number of segmented components that have been detected in the last provided image.
virtual void set_minRegion(const double newValue)
Set minRegion parameter for the algorithm, i.e., the minimum size of any segmented component.
virtual double get_sigma()
Get sigma (smoothing) parameter for the algorithm.
Pixel position in the image frame.
Interface for module that performs graph-based segmentation.