有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 v'$ykZ!Z
ZgK@Fl*k
2d centered Fourier transform,居中的傅里叶变换 R1~7F{FW
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% vS2(Q0+TZi
% Citation for this code and algorithm: g.=!3e&z%
% Tatiana Latychevskaia and Hans-Werner Fink eoJFh
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", fW[_+r]
% Appl. Optics 54, 2424 - 2434 (2015) >LCjtm\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 8W{ g
% The code is written by Tatiana Latychevskaia, 2002 h4h d<,
% The version of Matlab for this code is R2010b .$OjUlzr-H
" _mmR
M
function [out] = FT2Dc(u0); 8db6(Q~P
i'9eKO
[Nx, Ny] = size(1i,1j); o`25
R,XD6' Q
f1 = zeros(Nx,Ny); oX2r?.j#M
4bWfx_0W
for ii = 1:Nx [!5l0{0
for jj = 1:Ny i /C'0
f1(ii,jj) = exp(1i*pi*(ii + jj)); Mru~<:9
end J511AoQ{R
end 3!1&DII4
cFe V?a
FT = fft2(f1.*in); f)qPFM]%z
-\5[Nq{N
out = f1.*FT; i^~sn `o
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%