pytransform3d.batch_rotations.quaternions_from_matrices

pytransform3d.batch_rotations.quaternions_from_matrices(Rs, out=None)[source]

Compute quaternions from rotation matrices.

Parameters:
Rsarray-like, shape (…, 3, 3)

Rotation matrices

outarray, shape (…, 4), optional (default: new array)

Output array to which we write the result

Returns:
Qarray, shape (…, 4)

Unit quaternions to represent rotations: (w, x, y, z)