有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 A ws#>l<
|B` -chK
2d centered Fourier transform,居中的傅里叶变换 pDkT_6Q
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ,;+\!'lS
% Citation for this code and algorithm: o95O!5 hl
% Tatiana Latychevskaia and Hans-Werner Fink #0`"gR#+
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", 1.,mNY^UN
% Appl. Optics 54, 2424 - 2434 (2015) Ysr{1! K
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% e_1mO 5z
% The code is written by Tatiana Latychevskaia, 2002 ]3={o3[:
% The version of Matlab for this code is R2010b @1]<LQ\\
c6c^9*,V
function [out] = FT2Dc(u0); +=k?Dp[
C9=f=sGL
[Nx, Ny] = size(1i,1j); e<9nt [
m/eGnv;!
f1 = zeros(Nx,Ny); #eUfwd6.Y
yQi|^X~?$
for ii = 1:Nx 3~cOQ%#]4
for jj = 1:Ny %+I(S`}
f1(ii,jj) = exp(1i*pi*(ii + jj)); raqLXO!j
end d:pp,N~2o
end ]#BXaBVMY
MxdfuFss
FT = fft2(f1.*in); \B}W(^\wg;
(Wx)YI
out = f1.*FT; h5f>'lz
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%