Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

read live video from usb opencv python

import cv2
cap = cv2.VideoCapture()
# The device number might be 0 or 1 depending on the device and the webcam
cap.open(0, cv2.CAP_DSHOW)
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 :: exec to return a value python 
Python :: pyqt loading screen 
Python :: pil image to numpy 
Python :: python check if exe is running 
Python :: last history of whatsapp message with python 
Python :: extract column numpy array python 
Python :: How to install XGBoost package in python 
Python :: enumerate python 
Python :: lock in python 
Python :: python rsa 
Python :: os.listdir in python 
Python :: remove empty lines from file python 
Python :: renaming multiple columns in pandas 
Python :: google smtp 
Python :: how to get something from a certian possition in a list python 
Python :: python pandas remove non-numeric characters from multiple columns 
Python :: pip install django rest framework 
Python :: R write dataframe to file 
Python :: python - row slice dataframe by number of rows 
Python :: get month name from datetime pandas 
Python :: Django Check hashed Password 
Python :: python put quotes in string 
Python :: adding columns in cpecific position 
Python :: find closest color python 
Python :: python fill string with 0 left 
Python :: Insert missing data in pandas 
Python :: python open file 
Python :: UTC to ISO 8601: 
Python :: python regex get all matches 
Python :: how to get synonyms of a word in python 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =