Created
March 30, 2020 13:38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
images=[] | |
for i in frames: | |
img = cv2.imread('frames/'+i) | |
img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) | |
img = cv2.GaussianBlur(img,(25,25),0) | |
images.append(img) | |
images=np.array(images) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment