有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 W A#y&
j$P`/-N
2d centered Fourier transform,居中的傅里叶变换 }RUK?:lEA
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% r(g#3i4Q
% Citation for this code and algorithm: 9x#Tj/5%
% Tatiana Latychevskaia and Hans-Werner Fink yB4eUa!1
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", e[db?f2!
% Appl. Optics 54, 2424 - 2434 (2015) K#R|GEwr
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% `X(H,Q}*;
% The code is written by Tatiana Latychevskaia, 2002 vJ>o9:(6
% The version of Matlab for this code is R2010b ##s:Ww
V%voe
function [out] = FT2Dc(u0); 3.h0
>oapw5~5
[Nx, Ny] = size(1i,1j); /#[mV(k
8k^1:gt^
f1 = zeros(Nx,Ny); OZ&SxR%q4
IB^vEY!`6_
for ii = 1:Nx Tzfk_h3hE
for jj = 1:Ny u0%bv\$m
f1(ii,jj) = exp(1i*pi*(ii + jj)); ksyQ_4^SO
end $]4o!Z
end <=%G%V_s
O:#/To'
FT = fft2(f1.*in); [f]:hJi
-2Dgr\M
out = f1.*FT; *56q4\1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%