On Thu, 11 Apr 2013 23:41:35 +0200 Stéfan van der Walt <stefan@sun.ac.za> wrote:
On Apr 11, 2013 8:49 PM, "Jérôme Kieffer" <google@terre-adelie.org> wrote:
On Wed, 10 Apr 2013 04:13:52 -0700 (PDT) abid rahman <abidrahman2@gmail.com> wrote:
Doesn't scikit-image has a 2d convolution function like cv2.filter2D in OpenCV which enables convolution of an image (or any numpy array) with custom kernel ?
Convolution can be done in Fourier space, especially if the kernel is
large ... I do that often, especially on nvidia GPU where FFT is for free.
SciPy also provides fftconvolve, for what it's worth.
I was surprised to figure out that fftpack (from numpy) can be faster than fftw depending on the input size... I guess it is not more than: numpy.fft.ifft2(numpy.fft.fft2(A)*numpy.fft.fft2(B).conjuguate())
Looking forward to seeing those opencl codes! (We have to reopen the backend discussion soon)
If cuda is an option, then I have implementations based on cufft which are really efficient (but most of us could do it so trivial it is). I consider openCL is both cleaner and more promising for open source (even if less easy) Cheers, -- Jérôme Kieffer <google@terre-adelie.org>
participants (1)
-
Jérôme Kieffer