有会相位恢复算法的吗?能帮我看看下面的代码错哪儿了吗?不胜感激 "" UyfC[
_o9axBJs
2d centered Fourier transform,居中的傅里叶变换 mP*$wE9b,:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 8(Az/@=n
% Citation for this code and algorithm: @A6iY
% Tatiana Latychevskaia and Hans-Werner Fink ^1 ){
@(
% "Practical algorithms for simulation and reconstruction of digital in-line holograms", YH58p&up
% Appl. Optics 54, 2424 - 2434 (2015) _jX,1+M
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% WdOxwsq"
% The code is written by Tatiana Latychevskaia, 2002 wa,`BAKJ+F
% The version of Matlab for this code is R2010b NlF*/Rs
4P#jMox
function [out] = FT2Dc(u0); A_TaXl(
s O#cJAfuu
[Nx, Ny] = size(1i,1j); U LS>v
{-I+
f1 = zeros(Nx,Ny); <6;M\:Y*T
$Z;8@O3
for ii = 1:Nx {*;8`+R&
for jj = 1:Ny Y[e.1\d'
f1(ii,jj) = exp(1i*pi*(ii + jj)); &/[MWQ
end f&$Bjq
end xp1/@Pw?
GDCp@%xW
FT = fft2(f1.*in); >h8m8J
q5r7KYH{
out = f1.*FT; Rng-o!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%