有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 #8|NZ6x,
6K0*?j{;"
2d centered Fourier transform,居中的傅里叶变换 o%5Ao?z~
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 5q>u
}J
% Citation for this code and algorithm: xKux5u_
% Tatiana Latychevskaia and Hans-Werner Fink sva$@y7b
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", M 4?3l
% Appl. Optics 54, 2424 - 2434 (2015) xI8*sTx
6
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GUXX|W[6
% The code is written by Tatiana Latychevskaia, 2002 Br??Gdd
% The version of Matlab for this code is R2010b 1 j8,Zrg1
+[DVD
function [out] = FT2Dc(u0); R[t[M}q
\ed(<e>
[Nx, Ny] = size(1i,1j); uI wyan-
D1k]
f1 = zeros(Nx,Ny); eL!6}y}W
de=T7,G#
for ii = 1:Nx ii scm\
for jj = 1:Ny n]!H,Q1,T
f1(ii,jj) = exp(1i*pi*(ii + jj)); K-5)Y+| >
end p04w83 jX
end hT#mM*`
Q0-~&e_'
FT = fft2(f1.*in); zYsGI<4
>MH@FnUL
out = f1.*FT; "k/@tX1:R
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%