I would like to test 2 camera at the same time, but it seems like I cannot do it.
Is there any drivers that I have not setuped?
IMX219-160 Camera:
from jetbot import Camera
from IPython.display import display
import ipywidgets.widgets as widgets
from jetbot import bgr8_to_jpeg
USB camera:
from jetcam.usb_camera import USBCamera
camera = USBCamera(width=224, height=224)
camera.running = True
from jetcam.utils import bgr8_to_jpeg
import traitlets
import ipywidgets
image_w = ipywidgets.Image()
traitlets.dlink((camera, 'value'), (image_w, 'value'), transform=bgr8_to_jpeg)
display(image_w)
It always shows me the error for USB camera.
---------------------------------------------------------------------------
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-1-57e0ae4135c0> in <module>
3
4 # camera = CSICamera(width=224, height=224)
----> 5 camera = USBCamera(width=224, height=224)
6
7 camera.running = True
/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.
Thanks a lot!