有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 ;7U"wI_~c
%TYe]^/'y
2d centered Fourier transform,居中的傅里叶变换 yC\!6pg
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2Q)pT$
% Citation for this code and algorithm: UL0n>Wa5
% Tatiana Latychevskaia and Hans-Werner Fink 1xj w=
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", f{+X0Oj
% Appl. Optics 54, 2424 - 2434 (2015) {)wl`mw3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% mk[<=k~
% The code is written by Tatiana Latychevskaia, 2002 sNs Hl
% The version of Matlab for this code is R2010b Sh(XFUJ
91|~KR)
function [out] = FT2Dc(u0); %ZTI ?a
n0b{Jg *
[Nx, Ny] = size(1i,1j); kb[+II
e$N1m:1*
f1 = zeros(Nx,Ny); l
9bg
>K*TgG6!X
for ii = 1:Nx Rf TG
5E)
for jj = 1:Ny ;Swj`'7
f1(ii,jj) = exp(1i*pi*(ii + jj)); } QpyU%
end 7-MyiCt
end VWW(=j
V PI_pK
FT = fft2(f1.*in); "#]V^Rzxh
(|sqN8SbA
out = f1.*FT; MrhJk
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%