Hi,
I am writing an implementation for nvtracker.h and in NvMOT_Process, I need to recover a frame’s pixels and make an OpenCV Mat out of it. This thread discusses the same issue but I really can’t replicate the solution which isn’t detailed enough.
I understand I can access the buffer through mapped CPU memory, but the NvBufSurfaceSyncForCpu function takes an NvBufSurface rather than an NvBufSurfaceParams object.
How do I go about doing this?
• Hardware Platform (Jetson / GPU) GTX 1070 • DeepStream Version 5.0 • JetPack Version (valid for Jetson only) • TensorRT Version 7.0.0 • NVIDIA GPU Driver Version (valid for GPU only) 440.82
Looks like NvBufSurfaceSyncForCpu didn’t work because I used NVBUF_MEM_DEFAULT.
Using NVBUF_MEM_CUDA_PINNED, I was able to get the frame with this snippet
Thank you for the hint. It is GPU based but with some preprocessing done on the CPU. Looking to move that on the GPU in not too long, so that will then be helpful!