有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 Ul%D}(,
e]@R'oM?#`
2d centered Fourier transform,居中的傅里叶变换 ]d -U
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% eL{6;.C
% Citation for this code and algorithm: N/i {j.=
% Tatiana Latychevskaia and Hans-Werner Fink 4]mAV\1
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", NG?- dkD
% Appl. Optics 54, 2424 - 2434 (2015) r0/o{Y|l6
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
j_
% The code is written by Tatiana Latychevskaia, 2002 $3je+=ER
% The version of Matlab for this code is R2010b
uhO-0H
RI#o9d"x}
function [out] = FT2Dc(u0); ISALR{Aq
l~c# X3E
[Nx, Ny] = size(1i,1j); ZAa:f:[#f
&NB"[Mm:@
f1 = zeros(Nx,Ny); ypV>*
!R@s+5P)U
for ii = 1:Nx v JPX`T|
for jj = 1:Ny #xBh62yIuP
f1(ii,jj) = exp(1i*pi*(ii + jj)); b?deZ2"L#
end r"\g6<RP
end p{S#>JTr
P2>Y0"bY
FT = fft2(f1.*in); atmTI`i
h&j9'
out = f1.*FT; o=ULo &9
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%