有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 /r7xA}se^
Qz@_"wm[
2d centered Fourier transform,居中的傅里叶变换 zmhc\M?z
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +?)7l
% Citation for this code and algorithm: ZxtO.U2
% Tatiana Latychevskaia and Hans-Werner Fink F(VVb(\jd
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", e|k]te
% Appl. Optics 54, 2424 - 2434 (2015) 9dNB_
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% _<AkM"
% The code is written by Tatiana Latychevskaia, 2002 ?s2-iuMPd
% The version of Matlab for this code is R2010b &PJ;B)b
sK#)k\w>
function [out] = FT2Dc(u0); #Vum
UNDl&C2vz
[Nx, Ny] = size(1i,1j); WOn53|GQK
{~9z uNi
f1 = zeros(Nx,Ny); i|{psA
1hw.gn*JK>
for ii = 1:Nx =2$(
tXL
for jj = 1:Ny HGYTh"R
f1(ii,jj) = exp(1i*pi*(ii + jj)); s~OcL 5
end uGZGI;9f4
end j
sPavY
6Amt75RY
FT = fft2(f1.*in); CR$wzjP j
(xo`*Q,+
out = f1.*FT; >5t!
Xt
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%