RobotsIO
|
Public Member Functions | |
SegmentationYarpPort (const std::string &port_prefix, const bool &provide_rgb) | |
bool | reset () override |
bool | is_stepping_required () const override |
int | get_frames_between_iterations () const override |
std::pair< bool, cv::Mat > | segmentation (const bool &blocking) override |
std::pair< bool, cv::Mat > | latest_segmentation () override |
virtual double | get_time_stamp () override |
virtual void | set_rgb_image (const cv::Mat &image, const double ×tamp) override |
Public Member Functions inherited from RobotsIO::Utils::Segmentation | |
virtual bool | reset () |
virtual bool | step_frame () |
virtual bool | is_stepping_required () const =0 |
virtual void | reset_data_loading_time () |
virtual double | get_data_loading_time () const |
virtual int | get_frames_between_iterations () const |
virtual std::pair< bool, cv::Mat > | segmentation (const bool &blocking)=0 |
virtual std::pair< bool, cv::Mat > | latest_segmentation () |
virtual double | get_time_stamp () |
virtual void | set_rgb_image (const cv::Mat &image, const double ×tamp) |
Definition at line 23 of file SegmentationYarpPort.h.
SegmentationYarpPort::SegmentationYarpPort | ( | const std::string & | port_prefix, |
const bool & | provide_rgb | ||
) |
Initialize a Segmentation instance which uses YARP ports to receive segmentation masks and (optionally) provide RGB images to the segmentation module.
Required port names are composed as <port_prefix>/segmentation:i and <port_prefix>/rgb:o.
Definition at line 17 of file SegmentationYarpPort.cpp.
|
virtual |
Definition at line 24 of file SegmentationYarpPort.cpp.
|
overridevirtual |
N > 1 indicates that the segmentation is available every N frames N = 1 indicates that the segmentation is available at all frames N < 1 indicates that this information is not available
By default, this method returns N = 1. User might override this setting by re-implementing this method.
Reimplemented from RobotsIO::Utils::Segmentation.
Definition at line 42 of file SegmentationYarpPort.cpp.
|
overridevirtual |
Provide the timestamp of the latest valid segmentation that has been received.
By default, this return -1. User might override this method if required.
Reimplemented from RobotsIO::Utils::Segmentation.
Definition at line 75 of file SegmentationYarpPort.cpp.
|
overridevirtual |
Implements RobotsIO::Utils::Segmentation.
Definition at line 36 of file SegmentationYarpPort.cpp.
|
overridevirtual |
Provide the latest valid segmentation mask that has been received.
By default, this return (false, cv::Mat()). User might override this method if required.
Reimplemented from RobotsIO::Utils::Segmentation.
Definition at line 66 of file SegmentationYarpPort.cpp.
|
overridevirtual |
Reimplemented from RobotsIO::Utils::Segmentation.
Definition at line 28 of file SegmentationYarpPort.cpp.
|
overridevirtual |
Provide a new segmentation mask.
Implements RobotsIO::Utils::Segmentation.
Definition at line 48 of file SegmentationYarpPort.cpp.
|
overridevirtual |
If required, the user might override this method to set the RGB image on which the segmentation has to be evaluated.
Reimplemented from RobotsIO::Utils::Segmentation.
Definition at line 81 of file SegmentationYarpPort.cpp.