有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 Qwve-[
:Nwv&+
2d centered Fourier transform,居中的傅里叶变换 `Q#)N0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Y3s8@0b3
% Citation for this code and algorithm: atw*t1)g
% Tatiana Latychevskaia and Hans-Werner Fink Gm \)1b
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", xg 8R>j
% Appl. Optics 54, 2424 - 2434 (2015) [9j,5d&m
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% =sefT@<
% The code is written by Tatiana Latychevskaia, 2002 :SWrx MT
% The version of Matlab for this code is R2010b ~b0l?P*Ff
vK+!m~kDu
function [out] = FT2Dc(u0); IXlk1tHN4I
Bj9FSKiH
[Nx, Ny] = size(1i,1j); 5rc3jIXc{|
(I(U23A~
f1 = zeros(Nx,Ny); uXvE>VpJG
EyA(W;r.
for ii = 1:Nx ;' |CSjco
for jj = 1:Ny MgN;[4|[h
f1(ii,jj) = exp(1i*pi*(ii + jj)); _[i.)8$7
end 5|>ms)[RQ
end {'B(S/Z7
~D`R"vzw=
FT = fft2(f1.*in); PRx- 0S
%s9*?6
out = f1.*FT; %_CL/H
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%