Home > Matching_SYM_LSM > src > Functions > LSM_Functions > hk.m

hk

PURPOSE ^

k-th pixel with coordinates (i,j) in h as a function of f

SYNOPSIS ^

function h = hk(t,p)

DESCRIPTION ^

 k-th pixel with coordinates (i,j) in h as a function of f
function hk = hk(theta,[zk;f(:)]]);

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

Generated on Sun 19-Jul-2020 23:00:25 by m2html © 2005