View Full Version : fftw problem

23rd February 2006, 10:22

i have a problem using fftw for a convolution of a image and a filter. The problem is that the dimension of the image changes (according to the documentation to nx*ny*(nz/2+1)) after using rfftwnd_one_real_to_complex. if the filter is created in fourier space (not transformed) it has the dimension of nx*ny*nz. so i have the problem that i cant just multiply the filter with the image because the size reduction in the fourier transform causes a dimension missmatch.

image in realspace 32*32*32 with fouriertransform 32*32*17
created in fourier space: filter 32*32*32

in matlab for example the size does not change on fourier transforms and i can simply mutliply it:

wedgedImage = real(ifourier(fourier(image).*fftshift(wedge(size( image), 30)));

anyone knows a solution for this problem (how to implement it with fftw)?

16th March 2006, 21:36
Your problem is discussed here: