[MATRIX-SIG] convolution

Timothy A. Hochberg hochberg@wwa.com
Tue, 29 Jul 1997 10:12:27 -0500 (CDT)


On Tue, 29 Jul 1997, MISS. K.L.COLLIER wrote:

> I want to find the convolution of two images and am not sure how 
> to do it. There is a convolve function but its only 1D and there are
> 2D fft's but not an inverse 2D fft? How do I do it? Any ideas?

Looking at FFT.py, fft2d is implementd as:

def fft2d(a, s=None, axes=(-2,-1)):
        return _raw_fft2d(a,s,axes,fft)

So, I'd try defining inverse_fft2d as:

def inverse_fft2d(a, s=None, axes=(-2,-1)):
        return _raw_fft2d(a,s,axes,inverse_fft)

(Note that you have to explicitly import _raw_fft2d, import * won't pull
it in.)

Make sure you test this - it worked for one test case, but I wouldn't call
it tested.

 ____   
  /im  

+------------------------------------------------+
|Tim Hochberg            Research Assistant      |
|hochberg <at> wwa.com   University of Illinois  |
|                        Electrical Engineering  |
+------------------------------------------------+


_______________
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________