How to Capture Video From Webcam Camera using OpenCV
Machine Learning courses with 100+ Real-time projects Start Now!!
Program 1
import cv2
vdo=cv2.VideoCapture("D://old/array.mp4")
#vdo=cv2.VideoCapture(0)
while True:
ret,myframe=vdo.read()
myframe=cv2.resize(myframe,(500,500))
# gry=cv2.cEvtColor(myframe,cv2.COLOR_BGR2GRAY)
# gry=cv2.resize(myframe, (500, 500))
cv2.imshow('My Web Cam Device',myframe)
# cv2.imshow('My Web Cam Device Gray', gry)
if(cv2.waitKey(1)==ord('e')):
break
vdo.release()
cv2.destroyAllWindows()
Your 15 seconds will encourage us to work even harder
Please share your happy experience on Google

