[Image-SIG] Image to matrix

Chris.Barker at noaa.gov Chris.Barker at noaa.gov
Wed Jun 6 07:16:21 CEST 2007

Alex Torquato S. Carneiro wrote:
> I'm doing a project in Python. It's a capture and process a image, I'm 
> using PIL for images and scipy (together numpy) 

> I'm needing to convert a image in a matrix type, can anyone help me?

The latest version of PIL supports this directly, you can do:

M = numpy.asarray(PIL_Image)



Christopher Barker, Ph.D.

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov

More information about the Image-SIG mailing list