Jetson TX2 USB cam problem

hi,

I use USB logitech 920,I found VideoCapture() is not work. opencv is OpenCV4Tegra.

import cv2
import sys

video_capture = cv2.VideoCapture(2) #USBcam is video 2,it’s right

print video_capture.isOpened()

result:False

please help!!

Hi ppdoll,

You may refer to below topic to see if any helps:
https://devtalk.nvidia.com/default/topic/1027250/jetson-tx2/how-to-use-usb-webcam-in-jetson-tx2-with-python-and-opencv-/

Cheers

the result is always falut

It seems this is not an issue anymore, see
https://devtalk.nvidia.com/default/topic/1027250/jetson-tx2/how-to-use-usb-webcam-in-jetson-tx2-with-python-and-opencv-/post/5226135/#5226135

Please share your full code here.

Also, please make sure /dev/video2 exists.

Does following command work for you? It should give out a preview on display.

$ gst-launch-1.0 v4l2src device="/dev/video2" ! "video/x-raw,width=640,height=480,format=I420" ! nvoverlaysink