Conv2D

cvcuda.conv2d(src: nvcv.ImageBatchVarShape, kernel: nvcv.ImageBatchVarShape, kernel_anchor: nvcv.Tensor, border: cvcuda.Border = <Border.CONSTANT: 0>, *, stream: Optional[nvcv.cuda.Stream] = None) nvcv.ImageBatchVarShape

Executes the Convolve 2D operation on the given cuda stream.

See also

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

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

  • kernel (nvcv.Tensor) – Convolution kernels (one for each batch image) to be used. Each image width and height correspond to the kernel width and height. (must be float)

  • kernel_anchor (nvcv.Tensor) – 1D Tensor with the anchor of each kernel (one for each batch image). The anchor (x, y) indicates the relative position of a filtered point within the kernel. (-1, -1) means that the anchor is at the kernel center.

  • 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.conv2d_into(dst: nvcv.ImageBatchVarShape, src: nvcv.ImageBatchVarShape, kernel: nvcv.ImageBatchVarShape, kernel_anchor: nvcv.Tensor, border: cvcuda.Border = <Border.CONSTANT: 0>, *, stream: Optional[nvcv.cuda.Stream] = None) nvcv.ImageBatchVarShape

Executes the Convolve 2D operation on the given cuda stream.

See also

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

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

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

  • kernel (nvcv.Tensor) – Convolution kernels (one for each batch image) to be used. Each image width and height correspond to the kernel width and height. (must be float)

  • kernel_anchor (nvcv.Tensor) – 1D Tensor with the anchor of each kernel (one for each batch image). The anchor (x, y) indicates the relative position of a filtered point within the kernel. (-1, -1) means that the anchor is at the kernel center.

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