有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 5RT#H0/+
|j+JLB
2d centered Fourier transform,居中的傅里叶变换
K3zY-yIco
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% G? SPz
% Citation for this code and algorithm: )u(,.O[cw
% Tatiana Latychevskaia and Hans-Werner Fink b'O/u."O
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", JAxzXAsAR
% Appl. Optics 54, 2424 - 2434 (2015) c44s@E
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% _N5pxe`
% The code is written by Tatiana Latychevskaia, 2002 Ic3a\FTr\
% The version of Matlab for this code is R2010b y>C
!cYB
Yup#aeXY/
function [out] = FT2Dc(u0); OdNo2SO
?8753{wk
[Nx, Ny] = size(1i,1j); LuRCkKJ
"/R?XCBZsb
f1 = zeros(Nx,Ny); 6GuTd
5B~]%_gZr
for ii = 1:Nx nzbVI
for jj = 1:Ny Yv1yRoDv
f1(ii,jj) = exp(1i*pi*(ii + jj)); Q%6zr9
end _#~D{91
j:
end Da<`|
l
5B%KiE&p
FT = fft2(f1.*in); fhg'4FO
oyiG04H&
out = f1.*FT; 6EY\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%