有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 QUp()B1
'~ 3a(1@8
2d centered Fourier transform,居中的傅里叶变换 Kv[,!P"Y
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% `7P4O
% Citation for this code and algorithm: -bK# &o,
% Tatiana Latychevskaia and Hans-Werner Fink sY=fS2b#)
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", X 5LI
% Appl. Optics 54, 2424 - 2434 (2015) 2yhtJ9/
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Uc6BI$Fmz
% The code is written by Tatiana Latychevskaia, 2002 0sq1SHI{
% The version of Matlab for this code is R2010b `RUr/|S
W
:PGj0?
function [out] = FT2Dc(u0); #_}lF<k
SnRTC<DDh
[Nx, Ny] = size(1i,1j); q79)nhC F
&_
Ewu@4
f1 = zeros(Nx,Ny); $Xw .iN]g
W
xyQA:3s
for ii = 1:Nx 7'_zJI^
for jj = 1:Ny O^I~d{M 5I
f1(ii,jj) = exp(1i*pi*(ii + jj)); <L@0w8i`
end >A|6kzC
end DNdwMSwp
. \*Z:
FT = fft2(f1.*in); .!Kdi| a)
KL!k'4JNY
out = f1.*FT; '+NmHu:q
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%