[Image-SIG] matlab vs Python for Image Processing applications

Douglas Bagnall douglas at paradise.net.nz
Mon Feb 11 21:22:43 CET 2008

TAN TH wrote:

>>>> import Image
>>>> im = Image.open("D:/test.gif")
>>>> print im.format, im.size, im.mode
> GIF (409, 460) P

The "P" is telling you that the image is in palette mode (as all gifs
are), but here you are assuming it is RGB mode:

>>>> r, g, b = im.split()

What you really want is

r, g, b = im.convert("RGB").split()

> which is more suitable software for Image Processing
> applications, Matlab or Python?

It depends what you are doing, what you are used to, and whether you
need to share it (Matlab is unavailable to many people).


More information about the Image-SIG mailing list