有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 "bO]
u4nXK
<KL|
2d centered Fourier transform,居中的傅里叶变换 So 5{E4[
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% x-QP+M`Pu
% Citation for this code and algorithm: ZEMo`O
% Tatiana Latychevskaia and Hans-Werner Fink j>:T)zhyY
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", 97g-*K
% Appl. Optics 54, 2424 - 2434 (2015) @kK=|(OB'
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% BA5= D>T-
% The code is written by Tatiana Latychevskaia, 2002 KWY G\#S0]
% The version of Matlab for this code is R2010b ";xEuX
+Q9HsfX/
function [out] = FT2Dc(u0); ;K_B,@:'
m6gr!aT
[Nx, Ny] = size(1i,1j); 0CR;t`M@
@rF\6I
f1 = zeros(Nx,Ny); 0t&H1xsxX
uXC?fMWp.
for ii = 1:Nx Ue7W&N^E
for jj = 1:Ny 'GyPl
f1(ii,jj) = exp(1i*pi*(ii + jj)); tv{.iM|V c
end s [!SG`&
end :Ry24X
utE:HD.PN
FT = fft2(f1.*in); -jy"?]ve.
Y>%NuL|s
out = f1.*FT;
u0e#iX
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%