有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 Phu|
hx<
#1@~w}Dh
2d centered Fourier transform,居中的傅里叶变换 6^;!9$G|D*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+`-a*U94
% Citation for this code and algorithm: mNoqs&UB
% Tatiana Latychevskaia and Hans-Werner Fink "M^W:4_
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", AW5g (
% Appl. Optics 54, 2424 - 2434 (2015) b_yXM
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% i5Q<~;Z+
% The code is written by Tatiana Latychevskaia, 2002 E e>j7k.G.
% The version of Matlab for this code is R2010b Xf9%A2 iB
_#mqg]W '
function [out] = FT2Dc(u0); dRm'$
G9
3:lp"C51
[Nx, Ny] = size(1i,1j); x35s6
u^%')Ncp
f1 = zeros(Nx,Ny); ]bb}[#AY
3ohcHQ/a
for ii = 1:Nx A'iF'<%
for jj = 1:Ny TZNgtR{q
f1(ii,jj) = exp(1i*pi*(ii + jj)); n5*7~K"C
end -oBas4J
end +t4m\/y
QYXx7h r=$
FT = fft2(f1.*in); y4We}/-<
&> .1%x@R
out = f1.*FT; x=Jn&4q
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%