Skip to content

Instantly share code, notes, and snippets.

View lhlong's full-sized avatar
🎯
Focusing

Lh Long lhlong

🎯
Focusing
View GitHub Profile
import cv2, queue, threading, time
class VideoCapture:
def __init__(self, name):
self.cap = cv2.VideoCapture(name)
self.q = queue.Queue()
t = threading.Thread(target=self._reader)
t.daemon = True
t.start()