Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python ip camera

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

python ip camera

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 :: encapsulation in python 
Python :: relu python 
Python :: how to create a function in python 
Python :: python code 
Python :: Generate random numbers following Poisson distribution, Geometric Distribution, Uniform Distribution, and Normal Distribution, and plot them 
Python :: python get dpi of image 
Python :: async asyncio input 
Python :: what is ord function on python 
Python :: remove list from list python 
Python :: geopandas rename column 
Python :: geopandas replace column name 
Python :: upload file django 
Python :: how to use replace in python 
Python :: how to average only positive number in array numpy 
Python :: difference between 2 dataframes 
Python :: python add hyphen to string 
Python :: pandas index append value 
Python :: conditional and in python 
Python :: Get text without inner tags text in selenium 
Python :: circle python programe 
Python :: python docker 
Python :: python child class call parent method 
Python :: check dictionary values pandas dataframe colu 
Python :: python split range into n groups 
Python :: tkinter convert Entry to string 
Python :: null in python 
Python :: * pattern by python 
Python :: python string upper method 
Python :: create a file in a specific directory 
Python :: python add columns to dataframe without changing the original 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =