Created
August 9, 2015 06:13
-
-
Save amiltonwong/815d6b0327eaa9a6d1b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [ Jac, residual ] = deriveErrNumeric( IRef, DRef, I, xi, K ) | |
% calculate numeric derivative. SLOW | |
eps = 1e-6; | |
Jac = zeros(size(I,1) * size(I,2),6); | |
residual = calcErr(IRef,DRef,I,xi,K); | |
for j=1:6 | |
epsVec = zeros(6,1); | |
epsVec(j) = eps; | |
% multiply epsilon from left onto the current estimate. | |
xiPerm = se3Log(se3Exp(epsVec) * se3Exp(xi)); | |
Jac(:,j) = (calcErr(IRef,DRef,I,xiPerm,K) - residual) / eps; | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment