In real life Umeyama transform is typically used in molecular simulations to fit two molecules together, which means that the positions of their atoms (geometrical points) must be mass-weighted. Umeyama in Eigen does not support any weighting, which makes it very limited in real life usage. In order to be really useful this function should accept additional optional parameter - the vector of weights.

Yes I agree that weighting is important. So, patch welcome ;)

(In reply to comment #1) > Yes I agree that weighting is important. So, patch welcome ;) Unfortunately I'm not familiar with this algorithm. I'm not even sure that it can be formulated for weighted data. The only thing I know is that all molecular analysis programs use weighted implementations of such fitting.

Hi, The algorithm [1] is minimizing e^2(R,t,c) = 1/n sum_{i=1}^n |\ y_i - (cRx_i + t) |\^2 where x_i and y_i are corresponding points which should be fit to each other and you would like to change this to e^2(R,t,c,W) = 1/n sum_{i=1}^n w_i |\ y_i - (cRx_i + t) |\^2 if I am not completely wrong. Right now, I don't have the time to go through the derivation and verify if such a weighting can be easily integrated and how the minimization would be affected but maybe the paper is enough information for you. You might also be wanting to take a look at the ICP (iterative closest point) algorithm where the point correspondences x_i and y_j are not known a priori. - Hauke [1] Least Squares Estimation of Transformation Parameters Between Two Point Pattern, Shinji Umeyama, IEEE PAMI, 1991

For 3d points, this capability is included in the enhancement offered in Bug 771.

The enhancement offered in Bug 771 now offers weighted fits of n-d points.

-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/247.