Main Content

pccat

Concatenate 3-D point cloud array

Description

example

ptCloudOut = pccat(ptClouds) concatenates a 3-D point cloud array, ptClouds. ptCloudOut contains the Location, Color, Normal, and Intensity property values of all the concatenated point clouds.

Examples

collapse all

Read a sequence of aligned point clouds.

filePath = fullfile(toolboxdir('vision'),'visiondata','pcdmapseq');
fileDS = fileDatastore(filePath,'ReadFcn',@pcread,'UniformRead',true);
ptClouds = readall(fileDS);

Concatenate point clouds into a single point cloud.

ptCloudOut = pccat(ptClouds);

Display concatenated point cloud.

pcshow(ptCloudOut)

Input Arguments

collapse all

Point cloud objects, specified as an M-by-1 pointCloud array.

Output Arguments

collapse all

Concatenated point cloud, returned as a pointCloud object. ptCloudOut contains the Location, Color, Normal, and Intensity property values of all the concatenated point clouds.

Tips

  • If the input point clouds do not all have an assigned value for a property, the function does not assign a value for that property in the returned point cloud. For example, if some of the input point clouds have values for the Color property but another one does not, then the function does not return a value for the Color property of ptCloudOut.

  • The function filters out points with NaN or Inf values.

Introduced in R2020b