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 Point Cloud SLAM Overview.

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

Functions

expand all

pcreadRead 3-D point cloud from PLY or PCD file
pcwriteWrite 3-D point cloud to PLY or PCD file
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
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

Preprocess

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

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

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

rigid3d3-D rigid geometric transformation
pctransformTransform 3-D point cloud

Align or Combine Point Clouds

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

Determine Loop Closure Candidates

scanContextDistanceDistance between scan context descriptors
scanContextDescriptorExtract scan context descriptor from point cloud

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
cylinderModelObject for storing a parametric cylinder model
planeModelObject for storing a parametric plane model
sphereModelObject for storing a parametric sphere model

Topics

The PLY Format

The Stanford Triangle Format

Point Cloud SLAM Overview

Understand point cloud registration and mapping workflow.

Getting Started with Point Clouds Using Deep Learning

Understand how to use point clouds for deep learning.

Choose Function to Visualize Detected Objects

Compare visualization functions.

Labeling, Segmentation, and Detection (Lidar Toolbox)

Label, segment, detect, and track objects in point cloud data using deep learning and geometric algorithms

Featured Examples