有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 eo~>|0A*V
|4tnG&=
2d centered Fourier transform,居中的傅里叶变换
;p U=>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 3Q-[)Z )
% Citation for this code and algorithm: &GetRDr
% Tatiana Latychevskaia and Hans-Werner Fink A0hfy|1#L
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", FA#?+kd
% Appl. Optics 54, 2424 - 2434 (2015) jh|4Y(
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% nL[zXl
% The code is written by Tatiana Latychevskaia, 2002 ?*ni5\y5o
% The version of Matlab for this code is R2010b -jJw wOm
7vf?#^RlV
function [out] = FT2Dc(u0); 5/{";k)L+
#Lq{_Y
[Nx, Ny] = size(1i,1j); x22:@Ot6
@T6Z3Zj}
f1 = zeros(Nx,Ny); Gd08RW
FID4@--
for ii = 1:Nx >tFv&1iR
for jj = 1:Ny ^& R
H]q
f1(ii,jj) = exp(1i*pi*(ii + jj)); ^twJNm{99
end 5W29oz}-S
end `AO<r
/V%]lmxQ
FT = fft2(f1.*in); djxM/"xo
tgX},OU^
out = f1.*FT; D" 4*&
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%