Opencv gpu mat into GStreamer without downloading to cpu

Hi,
Not sure but probably the OpenCV functions do not support gpuMat. You may try if CUDA filter works:

filter = cv::cuda::createSobelFilter(CV_8UC4, CV_8UC4, 1, 0, 3, 1, cv::BORDER_DEFAULT);

Or may try to map to cv::Mat. Please refer to this patch:
NVBuffer (FD) to opencv Mat - #6 by DaneLLL