I am doing a project where I need to take the FFT and IFFT of a photo in MATLAB. There is a principle in optics where the intensity distribution from a lens is equal to the Fourier transform of the aperture that the light initially goes through. I'm having issues finding the FFT and IFFT of an ideal source.
A circular aperture should have an intensity pattern called Airy disk, which should result from the Fourier Transform of a circle. Here is a photo of the Airy disk that I'm using in my code:
Taking the inverse Fourier transform of the Airy disk should result in an image of a circular aperture, but all I'm seeing is black when I convert to uint8. If I leave it as type double then I see things that also look like Airy disks in the corners. Here is the code I'm using:
pic=imread('airy.jpg');
pic=rgb2gray(pic); %Convert to grayscale
imshow(pic)
title('Initial');
pic=double(pic); %Convert to double before transforms
pic=ifft2(pic); %Take IFFT of Airy disk
pic=real(pic); %Take real part
figure()
pic=uint8(pic); %If commented out, black screen has Airy disks in corners
imshow(pic);
Does anyone have any ideas on why the IFFT of the Airy disk doesn't return a circle? Thank you