有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 FBXktSg
AkQ(V
2d centered Fourier transform,居中的傅里叶变换 8g0 #WV
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 3gUY13C}:p
% Citation for this code and algorithm: z\m$>C|
% Tatiana Latychevskaia and Hans-Werner Fink cb^IJA9}
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", kH eD(Ea
% Appl. Optics 54, 2424 - 2434 (2015) ?{ )'O+s
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 3N_KNW
% The code is written by Tatiana Latychevskaia, 2002 #&'S-XE+
% The version of Matlab for this code is R2010b N|yA]dg[
h"1}j'2>@
function [out] = FT2Dc(u0); zDdo RK@
H1k)ya x4_
[Nx, Ny] = size(1i,1j); ww{k_'RRJ
LA6XTgcu
f1 = zeros(Nx,Ny); 4mDHAR%D
CH4Nz'X2
for ii = 1:Nx -dM~3'
for jj = 1:Ny (2;Aqx5i
f1(ii,jj) = exp(1i*pi*(ii + jj)); ]Ozz"4Z
end %$&eC
end K6->{!8]k
C1;uAw?\
FT = fft2(f1.*in); >Lcu
DghyE`
out = f1.*FT; 1'hpg>U
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%