Select points in point cloud
ptCloudOut = select(ptCloud,indices)
ptCloudOut = select(ptCloud,row,column)
ptCloudOut = select(___,'OutputSize',outputSize)
Read a point cloud data into the workspace.
ptCloud = pcread('teapot.ply');
Read the number of points in the point cloud data.
Length = ptCloud.Count;
Select indices within the range [1,
stepSize = 10; indices = 1:stepSize:Length;
Select points specified by the indices from input point cloud. This selection of points downsamples the input point cloud by a factor of
ptCloudB = select(ptCloud,indices);
Display the input and the selected point cloud data.
figure subplot(1,2,1) pcshow(ptCloud) title('Input Point Cloud','Color',[1 1 1]); subplot(1,2,2) pcshow(ptCloudB) title('Selected Points','Color',[1 1 1]);
indices— Indices of selected points
Indices of selected points, specified as a vector.
row— Row indices
Row indices, specified as a vector. This argument applies only if the input is an organized point cloud data of size M-by-N-by-3.
column— Column indices
Column indices, specified as a vector. This argument applies only if the input is an organized point cloud data of size M-by-N-by-3.
outputSize— Size of output point cloud
Size of the output point cloud,
ptCloudOut, specified as
If the size is
'selected', then the output contains only
the selected points from the input point cloud,
If the size is
'full', then the output is same size as the
input point cloud
ptCloud. Cleared points are filled with
NaN and the color is set to [0 0 0].
Usage notes and limitations:
Supports code generation (requires MATLAB®
Coder™) only in generic
MATLAB Host Computer target
Generates code that uses a precompiled, platform-specific shared library.