Skip to content

Instantly share code, notes, and snippets.

Created March 30, 2020 13:38
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
import matplotlib.pyplot as plt
import cv2
import numpy as np
import os
import re
#listing down all the file names
frames = os.listdir('frames/')
frames.sort(key=lambda f: int(re.sub('\D', '', f)))
#reading frames
for i in frames:
img = cv2.imread('frames/'+i)
img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
img = cv2.GaussianBlur(img,(25,25),0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment