An application that allows to align two point clouds of the same object in an interactive way, using ICP [1]. Implementation of the Iterative Closest Point algorithm, and the Point-To-Plane [2] variant.
Libraries needed :
- LibIGL . Put the libigl source code folder two levels above this repository.
- ANN (Approximate Nearest Neighbor). Put the ANN source code folder one level above this repository, or change the
include_directories
andlink_directories
of the CMake to the corresponding paths.
Build using CMake and the CMakeLists.txt provided.
Run the ICP_registration_viewer
target.
Change the line string filenames[num_data_total]
with the right filenames of your point clouds, in main.cpp.
The libigl GUI menu has several options you can manipulate :
- Change the "ICP mode" slider in order to perfom point-to-point ICP (0) or point-to-plane ICP (1).
- Click the "ICP step" button to perform one registration step of the algorithm.
- Click the "ICP registration" button to perform the algorithm until convergence.
- Change the values of "Max num iterations" and "Error threshold" to define the convergence stopping conditions.
- You can roughly pre-align the point clouds by manipulating the "Rotation slider" and "Translation slider".
[1] Paul J. Besl et N.D. McKay. A Method for Registration of 3-D Shapes. IEEE Trans. on Pattern Analysis and Machine Intelligence.
[2] LOW, K.-L. 2004. Linear least-squares optimization for point-to- plane icp surface registration. Tech. rep., Chapel Hill, University of North Carolina.