Converted image not displaying

Abder-Rahman Ali abder.rahman.ali at gmail.com
Thu Jan 21 13:07:25 EST 2016


Thanks a lot for your replies. The code that works for me looks as follows:

import skimage.io as io
from skimage.color import rgb2gray 
img = io.imread('baboon.png')
img_grayscale = rgb2gray(img)
show_grayscale = io.imshow(img_grayscale)
io.show()

On Thursday, January 21, 2016 at 12:46:10 PM UTC+1, Abder-Rahman Ali wrote:
>
> I'm trying to convert a color image to a grayscale image, as follows:
>
>
> from skimage import iofrom skimage.color import rgb2gray 
> img = io.imread('baboon.png')
> img_grayscale = rgb2gray(img)
> io.imshow(img_grayscale)
>
>
> The code works fine, but the image does not get displayed, why is that?
>
>
> Thanks.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20160121/ca6e62b6/attachment.html>


More information about the scikit-image mailing list