I am trying to get my USB Logitech Brio 4K webcam working in the “Getting Started with AI on Jetson Nano” course but am having problems. Here is the output:
Create the camera object¶
First, create a camera object by importing the USBCamera class from the library by executing the following Python code cell. Please note, you can only create one USBCamera instance. Set the capture_device= to the correct number found when you listed the system video devices. If you have /dev/video0, then set capture_device=0. If you have /dev/video1, set capture_device=1 in the code line below.
from jetcam.usb_camera import USBCamera
#TODO change capture_device if incorrect for your system
camera = USBCamera(width=224, height=224, capture_width=640, capture_height=480, capture_device=0)
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/jetcam-0.0.0-py3.6.egg/jetcam/usb_camera.py in __init__(self, *args, **kwargs)
23 if not re:
---> 24 raise RuntimeError('Could not read image from camera.')
25
RuntimeError: Could not read image from camera.
During handling of the above exception, another exception occurred:
RuntimeError Traceback (most recent call last)
<ipython-input-7-5a6744da9a88> in <module>
2
3 #TODO change capture_device if incorrect for your system
----> 4 camera = USBCamera(width=224, height=224, capture_width=640, capture_height=480, capture_device=0)
/usr/local/lib/python3.6/dist-packages/jetcam-0.0.0-py3.6.egg/jetcam/usb_camera.py in __init__(self, *args, **kwargs)
26 except:
27 raise RuntimeError(
---> 28 'Could not initialize camera. Please see error trace.')
29
30 atexit.register(self.cap.release)
RuntimeError: Could not initialize camera. Please see error trace.