icp transformation gives me different results

I am trying to use vtkIterativeClosestPointTransform between two mesh data (it’s actually the same object and i just did a transformation on translation, rotation and scaling just to have a source object )
So, I need to apply a vtkTransform to the source before the icp process; but the thing is I got correct result when applying only the scaling factor than applying the entire matrix.
Am i missing something about the icp process?
Thank you for your help

It is difficult to say without seeing some code. Are you using Python, C++ or ???. I am personally working on an IterativeClosestPoint project (a plugin for VTK) where multiple metric can be applied and very importantly a MaximumDistance can be set for the correspondences. For a simple working example of VTK’s default vtkIerativeClosestPointTransform, I can recommend looking at the example site.


Thanks for your response. Well that problem is fixed now; I am using c++ and I just wrongly set the icp output matrix during updating the soucre object.
However I am still having some issues : the icp porcess works now fine between 2 mesh objects but not working between a mesh object (as a target) and a volumetric data (as the source, i did marching cube first); may be I am not using enough parameters? because I just set the max iteration number et rigid mode). Do you have an example icp process between a mesh and a gray scale volumetric data? I am new in VTK and I did not see an example for this. Thanks

Marching cubes will for sure give you a mesh. Some of the issues that I had with vtkIterativeClosestPoint is the lack of a threshold for the correspondences. I know that VMTK has modified it slightly to include a threshold for correspondences.

1 Like

Okay, I will look deeper to the vtkIterativeClosestPoint process and its different metrics.
Thank you very much.

If you want to experiment a bit, I have created a small repository which should build out-of-the-box. I have tested it using VS2022 and g++ 12.2. The repository is here

It supports three different metrics and setting a MaximumDistance. There are some issues when a matrix becomes close to singular… It is a work-in-progress.

1 Like

Sure, I will have a look. Thanks for your help!