有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 ^{8CShUCv
F2n4#b
2d centered Fourier transform,居中的傅里叶变换 V^;lg[:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Y!(w. G
% Citation for this code and algorithm: XTb.cqOC
% Tatiana Latychevskaia and Hans-Werner Fink ^MhMYA
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", vON7~KA
% Appl. Optics 54, 2424 - 2434 (2015) //$^~}wt
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% YD~(l-?"
% The code is written by Tatiana Latychevskaia, 2002 pNQ@aJ
% The version of Matlab for this code is R2010b U~zy;MT
5Ktll~+:#
function [out] = FT2Dc(u0); H\<PGC"_Y
"KC3+:tm
[Nx, Ny] = size(1i,1j); ?WS.RB e2
o/RGz PR
f1 = zeros(Nx,Ny); {FC<vx{42
*`bES V
:
for ii = 1:Nx s9u7zqCF
for jj = 1:Ny -s91/|n
f1(ii,jj) = exp(1i*pi*(ii + jj)); hn&NypI
end *li5/=UC5*
end *TxR2pC}
S->S p
FT = fft2(f1.*in); p Bu}c<
)4YtdAV
out = f1.*FT; ${t$:0R,h
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%