有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 l)m\i_r:
2F[smUL
2d centered Fourier transform,居中的傅里叶变换 uo;aC$US
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% o?$kcI4
% Citation for this code and algorithm: =T;>$&qs
% Tatiana Latychevskaia and Hans-Werner Fink Kq@n BkO4
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", Z{s&myd
% Appl. Optics 54, 2424 - 2434 (2015)
DvCs 5
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% k
#y4pF_
% The code is written by Tatiana Latychevskaia, 2002 &4Q(>"iL4
% The version of Matlab for this code is R2010b j}7as&
.[%em9u
function [out] = FT2Dc(u0); kwU~kcM
FtXd6)_S
[Nx, Ny] = size(1i,1j); _-eF
&D
8d|omqe~P
f1 = zeros(Nx,Ny); 99w;Q 2k
eL3HX _2(
for ii = 1:Nx "| 0g 1rd
for jj = 1:Ny u;\:#721
f1(ii,jj) = exp(1i*pi*(ii + jj)); <7N8L
end \]ouQR.t@\
end Y?W"@awE"\
GxE"q-G
FT = fft2(f1.*in); ~SgW+sDFu
eYZ{mo7
out = f1.*FT; 7?a@i;E<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%