jetcam
jetcam copied to clipboard
Could not read-image from camera: USB Camera
Hi, We are trying to interface a USB camera with Jetson NX using jetcam libraries:
from jetcam.usb_camera import USBCamera
But during the initialization, we get an error:
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (1757) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module v4l2src0 reported: Cannot identify device '/dev/video2'. [ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (886) open OpenCV | GStreamer warning: unable to start pipeline [ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/jetcam-0.0.0-py3.6.egg/jetcam/usb_camera.py", line 24, in init RuntimeError: Could not read image from camera.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "threecamera.py", line 47, in
I checked the openCV version,it is 4.1.1. The interface works when there is CSI Cameras but it does not work with USB camera. I tried solutions suggested as,
Replacing, self.cap = cv2.VideoCapture(self._gst_str(), cv2.CAP_GSTREAMER) with self.cap = cv2.VideoCapture(self.capture_device)
With lusb command, the usb devices are getting picked up, have attached the image. But it is not initializing.
But still the error persists. Would be helpful to know if any other workaround is possible? Thanks.
same problem
With Jetson nano , as the same problem
csi cam works well,but there is always the same problem with usb cam,
I solved the problem with my usb cam,here is my advice: 1.please make sure that your usb cam is logi C270 2.please make sure that there is only one cam attached to your jetson 3.please make sure that the code of jetcam had not been modified