有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 |LA@guN
GyQu?`
2d centered Fourier transform,居中的傅里叶变换 I:M]#aFD
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 'oSs5lW
% Citation for this code and algorithm: uLXMEx<^
% Tatiana Latychevskaia and Hans-Werner Fink AX3iB1):K
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", TY}9;QL:
% Appl. Optics 54, 2424 - 2434 (2015) gFlUMfKh
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% <yzgZXxIaS
% The code is written by Tatiana Latychevskaia, 2002 CUIT)mF:
% The version of Matlab for this code is R2010b <nDuN*|
N T+%u-
function [out] = FT2Dc(u0); {"hX_t
Q${0(#Nu
[Nx, Ny] = size(1i,1j); 1}nrVn[B9
-DD2
f1 = zeros(Nx,Ny); V ':?rEN|
'|
(#^jAj
for ii = 1:Nx Xm,w.|dx
for jj = 1:Ny @vzv9c[
f1(ii,jj) = exp(1i*pi*(ii + jj)); ajB4Lj,:r
end S%J $.ge
end CqHCJ '
trD-qi
FT = fft2(f1.*in); S9BwCKH
AmYqrmJ
out = f1.*FT; TY,5]*86I&
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%