robokudo.annotators.object_hypothesis_visualizer¶
Object hypothesis visualization for RoboKudo.
This module provides an annotator for visualizing object hypotheses in both 2D (image overlays) and 3D (point clouds) representations.
Classes¶
Annotator for visualizing object hypotheses in the CAS. |
Module Contents¶
- class robokudo.annotators.object_hypothesis_visualizer.ObjectHypothesisVisualizer(name: str = 'ObjectHypothesisVisualizer', descriptor: ObjectHypothesisVisualizer = Descriptor())¶
-
Bases:
robokudo.annotators.core.BaseAnnotatorAnnotator for visualizing object hypotheses in the CAS.
This annotator creates visualizations of detected objects by:
Drawing bounding boxes and labels on the color image
Displaying associated point clouds in 3D
Optionally filtering objects based on query type
- class Descriptor¶
-
Bases:
robokudo.annotators.core.BaseAnnotator.DescriptorConfiguration descriptor for object hypothesis visualization.
- class Parameters¶
-
Parameters for configuring visualization behavior.
- query_aware: bool = True¶
-
If set to true, only visualize an Object that matches the ‘object.type’ from the Query.
- visualize_full_cloud: bool = False¶
-
If set to true, the scene cloud will be shown and the individual objects will be colored.
- parameters¶
- _mesh_cache: typing_extensions.Dict[typing_extensions.Tuple[object, Ellipsis], open3d.geometry.TriangleMesh]¶
- _iter_mesh_visuals(body: semantic_digital_twin.world_description.world_entity.Body) typing_extensions.List[semantic_digital_twin.world_description.geometry.Mesh]¶
-
Return mesh-based visual shapes for a body.
- _mesh_cache_key(shape: semantic_digital_twin.world_description.geometry.Mesh) typing_extensions.Tuple[object, Ellipsis]¶
-
Create a stable cache key for mesh conversion results.
- _mesh_shape_to_o3d(shape: semantic_digital_twin.world_description.geometry.Mesh) open3d.geometry.TriangleMesh¶
-
Convert a mesh shape to Open3D, cache the result, and apply its local origin.
- draw_text_middle(image: numpy.typing.NDArray[numpy.uint8], text: str, color: typing_extensions.Tuple[int, int, int] = (0, 0, 255), font: int = cv2.FONT_HERSHEY_SIMPLEX, font_scale: float = 1.0, thickness: int = 2)¶
-
Draw text in the middle of an image.
- Parameters:
-
image – Image to draw on
text – Text to draw
color – BGR color tuple
font – OpenCV font type, defaults to cv2.FONT_HERSHEY_SIMPLEX
font_scale – Font scale factor, defaults to 1
thickness – Line thickness, defaults to 2
- update() py_trees.common.Status¶
-
Update the visualization with current object hypotheses.
Creates visualizations containing:
Color image with bounding boxes and labels for each object
3D point clouds, pose and bounding box annotations for each object
Optional filtering based on query type if query_aware is True
- Returns:
-
SUCCESS after creating visualizations