How to access the image array from buffer in GPU buffer?

• Hardware Platform (Jetson / GPU):jetson
• DeepStream Version:5.1
• JetPack Version (valid for Jetson only):4.5
• TensorRT Version:7.1.3

Hi, @mdegans
I want to access image array from gstreamer buffer and the feed the custom model, and I see this example,
But one big problem of this example is that copying frame from GPU buffer to CPU buffer, But I don’t want to copy to CPU buffer, because I have to then convert to Tensor on CUDA and then feed to model.
I want to have image array in GPU buffer without copy to CPU buffer.

you can refer to Implementing a Custom GStreamer Plugin with OpenCV Integration Example — DeepStream 6.1.1 Release documentation

In Jetson platform, if memory of NvBufSurface is not in CUDA you must convert it to CUDA through CUDA-EGL interop before accessing it in OpenCV