有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 ,DKW_F|
fNr*\=$
2d centered Fourier transform,居中的傅里叶变换 a"O9;&};&
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0NsPo
% Citation for this code and algorithm: bN*zx)f
% Tatiana Latychevskaia and Hans-Werner Fink W*c^(W
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", Rv*x'w
==
% Appl. Optics 54, 2424 - 2434 (2015) R{4[.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% qzD
% The code is written by Tatiana Latychevskaia, 2002 PClwGO8'&
% The version of Matlab for this code is R2010b 7<Ut/1$MI
O6-"q+H)
function [out] = FT2Dc(u0); AxJf\B8
~}YgZ/U7T
[Nx, Ny] = size(1i,1j); .R+n}>+K
bxz6
>>
f1 = zeros(Nx,Ny); uN9.U _
az:lG(ZGw
for ii = 1:Nx A|L-;P NP
for jj = 1:Ny 1eqFMf
f1(ii,jj) = exp(1i*pi*(ii + jj)); e]jzFm~
end 1p>&j%dk
end (j}Wt8
K0^+2lx
FT = fft2(f1.*in); %gEfG#S
?IG+U TI
out = f1.*FT; wd:SBU~f5*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%