有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 U,+=>ns>
y\@XW*_?
2d centered Fourier transform,居中的傅里叶变换 U~T/f-CT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% w-\GrxlbX
% Citation for this code and algorithm: icnp^2P
% Tatiana Latychevskaia and Hans-Werner Fink a"ht\v}1
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", 2} T"|56
% Appl. Optics 54, 2424 - 2434 (2015) R_Z
H+@O
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% D vK}UAj=
% The code is written by Tatiana Latychevskaia, 2002 NDI|;
% The version of Matlab for this code is R2010b 2pB@qi-]
{j^}"8GB
function [out] = FT2Dc(u0); ,7/N=mz
#PFf`7b,z
[Nx, Ny] = size(1i,1j); v4 c_UFEh<
HZM&QZHx)`
f1 = zeros(Nx,Ny); OP>'<FK
BGUP-_&
for ii = 1:Nx Jj([O2Eq$
for jj = 1:Ny Bh@j6fv
f1(ii,jj) = exp(1i*pi*(ii + jj)); km8[azB o
end 8Y&(o-R0
end ;zp0,[r
WF:i}+g+^
FT = fft2(f1.*in); Mb+cXdZb
:PjHs Np;^
out = f1.*FT; n*' |7 #;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%