有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 ]e.+u
G 7]wg>*
2d centered Fourier transform,居中的傅里叶变换 >n~p1: $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% P;%QA+%7
% Citation for this code and algorithm: v|@n8ED|@K
% Tatiana Latychevskaia and Hans-Werner Fink cEdJn@ ,
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", pXv[]v
% Appl. Optics 54, 2424 - 2434 (2015) 6ZpcT&yL
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # &83;uys
% The code is written by Tatiana Latychevskaia, 2002 %>2t=)T
% The version of Matlab for this code is R2010b <y!r~?
A#S:_d
function [out] = FT2Dc(u0); &.hRVW(
L_"(A
#H:
[Nx, Ny] = size(1i,1j); n-3j$x1Ne
,,@`l\Pgd
f1 = zeros(Nx,Ny); `HG19_Z
=jc8=h[F<
for ii = 1:Nx Lc<xgN+cJ
for jj = 1:Ny K9Xd?
]a
f1(ii,jj) = exp(1i*pi*(ii + jj)); 2j7d$y*'
end b',bi.FH
end vQmackY
@z)tC@
FT = fft2(f1.*in); Tki/d\!+
wp.e3l
out = f1.*FT; @O}j:b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%