有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 u^2)oL
"[A]tklP
2d centered Fourier transform,居中的傅里叶变换 s{g^K#BoFi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% v_U+wga
% Citation for this code and algorithm: Tvp ~~Dk
% Tatiana Latychevskaia and Hans-Werner Fink jEK{QOq0
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", 7 ) Q>R
% Appl. Optics 54, 2424 - 2434 (2015) 6:\0=k5
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Fsdp"X.
% The code is written by Tatiana Latychevskaia, 2002 K=Q<G:+&V
% The version of Matlab for this code is R2010b \%],pZsA ~
Z+p'3
function [out] = FT2Dc(u0); 4~8!3JH39
9):h
%o
[Nx, Ny] = size(1i,1j); 6gr?#D -F
=74yhPAW
f1 = zeros(Nx,Ny); 0c{-$K}
nDG41)|
for ii = 1:Nx ;@5N
for jj = 1:Ny n1Ic[cM}
f1(ii,jj) = exp(1i*pi*(ii + jj)); @wVq%GG}
end 4hl`~&yDf
end !+R_Z#gB
$3yzB9\a"
FT = fft2(f1.*in); &];:uYmMU
@m`1Vq?O
out = f1.*FT; Hl|EySno
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%