MoveIt Pro API
Core Behaviors for MoveIt Pro
Loading...
Searching...
No Matches
moveit_pro::behaviors::ErodeMask2D Class Referencefinal

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

#include <erode_mask2d.hpp>

Inheritance diagram for moveit_pro::behaviors::ErodeMask2D:
Collaboration diagram for moveit_pro::behaviors::ErodeMask2D:

Public Member Functions

 ErodeMask2D (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< moveit_pro::behaviors::BehaviorContext > &shared_resources)
 
BT::NodeStatus tick () override
 
- Public Member Functions inherited from moveit_pro::behaviors::SharedResourcesNode< BT::SyncActionNode >
 SharedResourcesNode (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)
 Constructor for SharedResourcesNode. Called by BT::BehaviorTreeFactory when creating a new behavior tree containing this node.
 

Static Public Member Functions

static BT::PortsList providedPorts ()
 
static BT::KeyValueVector metadata ()
 

Additional Inherited Members

- Protected Attributes inherited from moveit_pro::behaviors::SharedResourcesNode< BT::SyncActionNode >
std::shared_ptr< BehaviorContextshared_resources_
 

Detailed 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 Name Port Type Object Type
masks Input std::vector<moveit_studio_vision_msgs::msg::Mask2D>
kernel_size Input int
iterations Input int
eroded_masks Output std::vector<moveit_studio_vision_msgs::msg::Mask2D>
See also
https://docs.opencv.org/3.4/db/df6/tutorial_erosion_dilatation.html

Constructor & Destructor Documentation

◆ ErodeMask2D()

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

Member Function Documentation

◆ metadata()

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

◆ providedPorts()

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

◆ tick()

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

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