How to convert NvBufSurface to cv::Mat

Hello @ahmed.t.mohamed

Maybe you can use

surface->surfaceList[frame_meta->batch_id].pitch

instead of

surface->surfaceList[frame_meta->batch_id].planeParams.pitch[0]

Source: DeepStream get cv::mat wrong

Hope it works
Regards