USB camera and IMX219-160 Camera issue

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)

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/ in __init__(self, *args, **kwargs)
     23             if not re:
---> 24                 raise RuntimeError('Could not read image from camera.')

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>
      4 # camera = CSICamera(width=224, height=224)
----> 5 camera = USBCamera(width=224, height=224)
      7 camera.running = True

/usr/local/lib/python3.6/dist-packages/jetcam-0.0.0-py3.6.egg/jetcam/ in __init__(self, *args, **kwargs)
     26         except:
     27             raise RuntimeError(
---> 28                 'Could not initialize camera.  Please see error trace.')
     30         atexit.register(self.cap.release)

RuntimeError: Could not initialize camera.  Please see error trace.

Thanks a lot!

Have a check the resolution by v4l2-ctl --list-formats-ext to modify the width/height to try.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.