有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 SfI*bJo>V
~"mj;5Id
2d centered Fourier transform,居中的傅里叶变换 vnsSy 33K
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% <%!J?
% Citation for this code and algorithm: 4: sl(r
% Tatiana Latychevskaia and Hans-Werner Fink eOrYa3hQ
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", HCc`
% Appl. Optics 54, 2424 - 2434 (2015) L~MpY{!3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ;/Q6i
% The code is written by Tatiana Latychevskaia, 2002 5-p.MGso
% The version of Matlab for this code is R2010b _@prmSc
_om[VKJd
function [out] = FT2Dc(u0); QFzFL-H~N
u( 9X
[Nx, Ny] = size(1i,1j); Z\!rH"8
q:yO92Ow
f1 = zeros(Nx,Ny); EhXiv#CZ
"|4jPza
for ii = 1:Nx {,f[r*{Y
for jj = 1:Ny rbh[j@s@
f1(ii,jj) = exp(1i*pi*(ii + jj)); IxP^i{/1?
end b7'F|h^
end 5^F]tRz-
~PYFYjHC
FT = fft2(f1.*in); F50JJZ
Yq0# #__
out = f1.*FT; 4$i} Xk#3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%