有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 vm7ag 7@O
z(u,$vZ_
2d centered Fourier transform,居中的傅里叶变换 r~G amjS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ~z(0XKq0d
% Citation for this code and algorithm: <=Saf.
% Tatiana Latychevskaia and Hans-Werner Fink I
Z|EPzS
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", ?OPuv5!pI
% Appl. Optics 54, 2424 - 2434 (2015) 0#NbAMt
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% }qJ`nN8
% The code is written by Tatiana Latychevskaia, 2002 }G "EdhSl
% The version of Matlab for this code is R2010b w9StW94p
I/%L,XyRI
function [out] = FT2Dc(u0); /#z"c]#
Xf{9rZ+
[Nx, Ny] = size(1i,1j); _kc}:
xSqr=^
f1 = zeros(Nx,Ny); 9 I:3
)%b 5uZ
for ii = 1:Nx l<qEX O
for jj = 1:Ny H|$
*HQm
f1(ii,jj) = exp(1i*pi*(ii + jj)); #Cx#U"~G`
end Cd]g+R}j
end A)gSOC{3F)
e _(';Lk
FT = fft2(f1.*in); Qp7F3,/#
j"jQiL_*
out = f1.*FT; 0Y'ow=8M
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%