有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 }e @-[RJ!
%05a>Rf&
2d centered Fourier transform,居中的傅里叶变换 ZJm^znpw6
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% !X_~|5.
% Citation for this code and algorithm: ~(S4/d5
% Tatiana Latychevskaia and Hans-Werner Fink V0(ABi:d
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", xUoY|$fI
% Appl. Optics 54, 2424 - 2434 (2015) jXR+>=_
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% A4x3TW?
% The code is written by Tatiana Latychevskaia, 2002 0&~u0B{
% The version of Matlab for this code is R2010b xnOlV
Z;s-t\C
function [out] = FT2Dc(u0); z w9r0bG
RMXj)~4.
[Nx, Ny] = size(1i,1j); >S]')O$c
aQFHB!
f1 = zeros(Nx,Ny); ]^<~[QK_C
>AJ|F)
for ii = 1:Nx //|Vj | =
for jj = 1:Ny RdHR[Usm
f1(ii,jj) = exp(1i*pi*(ii + jj)); :P~Owz
end z(qz(`eGC&
end E
.5xzY
8E{>czF"
FT = fft2(f1.*in); QeoDq
m6D4J=59
out = f1.*FT; *Y~64FM
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%