有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 5t-d+vB
q{Gh5zg5O
2d centered Fourier transform,居中的傅里叶变换 w_V A:]j4
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% .Tm.M7
% Citation for this code and algorithm: :IU<A G6
% Tatiana Latychevskaia and Hans-Werner Fink P*i'uN
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", w2!:>8o:
% Appl. Optics 54, 2424 - 2434 (2015) j\wZjc-j
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% G)^/#d#&
% The code is written by Tatiana Latychevskaia, 2002 -[J4nN &N
% The version of Matlab for this code is R2010b bHcBjk.\
auB
931|
function [out] = FT2Dc(u0); ur E7ZKdI
~%lA!tsek
[Nx, Ny] = size(1i,1j); N iu
|M@
:Tv>)N
f1 = zeros(Nx,Ny); qO38vY){
;
wxmSX9
for ii = 1:Nx r*8a!jm?
for jj = 1:Ny dl3;A_ 2
f1(ii,jj) = exp(1i*pi*(ii + jj)); -T;^T1
end 3.Yg3&"Z
end ZXL'R|?
{]U
\HE1w
FT = fft2(f1.*in); ~ES%=if~Y
%I9f_5BlT8
out = f1.*FT; vNs`UkA
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%