Cost evaluation at X given function handle in the Essential matrix E. function val = essential_costE2cost(X, costE) costE is the function handle for the cost function in E. See also: essential_egradE2egrad essential_ehessE2ehess
0001 function val = essential_costE2cost(X, costE) 0002 % Cost evaluation at X given function handle in the Essential matrix E. 0003 % 0004 % function val = essential_costE2cost(X, costE) 0005 % 0006 % costE is the function handle for the cost function in E. 0007 % 0008 % See also: essential_egradE2egrad essential_ehessE2ehess 0009 0010 % This file is part of Manopt: www.manopt.org. 0011 % Original author: Roberto Tron, Aug. 8, 2014 0012 % Contributors: Bamdev Mishra, May 22, 2015. 0013 0014 e3hat = [0 -1 0; 1 0 0; 0 0 0]; 0015 0016 RA = X(:,1:3,:); 0017 RB = X(:,4:6,:); 0018 E = multiprod(multiprod(multitransp(RA), e3hat), RB); 0019 0020 val = costE(E); 0021 end