有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 @sKAsn
=zA=D.D2
2d centered Fourier transform,居中的傅里叶变换 }WGi9\9T&
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Q]xW}5
/
% Citation for this code and algorithm: dr6 dK
% Tatiana Latychevskaia and Hans-Werner Fink _ga!TQ:
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", qd|*vE
% Appl. Optics 54, 2424 - 2434 (2015) <(p1
j0_Q
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \Di~DN1
% The code is written by Tatiana Latychevskaia, 2002 _R(5?rG,
% The version of Matlab for this code is R2010b 0K3FH&.%
!CBx$1z
function [out] = FT2Dc(u0); _z4rx
|>3a9]
[Nx, Ny] = size(1i,1j); G0s:Dum
/#G"'U/
f1 = zeros(Nx,Ny); l!AZ$IV
KR^peWR
for ii = 1:Nx vWkKNB
for jj = 1:Ny T4!]^_t^
f1(ii,jj) = exp(1i*pi*(ii + jj)); x>8f#B\Mr
end Ok`U*j
end hTG
d Uw]
j[U0,]
FT = fft2(f1.*in); d7^XP
f,L
out = f1.*FT; Y|VzeJC
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%