Main Content

show

Visualize normal distributions transform (NDT) map

Description

example

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.

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. The axes 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. The axes 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 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: '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.

See Also

Objects

Functions

Introduced in R2021a