Python scipy.misc.lena() Examples
The following are 2
code examples of scipy.misc.lena().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
scipy.misc
, or try the search function
.
Example #1
Source File: image_tools.py From tools with BSD 3-Clause "New" or "Revised" License | 6 votes |
def test_graphcut(): import matplotlib.pyplot as plt from scipy.misc import lena im = lena() # Any bigger and my weak laptop gets memory errors bounds = (50, 50) im = imresize(im, bounds, interp="bicubic") all_matches, all_splits = graphcut(im, split_type="mean") to_plot = all_splits[-1] f, axarr = plt.subplots(2, len(to_plot) // 2) for n in range(len(to_plot)): axarr.ravel()[n].imshow(to_plot[n], cmap="gray") axarr.ravel()[n].set_xticks([]) axarr.ravel()[n].set_yticks([]) plt.show()
Example #2
Source File: image_tools.py From dagbldr with BSD 3-Clause "New" or "Revised" License | 6 votes |
def test_graphcut(): import matplotlib.pyplot as plt from scipy.misc import lena im = lena() # Any bigger and my weak laptop gets memory errors bounds = (50, 50) im = imresize(im, bounds, interp="bicubic") all_matches, all_splits = graphcut(im, split_type="mean") to_plot = all_splits[-1] f, axarr = plt.subplots(2, len(to_plot) // 2) for n in range(len(to_plot)): axarr.ravel()[n].imshow(to_plot[n], cmap="gray") axarr.ravel()[n].set_xticks([]) axarr.ravel()[n].set_yticks([]) plt.show()