有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 Q]@c&* _|
8".2)W4*
2d centered Fourier transform,居中的傅里叶变换 -."kq.m*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% zDD4m`2
% Citation for this code and algorithm: $B\ H
% Tatiana Latychevskaia and Hans-Werner Fink cFK @3a
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", F/>*Ifs
% Appl. Optics 54, 2424 - 2434 (2015) GF8 -_X
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% mzX;s&N#
% The code is written by Tatiana Latychevskaia, 2002 ]jyM@
% The version of Matlab for this code is R2010b > !L&>OOx
g+xw$A ou
function [out] = FT2Dc(u0); .wmnnvtl,
K/txD20
O|
[Nx, Ny] = size(1i,1j); \q "N/$5{f
RT^v:paNT2
f1 = zeros(Nx,Ny); `5q
;ssu
{T=52h=e
for ii = 1:Nx OR:[J5M)
for jj = 1:Ny v?%LQKO
f1(ii,jj) = exp(1i*pi*(ii + jj)); 3GF2eS$$P
end /`[!_4i
end _%~$'Hy
!nd*W"_gQ/
FT = fft2(f1.*in); >O#grDXb
Tkw;pb
out = f1.*FT; MPIlSMe
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%