有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 0X;Dr-3<
IlY,V
2d centered Fourier transform,居中的傅里叶变换 :gmVX}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pLRHwL.
% Citation for this code and algorithm: Y) Z>Bi
% Tatiana Latychevskaia and Hans-Werner Fink |dvcDx0|K
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", ^(%>U!<<%,
% Appl. Optics 54, 2424 - 2434 (2015) 7ORwDR,`5
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ),86Y:^4
% The code is written by Tatiana Latychevskaia, 2002 -7CkOZT
% The version of Matlab for this code is R2010b D .E>Y
HRk+2'wjAz
function [out] = FT2Dc(u0); 1'h?qv^(
]0o78(/w2
[Nx, Ny] = size(1i,1j); [e (-
*ood3M[M^
f1 = zeros(Nx,Ny); 9,4a?.*4~
x\lua
for ii = 1:Nx H4UnF5G
for jj = 1:Ny Q-AN~k8+)[
f1(ii,jj) = exp(1i*pi*(ii + jj)); U`D"L4},.
end w1.~N`g$
end QJxcH$
o9JJ_-O"
FT = fft2(f1.*in); "p<f#s}
{oO!v}]
out = f1.*FT; C0e<
_6p=
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%