% Get Jacobian Jrh dr/dh for estimating 2D Homography [Jrh,Jsh,Jks,Jrk] = sugr_get_Jacobian_Jhr_Homography_2D(H) H 3x3-matrix spectrally normalized homography Jrh 8x9-matrix Jacobian dr/dh, h -> r Jsh 9x9-matrix Jacobian ds/sh, h -> s Jks 9x9-matrix Jacobian dk/ds, s -> k Jrk 8x9-matrix Jacobian dr/dk, k -> r Wolfgang Förstner wfoerstn@uni-bonn.de wf 3/2011, see PCV pp. 385 ff. (r == Delta p) and App. A.15
0001 %% Get Jacobian Jrh dr/dh for estimating 2D Homography 0002 % 0003 % [Jrh,Jsh,Jks,Jrk] = sugr_get_Jacobian_Jhr_Homography_2D(H) 0004 % 0005 % H 3x3-matrix spectrally normalized homography 0006 % 0007 % Jrh 8x9-matrix Jacobian dr/dh, h -> r 0008 % Jsh 9x9-matrix Jacobian ds/sh, h -> s 0009 % Jks 9x9-matrix Jacobian dk/ds, s -> k 0010 % Jrk 8x9-matrix Jacobian dr/dk, k -> r 0011 % 0012 % Wolfgang Förstner 0013 % wfoerstn@uni-bonn.de 0014 % 0015 % wf 3/2011, 0016 % see PCV pp. 385 ff. (r == Delta p) 0017 % and App. A.15 0018 0019 function [Jrh,Jsh,Jks,Jrk] = sugr_get_Jacobian_Jrh_Homography_2D(H) 0020 0021 0022 Hit = inv(H'); % H^-T for Jacobian 0023 vHit = Hit(:); % vectorize 0024 Jsh = eye(9) - 1/3 * H(:)*vHit'; % Jacobian J: ds/dh, h -> s 0025 Jks = kron(Hit,eye(3)); % Jacobian J: dk/ds, s->k (Hit otimes I_3) 0026 Jrk = [eye(8),zeros(8,1)]; % Jacobian J: dr/dk, k->h 0027 0028 Jrh = Jrk * Jks * Jsh; % Jacobian J: dr/dr, h->r