Hello,
I am following the “Getting Started with AI on Jetson Nano” and to test the USB camera I used the jetcam.usb_camera library.
Below is the code and output. I do not understand why I can’t initialize the Go-Pro Camera and read the live feed data.
Any help is appreciated :)!
I tested it and found that I am getting both videos from CSI and Go-Pro
code: !ls -ltrh /dev/video*
Output:
crw-rw----+ 1 root video 81, 0 Feb 3 20:35 /dev/video0 (CSI camera - works)
crw-rw----+ 1 root video 81, 3 Feb 3 20:36 /dev/video1 (Go-Pro Hero 6 using HDMI to USB3.0 capture card)
However, I am unable to see the video / live feed from the Go-Pro. Below is the code from the Nvidia Deep learning course.
Code:
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=1)
ERROR Output:
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)
in
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.
Do you know any solution to this? Or even a workaround to see the live feed that is coming from the camera?
Best,
Vasu