有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 $8o(_8Q)
*@=in7*c
2d centered Fourier transform,居中的傅里叶变换 mdvooJ
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% <jF]SN
% Citation for this code and algorithm: +9G
GC
% Tatiana Latychevskaia and Hans-Werner Fink j?%^N\9
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", <qN0Q7
% Appl. Optics 54, 2424 - 2434 (2015) V{;! vt~
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% zQ9"i
% The code is written by Tatiana Latychevskaia, 2002 IRNL(9H
% The version of Matlab for this code is R2010b wEENN_w
| 2BIAm]
function [out] = FT2Dc(u0); W-q2|NK
1C\OL!@L
[Nx, Ny] = size(1i,1j); OiX:h#
,~8:^*0s
f1 = zeros(Nx,Ny); ^]w!ow41
@#K19\dQ
for ii = 1:Nx 84^'^nd
for jj = 1:Ny 3TqC.S5+
f1(ii,jj) = exp(1i*pi*(ii + jj)); QU^*(HGip
end D].!u{##
end tGnBx)J|
$E3-</ f
FT = fft2(f1.*in); D-e0q)RSU
QQUeY2}
out = f1.*FT; HQ~`ha.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%