1 rendering.plotting

rendering.plotting

Plot candidate depth, world-frame geometry, and projected OBB diagnostics.

This module provides depth-grid/histogram helpers, projected-box overlays, and the RenderingPlotBuilder composition surface. It owns display conversion only; renderers produce metric depth, geometry modules own projection transforms, and stored camera/OBB data remain immutable.

Display-only CW90/image rotations reconcile physical Aria camera orientation with Plotly conventions; they never alter stored PoseTW or CameraTW geometry.

1.1 Classes

Name Description
DepthBoxOverlay Projected OBB wireframe overlay for one depth-grid panel.
RenderingPlotBuilder Rendering-focused extensions on top of CandidatePlotBuilder.

1.1.1 DepthBoxOverlay

rendering.plotting.DepthBoxOverlay(corners_px, name, color, width=3)

Projected OBB wireframe overlay for one depth-grid panel.

1.1.2 RenderingPlotBuilder

rendering.plotting.RenderingPlotBuilder(*args, **kwargs)

Rendering-focused extensions on top of CandidatePlotBuilder.

This keeps a single builder hierarchy: SnippetPlotBuilder -> CandidatePlotBuilder -> RenderingPlotBuilder. Rendering methods operate on explicit pose/camera/depth inputs and remain usable even when no candidate_results are attached.

1.1.2.1 Methods

Name Description
add_frusta_selection Add camera frusta and their image-plane rectangles to the 3D scene.
add_depth_hits Scatter hit points back-projected from rendered depth maps.
1.1.2.1.1 add_frusta_selection
rendering.plotting.RenderingPlotBuilder.add_frusta_selection(
    poses,
    camera,
    *,
    color='crimson',
    max_frustums=16,
    name='Rendered frusta',
    display_yaw_cw90=False,
    candidate_indices=None,
)

Add camera frusta and their image-plane rectangles to the 3D scene.

1.1.2.1.2 add_depth_hits
rendering.plotting.RenderingPlotBuilder.add_depth_hits(
    depths,
    poses,
    camera,
    valid_masks,
    *,
    stride=8,
    max_points=20000,
    color='teal',
    name='Depth hits',
    zfar=None,
    candidate_indices=None,
)

Scatter hit points back-projected from rendered depth maps.

1.2 Functions

Name Description
depth_grid Visualise depth maps using the shared image grid utilities.
depth_grid_with_box_overlays Visualise depth maps with projected 2D OBB wireframes.
depth_histogram Histogram of depth values per candidate.
plot_candidate_pointcloud_scene Plot a snippet and selected candidate point clouds in world coordinates.
project_world_points_to_image Project world-frame points into retained selected-depth pixel coordinates.

1.2.1 depth_grid

rendering.plotting.depth_grid(
    depths,
    *,
    titles=None,
    max_cols=3,
    zmax=None,
    zfar=None,
)

Visualise depth maps using the shared image grid utilities.

1.2.2 depth_grid_with_box_overlays

rendering.plotting.depth_grid_with_box_overlays(
    depths,
    *,
    overlays,
    titles=None,
    max_cols=3,
    zmax=None,
    zfar=None,
)

Visualise depth maps with projected 2D OBB wireframes.

The image conversion matches depth_grid: depth maps are colorized through the shared FrameGridBuilder path and rotated for display. Overlay pixel coordinates are transformed by the same display rotation before Plotly scatter traces are added.

1.2.3 depth_histogram

rendering.plotting.depth_histogram(depths, *, bins=50, zfar=None)

Histogram of depth values per candidate.

1.2.4 plot_candidate_pointcloud_scene

rendering.plotting.plot_candidate_pointcloud_scene(
    sample,
    poses,
    camera,
    pointclouds,
    *,
    candidate_ids,
    selected_ids,
    color_map,
    title,
    max_sem_pts,
    show_frusta,
)

Plot a snippet and selected candidate point clouds in world coordinates.

1.2.5 project_world_points_to_image

rendering.plotting.project_world_points_to_image(
    points_world,
    pose_world_cam,
    *,
    focal_px,
    principal_point_px,
)

Project world-frame points into retained selected-depth pixel coordinates.

Back to top