有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 ^<!R%"o-
Pp }Z"
2d centered Fourier transform,居中的傅里叶变换 ^mq(j_E.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% fJr
EDj4(
% Citation for this code and algorithm: B/l^=u+-
% Tatiana Latychevskaia and Hans-Werner Fink ~qqxHymc
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", \=WPJm`p
% Appl. Optics 54, 2424 - 2434 (2015) `R2Iw
I&
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 8p 4[:M@
% The code is written by Tatiana Latychevskaia, 2002 xF{%@t
% The version of Matlab for this code is R2010b }ex4dhx2M
$\ZWQct
function [out] = FT2Dc(u0); N*36rR$^
`n>|rd
[Nx, Ny] = size(1i,1j); ^>an4UJt
`F/R:!v
f1 = zeros(Nx,Ny); ;-`NT`
#2
x(HHy,
for ii = 1:Nx 68P'<|u?
for jj = 1:Ny
7V5c`:"
f1(ii,jj) = exp(1i*pi*(ii + jj)); nnn\
end hk=[v7
end R|*0_!O:[
A4,%l\di<
FT = fft2(f1.*in); [lML^CYQ
*KNfPh#wi}
out = f1.*FT; 5[)5K?%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%