有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 Y6ORI
L.$+W}
2d centered Fourier transform,居中的傅里叶变换 _Z3_I_lW
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Mb\[` 4z
% Citation for this code and algorithm: q,fk@GI'2
% Tatiana Latychevskaia and Hans-Werner Fink InfUH8./t
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", 5imqZw
% Appl. Optics 54, 2424 - 2434 (2015) fud Lm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% V1>>]]PS
% The code is written by Tatiana Latychevskaia, 2002
j.vBld
% The version of Matlab for this code is R2010b G{{Or
5%%A2FrB.S
function [out] = FT2Dc(u0); ]zR,Y=
#
#7dM %
[Nx, Ny] = size(1i,1j); !Z`xwk"!
Nk/Ms:57y
f1 = zeros(Nx,Ny); M$AQZ')9
d+Bz
pS@p
for ii = 1:Nx *EzAo
for jj = 1:Ny GcA!I!j/
f1(ii,jj) = exp(1i*pi*(ii + jj)); !e(ZEV g
end & wG3RR|
end 8-
]7>2?_
MESPfS+
FT = fft2(f1.*in); %Q[+bN[/
\`: LPe
out = f1.*FT; YcJ2Arml
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%