有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 sF|$oyDE
J,q:
2d centered Fourier transform,居中的傅里叶变换 dIf Jr}ih
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Q!Op^4Jz
% Citation for this code and algorithm: f/=0
% Tatiana Latychevskaia and Hans-Werner Fink d>aZpJ[.
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", ct]5\g?U'
% Appl. Optics 54, 2424 - 2434 (2015) |FcG$[
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% =-q)I[4#
% The code is written by Tatiana Latychevskaia, 2002 Onc!5L
% The version of Matlab for this code is R2010b `n %~#TJ
cfj6I
function [out] = FT2Dc(u0); E@@quK
PNKmI
[Nx, Ny] = size(1i,1j); ]>AW
RSnK`N\9jb
f1 = zeros(Nx,Ny); ("TI~
'!Sj]+
for ii = 1:Nx `#(4K4]1.
for jj = 1:Ny $]T7Iwk
f1(ii,jj) = exp(1i*pi*(ii + jj)); ?Rwn1.Z
end UtWoSFZ'o!
end m.$Oo
Mu'
[lnN~#(Y
FT = fft2(f1.*in); $:xUXEi{
6iTDk
out = f1.*FT; BPPhVE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%