有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 ykl=KR
6!L*q
2d centered Fourier transform,居中的傅里叶变换 ^*~u4app
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @^jLYu|W
% Citation for this code and algorithm: -VT?/=Y
s
% Tatiana Latychevskaia and Hans-Werner Fink G Z[5m[
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", -bX.4+U
% Appl. Optics 54, 2424 - 2434 (2015) ;;J98G|1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ,rPyXS9Sa{
% The code is written by Tatiana Latychevskaia, 2002 YVV $g-D}
% The version of Matlab for this code is R2010b xB]v
:s985sEv
function [out] = FT2Dc(u0); ialk6i![
&WV 9%fI
[Nx, Ny] = size(1i,1j); i'LTKj
+}Wo=R}
f1 = zeros(Nx,Ny); FQ ^^6Rl
u5|e9(J
for ii = 1:Nx ?mUu(D:7D
for jj = 1:Ny 6_
0w>
f1(ii,jj) = exp(1i*pi*(ii + jj)); b4OR`dd*J
end C3h!?5
end q`K-T_<
VNot4 62L
FT = fft2(f1.*in); H%gD[!^
xR%ayT.
out = f1.*FT; `lOoT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%