vis4d.vis.pointcloud.viewer

Viewer implementations to display pointcloud.

class Open3DVisualizationBackend(class_color_mapping, instance_color_mapping=None)[source]

Backend that uses open3d to visualize potincloud data.

Creates a new Open3D visualization backend.

Parameters:
  • color_mapping (NDArrayF64) – array of size [n_classes, 3] that maps each class index to a unique color.

  • class_color_mapping (list[tuple[int, int, int]]) – List of length n_classes that assigns each class a unique color.

  • instance_color_mapping (list[tuple[int, int, int]], optional) – List of length n_classes that maps each instance id to unqiue color. Defaults to None.

save_to_disk(path_to_out_folder)[source]

Saves the visualization to disk.

Creates files [colors.ply, classes.ply, instances.ply] for each scene

Parameters:

path_to_out_folder (str) – Path to output folder

Return type:

None

show(blocking=False)[source]

Shows the visualization.

Parameters:

blocking (bool) – If the visualization should be blocking and wait for human input.

Return type:

None

class PointCloudVisualizerBackend(class_color_mapping, instance_color_mapping=None)[source]

Visualization Backen Interface for Pointclouds.

Creates a new Open3D visualization backend.

Parameters:
  • class_color_mapping (list[tuple[int, int ,int]]) – List of length n_classes that maps each class index to a unique color.

  • instance_color_mapping (list[tuple[int, int ,int]], optional) – List of length n_instances that maps each instance id to a unique color. Defaults to None.

add_scene(scene)[source]

Adds a given Scene3D to the visualization.

Parameters:

scene (Scene3D) – 3D scene that should be added.

Return type:

None

create_new_scene()[source]

Creates a new empty scene.

Return type:

Scene3D

get_current_scene()[source]

Returns the currently active scene.

If no scene is available, an new empty one is created.

Returns:

current pointcloud scene

Return type:

Scene3D

reset()[source]

Clears all stored data.

Return type:

None

save_to_disk(path_to_out_folder)[source]

Saves the visualization to disk.

Parameters:

path_to_out_folder (str) – Path to output folder

Return type:

None

show(blocking=True)[source]

Shows the visualization.

Parameters:

blocking (bool) – If the visualization should be blocking and wait for human input

Return type:

None

Modules

vis4d.vis.pointcloud.viewer.base

Generic classes to visualize and save pointcloud data.

vis4d.vis.pointcloud.viewer.open3d_viewer

Open3d visualization backend.