braddodson / pointmatcher.net

Implementation of ICP in C#
Apache License 2.0
26 stars 57 forks source link

Resulting Euclidean transformation #5

Open RaHorusFreak opened 3 years ago

RaHorusFreak commented 3 years ago

Hello, first of all very grateful for the excellent work you have done. I have the following problem and need help understanding the algebraic logic of the ICP. Initially I translated two real point clouds using the following vector <1; -1; 10>. The algorithm initially returned a Euclidean transformation that further separated the data. I start debugging the code and noticed that the translation vector was present in the computeWithTransformedReference method in T_iter, but method returns T_refIn_refMean T_iter T_refMean_dataIn instead T_iter. Returning just T_iter gives this translation vector <-0.994;1.004;-9.998> which is quite close to the original vector, so i can´t understand why the original method returns T_refIn_refMean T_iter T_refMean_dataIn. On the other hand, when applying the transformation quaternion, the data moves away from the original cloud again.

jkarlbauer commented 1 year ago

I had a similar issue resulting in divergence of data. In my case, setting DataPoints.containsNormals = false (i.e. reference.containsNormals = false; etc.) in the initialization resolved the problem and data converged. I did not take a further look on that however.