有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 6|Dtx5
"r
R%LFFMVn
2d centered Fourier transform,居中的傅里叶变换 O_s/BoB@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Q7pCF,;
% Citation for this code and algorithm: Msvs98LvW
% Tatiana Latychevskaia and Hans-Werner Fink 'N6oXE
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", QNE/SSL
% Appl. Optics 54, 2424 - 2434 (2015) lNc0znY
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1LFad>`
% The code is written by Tatiana Latychevskaia, 2002 yS
K81`
% The version of Matlab for this code is R2010b ~9@527m<',
$#%R_G]
function [out] = FT2Dc(u0); r]}6iF.
\+Qd=,!i(
[Nx, Ny] = size(1i,1j); gCYe^KJ
VxOWv8}|
f1 = zeros(Nx,Ny); ekfa"X_
hG`@#9|f
for ii = 1:Nx zGme}z;1@
for jj = 1:Ny AzzHpfv,
f1(ii,jj) = exp(1i*pi*(ii + jj)); DB|w&tygq
end LdOqV'&r
end G]xYQ]
(-1{W^(
FT = fft2(f1.*in); 'G[G;?F
nIlx?(=pu
out = f1.*FT; [ Ous|a[)o
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%