有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 LH4>@YPGE#
g%ubvu2t]
2d centered Fourier transform,居中的傅里叶变换 *c{wtl@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% :z]}ZZ
% Citation for this code and algorithm: CdY8#+"
% Tatiana Latychevskaia and Hans-Werner Fink a Sf/4\
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", OB(pIzSe
% Appl. Optics 54, 2424 - 2434 (2015) _2b9QP p
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% o/C(4q6d
% The code is written by Tatiana Latychevskaia, 2002 P}0*{%jB
% The version of Matlab for this code is R2010b Frk c O
~4Pc_%&i
function [out] = FT2Dc(u0); #/|75
4]]
J1bA2+5.*e
[Nx, Ny] = size(1i,1j); qD#VbvRc9+
`-_N@E1'>
f1 = zeros(Nx,Ny); QdQd(4/1
6SVqRD<`
for ii = 1:Nx f/,tgA
for jj = 1:Ny Ur^j$B}
f1(ii,jj) = exp(1i*pi*(ii + jj)); -T7xK/
end 9}5K6aQ
end 9IA$z\<<w
A3HF,EG
FT = fft2(f1.*in); ~]BMrgn
XF|WCZUnY%
out = f1.*FT; 9AHSs,.t
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%