有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 p_B5fm7#6W
r>lo@e0G
2d centered Fourier transform,居中的傅里叶变换 B!x7oD9
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ^2`*1el
% Citation for this code and algorithm: 7Tc^}Q
% Tatiana Latychevskaia and Hans-Werner Fink !!<H*9]+W;
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", n[gc`#7|{e
% Appl. Optics 54, 2424 - 2434 (2015) IMSLHwZ
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0i>>CvAl}
% The code is written by Tatiana Latychevskaia, 2002 Q"s]<MtdS
% The version of Matlab for this code is R2010b @M*oq2U;
$ vBFs]h
function [out] = FT2Dc(u0); Q%QIr
':7gYP*v
[Nx, Ny] = size(1i,1j); ]64pb;w"$D
i<M
F8$
f1 = zeros(Nx,Ny); cS%;JV>C
lNo]]a+_
for ii = 1:Nx K*P:FCz
for jj = 1:Ny 6SF29[&
f1(ii,jj) = exp(1i*pi*(ii + jj)); *o=[p2d"X
end P>hR${KE
end 2f5YkmGc";
Ce:w^P+
FT = fft2(f1.*in); r-AD*h@QZ
' 7H"ezt
out = f1.*FT; eyuQ}R
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%