I have a transformation $T \in SE(3)$ parameterized by a mean quaternion $q$ with covariance matrix $\Sigma_q \in R^{4\times4}$ and a mean translation $t \in R^3$ with covariance matrix $\Sigma_t \in R^{3\times3}$.

If I were to transform some point $p_1 \in R^3$ by $T$, I can easily compute its Euclidean distance to some second point $p_2 \in R^3$ as $\lVert T p_1 - p_2\rVert$.

What I would like to do instead is incorporate the covariance matrices of my transformation to compute a distance measure similar in function to a Mahalanobis distance. Is there a closed form way to do this?

# 2D Example

To help clarify, I've plotted the problem in a two dimensional world below, where points are in $R^2$, and transforms are in $SE(2)$. Here, a point $p_1$ can be transformed by $T$ to find a point $T p_1$. However, because we know the covariances of the rotation and translation, we can see that random samples of $T p_1$ would be distributed according to the banana shaped distribution shown in red. What I would like to find then is a distance measure that would will take these covariances into account such that $p_2$ would be significantly "closer" than $p_3$ to $T p_1$.