Created
March 16, 2015 16:24
-
-
Save carlodri/b3dbb94f0ef7c5490d49 to your computer and use it in GitHub Desktop.
View movie preview in ipython
This file contains hidden or 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 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