Tehada Tehada - 4 months ago 16
Python Question

Skimage: how to show image

I am novice at skimage and I try to show the image in my ipython notebook:\

from skimage import data, io
coins = data.coins()
io.imshow(coins)


But I see only the following string:

<matplotlib.image.AxesImage at 0x7f8c9c0cc6d8>


Can anyboby explain how to show image right under the code like here:
Correct output

Answer

Just add matplotlib.pyplot.show() after the io.imshow(coins) line.

from skimage import data, io
from matplotlib import pyplot as plt


coins = data.coins()
io.imshow(coins)
plt.show()