有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 CSs6Vm!=
]QQ"7_+
2d centered Fourier transform,居中的傅里叶变换 P&VI2k
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %mJ)pMV
% Citation for this code and algorithm: %Z|*!A+wN5
% Tatiana Latychevskaia and Hans-Werner Fink H9?~#GPb
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", !{LwX Kf
% Appl. Optics 54, 2424 - 2434 (2015) dWSH\wm+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% X35hLp8 M
% The code is written by Tatiana Latychevskaia, 2002 j|9 2
g
% The version of Matlab for this code is R2010b $+j)
r+crE %-
function [out] = FT2Dc(u0); xcA`W|M
fQh!1 R
[Nx, Ny] = size(1i,1j); YVi]f2F%
,\b5M`<c
f1 = zeros(Nx,Ny); ljRR
4{=Em5`HbO
for ii = 1:Nx *np|PyLP:
for jj = 1:Ny ZhU2z*qN#
f1(ii,jj) = exp(1i*pi*(ii + jj)); i|e-N?l
end jw)t"S/E
end 1^mO"nX
2vLn#
FT = fft2(f1.*in); XR(kR{yo
R !HL+
out = f1.*FT; 2Qy&V/E ?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%