MATLAB: How to undo the effect of ffts and fftshifts

digital image processing

I have a field (C_ccd) at the CCD (output) plane, placed at distance 'd' from the object plane, which is calculated as follows:
if true
d = 10^-03; %const distance
g1 = k*sqrt(1-fX.^2-fY.^2);%const, k is the wavenumber
G = exp(i*d*g1);% const propagation function
FT_in = (fftshift(fft2(fftshift(CA2)))); %fourier transform
C_ccd = fftshift(fft2(fftshift(FT_in.*G))); % propagated field at CCD placed at distance d
end
I just want the original field 'CA2' back. I am sorry if some of you find this problem silly or trivial in nature.

Best Answer

I found the answer:
if true
FT_in = fftshift(ifft2(fftshift(C_ccd.*G)));
CA2 = fftshift(ifft2(fftshift(FT_in.*G)));
end
Related Question