USB Webcam Problem

I’m encountering a problem with my USB webcam while running Python code on the Nvidia Jetson Nano. The issue arises as the webcam feed is excessively slow, leading to significant lag in my code execution.

To address this, I attempted to use the nanocamera library based on a suggested solution I found USB web cam is too slow and can't resize, nanocamera · PyPI. However, despite the webcam functioning correctly with Cheese, I encountered difficulties integrating it with the nanocamera library.

Even when trying a sample code provided by the library, I consistently face the same error.

Error: cv2.imshow(“Video Frame”, frame)
cv2.error: OpenCV(4.9.0) /io/opencv/modules/highgui/src/window.cpp:971: error: (-215:Assertion failed) size.width>0 && size.height>0 in function ‘imshow’

Any insights or suggestions on how to resolve this issue would be greatly appreciated.

Someone said this on another website

“I tested the camera with Python version 3.8. (the version I am presently using) And…it does not work.
So I tried another Python version.
I tested with Python version 2.7.17. And…it works. :)”

I’m using Redragon GW600 Webcam

This looks identical to
Rtsp camera error - #3 by DaneLLL

Please use 3.6 or 2.7.

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