Jetson Nano-detectnet-camera with webcam(C920)

I’m trying to get the “Running the Live Camera Detection Demo” running but this is my first time using these systems and the instructions for this demo are a little less defined than the previous ones.

Could someone walk me through the steps I need to take to get this working with a Logitech C920?

Hi RD4511,

Please change the DEFAULT_CAMERA define at the top of detectnet-camera.cpp to reflect the /dev/video V4L2 device of your USB camera and recompile.

See also: https://devtalk.nvidia.com/default/topic/1030672/jetson-tx2/change-camera-on-jetson-tx2/post/5243917/#5243917

Thanks

Ok thank you, needed to recompile.

hello, I see that on one forum, some people are changing the DEFAULT_CAMERA to 0, some change it to 1, how do we know which on to change?

It depends on the index of the /dev/video node that you want to use:
(i.e. #define DEFAULT_CAMERA 0 for /dev/video0 or #define DEFAULT_CAMERA 1 for /dev/video1, ect.)

If you also have an onboard MIPI CSI camera plugged in, that will come up as /dev/video0. In that case, /dev/video1 would be your USB camera.

You can list the cameras you have connected in V4L2 with the v4l2-ctl utility:

$ sudo apt-get install v4l-utils
$ v4l2-ctl --info --list-devices