有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 l?[{?Luq
]k[Q]:q
2d centered Fourier transform,居中的傅里叶变换 k%EWkM)?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% :Az8K )
% Citation for this code and algorithm: yPf?"W
% Tatiana Latychevskaia and Hans-Werner Fink pchQ#GU
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", }G>v]bV0V
% Appl. Optics 54, 2424 - 2434 (2015) ;yk9(wea}"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% jgk{'_ j
% The code is written by Tatiana Latychevskaia, 2002 A5CdLwk
% The version of Matlab for this code is R2010b EzzTJ>
dIoF ~8V
function [out] = FT2Dc(u0); K(-G: |
%/{IssCR7
[Nx, Ny] = size(1i,1j); @Ufa-h5"(
VKq0<+M
f1 = zeros(Nx,Ny); 07.nq;/R
:wQC_;
for ii = 1:Nx . o-0aBG
for jj = 1:Ny @rPI$ia1~
f1(ii,jj) = exp(1i*pi*(ii + jj)); Ivz+Jjw
end GwgFi@itN
end _oQtk^fp
[Xxw]C6\>(
FT = fft2(f1.*in); #^5a\XJb
Cr'
!"F
out = f1.*FT; GLo\q:5A
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%