有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 (eAz
nTU
6j!idA!'
2d centered Fourier transform,居中的傅里叶变换 '{-Ic?F<P
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% =R<92v
% Citation for this code and algorithm: J/IRCjQ}
% Tatiana Latychevskaia and Hans-Werner Fink C^;>HAK|F
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", $01csj
% Appl. Optics 54, 2424 - 2434 (2015) NcBz("
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% W,"Re,`H
% The code is written by Tatiana Latychevskaia, 2002 S+"Bq:u"
% The version of Matlab for this code is R2010b \d*ts(/a*
4jSYR#Hqp`
function [out] = FT2Dc(u0); {1qr6P,"
Xmi~fie
[Nx, Ny] = size(1i,1j); Zl>dBc%
Np i)R)
f1 = zeros(Nx,Ny); hw.>HT|.N
3-&~jm~"
for ii = 1:Nx zk"8mTg
for jj = 1:Ny RL$%Vy0
f1(ii,jj) = exp(1i*pi*(ii + jj)); P*H0Hwn;
end TyjZ
end k>\v]&|T`
8t. QFze?
FT = fft2(f1.*in); fs?H
a#k7 aOT0
out = f1.*FT; 0n'vF&E8
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%