To answer this question and potentially shine a bit more light on the issue:

The example images shipped with the package and exposed by skimage.data actually are shipped as raw files in that directory. Upon import of skimage.data, these convenience functions (e.g. skimage.data.lena()) are actually wrapping skimage.io.imread for the fixed, known local path to each image file and returning the result.

Take a look at the __init__.py file for skimage.data to see what’s going on.

So, the io module is required - we just handle that behind the scenes for these examples.

Hope that helps someone,
Josh

On Monday, November 25, 2013 4:24:18 PM UTC-6, Michael Aye wrote:

I just stumbled over the 3 lines of code on scikits' title page:


from skimage import data, io, filter
image = data.coins() # or any NumPy array!
edges = filter.sobel(image)
io.imshow(edges)

and wondered: Isn't it a bit funny to require an I/O module to show an image that is already loaded?

My apologies if that has been discussed before.

Michael