Home > manopt > manifolds > essential > essential_ehessE2ehess.m

essential_ehessE2ehess

PURPOSE ^

Converts the Hessian in essential matrix E to the Hessian in X.

SYNOPSIS ^

function ehess = essential_ehessE2ehess(X, egradE, ehessE, S)

DESCRIPTION ^

 Converts the Hessian in essential matrix E to the Hessian in X.

 function ehess = essential_ehessE2ehess(X, egradE, ehessE, S)

 egradE is the function handle for the gradient in E.
 ehessE is the function handle for the Hessian in E.
 S is the search direction in the space of X.

 The output is a matrix in the space of X.

 See also: essential_costE2cost essential_egradE2egrad

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function ehess = essential_ehessE2ehess(X, egradE, ehessE, S)
0002 % Converts the Hessian in essential matrix E to the Hessian in X.
0003 %
0004 % function ehess = essential_ehessE2ehess(X, egradE, ehessE, S)
0005 %
0006 % egradE is the function handle for the gradient in E.
0007 % ehessE is the function handle for the Hessian in E.
0008 % S is the search direction in the space of X.
0009 %
0010 % The output is a matrix in the space of X.
0011 %
0012 % See also: essential_costE2cost essential_egradE2egrad
0013 
0014 
0015 % This file is part of Manopt: www.manopt.org.
0016 % Original author: Roberto Tron, Aug. 8, 2014
0017 % Contributors: Bamdev Mishra, May 22, 2015.
0018    
0019    e3hat = [0 -1 0; 1 0 0; 0 0 0];
0020     
0021     RA = X(:,1:3,:); 
0022     RB = X(:,4:6,:);
0023     E = multiprod(multiprod(multitransp(RA), e3hat), RB); % M.E(X);
0024     G =  egradE(E); 
0025     
0026     V = essential_sharp(multiprod(essential_flat(X), essential_flat(S)));
0027     VA = V(:,1:3,:);
0028     VB = V(:,4:6,:);
0029     
0030     dE = multiprod(multiprod(multitransp(RA), e3hat), VB)...
0031         + multiprod(multiprod(multitransp(VA), e3hat), RB);
0032     dG = ehessE(E, dE);
0033     
0034     %The following is the vectorized version of ehess = e3hat*[(VB*G'+RB*H') -(VA*G+RA*H)]
0035     ehess = multiprod(e3hat,cat(2,...
0036         multiprod(VB, multitransp(G)) + multiprod(RB, multitransp(dG)),...
0037             -multiprod(VA, G) - multiprod(RA, dG)));
0038     
0039 end

Generated on Fri 30-Sep-2022 13:18:25 by m2html © 2005