MoveIt Pro API
Core Behaviors for MoveIt Pro
Loading...
Searching...
No Matches
get_masks_2d_from_exemplar.cpp File Reference
#include <moveit_pro_behavior/behaviors/vision/get_masks_2d_from_exemplar.hpp>
#include <fmt/format.h>
#include <algorithm>
#include <moveit_pro_behavior_interface/get_required_ports.hpp>
#include <moveit_pro_behavior_interface/metadata_fields.hpp>
#include <moveit_pro_ml/mask_utils.hpp>
#include <moveit_pro_ml/onnx_sam3_detect.hpp>
#include <moveit_pro_ml_ros/onnx_utils.hpp>
#include <moveit_studio_common/utils/filesystem_utils.hpp>
#include <moveit_studio_vision/cv_bridge.hpp>
#include <opencv2/opencv.hpp>
Include dependency graph for get_masks_2d_from_exemplar.cpp:

Namespaces

namespace  moveit_pro
 
namespace  moveit_pro::behaviors
 

Typedefs

using moveit_pro::behaviors::NchwTensor = moveit_pro_ml::onnx::Tensor< float, moveit_pro_ml::onnx::tensor_format::NCHW >
 

Functions

tl::expected< cv::Mat, std::string > moveit_pro::behaviors::resizeExemplar (const cv::Mat &exemplar, int target_height)
 Resize exemplar image maintaining aspect ratio to match target height.
 
std::vector< NormalizedBoxmoveit_pro::behaviors::combineBboxes (const std::vector< vision_msgs::msg::BoundingBox2D > &target_bboxes, const std::vector< vision_msgs::msg::BoundingBox2D > &exemplar_bboxes, const CombinedImageResult &combined_result)
 Rescale, offset, and normalize all bounding boxes into a single prompt vector.
 
tl::expected< PostProcessResult, std::string > moveit_pro::behaviors::postProcessMasks (const moveit_pro_ml::SAM3Detect::Result &prediction, const CombinedImageResult &combined_image, const std_msgs::msg::Header &image_header)
 Convert SAM3 output masks to ROS messages and format scores.