AverageBlur

cvcuda.averageblur(src: nvcv.Tensor, kernel_size: Tuple[int, int], kernel_anchor: Tuple[int, int], border: cvcuda.Border = cvcuda.Border.CONSTANT, stream: nvcv.cuda.Stream | None = None) nvcv.Tensor

Executes the AverageBlur operation on the given cuda stream.

See also

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

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

  • kernel_size (Tuple[int, int]) – Specifies the size of the blur kernel.

  • kernel_anchor (Tuple[int, int]) – Kernel anchor, use (-1,-1) to indicate kernel center.

  • border (cvcuda.Border, optional) – Border mode to be used when accessing elements outside input image.

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

See also

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

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.averageblur(src: nvcv.ImageBatchVarShape, kernel_size: Tuple[int, int], kernel_anchor: Tuple[int, int], border: cvcuda.Border = cvcuda.Border.CONSTANT, stream: Optional[nvcv.cuda.Stream] = None) -> nvcv.ImageBatchVarShape

Executes the AverageBlur operation with a variable shape tensors on the given cuda stream.

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

  • max_kernel_size (Tuple[int, int]) – Specifies the maximum size of the blur kernel.

  • kernel_size (Tuple[int, int]) – Specifies the size of the blur kernel within the maximum kernel size.

  • kernel_anchor (Tuple[int, int]) – Kernel anchor, use (-1,-1) to indicate kernel center.

  • border (cvcuda.Border, optional) – Border mode to be used when accessing elements outside input image.

  • 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.averageblur_into(dst: nvcv.Tensor, src: nvcv.Tensor, kernel_size: Tuple[int, int], kernel_anchor: Tuple[int, int], border: cvcuda.Border = cvcuda.Border.CONSTANT, stream: nvcv.cuda.Stream | None = None)

Executes the AverageBlur operation on the given cuda stream and writes the result into the ‘dst’ tensor.

See also

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

  • kernel_size (Tuple[int, int]) – Specifies the size of the blur kernel.

  • kernel_anchor (Tuple[int, int]) – Kernel anchor, use (-1,-1) to indicate kernel center.

  • border (cvcuda.Border, optional) – Border mode to be used when accessing elements outside input image.

  • 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.averageblur_into(dst: nvcv.ImageBatchVarShape, src: nvcv.ImageBatchVarShape, kernel_size: Tuple[int, int], kernel_anchor: Tuple[int, int], border: cvcuda.Border = cvcuda.Border.CONSTANT, stream: Optional[nvcv.cuda.Stream] = None)

Executes the AverageBlur operation with a variable shape tensors on the given cuda stream.

Parameters:
  • dst (nvcv.ImageBatchVarShape) – Output containing one or more images.

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

  • max_kernel_size (Tuple[int, int]) – Specifies the maximum size of the blur kernel.

  • kernel_size (Tuple[int, int]) – Specifies the size of the blur kernel within the maximum kernel size.

  • kernel_anchor (Tuple[int, int]) – Kernel anchor, use (-1,-1) to indicate kernel center.

  • border (cvcuda.Border, optional) – Border mode to be used when accessing elements outside input image.

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