In [1]:
import glob
dir_name = 'output/'
prefix = dir_name + 'e_'
files = glob.glob(prefix+'*.jpg')
In [2]:
# Sort by numeric part
files.sort(key=lambda x: int(x[len(prefix):-4]))
files.append(dir_name+'final.jpg')
files[:5]
Out[2]:
In [3]:
# Set up some code to display the images in a notebook
import IPython.display
def show_img(fn):
h = IPython.display.HTML("<img src='"+fn+"'>")
IPython.display.display(h)
In [4]:
# Animated Display
import time
for img in files:
IPython.display.clear_output()
print(img)
show_img(img)
time.sleep(1)
In [5]:
%matplotlib inline
import matplotlib.pyplot as plt
from skimage import io
for img_fn in files:
print(img_fn)
im = io.imread(img_fn)
plt.figure(figsize=(3,2))
plt.axis('off')
plt.imshow(im)
plt.show()
In [ ]: