有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 Y<1]{4Wt
a3i;r M2
2d centered Fourier transform,居中的傅里叶变换 .Y@)3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LHy-y%?i
% Citation for this code and algorithm: 2VSs#z!
% Tatiana Latychevskaia and Hans-Werner Fink h7 uv0a~0
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", R
2.y=P8N
% Appl. Optics 54, 2424 - 2434 (2015) E]Wnl\Be
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% <<Zt.!hS
% The code is written by Tatiana Latychevskaia, 2002 -s]
% The version of Matlab for this code is R2010b >LqW;/&S<
'VH%cz*
function [out] = FT2Dc(u0); c{X>i>l>
z
xe6M~+
[Nx, Ny] = size(1i,1j); Vs/Z8t
MSef2|"P#
f1 = zeros(Nx,Ny); W
PDL$y
Z{'.fq2A
for ii = 1:Nx FPg5!O%
for jj = 1:Ny .nGYx
f1(ii,jj) = exp(1i*pi*(ii + jj)); c UJUZ@ol
end Y$tgz)
end {'(1c)q>
A4C4xts]N
FT = fft2(f1.*in); B Q)1)8r
:#yjg1aej
out = f1.*FT; u<}PcI.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%