siavashk / pycpd

Pure Numpy Implementation of the Coherent Point Drift Algorithm
MIT License
513 stars 115 forks source link

initial estimate always generates smaller point cloud #15

Closed yenlianglintw closed 6 years ago

yenlianglintw commented 6 years ago

I found that if I use two exact "same" point cloud, the code still generates smaller point cloud in the initial steps. If the loss is zero, I was wondering why the initial point cloud is always smaller ?

siavashk commented 6 years ago

You need to clarify wether the issue appears in similarity (scale + rigid), affine or deformable registration examples. If it is during similarity registration, then there is most likely a numerical instability when calculating the singular value decomposition (SVD) for identical point clouds.

This is common in numerical methods. People usually get around this by adding a small value to the error term to avoid singularities when dealing with small numbers.

Given that this is a corner case, and in my opinion of little practical value, I am not going to fix it. Specially since the algorithm ultimately converges to the correct solution.