---
id: "icp-registration"
title: "Iterative Closest Point (ICP) registration"
aliases: [ICP, iterative closest point]
domain: "capture"
stage: "capture"
realtime: "interactive"
platforms: [cpu, cuda, python]
year_introduced: 1992
inputs: [point-cloud]
outputs: [camera-poses, point-cloud]
style: "photoreal"
dynamic: "static"
cost: "offline"
authority: "Besl & McKay, 1992"
url: "https://texelatlas.vercel.app/t/icp-registration/"
sources_verified_at: "2026-11-29"
---
# Iterative Closest Point (ICP) registration (Besl & McKay, 1992)

> Aligns two overlapping 3D scans by alternating nearest-neighbour matching and a closed-form rigid transform fit until the residual stops improving.

## 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

## 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 use it

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)](https://texelatlas.vercel.app/t/structure-from-motion-colmap.md) when you only have photos and need poses, [DUSt3R](https://texelatlas.vercel.app/t/dust3r.md) 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.

## Cost

offline — Each iteration is dominated by nearest-neighbour search; real-time is feasible with GPU or small clouds, typically dozens of iterations.
Measured GPU Weight: 45.34× baseline (heavy) — 1.4917 ms median / 1.5431 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 43.01× baseline (heavy) — 0.6839 ms median (2.18× faster on L4).
Ampere A100 scaling: 32.43× baseline (heavy) — 0.9339 ms median (1.6× faster on A100).

## Failure modes

- 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

## Dataflow

- Inputs: point-cloud
- Outputs: camera-poses, point-cloud
- Platforms: cpu, cuda, python

## Presets

### ICP Registration — misaligned scans & correspondences (left) vs converged rigid SVD alignment (right) (glsl-fragment; rendered 2026-11-30)

```json
{
  "P_ITER_PROG": 0.88,
  "P_INIT_ERR": 0.75,
  "P_CORR_VIS": 0.95,
  "P_SPLIT": 0.48
}
```

```glsl
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.

## Combines with

- [Poisson Surface Reconstruction](https://texelatlas.vercel.app/t/poisson-surface-reconstruction.md): After ICP aligns scans into one cloud with normals, Poisson reconstruction fuses it into a watertight mesh.
- [Structure-from-Motion (COLMAP)](https://texelatlas.vercel.app/t/structure-from-motion-colmap.md): SfM gives a global, feature-based pose that ICP then refines against depth or lidar scans.

## Sources

1. [primary] P.J. Besl, Neil D. McKay (1992) A method for registration of 3-D shapes. IEEE Transactions on Pattern Analysis and Machine Intelligence. https://doi.org/10.1109/34.121791 (verified via crossref on 2026-11-29)
2. [secondary] Yang Chen, Gérard Medioni (1992) Object modelling by registration of multiple range images. Image and Vision Computing. https://doi.org/10.1016/0262-8856(92)90066-c (verified via crossref on 2026-11-29)
3. [secondary] S. Rusinkiewicz, M. Levoy Efficient variants of the ICP algorithm. Proceedings Third International Conference on 3-D Digital Imaging and Modeling. https://doi.org/10.1109/im.2001.924423 (verified via crossref on 2026-11-29)
4. [implementation] isl-org (2016) isl-org/Open3D. https://github.com/isl-org/Open3D License: NOASSERTION. (verified via github on 2026-11-29)
5. [implementation] PointCloudLibrary (2013) PointCloudLibrary/pcl. https://github.com/PointCloudLibrary/pcl License: NOASSERTION. (verified via github on 2026-11-29)

## Cite this entry

Texel. "Iterative Closest Point (ICP) registration." https://texelatlas.vercel.app/t/icp-registration/ (accessed 2026-12-01).
