有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 w=Xil
S/CT;M@W
2d centered Fourier transform,居中的傅里叶变换 N%{&%C 6{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LGq}wxq
% Citation for this code and algorithm: BBy"qkTe
% Tatiana Latychevskaia and Hans-Werner Fink mBgMu@zt)
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", s$e0;C!D
% Appl. Optics 54, 2424 - 2434 (2015) U@v=q9'W
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% `INcZr"
% The code is written by Tatiana Latychevskaia, 2002 1P&XG@
% The version of Matlab for this code is R2010b ]Lq9Ompf(t
TCJH^gDt
function [out] = FT2Dc(u0); z5Hz-.
1,fjdd8OM;
[Nx, Ny] = size(1i,1j); c #+JG
E!J;bX5
f1 = zeros(Nx,Ny); O.S(H1z<G
&Mbpv)V8
for ii = 1:Nx -p =b5L
for jj = 1:Ny Hs<vCL \
f1(ii,jj) = exp(1i*pi*(ii + jj)); b`E'MX_ m
end az3rK4g
end RWf4Wh?d
dE2(PQb*P
FT = fft2(f1.*in); rkW*C'2fz
c,;-[sn
out = f1.*FT; )}\T~#Q]y
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%