tr2rt
Convert homogeneous transform to rotation and translation
[R,t] = TR2RT(TR) splits a homogeneous transformation matrix (N×N) into an orthonormal rotation matrix R (M×M) and a translation vector t (M×1), where N=M+1.
Works for TR in SE(2) or SE(3)
- If
TRis 4×4, thenRis 3×3 and T is 3×1. - If
TRis 3×3, thenRis 2×2 and T is 2×1.
A homogeneous transform sequence TR (N×N× K) is split into rotation matrix sequence R (M×M× K) and a translation sequence t (K×M).
Notes
- The validity of
Ris not checked.