deepfold.losses.procrustes.rigid_points_registration¶
- deepfold.losses.procrustes.rigid_points_registration(x: Tensor, y: Tensor, weights: Tensor | None = None, compute_scaling: bool = False) Tuple[Tensor, Tensor, float | None][source]¶
Returns the rigid transformation and the optimal scaling that best align an input list of points x to a target list of points y, by minimizing the sum of square distance.
- Parameters:
x – […, N, D] list of N points of dimension D.
y – […, N, D] list of corresponding target points.
weights – […, N] optional list of weights associated to each point.
- Returns:
a triplet (R, t, s) consisting of a rotation matrix r, a translational vector t and a scaling s if compute scaling is true.