Main Content

show

Visualize normal distributions transform (NDT) map

Since R2021a

Description

show(ndtMap) visualizes the NDT map as a point cloud. The function uses voxel means, covariances, and point counts to generate points for the display. These points are not the points used to build the map. The NDT map is a compressed representation of the point cloud map that stores the voxels and their 3-D normal distributions.

example

show(ndtMap,spatialExtent) displays points within the spatial map or submap specified by spatialExtent.

show(___,Name,Value) specifies options using one or more name-value arguments in addition to any combination of input arguments in previous syntaxes. For example, 'MarkerSize',6 sets the marker size to 6 points.

ax = show(___) returns the axes used to plot the NDT map.

Examples

collapse all

Load an NDT map from a MAT file.

data = load('ndtMapParkingLot.mat');
ndtMap = data.ndtMapParkingLot;

Select a submap from within the loaded NDT map at the specified location and size.

center  = [50  0  0];
sz      = [50 50 10];
ndtMap = selectSubmap(ndtMap,center,sz);

Visualize the full NDT map.

figure
show(ndtMap)
title('Full NDT Map')

Highlight the selected submap on the full NDT map.

pos = [center,sz,zeros(1, 3)];
showShape('cuboid',pos,'Color','y','Opacity',0.2);

Figure contains an axes object. The axes object with title Full NDT Map contains an object of type scatter.

Visualize the selected submap.

figure
show(ndtMap,'submap')
title('Selected Submap')

Figure contains an axes object. The axes object with title Selected Submap contains an object of type scatter.

Input Arguments

collapse all

NDT map, specified as a pcmapndt object.

Spatial extent, specified as 'map' or 'submap'. When you specify 'submap', only points within the current submap are displayed.

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: 'MarkerSize',6 sets the marker size to 6 points.

Diameter of marker, specified as a positive scalar. This value specifies the approximate diameter of the point marker. Units are in points. A marker size larger than six can reduce rendering performance.

Axes on which to display the visualization, specified as an Axes object. To create an Axes object, use the axes function. To display the visualization in a new figure, leave 'Parent' unspecified.

Output Arguments

collapse all

Plot axes, returned as an axes graphics object.

Version History

Introduced in R2021a

See Also

Objects

Functions