What did you mean by “If the camera is recognized, but has a different index, you can modify the code.” If it is about the index 0, 1 or -1 of cv2.VideoCapture, I changed it but I still got the issue.
Is pynq support the correct entity to ask for a possible modification of the jupyter notebook available online? Or would I have to contact another entity?
This part of the notebook is working with capture = cv2.VideoCapture(0, cv2.CAP_V4L2).
ls -la /dev/video* is displaying:
I have another problem at the end of the notebook. I want to send the capture of the webcam on the minidisplay port.
The end of the notebook is executing, but nothing is displayed on a screen connected to the minidisplay port.
I did a print(frame), and the frame was empty:
I tried capture = cv2.VideoCapture(0+ cv2.CAP_V4L2), but the frame was still empty. Same thing with an index of 1.
I think that the error is in capture.read(frame), because in the notebook usb_webcam, another method was used to fill the frame, and worked: ret, frame = capture.read()
I tried that ret, img = capture.read() and frame[:] = img and it worked: my stream was displayed on my screen. Thank you for the indication.
I just had to modify the resolution of capture.set, because capture.set(3,1280) showed me a lower resolution. But that is a cv2 strange issue.
To sum up this request, is it possible to modify the notebook in two ways: change capture = cv2.VideoCapture(0) into capture = cv2.VideoCapture(0, cv2.CAP_V4L2) and change capture.read(frame)
into ret, img = capture.read() frame[:] = img
I thank everyone who helped with these issues once again.
It is managed by the PYNQ team. These issues belong to the forum, but since there is a solution, I appreciate if you could contribute it back to the repo with a PR,
What is a PR? Is it a Partial Reconfiguration? I am sorry, I do not know how to do it.
From what I see online, a PR is related to the bitstream. But the issues are not with the bitstream, the PL. The issues are with the jupyter notebook, the PS.