有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 a.Mp1W
2'x_zMV
2d centered Fourier transform,居中的傅里叶变换 D&oC1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% MT V'!Zxs
% Citation for this code and algorithm: Dgkt-:S/T|
% Tatiana Latychevskaia and Hans-Werner Fink L~yy;)]W
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", |YlUt~H>
% Appl. Optics 54, 2424 - 2434 (2015) %`}Qkb/Lyh
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OsK=% aDpj
% The code is written by Tatiana Latychevskaia, 2002 _@@S,(MA
% The version of Matlab for this code is R2010b fqr}tvMr=T
jf%Ydr}`
function [out] = FT2Dc(u0); ae^xuM?7
Tok"-$`N
[Nx, Ny] = size(1i,1j); a;h:o>Do5
) Z^(+
f1 = zeros(Nx,Ny); /g8yc'{p
k(7!W
for ii = 1:Nx ^L'K?o
for jj = 1:Ny lLg23k{'
f1(ii,jj) = exp(1i*pi*(ii + jj)); '/"( `f,
end @lJGdp
end [XQNgSy?z
Z>D7C?v:(
FT = fft2(f1.*in); V3`*LU
PD$'xY|1=
out = f1.*FT; cX&c% ~
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%