有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 *s;$`8fM<
A]Q4fD1q
2d centered Fourier transform,居中的傅里叶变换 p;X[_h
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% l<GRM1^kU
% Citation for this code and algorithm: "yL&?B"9@
% Tatiana Latychevskaia and Hans-Werner Fink Sg')w1
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", Br1JZHgA
% Appl. Optics 54, 2424 - 2434 (2015) )bPwB.} kq
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% st/Tb/
% The code is written by Tatiana Latychevskaia, 2002 uqX"^dn4u
% The version of Matlab for this code is R2010b (Q#ArMMORI
$(#o)r>_R
function [out] = FT2Dc(u0); uh`~K6&*\w
1QjrL@$>15
[Nx, Ny] = size(1i,1j); N~Ax78TX
rx|/]NE;
f1 = zeros(Nx,Ny); s13Iu#
^EZ)NG=e5
for ii = 1:Nx tj{rSg7{
for jj = 1:Ny >3 qy'lm
f1(ii,jj) = exp(1i*pi*(ii + jj)); f5mk\^
end -D38>#Y
end {l\v J#r:
%+xh
FT = fft2(f1.*in); P^VV8Z>\&
ax7ub
out = f1.*FT; 9tk}_+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%