[Image-SIG] Custom filter

Fredrik Lundh fredrik at pythonware.com
Tue Sep 19 12:59:01 CEST 2006

"izak marais" <izakmarais at yahoo.com> wrote in message

> Is there a way to define a custom filter instead of using the predefined
> options in ImageFiler? I'd like to be able to give the 2d coefficients as
> a numpy array, but whatever the format should be, an explenation
> would be much appreciated. Just by looking at the ImageFilter help,
> it seems like it should be possible by calling filter() or Kernel(), but
> I can't deduce the necessary arguments and their formats.

the Kernel class is described in the on-line reference:


it simply expects a flattened list of 9 or 25 items, so you should be
able to use kernel.flat or kernel.flatten() or kernel.flatten(1) or what-
ever it's called in the current numpy version...

> Also, is there any easy way to search through the mail archives? As
> far as I can see there's no search option at
> http://mail.python.org/pipermail/image-sig/.

this URL lets you search the mailing list archives:


I prefer the gmane search engine, but that one seems to be down right


(the image-sig list is called gmane.comp.python.image over there)


More information about the Image-SIG mailing list