有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 I 0/enL
c]qq *k#
2d centered Fourier transform,居中的傅里叶变换 RV*7?y%3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% q.
%[!O
% Citation for this code and algorithm: SBj9sFZ
% Tatiana Latychevskaia and Hans-Werner Fink 4h|48</
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", r306`)kX
% Appl. Optics 54, 2424 - 2434 (2015) c<'Pt4LY
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -Qt>yzD3
% The code is written by Tatiana Latychevskaia, 2002 q~3dbj
% The version of Matlab for this code is R2010b **zh>Y}6
8veYs`
function [out] = FT2Dc(u0); Jgf73IX[
~AD%aHR
[Nx, Ny] = size(1i,1j); |{KZ<
kJ;fA|(I
f1 = zeros(Nx,Ny); Nb))_+/
sj)$o94=
for ii = 1:Nx $;9zD11
for jj = 1:Ny /Dn,;@ZwAi
f1(ii,jj) = exp(1i*pi*(ii + jj)); M]S&vE{D
end lP4A?J+Q
end r A/jNX@S
:r<uH6x|
FT = fft2(f1.*in); \2F$FRWo
5`$.GV
out = f1.*FT; qRD]Q
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%