有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 q:g2Zc'Y~W
D+>1]ij
2d centered Fourier transform,居中的傅里叶变换 mx=BD'
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% jVq(?Gc
% Citation for this code and algorithm: ,~._}E&9I
% Tatiana Latychevskaia and Hans-Werner Fink "Iix
)Ue
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", Q%f|~Kl-hd
% Appl. Optics 54, 2424 - 2434 (2015) LW(6$hpPp
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% [<KM?\"1<
% The code is written by Tatiana Latychevskaia, 2002 V dn&c
% The version of Matlab for this code is R2010b eY e, r
edPUG
N
function [out] = FT2Dc(u0); yxc=Z0~1
3)RsLI9
[Nx, Ny] = size(1i,1j); '}9JCJ
&y#r;L<9
f1 = zeros(Nx,Ny); KI+VXH}Y5{
F;>!&[h}G
for ii = 1:Nx 9VbOQ {8
for jj = 1:Ny Sfr&p>{,
f1(ii,jj) = exp(1i*pi*(ii + jj)); Pfs;0}h5
end FJd]D[h
end =lpQnj"
,`aq+K
FT = fft2(f1.*in); ^urDoB:
CoA6
out = f1.*FT; iya"ky~H
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%