Skip to content

Commit

Permalink
DOC grass example doesn't need skimage.
Browse files Browse the repository at this point in the history
  • Loading branch information
amueller committed May 4, 2012
1 parent 06128f4 commit ce35757
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions example.py
@@ -1,11 +1,11 @@
import numpy as np
import Image
import matplotlib.pyplot as plt
from skimage.data import lena
import slic

im = lena()
lena_argb = np.dstack([im[:, :, :1], im]).copy("C")
region_labels = slic.slic_n(lena_argb, 1000, 10)
slic.contours(lena_argb, region_labels, 10)
plt.imshow(lena_argb[:, :, 1:])
im = np.array(Image.open("grass.jpg"))
image_argb = np.dstack([im[:, :, :1], im]).copy("C")
region_labels = slic.slic_n(image_argb, 1000, 10)
slic.contours(image_argb, region_labels, 10)
plt.imshow(image_argb[:, :, 1:].copy())
plt.show()
Binary file added grass.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ce35757

Please sign in to comment.