Interface for module that performs graph-based segmentation.
More...
#include <SegmentationModuleInterface.h>
|
virtual void | set_sigma (const double newValue) |
| Set sigma (smoothing) parameter for the algorithm. More...
|
|
virtual void | set_k (const double newValue) |
| Set k (scale factor for boundary-detection threshold function) parameter for the algorithm. More...
|
|
virtual void | set_minRegion (const double newValue) |
| Set minRegion parameter for the algorithm, i.e., the minimum size of any segmented component. More...
|
|
virtual double | get_sigma () |
| Get sigma (smoothing) parameter for the algorithm. More...
|
|
virtual double | get_k () |
| Get k (scale factor for boundary-detection threshold function) parameter for the algorithm. More...
|
|
virtual double | get_minRegion () |
| Get minRegion parameter for the algorithm, i.e., the minimum size of any segmented component. More...
|
|
virtual std::int32_t | get_num_components () |
| Get the number of segmented components that have been detected in the last provided image. More...
|
|
virtual std::vector< Pixel > | get_component_around (const Pixel &objCenter) |
| Get the list of pixels corresponding to the component to which a given pixel belongs. More...
|
|
virtual std::vector< std::string > | help (const std::string &functionName="--all") |
|
bool | read (yarp::os::ConnectionReader &connection) override |
|
Interface for module that performs graph-based segmentation.
Definition at line 27 of file SegmentationModuleInterface.h.
◆ get_component_around()
std::vector< Pixel > yarp::sig::SegmentationModuleInterface::get_component_around |
( |
const Pixel & |
objCenter | ) |
|
|
virtual |
Get the list of pixels corresponding to the component to which a given pixel belongs.
- Parameters
-
objCenter | a pixel belonging to the region of interest |
- Returns
- list of pixels belonging to the same component as the input pixels
Reimplemented in GBSegmModule.
Definition at line 442 of file SegmentationModuleInterface.cpp.
444 SegmentationModuleInterface_get_component_around_helper helper{objCenter};
445 if (!yarp().canWrite()) {
446 yError(
"Missing server method '%s'?",
"std::vector<Pixel> SegmentationModuleInterface::get_component_around(const Pixel& objCenter)");
448 bool ok = yarp().write(helper, helper);
449 return ok ? SegmentationModuleInterface_get_component_around_helper::s_return_helper : std::vector<Pixel>{};
◆ get_k()
double yarp::sig::SegmentationModuleInterface::get_k |
( |
| ) |
|
|
virtual |
Get k (scale factor for boundary-detection threshold function) parameter for the algorithm.
- Returns
- current value for k parameter
Reimplemented in GBSegmModule.
Definition at line 412 of file SegmentationModuleInterface.cpp.
414 SegmentationModuleInterface_get_k_helper helper{};
415 if (!yarp().canWrite()) {
416 yError(
"Missing server method '%s'?",
"double SegmentationModuleInterface::get_k()");
418 bool ok = yarp().write(helper, helper);
419 return ok ? SegmentationModuleInterface_get_k_helper::s_return_helper :
double{};
◆ get_minRegion()
double yarp::sig::SegmentationModuleInterface::get_minRegion |
( |
| ) |
|
|
virtual |
Get minRegion parameter for the algorithm, i.e., the minimum size of any segmented component.
- Returns
- current value for minRegion parameter
Reimplemented in GBSegmModule.
Definition at line 422 of file SegmentationModuleInterface.cpp.
424 SegmentationModuleInterface_get_minRegion_helper helper{};
425 if (!yarp().canWrite()) {
426 yError(
"Missing server method '%s'?",
"double SegmentationModuleInterface::get_minRegion()");
428 bool ok = yarp().write(helper, helper);
429 return ok ? SegmentationModuleInterface_get_minRegion_helper::s_return_helper :
double{};
◆ get_num_components()
std::int32_t yarp::sig::SegmentationModuleInterface::get_num_components |
( |
| ) |
|
|
virtual |
Get the number of segmented components that have been detected in the last provided image.
- Returns
- number of segmented components
Reimplemented in GBSegmModule.
Definition at line 432 of file SegmentationModuleInterface.cpp.
434 SegmentationModuleInterface_get_num_components_helper helper{};
435 if (!yarp().canWrite()) {
436 yError(
"Missing server method '%s'?",
"std::int32_t SegmentationModuleInterface::get_num_components()");
438 bool ok = yarp().write(helper, helper);
439 return ok ? SegmentationModuleInterface_get_num_components_helper::s_return_helper : std::int32_t{};
◆ get_sigma()
double yarp::sig::SegmentationModuleInterface::get_sigma |
( |
| ) |
|
|
virtual |
Get sigma (smoothing) parameter for the algorithm.
- Returns
- current value for sigma parameter
Reimplemented in GBSegmModule.
Definition at line 402 of file SegmentationModuleInterface.cpp.
404 SegmentationModuleInterface_get_sigma_helper helper{};
405 if (!yarp().canWrite()) {
406 yError(
"Missing server method '%s'?",
"double SegmentationModuleInterface::get_sigma()");
408 bool ok = yarp().write(helper, helper);
409 return ok ? SegmentationModuleInterface_get_sigma_helper::s_return_helper :
double{};
◆ set_k()
void yarp::sig::SegmentationModuleInterface::set_k |
( |
const double |
newValue | ) |
|
|
virtual |
Set k (scale factor for boundary-detection threshold function) parameter for the algorithm.
- Parameters
-
newValue | new value for k parameter |
Reimplemented in GBSegmModule.
Definition at line 384 of file SegmentationModuleInterface.cpp.
386 SegmentationModuleInterface_set_k_helper helper{newValue};
387 if (!yarp().canWrite()) {
388 yError(
"Missing server method '%s'?",
"void SegmentationModuleInterface::set_k(const double newValue)");
390 yarp().write(helper, helper);
◆ set_minRegion()
void yarp::sig::SegmentationModuleInterface::set_minRegion |
( |
const double |
newValue | ) |
|
|
virtual |
Set minRegion parameter for the algorithm, i.e., the minimum size of any segmented component.
- Parameters
-
newValue | new value for minRegion parameter |
Reimplemented in GBSegmModule.
Definition at line 393 of file SegmentationModuleInterface.cpp.
395 SegmentationModuleInterface_set_minRegion_helper helper{newValue};
396 if (!yarp().canWrite()) {
397 yError(
"Missing server method '%s'?",
"void SegmentationModuleInterface::set_minRegion(const double newValue)");
399 yarp().write(helper, helper);
◆ set_sigma()
void yarp::sig::SegmentationModuleInterface::set_sigma |
( |
const double |
newValue | ) |
|
|
virtual |
Set sigma (smoothing) parameter for the algorithm.
- Parameters
-
newValue | new value for sigma parameter |
Reimplemented in GBSegmModule.
Definition at line 375 of file SegmentationModuleInterface.cpp.
377 SegmentationModuleInterface_set_sigma_helper helper{newValue};
378 if (!yarp().canWrite()) {
379 yError(
"Missing server method '%s'?",
"void SegmentationModuleInterface::set_sigma(const double newValue)");
381 yarp().write(helper, helper);
The documentation for this class was generated from the following files: