vpi.Image.dilate

Image.dilate(self: vpi.Image, kernel: Union[Tuple[int, int], numpy.ndarray[numpy.int8]], *, backend: vpi.Backend = vpi.Backend.DEFAULT, out: vpi.Image = None, border: vpi.Border = vpi.Border.LIMITED, stream: vpi.Stream = None) vpi.Image

Runs a 2D dilate over the image.

See also

Refer to the algorithm explanation for more details and usage examples.

Parameters
  • kernel (Tuple[int, int] or 2D array of int) – The kernel defines the neighborhood of the operation, as either a tuple of the kernel size, e.g. a 3x3 kernel is (3, 3), or a 2D array of 1’s and 0’s, e.g. [[0, 1, 0], [1, 1, 1], [0, 1, 0]] array is a 3x3 kernel with the cross-shaped neighborhood.

  • out (vpi.Image, optional) – The output for the algorithm.

  • border (vpi.Border, optional) – The border extension used by the algorithm.

  • backend (vpi.Backend, optional) – The backend to be used by the algorithm.

  • stream (vpi.Stream, optional) – The stream to be used by the algorithm.

Returns

The output for the algorithm.

Return type

vpi.Image

Caution

Restrictions to several arguments may apply. Check the C API references of the submit function and the group concepts for more details.