Access IP Camera in Python OpenCV

后端 未结 11 1414
执笔经年
执笔经年 2020-11-29 01:49

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(Tr         


        
11条回答
  •  借酒劲吻你
    2020-11-29 02:39

    First find out your IP camera's streaming url, like whether it's RTSP/HTTP etc.

    Code changes will be as follows:

    cap = cv2.VideoCapture("ipcam_streaming_url")
    

    For example:

    cap = cv2.VideoCapture("http://192.168.18.37:8090/test.mjpeg")
    

提交回复
热议问题