有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 TEz;:* ,CG
E(~7NRRm
2d centered Fourier transform,居中的傅里叶变换 NnLK!Q
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% M\R+:O&
% Citation for this code and algorithm: r1L@p[>
% Tatiana Latychevskaia and Hans-Werner Fink sgfqIe1
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", J4T"O<i$58
% Appl. Optics 54, 2424 - 2434 (2015) 5Z>a}s_i
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% {rc3`<%
% The code is written by Tatiana Latychevskaia, 2002 |?T=4~b
% The version of Matlab for this code is R2010b ,1sbY!&ekL
g0B] ;Y>(
function [out] = FT2Dc(u0); Hr?lRaV
QLY;@-jF$
[Nx, Ny] = size(1i,1j); ^Ps!
;ElCWs->\
f1 = zeros(Nx,Ny); Cn~VJ,l
g
LCorT-
for ii = 1:Nx Ib..X&N2
for jj = 1:Ny \3JCFor/
f1(ii,jj) = exp(1i*pi*(ii + jj)); b Hr^_ogN
end duG!QS:
end (47?lw
&
Z@zo~*o
FT = fft2(f1.*in); hxoajexU
5?0<.f,
out = f1.*FT; 5P!ZGbG
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%