Hi,
Since OpenCV is CPU-based software frameworks, we would suggest not to use it. Please try DeepStream SDK.
After the installation through SDKManager, you will see the samples in
/opt/nvidia/deepstream/deepstream-5.0/
Please take a look and give it a try.