How to use 12_camera_v4l2_cuda with Opencv in jetson nano?

HI,

@Andrey1984 @DaneLLL :)

I am using a Logitec Brio camera. I followed the below link to read and access the camera which works fine at 30 fps.

I could run the below only from the terminal.

$ ./camera_v4l2_cuda -d /dev/video0 -s 640x480 -f YUYV -n 30 -c

I want to use this with cv2.videocapture() in Opencv, so that I can integrate with my CNN code.

Kindly help me on how to use ‘camera_v4l2_cuda’ with cv2.

Thanks

Hi,
For hooking with OpenCV, we suggest use gstreamer pipeline. Please take a look at

1 Like

@DaneLLL : Thanks a lot. The Pipeline you provided works like a charm. Interested to understand the technique /method to construct this pipeline. Any document available to understand the pipeline construction ?

Hi,
We have samples in C in the source code package:
L4T | NVIDIA Developer
L4T Driver Package (BSP) Sources

Document:
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/accelerated_gstreamer.html#wwpID0E0LQ0HA

The python samples are based on the C samples.

1 Like