--- title: ICP Lab - 3D Point Cloud Alignment emoji: 🎯 colorFrom: green colorTo: gray sdk: static app_file: index.html pinned: false license: mit tags: - robotics - computer-vision - point-cloud - education short_description: Explore 3D point-cloud alignment step by step. --- # ICP Lab: 3D point-cloud alignment An interactive, CPU-friendly educational demonstration of rigid point-to-point Iterative Closest Point (ICP), inspired by [Dev Kumar's 3D Point Cloud Registration with ICP project](https://github.com/devkumar-projects/Classical-Computer-Vision-Toolkit/tree/main/3d-point-cloud-registration-icp). It generates a synthetic asymmetric surface, applies a known perturbation and lets visitors inspect the iterative alignment. Drag to rotate the 3D view. Adjust rotation, translation and Gaussian noise; run the algorithm or advance one iteration at a time. The chart shows nearest-neighbour root mean square error (RMSE) in arbitrary units. The UI uses a perspective-projected view, while ICP itself fits a full 3D rigid transformation. ## Method and limits Each iteration finds Euclidean nearest-neighbour correspondences by brute force, then estimates the least-squares rigid transformation via Horn's unit-quaternion formulation. This implementation is a new, independent educational adaptation, not an exact execution of the source notebook or Open3D. It does not benchmark hardware, reconstruct a real scene, or claim globally optimal alignment. ICP is local: initialization, point-cloud geometry and noise can produce incorrect correspondences and local minima. RMSE here is measured against the current nearest neighbours, not a guarantee of recovery of the true pose. All points are generated in the browser; the demo requires no account, GPU, model downloads, or server-side inference. No data is uploaded. No libraries are needed. ## Run locally Serve the directory with any static server; for example: ```bash python3 -m http.server 8000 ``` Then open `http://localhost:8000`. For an optional algorithm check, run `node test.mjs` (Node.js 18+). ## Publish as a Hugging Face Space Create a **Static** Space and upload the contents of this folder at its root, preserving `README.md`, `index.html`, `style.css`, `app.js`, and `icp.js`. The YAML header configures the Space. No paid hardware is needed for a static Space. Inspect the finished public page before sharing. ## Further reading - [Original project and notebook](https://github.com/devkumar-projects/Classical-Computer-Vision-Toolkit/tree/main/3d-point-cloud-registration-icp) - [Related Kaggle notebook](https://www.kaggle.com/code/devkumarkaggle/3d-point-cloud-registration-with-icp) - B. K. P. Horn, “Closed-form solution of absolute orientation using unit quaternions,” *Journal of the Optical Society of America A* 4(4), 629–642 (1987), DOI: [10.1364/JOSAA.4.000629](https://doi.org/10.1364/JOSAA.4.000629). - P. J. Besl and N. D. McKay, “A method for registration of 3-D shapes,” *IEEE Transactions on Pattern Analysis and Machine Intelligence* 14(2), 239–256 (1992), DOI: [10.1109/34.121791](https://doi.org/10.1109/34.121791). ## License The demo code is available under the MIT License. The referenced original project has its own [MIT license](https://github.com/devkumar-projects/Classical-Computer-Vision-Toolkit/blob/main/LICENSE). ## Related engineering work Explore the [Engineering Workbench](https://huggingface.co/spaces/devkumarhf/Engineering-Workbench) for twelve source-linked projects, live RST synthesis and the original UR7e training-log explorer. The [Hugging Face collection](https://huggingface.co/collections/devkumarhf/robotics-perception-and-control-engineering-workbench-6afce1df9187d7a33c6da1ec) connects the interactive labs and documented data.