Skip to main content

ErodeMask2D Class

Apply morphological erosion to a vector of 2D masks. More...

Declaration

class moveit_pro::behaviors::ErodeMask2D { ... }

Included Headers

#include <erode_mask2d.hpp>

Base class

classSharedResourcesNode<BehaviorTreeNodeT>

The SharedResourcesNode class provides a BehaviorContext object when constructing a BehaviorTree.Cpp node. More...

Public Constructors Index

ErodeMask2D (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< moveit_pro::behaviors::BehaviorContext > &shared_resources)

Public Member Functions Index

BT::NodeStatustick () override

Public Static Functions Index

static BT::PortsListprovidedPorts ()
static BT::KeyValueVectormetadata ()

Description

Apply morphological erosion to a vector of 2D masks.

This behavior applies OpenCV's morphological erosion to each Mask2D in the input vector using a square structuring element. Each output pixel is set to the minimum value of all pixels under the kernel in the input, so any white pixel that touches background within the kernel radius is removed. This shrinks white (non-zero) regions, which is useful for removing small noise artifacts and separating touching objects.

Data Port NamePort TypeObject Type
masksInputstd::vector<moveit_studio_vision_msgs::msg::Mask2D>
kernel_sizeInputint
iterationsInputint
eroded_masksOutputstd::vector<moveit_studio_vision_msgs::msg::Mask2D>
See Also

https://docs.opencv.org/3.4/db/df6/tutorial_erosion_dilatation.html

Definition at line 36 of file erode_mask2d.hpp.

Public Constructors

ErodeMask2D()

moveit_pro::behaviors::ErodeMask2D::ErodeMask2D (const std::string & name, const BT::NodeConfiguration & config, const std::shared_ptr< moveit_pro::behaviors::BehaviorContext > & shared_resources)

Declaration at line 39 of file erode_mask2d.hpp, definition at line 28 of file erode_mask2d.cpp.

Public Member Functions

tick()

BT::NodeStatus moveit_pro::behaviors::ErodeMask2D::tick ()

Declaration at line 46 of file erode_mask2d.hpp, definition at line 49 of file erode_mask2d.cpp.

Public Static Functions

metadata()

BT::KeyValueVector moveit_pro::behaviors::ErodeMask2D::metadata ()
static

Declaration at line 44 of file erode_mask2d.hpp, definition at line 74 of file erode_mask2d.cpp.

providedPorts()

BT::PortsList moveit_pro::behaviors::ErodeMask2D::providedPorts ()
static

Declaration at line 42 of file erode_mask2d.hpp, definition at line 34 of file erode_mask2d.cpp.


The documentation for this class was generated from the following files:


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.