How do I access my IP Camera stream?
Code for displaying a standard webcam stream is
import cv2
import numpy as np
cap = cv2.VideoCapture(0)
while(True):
ret, frame = cap.read()
cv2.imshow('frame',frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
How do I do the same exact thing but with the IP Camera?
My system:
- Python 2.7.14
- OpenCV 2.4.9
- Teledyne Dalsa Genie Nano XL Camera
Help will be highly appreciated
You can use video capture Object as
camera = cv2.VideoCapture("IP:PORT/video")
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…