Hey there:-)
I´m trying to capture Videos… with no sucess. “libcamera-hello” is working perfectly, but if i try to run this code, it doesn´t
import cv2
print("Package imported")
cap=cv2.VideoCapture(0)
while True:
sucess, img=cap.read()
cv2.imshow("Video",img)
if cv2.waitKey(1) & 0xFF==ord('q'):
break
[ WARN:0@12.692] global /tmp/pip-wheel-mqp59bja/opencv-python_d3c31dc7802240788618bfcd2774f816/opencv/modules/videoio/src/cap_v4l.cpp (1000) tryIoctl VIDEOIO(V4L2:/dev/video0): select() timeout.
Traceback (most recent call last):
File “/home/pi/MyProjects/test.py”, line 13, in
cv2.imshow(“Video”,img)
cv2.error: OpenCV(4.5.5) /tmp/pip-wheel-mqp59bja/opencv-python_d3c31dc7802240788618bfcd2774f816/opencv/modules/core/src/array.cpp:2494: error: (-206:Bad flag (parameter or structure field)) Unrecognized or unsupported array type in function ‘cvGetMat’
raspberry 3. using python 3.9.2, opencv 4.5.5
Can u help me?
kr
Andy