Visualization¶
Here, we provide the documentation for the visualization helpers.
viz_3d(to_plot_list, viz_tool='pyviz3d')
¶
Visualize 3D point clouds.
This function takes a list of 3D geometries (e.g., point clouds) and visualizes them using Open3D's visualization tools. An optional coordinate system can be displayed for reference.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
to_plot_list | list of open3d.geometry.PointCloud | A list of Open3D point cloud geometry objects to be visualized. | required |
Returns:
Type | Description |
---|---|
None | This function does not return any value. It opens a visualizer window displaying the geometries. |
Example
import open3d as o3d
pcd = o3d.geometry.PointCloud()
pcd.points = o3d.utility.Vector3dVector(np.random.rand(100, 3))
viz_3d([pcd])
Source code in scenefun3d/utils/viz.py
viz_masks(laser_scan_pcd, mask_indices, mask_labels=None, use_normals=True, viz_tool='pyviz3d')
¶
Visualize point cloud masks.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
laser_scan_pcd | PointCloud | The original point cloud to be visualized. | required |
mask_indices | list of lists of int or list of np.array of int | A list where each element is a list (or a np.array) of indices representing a mask in the point cloud. | required |
mask_labels | list of str | Labels for each mask to be used with Pyviz3D. Must be the same length as mask_indices. Default is None. | None |
use_normals | bool | Whether to use normals in the visualization. If True and the point cloud does not have normals, they will be estimated. Default is True. | True |
viz_tool | str | The visualization tool to use, either 'pyviz3d' or 'open3d'. Default is 'pyviz3d'. | 'pyviz3d' |
Returns:
Type | Description |
---|---|
None | The function visualizes the point cloud masks and does not return any value. |
Source code in scenefun3d/utils/viz.py
viz_motions(laser_scan_pcd, motion_types, motion_dirs, motion_origins, motion_viz_orients, motion_labels=None)
¶
Visualize point cloud masks.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
laser_scan_pcd | PointCloud | The original point cloud to be visualized. | required |
motion_types | list of str | A list where each element represents the motion type. Motion type can be either "trans" for translational motions or "rot" for rotational motions. | required |
motion_dirs | list of np.array | A list where each element represents the motion direction. | required |
motion_origins | list of np.array | A list where each element represents the motion origin. | required |
motion_viz_orients | list of str | A list where each element represents the motion orientation. Motion orientation can be either "inwards" or "outwards". | required |
motion_labels | list of str | Labels for each mask to be used with Pyviz3D. | None |
Returns:
Type | Description |
---|---|
None | The function visualizes the point cloud masks and does not return any value. |