有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 iMt3h8
H<[~V0=
2d centered Fourier transform,居中的傅里叶变换 [al$sCD]+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% {aN pk,n
% Citation for this code and algorithm: S
:8
% Tatiana Latychevskaia and Hans-Werner Fink I ^m
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", 0Dna+V/jI
% Appl. Optics 54, 2424 - 2434 (2015) $,2T~1tE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 5?F5xiW
% The code is written by Tatiana Latychevskaia, 2002 &oMWs]0
% The version of Matlab for this code is R2010b SOq:!Qt
t))MZw&@
function [out] = FT2Dc(u0); m0As t<u
EwX&Cj".
[Nx, Ny] = size(1i,1j); !ig&8:
n8F~!|lQ0
f1 = zeros(Nx,Ny); );':aXj
tH)jEY9
for ii = 1:Nx h Fik>B#!
for jj = 1:Ny QOo'Iv+EL
f1(ii,jj) = exp(1i*pi*(ii + jj)); Vn4wk>b}$2
end Bp_R"DS7A
end k`Ifl)
\?>M?6D
FT = fft2(f1.*in); 7jIBE
^L5-2;s<U'
out = f1.*FT; n'v\2(&uYN
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%