opencv实现网络摄像机rtsp拉流
opencv实现网络摄像机rtsp拉流
·
import cv2
url = "rtsp://admin:password@ip:端口/type=0&id=1"
cap = cv2.VideoCapture(url)
while(cap.isOpened()):
ret, frame = cap.read()
cv2.imshow('frame',frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
更多推荐
所有评论(0)