[SciPy-User] Using scipy.signal.fftconvolve() and scipy.signal.convolve()

Abel Daniel abli at freemail.hu
Wed Jan 19 03:19:10 EST 2011


On Tue, Jan 18, 2011 at 01:19:24PM -0800, David Baddeley wrote:
> What you're getting form fftconvolve looks about right - with ordinary convolve 
> I suspect your problem might be that you're using 8 bit ints and it's 
> overflowing & thus giving you the random noise pattern. Ffts cast their inputs 
> to double first. I'd suggest casting your image to float - ie: 
> a = a.astype('f')
> before doing the standard convolutions.
Thanks!
Indeed that was the problem, casting as you suggested results in convolve giving
the same results as fftconvolve

Daniel Abel
abli at freemail.hu 



More information about the SciPy-User mailing list