<<

arXiv:1312.0788v2 [cs.CV] 8 Aug 2014 eiaieo of derivative parameters Keywords differen- of coordinates. complexity exponential the in avoid analysis to tial means a applications alternative as computational simply to various the resort in alleviate reluctantly representations to to expression pressure compact common pro- does more by formula hope this We simpler literature. viding the this in knowledge, anywhere appear our not of best To formulas. the better-known but less-compact agreement its other as with the well expo- as of its provided, is interpretation to expression resulting geometric respect with A matrix coordinates. rotation nential 3-D a of tive Abstract date Accepted: / date Received: opc oml o h eiaieo - oainin rotation 3-D Gallego Guillermo a of derivative the coordinates for exponential formula compact A fTcnlg,Alna eri 03,USA. 30332, Georgia Ins Atlanta, Technology, Georgia Engineering, of Computer and Electrical of School Yezzi A. guillermo.gallego@ifi.uzh.ch Universidad E-mail: Zürich, Roboti Imágenes, of Switzerland. with University Zürich, now Laboratory, de AI is Group, He Tratamiento Perception Spain. and E-28040, de Madrid, de Grupo Politécnica with was Gallego G. FP7’s Government by (BRIDGET). and Spanish 610691 3DTV), the project (Enhanced by Pro- TEC2010-20412 supported This project Framework partially under CMMI-1068624. Seventh been and Foun the has CCF-1347191 Science Pro- work of National Grants: COFUND by (NSF) part supported - is dation as Yezzi Curie A. EU, Marie (FP7). the gramme the by of supported gramme is Gallego G. h nlpbiaini vial tSrne via Springer at available is No. publication manuscript final Vis The Imaging Math J epeetacmatfruafrtederiva- the for formula compact a present We · Rotation oainvector. rotation · · rs-rdc matrix cross-product · i group Lie nhn Yezzi Anthony · xoeta map exponential · Rodrigues titute http://dx.doi.org/10.1007/s10851-014-0528-x 8001 · cs - hs ersnain r sda aaerztosof parametrizations as 3 used are representations also numbers. These are real they 3-4 of models; consisting world representations, compact to related directly are they hls oecmat( elnmes than numbers) real (4 compact more theless rta iiiesm otfnto i ae where cases (in function cost some process minimize some control that that or optimal exam- perform for find matrix, cal- to to rotation ple, the the able requires of derivatives be often of sim- culation to This out analysis. also differential carry but some and operations rotations group represent ple to how know riae [ ordinates matrices. rotation [ angles and Euler , unit exponential coordinates, representation, rotations axis-angle of angles, Euler representations are common most the disadvantages.Among and advantages them. with has representation operate Each and represent to ways several admit device. of computing parts as mobile other well a and as or wrists scene, robot of a the in the orien- objects describe the to and describe widespread cameras to are of robotics they tation and particular, vision In computer in bodies. kinemat- rigid the to of including mechanics ics rotation, quantum planetary from and areas, stellar scientific many in applications numerous have rotations Three-dimensional Introduction 1 in as nw sElrRdiusprmtr)[ parameters) Euler-Rodrigues quater- 15 as Unit known numbers. real (also nine nions require but with work frttoscnb on n[ in representations found the be can on notes rotations references Historical of additional with. work as to well easy as also are and trices, × .3]aeals nutv ersnain u never- but representation, intuitive less a are 33] p. , nmn plctos ti o nyncsayto necessary only not is it applications, many In pc oain aetredgeso reo,and freedom, of degrees three have rotations Space 3 oainmtie [ matrices rotation 15 .3]aevr ayt iulz because visualize to easy very are 30] p. , 15 .3] xsageadepnnilco- exponential and axis-angle 31], p. , 15 .2] hc r airto easier are which 23], p. , 14 .4] [ 43], p. , 3 ]. 3 × 3 ma- 2 , 2 Guillermo Gallego, Anthony Yezzi a closed form solution does not exist) [7,12]. Such is vector space Skew3 consists of all (real) 3 × 3 skew- the case for the optimal pose estimation problem long symmetric matrices, which can be thought of as in- studied within the computer vision and photogramme- finitesimal rotations [14, p. 25]. Moreover, the expo- try communities [16,9,6], as well as for other related nential map exp : so(3) → SO(3) can be defined, which problems [20,5,13,18]. allows one to recapture the local group structure of Here we consider rotations parametrized by expo- SO(3) from the Lie algebra so(3), the latter consist- nential coordinates using the well-known Euler-Rodrigues ing of Skew3 together with the binary operation (Lie formula, and compute a compact expression, in matrix bracket or commutator) [A, B]= AB−BA, with A, B ∈ form, for the derivative of the parametrized rotation Skew3. matrix. We also give a geometric interpretation of the The Euler-Rodrigues formula [4][15, p. 28] states formula in terms of the spatial decomposition given by that the representing a circular move- the rotation axis. To the authors’ knowledge, the result ment of angle θ (in radians) around a specified axis 3 presented here has not been shown before and it fills a ¯v ∈ R is given by gap in the literature, at an intermediate point between 2 R = Id + sin θ [¯v] + (1 − cos θ)[¯v] , (1) numerical differentiation, the derivative at the identity × × for incremental rotations and general formulas for Lie where ¯v is a , and groups. By providing this simpler, compact formula for the derivative of the rotation matrix we hope to allevi- 0 −a3 a2 a : 3 1 3 ate the common pressure to reluctantly resort to alter- [ ]× =  a 0 −a  ∈ Skew (2) −a2 a1 0 native representations or the framework of incremental   rotations (i.e., local charts) in various computational is the cross product (skew-symmetric) matrix such that applications simply as a means to avoid the complexity a b a b a ⊤ b R3 [ ]× = × , for all = (a1,a2,a3) , ∈ . of differential analysis in exponential coordinates. An alternative formula for (1) is The paper is organized as follows: Section 2 reviews R ¯v ¯v¯v⊤ the theory of 3-D rotations parametrized by exponential = cos θ Id + sin θ [ ]× + (1 − cos θ) (3) coordinates. Section 3 presents the main contributions because any unit vector ¯v satisfies of this paper, where proofs and secondary results have ¯v 2 ¯v¯v⊤ been moved to appendices for readers interested in tech- [ ]× = − Id. (4) nical details. Finally, conclusions are given in Section 4. The exponential coordinates [15, p. 30] given by the rotation vector v := θ¯v are a natural and compact representation of the rotation in terms of its geomet- 2 Parametrization of a rotation ric building blocks. They are also called the canonical coordinates of the rotation group. The Euler-Rodrigues In this section, we review the parametrization of space rotation formula (1) is a closed form expression of the rotations using exponential coordinates, before proceed- aforementioned exponential map [15, p. 29] ing to calculating derivatives. ∞ ∞ k A three-dimensional rotation is a circular movement 1 k θ k R = exp([v] ) := [v] = [¯v] . (5) of an object around an imaginary line called the ro- × k! × k! × kX=0 kX=0 tation axis. The rotation angle measures the amount of circular displacement. Rotations preserve Euclidean Moreover, since the exponential map considered is distance and . Algebraically, the rotation of surjective, every rotation matrix can be written as (5) v v a point X = (X,Y,Z)⊤ to a point X′ = (X′, Y ′,Z′)⊤ for some coordinates , specifically, those with k k≤ π, R3 can be expressed as X′ = RX, where the rotation ma- i.e., in the closed ball of radius π in . Hence, expo- trix R is a 3 × 3 (R⊤R = RR⊤ = Id, nential coordinates can be used either locally (to repre- the identity matrix) with determinant det(R)=1. sent incremental rotations between two nearby config- The space of 3-D rotations is known as the ma- urations) or globally (to represent total rotations with trix Lie group SO(3) (special of order respect to a reference one) [17]. More observations of three) [15, p. 24], and it is not isomorphic to R3 [19]. this parametrization can be found in [10, p. 624]. It has the structure of both a non-commutative group To retrieve the exponential coordinates or the axis- (under the composition of rotations) and a manifold for angle representation of a rotation matrix, we use the so which the group operations are smooth. Since SO(3) log map, log : SO(3) → (3), given in [14, p. 27] by is a differentiable manifold, each of its points (i.e., ro- trace(R) − 1 θ = kvk = arccos tations) has a tangent space, and the corresponding  2  A compact formula for the derivative of a 3-D rotation in exponential coordinates 3 and, if θ 6=0 and Rij are the entries of R, Next, let us show a formula for the derivative of a rotation at an arbitrary element, not necessarily the v 1 ⊤ ¯v = = R32 − R23, R13 − R31, R21 − R12 . simplified case of the identity element of the rotation kvk 2 sin θ  group. First we show a well-known but complicated one Without loss of generality, if θ is the principal value of and then our contribution. the inverse cosine function then v lies within the ball of Stemming from the Euler-Rodrigues formula (1), R v v radius π, as assumed from now on. In the identity case, the derivative of a rotation ( ) = exp([ ]×) with re- v R = Id, then θ =0 and ¯v can be chosen arbitrarily. spect to its exponential coordinates is given by R ∂ ¯v ¯v 2 sin θ e ¯v = cos θ v¯i [ ]× + sin θ v¯i [ ]× + [ i − v¯i ]× ∂vi θ 3 Derivative of a rotation 1 − cos θ + e ¯v⊤ + ¯ve⊤ − 2¯v ¯v¯v⊤ , (7) θ i i i Given the exponential coordinate parametrization (5),  where θ = kvk and ¯v = (¯v1, v¯2, v¯3)⊤ = v/kvk. For- we consider the calculation of the derivative of the Ro- mula (7) is used, for example, in the OpenCV library [1] tation matrix, which is a relevant topic on its own as (having more than 50 thousand people of user commu- well as due to its broad range of applications. Although nity and estimated number of downloads exceeding 7 formulas exist to express the derivative of the expo- million) if the rotation vector v is passed as argument nential map in general Lie groups [11, p. 95][8, p. 70], to the appropriate function (cvRodrigues). The proof they are not computationally friendly. Instead, for the of (7) is given in Appendix E. rotation group, researchers commonly resort to one of Here, however we follow a different approach and the following alternatives: numerical differentiation, us- first compute the derivative of the product Ru where u ing a complicated analytical formula for the derivative is independent of the exponential coordinates v. Once (see (7)) or reformulating the problem using incremen- obtained a compact formula, it is used to compute the tal rotations so that formulas for the simplified case derivatives of the rotation matrix itself. (linearization around the identity element) are used. Here, we bridge the gap between the aforementioned R v u v u Result 1 The derivative of ( ) = exp([ ]×) with general formulas and alternatives for the rotation group respect to the exponential coordinates v, where u is in- by providing a simple, analytical and computationally dependent of v, is friendly formula to calculate the derivative of a rota- ∂R(v)u vv⊤ + (R⊤ − Id)[v] tion. We also give the geometric interpretation in terms = −R [u] × . (8) of the spatial decomposition according to the rotation ∂v × kvk2 axis. After many false starts, we report the path that The proof is given in Appendix B. lead to the formula using well-known matrix identities. We conjecture that there is a way to obtain such for- mula from the general one for Lie groups, but so far we 3.1 Geometric interpretation have not found it. The incremental rotation approach has the following Let the decomposition of a vector b onto the subspaces explanation. The Lie group framework allows SO(3) to parallel and perpendicular components to the rotation be locally replaced by its linearized version, i.e., the Lie axis ¯v be b = bk + b⊥ , where bk ∝ ¯v is parallel to the so algebra (3), whose vector space is the tangent space of rotation axis and b⊥ ⊥ ¯v lies in the plane orthogonal to SO(3) at the identity element [14, p. 26]. This element the rotation axis. Then, observe that formula (8) pro- plays a key role in differential analysis with the expo- vides insight about the action of ∂(Ru)/∂v on a vector nential map: it shows that rotations may be linearly ap- b. Such operation has two components according to the proximated using three so-called group generators (the aforementioned decomposition along/orthogonal to the standard for Skew3) rotation axis, ∂ Ru R⊤ ¯v b G v e ∂ ( − Id)[ ]× ⊥ i := exp([ ]×) = [ i]× , (6) b = −R [u] (bk · ¯v)¯v + , ∂vi v=0 ∂v × kvk   ⊤ where v = (v1, v2, v3) and ei is the i-th vector of the and notice that both components scale differently: the R3 standard basis in . And it also provides a means to first term (bk · ¯v)¯v depends solely on bk, whereas the ¯v b v calculate derivatives of rotations as long as they are second term involves [ ]× ⊥/k k, which depends on R v R b v written in an incremental way, e.g., = exp([ ]×) 0, both ⊥ and k k. This information is difficult to extract so that derivatives are evaluated at v = 0, as in (6). by using a formula like (7). 4 Guillermo Gallego, Anthony Yezzi

Another way to look at the geometric interpretation 3.3 Derivative at the identity. of our formula is through sensitivity analysis. The first order Taylor series approximation of the rotated point Our result, evaluated at the identity element, agrees u′ = R(v)u around v is with the well-known result about the so-called genera- tors G of the group (6). This can be shown by comput- ∂Ru i u′(v + δv) ≈ u′(v)+ δv ing the limit as v → 0 of (9), and using the facts that ∂v limv→0 R = Id and limv→0(Id − R)/kvk = − [¯v] , (R⊤ − Id)[¯v] δv × u′ v R u v ¯v ¯v × ⊥ = ( ) − [ ]× (δ k · ) + , kvk ∂R (9) [¯v × (Id − R)ei]   lim = lim v¯ [¯v] + × R v 0 v 0 i × → ∂vi → kvk where δv = δvk + δv⊥. As the rotation R(v) is per-    =v ¯ [¯v] − ¯v × ([¯v] e ) turbed, there are two different types of changes: i × × i ×   v ¯v ¯v 2 e – If the perturbation δ is such that only the amount = v¯i − [ ]× i × of rotation changes, but not the direction of ro- h i v 0 (4) e tation (rotation axis), i.e., δ ⊥ = , the rotated = [ i]× . point becomes u′(v + δv) ≈ u′(v) −kδvk R(u × ¯v), where the change is proportional to the rotation of u × ¯v. Equivalently, using property (16) with G = R, 4 Conclusion R(u × ¯v) = (Ru) × (R¯v)= Ru × ¯v, the change is per- pendicular to both Ru and the rotation axis ¯v, which We have provided a compact formula for the derivative is easy to visualize geometrically since the change is of a rotation matrix in exponential coordinates. The represented by the tangent vector to the circumfer- formula is not only simpler than existing ones but it ence traced out by point u as it rotates around the also has an intuitive interpretation according to the ge- fixed axis ¯v, (u′(v + δv) − u′(v))/kδvk. ometric decomposition that it provides in terms of the – If the perturbation δv is such that only the direc- amount of rotation and the direction of rotation. This, tion of the rotation changes, but not the amount of together with the Euler-Rodrigues formula and the fact rotation, i.e., δv = 0, the rotated point becomes k that exponential coordinates provide a global chart of u′(v + δv) ≈ u′(v) −kvk−1R [u] (R⊤ − Id)[¯v] δv. × × the rotation group are supporting arguments in favor The scaling is different from previous case, since now of using such parametrization for the search of optimal the change in u′ depends on both δv and kvk. ⊥ rotations in first-order finite-dimensional optimization For an arbitrary perturbation, the change on the ro- techniques. In addition, the formula can also provide a tated point has two components: one due to the part of simple fix for numerical implementations that are based the perturbation that modifies the amount of rotation, on the derivative of a linearization of the rotation ma- and another one due to the part of the perturbation trix in exponential coordinates. that modifies the direction of the rotation.

3.2 Compact formula for the derivative of the rotation A Some cross product relations matrix Let us use the dot notation for the Euclidean inner product a·b = a⊤b. Also, let G be a 3 × 3 matrix, invertible when required so Next, we use Result 1 to compute the derivatives of the that it represents a change of coordinates in R3. rotation matrix itself with respect to the exponential a a 0 coordinates (5), without re-doing all calculations. [ ]× = (10) [a]× b = − [b]× a (11) R v v Result 2 The derivative of ( ) = exp([ ]×) with re- ⊤ [a]× [b]× = ba − (a · b)Id (12) spect to its exponential coordinates v = (v1, v2, v3)⊤ is (12) a × (b × c) = (a · c)b − (a · b)c (13) ∂R vi [v] + [v × (Id − R)ei] a b ba⊤ ab⊤ × × R [ × ]× = − (14) = v 2 , (9) ∂vi k k [a × b]× = [a]× [b]× − [b]× [a]× (15) 3 Ga Gb G a b G⊤ where ei is the i-th vector of the standard basis in R . [( ) × ( )]× = [ × ]× −⊤ (Ga) × (Gb) = det(G)G (a × b) (16) The proof is given in Appendix C. To conclude, we ⊤ [a] G + G [a] = trace(G) [a] − [Ga] (17) also need to show that the compact formula (9) is con- × × × × Ga G G−⊤ a G−1 sistent with (7). This is demonstrated in Appendix D. [ ]× = det( ) [ ]× A compact formula for the derivative of a 3-D rotation in exponential coordinates 5

B Proof of Result 1 For the remaining term of R⊤∂(Ru)/∂v, we use the transpose (12) ⊤ of (1) and apply [¯v]× [u]× [¯v]× = −(u ¯v) [¯v]× to simplify Proof Four terms result from applying the chain rule to (1) acting on vector u. Let us use θ = kvk and ¯v = v/kvk, then 2 2 Id − sin θ [¯v]× + (1 − cos θ) [¯v]× · sin θ [u]× [¯v]× Ru ¯v u 2 ∂ ∂ [ ]× ∂ sin θ + (1 − cos θ)(2 [¯v]× [u]× [¯v]× + [u]× [¯v]×) = sin θ + [¯v]× u ∂v ∂v ∂v 2 = sin θ [u]× [¯v]× + (1 − cos θ) [u]× [¯v]×  ¯v 2 u ∂ [ ]× 2 ∂(1 − cos θ) ⊤ 2 2 +(1 − cos θ) + [¯v]× u . + (u ¯v) −2(1 − cos θ)+sin θ + (1 − cos θ) [¯v] ∂v ∂v × 2 3 = [u]× sin θ [¯v]× − (1 − cos θ) [¯v]×  The previous derivatives are computed next, using some of the u R⊤ ¯v cross product properties listed in Appendix A: = − [ ]× ( − Id) [ ]× , 

¯v u u ¯v ⊤ 2 ∂ [ ]× (11) ∂(− [ ]× ) ∂¯v ∂¯v where the term in (u ¯v) vanished since sin θ − 2(1 − cos θ) + = = − [u]× , 2 ∂v ∂¯v ∂v ∂v (1 − cos θ) = 0. Collecting terms, with derivative of the unit rotation axis vector ⊤ ∂Ru ⊤ 1 ⊤ R = − [u]× ¯v¯v + (R − Id) [¯v]× . (21) ∂v θ ∂¯v ∂ v 1 ⊤ (4) 1 2 = = (Id − ¯v¯v ) = − [¯v]× . (18)  ∂v ∂v kvk θ θ Finally, multiply (21) on the left by R and use RR⊤ = Id, θ = kvk,   ¯v = v/kvk to obtain (8). Also by the chain rule,

∂ sin θ ∂ sin θ ∂θ ⊤ = = cos θ ¯v , ∂v ∂θ ∂v C Proof of Result 2 ∂(1 − cos θ) ∂ cos θ ∂θ ⊤ = − = sin θ ¯v , ∂v ∂θ ∂v Proof Stemming from (8), we show that it is possible to write and, applying the product rule twice, ∂R u = Au (22) ¯v 2 u ⊤ ⊤ ∂vi ∂ [ ]× (4) ∂¯v(¯v u) ∂¯v ∂(¯v u) = = (¯v⊤u) + ¯v ∂v ∂v ∂v ∂v for some matrix A and for all vector u independent of v. Thus ⊤ ⊤ ∂¯v in this operator form, A is indeed the representation of ∂R/∂vi. = (¯v u)Id + ¯vu ∂v First, observe that (18) 1 ⊤  ⊤ 2 = − (¯v u)Id + ¯vu [¯v]× , ∂R ∂ ∂ θ u = (Ru) = (Ru) ei, ∂v ∂v ∂v  i i which can be rewritten as a sum of cross product matrix multi- plications since then substitute (8) and simplify using the cross-product proper- ties to arrive at (22): ¯v⊤u ¯vu⊤ ¯v 2 ( )Id + [ ]× R ∂ u v −2 R u vv⊤ R⊤ v e (10) = −k k [ ]× + ( − Id) [ ]× i ⊤  ⊤ ⊤ ⊤ 2 ∂vi = (¯v u)Id − u¯v + ¯vu − u¯v [¯v]× −2 ⊤ ⊤ = −kvk R [u] vv + [v] (R − Id)e (12)(14) 2 2 × × i − ¯v u ¯v u × ¯v ¯v = [ ]× [ ]× [ ]× + [ ]× [ ]× −2 R R⊤ = −kvk [u]× vvi + v × ( − Id)ei (15)(4) 2 = −2 ¯v u ¯v − u ¯v . (11) [ ]× [ ]× [ ]× [ ]× [ ]× v −2 R v v R⊤ e u  = k k vi + × ( − Id) i × . (23) Hence, so far the derivative of the rotated vector is After some manipulations,  Ru ∂ 2 ⊤ sin θ 2 R v v R⊤ e v v R e R = (cos θ [¯v]× + sin θ [¯v]×)u¯v + [u]× [¯v]× vi + × ( − Id) i × = vi + × (Id − ) i × , ∂v θ 1 − cos θ 2     + (2 [¯v]× [u]× [¯v]× + [u]× [¯v]×). and so, substituting in (23) and using the linearity of the cross- θ product matrix (2), the desired formula (9) is obtained. Next, multiply on the left by R⊤ and use

⊤ (3)(10) 2 D Agreement between derivative formulas R [¯v]× = cos θ [¯v]× − sin θ [¯v]× (19) to simplify the first term of R⊤∂(Ru)/∂v, Here we show the agreement between (7) and (9). First, use θ = kvk and the definition of the unit vector ¯v = v/θ, to write (9) as ⊤ 2 ⊤ R (cos θ [¯v] + sin θ [¯v] )u¯v × × ∂R 1 =v ¯ ¯v R + ¯v × (Id − R)e R. (24) (19) 3 i [ ]× [ i]× 2 2 ⊤ ∂vi θ = (cos θ [¯v]× − sin θ [¯v]×)u¯v (20) (4) 2 2 ⊤ Using (3) and [¯v]× ¯v = 0, it follows that = (cos θ + sin θ) [¯v]× u¯v (11) ⊤ ¯v R ¯v ¯v 2 = − [u]× ¯v¯v . [ ]× = cos θ [ ]× + sin θ [ ]× . 6 Guillermo Gallego, Anthony Yezzi

⊤ ⊤ ⊤ Also, since [¯v × b]× = b¯v − ¯vb and R ¯v = ¯v, it yields References ¯v R e R R e ¯v⊤R ¯ve⊤ R⊤ R [ × (Id − ) i]× = (Id − ) i − i (Id − ) 1. Open Source Computer Vision (OpenCV). R e ¯v⊤ ¯ve⊤ R = (Id − ) i − i ( − Id) http://opencv.org e ¯v⊤ ¯ve⊤ Re ¯v⊤ ¯ve⊤R = i + i − ( i + i ), 2. Altmann, S.: Rotations, Quaternions, And Double Groups. ⊤ Clarendon Press, Oxford, UK (1986) and expanding Rei and e R in the previous formula by means i 3. Bauchau, O., Choi, J.Y.: The Vector Parameterization of Mo- of (3), we obtain tion. Nonlinear Dynamics 33(2), 165–188 (2003) [¯v × (Id − R)ei]× R 4. Cheng, H., Gupta, K.: An Historical Note on Finite Rota- ⊤ ⊤ tions. J. Appl. Mech. 56(1), 139–145 (1989) = e ¯v + ¯ve i i 5. Dambreville, S., Sandhu, R., Yezzi, A., Tannenbaum, A.: A ⊤ ⊤ ⊤ − cos θ ei¯v + sin θ [¯v]× ei¯v + (1 − cos θ)¯vi ¯v¯v Geometric Approach to Joint 2D Region-Based Segmenta- ¯ve⊤ ¯ve⊤ ¯v ¯v¯v⊤ tion and 3D Pose Estimation Using a 3D Shape Prior. SIAM − cos θ i + sin θ i [ ]× + (1 − cos θ)¯vi  J. Img. Sci. 3(1), 110–132 (2010) e ¯v⊤ ¯ve⊤ ¯v¯v⊤ = (1− cos θ)( i + i − 2¯vi )  6. Enqvist, O., Kahl, F.: Robust Optimal Pose Estimation. In: ⊤ ⊤ Proc. 10th European Conf. on Computer Vision, ECCV ’08, − sin θ ([¯v]× ei¯v + ¯ve [¯v]×). i pp. 141–153. Springer-Verlag, Berlin, Heidelberg (2008) ⊤ Using property (17) with a = ¯v, G = ei¯v we have that 7. Gurwitz, C., Overton, M.: A globally convergent algorithm ¯v e ¯v⊤ ¯ve⊤ ¯v e ¯v⊤ ¯v e ¯v⊤¯v for minimizing over the rotation group of quadratic forms. [ ]× i + i [ ]× = trace( i ) [ ]× − i , × IEEE Trans. Pattern Anal. Mach. Intell. 11(11), 1228–1232 ¯v⊤e ¯v e ¯v 2 = trace( i) [ ]× −  ik k  × (1989) ¯v e 8. Hall, B.: Lie Groups, Lie algebras and representations. Grad- =v ¯i [ ]× − [ i]×   uate Text in Mathematics. Springer (2004) ¯v e = [v¯i − i]× . 9. Hartley, R., Kahl, F.: Global Optimization through Search- Finally, substituting previous results in (24), the desired result (7) ing Rotation Space and Optimal Estimation of the Essential is obtained. Matrix. In: Proc. IEEE 11th Int. Conf. on Computer Vision, ICCV 2007, pp. 1–8 (2007) 10. Hartley, R., Zisserman, A.: Multiple View in Com- E Derivative formula with sines and cosines puter Vision, 2nd edn. Cambridge University Press (2003) 11. Helgason, S.: Differential geometry and symmetric spaces. Here, we show how to obtain formula (7). First, differentiate the Pure and Applied Mathematics. Elsevier Science (1962) Euler-Rodrigues rotation formula (3) with respect to the i-th 12. Horn, B.K.P.: Relative Orientation. Int. J. Computer Vision component of the parametrizing vector v = θ¯v and take into 4(1), 59–78 (1990) account that 13. Kuehnel, F.O.: On the minimization over SO(3) manifolds. Tech. Rep. 03.12, Research Institute for Advanced Computer 2 2 ∂θ vi θ = kvk =⇒ = =: v¯i. Science (RIACS). NASA Ames Research Center, USA (2003) ∂vi θ 14. Ma, Y., Soatto, S., Kosecká, J., Sastry, S.: An Invitation to 3- Applying the chain rule to (3), gives D Vision: from images to geometric models. Springer (2003) ∂R ⊤ 15. Murray, R., Li, Z., Sastry, S.: A Mathematical Introduction = − sin θ v¯iId + cos θ v¯i [¯v]× + sin θ v¯i ¯v¯v ∂vi to Robotic Manipulation. CRC Press (1994) ¯v ⊤ 16. Olsson, C., Kahl, F., Oskarsson, M.: Optimal Estimation of ∂ [ ]× ∂(¯v¯v ) +sin θ + (1 − cos θ) . (25) Perspective Camera Pose. In: Proc. 18th Int. Conf. on Pat- ∂vi ∂vi tern Recognition, ICPR 2006, vol. 2, pp. 5–8 (2006) Next, we use 17. Ritto-Corrêa, M., Camotim, D.: On the differentiation of the 1 Rodrigues formula and its significance for the vector-like pa- ∂ vj − θ v¯iv¯j i =6 j = 1 2 , (26) rameterization of Reissner–Simo beam theory. Int. J. Nu- ∂vi kvk (1 − v¯ ) i = j   ( θ i merical Methods in Engineering 55(9), 1005–1032 (2002) to simplify one of the terms in (25), 18. Sandhu, R., Dambreville, S., Tannenbaum, A.: Point Set Registration via Particle Filtering and Stochastic Dynamics. ¯v ∂ [ ]× ∂ v (26) 1 IEEE Trans. Pattern Anal. Mach. Intell. 32(8), 1459–1473 = = [ei − v¯i¯v]× . ∂v ∂v kvk θ (2010) i i  × 19. Stuelpnagel, J.: On the Parametrization of the Three- Applying the product rule to the last term in (25) and using Dimensional Rotation Group. SIAM Review 6(4), 422–430 ∂¯v ∂ v 1 ⊤ (1964) = = (Id − ¯v¯v )ei, (27) ∂vi ∂vi kvk θ 20. Unal, G.B., Yezzi, A.J., Soatto, S., Slabaugh, G.G.: A Varia-   tional Approach to Problems in Calibration of Multiple Cam- gives eras. IEEE Trans. Pattern Anal. Mach. Intell. 29(8), 1322– ¯v¯v⊤ 1338 (2007) ∂( ) (27) 1 e ¯v⊤ ¯ve⊤ ¯v¯v⊤ = i + i − 2¯vi . ∂vi θ Finally, substituting the previous expressions in (25), yields (7). A similar proof is outlined in [13] using Einstein summation index notation.

Acknowledgements The authors thank the anonymous review- ers for their helpful comments and suggestions.