"Chris S" <chrisspen gmail.com> wrote:
> 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.or
g/zone/pil-numpy.htm but it was
> written 8 years ago for Numeric and doesn't appear to
work with
> the current version of Numpy and PIL. Does anyone know
how to
> adapt this code to work correctly with the current
libraries?
>
Change a.typecode() to a.dtype and import Numeric to from
numpy.core
import numeric. Fix numeric not to be capitalized.
I'm guessing a bit, I did a similar fix for an earlier
version of
numpy and a.dtype used to be a.dtypechar, but I think it
should work.
max
_______________________________________________
Image-SIG maillist - Image-SIG python.org
htt
p://mail.python.org/mailman/listinfo/image-sig
|