Re: [Numpy-discussion] strange behavior convolving via fft

2009-05-11 Thread Chris Colbert
Thanks Stefan. 2009/5/11 Stéfan van der Walt > 2009/5/11 Chris Colbert : > > Does the scipy implementation do this differently? I thought that since > FFTW > > support has been dropped, that scipy and numpy use the same routines... > > Just to be clear, I was referring to scipy.signal.fftconvolv

Re: [Numpy-discussion] strange behavior convolving via fft

2009-05-11 Thread Stéfan van der Walt
2009/5/11 Chris Colbert : > Does the scipy implementation do this differently? I thought that since FFTW > support has been dropped, that scipy and numpy use the same routines... Just to be clear, I was referring to scipy.signal.fftconvolve, not scipy's FFT (which is the same as NumPy's). Regards

Re: [Numpy-discussion] strange behavior convolving via fft

2009-05-11 Thread Stéfan van der Walt
Hi Chris, If you have MxN and PxQ signals, you must pad them to shape M+P-1 x N+Q-1, in order to prevent circular convolution (i.e. values on the one end sliding back in at the other). Regards Stéfan 2009/5/11 Chris Colbert : > Stefan, > > Did I pad my example incorrectly? Both images were upped

Re: [Numpy-discussion] strange behavior convolving via fft

2009-05-11 Thread Chris Colbert
Stefan, Did I pad my example incorrectly? Both images were upped to the larger nearest power of 2 (256)... Does the scipy implementation do this differently? I thought that since FFTW support has been dropped, that scipy and numpy use the same routines... Thanks! Chris 2009/5/11 Stéfan van der

Re: [Numpy-discussion] strange behavior convolving via fft

2009-05-11 Thread Stéfan van der Walt
Hi Chris 2009/5/11 Chris Colbert : > When convolving an image with a large kernel, its know that its faster to > perform the operation as multiplication in the frequency domain. The below > code example shows that the results of my 2d filtering are shifted from the > expected value a distance 1/2

Re: [Numpy-discussion] strange behavior convolving via fft

2009-05-11 Thread Chris Colbert
Ok, that makes sense. Thanks Chuck. On Mon, May 11, 2009 at 2:41 PM, Charles R Harris wrote: > > > On Mon, May 11, 2009 at 9:40 AM, Chris Colbert wrote: > >> at least I think this is strange behavior. >> >> When convolving an image with a large kernel, its know that its faster to >> perform t

Re: [Numpy-discussion] strange behavior convolving via fft

2009-05-11 Thread Charles R Harris
On Mon, May 11, 2009 at 9:40 AM, Chris Colbert wrote: > at least I think this is strange behavior. > > When convolving an image with a large kernel, its know that its faster to > perform the operation as multiplication in the frequency domain. The below > code example shows that the results of my

[Numpy-discussion] strange behavior convolving via fft

2009-05-11 Thread Chris Colbert
at least I think this is strange behavior. When convolving an image with a large kernel, its know that its faster to perform the operation as multiplication in the frequency domain. The below code example shows that the results of my 2d filtering are shifted from the expected value a distance 1/2