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.

Figure showing a point cloud of two concentric point clouds combined, a sensor angle computation, and a point cloud representing a teapot


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
pcfromkinectPoint cloud from Kinect for Windows
velodyneFileReaderRead point cloud data from Velodyne PCAP file
pcviewsetManage data for point cloud based visual odometry and SLAM
pointCloudObject for storing 3-D point cloud
pcviewerVisualize and inspect large 3-D point cloud
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


pcbinSpatially bin point cloud points
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
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

Register Point Clouds

pcregistercorrRegister two point clouds using phase correlation
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
pctransformTransform 3-D point cloud

Align or Combine Point Clouds

pcalignAlign array of point clouds
pccatConcatenate 3-D point cloud array
pcmergeMerge two 3-D point clouds

Determine Loop Closure Candidates

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

Optimize Poses

createPoseGraphCreate pose graph
optimizePosesOptimize absolute poses using relative pose constraints

Create Localization Map

pcmapndtLocalization map based on normal distributions transform (NDT)
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


expand all

Point Cloud ViewerVisualize streaming point cloud data sequence