robokudo.types.cv

Computer vision types for Robokudo.

This module provides types for computer vision operations including:

  • 2D and 3D point representations

  • Rectangle and region of interest definitions

  • 3D bounding box specifications

The types support integration with: * OpenCV for image processing * Open3D for point cloud handling * Transform system for poses

Classes

Point2D

2D point representation.

Points3D

3D point cloud container.

Rect

2D rectangle representation.

ImageROI

Image region of interest.

BoundingBox3D

3D oriented bounding box.

TSDFAnnotation

A TSDF Volume annotation.

Module Contents

class robokudo.types.cv.Point2D

Bases: robokudo.types.core.Type

2D point representation.

Represents a point in 2D image coordinates.

x: int = 0

X coordinate

y: int = 0

Y coordinate

class robokudo.types.cv.Points3D

Bases: robokudo.types.core.Type

3D point cloud container.

Wraps an Open3D point cloud for 3D point operations.

points: open3d.geometry.PointCloud = None

The actual Open3D point cloud object

class robokudo.types.cv.Rect

Bases: robokudo.types.core.Type

2D rectangle representation.

Defines a rectangle by its top-left corner position and dimensions.

pos: Point2D

Top-left corner position

width: int = 0

Rectangle width in pixels

height: int = 0

Rectangle height in pixels

get_corner_points() typing_extensions.Tuple[int, int, int, int]

Get the rectangle as a tuple of (x1, y1, x2, y2).

as_tuple() typing_extensions.Tuple[int, int, int, int]

Get the rectangle as a tuple of (x, y, w, h).

class robokudo.types.cv.ImageROI

Bases: robokudo.types.core.Type

Image region of interest.

Defines a region of interest in an image using: * Binary mask for arbitrary shapes * Rectangle for bounding region

mask: numpy.typing.NDArray = None

Binary opencv mask image

roi: Rect

Rectangular region of interest

class robokudo.types.cv.BoundingBox3D

Bases: robokudo.types.core.Type

3D oriented bounding box.

Represents a 3D box with: * Dimensions along each axis * 6-DOF pose defining orientation and position

x_length: float = 0.0

Box length along x-axis

y_length: float = 0.0

Box length along y-axis

z_length: float = 0.0

Box length along z-axis

pose: robokudo.types.tf.Pose

Box pose in 3D space

class robokudo.types.cv.TSDFAnnotation

Bases: robokudo.types.core.Annotation

A TSDF Volume annotation.

volume: open3d.pipelines.integration.ScalableTSDFVolume

The Open3D TSDF Volume object.

transform: numpy.typing.NDArray[numpy.float64]

The transform from the reference frame to the object frame.

get_coordinate_frame() open3d.geometry.TriangleMesh

Get the coordinate frame of the TSDF volume.

get_mesh() open3d.geometry.TriangleMesh

Get the mesh representation of the TSDF volume.

get_point_cloud() open3d.geometry.PointCloud

Get the point cloud representation of the TSDF volume.

get_voxel_point_cloud() open3d.geometry.PointCloud

Get the voxel point cloud representation of the TSDF volume.