Skip to content

Instantly share code, notes, and snippets.

View khatbahusain's full-sized avatar
🎯
Focusing

husain khatbahusain

🎯
Focusing
View GitHub Profile
@khatbahusain
khatbahusain / extract_frames.py
Created April 2, 2022 09:08 — forked from dsalaj/extract_frames.py
Extract and downsample frames from video to numpy array
import cv2
import numpy as np
print(cv2.__version__)
vidcap = cv2.VideoCapture('vid.mp4')
success,image = vidcap.read()
count = 0
success = True
frames = []
while success:
frames.append(image)