2008/8/6 Matthieu Brucher <[EMAIL PROTECTED]>:
> Exactly. Using FFT to do a convolution should be done after some
> signal processing readings ;)

When you convolve two signals, of lengths N and M, you need to pad the
FFTs to length (N+M-1) before multiplication.

You can take a look at my linear position-invariant filtering code at:

http://mentat.za.net/hg/filter

To construct a Gaussian filter, for example, you do:

           >>> def filt_func(r,c):
                   return np.exp(-np.hypot(r,c)/1)

           >>> filter = LPIFilter2D(filt_func)

You may then apply it on data by doing `filter(data)`.  I also
implemented inverse filtering, which can be accessed using
`filter.inverse` and `filter.wiener`.

Regards
Stéfan
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to