Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

cv2 videocapture program for python

import cv2

cap = cv2.VideoCapture(0) #0 for your primary camer and 1 for your secondary camera

while(True):
    ret, frame = cap.read() 
    cv2.imshow('frame', frame) #show window of your camera
    if cv2.waitKey(1) & 0xFF == ord('q'): #press q To exit
        break

cap.release()
cv2.destroyAllWindows()
Comment

PREVIOUS NEXT
Code Example
Python :: how to test wifi speed py 
Python :: read csv exclude index pandas 
Python :: python print to stderr 
Python :: remove empty strings from list python 
Python :: python time in nanoseconds 
Python :: how to say hello world in python 
Python :: selenium how to handle element not found python 
Python :: The following code shows how to reset the index of the DataFrame and drop the old index completely: 
Python :: python how to change size of a window 
Python :: remove item from list if it exists python 
Python :: add a column while iterating rows pandas 
Python :: list loop python 
Python :: how to check the type of a variable in python 
Python :: spark add column to dataframe 
Python :: python datetime milliseconds 
Python :: remove outliers numpy array 
Python :: python cartesian product 
Python :: how to get seconds from datetime in python 
Python :: python isprime 
Python :: how to make random colors in python turtle 
Python :: remove a char in a string python 
Python :: pandas shift columns up until value 
Python :: percentage of null values for every variable in dataframe 
Python :: how to get column names having numeric value in pandas 
Python :: python ceil 
Python :: move mouse round in python 
Python :: get a list of ids from queryset django 
Python :: __gt__ 
Python :: python typeddict 
Python :: colab add package 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =