有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 Z!*Wn`d-k
OrzDr
2d centered Fourier transform,居中的傅里叶变换 ](%-5G1<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% &ed.%:
% Citation for this code and algorithm: {~Phc 2z
% Tatiana Latychevskaia and Hans-Werner Fink J H6\;G6
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", $[IuEdc/
% Appl. Optics 54, 2424 - 2434 (2015) IuRKj8J)o
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% e\\ I,
% The code is written by Tatiana Latychevskaia, 2002 ^G5_d"Gr
% The version of Matlab for this code is R2010b yXlzImPn
."9v1kW
function [out] = FT2Dc(u0); htIV`_<Ro
0'a.Ypf
[Nx, Ny] = size(1i,1j); b8>rUGA{
s$mcIMqs
f1 = zeros(Nx,Ny); '#^ONn STn
"MlY G6
for ii = 1:Nx K4y4!zz
for jj = 1:Ny uZi]$/ic
f1(ii,jj) = exp(1i*pi*(ii + jj)); /I="+
end B1 'Ds
end BsRxD9r
i:@00)V{,
FT = fft2(f1.*in); O"^KX5
|[C3_'X
out = f1.*FT; {5:y,=Y
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%