PDA

View Full Version : fftw problem



lordy
23rd February 2006, 11:22
Hi,

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.

example:
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)?
lordy

krsmichael
16th March 2006, 22:36
Your problem is discussed here:
http://mibai.tec.u-ryukyu.ac.jp/cgi-bin/info2www?(fftw.info)Real%20Multi-dimensional%20Transforms%20Tutorial