Rotate

cvcuda.rotate(src: nvcv.Tensor, angle_deg: float, shift: Tuple[float, float], interpolation: cvcuda.Interp, stream: nvcv.cuda.Stream | None = None) nvcv.Tensor

Executes the Rotate operation on the given cuda stream.

See also

Refer to the CV-CUDA C API reference for the Rotate operator for more details and usage examples.

Parameters:
  • src (nvcv.Tensor) – Input tensor containing one or more images.

  • angle_deg (float) – Angle used for rotation in degrees.

  • shift (Tuple[float, float]) – Value of shift in {x, y} directions to move the center at the same coord after rotation.

  • interpolation (cvcuda.Interp) – Interpolation type used for transform.

  • stream (nvcv.cuda.Stream, optional) – CUDA Stream on which to perform the operation.

Returns:

The output tensor.

Return type:

nvcv.Tensor

Caution

Restrictions to several arguments may apply. Check the C API references of the CV-CUDA operator.

cvcuda.rotate(src: nvcv.ImageBatchVarShape, angle_deg: float, shift: Tuple[float, float], interpolation: cvcuda.Interp, stream: Optional[nvcv.cuda.Stream] = None) -> nvcv.ImageBatchVarShape

Executes the Rotate operation on the given cuda stream.

See also

Refer to the CV-CUDA C API reference for the Rotate operator for more details and usage examples.

Parameters:
  • src (nvcv.ImageBatchVarShape) – Input image batch containing one or more images.

  • dst (nvcv.ImageBatchVarShape) – Output image batch containing the result of the operation.

  • angle_deg (float) – Angle used for rotation in degrees for each image.

  • shift (Tuple[float, float]) – Value of shift in {x, y} directions to move the center at the same coord after rotation for each image.

  • interpolation (cvcuda.Interp) – Interpolation type used for transform.

  • stream (nvcv.cuda.Stream, optional) – CUDA Stream on which to perform the operation.

Returns:

The output image batch.

Return type:

nvcv.ImageBatchVarShape

Caution

Restrictions to several arguments may apply. Check the C API references of the CV-CUDA operator.

cvcuda.rotate_into(dst: nvcv.Tensor, src: nvcv.Tensor, angle_deg: float, shift: Tuple[float, float], interpolation: cvcuda.Interp, stream: nvcv.cuda.Stream | None = None)

Executes the Rotate operation on the given cuda stream.

See also

Refer to the CV-CUDA C API reference for the Rotate operator for more details and usage examples.

Parameters:
  • dst (nvcv.Tensor) – Output tensor to store the result of the operation.

  • src (nvcv.Tensor) – Input tensor containing one or more images.

  • angle_deg (float) – Angle used for rotation in degrees.

  • shift (Tuple[float, float]) – Value of shift in {x, y} directions to move the center at the same coord after rotation.

  • interpolation (cvcuda.Interp) – Interpolation type used for transform.

  • stream (nvcv.cuda.Stream, optional) – CUDA Stream on which to perform the operation.

Returns:

None

Caution

Restrictions to several arguments may apply. Check the C API references of the CV-CUDA operator.

cvcuda.rotate_into(dst: nvcv.ImageBatchVarShape, src: nvcv.ImageBatchVarShape, angle_deg: nvcv.Tensor, shift: nvcv.Tensor, interpolation: cvcuda.Interp, stream: Optional[nvcv.cuda.Stream] = None)

Executes the Rotate operation on the given cuda stream.

See also

Refer to the CV-CUDA C API reference for the Rotate operator for more details and usage examples.

Parameters:
  • src (nvcv.ImageBatchVarShape) – Input image batch containing one or more images.

  • dst (nvcv.ImageBatchVarShape) – Output image batch containing the result of the operation.

  • angle_deg (nvcv.Tensor) – Angle used for rotation in degrees for each image.

  • shift (nvcv.Tensor) – Value of shift in {x, y} directions to move the center at the same coord after rotation for each image.

  • interpolation (cvcuda.Interp) – Interpolation type used for transform.

  • stream (nvcv.cuda.Stream, optional) – CUDA Stream on which to perform the operation.

Returns:

None

Caution

Restrictions to several arguments may apply. Check the C API references of the CV-CUDA operator.