Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python opencv open camera

# import the opencv library
import cv2
  
  
# define a video capture object
vid = cv2.VideoCapture(0)
  
while(True):
      
    # Capture the video frame
    # by frame
    ret, frame = vid.read()
  
    # Display the resulting frame
    cv2.imshow('frame', frame)
      
    # the 'q' button is set as the
    # quitting button you may use any
    # desired button of your choice
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break
  
# After the loop release the cap object
vid.release()
# Destroy all the windows
cv2.destroyAllWindows()
Comment

PREVIOUS NEXT
Code Example
Python :: factorial recursion python 
Python :: python print dict new line 
Python :: read data from yaml file in python 
Python :: static dirs django 
Python :: drop multiple columns in python 
Python :: python read arguments 
Python :: drop na in pandas 
Python :: python read png file 
Python :: python get the key with the max or min value in a dictionary 
Python :: how to get the live website html in python 
Python :: pandas to tensor torch 
Python :: text size legend to bottom matplotlib 
Python :: import stopwords 
Python :: pandas to dict by row 
Python :: values of unique from dataframe with count 
Python :: how to reomve certain row from dataframe pandas 
Python :: series to dataframe with column names 
Python :: how to multiply two tuples in python 
Python :: pyaudio install error ubuntu 
Python :: how to find location using latitude and longitude in python dataframe 
Python :: random py 
Python :: python sorting array without inbuilt sort 
Python :: Python - Drop row if two columns are NaN 
Python :: powershell get list of groups and members 
Python :: python delete key from dict 
Python :: position of legend matplotlib 
Python :: how to slicing dataframe using two conditions 
Python :: huggingface default cache dir 
Python :: get string between two characters python 
Python :: urllib.request headers 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =