How to use OpenCV instead of gst-camera in

I want to use OpenCV instead of GST-Camera in because i want to do some pre-processing on each frame which is not possible in case of GST-Camera. Kindly help me as soon as possible.
Thanks in advance.

Somehow I don’t see in the github site. Only see

GST-Camera is implemented in

For your case, you may check the source code and customize it to use OpenCV APIs.

@maaz.bsee55, please see these examples of converting between CUDA image and OpenCV:

The detectnet-camera and detectnet-console programs have been merged into the same detectnet sample, it is recommended to use that instead. videoSource object replaces gstCamera, but gstCamera still works. When the repo is built, copies of detectnet program are made (as detectnet-camera and detectnet-console) for legacy compatability.