Capturing Video via webcam
import cv2
capture = cv2.VideoCapture('road_car_view.mp4')
while True:
ret,frame = capture.read()
color_frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
cv2.imshow('window',color_frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
capture.release()
cv2.destroyAllWindows()
Comments
Post a Comment