Iterative Closest Point (ICP) registration
Aligns two overlapping 3D scans by alternating nearest-neighbour matching and a closed-form rigid transform fit until the residual stops improving.
Also known as ICP, iterative closest point
In the family Capture, reconstruction & splatting, scan alignment
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | |
| Babylon.js 9.38.0 | None found | |
| Godot 4.7 | None found | |
| Unity | None found | |
| Unreal 5.7 | None found | Not in engine. |
| Blender 5.2 | None found | Not in Blender. |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
Start with an initial guess of the rigid transform between a source and a target cloud. Each iteration: transform the source, find for every point its closest point on the target, optionally reject bad pairs by distance, normal angle or rank, then solve the best rotation and translation that minimises the squared distance between pairs, using an SVD of the cross-covariance or a quaternion eigenproblem. Apply it and repeat until the update is below a tolerance. The point-to-plane variant minimises distance along target normals and converges much faster on smooth surfaces. Generalised ICP weighs by local covariances, and colour or feature terms can be added. Nearest-neighbour queries run on a k-d tree or a voxel hash, which is the real cost. It converges only to a local minimum, so a coarse global alignment is needed first.
When to choose it
Reach for it when
- two scans do not line up in one coordinate frame
- align a depth scan to a reference model
- need to stitch overlapping lidar or scanner captures
- refine camera pose against a point cloud
Choose it to refine the alignment of range scans, depth frames or point clouds that already roughly overlap, and in SLAM or scan-stitching pipelines. Prefer Structure-from-Motion (COLMAP) when you only have photos and need poses, DUSt3R for learned feature-free pose and geometry from image pairs, and global registration (feature matching with RANSAC) to initialise ICP when the starting pose is far off.
Field marks
- Converges to a wrong local minimum if the initial pose is far off
- Flat or symmetric geometry such as corridors and planes leaves sliding degrees of freedom unconstrained
- Outliers and non-overlapping regions bias the fit unless pairs are rejected or the overlap is trimmed
- Different sampling density or noise between scans causes systematic bias in point-to-point matching
Presets
ICP Registration — misaligned scans & correspondences (left) vs converged rigid SVD alignment (right)
{
"P_ITER_PROG": 0.88,
"P_INIT_ERR": 0.75,
"P_CORR_VIS": 0.95,
"P_SPLIT": 0.48
}Show GLSL (84 lines)
const float P_ITER_PROG = 0.88; // P ICP Convergence [0.0, 1.0, 0.02]
const float P_INIT_ERR = 0.75; // P Initial Pose Err [0.1, 1.2, 0.04]
const float P_CORR_VIS = 0.95; // P Match Lines [0.0, 1.5, 0.05]
const float P_SPLIT = 0.48; // P Unaligned / Aligned [0.0, 1.0, 0.02]
mat2 rot2(float a) { float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }
float sdSeg(vec2 p, vec2 a, vec2 b) {
vec2 pa = p - a, ba = b - a;
float h = clamp(dot(pa, ba) / max(dot(ba, ba), 1e-5), 0.0, 1.0);
return length(pa - ba * h);
}
// Target 2D/3D-projected curved LiDAR scan profile (24 scanned surface points)
vec2 targetPt(int idx) {
float u = (float(idx) / 23.0) * 2.0 - 1.0;
float ang = u * 2.25;
float r = 0.27 + 0.075 * sin(ang * 3.0) + 0.045 * cos(ang * 5.0);
return vec2(cos(ang) * r, sin(ang) * r);
}
vec3 aces(vec3 x) {
x = max(x, 0.0);
return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
float screenX = fragCoord.x / max(iResolution.x, 1.0);
float split = clamp(P_SPLIT, 0.0, 1.0);
bool isRight = screenX >= split;
float prog = clamp(P_ITER_PROG, 0.0, 1.0);
float initErr = clamp(P_INIT_ERR, 0.05, 1.4);
float corrVis = clamp(P_CORR_VIS, 0.0, 1.5);
// Engineering coordinate backdrop
vec3 col = mix(vec3(0.022, 0.030, 0.050), vec3(0.052, 0.068, 0.108), smoothstep(-0.55, 0.55, uv.y));
vec2 g = abs(fract(uv * 8.0 - 0.5) - 0.5);
col += vec3(0.018, 0.028, 0.044) * smoothstep(0.035, 0.008, min(g.x, g.y));
// Periodic ICP iteration sweep on right side; initial unaligned pose on left side
float iterCycle = 0.5 + 0.5 * sin(iTime * 0.9 - 1.2);
float conv = isRight ? clamp(prog * (0.45 + 0.55 * iterCycle), 0.0, 1.0) : 0.08;
float remErr = (1.0 - conv) * initErr;
float rotErr = 0.58 * remErr;
vec2 transErr = vec2(0.16, -0.11) * remErr;
vec2 center = isRight ? vec2(0.32, 0.0) : vec2(-0.32, 0.0);
vec2 p = uv - center;
// Draw 24 target points (cyan), source points (amber), and closest-point correspondence vectors
for (int i = 0; i < 24; i++) {
vec2 qt = targetPt(i);
// Rigidly misaligned source scan + slight sensor noise
vec2 qs = rot2(rotErr) * qt + transErr + vec2(0.006 * sin(float(i) * 4.3), 0.006 * cos(float(i) * 3.1));
// Closest-point correspondence line from source point to target point
float dLine = sdSeg(p, qs, qt);
float lineMask = smoothstep(0.0045, 0.0012, dLine);
float errLen = clamp(length(qs - qt) * 3.5, 0.0, 1.0);
vec3 lineCol = mix(vec3(0.24, 0.95, 0.58), vec3(0.98, 0.34, 0.28), errLen);
col += lineCol * lineMask * 0.65 * corrVis;
// Target scan point (cyan)
float dT = length(p - qt);
col = mix(col, vec3(0.14, 0.84, 0.98), smoothstep(0.014, 0.006, dT));
col += vec3(0.14, 0.84, 0.98) * exp(-dT * 42.0) * 0.25;
// Source scan point (warm amber)
float dS = length(p - qs);
col = mix(col, vec3(0.98, 0.58, 0.16), smoothstep(0.013, 0.005, dS));
col += vec3(0.98, 0.58, 0.16) * exp(-dS * 42.0) * 0.25;
}
// Residual RMSE convergence ring around centroid
float rmseR = 0.04 + 0.18 * remErr;
float ring = exp(-abs(length(p) - rmseR) * 48.0);
col += mix(vec3(0.22, 0.96, 0.58), vec3(0.98, 0.36, 0.24), remErr) * ring * 0.55;
float sep = smoothstep(0.0035, 0.0008, abs(screenX - split));
col = mix(col, vec3(0.95, 0.97, 1.0), sep);
fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}Attribution: MIT — written for this index.
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| icp-registration-live | Tesla T4 1920x1080 | 45.3× baseline (heavy) · 1.49 ms / 1.54 ms | opengl-timer-query · 32 frames · GPU Weight Atlas · Colab T4 sweep |
| icp-registration-live | NVIDIA L4 1920x1080 | 43.0× baseline (heavy) · 0.684 ms / 0.693 ms · 2.2× faster on L4 | opengl-timer-query · Cross-architecture validation |
| icp-registration-live | NVIDIA A100-SXM4-40GB 1920x1080 | 32.4× baseline (heavy) · 0.934 ms / 0.934 ms · 1.6× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
From the citation graph (Crossref reference lists): its primary source cites GJK and EPA convex collision detection; cited by Shape matching (meshless deformation).
Crosses
- Poisson Surface Reconstruction: After ICP aligns scans into one cloud with normals, Poisson reconstruction fuses it into a watertight mesh.
- Structure-from-Motion (COLMAP): SfM gives a global, feature-based pose that ICP then refines against depth or lidar scans.
Sources
- primaryP.J. Besl, Neil D. McKay (1992). A method for registration of 3-D shapes. IEEE Transactions on Pattern Analysis and Machine Intelligence.Verified via crossref · 2026-11-29doi:10.1109/34.121791
- secondaryYang Chen, Gérard Medioni (1992). Object modelling by registration of multiple range images. Image and Vision Computing.Verified via crossref · 2026-11-29doi:10.1016/0262-8856(92)90066-c
- secondaryS. Rusinkiewicz, M. Levoy. Efficient variants of the ICP algorithm. Proceedings Third International Conference on 3-D Digital Imaging and Modeling.Verified via crossref · 2026-11-29doi:10.1109/im.2001.924423
- implementationisl-org (2016). isl-org/Open3D. Open3D: A Modern Library for 3D Data ProcessingGitHub API · license NOASSERTION · 2026-11-29
- implementationPointCloudLibrary (2013). PointCloudLibrary/pcl. Point Cloud Library (PCL)GitHub API · license NOASSERTION · 2026-11-29