Utilities

General utilities

registry.Registry

The registry that provides name -> object mapping.

image.CPUImage

image.GPUImage

Image data container.

artist.Position

Start position of the element drawing relative to the box.

artist.Artist

alias of ArtistGPUMat

logging.LoggerMixin

Mixes logger in GStreamer element.

GPU Memory Formats

memory_repr.opencv_gpu_mat_as_cupy_array

Returns CuPy ndarray in HWC format for the given OpenCV GpuMat (zero-copy).

memory_repr_pytorch.opencv_gpu_mat_as_pytorch_tensor

Returns PyTorch tensor in HWC format for the given OpenCV GpuMat (zero-copy).

memory_repr.cupy_array_as_opencv_gpu_mat

Returns OpenCV GpuMat for the given CuPy ndarray (zero-copy).

memory_repr_pytorch.pytorch_tensor_as_opencv_gpu_mat

Returns OpenCV GpuMat for the given PyTorch tensor (zero-copy).

DeepStream utilities

get_nvds_buf_surface

This function returns the frame in NumPy format.

build_engine

Builds the specified model engine (TRT).

OpenCV utilities

nvds_to_gpu_mat

Build GpuMat header for allocated CUDA-memory of the frame.

alpha_comp

In place composition of two images using alpha opacity values contained in each image.

apply_cuda_filter

Apply CUDA filter to a frame in place.

draw_rect

Draw rectangle on a frame.