有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 0N):8`dY
)wCV]TdF
2d centered Fourier transform,居中的傅里叶变换 1"~$(@oxG
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Wd?=RO`a
% Citation for this code and algorithm: N `[ ?db-%
% Tatiana Latychevskaia and Hans-Werner Fink + lZvj=gW
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", OPC8fX5.
% Appl. Optics 54, 2424 - 2434 (2015) ,tak{["
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *{dMo,.eI
% The code is written by Tatiana Latychevskaia, 2002 AtNF&=Op
% The version of Matlab for this code is R2010b USzO):o
[}`-KpV!;
function [out] = FT2Dc(u0); uA~?z:~=
1@xdzKua1
[Nx, Ny] = size(1i,1j); t^"8
v3'h
vfdTGM`3
f1 = zeros(Nx,Ny); c{[ lT2yxU
HM &"2c
for ii = 1:Nx
Ww=b{lUD
for jj = 1:Ny 6/.cS4
f1(ii,jj) = exp(1i*pi*(ii + jj)); ]MnQ3bWq"j
end h_15 " rd
end Sh\Jm*5
f"t+r
/d
FT = fft2(f1.*in); _
qU-@Y$
7'Gkip
out = f1.*FT; \WxBtpbQB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%