有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 >ocDh~@aP
-za+Wa`vH
2d centered Fourier transform,居中的傅里叶变换 )\`.Ru~,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 4~s{zob
% Citation for this code and algorithm: .=kXO{>
% Tatiana Latychevskaia and Hans-Werner Fink M/d6I$~7z
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", Ro2Ab^rQ|
% Appl. Optics 54, 2424 - 2434 (2015) .!oYIF*0zC
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SV?^i `
% The code is written by Tatiana Latychevskaia, 2002 8LPvb#9=
% The version of Matlab for this code is R2010b ep ,"@,,
_l ,_NV&T
function [out] = FT2Dc(u0); y
E;n.L
'5f6
M^}|2
[Nx, Ny] = size(1i,1j); ]"wl*$N
VfV|fuW
f1 = zeros(Nx,Ny); U8>M`e"D
1ZrJ7a7=
for ii = 1:Nx ><HHO
(74X
for jj = 1:Ny WDF;`o*3
f1(ii,jj) = exp(1i*pi*(ii + jj)); ?D\6@G:,#@
end \>G :mMk/
end mw!EDJ;'
(O(X k+L
FT = fft2(f1.*in); :TZ</3Sw
m4m,-}KNi
out = f1.*FT; o8ERU($/
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%