Main Content

Point Cloud Viewer

Visualize streaming point cloud data sequence

Since R2023a

  • Point Cloud Viewer block

Libraries:
Computer Vision Toolbox / Sinks

Description

The Point Cloud Viewer block creates a Point Cloud Viewer window to display a sequence of 3-D point cloud data that streams from a device such as a Microsoft® Kinect® or a lidar sensor. The Point Cloud Viewer block also provides simulation controls in the Point Cloud Viewer window to play, pause, and step through the streaming point cloud data sequence.

Point cloud viewer window

Features of Point Cloud Viewer

  • Playback control — Control streaming playback of a point cloud sequence using the Run, Step Forward, and Stop buttons.

  • Set axis limits — Limit the display of the 3-D point cloud data by setting the x-, y-, and z-axis limits.

  • Set background color — Set the background color of the viewer window against which to display of point cloud data.

  • Vertical axis direction control — Set the vertical axis direction of the point cloud data to upward-positive or downward-positive.

  • View plane control — Set the view plane to change the viewing angle of the point cloud data.

  • Analyze point cloud data — Inspect point cloud data using the Data Tips option on the axes toolbar of the Point Cloud Viewer window.

Ports

Input

expand all

Positions of the points in 3-D coordinate space, specified as:

  • An M-by-3 matrix or M-by-N-by-3 array for a 3-D point cloud.

  • An M-by-3-by-T or M-by-N-by-3-by-T array for a sequence of 3-D point clouds, where T is the total number of 3-D point clouds in the point cloud sequence.

Each array specifies the x-, y-, and z- coordinates of a points in the point cloud, but the format differs between unorganized point cloud and organized point clouds.

  • For unorganized point clouds, you must specify Location as an M-by-3 or M-by-3-by-T array, where M is the total number of points, and each row provides the xyz-coordinates for a point.

  • For organized point clouds, you must specify Location as an M-by-N-by-3 or an M-by-N-by-3-by-T array, where M×N is the total number of points, and the third dimension of the array provides the x-, y-, and z-coordinates for the corresponding point. Projective cameras, such as a Kinect or a lidar sensor, store points as an organized point cloud. An organized point cloud is laid out as a 2-D or a 3-D array of points that resembles an image- or video-like structure.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Simulink.ImageType

Point cloud color, specified as:

  • An M-by-3 matrix or M-by-N-by-3 array for a 3-D point cloud.

  • An M-by-3-by-T or M-by-N-by-3-by-T array for a sequence of 3-D point clouds, where T is the total number of 3-D point clouds in a point cloud sequence.

For an unorganized point cloud, specified as an M-by-3 matrix or M-by-3-by-T array, each row specifies the RGB color triplet for a point in the point cloud data. For an organized point cloud, specified as an M-by-N-by-3 or M-by-N-by-3-by-T array, each channel of the third dimension specifies the RGB color triplet for the corresponding point in the point cloud data. You can specify the same color for all points or a different color for each point.

  • For the single or double data type, you must specify the Color RGB value in the range [0, 1].

  • For the uint8 data type, you must specify the Color RGB value in the range [0, 255].

  • For the uint16 data type, you must specify the Color RGB value in the range [0, 65535].

Note

Input to the Color port must have the same dimensions and data type as the input to the Location port.

Dependencies

To enable this port, select the File > Location and Color Port parameter.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Simulink.ImageType

Parameters

expand all

File

Select this parameter to display the Point Cloud Viewer window at the start of the simulation. Clear this parameter to prevent the Point Cloud Viewer window from opening at the start of the simulation.

Select this parameter to enable the Location port for inputting the 3-D point cloud coordinates. If you select this parameter, the Location and Color Port parameter clears automatically.

Select this parameter to enable both the Location and Color input ports. If you select this parameter, the Location Port parameter clears automatically.

File > Configuration > Edit > Core

The Point Cloud Viewer Configuration dialog box enables you to change the behavior and appearance of the graphic user interface (GUI).

  • To open the Configuration dialog box and edit parameters, select File > Configuration > Edit.

The Core tab in the Configuration dialog box lists the general settings of the GUI.

  • In the Core tab, select General UI and click Properties to open the General UI Properties dialog box.

Select this parameter to display the model name and full path to the source data in the title bar of the Point Cloud Viewer window. If you clear this parameter, the window displays a shortened name.

Tools > Point Cloud Information

The Point Cloud Information dialog box displays information about the input point cloud sequence. This information includes Source type, Source name, Frame size, Source data type, and Display data type.

View

Select this parameter to bring all the Point Cloud Viewer windows forward, in front of all other open windows behind.

Select this parameter to show the simulation toolbar on the Point Cloud Viewer window.

Simulation toolbar

To perform a relevant operation using the simulation toolbar, select the corresponding feature as described in the table.

FeatureDescription
RunStart the simulation, and view the point cloud sequence.
Step Forward

Start the simulation, view one frame of the point cloud sequence, and pause.

StopStop the simulation.
Highlight Simulink BlockHighlight the Point Cloud Viewer block with a blue background in the Simulink model.
Snapshot (Freeze Display)

Freeze Point Cloud Viewer window to enable you take a snapshot of the window using the Print or Print Preview option in File menu.

Note

Unselect this option to return the Point Cloud Viewer window to an active state from a frozen state.

SettingsEnable the Settings pane on the Point Cloud Viewer window.

Select this parameter to show the status bar on the Point Cloud Viewer window. The status bar, at the bottom of the Point Cloud Viewer window, shows this information about the point cloud sequence.

  • Dimension

  • Organization

  • Status of the window during simulation

  • Timestamp of the current frame

Highlight the Point Cloud Viewer block in blue in the Simulink model.

Simulation

To access this parameter, select the Simulation menu in the Point Cloud Viewer window.

Select this parameter to start the simulation and view the point cloud sequence continuously from the first to the last frame. You can also perform this action by clicking Run on the simulation toolbar.

Select this parameter to continue viewing the point cloud sequence till the last frame. To enable the Continue parameter, start the simulation by clicking Step Forward on simulation toolbar.

Select this parameter to stop the display of the point cloud sequence. You can also perform this action by clicking Stop on the simulation toolbar.

Select this parameter to reduce the frame rate of the input streaming point cloud sequence to improve the performance of the simulation. If you clear this parameter, the block displays every frame in the input point cloud sequence signal during the simulation.

Block Characteristics

Data Types

Boolean | double | integer | single

Direct Feedthrough

no

Multidimensional Signals

no

Variable-Size Signals

yes

Zero-Crossing Detection

no

More About

expand all

Version History

Introduced in R2023a

See Also