You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for providing the image file, which is easy to use. I am building an image system by porting my own display circuit and Pcam5C control to PYNQ.
I went further and connected a WEBCAM (a general USB-connected camera), but I cannot capture images.
The situation is as follows:
Zybo Z7-10
Verify that the WEBCAM is recognized using the lsusb command.
External power supply, USB host jumper pin (JP2), etc. are set up
1. Unable to capture on PYNQ
Execute the following in Jupyter Notebook
import cv2
cap = cv2.VideoCapture(0, cv2.CAP_V4L2)
print(cap.isOpened())
print(cap.grab())
print(cap.read())
The following result is obtained and images cannot be read
True
False
(False, None)
2. Error in fswebcam command
When I executed the fswebcam command on Linux, the following error occurred.
% 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.
3. Repeated rebuilds did not solve the problem
I fixed the items in "pynq.cfg" that seemed related and rebuilt, but the result was the same.
I would appreciate any solutions or hints for rebuilding.
The text was updated successfully, but these errors were encountered:
Thank you for providing the image file, which is easy to use.
You are welcome.
I think it is rather software issues than hardware, USB host worked as expected, at least with dummy USB flash sticks.
I managed to build same test environment using old USB camera DEFENDER C-090. I can confirm that the problem is occurs. dmesg -T output is:
[Sun Oct 23 05:55:09 2022] chipidea-usb2 e0002000.usb: Rejecting highmem page from CMA.
Fast googling into issue give some results from Armbian community. Mentioned failures are connect to the kernel issues with V4L2 subsystem or something else, PYNQ 3.0.1 shipped with kernel from PetaLinux 2022.1 Linux pynq 5.15.19-xilinx-v2022.1 #1 SMP PREEMPT Mon Apr 11 17:52:14 UTC 2022 armv7l armv7l armv7l GNU/Linux. According forums probably versions 5.15 are known as affected.
Value of CONFIG_CMA_SIZE_MBYTES, seems to be okey for small images:
Thank you for providing the image file, which is easy to use. I am building an image system by porting my own display circuit and Pcam5C control to PYNQ.
I went further and connected a WEBCAM (a general USB-connected camera), but I cannot capture images.
The situation is as follows:
1. Unable to capture on PYNQ
Execute the following in Jupyter Notebook
The following result is obtained and images cannot be read
2. Error in fswebcam command
When I executed the fswebcam command on Linux, the following error occurred.
3. Repeated rebuilds did not solve the problem
I fixed the items in "pynq.cfg" that seemed related and rebuilt, but the result was the same.
I would appreciate any solutions or hints for rebuilding.
The text was updated successfully, but these errors were encountered: