有會(huì)相位恢復(fù)算法的嗎?能幫我看看下面的代碼錯(cuò)哪兒了嗎?不勝感激 V
@rI`~$
32l3vv.j
2d centered Fourier transform,居中的傅里葉變換 |D'4uN8\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ~aw.(A?MI
% Citation for this code and algorithm:
7;u
e
% Tatiana Latychevskaia and Hans-Werner Fink `+`Z7
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", BK*x] zG$
% Appl. Optics 54, 2424 - 2434 (2015) .\K_@M
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Twh!X*uQ
% The code is written by Tatiana Latychevskaia, 2002 909?_v
% The version of Matlab for this code is R2010b *RT>`,t/
gep;{G}
function [out] = FT2Dc(u0); <
|e,05aM
}L
&^xe
[Nx, Ny] = size(1i,1j); W"724fwu&
.R`5Qds*l
f1 = zeros(Nx,Ny); ai}mOyJs
(VS5V31"
for ii = 1:Nx L%">iQOG#
for jj = 1:Ny b>_o xK
f1(ii,jj) = exp(1i*pi*(ii + jj)); PxF<\pu&
end 2Fy>.*,?
end eeIhed9
VzBqjE_
FT = fft2(f1.*in); A+HF@Uw}^
^*S ,xP
out = f1.*FT; 7}1~%:6
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%