有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 bR6bS7$
;% !?dH6
2d centered Fourier transform,居中的傅里叶变换 PLY7qMw
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% {'ZnxK'
% Citation for this code and algorithm: K7l{&2>?
% Tatiana Latychevskaia and Hans-Werner Fink ?eO|s5r
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", ;|^fAc~9{r
% Appl. Optics 54, 2424 - 2434 (2015) {0LdLRNZ
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% S;c=6@"
% The code is written by Tatiana Latychevskaia, 2002 67g/(4 &
% The version of Matlab for this code is R2010b f*5"Jh@
='JX_U`A^F
function [out] = FT2Dc(u0); )} #r"!
"Dk:r/
[Nx, Ny] = size(1i,1j); 2
g8PU$T
hB.dqv]^
f1 = zeros(Nx,Ny); j>T''Tf
Qm-P& g-
for ii = 1:Nx ES~]rPVS
for jj = 1:Ny 4|e#b(!
f1(ii,jj) = exp(1i*pi*(ii + jj)); q38; w~H
end t}tKm
end v\ox:C
Vg+SXq6G
FT = fft2(f1.*in); m\>x_:sE
g3Q #B7A
out = f1.*FT; 9mnON~j5
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%