有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 1FkS$ j8:
T:~c{S4&
2d centered Fourier transform,居中的傅里叶变换 r5 k{mV+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% fz9
,p;b
% Citation for this code and algorithm: &l&B[s6[
% Tatiana Latychevskaia and Hans-Werner Fink <k41j=d
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", t08E
2sI
% Appl. Optics 54, 2424 - 2434 (2015) WbIf)\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% V|vKYEFry
% The code is written by Tatiana Latychevskaia, 2002 +*'^T)sj/
% The version of Matlab for this code is R2010b q_J)68B R
sI&|qK-(
function [out] = FT2Dc(u0); AW6 "1(D
2.
t'!uwI
[Nx, Ny] = size(1i,1j); i]8 +JG6
_?aI/D
f1 = zeros(Nx,Ny); p7Q}xx
<i!:{'%
for ii = 1:Nx $,s"c(pv[,
for jj = 1:Ny p+ki1!Ed
f1(ii,jj) = exp(1i*pi*(ii + jj)); 'yIz<o
end )0tq&
end h)~i?bq!/
(^U
8wit/
FT = fft2(f1.*in); ,;
81FK
W%&[gDp
out = f1.*FT; Omkpjr(1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%