有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 gsIp y
*TL3-S?
2d centered Fourier transform,居中的傅里叶变换 Ch=jt*0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% JFRbWQ0
% Citation for this code and algorithm: C]zG@O!
% Tatiana Latychevskaia and Hans-Werner Fink vQ5rhRG)E
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", `'rvDaP
% Appl. Optics 54, 2424 - 2434 (2015) -ADb5-px
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% !4"$O@U4
% The code is written by Tatiana Latychevskaia, 2002 ?;rRR48T9E
% The version of Matlab for this code is R2010b uY&t9L8
w\JTMS$
function [out] = FT2Dc(u0); t4zKI~cO
Fp+fZU
[Nx, Ny] = size(1i,1j); pW<l9W
9KL)5_6 M
f1 = zeros(Nx,Ny); 9*a"^
C61E=$
for ii = 1:Nx fo;^Jg.
for jj = 1:Ny gp\o|igT
f1(ii,jj) = exp(1i*pi*(ii + jj)); u~'j?K.^
end RHI?_gf&
end s8*Q@0
Xq$9H@.
FT = fft2(f1.*in); tY`%vI [
o3:h!(#G
out = f1.*FT; ZyrVv\'
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%