有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 sXTt)J
mU_?}}aK,
2d centered Fourier transform,居中的傅里叶变换 ;-=y}DK
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #s1M>M)
% Citation for this code and algorithm: @Risabn
% Tatiana Latychevskaia and Hans-Werner Fink ^g[\.Q
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", >4\V/
I
% Appl. Optics 54, 2424 - 2434 (2015) uYL6g:]+ZC
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% d^
!3bv*h
% The code is written by Tatiana Latychevskaia, 2002 h.
i&[RnX
% The version of Matlab for this code is R2010b *wp'`3y}
zx(j6
function [out] = FT2Dc(u0); [
H>MeeR
vFb{(gIJ
[Nx, Ny] = size(1i,1j); YH<F~F _
r _xo>y~S
f1 = zeros(Nx,Ny); kVU|k-?2
/_,~dt
for ii = 1:Nx `P/* x[?
for jj = 1:Ny QY+#Vp<`
f1(ii,jj) = exp(1i*pi*(ii + jj)); g8XGZW!
end +nuv?QB/
end {r&M
g) v"nNS
FT = fft2(f1.*in); zwU8i VDe
+ y.IDn^
out = f1.*FT; PR|Trnd&D
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%