有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 ;3}EBcw)
>^f)|0dn)E
2d centered Fourier transform,居中的傅里叶变换 F2`htM@,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% {&EZ>r-
% Citation for this code and algorithm: s!/holu
% Tatiana Latychevskaia and Hans-Werner Fink JX/4=..
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", vZeYp
% Appl. Optics 54, 2424 - 2434 (2015) N3yB1_
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% tP
Efz+1N
% The code is written by Tatiana Latychevskaia, 2002 )cKtc
% The version of Matlab for this code is R2010b &<V_[Wh"
,Q=)$ `%
function [out] = FT2Dc(u0); JM-ce8U
bjPbl2K
[Nx, Ny] = size(1i,1j); Rs F3#H
b({Nf,(a2
f1 = zeros(Nx,Ny); ow+Dd[i
$#7J\=GZ+
for ii = 1:Nx }\ 939Y
for jj = 1:Ny Wbn[Q2h5
f1(ii,jj) = exp(1i*pi*(ii + jj)); 3']:1B
end &[ u6oAR
end n;kciTD%wK
W-!Bl&jF[
FT = fft2(f1.*in); ,M@m4bx
|pH*
CCA
out = f1.*FT; qbU1qF/
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%