Hi,
I think cv2.VideoCapture starts the connection between the board and the webcam, so cap.isOpened=True. But you did not specify the resolution of the stream, so the stream is existing but not running. Thus cap.read= (False,None).
You select a resolution via: cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1920)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 1080)
For Full HD 1920*1080.
I think I have done everything I can to set it on Python, including the resolution and frame rate. Maybe something is missing in the PYNQ environment setup.
When I ran the fswebcam command on Linux, I got the following error.
% fswebcam test.jpg
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Adjusting resolution from 384x288 to 352x288.
Error starting stream.
VIDIOC_STREAMON: Cannot allocate memory
Unable to use mmap. Using read instead.
Unable to use read.
By the way, both the Python program and fswebcam worked without any problems on the KV260 PYNQ.
I think I’ve checked all the basic settings, including the ones you pointed out.
I’ve also set the external power supply and the USB HOST jumper pin (JP2) correctly.
Thinking that the problem was caused by Linux, I’ve made various edits to “pynq.cfg” and “system-user.dtsi” and then rebuilt the system, but the result remains the same. I’m really feeling stuck right now.
・cap = cv2.VideoCapture(0) The result is the same
・WEBCAM: BAFFALO BSWHD06M (720P)
・This camera works fine with PYNQ on KV260
I think the problem lies with the PYNQ environment on the Zybo Z7-10 or with Ubuntu.
I’ll try reading from a video file if necessary, but will that help pinpoint the cause?