Access IP Camera in Python OpenCV

后端 未结 11 1405
执笔经年
执笔经年 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:51

    As mentioned above by @Gustavo GeoDrones you can find your Cam URL using https://www.ispyconnect.com/sources.aspx.

    Go to the website, click on the model of your camera and a "Cam Video URL Generator" will appear. Insert your IP, username, etc. and click on "generate".

    Cam URL for my Canon VB-H45 is (of course with my specific username, password and IP):

    http://username:password@IP/-wvhttp-01-/video.cgi
    

    The final code:

    cap = cv2.VideoCapture('http://username:password@IP/-wvhttp-01-/video.cgi')
    

提交回复
热议问题