有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 QmgO00{
niA>afo
2d centered Fourier transform,居中的傅里叶变换 e&@;hDmIX
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% h*
72 f/#
% Citation for this code and algorithm: =jEVHIYt
% Tatiana Latychevskaia and Hans-Werner Fink +D+v j|fn
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", }~NM\rm
% Appl. Optics 54, 2424 - 2434 (2015) gV}c4>v(
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ;!S i_b2
% The code is written by Tatiana Latychevskaia, 2002 z:^(#G{
% The version of Matlab for this code is R2010b t|urvoz
C/?x`2'
function [out] = FT2Dc(u0); E3LEeXcLS
2P/ Sq
[Nx, Ny] = size(1i,1j); &=*sN`
u>ZH-nw O
f1 = zeros(Nx,Ny); Qz4eQlWhp
' !2NSv
for ii = 1:Nx redMlHM
for jj = 1:Ny 4A`U [r_>D
f1(ii,jj) = exp(1i*pi*(ii + jj)); `h%K8];<6f
end dQn,0
end s6F0&L;N&
cYgd1
FT = fft2(f1.*in); kyi"U A82
>*MGF=.QG
out = f1.*FT; YEa<zhO8
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%