Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


Wojtek
Posts:
8
Registered:
5/7/12


Strange object position after IFFT2
Posted:
Dec 27, 2012 10:54 AM


Hello. I'm working with the Projection Slice Theorem (but it is not important in this case). I have a set of vectors that are projections of my object at different angles (cuts from bmp 2d images). I calculate fft of these vectors:
my_vector = double(image_cut) ; my_fft = fftshift(fft(my_vector)) ;
so that now I have 1D Fourier Transform with 0 freq. at the center. Now I put that vector into a 2d matrix (named "my_spectrum"), which will be my 2D Fourier domain. I place vector so that it's center is in the centre of the matrix (where 0 freq should be). In this way I put all the vectors  every one of them is placed in the same way, just the angle is different  I get a starlike shape of my spectrum. Now I calculate IFFT2 from so created 2D spectrum:
my_reconstruction = ifft2(ifftshift(my_spectrum)) ;
so first I ifftshift to place 0 freq. in the corners, then I ifft2. According to the theory, I should get my initial object this way. And I think (not sure) that I get it but in a very strange way. My object should me more or less a circle. It's difficult to explain what is wrong so I will link to the image: http://imageshack.us/photo/myimages/254/22429150.jpg/
As you can see the ifft2 worked wrong. Instead of a circle I have 4 halves  and as I suspect these are halves of my circle. These halves are placed in such way, that no fftshift is possible  and there should be no need to use fftshift on the reconstructed image. What could I do wrong? What kind of mistake may lead to such reconstruction? I will be very grateful for your help, I'm fighting with this for too long... I can give more details if needed!
PS What is also strange is the fact, that after changing from my_reconstruction = ifft2(ifftshift(my_spectrum)) ; to my_reconstruction = ifft2(my_spectrum) ; there is no difference in the reconstructed image.



