Home > manopt > manifolds > essential > privateessential > essential_distMinAnglePair_ftFromQ.m

essential_distMinAnglePair_ftFromQ

PURPOSE ^

SYNOPSIS ^

function [ft,tBreak]=essential_distMinAnglePair_ftFromQ(t,Q1,Q2,varargin)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [ft,tBreak]=essential_distMinAnglePair_ftFromQ(t,Q1,Q2,varargin)
0002 kFlip=1;
0003 term='both';
0004 
0005 ivarargin=1;
0006 while(ivarargin<=length(varargin))
0007     switch(lower(varargin{ivarargin}))
0008         case 'kflip'
0009             ivarargin=ivarargin+1;
0010             kFlip=varargin{ivarargin};
0011         case 'term'
0012             ivarargin=ivarargin+1;
0013             term=lower(varargin{ivarargin});
0014         otherwise
0015             disp(varargin{ivarargin})
0016             error('Argument not valid!')
0017     end
0018     ivarargin=ivarargin+1;
0019 end
0020 
0021 
0022 Q2=essential_flipAmbiguity(Q2,kFlip);
0023 
0024 tBreak=[];
0025 ft=0;
0026 if strcmp(term,'first') || strcmp(term,'both')
0027     Q11=essential_getR1(Q1);
0028     Q21=essential_getR1(Q2);
0029     Q211=Q21*Q11';
0030     [tBreak1,~,~,c1,m1,p1]=essential_distMinAnglePair_discontinuityDistance(Q211);
0031     tBreak=[tBreak tBreak1];
0032     ft=ft+essential_distMinAnglePair_ft(t,m1,p1,c1);
0033 end
0034 
0035 if strcmp(term,'second') || strcmp(term,'both')
0036     Q22=essential_getR2(Q2);
0037     Q12=essential_getR2(Q1);
0038     Q212=Q22*Q12';
0039     [tBreak2,~,~,c2,m2,p2]=essential_distMinAnglePair_discontinuityDistance(Q212);
0040     tBreak=[tBreak tBreak2];
0041     ft=ft+essential_distMinAnglePair_ft(t,m2,p2,c2);
0042 end

Generated on Fri 08-Sep-2017 12:43:19 by m2html © 2005