I have an error on my algorithm with Jetson Xavier NX. I try to run code but terminal say that :
[ WARN:0] global /home/arc/opencv_build/opencv/modules/videoio/src/cap_v4l.cpp (890) open VIDEOIO(V4L2:/dev/video0): can't open camera by index Traceback (most recent call last): File "realtime_quadrant.py", line 41, in height = frame.shape AttributeError: 'NoneType' object has no attribute 'shape'
This means that I have to change 0 in camera = cv2.VideoCapture(0).
So I try
cv2.VideoCapture(1),
cv2.VideoCapture(-1)
cv2.VideoCapture(cv2.CAP_V4L2)
yet I still have the same error. Also I installed V4l2 ( Sudo apt-get install v4l2) How can I do that to run?