pypose.svdtf¶
- class pypose.svdtf(source, target)[source]¶
Computes the rigid transformation ( \(SE(3)\) ) between two sets of associated point clouds (source and target) using Singular Value Decomposition (SVD).
- Parameters:
source (
torch.Tensor
) – the coordinates of the source point cloud. The shape has to be (…, N, 3).target (
torch.Tensor
) – the coordinates of the target point cloud. The shape has to be (…, N, 3).
- Returns:
The rigid transformation matrix in
SE3Type
that minimizes the mean squared error between the input point sets.- Return type:
LieTensor
Warning
The number of points N has to be the same for both point clouds.
Example
>>> import torch, pypose as pp >>> source = torch.tensor([[0., 0., 0.], ... [1., 0., 0.], ... [0., 1., 0.]]) >>> target = torch.tensor([[1., 1., 1.], ... [2., 1., 1.], ... [1., 2., 1.]]) >>> pp.svdtf(source, target) SE3Type LieTensor: LieTensor([1., 1., 1., 0., 0., 0., 1.])