有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 '5+, lRu
-B++V
2d centered Fourier transform,居中的傅里叶变换 F@*r%[S/
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% cqU/Y_%l'
% Citation for this code and algorithm: UVuuIW0k
% Tatiana Latychevskaia and Hans-Werner Fink YUE1 '}
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", ]8j5Ou6#y
% Appl. Optics 54, 2424 - 2434 (2015) J,2v~Dq
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% cF>;f(X
% The code is written by Tatiana Latychevskaia, 2002 p`V9+CA
% The version of Matlab for this code is R2010b iF2IR{h
.dq.F#2B;
function [out] = FT2Dc(u0); V:$1o
_\V{X}ftqa
[Nx, Ny] = size(1i,1j); kTe<1^,m
5D@Q1
f1 = zeros(Nx,Ny); SEn8t"n
Mh@ylp+q
for ii = 1:Nx Z-r0
D
for jj = 1:Ny !"qEB2r
f1(ii,jj) = exp(1i*pi*(ii + jj)); j1C0LP8
end bsS|!KT
end 5;%xqdD
O9 r44ww
FT = fft2(f1.*in); J'&?=|
k/f_@8
out = f1.*FT; _rWXcK3cjr
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%