NVIDIA Holoscan SDK v2.4.0
Holoscan v2.4.0

Function holoscan::viz::ImageCudaDevice

void holoscan::viz::ImageCudaDevice(uint32_t width, uint32_t height, ImageFormat fmt, CUdeviceptr device_ptr, size_t row_pitch = 0, CUdeviceptr device_ptr_plane_1 = 0, size_t row_pitch_plane_1 = 0, CUdeviceptr device_ptr_plane_2 = 0, size_t row_pitch_plane_2 = 0)

Defines the image data for this layer, source is CUDA device memory.

If the image has a alpha value it’s multiplied with the layer opacity.

If fmt is a depth format, the image will be interpreted as a depth image, and will be written to the depth buffer when rendering the color image from a separate invocation of Image*() for the same layer. This enables depth-compositing image layers with other Holoviz layers. Supported depth formats are: D16_UNORM, X8_D24_UNORM, D32_SFLOAT.

Supports multi-planar images (e.g. YUV), device_ptr and row_pitch specify the parameters for the first plane (plane 0), device_ptr_n and row_pitch_n for subsequent planes.

Parameters
  • width – width of the image

  • height – height of the image

  • fmt – image format

  • device_ptr – CUDA device memory pointer

  • row_pitch – the number of bytes between each row, if zero then data is assumed to be contiguous in memory

  • device_ptr_plane_1 – CUDA device memory pointer for plane 1

  • row_pitch_1 – the number of bytes between each row for plane 1, if zero then data is assumed to be contiguous in memory

  • device_ptr_plane_2 – CUDA device memory pointer for plane 2

  • row_pitch_2 – the number of bytes between each row for plane 2, if zero then data is assumed to be contiguous in memory

Previous Function holoscan::viz::ImageCudaArray
Next Function holoscan::viz::ImageHost
© Copyright 2022-2024, NVIDIA. Last updated on Oct 1, 2024.