Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to connect ip camera to opencv python

import cv2

#print("Before URL")
cap = cv2.VideoCapture('rtsp://admin:123456@192.168.1.216/H264?ch=1&subtype=0')
#print("After URL")

while True:

    #print('About to start the Read command')
    ret, frame = cap.read()
    #print('About to show frame of Video.')
    cv2.imshow("Capturing",frame)
    #print('Running..')

    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

cap.release()
cv2.destroyAllWindows()
Comment

how to connect ip camera to opencv python

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()
Comment

PREVIOUS NEXT
Code Example
Python :: print 
Python :: find the median of input number in a list and print 
Python :: Binary search tree deleting 
Python :: includes python 
Python :: python n range num list 
Python :: Python Permutation without built-in function [itertools] for Lists 
Python :: sns.savefig 
Python :: Flask / Python. Get mimetype from uploaded file 
Python :: python utf upper() 
Python :: deepcopy python 
Python :: ope pickle file 
Python :: how to scan directory recursively python 
Python :: how to input sentence in python 
Python :: filter function in python 
Python :: counting unique values python 
Python :: install requests-html with conda 
Python :: python bot ban script 
Python :: python bug 
Python :: Python use number twice without variable 
Python :: datatime add time in float 
Python :: re sub python 
Python :: sqlalchemy one to one foreign key 
Python :: how to make a new key in a dictionary python 
Python :: how to create multiple file in python using for loop. 
Python :: how to loop function until true python 
Python :: .size pandas 
Python :: groupbycolumn 
Python :: create table numpy 
Python :: reshape (-1,1) 
Python :: python open file location 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =