Skip to content

Instantly share code, notes, and snippets.

View shahab7758's full-sized avatar
🎯
Focusing

shahab shahab7758

🎯
Focusing
View GitHub Profile
@shahab7758
shahab7758 / start-video-stream-w-opencv.py
Created October 20, 2019 14:21 — forked from keithweaver/start-video-stream-w-opencv.py
Stream video in Python using OpenCV
# For more info: http://docs.opencv.org/3.0-beta/doc/py_tutorials/py_gui/py_video_display/py_video_display.html
import cv2
import numpy as np
# Playing video from file:
# cap = cv2.VideoCapture('vtest.avi')
# Capturing video from webcam:
cap = cv2.VideoCapture(0)
currentFrame = 0