On Tue, 04 Oct 2005 11:56:51 +0200, Raphaƫl MARC <[EMAIL PROTECTED]> wrote:
>Hello, > >Can anyone tell me how to open an image >and transform it into a list so that >the functions of the multi dimensionnal module of >numarray (numarray.nd image) can process it ? > >Do I have to use PIL ? > >So I would code something like : >import Image >im = Image.open("Python.jpg") >data = list(im.getdata()) >import numarray.nd image as ti >ti.median filter(data,...) I've been doing something like that... from numarray import * import numarray.nd_image as Filter import PIL.Image as Image im = Image.open(file_name) array_dat = reshape(array(list(im.getdata())), im.size) filt_array_dat = Filter.correlate(array_dat, my_filter) et cetera... Matt Feinstein -- There is no virtue in believing something that can be proved to be true. -- http://mail.python.org/mailman/listinfo/python-list