[SciPy-dev] scipy.signal.convolve2d significantly slower than matlab
Tue Jun 17 09:53:42 CDT 2008
In addition to fftconvole, if the filter kernel is separable (Gaussian,
Sinc, difference-of-sinc), you can use the scipy.ndimage correlate1d.
Correlate1D is very fast and checks for kernel symmetry so can reduce the
number of mults. In your application script you are building a stack of
filtered images. I wrote a registration package in ndimage that has a 3D
separable filter for volume filtering prior to registration. I am about to
check in changes to the code that will include a test that shows how to get
both 3D and a stack of 2D filtered slices (which is an intermediate result
of the 3D). I typically do 3D filtering of 256x256x90 volumes and it is
under 1 second. I agree the convole2D needs to be improved for speed.
On Tue, Jun 17, 2008 at 2:27 AM, Stéfan van der Walt <email@example.com>
> Hi Joel
> 2008/6/16 Joel Schaerer <firstname.lastname@example.org>:
> > I've found that the 2D convolution code in scipy is significantly slower
> > matlab's. The following code:
> Also take a look at fftconvolve.
> Scipy-dev mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Scipy-dev