Function holoscan::viz::ReadFramebuffer

void holoscan::viz::ReadFramebuffer(ImageFormat fmt, uint32_t width, uint32_t height, size_t buffer_size, CUdeviceptr device_ptr, size_t row_pitch = 0)

Read an image from the framebuffer and store it to CUDA device memory.

If fmt is a depth format, the depth image attachment of the framebuffer will be copied to device_ptr.

Can only be called outside of Begin()/End().

Parameters
  • fmt – image format, currently only R8G8B8A8_UNORM and D32_SFLOAT are supported

  • width, height – width and height of the region to read back, will be limited to the framebuffer size if the framebuffer is smaller than that

  • buffer_size – size of the storage buffer in bytes

  • device_ptr – pointer to CUDA device memory to store the framebuffer into

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

Previous Function holoscan::viz::Primitive
Next Function holoscan::viz::SetCudaStream
© Copyright 2022-2023, NVIDIA. Last updated on Feb 27, 2024.