ich habe eine IP-Cam und möchte gerne das Bild mit cv2 auslesen.
Mit dem VLC Player kann ich den Stream öffnen. In Python bekomme ich aber nur eine Fehlermeldung.
Code: Alles auswählen
cap = cv2.VideoCapture("rtsp://admin:123456@192.168.2.129")
ret, img = cap.read()
cv2.imshow('video_output', img)
cap.release()
cv2.destroyAllWindows()
Weiß jemand woran das liegt?Traceback (most recent call last):
File "C:\Users\Tobias\Desktop\test.py", line 10, in <module>
cv2.imshow('video_output', img)
cv2.error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-oduouqig\opencv\modules\highgui\src\window.cpp:376: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'