warp.transform_from_matrix#

warp.transform_from_matrix(
mat: Matrix[4, 4, float32],
) Transformation[float32]#
  • Kernel

  • Differentiable

Construct a transformation from a 4x4 matrix.

\[\begin{split}M = \begin{bmatrix} R_{00} & R_{01} & R_{02} & p_x \\ R_{10} & R_{11} & R_{12} & p_y \\ R_{20} & R_{21} & R_{22} & p_z \\ 0 & 0 & 0 & 1 \end{bmatrix}\end{split}\]

Where:

  • \(R\) is the 3x3 rotation matrix created from the orientation quaternion of the input transform.

  • \(p\) is the 3D position vector \([p_x, p_y, p_z]\) of the input transform.

Args:

mat (Matrix[4, 4, Float]): Matrix to convert.

Returns:

Transformation[Float]: The transformation.