www.gusucode.com > vision 源码程序 matlab案例代码 > vision/RemoveRedundantPointsPointCloudExample.m

    %% Remove Redundant Points from Point Cloud
% Create a point cloud with all points sharing the same coordinates.

% Copyright 2015 The MathWorks, Inc.

ptCloud = pointCloud(ones(100,3));
%%
% Set the 3-D resolution to a small value.
gridStep = 0.01;
%%
% The output now has one unique point.
ptCloudOut = pcdownsample(ptCloud,'gridAverage',gridStep)