Ultramicroscopy 33 (1990) 209-213                                                                                         ...
210                                        G. Harauz / Representation of rotations by unit quaternions      A quaternion (...
(7. Harauz / Representation of rotations by unit quaternions                 211used to represent rotations if they are us...
212                               G. Harauz / Representation of rotations by unit quaternions5. Applications in EM     One...
G. Harauz / Representation of rotations by unit quaternions                                                           2136...
Upcoming SlideShare
Loading in …5

George harauz representation of rotations by unit quaternions, 1990


Published on

Published in: Technology, Education
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

George harauz representation of rotations by unit quaternions, 1990

  1. 1. Ultramicroscopy 33 (1990) 209-213 209North-Holland LETTER TO THE EDITOR R E P R E S E N T A T I O N OF R O T A T I O N S BY U N I T Q U A T E R N I O N S George H A R A U Z Department of Molecular Biology and Genetics, University of Guelph, Guelph, Ontario, Canada NIG 214/1 Received 21 May 1990 A closed form solution by Horn of an absolute orientation problem in photogrammetry and robotics entails the equivalent expression of rotation matrices by unit quaternions [B.K.P. Horn, J. Opt. Soc. Am. 4 (1987) 629]. Such representation by quaternions offers practical advantages in electron microscopy of macromolecular structures, where rotation angles must also be determined by optimisation techniques,1. Introduction The three-dimensional (3D) reconstruction of objects from their electron microscopical (EM) projec-tions is based on angular relationships between different views. These relative orientations are generallyrepresented by rotation matrices, e.g., 0 cos silo0 R~-- -siny cos/ 0 cosfl sinfl -sina cosa 0 , (1) 0 0 0 -sinfl cosfl} 0 0 1which describes a rotation by the Euler angles (a, r , 7) of classical mechanics and has been used in direct3D reconstruction problems [1-3]. Tomographic reconstruction geometries can be described by / = 0 andeither a fixed at any value with fl varying, or fl fixed at I r / 2 with a varying. Van Heel [4] has modified theaxes and directions of rotation so that the angles can be more easily visualised. In any case, the rotationmatrix is always orthogonal and unitary, i.e., its inverse is its transpose. In alignment of successive projections of a tilt series [5,6] or in angular reconstitution of projections[4,7-11], rotation matrices must be determined numerically by some sort of optimisation technique. Theproblem of determining angles per se is a nonlinear one, since trigonometric functions are used. Due to thelimited accuracy of representation of numbers in digital computers, one cannot guarantee that thecomputed matrix will be orthogonal and unitary, and an alternative form of representing rotations isindicated. Horn has introduced and written an excellent description [12] of the use of Hamiltons unit quaternions[13,14] to problems of absolute orientation in robotics and photogrammetry. In this letter, I point out howquaternions and Horns results may also be used advantageously in certain EM problems. 2. Quaternions - definitions and properties The Irish algebraist William Rowan Hamilton is generally credited with discovering quaternions in the 1840s [13,14]. He felt that they were as important a mathematical breakthrough as calculus, and applied them to hundreds of problems in mechanics, geometry, and spherical trigonometry. However, the algebra of quaternions was restricted to three dimensions and was eventually superseded by vector and tensor analyses. 0304-3991/90/$03.50 © 1990 - Elsevier Science Publishers B.V. (North-Holland)
  2. 2. 210 G. Harauz / Representation of rotations by unit quaternions A quaternion (denoted by the circle symbol) can be written in complex number notation ?t = qo + iq~ + j q y + k q : , (2)with a "real" part q0 and "imaginary" parts q~, qy, and qz- Scalars are purely real and vectors are purelyimaginary quaternions. The conjugate of a quaternion is 21* = qo - iqx - j q y - kq~, (3)and its magnitude is 2 "1 1 / 2 112t[I = { q~ + q2 + q2 + qz ) . (4)If we postulate that the possible products of the coefficients i, j, k are i 2 = j 2 = k 2 = _ 1, ij = k , j k = i,ki =j, j i = - k , k j = - i , and i k = - j , then the arithmetic product of 2 quaternions can be defined as: P?I = (Poqo - P ~ q ~ -Pyq~, - P z q z ) + i(Poq~ + P~qo + Pyq~ - Pzqy) + J ( P o q y - P ~ q ~ + Pyqo + P~q~) + k ( Poq~ + Pxqy - Pyqx + P~.qo). (5)Multiplication of quaternions is non-commutative, as can readily be verified. This was the first example ofa non-commutative algebra, a finding that excited Hamilton greatly in the last century [13]. The inner (dot)product of 2 quaternions is simply P" 4 = Poqo + P~q~ + Pyqv + P:qz. (6)A non-zero quaternion has an inverse 4 -1 = 4 * / ( 4 . 4 ) . (7) A quaternion ff can be expanded into orthogonal 4 × 4 matrices P and P: P~ Po -P~ P= Px Po -Py P = Py P~ Po , -P~ Po P~ (8) Pz -Py Px Po Py -Px PoIf ~b is purely imaginary, then P and P are skew symmetric, i.e., p X = _ O and ~ X = _ ~ . Products ofquaternions can then be written in matrix-vector notation as: /34 = P(~, (9) @ =>0- (10)3. Unit quaternions and rotations matrices A 3D position vector p = ( p x , Py, Pz) T can be represented as a purely imaginary quaternion /3 = ipx +joy + kpz. The rotation of vector p into p is commonly written: p = Flp, (11)where the rotation matrix /:/ can be defined as in eq. (1). Noting that neither the lengths of vectors norangles between them are changed by rotation leads to the next step. Unit quaternions (~- ~ = 1) can be
  3. 3. (7. Harauz / Representation of rotations by unit quaternions 211used to represent rotations if they are used to map a purely imaginary quaternion into another purelyimaginary quaternion such that inner products are preserved. This can be done as follows: p = ~p~* = ( Rp )r* = RT( Rp ) = (RTR)/~, (12)where R T and R are the 4 x 4 matrices corresponding to ~. Note that ro2 + r 2 - r 2 - r2 2( G r y - ror~) 2(rxr~ + ror.v ) RTR = 2(ry G + rorz) ro2 - r2 + ry2 - r2 2(ryr~ - rorx) (13) 2(rJx-rory) 2(r.ry+roG) ro2-r~-(f +r: 2 ]is orthogonal since *- ? = 1. So is the lower right-hand 3 × 3 submatrix, which is simply the rotation matrixof eq. (1). A succession of rotations Ra followed by R 2 corresponds simply to the product ~2~ of the associatedquaternions. Thus, quaternions are to three-dimensional rotations what complex numbers are to planar(two-dimensional) rotations.4. Quaternions and absolute orientation A problem of orientation that arises in many fields is to find the best rotation R that takes a set ofmeasured coordinates Pi, i = 1, 2, 3 . . . . . n, into another set of measured coordinates p. One way offormulating this optimisation problem is to find the rotation matrix R that maximises the sum of innerproducts: •p. (Rp,). (14) iIt is very difficult to find the nearest orthonormal matrix R but trivial to find the nearest unit quaternion~. Thus, the problem is reformulated as finding ~ that maximises E L " (~L ~* ). (15) iHorn [12] solves this problem and shows that expression (15) is equivalent to: ~TN?, (16)where the elements of the matrix N are the sums of products of the 2 sets of measured coordinates Sxx + S . + Szz s.- s. Szx- Sxz sxv- I Sy~ - S.y Sxx - Syy - Sz~ Sxy + Syx Szx + S~. J (17) N= " -&x+S.-Szz S,,: + Sx;- Gx + S= S. + -&x- + S:=where Sxx = EiP£iflxi, S x y = Y~iP;iPyi, etc. The unit quaternion ? that maximises expression (16) is the eigenvector corresponding to the mostpositive eigenvalue of N. This is readily found using almost any numerical analysis package (see, e.g., ref.[15]). The solution ? can be scaled to be of unit magnitude, and the rotation matrix is readily derived fromit using expression (13).
  4. 4. 212 G. Harauz / Representation of rotations by unit quaternions5. Applications in EM One way of determining the 3D structure of a macromolecular complex or organelle is to image it in theEM at a set of different angles by tilting the specimen stage. After digitisation, the projections in the tiltseries must be brought into register both rotationally and translationally before performing the reconstruc-tion. Moreover, the tilt angle reading of the goniometer is not precise and must be corrected. It is helpfulto use fiducial markers such as latex or colloidal gold spheres to assist in the alignment of projections (see,e.g., refs. [5,6]). (An alternative has also been described [16], however.) Generally, some sort of "least-squares" algorithm is used to do this although details are not usually published. I discuss the problem heresimply as one to which quaternions and Horns results can be readily applied. Let us say we have a tilt series of " m " projections imaged at nominal angles of 0j, j = 0, 1, 2 . . . . . m - 1.One angle is zero, say 00 = 0. Within each projection image (indexed by " j " ) lie " n " markers (indexed by" i " ) at measured positions in the 2D plane of (x u, yo) v. If we select the untilted micrograph as thereference, then translational alignment is achieved simply by determining the centroid of the n markers foreach image and shifting all images appropriately so that their centroids coincide. We now have theproblem of rotational alignment within the plane and tilt angle correction. One can assume initially that all of the spheres lie in one plane, i.e., on only one side of the support filmwhich sags negligibly. Thus z,0 = 0 for the untilted micrograph, and for tilted views this coordinate can beestimated to be: z o = x,j sin 0j. (18)We thus have the measured or estimated 3D coordinates pij = (x o, y,j, zij) T of n markers (i = 1 . . . . . n) atm tilt angles ( j = 0 . . . . . m - 1). Again, using the untilted projection as a reference, the problem can beformulated as finding the rotation matrix Ro~ such that Y, Ep,o" (Ro~Po) (19) i jis maximum. This is the same problem that Horn solved using unit quaternions [12]. Note that Roeconsists of the tilt component 0 and the in-plane rotational misalignment of cc ,lc°°o sin i)(i o Ro~ = ! sina cosc~ 0 cos0 sin0 o) - sin0 cos0 . (20)The two cannot be separated out without further knowledge or assumptions, but this step is not requiredto calculate the 3D reconstruction. Another subject of interest is the reconstruction of 3D macromolecular structures from two-dimensionalprojections of different particles (or constructed averages thereof) lying in different orientations on thespecimen support [1-3]. A number of workers have described "angular reconstitution" solutions to theproblem of determining the relative orientations between views [4,7-11]. These are all based on the factthat different projections share " c o m m o n lines" in Fourier space [4]. Van Dyck [11] presented an explicitformulation of angular reconstitution in terms of a system of equations involving the unknown Eulerangles and suggested a least-squares criterion for determining the best solution. Horns [12] method andsolution are applicable in this situation, also, especially when realising that the input projections are noisyand that consequently there is an uncertainty in determining the directions of shared common lines.
  5. 5. G. Harauz / Representation of rotations by unit quaternions 2136. Conclusions U n i t q u a t e r n i o n s are a n a l t e r n a t i v e w a y of r e p r e s e n t i n g 3 D r o t a t i o n s . A n u m e r i c a l l y c a l c u l a t e dq u a t e r n i o n c a n b e scaled to h a v e a m a g n i t u d e o f u n i t y . T h e n , a u n i t a r y a n d o r t h o g o n a l r o t a t i o n m a t r i x c a nb e d e r i v e d f r o m it. T h i s is a u s e f u l p r o p e r t y i n p r o b l e m s r e q u i r i n g the d e t e r m i n a t i o n of o p t i m a l relativeo r i e n t a t i o n s b e t w e e n sets of p o i n t s .Acknowledgements T h i s w o r k was s u p p o r t e d b y the N a t u r a l Sciences a n d E n g i n e e r i n g R e s e a r c h C o u n c i l of C a n a d a .References [1] G. Harauz and F.P. Ottensmeyer, Ultramicroscopy 12 (1984) 309. [2] G. Harauz and F.P. Ottensmeyer, Science 226 (1984) 936. [3] G. Harauz and M. van Heel, Optik 73 (1986) 146. [4] M. van Heel, Ultramicroscopy 21 (1987) 111. [5] D.E. Olins, A.L. Olins, H.A. Levy, R.C. Durfee, S.M. Margle, E.P. Tinnel and S.D Dover, Science 220 (1983) 498. [6] G. Harauz, L. Borland, G.F. Bahr, E. Zeitler and M. van Heel, Chromosoma 95 (1987) 366. [7] B.K. Vainshtein and A.B. Goncharov, Dokl. Akad. Nauk SSSR 287 (1986) 1131 (in Russian). [8] B.K. Vainshtein and A.B. Goncharov, in: Proc. l l t h Int. Congr. on Electron Microscopy, Kyoto, 1986, Eds. T. lmura, S. Maruse and T. Susuki (Japanese Society of Electron Microscopy, Tokyo, 1986) pp. 459-460. [9] A.B. Goncharov and M.S. Gelfand, Ultramicroscopy 25 (1988) 317.[10] M.S. Gelfand and A.B. Goncharov, Ultramicroscopy 27 (1989) 301.[11] D. van Dyck, Ultramicroscopy 30 (1989) 435.[12] B.K.P. Horn, J. Opt. Soc. Am. 4 (1987) 629.[13] E.T. Bell, The Development of Mathematics (McGraw-Hill, New York, 1945).[14] E.T. Bell, Men of Mathematics (Simon and Schuster, New York, 1937; 2nd printing 1962).[15] W.H. Press, B.P. Flannery, S. Teukolsky and W.T. Vetterling, Numerical Recipes (Cambridge University Press, Cambridge, 1988).[16] J. Dengler, Ultramicroscopy 30 (1989) 337.