nvidia.dali.experimental.dynamic.rotate#
- nvidia.dali.experimental.dynamic.rotate(input, /, *, batch_size=None, device=None, angle, axis=None, dtype=None, fill_value=None, interp_type=None, keep_size=None, output_dtype=None, size=None)#
Rotates the images by the specified angle.
This operator supports volumetric data.
- Supported backends
‘cpu’
‘gpu’
- Parameters:
input¶ (Tensor/Batch ('HWC', 'FHWC', 'DHWC', 'FDHWC')) – Input to the operator.
- Keyword Arguments:
angle¶ (float or Tensor/Batch of float) –
Angle, in degrees, by which the image is rotated.
For two-dimensional data, the rotation is counter-clockwise, assuming the top-left corner is at
(0,0). For three-dimensional data, theangleis a positive rotation around the provided axis.Supports
per-frameinputs.axis¶ (float or list of float or Tensor/Batch of float, optional) –
Applies only to 3D rotation and is the axis around which to rotate the volume.
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-frameinputs.dtype¶ (
nvidia.dali.types.DALIDataType, optional) –Output data type.
If not set, the input type is used.
fill_value¶ (float, optional) –
Value used to fill areas that are outside the source image.
If a value is not specified, the source coordinates are clamped and the border pixel is repeated.
interp_type¶ (
nvidia.dali.types.DALIInterpType, optional, default = DALIInterpType.INTERP_LINEAR) – Type of interpolation used.keep_size¶ (bool, optional, default = False) –
If True, original canvas size is kept.
If set to False (default), and the size is not set, the canvas size is adjusted to accommodate the rotated image with the least padding possible.
output_dtype¶ (
nvidia.dali.types.DALIDataType) –Warning
The argument
output_dtypeis a deprecated alias fordtype. Usedtypeinstead.size¶ (float or list of float or Tensor/Batch of float, optional, default = []) –
Output size, in pixels/points.
Non-integer sizes are rounded to nearest integer. The channel dimension should be excluded (for example, for RGB images, specify
(480,640), not(480,640,3).