pytransform3d.uncertainty
.estimate_gaussian_transform_from_samples#
- pytransform3d.uncertainty.estimate_gaussian_transform_from_samples(samples)[source]#
Estimate Gaussian distribution over transformations from samples.
Uses iterative computation of mean described by Eade [1] and computes covariance in exponential coordinate space (using an unbiased estimator). The derivation of the procedure is presented by Pennec [2].
For a set of transformations \(\{T_1, \ldots, T_N\}\), we initialize the estimated mean \(\overline{T}_0 \leftarrow T_1\).
For a fixed number of steps, in each iteration \(k\) we improve the estimation of the mean by
Computing the distance of each sample to the current estimate of the mean in exponential coordinates \(V_{i,k} \leftarrow T_i \cdot \overline{T}_k^{-1}\).
Updating the estimate of the mean \(\overline{T}_{k+1} \leftarrow Exp(\frac{1}{N}\sum_i V_{i,k}) \cdot \overline{T}_k\).
Estimate the covariance in the space of exponential coordinates with \(\Sigma \leftarrow \frac{1}{N - 1} \sum_i \left[ V_{i,k} \cdot V_{i,k}^T \right]\)
- Parameters:
- samplesarray-like, shape (n_samples, 4, 4)
Sampled transformations represented by homogeneous matrices.
- Returns:
- meanarray, shape (4, 4)
Mean as homogeneous transformation matrix.
- covarray, shape (6, 6)
Covariance of distribution in exponential coordinate space.
References
[1]Eade, E. (2017). Lie Groups for 2D and 3D Transformations. https://ethaneade.com/lie.pdf
[2]Pennec, X. (2006). Intrinsic Statistics on Riemannian Manifolds: Basic Tools for Geometric Measurements. J Math Imaging Vis 25, 127-154. https://doi.org/10.1007/s10851-006-6228-4