有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 #y*p7~|@
Q(/F7"m
2d centered Fourier transform,居中的傅里叶变换 iG+=whvL
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% `P?!2\/
% Citation for this code and algorithm: Hk@LHC
% Tatiana Latychevskaia and Hans-Werner Fink ?$~5ti#\
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", oL
-udH
% Appl. Optics 54, 2424 - 2434 (2015) * \%b1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% w 3$9
% The code is written by Tatiana Latychevskaia, 2002
A}G>JL
% The version of Matlab for this code is R2010b *_/n$&
I%&
a3C\?5
function [out] = FT2Dc(u0); nJcY>Rp?
yt#~n_
[Nx, Ny] = size(1i,1j); "HtaJVp//
{C5-M! D{<
f1 = zeros(Nx,Ny); "Zu>cbE
tb;u%{S
for ii = 1:Nx A?"/ >LM
for jj = 1:Ny 1)J'
pDa
f1(ii,jj) = exp(1i*pi*(ii + jj)); lX/:e=
end ,"?xy-6
end Esdw^MGL2
O:jaA3
FT = fft2(f1.*in); C^7M>i
495A\8#
out = f1.*FT; ky I~
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%