Main Content

Segmentation

Segment point cloud data into clusters using deep learning algorithms

Semantic segmentation clusters the points of a 3-D point cloud by using their similar characteristics, and associates each point with a class label such as car, building, ground, or vegetation.

You can segment a point cloud based on edges, neighboring point properties, and geometric shapes such as a cuboid, plane, or cylinder. For more information on the segmentation process, see the Terrain Classification for Aerial Lidar Data example.

Lidar Toolbox™ functions also support semantic segmentation using deep learning. You can use the included pretrained RandLA-Net, Segment Anything Model (SAM), PointSeg, SqueezeSegV2, and PointNet++ convolutional neural networks (CNNs) or develop custom segmentation models. For an example of the segmentation process using a RandLA-Net network, see Aerial Lidar Semantic Segmentation Using RandLANet Deep Learning.

Semantic segmentation in lidar point clouds.

Functions

expand all

pcsegdistSegment point cloud into clusters based on Euclidean distance
pcsegplanesSegment point cloud into planar surfaces (Since R2024b)
segmentLidarDataSegment organized 3-D range data into clusters
segmentGroundSMRFSegment ground from lidar data using a SMRF algorithm (Since R2021a)
segmentGroundFromLidarDataSegment ground points from organized lidar data
segmentCurbPointsSegment curb points from point cloud (Since R2022b)

Prepare Training Data

groundTruthLidarObject for storing labeled lidar data (Since R2020b)
fileDatastoreDatastore with custom file reader
pixelLabelDatastoreDatastore for pixel label data
combineCombine data from multiple datastores
countEachLabelCount occurrence of pixel or box labels

Augment and Preprocess Training Data

transformTransform datastore
pctransformTransform 3-D point cloud
bboxwarpApply geometric transformation to bounding boxes

Create Deep Learning Networks

pointCloudInputLayerPoint cloud input layer (Since R2022b)
squeezesegv2NetworkCreate SqueezeSegV2 segmentation network for organized lidar point cloud (Since R2024a)
pointnetplusNetworkCreate PointNet++ segmentation network (Since R2024a)

Segment Point Cloud

randlanet Segment point clouds using RandLA-Net semantic segmentation network (Since R2024a)
trainRandlanetTrain RandLA-Net network to perform semantic segmentation (Since R2024a)
segmentAnythingAerialLidarPerform semantic segmentation of aerial lidar data using pretrained Segment Anything Model (SAM) (Since R2024b)
pcsegsamSegment all objects automatically in lidar point cloud using Segment Anything Model (SAM) (Since R2024b)
pcsemanticsegPoint cloud semantic segmentation using deep learning (Since R2022b)
segmentAerialLidarVegetationSegment vegetation points from aerial lidar data (Since R2022b)
segmentAerialLidarBuildingsSegment building points from aerial lidar data (Since R2022b)
segmentAerialLidarPowerlineSegment powerline points from aerial lidar data (Since R2023b)

Evaluate Results

evaluateSemanticSegmentationEvaluate semantic segmentation data set against ground truth
segmentationConfusionMatrixConfusion matrix of multi-class pixel-level image segmentation (Since R2020b)
labeloverlayOverlay label matrix regions on 2-D image

Topics

Featured Examples