WarpAffine

cvcuda.warp_affine(src: nvcv.Tensor, xform: nvcv.Tensor, flags: nvcv.Tensor, border_mode: cvcuda.Border = cvcuda.Border.CONSTANT, border_value: numpy.ndarray, stream: Optional[nvcv.cuda.Stream] = None) nvcv.Tensor

Executes the Warp Affine operation on the given cuda stream.

See also

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

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

  • xform (nvcv.Tensor) – 2x3 float affine transformation matrix.

  • flags (int) – Combination of interpolation methods(cvcuda.Interp.NEAREST, cvcuda.Interp.LINEAR or cvcuda.Interp.CUBIC) and the optional flag cvcuda.Interp.WARP_INVERSE_MAP, that sets xform as the inverse transformation.

  • border_mode (cvcuda.Border, optional) – Pixel extrapolation method (cvcuda.Border.CONSTANT or cvcuda.Border.REPLICATE).

  • border_value (numpy.ndarray, optional) – Used to specify values for a constant border, must be a size <= 4 and dim of 1, where the values specify the border color for each color channel.

  • 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.warp_affine(src: nvcv.ImageBatchVarShape, xform: nvcv.Tensor, flags: nvcv.Tensor, border_mode: cvcuda.Border = cvcuda.Border.CONSTANT, border_value: numpy.ndarray, stream: Optional[nvcv.cuda.Stream] = None) -> nvcv.ImageBatchVarShape

Executes the Warp Affine operation on the given cuda stream.

See also

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

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

  • xform (nvcv.Tensor) – 2x3 float affine transformation matrix(s) for each image.

  • flags (int) – Combination of interpolation methods(cvcuda.Interp.NEAREST, cvcuda.Interp.LINEAR or cvcuda.Interp.CUBIC) and the optional flag cvcuda.Interp.WARP_INVERSE_MAP, that sets xform as the inverse transformation.

  • border_mode (cvcuda.Border, optional) – Pixel extrapolation method (cvcuda.Border.CONSTANT or cvcuda.Border.REPLICATE).

  • border_value (numpy.ndarray, optional) – Used to specify values for a constant border, must be a size <= 4 and dim of 1, where the values specify the border color for each color channel.

  • 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.warp_affine_into(dst: nvcv.Tensor, src: nvcv.Tensor, xform: nvcv.Tensor, flags: nvcv.Tensor, border_mode: cvcuda.Border = cvcuda.Border.CONSTANT, border_value: numpy.ndarray, stream: Optional[nvcv.cuda.Stream] = None)

Executes the Warp Affine operation on the given cuda stream.

See also

Refer to the CV-CUDA C API reference for the Warp Affine 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.

  • xform (nvcv.Tensor) – 2x3 float affine transformation matrix.

  • flags (int) – Combination of interpolation methods(cvcuda.Interp.NEAREST, cvcuda.Interp.LINEAR or cvcuda.Interp.CUBIC) and the optional flag cvcuda.Interp.WARP_INVERSE_MAP, that sets xform as the inverse transformation.

  • border_mode (cvcuda.Border, optional) – Pixel extrapolation method (cvcuda.Border.CONSTANT or cvcuda.Border.REPLICATE).

  • border_value (numpy.ndarray, optional) – Used to specify values for a constant border, must be a size <= 4 and dim of 1, where the values specify the border color for each color channel.

  • 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.warp_affine_into(dst: nvcv.ImageBatchVarShape, src: nvcv.ImageBatchVarShape, xform: nvcv.Tensor, flags: nvcv.Tensor, border_mode: cvcuda.Border = cvcuda.Border.CONSTANT, border_value: numpy.ndarray, stream: Optional[nvcv.cuda.Stream] = None)

Executes the Warp Affine operation on the given cuda stream.

See also

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

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

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

  • xform (nvcv.Tensor) – 2x3 float affine transformation matrix(s) for each image in batch.

  • flags (int) – Combination of interpolation methods(cvcuda.Interp.NEAREST, cvcuda.Interp.LINEAR or cvcuda.Interp.CUBIC) and the optional flag cvcuda.Interp.WARP_INVERSE_MAP, that sets xform as the inverse transformation.

  • border_mode (cvcuda.Border, optional) – Pixel extrapolation method (cvcuda.Border.CONSTANT or cvcuda.Border.REPLICATE).

  • border_value (numpy.ndarray, optional) – Used to specify values for a constant border, must be a size <= 4 and dim of 1, where the values specify the border color for each color channel.

  • 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.