有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 /v)! m&6]>
l;}7A,u
2d centered Fourier transform,居中的傅里叶变换 [y[v]'
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% (l8r>V
% Citation for this code and algorithm: fC GDL6E
% Tatiana Latychevskaia and Hans-Werner Fink qV8\/7'A0a
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", N E2sD
% Appl. Optics 54, 2424 - 2434 (2015) ilp;@O6
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% m2uML*&O5K
% The code is written by Tatiana Latychevskaia, 2002 L+rySP
% The version of Matlab for this code is R2010b 0 ,Qj:
*<1x:PR
function [out] = FT2Dc(u0); y7)[cvB
ws2j:B
[Nx, Ny] = size(1i,1j); O"qa&3t%
uM)9b*Vbo
f1 = zeros(Nx,Ny); 0rJ\e
W|rFl]~a
for ii = 1:Nx # 1dTM-
for jj = 1:Ny %r
f1(ii,jj) = exp(1i*pi*(ii + jj));
_Kl{50}]
end EXW
6yXLV
end sJI-
M |Q
FT = fft2(f1.*in); Q`p}X&^a
h[je _^5
out = f1.*FT; e|5B1rMM
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%