Yeaaaaah.....same error....
Code:
Traceback (most recent call last):
File "C:\Users\Lucas\Desktop\cdch\render_stream3.py", line 19, in <module>
cv2.imshow("img", img)
error: C:\slave\WinInstallerMegaPack\src\opencv\modules\core\src\array.cpp:2482: error: (-206) Unrecognized or unsupported array type
Using this code:
Code:
import cv2
import numpy as np
import time
camera_ip = "10.25.76.11"
vc = cv2.VideoCapture()
vc.set(cv2.cv.CV_CAP_PROP_FPS, 1)
if not vc.open('http://%s/mjpg/video.mjpg' % camera_ip):
time.sleep(0)
h = vc.get(cv2.cv.CV_CAP_PROP_FRAME_WIDTH)
w = vc.get(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT)
capture_buffer = np.empty(shape=(h, w, 3), dtype=np.uint8)
while True:
retval, img = vc.read(capture_buffer)
cv2.imshow("img", img)
if cv2.waitKey(20) == 27:
break
cv2.destroyAllWindows()
exit(0)