1

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?

Christoph Rackwitz
  • 11,317
  • 4
  • 27
  • 36
Rabia Tüylek
  • 11
  • 1
  • 2
  • Please, give the results of the command ```ls /dev | grep video``` – Andrii Nov 05 '21 at 13:39
  • @RabiaTüylek which camera type are you using? Note that [CSI cameras based on OV5647 sensor are not supported](https://forums.developer.nvidia.com/t/does-jetson-nano-support-csi-camera-with-sensor-ov5647/74911) – Bilal Nov 05 '21 at 18:52
  • Camera that I use https://openzeka.com/urun/li-pi-ipex-1233-adpt/. What should do I ? – Rabia Tüylek Nov 06 '21 at 11:15
  • @RabiaTüylek you can see this [repo](https://github.com/JetsonHacksNano/CSI-Camera) – Bilal Nov 06 '21 at 19:19
  • I write 'ls /dev | grep video' on command but it did not say anything. – Rabia Tüylek Nov 12 '21 at 10:27
  • You may tell more about the camera you're trying to use. Is it a CSI or USB camera ? What sensor, what model ? Do you have installed SDK that may include driver, device-tree, maybe firmware ? – SeB Nov 22 '21 at 20:21

0 Answers0