[PYTHON MATRIX-SIG] Re: [PYTHON IMAGE-SIG] convolution

Fredrik Lundh fredrik_lundh@ivab.se
Fri, 18 Oct 1996 10:43:03 +0200


(intentionally cross-posted to matrix-sig)

> I would like to know, if there is an efficient method for python
> available to calculate a convolution (of a 2D image and a a
> windowing mask).

  The PIL itself supports only 3x3 and 5x5 convolution filters, mainly
intended for "image enhancement" purposes.  In 0.1, there's only a few
hardwired filters available, you cannot provide you own kernels (this
will change in 0.2).

  For fancier stuff, convert the image into a matrix and use numerical
python to process it (the most recent version of NumPy includes FFT
support).  A crude interface between PIL and NumPy (using tostring)
interface has been posted to this list earlier; PIL 0.2 will
(hopefully) include slicker interfaces.

  As for 2D convolutions, ask on the matrix-sig list.  It's full of
number crunching wizards (right? ;-)

Regards	/F

=================
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================