Image

class nvcv.Image
cpu(self: nvcv.Image, layout: nvcv.TensorLayout | None = None) object

The image on the CPU

cuda(self: nvcv.Image, layout: nvcv.TensorLayout | None = None) object

The image on the CUDA device

property format

Read-only property that returns the format of the image

property height

Read-only property that returns the height of the image

property size

Read-only property that returns the size of the image

property width

Read-only property that returns the width of the image

static zeros(size: tuple[int, int], format: nvcv.Format, rowalign: int = 0) nvcv.Image

Create an image filled with zeros with a given size, format and optional row align

nvcv.as_image(*args, **kwargs)

Overloaded function.

  1. as_image(buffer: nvcv.ExternalBuffer, format: nvcv.Format = nvcv.Format.NONE) -> nvcv.Image

Wrap an external buffer as an image and tie the buffer lifetime to the image

  1. as_image(buffer: list[object] = [], format: nvcv.Format = nvcv.Format.NONE) -> nvcv.Image

Wrap a vector of external buffers as an image and tie the buffer lifetime to the image