有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 qW[p .jN
=A&x
d"
2d centered Fourier transform,居中的傅里叶变换 B4 5B`Ay
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% WV_y@H_
% Citation for this code and algorithm: d)`XG cx{=
% Tatiana Latychevskaia and Hans-Werner Fink mcAg,~"HB
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", :L<$O7
% Appl. Optics 54, 2424 - 2434 (2015) sL|lfc'bB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2P`QS@v0a=
% The code is written by Tatiana Latychevskaia, 2002 c'?4*O
% The version of Matlab for this code is R2010b eSf
e
s
[b-27\b
function [out] = FT2Dc(u0); -]"=b\Q
50%
|9D0?Y
[Nx, Ny] = size(1i,1j); TtEc~m
Z#YkAQHv5
f1 = zeros(Nx,Ny); `"QUA G
8$a4[s
for ii = 1:Nx QxCZ<|
for jj = 1:Ny D ODo
!
f1(ii,jj) = exp(1i*pi*(ii + jj)); Gs%IZo_
end :UMg5eZ
end Q>[*Y/`I
B$qmXA)ze
FT = fft2(f1.*in); Q#P=t83
%\PnsnJ9Q
out = f1.*FT; rhY>aj
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%