Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

pcshowpair

Visualize difference between two point clouds

Syntax

pcshowpair(ptCloudA,ptCloudB)
pcshowpair(ptCloudA,ptCloudB,Name,Value)
ax = pcshowpair(___)

Description

example

pcshowpair(ptCloudA,ptCloudB) creates a visualization depicting the differences between the two input point clouds. The differences are displayed using a blending of magenta for point cloud A and green for point cloud B.

pcshowpair(ptCloudA,ptCloudB,Name,Value) visualizes the differences using additional options specified by one or more Name,Value pair arguments.

ax = pcshowpair(___) returns the plot axes to the visualization of the differences, using any of the preceding syntaxes.

Examples

collapse all

Load two point clouds that were captured using a Kinect device in a home setting.

load('livingRoom');

pc1 = livingRoomData{1};
pc2 = livingRoomData{2};

Plot and set the viewpoint of point clouds.

figure
pcshowpair(pc1,pc2,'VerticalAxis','Y','VerticalAxisDir','Down')
title('Difference Between Two Point Clouds')
xlabel('X(m)')
ylabel('Y(m)')
zlabel('Z(m)')

Input Arguments

collapse all

Point cloud A, specified as a pointCloud object. The function uses levels of magenta to represent ptCloudA and a pure magenta when the point cloud contains no color information.

Point cloud B, specified as a pointCloud object. The function uses levels of green to represent ptCloudB and a pure green when the point cloud contains no color information.

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 single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'VerticalAxisDir','Up' sets the vertical axis direction to up.

collapse all

Approximate diameter of the point marker, specified as the comma-separated pair consisting of 'MarkerSize' and a positive scalar. The units are in points. A marker size larger than six can reduce the rendering performance.

Vertical axis, specified as the comma-separated pair consisting of 'VerticalAxis' and a character vector specifying the vertical axis: 'X', 'Y', or 'Z'.

Vertical axis direction, specified as the comma-separated pair consisting of 'VerticalAxisDir' and a character vector specifying the direction of the vertical axis: 'Up' or 'Down'.

Output axes, specified as the comma-separated pair consisting of 'Parent' and an axes graphics object that displays the point cloud visualization.

Output Arguments

collapse all

Plot axes, returned as an axes graphics object. Points with NaN or Inf coordinates are not displayed.

Tips

To improve performance, pcshowpair 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.

Introduced in R2015b