有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 ?[a7l:3-[
)Gu0i7iN
2d centered Fourier transform,居中的傅里叶变换 .x\/XlM
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Q>~7P
% Citation for this code and algorithm: "^e}C@
% Tatiana Latychevskaia and Hans-Werner Fink {7j6$.7J$&
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", gdkLPZ<<
% Appl. Optics 54, 2424 - 2434 (2015) ]x5(bnWx
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \Nh^Ig
% The code is written by Tatiana Latychevskaia, 2002 lN*1zM<6;
% The version of Matlab for this code is R2010b $;KQY7
?[NTw./'7A
function [out] = FT2Dc(u0); )U"D4j*p
!=k*hl0h
[Nx, Ny] = size(1i,1j); &+|jJ{93z
ImT+8pa
f1 = zeros(Nx,Ny); \]~kyy
3.GdKP.%
for ii = 1:Nx tDuUAI54
for jj = 1:Ny w<8O=
f1(ii,jj) = exp(1i*pi*(ii + jj)); p:
Q%Lg_I
end 8as$h*Wh
end 5KA
FUR0
P_^|KEz
FT = fft2(f1.*in); wj";h Aw
h!X'SGK
out = f1.*FT; 6@ (k8<3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%