有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 {=><@]N
f,Sybf/uHh
2d centered Fourier transform,居中的傅里叶变换 b&!7(Q[ sT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% (6G5UwSt
% Citation for this code and algorithm: f[!QR
% Tatiana Latychevskaia and Hans-Werner Fink ;%#@vXH[Oo
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", >w?O?&Q$
% Appl. Optics 54, 2424 - 2434 (2015) W<3nF5!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 4
|N&Y
% The code is written by Tatiana Latychevskaia, 2002 )A['+s
% The version of Matlab for this code is R2010b _Ucj)Ud k
m4*Rr
function [out] = FT2Dc(u0); (yAQm pp
13Ee"r
[Nx, Ny] = size(1i,1j); lV^sVN Z]
UGPD5wX?
f1 = zeros(Nx,Ny); >b0e"eGt
F[c;iM(^
for ii = 1:Nx Q<r O5 -K
for jj = 1:Ny R/iw#.Yy
f1(ii,jj) = exp(1i*pi*(ii + jj)); X.g")Bt7
end oZ@_o3VG
end "@E1^
(CH F=g
FT = fft2(f1.*in); gRKmfJ*u
>"S'R9t
out = f1.*FT; M,PZ|=V6a
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%