k-th pixel with coordinates (i,j) in h as a function of f function hk = hk(theta,[zk;f(:)]]);
0001 function h = hk(t,p) 0002 % k-th pixel with coordinates (i,j) in h as a function of f 0003 %function hk = hk(theta,[zk;f(:)]]); 0004 0005 N = sqrt(length(p)-2); 0006 Nf = (N-1)/2; 0007 f = reshape(p(3:end),N,N); 0008 0009 Ai = inv([t(1) t(3) t(5);t(2) t(4) t(6); 0 0 1]); 0010 xh = Ai*[p(1);p(2);1]; % real coordinates in f (centred) 0011 xc=xh(1); 0012 yc=xh(2); 0013 x=xc+Nf+1; % pixel coordinates in f 0014 y=yc+Nf+1; 0015 h = t(7)*LSM_f_cubic_interpolation(x,y,f)+t(8); 0016 end