有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 4GmSG,]
.j'@K+<45
2d centered Fourier transform,居中的傅里叶变换 9-X{x95]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% S)Ub/`f{s
% Citation for this code and algorithm: '#pMEVP
% Tatiana Latychevskaia and Hans-Werner Fink C[Y%=\6'0
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", vTe$77n
% Appl. Optics 54, 2424 - 2434 (2015) Mp DdJ,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
f4A4
% The code is written by Tatiana Latychevskaia, 2002 SNopAACf1
% The version of Matlab for this code is R2010b {="Su{i}}
*Bb|N--jI
function [out] = FT2Dc(u0); U{U:8==
mE3SiR "
[Nx, Ny] = size(1i,1j); }uV?
aHVdClD2o
f1 = zeros(Nx,Ny); =+SVzK,+3
Sm*Jysy`
for ii = 1:Nx auyKLT3C
for jj = 1:Ny VDb,$i.Z0
f1(ii,jj) = exp(1i*pi*(ii + jj)); O=!)})YG
end *'AS^2'
end yP1Y3Tga=
%O4}i@Fe
FT = fft2(f1.*in); E<98ahZ?l
~_# Y,)S!z
out = f1.*FT; N c&i) qh
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%