pcplayer

Visualize streaming 3-D point cloud data

Description

Visualize 3-D point cloud data streams from devices such as Microsoft®Kinect®.

To improve performance, pcplayer automatically downsamples the rendered point cloud during interaction with the figure. The downsampling occurs only for rendering the point cloud and does not affect the saved points.

You can set the default center of rotation for the point cloud viewer to rotate around the axes center or around a point. Set the default behavior from the Computer Vision Toolbox Preferences.

Creation

Description

example

player = pcplayer(xlimits,ylimits,zlimits) returns a player with xlimits,ylimits, and zlimits set for the axes limits.

example

player = pcplayer(xlimits,ylimits,zlimits,Name,Value) returns a player with additional properties specified by one or more Name,Value pair arguments.

Input Arguments

expand all

Range of x-axis coordinates, specified as a 1-by-2 vector in the format [min max]. pcplayer does not display data outside these limits.

Range of y-axis coordinates, specified as a 1-by-2 vector in the format [min max]. pcplayer does not display data outside these limits.

Range of z-axis coordinates, specified as a 1-by-2 vector in the format [min max].pcplayer does not display data outside these limits.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'VerticalAxisDir', 'Up'.

Diameter of marker, specified as the comma-separated pair consisting of 'MarkerSize' and a positive scalar. The value specifies the approximate diameter of the point marker. MATLAB® graphics defines the unit as points. A marker size larger than six can reduce the rendering performance.

Vertical axis, specified as the comma-separated pair consisting of 'VerticalAxis' and 'X', 'Y', or 'Z'. When you reload a saved figure, any action on the figure resets the vertical axis to the z-axis.

Vertical axis direction, specified as the comma-separated pair consisting of 'VerticalAxisDir' and 'Up' or 'Down'. When you reload a saved figure, any action on the figure resets the direction to the up direction.

Properties

expand all

Player axes handle, specified as an axes graphics object.

Usage

Color and Data Point Values in Figure

To view point data or modify color display values, hover over the axes toolbar and select one of the following options.

FeatureDescription
Datatip

Click Data Tips to view the data point values for any point in the point cloud figure. For a normal point cloud, the Data Tips displays the x,y,z values. Additional data properties for the depth image and lidar are:

Point Cloud DataData Value Properties
Depth image (RGB-D sensor)Color, row, column
LidarIntensity, range, azimuth angle, elevation angle, row, column

Background color

Click Rotate and then right-click in the figure for background options.

Colormap value

Click Rotate and then right-click in the figure for colormap options. You can modify colornap values for the coordinate and range values available, depending on the type of point cloud displayed.

View

Click Rotate to change the viewing angle of the point cloud figure to the XZ, ZX,YZ, ZY, XY, or the YX plane. Click Restore View to reset the viewing angle.

OpenGL Option

pcplayer supports the 'opengl' option for the Renderer figure property only.

Object Functions

hideHide player figure
isOpenVisible or hidden status for player
showShow player
viewDisplay point cloud

Examples

collapse all

Create the player and add data.

player = pcplayer([0 1],[0 1],[0 1]);

Display continuous player figure. Use the isOpen function to check if player figure window is open.

while isOpen(player) 
     ptCloud = pointCloud(rand(1000,3,'single'));
     view(player,ptCloud);           
end 

Terminate while-loop by closing pcplayer figure window.

Introduced in R2015b