有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 b-ss^UL
4aArxJ
2d centered Fourier transform,居中的傅里叶变换 ao)';[%9s
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %SC Jmn2
% Citation for this code and algorithm: }U8v
~wcd
% Tatiana Latychevskaia and Hans-Werner Fink DQGrXMpV0
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", GL?b!4xx
% Appl. Optics 54, 2424 - 2434 (2015) J8)l ,J"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% X):7#x@uy
% The code is written by Tatiana Latychevskaia, 2002 t`B@01;8A
% The version of Matlab for this code is R2010b #1-WiweO
~61b^L}$
function [out] = FT2Dc(u0); (RFH.iX
$
64up!
[Nx, Ny] = size(1i,1j); y'm!h?8
,ayEZ#4.m
f1 = zeros(Nx,Ny); 6 J>A U
Z[Tou
for ii = 1:Nx 0B(s+#s
for jj = 1:Ny Rq|6d
M6H
f1(ii,jj) = exp(1i*pi*(ii + jj)); y"yo\IDW
end wp@_4Iq1$
end opH!sa@U
@eJ8wf]
FT = fft2(f1.*in); {dZ]+2Z~+
U;W9`JT<.f
out = f1.*FT; @<P2di
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%