有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 ?}U(3
-RvQB
2d centered Fourier transform,居中的傅里叶变换 9vvx*rD
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ikvWh<=>H
% Citation for this code and algorithm: vbC\?\_
% Tatiana Latychevskaia and Hans-Werner Fink WL?\5?G9l
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", Dw<bn<e-
% Appl. Optics 54, 2424 - 2434 (2015) < F.hZGss7
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% }%_ b$
% The code is written by Tatiana Latychevskaia, 2002 ~3WF,mW
% The version of Matlab for this code is R2010b f m)pulz
t_$2CRG#
function [out] = FT2Dc(u0); \Yc'~2n
sEGO2xeI
[Nx, Ny] = size(1i,1j); G#u6Am)T
m;GbLncA
f1 = zeros(Nx,Ny); ^5h]Y;tx
w"cZHm
for ii = 1:Nx *&^:T~|=!
for jj = 1:Ny [nrYpb4
f1(ii,jj) = exp(1i*pi*(ii + jj)); K|hjEQRv
end nwF2aRNV
end :<bB?N(
4hTMbS_;
FT = fft2(f1.*in); Kk-S}.E
x"gd8j]s
out = f1.*FT; zGAq-<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%