I'm trying to smooth a 2D array of floats by converting it to a PIL
image, blurring it, then converting it back to an array. However, I
can find no practical way to convert arrays to and from PIL.
I've found http://effbot.org/zone/pil-numpy.htm but it was written 8
years ago for Numeric and
You're missing the headers for TK. You probably need to install
something like python-devel or tcl-devel packages.
but you should be able to use older PIL to do this, just not quite as
efficiently as with the array interface.
See tostring and fromstring in both PIL and numpy.
-Chris
Chris S
1. You probably have to install tk/tcl development package (I was a
redhat user few years ago, so that is what I can recall)
2. Blurring is carried via a convolution, so probably a faster and more
flexible method is to use ndimage (numpy.numarray.nd_image), or scipy.
Nadav
-Original