jpeg image being read differently skimage.io.imread

54 views
Skip to first unread message

Vimal Thilak

unread,
Mar 3, 2016, 3:13:23 PM3/3/16
to scikit-image
Hi,

I have two servers on which I have installed skimage. When I do an skimage.io.imread on these two machines with the same image file, I noticed a difference in the shape of the returned image array:

Machine 1:

image_name = /path/to/JPEG

img = skimage.io.imread(image_name)

>>> img.shape

(3000, 4000, 3)


Machine 2:


img = skimage.io.imread(image_name)

>>> img.shape

(2, )


Both machines have skimage version '0.11.3'. I believe that both systems have Pillow installed. I do not know the version of Pillow. I did change the plug-in to matplotlib on Machine 2 and saw that the image was being read correctly. However, I'm curious to know the reason for this difference and what I can do to fix my machine #2


Furthermore, how do I find the version of Pillow installed on my system? A google search didn't come up with anything that was helpful (i.e, copy-pastable solution) :)


Thanks,


-Vimal

Stéfan van der Walt

unread,
Mar 4, 2016, 5:38:31 PM3/4/16
to scikit-image
Hi Vimal

Can you please try

skimage.io.imread(image_name, plugin='matplotlib') ?

Thanks!
Stéfan
> --
> You received this message because you are subscribed to the Google Groups
> "scikit-image" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to scikit-image...@googlegroups.com.
> To post to this group, send email to scikit...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/scikit-image/ef640963-7d67-4e00-9c2c-d71681104b56%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

François Boulogne

unread,
Mar 5, 2016, 3:03:10 AM3/5/16
to scikit...@googlegroups.com

> Can you please try
>
> skimage.io.imread(image_name, plugin='matplotlib') ?
>

I think Vimal said that it works with matplotlib, or misunderstood.

To get PIL's version, you can try

python -c 'import PIL; print(PIL.VERSION)'

Best,

--
François Boulogne.
http://www.sciunto.org
GPG: 32D5F22F


Reply all
Reply to author
Forward
0 new messages