有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 J+20]jI
Q GQ}I
2d centered Fourier transform,居中的傅里叶变换 *we*IhIP
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DAt Zp%
% Citation for this code and algorithm: C%\.
% Tatiana Latychevskaia and Hans-Werner Fink Wk&g!FR
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", zz~AoX7V6
% Appl. Optics 54, 2424 - 2434 (2015) BjyGk+A
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Z4'8x h)-
% The code is written by Tatiana Latychevskaia, 2002 |oI]
% The version of Matlab for this code is R2010b #99fFs`w
zd+<1R;
function [out] = FT2Dc(u0); {Kkut?5
.q7|z3@,
[Nx, Ny] = size(1i,1j); :")iS?l
fu6Ir,
f1 = zeros(Nx,Ny); 9Jhc5G
'WLh
D<
for ii = 1:Nx 12MWO_'g8
for jj = 1:Ny )kiC/Y}k
f1(ii,jj) = exp(1i*pi*(ii + jj)); mU3 @|a/@0
end y7)$~R):-
end v*k}{M
\ZPmPu9^(
FT = fft2(f1.*in); *D$[@-7
BLskUrPF
out = f1.*FT; P7`sJ("#
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%