Chapter 7: Point Cloud Processing
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
PC Fundamentals
Spatial data structures, voxel downsampling, and normal estimation — the building blocks of point cloud processing.
From global pooling to hierarchical local features
PointNet
The first architecture to process raw point clouds directly using per-point MLPs and symmetric max-pooling.
PointNet++
Hierarchical feature learning with set abstraction layers and multi-scale grouping for local structure.
Voxel-based networks and semantic segmentation
3D Convolutions
Voxelizing point clouds for sparse and dense 3D convolutions — MinkowskiNet and VoxelNet approaches.
PC Segmentation
Semantic, instance, and panoptic segmentation on point clouds with architectures like RandLA-Net.
Classical registration and robust model fitting
ICP Registration
Aligning point clouds via Iterative Closest Point — point-to-point, point-to-plane, and robust variants.
RANSAC 3D Fitting
Robust geometric primitive fitting — planes, spheres, and cylinders from noisy point cloud data.
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 , 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
- 1Spatial Data Structures: KD-Trees and Octrees
- 2Voxel Downsampling
- 3Normal Estimation and Curvature
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 average time instead of 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.
A KD-tree recursively bisects space along alternating axes, creating a binary search structure over 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 -th nearest distance, achieving average query time. The construction cost is . In 3D, the tree alternates splits along , , axes — after 3 levels, each cell has been split once in each dimension, giving roughly cubic cells.
A point cloud has 10 million points. How many distance computations does a brute-force kNN search () require versus a KD-tree search? Assume KD-tree queries visit nodes.
Voxel Downsampling
Voxel downsampling divides space into cubes of side 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 , not volume over . Averaging points also divides noise variance by . Failure modes: structures thinner than merge, and a voxel straddling a corner puts its centroid off the surface.
Voxel downsampling replaces all points in a cube of side with their centroid, so at most one output point lives in each voxel. The count is bounded by , but a sensor sees surfaces, so the occupied count is close to for surface area : halving multiplies the output by about 4, not 8. Spacing is roughly but not guaranteed, because centroids of adjacent voxels can lie near their shared face. Averaging independent samples reduces noise variance to , so downsampling also denoises, at the price of blurring detail finer than .
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?
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.
PCA normal estimation fits a tangent plane to the nearest neighbors by computing the covariance matrix and taking the eigenvector with the smallest eigenvalue as the normal. The surface variation measures local planarity: for flat surfaces and for isotropic noise. The neighborhood size controls the smoothness-detail trade-off: larger averages more points but smears sharp edges.
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
The previous topic gave us neighbour queries, downsampling and normals, all hand-designed operations. To recognise a chair or label every point of a street scene, we want to learn features instead, and a point cloud resists the standard deep-learning tools. A CNN needs a grid, but points have none. An MLP or RNN needs a fixed order, but a cloud of points has equally valid orderings, and a network that gives different answers for different orderings of the same object is broken. Earlier work sidestepped this by voxelizing the cloud or rendering it to images, losing detail or multiplying cost. PointNet (Qi et al., CVPR 2017) was the first widely adopted network to consume raw points. Its recipe is simple: apply the same small MLP to every point independently, then combine the per-point features with max-pooling, a symmetric function whose output cannot depend on order. This topic covers that permutation-invariance argument, the T-Net that tries to put each cloud in a canonical pose, and the critical-point analysis that explains PointNet's robustness to missing points. Its blind spot, local structure, motivates PointNet++ in the next topic.
Definition
PointNet is a neural network for unordered point sets that computes : a shared multilayer perceptron embeds each point, element-wise max-pooling aggregates them into a global feature independent of point order, and a network maps that feature to class scores or, concatenated with per-point features, to per-point labels.
In this topic
- 1Permutation Invariance via Max-Pooling
- 2T-Net: Spatial Transformer for Point Cloud Alignment
- 3Critical Points and Network Interpretability
Permutation Invariance via Max-Pooling
A point cloud of points can be presented in different orderings, and the network must produce the same output for all of them. PointNet solves this by applying identical MLPs (shared weights) to each point independently, producing a per-point feature vector, then aggregating across all points using max-pooling. Max-pooling is a symmetric function: max(a, b, c) = max(c, a, b) = max(b, c, a) regardless of input order. The resulting global feature vector is a fixed-size descriptor of the entire point cloud. This is provably a universal approximator for continuous set functions.
PointNet achieves permutation invariance through the composition where is a shared MLP applied independently to each point, and is element-wise over the points. This works because is a symmetric function: . The universal approximation theorem for sets guarantees that this architecture can approximate any continuous set function to arbitrary precision, given sufficient width .
PointNet processes 1024 points with a shared MLP that maps each point from 3D to 1024D features. Max-pooling produces a 1024D global feature. How many parameters does the shared MLP have (layers: 3->64->128->1024)?
T-Net: Spatial Transformer for Point Cloud Alignment
PointNet's T-Net is a mini-PointNet (shared MLP, max-pool, fully connected layers) that predicts a matrix applied to the input coordinates; a second T-Net predicts a matrix applied to per-point features. The idea, borrowed from spatial transformer networks, is to map each cloud toward a canonical pose before feature extraction. It does not make the network rotation invariant: the matrix is learned, not guaranteed, and the paper still trains with random rotations about the up axis. A regularizer keeps the feature transform near orthogonal so it cannot collapse dimensions. In the ablation, the input transform alone added 0.8 accuracy points.
The T-Net outputs an unconstrained matrix , so it can scale, shear or even collapse the space. The penalty is zero exactly when is orthogonal, a rotation or reflection, which preserves distances and so cannot throw information away. For the input transform this is barely needed, but the feature transform has 4,096 free entries and is hard to optimize. The PointNet ablation shows it: the feature transform alone scored 86.9 percent on ModelNet40, below no transform (87.1), rising to 87.4 with the regularizer and 89.2 with both transforms.
The input T-Net predicts a matrix. The regularization loss is . If , compute .
Critical Points and Network Interpretability
An important theoretical property of PointNet is that the max-pooling layer selects a subset of 'critical points' that determine the global feature. For each feature dimension, only the point with the maximum activation contributes to the output. This means the entire point cloud can be summarized by a small set of critical points (at most 1024 for a 1024-dimensional feature), and the network is robust to perturbation or removal of non-critical points. This also means PointNet is inherently robust to noise and outliers, as long as the critical points remain intact.
Critical points are the input points that activate the maximum in each of the feature dimensions: . The global feature vector depends only on these critical points — all other points could be removed without changing the output. Typically , meaning PointNet learns to identify a sparse skeleton of the most informative points. This provides interpretability: the critical set reveals which geometric features (corners, edges, tips) the network considers most discriminative.
A PointNet with 512D global features processes a cloud of 2048 points. At most how many critical points determine the output? If 500 random points are removed, what is the probability that no critical point is lost (assuming uniform distribution)?
PointNet, the previous topic, sees each point alone and then the whole cloud at once; nothing in between. That misses exactly the structure that CNNs exploit in images: local patterns such as an edge, a corner or a curved patch, built up into larger parts. A PointNet feature for a chair leg is computed without ever relating the leg's points to each other, so fine geometry and generalization to new scenes suffer. Point clouds add a second difficulty: density varies wildly, dense near a LiDAR and sparse far away, so a neighbourhood of fixed size holds hundreds of points in one place and two in another. PointNet++ (Qi et al., NeurIPS 2017) applies PointNet recursively to local neighbourhoods. Set abstraction layers sample centroids with farthest point sampling, group nearby points with a ball query and summarize each group with a small PointNet. Multi-scale grouping combines several radii so the network copes with uneven density. Feature propagation interpolates the coarse features back to every point for segmentation, much like a U-Net decoder. Together these make PointNet++ the template for most later point-based networks, including the segmentation models later in this chapter.
Definition
PointNet++ is a hierarchical point-set network. Each set abstraction layer selects centroids by farthest point sampling, groups neighbours within a radius, and encodes each group with a shared mini-PointNet on relative coordinates. Multi-scale grouping concatenates features from several radii, and feature propagation upsamples with inverse-distance interpolation plus skip connections for per-point prediction.
In this topic
- 1Set Abstraction Layers
- 2Multi-Scale Grouping (MSG)
- 3Feature Propagation for Segmentation
Set Abstraction Layers
A Set Abstraction (SA) layer has three components: sampling, grouping, and PointNet. Sampling selects a subset of representative points from the input points using Farthest Point Sampling (FPS), which greedily picks points that are maximally distant from already-selected points, ensuring good spatial coverage. Grouping finds the nearest neighbors of each sampled point (ball query within radius or kNN), defining a local region. PointNet is applied to each local region independently, producing a feature vector for each sampled point. The output is a smaller set of points, each with richer features that encode local geometry. Stacking SA layers creates a hierarchy: global feature.
Set Abstraction (SA) layers hierarchically downsample the point cloud: (1) Farthest Point Sampling selects centroids that maximize coverage, (2) Ball Query groups all points within radius of each centroid, (3) a mini-PointNet processes each group independently. The output is points with enriched features that encode local neighborhood structure. This hierarchy addresses PointNet's weakness: by processing local neighborhoods, the network learns fine-grained geometric patterns that max-pooling over the entire cloud would average out.
A PointNet++ has 3 SA layers: (N=4096, K=32, r=0.1) -> (N=1024, K=32, r=0.2) -> (N=256, K=32, r=0.4). How many PointNet operations are performed at each level?
Multi-Scale Grouping (MSG)
Different regions of a point cloud may have varying density (dense near the sensor, sparse far away). Single-scale grouping with a fixed radius may miss context in dense regions or lack neighbors in sparse regions. Multi-Scale Grouping addresses this by applying multiple ball queries with different radii (e.g., r=0.1, 0.2, 0.4) at each centroid, running separate PointNets on each scale, and concatenating the resulting features. This gives each point features that capture both fine-grained local patterns (small radius) and broader context (large radius). The alternative is Multi-Resolution Grouping (MRG), which uses features from the previous SA level as an additional input when the local neighborhood is too sparse.
Multi-Scale Grouping (MSG) applies ball queries at multiple radii to each centroid, extracting features at different scales and concatenating them: . This captures both fine-grained local detail (small ) and broader context (large ) for each point. The computational cost scales linearly with the number of radii, but the representation power improves significantly for objects with features at multiple spatial scales.
MSG with radii [0.1, 0.2, 0.4] and max neighbors [16, 32, 64] at a centroid. Each scale's PointNet outputs 128D features. What is the concatenated feature dimension? What is the compute cost relative to single-scale (r=0.2, K=32)?
Feature Propagation for Segmentation
Segmentation needs a label for every input point, but set abstraction leaves features only on a few coarse centroids. Feature propagation carries them back level by level. For each point at the finer level, it finds the nearest coarse points and averages their features with weights , normalized to sum to 1; the paper's default is , inverse squared distance. The interpolated feature is concatenated with the skip-linked feature saved at that level during encoding, as in a U-Net, and a shared MLP refines it. Interpolation alone is smooth and blurs boundaries between objects; the skip features restore local detail.
Inverse distance weighting with is a partition of unity: weights are positive and sum to 1, so the result lies in the convex hull of the neighbours' features, and it interpolates exactly at each coarse point. The exponent sets locality; PointNet++ uses and . Because the result is a smooth blend, it cannot create a sharp boundary that the coarse level did not resolve, which is why the skip-linked features and the unit PointNet that follows are essential for crisp segmentation.
Feature propagation from 256 coarse points to 1024 fine points uses 3-nearest-neighbor interpolation. A fine point has neighbors at distances [0.05, 0.12, 0.30]m. What are the interpolation weights?
PointNet and PointNet++ work on raw points, but they inherit a cost: every layer needs neighbour searches, and farthest point sampling scales badly to large scenes. The alternative is to bring the cloud back to a grid, voxelize it, and reuse the mature machinery of convolutions. The obstacle is emptiness. A dense grid has 16.7 million cells, and a LiDAR scan or indoor scan fills only a few percent, mostly on surfaces, so a dense 3D CNN spends almost all its memory and arithmetic on air. This topic covers the three ideas that made voxel methods practical. Sparse voxelization stores only occupied cells as coordinates plus features in a hash table. Sparse convolutions, as in MinkowskiNet and the spconv library, compute outputs only where data exists, and submanifold variants keep the active set from growing layer after layer. Pillar encodings, introduced by PointPillars, collapse the vertical axis into a 2D bird's-eye-view image that ordinary 2D CNNs process at over 60 Hz. These representations dominate LiDAR detection and large-scale segmentation, and the next topic compares them with point-based networks on segmentation benchmarks.
Definition
Voxelization quantizes a point cloud onto a regular 3D grid, storing aggregated features per occupied cell. Sparse 3D convolution applies a kernel only at active voxels, gathering neighbours through a coordinate hash map, with memory and computation proportional to occupied cells. Pillar encodings use vertical columns, encoding each column's points into a 2D bird's-eye-view feature map.
In this topic
- 1Dense and Sparse Voxelization
- 2MinkowskiNet and Sparse 3D Convolutions
- 3VoxelNet and Pillar-Based Representations
Dense and Sparse Voxelization
Dense voxelization maps a point cloud to a regular 3D grid where each voxel stores features (occupancy, averaged point features, or learned embeddings). A voxel at grid position (i, j, k) aggregates all points falling within it. Dense grids have memory cost for resolution , which is prohibitive at high resolution: a grid requires 16.7 million voxels even when only 1% are occupied. Sparse voxelization stores only the occupied voxels using hash tables or coordinate lists, reducing memory from to where is the number of occupied voxels. Libraries like MinkowskiEngine and TorchSparse implement sparse tensors and sparse 3D convolutions that operate only on non-empty voxels.
Dense voxelization maps points to a regular grid where each voxel stores aggregated features. The memory cost is regardless of point count — a grid needs voxels, each storing a feature vector. Typical LiDAR point clouds are % empty, making dense voxelization extremely wasteful. Sparse voxelization stores only occupied voxels using hash maps, reducing memory from to — typically a reduction or more.
A room (10m x 10m x 3m) is voxelized at 2cm resolution. How many voxels in a dense grid? If 3% are occupied, how much memory does sparse vs dense representation use (32 features per voxel, float32)?
MinkowskiNet and Sparse 3D Convolutions
MinkowskiNet (Choy et al., CVPR 2019) builds U-Net-style networks from sparse 3D convolutions. A sparse convolution computes outputs only at active coordinates, gathering inputs through a hash map of occupied voxels. Two flavours matter. Generalized or generative convolutions may create outputs at new coordinates within the kernel's reach, which strided downsampling and transposed upsampling need. Submanifold convolutions output only at already-active sites, so stacked layers do not dilate the active set into empty space. The trade-off is a narrower receptive field across gaps. MinkowskiNet reached 67.9 percent mIoU on ScanNet at submission, a large step over point-based methods then, and the same engine powers many later 3D detectors.
MinkowskiNet implements sparse 3D convolutions that operate only on occupied voxels: the kernel is applied at each occupied voxel, but only neighbor lookups that hit other occupied voxels contribute. The output feature at voxel is where is the set of occupied voxels. This maintains exact equivalence to dense convolution on occupied regions while skipping all empty-space computation.
A sparse 3D convolution with kernel size 3x3x3, stride 1, has 96 input channels and 128 output channels. How many parameters? If applied to 50,000 active voxels, compare FLOPs to dense application on a 200^3 grid.
VoxelNet and Pillar-Based Representations
VoxelNet (Zhou and Tuzel, 2018) learned LiDAR detection end to end: a Voxel Feature Encoding layer runs a small PointNet inside each voxel, and dense 3D convolutional middle layers feed a 2D detection head. SECOND later replaced those middle layers with sparse convolutions. PointPillars (Lang et al., 2019) removes 3D convolution altogether: each pillar is a full-height column, a PointNet encodes its points, and the features are scattered into a 2D pseudo-image processed by an ordinary 2D CNN. On KITTI it ran at 62 Hz while beating earlier LiDAR-only detectors. The price is coarse vertical detail, which hurts small objects such as pedestrians.
Pillar-based representations (VoxelNet's successor PointPillars) use tall voxels spanning the full height dimension: each pillar at contains all points with and regardless of . This reduces the 3D problem to 2D: the pillar grid is processed by a PointNet per pillar, then scattered to a pseudo-image of shape that standard 2D convolutions can process. The height compression sacrifices vertical resolution but dramatically reduces computation.
PointPillars uses pillars of size 0.16m x 0.16m in a 60m x 60m detection range. How many pillars in the BEV grid? If each pillar has at most 100 points and the PointNet produces 64D features, what is the BEV feature map size?
The previous topics built two families of encoders, point-based networks such as PointNet++ and sparse voxel networks such as MinkowskiNet. Segmentation is where they meet their hardest test: a label for every point, in scenes of millions of points, where one class, the road or the floor, outnumbers another, a pedestrian or a chair, by a hundred to one. A street-scene model that labels 95 percent of points correctly can still miss every cyclist. This topic covers the three forms of the task and how they are scored. Semantic segmentation gives each point a class and is measured by mean intersection over union, which weights rare classes as heavily as common ones. Instance and panoptic segmentation also separate objects of the same class, chair 1 from chair 2, usually by clustering learned embeddings or offsets. Large-scale efficiency is the third concern: RandLA-Net shows that random sampling plus strong local aggregation processes whole LiDAR scans at once instead of cutting them into small blocks. The final two topics leave learning behind for the geometric workhorses that align and model clouds, ICP and RANSAC.
Definition
Point cloud semantic segmentation assigns each point a class label; instance segmentation also assigns an object identity within thing classes; panoptic segmentation does both, giving stuff classes semantic labels only. Results are scored by per-class intersection over union averaged into mIoU, and by panoptic quality for the combined task.
In this topic
- 1Semantic Segmentation on Point Clouds
- 2Instance Segmentation and Panoptic Segmentation
- 3RandLA-Net: Efficient Large-Scale Segmentation
Semantic Segmentation on Point Clouds
Semantic segmentation predicts a class label for every input point. PointNet-based methods concatenate the global feature with per-point features and pass through an MLP classifier. PointNet++ and KPConv use hierarchical features with skip connections for better accuracy. Voxel-based methods like MinkowskiNet process a sparse 3D U-Net and map predictions back to points. The standard evaluation metric is mean Intersection over Union (mIoU), computed per-class and averaged. Challenges include class imbalance (floors have many more points than chairs), varying point density, and distinguishing objects with similar geometry but different semantics (table vs desk).
Semantic segmentation assigns a class label to every point: the network computes for each of points across classes. The per-point cross-entropy loss is straightforward but class imbalance (floors have millions of points, small objects have hundreds) requires weighted losses: where is the class frequency, or focal loss that downweights easy examples.
A segmentation model predicts labels for 100,000 points in a room. Ground truth has 5 classes: floor (40K), wall (30K), ceiling (15K), chair (10K), table (5K). The model gets 95% of floor correct, 90% wall, 88% ceiling, 60% chair, 45% table. Compute mIoU.
Instance Segmentation and Panoptic Segmentation
Instance segmentation groups points belonging to the same object instance (chair_1 vs chair_2). Top-down methods first detect 3D bounding boxes, then segment points within each box. Bottom-up methods predict per-point embeddings where points of the same instance have similar embeddings, then cluster the embeddings. Panoptic segmentation combines both: stuff classes (wall, floor, ceiling) get semantic labels only, while thing classes (chairs, tables) get both semantic labels and instance IDs. 3D-BoNet, PointGroup, and Mask3D are leading approaches, with Mask3D using a transformer-based architecture that directly predicts instance masks through cross-attention between queries and point features.
Instance segmentation on point clouds typically uses a proposal-free approach: predict a per-point embedding such that points on the same object have similar embeddings and points on different objects have dissimilar embeddings. The discriminative loss pulls same-instance embeddings within margin : and pushes different-instance means apart: .
A room has 3 chairs, each with ~2000 points. An instance segmentation model using embedding clustering produces embeddings where intra-instance distance is 0.3 and inter-instance distance is 1.2. What clustering threshold separates instances?
RandLA-Net: Efficient Large-Scale Segmentation
RandLA-Net (Hu et al., CVPR 2020) segments scans of up to a million points in one pass instead of cutting them into small blocks. Its first change is the sampler: farthest point sampling picks of points in time, effectively quadratic for a fixed fraction, and the paper measured over 200 seconds to sample 10 percent of a million points, while random sampling is linear and nearly free. Random sampling can drop small objects, so a Local Feature Aggregation module compensates: relative-position encoding, attentive pooling over neighbours, and dilated residual blocks that widen the receptive field. The paper processes a 100,000-point scan in 0.04 s.
RandLA-Net achieves efficient large-scale segmentation ( points) by replacing costly farthest-point sampling with random sampling, then compensating for the information loss with Local Feature Aggregation (LFA) modules. Each LFA applies attentive pooling: where attention weights are learned from feature and position differences. Stacking multiple LFA modules with progressive downsampling builds receptive fields of neighbors despite starting from nearest neighbors per point.
FPS on 1M points takes operations. Random sampling takes operations. If the GPU processes ops/sec, compare the times.
Related Problems on PixelBank
The learned models of the previous topics label a single cloud, but many tasks need two clouds in the same frame. A LiDAR on a moving car captures a new scan ten times a second, and mapping requires knowing how far the car moved between them. A handheld scanner captures a statue from several sides, and the partial scans must be stitched together. A factory compares a scanned part with its CAD model. Each case asks for the rigid transformation, a rotation and a translation, that best overlays one cloud on another, without knowing which point matches which. Iterative closest point (ICP), introduced by Besl and McKay and by Chen and Medioni in 1992, solves this by alternating two easy steps: guess correspondences by nearest neighbour, using the k-d trees from the first topic, then solve for the best rigid motion in closed form. This topic covers the point-to-point version, the faster point-to-plane version that uses the normals estimated earlier, and robust variants that survive partial overlap and moving objects. ICP only refines a pose; the next topic's RANSAC is one way to find a good starting guess.
Definition
Iterative closest point registers a source cloud to a target by alternating correspondence and alignment: match each transformed source point to its nearest target point, then compute the rigid transform minimizing the summed squared point-to-point or point-to-plane distances. Iteration stops when the error change falls below a threshold; convergence is to a local minimum.
In this topic
- 1Point-to-Point ICP
- 2Point-to-Plane ICP
- 3Robust ICP and Outlier Rejection
Point-to-Point ICP
Point-to-point ICP iterates between two steps: (1) for each point in the source cloud, find the closest point in the target cloud (correspondence step), and (2) find the rigid transformation that minimizes the sum of squared distances between corresponding points (alignment step). The alignment step has a closed-form solution using SVD of the cross-covariance matrix. The algorithm converges monotonically (the error decreases at every step) and terminates when the change in error falls below a threshold. However, ICP only guarantees convergence to a local minimum---the initial alignment must be reasonable for the algorithm to find the correct registration. Typical convergence takes 20-50 iterations.
Point-to-point ICP iterates: (1) find closest point for each source point , (2) solve in closed form using SVD of the cross-covariance matrix . The solution is and where . Each iteration reduces the objective monotonically, guaranteeing convergence to a local minimum.
ICP aligns 10,000 source points to a target cloud. After 30 iterations, RMSE drops from 0.15m to 0.008m. If convergence is declared at m, and the last 5 RMSE values are [0.0092, 0.0085, 0.0081, 0.0079, 0.0078], how many more iterations are needed?
Point-to-Plane ICP
Point-to-plane ICP replaces the point-to-point distance with the distance from each source point to the tangent plane at its corresponding target point. The error for each pair is , where is the target point's normal. This formulation converges much faster than point-to-point ICP (typically 5-10 iterations vs 30-50) because it correctly handles sliding along surfaces: a source point can move along the target surface without penalty, only penalizing normal-direction offsets. The alignment step no longer has a closed-form SVD solution and requires linearization (small-angle approximation) solved as a 6x6 linear system. Point-to-plane is the standard choice for most practical applications.
Point-to-plane ICP modifies the error metric to where is the normal at the target point. This measures the distance to the tangent plane rather than the point itself, converging faster than point-to-point because it allows sliding along flat surfaces. The linearized solution (for small rotations ) reduces to a linear system, solvable in microseconds. The faster convergence comes from the reduced constraint — each correspondence constrains only the normal direction, leaving tangential movement free.
A source point p_s = (1.1, 2.0, 3.05) has target correspondence p_t = (1.0, 2.0, 3.0) with normal n_t = (0, 0, 1). Compute point-to-point and point-to-plane errors.
Robust ICP and Outlier Rejection
Standard ICP is sensitive to outliers: incorrect correspondences (from partial overlap, noise, or dynamic objects) can bias the transformation estimate. Robust ICP variants address this by rejecting outliers during the correspondence step. Common strategies include: distance thresholding (reject pairs with distance above a threshold, which decreases over iterations), trimmed ICP (sort pairs by distance and use only the best 70-80%), and M-estimator ICP (replace the squared distance with a robust kernel like Huber or Cauchy that downweights large residuals). Additionally, normal compatibility filtering rejects pairs where the source and target normals differ by more than a threshold angle, which eliminates many incorrect correspondences at surface boundaries.
Robust ICP handles outliers by replacing the least-squares objective with robust norms: the Huber loss for and for downweights large residuals from incorrect correspondences. Alternatively, trimmed ICP sorts residuals and uses only the top % closest matches — typically %. The overlap ratio between two scans determines the optimal trim fraction: if only % of the source has correspondences in the target, using % introduces outlier correspondences that bias the alignment.
ICP with 5000 correspondences has residuals: 4000 points < 0.1m (inliers) and 1000 points between 0.5m-2m (outliers). Compare the RMSE with and without trimming the worst 20%.
Related Problems on PixelBank
ICP, the previous topic, assumes most correspondences are right and refines from a good start. Many 3D tasks start from data that is mostly wrong for any one model. Finding the floor in an indoor scan means fitting a plane to a cloud in which walls, furniture and people are all outliers, often more than half of the points. Least squares fails here, because one far outlier can tilt the fitted plane arbitrarily. Random sample consensus, RANSAC (Fischler and Bolles, 1981), inverts the logic: sample the minimum number of points that define a model, three for a plane, count how many other points agree within a tolerance, and keep the model with the most support. The number of samples needed depends on the inlier ratio and the sample size, not on the number of points, which makes RANSAC fast even for millions of points. This topic covers the single-plane case and its iteration formula, sequential detection of several primitives in one scene, and fitting spheres and cylinders, where surface normals from the first topic can cut the sample size and the iteration count sharply.
Definition
RANSAC robustly fits a model to data with outliers by repeatedly sampling a minimal subset of points, fitting a model to it, and counting inliers within a distance threshold. After iterations it finds an all-inlier sample with probability , given inlier ratio ; the best model is then refitted to its inliers.
In this topic
- 1RANSAC Algorithm for Plane Fitting
- 2Multi-Model RANSAC and Primitive Detection
- 3RANSAC for Sphere and Cylinder Fitting
RANSAC Algorithm for Plane Fitting
RANSAC plane fitting repeatedly: (1) randomly samples 3 points and computes the plane through them, (2) counts how many remaining points lie within a distance threshold of that plane (inliers), and (3) keeps the plane with the most inliers. After reaching the iteration limit, the best plane is refined by fitting it to all its inliers using SVD. The number of iterations needed depends on the inlier ratio and the desired success probability: N = log(1-p) / log(1-w^s), where p is the desired success probability, w is the inlier ratio, and s is the minimum sample size (3 for planes). For example, with 50% inliers and 99% desired probability, N = log(0.01) / log(1-0.125) = 35 iterations.
RANSAC for plane fitting samples 3 random points to define a plane , then counts inliers with . The expected number of iterations to find a correct plane with probability is where is the inlier ratio. For and : iterations — remarkably efficient even at 50% outlier contamination.
A point cloud has 10,000 points. 60% are on a dominant plane, 25% on a second plane, and 15% are random noise. How many RANSAC iterations are needed for 99.9% probability of finding the dominant plane?
Multi-Model RANSAC and Primitive Detection
Real scenes contain multiple geometric primitives. Multi-model RANSAC detects them sequentially: fit the dominant model, remove its inliers, fit the next model from remaining points, and repeat. This peeling approach works well when primitives have different inlier counts. For simultaneous detection, methods like J-linkage or T-linkage cluster points by their preference for different models. Beyond planes, RANSAC can fit spheres (4 parameters, 4 sample points), cylinders (5 parameters), and cones. Each primitive type has its own minimum sample size and model computation. Efficient implementations use precomputed normal information to reject impossible samples early.
Multi-model RANSAC detects multiple primitives by iterating: fit the dominant model, remove its inliers, and repeat on the remaining points. For a scene with primitives, this sequential approach takes total RANSAC iterations. A potential failure mode is over-segmentation: noise points near a plane boundary may be claimed by the wrong primitive. The order of extraction matters — larger primitives (with more inliers and higher confidence) should be extracted first, as their inlier ratios are highest and require fewer iterations.
A room point cloud has: floor (30% points), 4 walls (15% each), and noise (10%). Sequential RANSAC needs to find all 5 planes. What is the order of detection, and how many iterations per detection (at 99% success)?
RANSAC for Sphere and Cylinder Fitting
RANSAC extends naturally to other geometric primitives. Sphere fitting requires 4 sample points (to determine center and radius from 4 equations: (x_i - cx)^2 + (y_i - cy)^2 + (z_i - cz)^2 = r^2). Cylinder fitting requires 2 points with normals (the cylinder axis is perpendicular to both normals, and the radius is determined from the distance to the axis). In practice, normal-guided sampling dramatically reduces the search space: for plane fitting, if the sampled points have inconsistent normals, the sample is immediately rejected without computing the plane. For cylinders, pairs of points with parallel normals are likely on the cylinder surface. This can reduce the required iterations by 10-100x.
Fitting spheres requires 4 random points (center plus radius ), and cylinders require 5 points (axis direction 2 DOF + axis point 2 DOF + radius 1 DOF). The inlier test becomes for spheres and for cylinders where is the distance from point to axis line. The required RANSAC iterations scale as where is the minimum sample size, so cylinder fitting () needs roughly more iterations than plane fitting () for the same inlier ratio.
A point cloud contains a sphere of radius 0.5m with 2000 points and 3000 noise points. Standard RANSAC uses 4 samples. Normal-guided RANSAC pre-filters points with consistent normals (pointing toward a common center). If 90% of sphere points pass the filter and 5% of noise passes, compare iterations needed (99% success).