How can I create new NvBufSurface from cv::cuda::GpuMat with NVBUF_MEM_SURFACE_ARRAY

Hi,
You can access NvBufSurface through the function calls like:
How to create opencv gpumat from nvstream? - #18 by DaneLLL

NvBufSurfaceMapEglImage();
cuGraphicsEGLRegisterImage();
cuGraphicsResourceGetMappedEglFrame();

_do_image_process_;

cuGraphicsUnregisterResource();
NvBufSurfaceUnMapEglImage();

The nvarguscamerasrc sends NvBufsurface in NV12 blocklinear to next plugin by default. You can customize the source source to send NV12 pitch linear. The source code is in

Jetson Linux 35.4.1 | NVIDIA Developer
Driver Package (BSP) Sources