Skip to content

Instantly share code, notes, and snippets.

@notmgsk
Created December 18, 2017 21:35
Show Gist options
  • Save notmgsk/414495915dd6fa139f86ea56d4f1765f to your computer and use it in GitHub Desktop.
Save notmgsk/414495915dd6fa139f86ea56d4f1765f to your computer and use it in GitHub Desktop.
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import glob
import time
from PIL import Image
fnames = glob.glob('vis8/nine/*.jpg')
shape = (3712, 3712)
im1 = np.zeros(shape)
im2 = np.zeros(shape)
t0 = time.time()
for idx, fname in enumerate(fnames):
im2 = Image.open(fname)
im1 = im1 + np.asarray(im2, dtype=int)
t1 = time.time()
print(t1 - t0)
im1 = im1/365
# plt.imshow(im1, cmap='Greys')
plt.imsave("out.jpg", im1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment