有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 /%rbXrR4w
+:~&"U^z&
2d centered Fourier transform,居中的傅里叶变换 {`KgyCW:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% y^hpmTB3"
% Citation for this code and algorithm: hX 9.%-@sR
% Tatiana Latychevskaia and Hans-Werner Fink s+tS4E?
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", -^$CGRE6A
% Appl. Optics 54, 2424 - 2434 (2015) }!& w<wR
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% _W]2~9
% The code is written by Tatiana Latychevskaia, 2002 usR19 _E-
% The version of Matlab for this code is R2010b |VlAt#E
pt(GpbtWK
function [out] = FT2Dc(u0); YurK@Tq7
%7O`]ik:
[Nx, Ny] = size(1i,1j); fmA&1u/xMs
H[<"DP
f1 = zeros(Nx,Ny); {j,bV6X
nPfVZGt
for ii = 1:Nx -deY,%
for jj = 1:Ny PFG):i-?
f1(ii,jj) = exp(1i*pi*(ii + jj)); 5cxA,T
end NV*aHci
end xh@H@Q\
>('L2]4\v
FT = fft2(f1.*in); t\{q,4
EFf<|v
out = f1.*FT; eOD;@4lR
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%