MoveIt Pro API
Core Behaviors for MoveIt Pro
Loading...
Searching...
No Matches
get_masks_2d_from_exemplar.hpp File Reference
#include <filesystem>
#include <future>
#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include <vector>
#include <moveit_pro_behavior_interface/async_behavior_base.hpp>
#include <moveit_pro_ml/onnx_sam3_detect.hpp>
#include <moveit_pro_ml/onnx_types.hpp>
#include <moveit_studio_vision_msgs/msg/mask2_d.hpp>
#include <opencv2/core/mat.hpp>
#include <sensor_msgs/msg/image.hpp>
#include <std_msgs/msg/header.hpp>
#include <tl_expected/expected.hpp>
#include <vision_msgs/msg/bounding_box2_d.hpp>
Include dependency graph for get_masks_2d_from_exemplar.hpp:
This graph shows which files directly or indirectly include this file:

Classes

struct  moveit_pro::behaviors::ExemplarInfo
 Exemplar-specific metadata captured before resize; present only when an exemplar was provided. More...
 
struct  moveit_pro::behaviors::CombinedImageResult
 Result of building the combined inference image (target alone, or target+exemplar side-by-side). More...
 
struct  moveit_pro::behaviors::PostProcessResult
 Outputs produced by post-processing SAM3 masks. More...
 
struct  moveit_pro::behaviors::GetMasks2DFromExemplar
 Segment an image using SAM3 with multimodal prompts. More...
 
struct  moveit_pro::behaviors::GetMasks2DFromExemplar::InferenceHandle
 Interface for SAM3 segmentation inference. More...
 
struct  moveit_pro::behaviors::GetMasks2DFromExemplar::SAM3DetectHandle
 Default implementation using SAM3Detect. More...
 

Namespaces

namespace  moveit_pro
 
namespace  moveit_pro::behaviors
 

Typedefs

using moveit_pro::behaviors::NormalizedBox = moveit_pro_ml::onnx::Box< moveit_pro_ml::onnx::box_format::CXCYWH, moveit_pro_ml::onnx::coord_system::Normalized >
 Normalized CXCYWH box in SAM3 inference coordinate space.
 

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.