In this project we reconstuct the surface of a bunny rabbit from meshes captured from 6 different angles: 0, 45, 90, 180, 270 and 315. Using the algorithm, the 6 meshes are merged into one.
A few points are sampled from each mesh and correspondences between are established using 1-nearest neighbour. The rotation R
and translation t
matrices are calculated by an optimization algorithm—
- Point-to-Point ICP: This variant of the algorithm minimizes the sum of squared distances between corresponding points in the two point clouds
A
andB
. - Point-to-Plane ICP: This variant minimizes the distances between points and the corresponding (found using the normals of point cloud
A
) fitted to the other point cloudB
. reference: Low, Kok-Lim. (2004). Linear Least-Squares Optimization for Point-to-Plane ICP Surface Registration. @see Low, Kok-Lim. (2004)
The manually implemented code helps understand the inner workings of ICP.
- Open the project directory
- run
poetry install
andpoetry shell
to set up the environment and install dependencies. - run
python3 icp.py
to run the code - feel free to change
method
to eitherpoint-to-point
orpoint_to_plane
and play withmax_iterations
andthreshold
.