{
 "id": "icp-registration",
 "title": "Iterative Closest Point (ICP) registration",
 "aliases": [
  "ICP",
  "iterative closest point"
 ],
 "domain": "capture",
 "subdomain": "scan alignment",
 "stage": "capture",
 "realtime": "interactive",
 "platforms": [
  "cpu",
  "cuda",
  "python"
 ],
 "year_introduced": 1992,
 "inputs": [
  "point-cloud"
 ],
 "outputs": [
  "camera-poses",
  "point-cloud"
 ],
 "style": "photoreal",
 "dynamic": "static",
 "summary": "Aligns two overlapping 3D scans by alternating nearest-neighbour matching and a closed-form rigid transform fit until the residual stops improving.",
 "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": "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.",
 "cost": {
  "class": "offline",
  "notes": "Each iteration is dominated by nearest-neighbour search; real-time is feasible with GPU or small clouds, typically dozens of iterations."
 },
 "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"
 ],
 "sources": [
  {
   "role": "primary",
   "key": "doi:10.1109/34.121791",
   "type": "paper",
   "title": "A method for registration of 3-D shapes",
   "authors": [
    "P.J. Besl",
    "Neil D. McKay"
   ],
   "year": 1992,
   "venue": "IEEE Transactions on Pattern Analysis and Machine Intelligence",
   "url": "https://doi.org/10.1109/34.121791",
   "ids": {
    "doi": "10.1109/34.121791"
   },
   "license": null,
   "extra": {
    "csl_type": "journal-article"
   },
   "provenance": {
    "title": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1109/34.121791",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1109/34.121791",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1109/34.121791",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1109/34.121791",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1109/34.121791",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": 1,
   "__bib": "besl1992method"
  },
  {
   "role": "secondary",
   "key": "doi:10.1016/0262-8856(92)90066-c",
   "type": "paper",
   "title": "Object modelling by registration of multiple range images",
   "authors": [
    "Yang Chen",
    "Gérard Medioni"
   ],
   "year": 1992,
   "venue": "Image and Vision Computing",
   "url": "https://doi.org/10.1016/0262-8856(92)90066-c",
   "ids": {
    "doi": "10.1016/0262-8856(92)90066-c"
   },
   "license": null,
   "extra": {
    "csl_type": "journal-article"
   },
   "provenance": {
    "title": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1016/0262-8856(92)90066-c",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1016/0262-8856(92)90066-c",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1016/0262-8856(92)90066-c",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1016/0262-8856(92)90066-c",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1016/0262-8856(92)90066-c",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": 1,
   "__bib": "chen1992object"
  },
  {
   "role": "secondary",
   "key": "doi:10.1109/im.2001.924423",
   "type": "paper",
   "title": "Efficient variants of the ICP algorithm",
   "authors": [
    "S. Rusinkiewicz",
    "M. Levoy"
   ],
   "year": null,
   "venue": "Proceedings Third International Conference on 3-D Digital Imaging and Modeling",
   "url": "https://doi.org/10.1109/im.2001.924423",
   "ids": {
    "doi": "10.1109/im.2001.924423"
   },
   "license": null,
   "extra": {
    "csl_type": "proceedings-article"
   },
   "provenance": {
    "title": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1109/im.2001.924423",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1109/im.2001.924423",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1109/im.2001.924423",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1109/im.2001.924423",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1109/im.2001.924423",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": 1,
   "__bib": "rusinkiewiczefficient"
  },
  {
   "role": "implementation",
   "key": "gh:isl-org/open3d",
   "type": "code",
   "title": "isl-org/Open3D",
   "description": "Open3D: A Modern Library for 3D Data Processing",
   "authors": [
    "isl-org"
   ],
   "year": 2016,
   "venue": "GitHub",
   "url": "https://github.com/isl-org/Open3D",
   "ids": {
    "repo": "isl-org/Open3D"
   },
   "license": "NOASSERTION",
   "extra": {
    "stars": 14265,
    "stars_checked": "2026-11-29",
    "archived": false,
    "fork": false,
    "pushed_at": "2026-11-14T06:53:08Z",
    "language": "C++",
    "homepage": "http://www.open3d.org",
    "license_name": "Other"
   },
   "provenance": {
    "title": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/isl-org/Open3D",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/isl-org/Open3D",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/isl-org/Open3D",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/isl-org/Open3D",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/isl-org/Open3D",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "license": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/isl-org/Open3D",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": null,
   "__bib": "islorg2016open3d"
  },
  {
   "role": "implementation",
   "key": "gh:pointcloudlibrary/pcl",
   "type": "code",
   "title": "PointCloudLibrary/pcl",
   "description": "Point Cloud Library (PCL)",
   "authors": [
    "PointCloudLibrary"
   ],
   "year": 2013,
   "venue": "GitHub",
   "url": "https://github.com/PointCloudLibrary/pcl",
   "ids": {
    "repo": "PointCloudLibrary/pcl"
   },
   "license": "NOASSERTION",
   "extra": {
    "stars": 11236,
    "stars_checked": "2026-11-29",
    "archived": false,
    "fork": false,
    "pushed_at": "2026-11-14T10:09:18Z",
    "language": "C++",
    "homepage": "https://pointclouds.org/",
    "license_name": "Other"
   },
   "provenance": {
    "title": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/PointCloudLibrary/pcl",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/PointCloudLibrary/pcl",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/PointCloudLibrary/pcl",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/PointCloudLibrary/pcl",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/PointCloudLibrary/pcl",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "license": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/PointCloudLibrary/pcl",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": null,
   "__bib": "pointcloudlibrary2013pointcloudlibrary"
  }
 ],
 "presets": [
  {
   "id": "icp-registration-live",
   "title": "ICP Registration — misaligned scans & correspondences (left) vs converged rigid SVD alignment (right)",
   "runtime": "glsl-fragment",
   "params": {
    "P_ITER_PROG": 0.88,
    "P_INIT_ERR": 0.75,
    "P_CORR_VIS": 0.95,
    "P_SPLIT": 0.48
   },
   "basis": "original",
   "license_note": "MIT — written for this index.",
   "code": "const float P_ITER_PROG = 0.88; // P ICP Convergence [0.0, 1.0, 0.02]\nconst float P_INIT_ERR = 0.75; // P Initial Pose Err [0.1, 1.2, 0.04]\nconst float P_CORR_VIS = 0.95; // P Match Lines [0.0, 1.5, 0.05]\nconst float P_SPLIT = 0.48; // P Unaligned / Aligned [0.0, 1.0, 0.02]\n\nmat2 rot2(float a) { float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }\n\nfloat sdSeg(vec2 p, vec2 a, vec2 b) {\n  vec2 pa = p - a, ba = b - a;\n  float h = clamp(dot(pa, ba) / max(dot(ba, ba), 1e-5), 0.0, 1.0);\n  return length(pa - ba * h);\n}\n\n// Target 2D/3D-projected curved LiDAR scan profile (24 scanned surface points)\nvec2 targetPt(int idx) {\n  float u = (float(idx) / 23.0) * 2.0 - 1.0;\n  float ang = u * 2.25;\n  float r = 0.27 + 0.075 * sin(ang * 3.0) + 0.045 * cos(ang * 5.0);\n  return vec2(cos(ang) * r, sin(ang) * r);\n}\n\nvec3 aces(vec3 x) {\n  x = max(x, 0.0);\n  return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);\n}\n\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n  vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;\n  float screenX = fragCoord.x / max(iResolution.x, 1.0);\n  float split = clamp(P_SPLIT, 0.0, 1.0);\n  bool isRight = screenX >= split;\n  float prog = clamp(P_ITER_PROG, 0.0, 1.0);\n  float initErr = clamp(P_INIT_ERR, 0.05, 1.4);\n  float corrVis = clamp(P_CORR_VIS, 0.0, 1.5);\n\n  // Engineering coordinate backdrop\n  vec3 col = mix(vec3(0.022, 0.030, 0.050), vec3(0.052, 0.068, 0.108), smoothstep(-0.55, 0.55, uv.y));\n  vec2 g = abs(fract(uv * 8.0 - 0.5) - 0.5);\n  col += vec3(0.018, 0.028, 0.044) * smoothstep(0.035, 0.008, min(g.x, g.y));\n\n  // Periodic ICP iteration sweep on right side; initial unaligned pose on left side\n  float iterCycle = 0.5 + 0.5 * sin(iTime * 0.9 - 1.2);\n  float conv = isRight ? clamp(prog * (0.45 + 0.55 * iterCycle), 0.0, 1.0) : 0.08;\n  float remErr = (1.0 - conv) * initErr;\n\n  float rotErr = 0.58 * remErr;\n  vec2 transErr = vec2(0.16, -0.11) * remErr;\n  vec2 center = isRight ? vec2(0.32, 0.0) : vec2(-0.32, 0.0);\n  vec2 p = uv - center;\n\n  // Draw 24 target points (cyan), source points (amber), and closest-point correspondence vectors\n  for (int i = 0; i < 24; i++) {\n    vec2 qt = targetPt(i);\n    // Rigidly misaligned source scan + slight sensor noise\n    vec2 qs = rot2(rotErr) * qt + transErr + vec2(0.006 * sin(float(i) * 4.3), 0.006 * cos(float(i) * 3.1));\n\n    // Closest-point correspondence line from source point to target point\n    float dLine = sdSeg(p, qs, qt);\n    float lineMask = smoothstep(0.0045, 0.0012, dLine);\n    float errLen = clamp(length(qs - qt) * 3.5, 0.0, 1.0);\n    vec3 lineCol = mix(vec3(0.24, 0.95, 0.58), vec3(0.98, 0.34, 0.28), errLen);\n    col += lineCol * lineMask * 0.65 * corrVis;\n\n    // Target scan point (cyan)\n    float dT = length(p - qt);\n    col = mix(col, vec3(0.14, 0.84, 0.98), smoothstep(0.014, 0.006, dT));\n    col += vec3(0.14, 0.84, 0.98) * exp(-dT * 42.0) * 0.25;\n\n    // Source scan point (warm amber)\n    float dS = length(p - qs);\n    col = mix(col, vec3(0.98, 0.58, 0.16), smoothstep(0.013, 0.005, dS));\n    col += vec3(0.98, 0.58, 0.16) * exp(-dS * 42.0) * 0.25;\n  }\n\n  // Residual RMSE convergence ring around centroid\n  float rmseR = 0.04 + 0.18 * remErr;\n  float ring = exp(-abs(length(p) - rmseR) * 48.0);\n  col += mix(vec3(0.22, 0.96, 0.58), vec3(0.98, 0.36, 0.24), remErr) * ring * 0.55;\n\n  float sep = smoothstep(0.0035, 0.0008, abs(screenX - split));\n  col = mix(col, vec3(0.95, 0.97, 1.0), sep);\n\n  fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);\n}",
   "execution_fidelity": "conceptual-diagram",
   "proof": {
    "kind": "rendered",
    "label": "rendered 2026-11-30",
    "ok": true,
    "proof": {
     "ok": true,
     "technique": "icp-registration",
     "runtime": "glsl-fragment",
     "checked_at": "2026-11-30T20:35:50.000Z",
     "renderer": "Headless EGL Tesla T4/PCIe/SSE2, OpenGL 3.30 Core, 512×512, iTime=1.5",
     "stats": {
      "mean": 0.3973,
      "std": 0.1694,
      "min": 0.1673,
      "max": 0.951
     },
     "image": "/specimens/icp-registration-live.webp",
     "reason": null
    }
   }
  }
 ],
 "related": [
  "structure-from-motion-colmap",
  "dust3r",
  "poisson-surface-reconstruction"
 ],
 "extends": [],
 "supersedes": [],
 "combines_with": [
  {
   "id": "poisson-surface-reconstruction",
   "why": "After ICP aligns scans into one cloud with normals, Poisson reconstruction fuses it into a watertight mesh."
  },
  {
   "id": "structure-from-motion-colmap",
   "why": "SfM gives a global, feature-based pose that ICP then refines against depth or lidar scans."
  }
 ],
 "provenance": {
  "prose": "original text written for this index (research draft, editorially reviewed)",
  "sources_verified_at": "2026-11-29T15:51:27.588Z",
  "draft": "data/drafts/capture/icp-registration.json"
 },
 "solves": [
  "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"
 ],
 "authority": "Besl & McKay, 1992",
 "url": "https://texelatlas.vercel.app/t/icp-registration/",
 "execution_fidelity": "conceptual-diagram",
 "fidelity_label": "Visual Diagram",
 "benchmark_eligible": false,
 "gpu_weight": {
  "weight_x": 45.34,
  "tier": "heavy",
  "p50_ms": 1.4917,
  "p95_ms": 1.5431,
  "baseline_p50_ms": 0.0329,
  "gpu": "Tesla T4/PCIe/SSE2",
  "resolution": "1920x1080",
  "method": "opengl-timer-query",
  "frames": 32,
  "preset_id": "icp-registration-live",
  "execution_fidelity": "conceptual-diagram",
  "fidelity_label": "Visual Diagram",
  "benchmark_eligible": false,
  "generated_at": "2026-11-30T21:07:47Z",
  "l4": {
   "weight_x": 43.01,
   "tier": "heavy",
   "p50_ms": 0.6839,
   "p95_ms": 0.6927,
   "speedup_x": 2.18,
   "gpu": "NVIDIA L4/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0159
  },
  "a100": {
   "weight_x": 32.43,
   "tier": "heavy",
   "p50_ms": 0.9339,
   "p95_ms": 0.9344,
   "speedup_x": 1.6,
   "gpu": "NVIDIA A100-SXM4-40GB/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0288
  }
 }
}