有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 cb9-~*1
F<I*?${[
2d centered Fourier transform,居中的傅里叶变换 M(I%y0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% l)[|wPf
% Citation for this code and algorithm: ]#]Z]9w
% Tatiana Latychevskaia and Hans-Werner Fink !Ap5Uwd
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", ^y/Es2A#t
% Appl. Optics 54, 2424 - 2434 (2015) %1Q:{m
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% h~ k<"
% The code is written by Tatiana Latychevskaia, 2002 src9EeiV
% The version of Matlab for this code is R2010b ^Lgvey%
$yASWz
function [out] = FT2Dc(u0); YbP
@
c#N4XsG,
[Nx, Ny] = size(1i,1j); ZW [&7[4
=-si|
1Z
f1 = zeros(Nx,Ny); ynIC (t
^L2d%d\5
for ii = 1:Nx S1|u@d'
for jj = 1:Ny K<J,n!zc
f1(ii,jj) = exp(1i*pi*(ii + jj)); ~b~Tq
end ^+P.f[
end '8;bc@cE
;W?#l$R
FT = fft2(f1.*in); I8gNg
Z
U4!KO;Jc
out = f1.*FT; "bhK%N;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%