有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 Un]`Gd]:
RsIEY5Q
2d centered Fourier transform,居中的傅里叶变换 ?Mp~^sgp'
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ZFOYYht
% Citation for this code and algorithm: n]}+ :
% Tatiana Latychevskaia and Hans-Werner Fink b+'G^!JR
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", P|v ;'9
% Appl. Optics 54, 2424 - 2434 (2015) iH9g5G`O
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% U)zd~ug?m
% The code is written by Tatiana Latychevskaia, 2002 r6Lb0PzMf
% The version of Matlab for this code is R2010b q+x4Od3
P0Ds7xh]h
function [out] = FT2Dc(u0); A]Zp1XEG
/R''R:j
[Nx, Ny] = size(1i,1j);
@\i6m]\X
rnIv|q6@
f1 = zeros(Nx,Ny); _0)#-L>xKF
yH|ucN~k5S
for ii = 1:Nx Mw?nIIu(@
for jj = 1:Ny v>c[wg9P
f1(ii,jj) = exp(1i*pi*(ii + jj)); ?#qA>:2,
end @~ N:F~
end 0Q;T
<%U
>L$y|8O
FT = fft2(f1.*in); fg8V6FS
req=w;E:
out = f1.*FT; Eg3rbqM- 8
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%