Main Content

Point Cloud Processing

Preprocess, visualize, register, fit geometrical shapes, build maps, implement SLAM algorithms, and use deep learning with 3-D point clouds

A point cloud is a set of data points in 3-D space. The points together represent a 3-D shape or object. Each point in the data set is represented by an x, y, and z geometric coordinate. Point clouds provide a means of assembling a large number of single spatial measurements into a dataset that can be represented as a describable object. Point cloud processing is used in robot navigation and perception, depth estimation, stereo vision, visual registration, and in advanced driver assistance systems (ADAS). Computer Vision Toolbox™ algorithms provide point cloud processing functionality for downsampling, denoising, and transforming point clouds. The toolbox also provides point cloud registration, geometrical shape fitting to 3-D point clouds, and the ability to read, write, store, display, and compare point clouds. You can also combine multiple point clouds to reconstruct a 3-D scene.

You can use pcregistericp, pcregisterndt, pcregistercorr, and pcregistercpd to register a moving point cloud to a fixed point cloud. These registration algorithms are based on the Iterative Closest Point (ICP) algorithm, the Normal-Distributions Transform (NDT) algorithm, the phase correlation algorithm, and the Coherent Point Drift (CPD) algorithm, respectively. You can build a map with the registered point clouds, detect loop closures, optimize the map to correct for drift, and perform localization in the prebuilt map. For more details, see Implement Point Cloud SLAM in MATLAB.

Functions

expand all

pcreadRead 3-D point cloud from PLY or PCD file
pcwriteWrite 3-D point cloud to PLY or PCD file
pcfromdepthConvert depth image to point cloud (Since R2022b)
pcfromkinectPoint cloud from Kinect for Windows
velodyneFileReaderRead point cloud data from Velodyne PCAP file
pcviewsetManage data for point cloud based visual odometry and SLAM (Since R2020a)
pointCloudObject for storing 3-D point cloud
pcviewerVisualize and inspect large 3-D point cloud (Since R2023a)
pcshowPlot 3-D point cloud
pcshowpairVisualize difference between two point clouds
pcplayerVisualize streaming 3-D point cloud data
showShapeDisplay shapes on image, video, or point cloud (Since R2020b)

Preprocess

pcbinSpatially bin point cloud points (Since R2020a)
pcdenoiseRemove noise from 3-D point cloud
pcdownsampleDownsample a 3-D point cloud
pcnormalsEstimate normals for point cloud

Find and Remove Points

findPointsInCylinderFind points within a cylindrical region in a point cloud (Since R2023a)
findPointsInROIFind points within a region of interest in the point cloud
findNearestNeighborsFind nearest neighbors of a point in point cloud
findNeighborsInRadiusFind neighbors within a radius of a point in the point cloud
removeInvalidPointsRemove invalid points from point cloud
pcsegdistSegment point cloud into clusters based on Euclidean distance
segmentGroundFromLidarDataSegment ground points from organized lidar data
segmentLidarDataSegment organized 3-D range data into clusters
pcbinSpatially bin point cloud points (Since R2020a)

Register Point Clouds

pcregistercorrRegister two point clouds using phase correlation (Since R2020b)
pcregistericpRegister two point clouds using ICP algorithm
pcregistercpdRegister two point clouds using CPD algorithm
pcregisterndtRegister two point clouds using NDT algorithm

Transform Point Clouds

rigidtform3d3-D rigid geometric transformation (Since R2022b)
pctransformTransform 3-D point cloud

Align or Combine Point Clouds

pcalignAlign array of point clouds (Since R2020b)
pccatConcatenate 3-D point cloud array (Since R2020b)
pcmergeMerge two 3-D point clouds

Determine Loop Closure Candidates

findPoseLocalize point cloud within map using normal distributions transform (NDT) algorithm (Since R2021a)
scanContextDistanceDistance between scan context descriptors (Since R2020b)
scanContextDescriptorExtract scan context descriptor from point cloud (Since R2020b)
scanContextLoopDetectorDetect loop closures using scan context descriptors (Since R2021b)

Optimize Poses

createPoseGraphCreate pose graph (Since R2020a)
optimizePosesOptimize absolute poses using relative pose constraints (Since R2020a)

Create Localization Map

pcmapndtLocalization map based on normal distributions transform (NDT) (Since R2021a)
pcfitcylinderFit cylinder to 3-D point cloud
pcfitplaneFit plane to 3-D point cloud
pcfitsphereFit sphere to 3-D point cloud
pcnormalsEstimate normals for point cloud
fitPolynomialRANSACFit polynomial to points using RANSAC
ransacFit model to noisy data
cylinderModelParametric cylinder model
planeModelObject for storing parametric plane model
sphereModelObject for storing a parametric sphere model

Blocks

expand all

Point Cloud ViewerVisualize streaming point cloud data sequence (Since R2023a)

Topics