Skip to main content

DilateMask2D Class

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

Declaration

class moveit_pro::behaviors::DilateMask2D { ... }

Included Headers

#include <dilate_mask2d.hpp>

Base class

classSharedResourcesNode<BehaviorTreeNodeT>

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

Public Constructors Index

DilateMask2D (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 dilation to a vector of 2D masks.

This behavior applies OpenCV's morphological dilation to each Mask2D in the input vector using a square structuring element. Each output pixel is set to the maximum value of all pixels under the kernel in the input, so any background pixel that touches a white pixel within the kernel radius becomes white. This expands white (non-zero) regions, which is useful for filling small holes, connecting nearby regions, and making mask boundaries more inclusive.

Data Port NamePort TypeObject Type
masksInputstd::vector<moveit_studio_vision_msgs::msg::Mask2D>
kernel_sizeInputint
iterationsInputint
dilated_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 dilate_mask2d.hpp.

Public Constructors

DilateMask2D()

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

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

Public Member Functions

tick()

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

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

Public Static Functions

metadata()

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

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

providedPorts()

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

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


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.