Skip to content

Instantly share code, notes, and snippets.

@carlodri
Created March 16, 2015 16:24
Show Gist options
  • Select an option

  • Save carlodri/b3dbb94f0ef7c5490d49 to your computer and use it in GitHub Desktop.

Select an option

Save carlodri/b3dbb94f0ef7c5490d49 to your computer and use it in GitHub Desktop.
View movie preview in ipython
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
from IPython.html.widgets import interact
def browse_images(data):
num_frames = data.shape[0]
def view_image(i):
plt.imshow(data[i], cmap=plt.cm.hot, interpolation='none')
plt.title('Frame %s' % i)
plt.show()
interact(view_image, i=(0,num_frames-1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment