This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

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 System Toolbox Preferences.

Creation

Syntax

player = pcplayer(xlimits,ylimits,zlimits)
player = pcplayer(xlimits,ylimits,zlimits,Name,Value)

Use the pcplayer function to create a player for visualizing 3-D point cloud data.

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'.

Vertical axis direction, specified as the comma-separated pair consisting of 'VerticalAxisDir' and 'Up' or 'Down'.

Properties

expand all

Player axes handle, specified as an axes graphics object.

Object Functions

hideHide player figure
isOpenVisible or hidden status for video player figure
showShow player figure
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.

Algorithms

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

Introduced in R2015b