v9.1.1
Menu

Chapter 7: Point Cloud Processing

Week 7

Master the algorithms and architectures for processing 3D point clouds: from fundamental operations like downsampling and normal estimation, through deep learning architectures (PointNet, PointNet++, sparse 3D convolutions), to applied tasks like segmentation, registration with ICP, and robust model fitting with RANSAC.

Topics
7
Demos
2
Videos
3
Min read
41

Chapter Overview

Point clouds are the most natural output of 3D sensors---LiDAR, depth cameras, and photogrammetry pipelines all produce unordered sets of 3D points. Processing these raw point clouds efficiently and accurately is essential for applications from autonomous driving to augmented reality.

What is this chapter about? We cover the complete point cloud processing stack. We start with fundamental operations: data structures, downsampling, normal estimation, and neighbor queries. We then explore deep learning on point clouds, beginning with PointNet's revolutionary insight that max-pooling achieves permutation invariance, continuing with PointNet++'s hierarchical feature extraction, and examining 3D convolutional approaches that voxelize the space. We apply these ideas to semantic and instance segmentation, then turn to geometric algorithms: ICP for aligning point clouds and RANSAC for fitting geometric primitives.

Why does this matter? Self-driving cars use PointNet-based models on LiDAR clouds for 3D object detection. Robotics relies on ICP for localization and RANSAC for surface fitting. Indoor mapping combines all these techniques to build navigable 3D models. Point cloud processing is where geometric algorithms meet deep learning.

How the topics connect: Point cloud fundamentals establish the data structures and basic operations. PointNet introduces the deep learning paradigm for unordered sets. PointNet++ adds local structure that PointNet misses. Voxelization and 3D convolutions offer an alternative to point-based processing. Segmentation is the key downstream task for scene understanding. ICP and RANSAC provide geometric algorithms for registration and fitting that complement learned approaches.

Chapter Roadmap

Click any topic to jump in

Explainer videoInteractive demo
1
PC Fundamentals

Spatial data structures, voxel downsampling, and normal estimation — the building blocks of point cloud processing.

Spatial Data Structures: KD-Trees and OctreesVoxel DownsamplingNormal Estimation and Curvature
Deep learning on point sets

From global pooling to hierarchical local features

2
PointNet

The first architecture to process raw point clouds directly using per-point MLPs and symmetric max-pooling.

Permutation Invariance via Max-PoolingT-Net: Spatial Transformer for Point Cloud AlignmentCritical Points and Network Interpretability
3
PointNet++

Hierarchical feature learning with set abstraction layers and multi-scale grouping for local structure.

Set Abstraction LayersMulti-Scale Grouping (MSG)Feature Propagation for Segmentation
Processing and understanding scenes

Voxel-based networks and semantic segmentation

4
3D Convolutions

Voxelizing point clouds for sparse and dense 3D convolutions — MinkowskiNet and VoxelNet approaches.

Dense and Sparse VoxelizationMinkowskiNet and Sparse 3D ConvolutionsVoxelNet and Pillar-Based Representations
5
PC Segmentation

Semantic, instance, and panoptic segmentation on point clouds with architectures like RandLA-Net.

Semantic Segmentation on Point CloudsInstance Segmentation and Panoptic SegmentationRandLA-Net: Efficient Large-Scale Segmentation
Geometric algorithms

Classical registration and robust model fitting

6
ICP Registration

Aligning point clouds via Iterative Closest Point — point-to-point, point-to-plane, and robust variants.

Point-to-Point ICPPoint-to-Plane ICPRobust ICP and Outlier Rejection
7
RANSAC 3D Fitting

Robust geometric primitive fitting — planes, spheres, and cylinders from noisy point cloud data.

RANSAC Algorithm for Plane FittingMulti-Model RANSAC and Primitive DetectionRANSAC for Sphere and Cylinder Fitting

Topics

7 topics in this chapter

Chapter 6 turned point clouds into meshes, but most 3D data never gets that far. A self-driving car's LiDAR produces over a million points a second, a warehouse robot sees its depth camera's cloud thirty times a second, and both must act on the raw points directly. Raw points are awkward: they come in no particular order, with no grid and no connectivity, so even the simplest question, which points are near this one, has no direct answer. Asked naively, that question costs a pass over every point, and nearly every algorithm in this chapter asks it millions of times. This topic builds the toolkit that makes point clouds workable. Spatial data structures, k-d trees and octrees, answer neighbour queries in logarithmic time. Voxel downsampling thins a cloud to a manageable, more uniform density while averaging out noise. Normal estimation fits a plane to each neighbourhood and reads off the surface direction and a curvature score, which later topics use for meshing, registration and primitive fitting. The rest of the chapter builds learned models, PointNet and its successors, and classical geometry, ICP and RANSAC, on top of these three operations.

Definition

A point cloud is an unordered set of points pi∈R3p_i \in \mathbb{R}^3, optionally with attributes such as colour, intensity or normals. Core processing relies on spatial indexes (k-d trees, octrees) for k-nearest-neighbour and radius queries, voxel-grid downsampling to bound density, and local principal component analysis to estimate surface normals and curvature.

In this topic

  1. 1Spatial Data Structures: KD-Trees and Octrees
  2. 2Voxel Downsampling
  3. 3Normal Estimation and Curvature
1 of 3
Spatial Data Structures: KD-Trees and Octrees

Point clouds require fast spatial queries: finding all points within a radius (range search) or finding the k nearest neighbors (kNN search). KD-trees partition space by recursively splitting along alternating axes (x, then y, then z), creating a binary tree where each node splits the point set in half. kNN queries take O(log⁡n)O(\log n) average time instead of O(n)O(n) brute force. Octrees partition space into 8 octants recursively, creating a hierarchical grid that adapts resolution to local point density. KD-trees are better for kNN queries; octrees are better for range queries and voxel-based operations. Both are essential for processing point clouds with millions of points efficiently.

Mathematical Intuition

A KD-tree recursively bisects space along alternating axes, creating a binary search structure over nn points. At each node, the splitting hyperplane divides points into two roughly equal subsets. For kNN queries, the tree prunes branches whose bounding boxes are farther than the current kk-th nearest distance, achieving O(log⁡n)O(\log n) average query time. The construction cost is O(nlog⁡n)O(n \log n). In 3D, the tree alternates splits along xx, yy, zz axes — after 3 levels, each cell has been split once in each dimension, giving roughly cubic cells.

Example:

A point cloud has 10 million points. How many distance computations does a brute-force kNN search (k=20k=20) require versus a KD-tree search? Assume KD-tree queries visit 50⋅log⁡2(n)50 \cdot \log_2(n) nodes.

2 of 3
Voxel Downsampling

Voxel downsampling divides space into cubes of side ss and replaces the points in each occupied cube with their centroid, so density is capped at roughly one point per voxel. It is not a strict minimum spacing: with 5 cm voxels the closest centroid pair in a test scan was 2.8 cm apart. Because sensors sample surfaces, the output count scales with surface area over s2s^2, not volume over s3s^3. Averaging kk points also divides noise variance by kk. Failure modes: structures thinner than ss merge, and a voxel straddling a corner puts its centroid off the surface.

Mathematical Intuition

Voxel downsampling replaces all points in a cube of side ss with their centroid, so at most one output point lives in each voxel. The count is bounded by V/s3V / s^3, but a sensor sees surfaces, so the occupied count is close to A/s2A / s^2 for surface area AA: halving ss multiplies the output by about 4, not 8. Spacing is roughly ss but not guaranteed, because centroids of adjacent voxels can lie near their shared face. Averaging kk independent samples reduces noise variance to σ2/k\sigma^2 / k, so downsampling also denoises, at the price of blurring detail finer than ss.

Example:

A scan of a 5 m x 5 m x 3 m room covers its floor, ceiling and four walls with 2 million points. Dividing the room's volume by the target count suggests a voxel size for about 50,000 points. Is that right, and what voxel size actually leaves about 50,000 points?

3 of 3
Normal Estimation and Curvature

Surface normals at each point are estimated by fitting a plane to the local neighborhood (k nearest neighbors or points within radius r). PCA of the neighborhood covariance matrix gives three eigenvectors: the two with largest eigenvalues span the tangent plane, and the smallest eigenvalue's eigenvector is the normal direction. The ratio of eigenvalues indicates local surface curvature: when all three eigenvalues are similar, the point is in a region of high curvature or noise; when one eigenvalue is much smaller than the others, the surface is locally flat. Normal orientation (consistent inward/outward direction) requires global propagation using a minimum spanning tree, as PCA gives ambiguous sign.

Mathematical Intuition

PCA normal estimation fits a tangent plane to the kk nearest neighbors by computing the 3×33 \times 3 covariance matrix C=1k∑i=1k(pi−pˉ)(pi−pˉ)⊤C = \frac{1}{k}\sum_{i=1}^k (p_i - \bar{p})(p_i - \bar{p})^\top and taking the eigenvector with the smallest eigenvalue λmin⁡\lambda_{\min} as the normal. The surface variation σn=λmin⁡/(λ1+λ2+λ3)\sigma_n = \lambda_{\min} / (\lambda_1 + \lambda_2 + \lambda_3) measures local planarity: σn≈0\sigma_n \approx 0 for flat surfaces and σn→1/3\sigma_n \to 1/3 for isotropic noise. The neighborhood size kk controls the smoothness-detail trade-off: larger kk averages more points but smears sharp edges.

Example:

PCA of a point's 20 nearest neighbors gives eigenvalues [12.5, 11.8, 0.03]. Compute the surface variation (curvature estimate) and determine if this is a flat or curved region.

Related Problems on PixelBank