nvidia.dali.experimental.dynamic.transforms.rotation#

nvidia.dali.experimental.dynamic.transforms.rotation(input=None, /, *, batch_size=None, device=None, angle, axis=None, center=None, reverse_order=None)#

Produces a rotation affine transform matrix.

If another transform matrix is passed as an input, the operator applies rotation to the matrix provided.

The number of dimensions is assumed to be 3 if a rotation axis is provided or 2 otherwise.

Note

The output of this operator can be fed directly to CoordTransform and WarpAffine operators.

This operator allows sequence inputs.

Supported backends
  • ‘cpu’

Parameters:

input (Tensor/Batch, optional) – Input to the operator.

Keyword Arguments:
  • angle (float or Tensor/Batch of float) –

    Angle, in degrees.

    Supports per-frame inputs.

  • axis (float or list of float or Tensor/Batch of float, optional) –

    Axis of rotation (applies only to 3D transforms).

    The vector does not need to be normalized, but it must have a non-zero length.

    Reversing the vector is equivalent to changing the sign of angle.

    Supports per-frame inputs.

  • center (float or list of float or Tensor/Batch of float, optional) –

    The center of the rotation.

    If provided, the number of elements should match the dimensionality of the transform.

    Supports per-frame inputs.

  • reverse_order (bool, optional, default = False) –

    Determines the order when combining affine transforms.

    If set to False (default), the operator’s affine transform will be applied to the input transform. If set to True, the input transform will be applied to the operator’s transform.

    If there’s no input, this argument is ignored.