Hi, You can check this patch:
The flow is 1.Get NvBuffer in RGBA, ptch-linear 2. Map to CPU 3. Map the CPU pointer to cv::Mat