perspective projection of a spheroid onto an image plane...perspective projection of a spheroid onto...

32
Perspective Projection Of A Spheroid Onto An Image Plane D. S. Wokes and Dr. P. L. Palmer [email protected] [email protected] Surrey Space Centre Guildford, Surrey GU2 7XH December 18, 2008 Abstract The perspective projection of a spheroid of known dimensions onto an image plane is derived. This paper first considers the projection of a 2-D ellipse projected onto an image line and then applies the results to the 3-D scenario. An elegant set of algebraic expressions for the ellipse parameters are derived in terms of the spheroid parameters, followed by a demonstration and discussion on their interpretation. In this paper we present a generalization of homogeneous coordinates that enables us to express the perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections of simple geometric objects and polygons onto planes is not a new topic and much literature has been gathered over the years for such scenarios. In [1] Coxeter starts by defining projective geometry before considering projections of triangles, quadrangles and 2D conics. In [2] Casey continues this study from a more analytical standpoint. Semple and Kneebone consider simpler projection models in [3] and Duda and Hart cover perspective transformations and invariants in [4]. Typically a simple type of projection is considered - the orthographic projection (see Millar and Maclin, [5]): given a coordinate system x, y, z and a ‘focal plane’ existing on x = f with normal vector (1, 0, 0), the orthographic projection onto this plane is defined as the mapping of all points (x, y, z ) to (f,y,z ). Essentially it is a mapping where all points in space are projected or collapsed vertically onto a focal plane - see figure (1). This approximation is suitable for some scenarios, where the depth of the object of interest is small in comparison to the object’s distance from the camera. However a typical pin-hole camera is more accurately described mathematically by a perspective projection where the focal plane is replaced by a focal point and the concept of an image plane at 1

Upload: others

Post on 31-Mar-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

Perspective Projection Of A Spheroid Onto An ImagePlane

D. S. Wokes and Dr. P. L. [email protected] [email protected]

Surrey Space Centre

Guildford, Surrey

GU2 7XH

December 18, 2008

Abstract

The perspective projection of a spheroid of known dimensions onto an image planeis derived. This paper first considers the projection of a 2-D ellipse projected onto animage line and then applies the results to the 3-D scenario. An elegant set of algebraicexpressions for the ellipse parameters are derived in terms of the spheroid parameters,followed by a demonstration and discussion on their interpretation. In this paper wepresent a generalization of homogeneous coordinates that enables us to express theperspective projection of a spheroid onto an image plane in a more readily accessibleway.

1 Introduction

The projections of simple geometric objects and polygons onto planes is not a new topic andmuch literature has been gathered over the years for such scenarios. In [1] Coxeter startsby defining projective geometry before considering projections of triangles, quadrangles and2D conics. In [2] Casey continues this study from a more analytical standpoint. Semple andKneebone consider simpler projection models in [3] and Duda and Hart cover perspectivetransformations and invariants in [4]. Typically a simple type of projection is considered -the orthographic projection (see Millar and Maclin, [5]): given a coordinate system x, y, zand a ‘focal plane’ existing on x = f with normal vector (1, 0, 0), the orthographic projectiononto this plane is defined as the mapping of all points (x, y, z) to (f, y, z). Essentially it is amapping where all points in space are projected or collapsed vertically onto a focal plane -see figure (1).

This approximation is suitable for some scenarios, where the depth of the object ofinterest is small in comparison to the object’s distance from the camera. However a typicalpin-hole camera is more accurately described mathematically by a perspective projectionwhere the focal plane is replaced by a focal point and the concept of an image plane at

1

Page 2: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

1 INTRODUCTION 2

x = f is used: all points (x, y, z) are projected towards this focal point. In this paper thefocal point is positioned at the origin of a camera coordinate system. The intersection ofthese projections onto the image plane gives the captured picture. The camera frame andperspective projection is illustrated in figure (1).

There are many applications which use (or would like to use) the projections and re-constructions of these objects or geometric representations, for example in medical imagingJaggi, Karl and Willsky [6] explain the desire to reconstruct an n-dimensional dynamicallyevolving ellipsoid in order to process myocardial perfusion images; the ejection fraction (thefraction of blood pumped out of a ventricle with each heart beat) is estimated by treatingthe ventricle as an ellipsoid and finding its size based on a collection of 2D images. Be-cause of a current gap in a clear reconstruction analysis Jaggi et al. assume that the imagesfound are aligned with the ellipsoid axes and hence introduce distortions in the ventriclemodel. In robotics Roberts [7] describes methods for reconstructing planar-surfaced objectsfrom their perspective projections which provides a valuable starting point for future objectdetection systems but has not developed the theory to further objects such as conics. Inmotion planning Poignet et al. and Liu et al. ([8],[9]) describe how ellipsoids are oftenused to describe an object’s positional error in order to calculate collision risk. From itsprojection an ellipsoid can only be reconstructed up to a single parameter however modelingthe target’s error in position with a spheroid yields unique solutions which could then meanfaster image processing and collision risk analysis. Similarly in ray tracing Bouville describeshow modeling an object as a conic lends faster calculation times to image rendering basedon their projections and an analytic algorithm would be more efficient still [10].

Because the mathematical construct of a perspective projection is much more compli-cated (as described by Zisserman and Mundy in [11]) this approach is typically avoidedand estimations are settled with. Further approximative descriptions and methods are de-scribed by Horaud et al. in [12] with varying levels of accuracy. Two examples of thesealternative projections are the strong-perspective and weak-perspective projection modelswhich combine both the orthographic and the perspective projection to give a more accurateapproximation of the perspective projection than the orthographic projection (described byOsterman et al. in [13]).

There exist analytic and numerical methods for true perspective projections of certaingeometric objects, however no literature exists for a spheroid. A spheroid is defined as adegenerate ellipsoid: there exists an axis of symmetry for the spheroid. In [14] Eberly givesa most elegant method for finding the numerical perspective projection of an ellipsoid: bymaintaining the quadratic form of the ellipsoid Eberly uses a combination of geometric andalgebraic arguments to quickly determine the ellipsoid projection. This approach, however,does not give a simplified description of the resulting ellipse as a function of the ellipsoidparameters. It is therefore difficult to gain a geometric understanding of the projection andhow it is dependent upon the parameters of the ellipsoid. Traditionally, the perspectiveprojection of geometric objects has been treated using homogeneous coordinates [15]. Thisapproach introduces another dimension to the problem and the reduction of dimensionalityto real coordinates is achieved by considering ratios of homogeneous coordinates (see Wylie[15], Springer [16] and Semple & Kneebone [17]). The projection of an ellipsoid or spheroidproceeds through a series of stages. First define a polar plane which is then projected ontothe image plane. The intersection of the polar plane and the ellipsoid determines a set of

Page 3: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

1 INTRODUCTION 3

0 5 10 15 20

−2

0

2

4

6

8

10

12

x − focal axis

y

Figure 1: Illustrating the difference between perspective (focal point) and orthographic (focalplane) projections, referenced in the camera frame.

points which project onto the image ellipse. Hence it is possible, to relate the parameters ofthe image ellipse to those of the ellipsoid.

In our analysis we consider the perspective projection of a spheroid. We derive an al-ternative way of relating the spheroid parameters to those of its image ellipse, which avoidsdefining the polar plane. The complexity of this algorithm is comparable to that using ho-mogeneous coordinates, and provides a simple geometric understanding. A key aspect of thisapproach is that we show there exists a generalization of homogeneous coordinates in a higherdimensional space where a single point represents a complete spheroid. These generalizedhomogeneous coordinates then directly relate the spheroid and image ellipse parameters.

This paper derives analytically the perspective projection of a spheroid onto an imageplane by utilizing it’s symmetry and geometric properties. The process for doing this startswith a lower dimensional equivalent problem of the projection of an ellipse onto a line. Insection (3) results of the 2D projection are examined and the perspective distortions arehighlighted. Section (4) defines the frames and structure of the problem before calculatingthe intersection of a spheroid with a plane. This intersection is an ellipse and it is this resultalong with those gained in section (2) that enables us to reach an algebraic description of theprojected spheroid onto the image plane (described in section (5)). Then section (6) looksto reduce these equations to a simpler and more understandable set of expressions. Resultsand examples of the derived expressions are shown in section (7) which are then discussedin section (8).

Page 4: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

2 PERSPECTIVE PROJECTION OF AN ELLIPSE ONTO A LINE 4

2 Perspective Projection of an Ellipse onto a Line

The lower dimensional scenario of the perspective projection of an ellipse onto an imageline is considered. This has specific applications alone (for example in analyzing CT scansTheodorou et al. ([18]) describe arteriovenous malformations as a prism made of adjacentslices with elliptical shapes) however the results are also used in finding the perspectiveprojection of a spheroid, as seen later on.

In a coordinate system with the origin placed at the centre of an ellipse and with axesoriented with the principal axes of that ellipse, that ellipse is defined (see Casey, [2]) as theset of points (ξ,η) ε R2 satisfying

ξ2

a2+

η2

b2= 1 (1)

for fixed, positive, real values a and b. The semi-major axis is then defined as a and thesemi-minor axis as b. The ellipse can then be rotated by θ and its centre translated to (xc,yc).This then describes an ellipse in the camera frame with semi-major axis a, semi-minor axisb, orientation θ with respect to the x-axis and centre (xc,yc), where the camera frame has itsorigin centred on the focal point of the projection and its x-axis aligned with the focal axis.

We state the equivalent lower-dimensional scenario: Given an ellipse on the x-y plane withknown centre (xc, yc), orientation θ and Semi-axes a and b, how is the ellipse perspectivelyprojected towards the origin onto the line x = 1?

By fixing the ‘image line’ to be at a unit distance we effectively normalise the distancesof this 2D scenario. Any scaling of the target size and distance from the origin is nowcontrolled through the image line distance. See figure (2) for a diagrammatic representationof the problem.

The projection of the ellipse onto the image line is given by a chord on the y-axis. Thischord is defined by its maximum and minimum values m+ and m−. The two lines y = m+xand y = m−x will touch the ellipse once, lying tangent to the edge.

Consider the ellipse frame and define new axes (ξ, η) as shown in figure (2).The two coordinate frames are related by the following equations:

x− xc = ξ cos θ − η sin θy − yc = ξ sin θ + η cos θ

(2)

We can now re-write the equations for the bounding line in terms of the new coordinates:

ξ(sin θ −m± cos θ) + η(cos θ + m± sin θ) + (yc −m±xc) = 0 (3)

where m± denotes either m+ or m−. Now consider the ellipse alone. Any point on theellipse satisfies equation (1) and we can parameterise the ellipse using a parameter t, suchthat

ξ = a cos t η = b sin t (4)

When we express just one power of ξ and η in equation (1) in terms of the new parameterwe come to:

ξb cos t + ηa sin t− ab = 0 (5)

Page 5: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

3 ELLIPSE PERSPECTIVE PROJECTION RESULTS 5

Figure 2: Illustrating the configuration for an ellipse projection onto the line x = 1 and theellipse axes.

This is an equation for a line which is tangent to the ellipse at the point t. Thereforeif we wish the gradient line given by (3) to be this same line (and therefore the boundingline, as it passes through the origin and is tangent to the ellipse), then for some given t + t′

equations (3) and (5) are the same for all ξ and η, up to a scalar multiple. To remove thescalar ambiguity we divide the coefficients to obtain

b cos t′

sin θ −m± cos θ=

a sin t′

cos θ + m± sin θ=

ab

m±xc − yc

(6)

These equations can be re-arranged to eliminate t′:

(m±xc − yc)2 = a2(sin θ −m± cos θ)2 + b2(cos θ + m± sin θ)2 (7)

Solving for m± in terms of the ellipse parameters obtains:

m± =2xcyc − (a2 − b2) sin 2θ ± 2

√∆

2x2c − (a2 + b2)− (a2 − b2) cos 2θ

(8)

where

∆ + 1

2(x2

c + y2c )(a

2 + b2)− 1

2(x2

c − y2c )(a

2 − b2) cos 2θ − xcyc(a2 − b2) sin 2θ − a2b2 (9)

This equation we will later refer to as the 2D m± function.

3 Ellipse Perspective Projection Results

The perspective projection of an ellipse onto an image line is relatively straightforward tocalculate and to visualize. However subtleties exist in the 3D spheroid projection which

Page 6: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

3 ELLIPSE PERSPECTIVE PROJECTION RESULTS 6

is best visualized by considering the 2D equivalent scenario. In particular the effect ofperspective stretching can be seen for the lower dimensional case as illustrated here.

Figure (3) shows a typical perspective projection of an ellipse onto the image line. Inthis scenario yc = 0 so that the ellipse lies on the focal axis. One might expect that the twobounding lines given by m+ and m− would then be symmetric about the x axis. However,figure (3) illustrates that in general this is not the case: the points which lie on the inter-section of the ellipse and the bounding lines are not symmetrically placed about the ellipsecentre - this is a result of the perspective projection. As such the only time this is true iswhen θ = 0◦ or 90◦.

2 4 6 8 10 12−6

−5

−4

−3

−2

−1

0

1

2

3

4

x − focal axis

y

Figure 3: Single projection of an ellipse onto the image line: a = 4, b = 2, xc = 10, yc = 0,θ = 20◦

If we fix the ellipse size and centre position but then rotate the ellipse around we can seehow this shift in the line projection moves by considering the average of m+ and m−. Thevariation with respect to θ is shown in figure (4).

Figure (5) looks at the same system: a fixed centre of xc = 5, yc = 0, with a = 4and b = 2 and changing θ. In this graph the specific curves of m+ and m− are drawnagainst θ. The non-symmetric behaviour induced by the perspective projection lessens withby increasing xc; as xc increases the perspective projection tends towards the orthographicprojection. However note that we still have yc = 0. If we consider a scenario with yc 6= 0(figures (6) and (7)) a similar appearance to the curves in figure (5) is found, again due tothe perspective nature of the projection. As expected and clarified in figure (6) these twocurves are bounded by the m± values which would be given for circles of radii a and b.

Page 7: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

4 INTERSECTION OF A SPHEROID WITH A PLANE 7

0 20 40 60 80 100 120 140 160 180−0.08

−0.06

−0.04

−0.02

0

0.02

0.04

0.06

0.08

theta in degrees

(m++

m−)

/ 2 −

bis

ectin

g lin

e of

the

Imag

e Li

ne

Figure 4: Demonstrating the variation in the centre of the projection of an ellipse onto theimage line: a = 4, b = 2, xc = 10, yc = 0

4 Intersection of a Spheroid with a Plane

The goal of this section is to find the intersecting curve of the spheroid with a plane thatcontains the point XD and has normal vector n, as shown in figure (8). The projection of aspheroid can be calculated by finding the intersection of a spheroid with a plane, projectingthat curve onto a line l and then rotating the plane about a vector orthogonal to that lineto sweep out R3. That vector is the focal axis of the camera frame and the image plane isdescribed by the plane swept out by the line l. The initial stage is deriving the intersectionbetween a spheroid and a plane, which we now derive.

In a coordinate system with the origin placed at the centre of a spheroid and with axesoriented along that spheroid’s principal axes, then that spheroid is defined (see Tietze, [19])as the set of points (u,v,w) ε R3 satisfying

u2

A2+

v2

B2+

w2

B2= 1 (10)

for fixed, positive values A and B. The axis of symmetry has half-length A and the other twoaxes have half-lengths B. If A > B and the semi-major axis is along the axis of symmetrythen the spheroid is said to be prolate. Conversely if B > A then the spheroid is said to beoblate. The spheroid can then be rotated so that the axis of symmetry points in a directionp and its centre translated by a vector q.

Create a spheroid whose half-length along the axis of symmetry is A and half-lengthalong the other axes B, to be centred at the origin of a (u, v, w) coordinate system, with theaxis of symmetry pointing along the u-axis. We refer to this frame as the spheroid frame.Define n to be a unit vector and a general point u = (u, v, w).

Page 8: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

4 INTERSECTION OF A SPHEROID WITH A PLANE 8

0 20 40 60 80 100 120 140 160 180−1.5

−1

−0.5

0

0.5

1

1.5

theta in degrees

m+ in

bla

ck, m

− in

gre

y

Variation in m+/−

: xc = 5 , y

c = 0

Figure 5: Demonstrating the perspective effect on the bounding lines for an ellipse on thefocal axis - a = 4, b = 2, xc = 5.

Theorem 4.1. For a given n the maximum value ρ = ρmax for which an intersection existsbetween the spheroid and a plane described by n.u = ρ is given by

ρmax =√

B2 + (A2 −B2)n12 (11)

Proof. First, parameterize the spheroid with s and t such that

u = A cos sv = B sin s cos tw = B sin s sin t

(12)

For any given s and t, the normal vector n to the surface of the spheroid at this pointcan be found simply by taking the grad of the surface function:

F =u2

A2+

v2

B2+

w2

B2(13a)

∴ ∇F = 2( u

A2,

v

B2,

w

B2

)(13b)

∴ n =1√

B2 cos2 s + A2 sin2 s

B cos sA sin s cos tA sin s sin t

(13c)

We can re-arrange these to express s and t in terms of the components of n = (n1, n2, n3).Then, to find ρmax the equation for the plane n.u = ρ is expanded, where u(s(n), t(n)) is apoint on the spheroid. The resulting simplified expression is

ρmax =√

B2 + (A2 −B2)n12 . (14)

Page 9: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

4 INTERSECTION OF A SPHEROID WITH A PLANE 9

0 5 10 15 200

2

4

6

8

10

12

14

16

18

x − focal axis

y

Figure 6: Spinning the ellipse around its centre will give m+ and m− a range of valuesbetween that for a projected circle of radius a = 4 and of radius b = 2 in the same position -xc = 20, yc = 15.

We now introduce a point XD which represents the focal point in the spheroid frame.Define the focal axis as a line passing through XD with direction e. Redefine the vectorn = (n1, n2, n3) to be orthogonal to e and a final base vector f + e ∧ n to complete theorthogonal set. Then for some ρ,

n · e = 0 (15a)

n ·XD = ρ (15b)

The equation of the spheroid is given by

uT Λ−2u = 1 , (16)

where

Λ +

A 0 00 B 00 0 B

(17)

and the intersecting curve is described by u, where u satisfies both equations (16) and

n · u = ρ . (18)

To find u consider stretched axes such that Y = Λ−1u. We end up with a new expression

Page 10: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

4 INTERSECTION OF A SPHEROID WITH A PLANE 10

0 20 40 60 80 100 120 140 160 1800.5

0.6

0.7

0.8

0.9

1

1.1

1.2

thetadeg

m+ in

bla

ck, m

− in

gre

y

Variation in m+/−

: a = 4 , b = 2 , xc = 20 , y

c = 15

Figure 7: Demonstrating the perspective effect on the bounding lines for an ellipse off thefocal axis - a = 4, b = 2, xc = 20, yc = 15. The vertical lines highlight the difference in θbetween maximum and minimum values of m+ and m−

for the plane:

n′ · Y = ρ′ , (19a)

where n′ =1

ρmax

(An1, Bn2, Bn3) , (19b)

ρ′ =1

ρmax

ρ . (19c)

In this frame, the spheroid becomes a unit sphere, thus the intersection is a circle withradius l =

√1− ρ′2. The variable ρmax is a key parameter. If ρ is greater than ρmax then

ρ′ > 1 and l is complex. This concurs with equation (14). We can parameterize the circleeasily and describe the intersecting curve:

Y = ρ′n′ + (l cos ν)c + (l sin ν)d (20)

In this stretched frame c and d are defined simply as two vectors making up an orthogonalbase with n′. The rotational freedom about n′ which c and d have are superfluous when werevert back to the un-stretched frame:

u =ρ√ρmax

( A2n1 , B2n2 , B2n3 ) + Λ[ (l cos ν)c + (l sin ν)d ] (21)

After a little manipulation we can re-write the above equation in terms of the known

Page 11: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

4 INTERSECTION OF A SPHEROID WITH A PLANE 11

Figure 8: Intersection of a plane with a spheroid.

vectors e and f . If we define β + A2n12 + B2n3

2, then

u = Υ + σe + ηf , (22a)

where Υ + ρ

ρmax2

A2n1

B2n2

B2n3

, (22b)

σ + B√

ρmax2 − ρ2

ρmax2√

β

(Af2ρmax cos ν + (A2n1f3 −B2n3f1) sin ν

)(22c)

η + B√

ρmax2 − ρ2

ρmax2√

β

(− Ae2ρmax cos ν + (−A2e3n1 + B2e1n3) sin ν

). (22d)

The equation for u describes the intersect curve in the spheroid’s coordinates. Thisintersection is an ellipse, the centre of which is given by Υ. This can be seen more explicitlywhen one calculates the radial distance ζ(ν) from Υ to a point on this curve, to find

ζ(ν)2 =B2(ρ2

max − ρ2)

ρ4maxβ

(1

2Γ0 +

1

2Γ1 cos 2ν − AρmaxΓ2 sin 2ν

), (23)

where

Γ0 + β(A2 + ρ2max) (24a)

Γ1 + (A2 −B2)(β(1− n12)− 2n1

2n22A2) (24b)

Γ2 + (A2 −B2)n1n2n3 . (24c)

Page 12: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

5 PERSPECTIVE PROJECTION OF A SPHEROID ONTO A PLANE 12

We differentiate the parameterized distance of the curve from this point with respect tothe parameter to find the semi-major axis aint and semi-minor axis bint of the intersectingellipse. The orientation of the ellipse ωint is defined as the angle of the semi-major axis awayfrom e. It can be shown that the intersecting ellipse values are given by:

aint =AB

ρmax2

√ρmax

2 − ρ2 (25a)

bint =B

ρmax

√ρmax

2 − ρ2 (25b)

tan ωint =f1

e1

(25c)

It is clear why ρ must be less than ρmax in order for there to be real solutions to aint andbint; if ρ is greater than ρmax, there is no intersection of the plane with the spheroid.

5 Perspective Projection of a Spheroid onto a Plane

The image plane is defined with an orthonormal vector as the focal axis of the camerasystem and a focal length f - the perpendicular distance from the origin (the focal lengththen determines the magnification of the captured image). When considering the x axis tobe the focal axis and x > 0 to be the direction the camera is looking, a pin-hole camera hasits image plane behind the focal point. By symmetry we can move the image plane in frontof the focal point to obtain a more understandable correlation between the object and itsprojection.

In this section we derive the governing equations for the projection of the spheroid ontothe image plane. Our goal is to find these expressions in the camera frame: The cameraframe is defined relative to the spheroid frame as centred at the point XD, with the firstbase vector e which points along the focal axis. The other two axes are defined simply asbeing orthogonal to e: Later this rotational freedom is removed. The image plane is set ata dimensionless distance 1 from the focal point (the origin in the camera frame).

From section (4) the procedure now is to change the position of the origin to XD andredescribe the centre of the intersecting ellipse in the camera frame as (xint, yint). What wethen have is a plane (given by it’s normal vector n) containing the origin and the vector ewhich acts as a new x-axis. On this plane lies an ellipse whose semi-major axis is given byaint, semi-minor axis given by bint, centre (xint, yint) and orientation ωint. We can then usethe results found in section (2) to project this ellipse onto the line x = 1 (in this new frame)and recover two gradient values m±. Figure (9) shows this method in diagrammatic form.

The centre of the intersecting ellipse has coordinates Υ − XD in the camera frame. Wechoose a new set of orthogonal base-vectors ( e , n , f ) relative to the spheroid frame. Inthis intermediate coordinate system the centre of the ellipse has coordinates ( λ1 , λ2 , λ3 ),

Page 13: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

5 PERSPECTIVE PROJECTION OF A SPHEROID ONTO A PLANE 13

Figure 9: Working the 2D solution into the 3D method.

where

λ1 =ρ

ρmax2(B2(e · n)− (A2 −B2)e1n1) − e ·XD (26a)

λ2 = 0 (26b)

λ3 =ρ

ρmax2(A2 −B2)n1f1 − f ·XD (26c)

(As expected the second component equals zero as the ellipse lies on this plane.) We alsoneed to find expressions for cos 2ωint and sin 2ωint as this is the form they take in the 2D m±function (8). From equation (25), we can obtain a number of useful expressions:

sin 2ωint =2e1f1

e12 + f1

2 (27a)

cos 2ωint =e1

2 − f12

e12 + f1

2 (27b)

aint2 + bint

2 =B2

ρmax4(ρmax

2 − ρ2)(A2 + ρmax2) (27c)

aint2 − bint

2 =B2

ρmax4(ρmax

2 − ρ2)(A2 − ρmax2) (27d)

aint2bint

2 =A2B4

ρmax6(ρmax

2 − ρ2)2 (27e)

We now have all the required elements to substitute into equation (8), which can be

Page 14: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

5 PERSPECTIVE PROJECTION OF A SPHEROID ONTO A PLANE 14

reduced to the following:

m± =C1 ± C2

D1

(28)

where, writing XD = (xd, yd, zd),

C1 =− e1f1B2(A2 −B2) + B2(e ·XD)(f ·XD)− (A2 −B2)(e ∧XD)1(e ∧XD)1 (29)

C2 =B√

ρmax2 − ρ2

√B2(xd

2 − A2) + A2(yd2 + zd

2) (30)

D1 =B2(XD

2 − (f ·XD)2)−B2

(A2 − (A2 −B2)f1

2)

+ (A2 −B2)(f ∧XD)12 (31)

We now formally define the camera frame: Define a new set of base vectors to be thecamera frame axes relative to the spheroid frame as (e, i1, i2): This can be described as arotation of the base vectors (e, n, f) around e by an angle γ:

i2 = e ∧ i1n = i1 cos γ − i2 sin γγ ε [0, π)

(32)

Let Rγ be defined as the rotation matrix mapping (e, n, f) around e to (e, i1, i2). Thendefine another rotation matrix R such that

R : (e, i1, i2) → (u, v, w) , (33)

(where (u, v, w) were the original axes co-aligned with the spheroid’s principal axes). Notethat γ need only range from 0 to π, as m is not +ve definite. We choose R such that thefirst rotation is around the i2 axis by an amount θ (defined in the negative sense), the secondrotation is around the ‘new’ i1 axis by an amount φ (also defined in the negative sense) andthe final rotation is around the u-axis by an amount ψ - which has no effect, as the spheroidis symmetric around this axis. Thus we only need to consider two angles. The rotationmatrix R relating the camera frame to the spheroid frame is hence given by

cos θ cos φ − sin θ cos φ sin φcos θ sin φ sin ψ + sin θ cos ψ − sin θ sin φ sin ψ + cos θ cos ψ − cos φ sin ψ− cos θ sin φ cos ψ + sin θ sin ψ sin θ sin φ cos ψ + cos θ sin ψ cos φ cos ψ

(34)

Note that p, the vector pointing along the symmetric axis of the spheroid, is describedin the camera frame by pi = R(1, i). We also define q to be the position of the centre of thespheroid in the camera frame. This along with p is an important pairing for definitions:

p =

p1

p2

p3

=

cos θ cos φ− sin θ cos φ

sin φ

(35a)

q =

q1

q2

q3

= −RT XD (35b)

p · p = 1 (35c)

where r2 + q · q (35d)

Page 15: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

5 PERSPECTIVE PROJECTION OF A SPHEROID ONTO A PLANE 15

We apply this 3-2-1 rotation matrix in (34) along with the γ rotation matrix describedby equation (32) to the elements in C1, C2 and D1 (described in (28)), to write e, n and f interms of p, q and γ. The process described leaves us with an origin and set of base vectors(e, i1, i2) which complete the camera frame. In this frame the first base-vector is the focalaxis and for each angle γ (γ ε [0, π)) measured from i2 towards i1 we have two functionsm+(γ) and m−(γ). These functions can be described as:

m(γ)± =δ4 cos γ + δ5 sin γ ±√δ9

√δ6 + δ7 cos 2γ + δ8 sin 2γ

δ1 + δ2 cos 2γ + δ3 sin 2γ(36)

δi = δi(A,B, q, p) , i = {1, . . . , 9}. (37)

We later refer to equation (37) as the ‘m-function’. The expressions in (37) are writtenin full below:

δ1 =1

2A2q1

2 +1

2B2r2 − 1

2B2(A2 + B2) + (A2 −B2)

[1

2p1

2(r2 −B2)− (q · p)q1p1

](38)

δ2 =1

2B2(q2

2 − q32 − (A2 −B2)(p2

2 − p32)) +

1

2(A2 −B2)

[(q ∧ p)3

2 − (q ∧ p)22]

(39)

δ3 = −B2(q2q3 − (A2 −B2)p2p3) + (A2 −B2)(q ∧ p)2(q ∧ p)3 (40)

δ4 = B2(q1q3 − (A2 −B2)p1p3)− (A2 −B2)(q ∧ p)1(q ∧ p)3 (41)

δ5 = B2(q1q2 − (A2 −B2)p1p2)− (A2 −B2)(q ∧ p)1(q ∧ p)2 (42)

δ6 = −1

2

[q2

2 + q32 − (A2 −B2)(p2

2 + p32)

](43)

δ7 = −1

2

[q2

2 − q32 − (A2 −B2)(p2

2 − p32)

](44)

δ8 = q2q3 − (A2 −B2)p2p3 (45)

δ9 = B2[A2r2 − A2B2 − (A2 −B2)(p · q)2

](46)

The above equations will later be referred to as the δ-equations.These two m-functions describe the gradients of the bounding lines of the ellipse on the

rotating plane. This ellipse is the intersection of the spheroid with the rotating plane. Figure(10) attempts to illustrate this more clearly.

If we now pan over all the values of γ we collect a set of bounding gradients for all thecut-through’s of the spheroid (the gradient lines touching the spheroid along the extremalcontour). As we defined the image plane to be a distance 1 along the focal axis, the gradientvalues are equivalent to bounding points on the image plane. These bounding points describe

Page 16: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

6 ELLIPSE PARAMETERS OF A PERSPECTIVE PROJECTED SPHEROID 16

Figure 10: The spheroid projection is calculated by finding the intersection of the spheroidwith a rotating plane that contains the origin and the focal axis. This intersection is anellipse which can then be projected towards the origin. The ellipse projection is defined byan m function derived in section (2).

the occluding contour on the projection plane - the outline of the perspective projection ofthe spheroid.

In the next section we create another m-function, created by expressing an ellipse on theimage plane in terms of m and γ. This second m-function is identical in construct to thefirst, thus we can deduce that the m-function derived in this section is that of an ellipse.More explicitly, the outline of the perspective projection of the spheroid is an ellipse.

6 Ellipse Parameters of a Perspective Projected Spheroid

This section approaches the perspective projection problem from the opposite end: Theimage plane ellipse. In order to make a connection between the spheroid projection andthe image plane ellipse we must first describe them with the same parameters: γ and m.Proceeding that we will then develop these connections to finally obtain a set of simplifiedexpressions of the ellipse parameters in terms of the spheroid pose.

Define the camera frame to have axes (x, y, z) so that the focal axis points along thex-axis and the m-equation given in (36) is valid. Define the image plane frame to be{v : v.(1, 0, 0) = 1}. We choose the image plane frame to be co-aligned with the cameraframe with centre (1, 0, 0) relative to the camera frame, but with just two components (z,y)again aligned with the z and y axes of the camera frame. Thus the focal x-axis passesthrough the image plane frame at (0,0).

Page 17: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

6 ELLIPSE PARAMETERS OF A PERSPECTIVE PROJECTED SPHEROID 17

Before we approach the final stage of this projection analysis, we define a new variable:

α = B2 + (A2 −B2)p12 (47)

The significance of this variable will be seen later, but observe α’s physical properties first:Recall the equation of ρmax(n) from theorem (4.1). Replacing n with p (and exercising theunit length property) ρmax(p) = α. As theorem (4.1) is considering a spheroid with its axisof symmetry along the first / focal axis, then by replacing n with p this quantity is thesquare distance from the centre of the spheroid to the furthest (or nearest) extremity of thespheroid in the focal / x direction. This is shown in figure (11).

Figure 11: Physical interpretation of α.

Therefore should this value become greater than q12, the spheroid is intruding on the

negative domain of the focal axis and may result in a hyperbolic projection onto the imageplane. Should the value equal q1

2 the spheroid is touching the y − z plane in the cameraframe, which will result in a parabolic projection onto the image plane.

Now let us consider an image plane ellipse. We describe the image plane ellipse in asimilar construct to (36); in terms of an m± function. Define the image plane ellipse tohave centre (Zc,Yc) (in the image plane frame), semi-major axis a, semi-minor axis b andorientation ω from the z-axis. This is shown in figure (12).

We find the intersecting points of the ellipse in much the same way that we found thecut-through on the spheroid; by changing the frame to match that of the ellipse. The exactmethod employed involves stretching the coordinate axes so that the ellipse is a circle whichmakes finding the intersect points far easier. We then stretch back to find the intersects fora general angle γ. In the original image plane frame these points are exactly the desired m±values. The expression is the same format as the projected spheroid (equation (36)).

Theorem 6.1. The equivalent m-function describing an ellipse in terms of an angle γ fromthe image plane z-axis and a distance m± away from the origin, is given by:

m(γ)± =ε4 cos γ + ε5 sin γ ± ε9

√ε6 + ε7 cos 2γ + ε8 sin 2γ

ε1 + ε2 cos 2γ + ε3 sin 2γ(48)

εi = εi(a, b, Zc, Yc, ω) , i = {1, . . . , 8} (49)

Page 18: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

6 ELLIPSE PARAMETERS OF A PERSPECTIVE PROJECTED SPHEROID 18

Figure 12: An ellipse on the image plane.

Proof. Define four frames which will be useful for this derivation:

Si The image plane frame.

Sγ The frame centred at the image plane origin, but rotated around the focal axis by anamount γ. The y and z axes are then co-aligned with the n and f vectors defined insection (5).

SE The frame centred on (Zc,Yc) oriented with the semi-major and minor axes of the imageplane ellipse.

SE∗ The frame centred at the image plane origin with axes oriented to match SE.

In the Si frame the base vectors for Sγ are given by f and n:

f =

(cos γsin γ

)(50a)

n =

( − sin γcos γ

)(50b)

There are two rotation matrices to consider:

Rγ : Si → Sγ ⇒ Rγ =

(cos γ sin γ− sin γ cos γ

)(51)

Rω : Si → SE∗ ⇒ Rω =

(cos ω sin ω− sin ω cos ω

)(52)

Using these matrices and definitions, the image plane origin in SE is given by

xE = −(

Zc cos ω + Yc sin ω−Zc sin ω + Yc cos ω

)(53)

Page 19: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

6 ELLIPSE PARAMETERS OF A PERSPECTIVE PROJECTED SPHEROID 19

We can also describe the vectors f and n in SE in a similar way. Staying in SE the ellipseis described by:

xT Λx = 1, (54)

where

Λ =

(a 00 b

)(55)

In a similar vein to the spheroid-plane intersection, we stretch the axes so that the ellipsebecomes a circle:

x′ + Λ−1x (56)

When we consider the intersecting points of the circle with the sheered f vector, this cannow be expressed as

n′E · x′ = ρ′ (57a)

n′E =1

|ΛnE|ΛnE (57b)

ρ′ =1

|ΛnE|ρ (57c)

nE = Rωn (57d)

Now the intersecting points are easy to find. We now make the necessary transformationsback until we return to the frame Si. The intersecting points are given by the equation

X int =

(Zint

Yint

)

=

(Zc

Yc

)+

((n · xE)RT

ωΛ2Rωn± ab√|ΛnE|2 − (n · xE)2f

)|ΛnE|−2 (58)

(where xE + −Rω

(ZcY c

)). Once we’ve reached this stage one more transformation is

required, from Si to Sγ: in this frame, the n component will be zero and the other componentis the m function. Through straightforward expanding and simplifying we eventually reachthe desired function given in equation (48). The ε functions are given below.

ε1 = (a2 + b2) (59)

ε2 = −(a2 − b2) cos 2ω (60)

ε3 = −(a2 − b2)sin2ω (61)

ε4 = −(a2 − b2)(Zc cos 2ω + Yc sin 2ω) + (a2 + b2)Zc (62)

ε5 = −(a2 − b2)(Zc sin 2ω − Yc cos 2ω) + (a2 + b2)Yc (63)

Page 20: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

6 ELLIPSE PARAMETERS OF A PERSPECTIVE PROJECTED SPHEROID 20

ε6 =1

2(a2 + b2) − 1

2(Z2

c + Y 2c ) (64)

ε7 = −1

2cos 2ω +

1

2(Z2

c − Y 2c ) (65)

ε8 = −1

2(a2 − b2) sin 2ω + ZcYc (66)

ε9 = (2ab)2 (67)

The above equations will later be referred to as the ε-equations.Perhaps the most important relation in both the projective and reconstructive aspect of

this construct is the corollary that now follows.

Corollary 6.1. Inverse Equivalence

δ1

ε1

=δ2

ε2

=δ3

ε3

=δ4

ε4

=δ5

ε5

(68)

δ6

ε6

=δ7

ε7

=δ8

ε8

=

(δ1

ε1

)2ε9

δ9

(69)

Proof. The main proof is contained in appendix A, however the basic outline is described:Starting at the relation m+/−,δ = m+/−,ε, by considering the sum and difference that thesetwo equations yield we remove the +/− ambiguity. Then multiply up the fractions and re-write the trigonometric functions as cos / sin nγ which gives an orthogonal basis in γ. Usingthis fact gives us a set of equations which can be described in matrix format:

−12ε4 −1

2ε5 ε1 + 1

2ε2

12ε3

−52ε5 −7

2ε4

72ε3 ε1 + 5

2ε2

ε5 ε4 −ε3 −ε2

−ε4 ε5 ε2 −ε3

δ2

δ3

δ4

δ5

=

ε4

ε5

00

δ1 (70)

and likewise for the ‘difference’ equation. After inverting and simplifying the resulting equa-tions the expressions in equation (68) fall out.

We now consider a change in variables. We can describe the image plane ellipse as aquadratic in two variables y and z:

A1z2 + A2zy + A3y

2 + A4z + A5y + A6 = 0 (71)

where

A1 =1

2(a2 + b2) − 1

2(a2 − b2) cos 2ω (72)

A2 = −(a2 − b2) sin 2ω (73)

Page 21: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

6 ELLIPSE PARAMETERS OF A PERSPECTIVE PROJECTED SPHEROID 21

A3 =1

2(a2 + b2) +

1

2(a2 − b2) cos 2ω (74)

A4 = −(a2 + b2)Zc + (a2 − b2)Zc cos 2ω + (a2 − b2)Yc sin 2ω (75)

A5 = −(a2 + b2)Yc − (a2 − b2)Yc cos 2ω + (a2 − b2)Zc sin 2ω (76)

A6 =1

2(a2 + b2)(Z2

c + Y 2c ) − 1

2(a2− b2)(Z2

c − Y 2c ) cos 2ω− (a2− b2)ZcYc sin 2ω − a2b2 (77)

These equations can be inverted (for example, noting that A4 = −2A1Zc − A2Yc andlikewise for A5, then solving for Zc and Yc). As such we can find expressions for Zc, Yc, ω, aand b in terms of the A-parameters. Note also the simple relation that exists between theseparameters and the ε’s above:

A1 =1

2(ε1 + ε2) (78a)

A2 = ε3 (78b)

A3 =1

2(ε1 − ε2) (78c)

A4 = − ε4 (78d)

A5 = − ε5 (78e)

A6 =1

4(ε1

2 − ε22 − ε3

2)− ε1ε6 + ε2ε7 + ε3ε8 (78f)

This means we can write the ellipse parameters a, b, Zc, Yc and ω in terms of the εi:

Zc =2A3A4 − A2A5

A22 − 4A1A3

=ε2ε4 − ε1ε4 + ε3ε5

ε32 − ε1

2 + ε22

(79)

Yc =2A1A5 − A2A4

A22 − 4A1A3

=ε3ε4 − ε1ε5 − ε2ε5

ε32 − ε1

2 + ε22

(80)

tan 2ω =A2

A1 − A3

=ε3

ε2

(81)

a2 =(4A1A3 − A2

2) cos 2ω

2 [(A1 + A3) cos 2ω + (A1 − A3)]=

ε9 cos 2ω

2 [ε1 cos 2ω + ε2](82)

b2 =(4A1A3 − A2

2) cos 2ω

2 [(A1 + A3) cos 2ω − (A1 − A3)]=

ε9 cos 2ω

2 [ε1 cos 2ω − ε2](83)

Note, however, that these are all adequately given as ratios. Ergo using equation (68) wecan write the ellipse parameters in terms of the spheroid parameters by replacing εi with δi

in the equations above and then simplifying - some extensively.

Zc =q1q3 − (A2 −B2)p1p3

q12 − α

(84)

Page 22: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

6 ELLIPSE PARAMETERS OF A PERSPECTIVE PROJECTED SPHEROID 22

Yc =q1q2 − (A2 −B2)p1p2

q12 − α

(85)

(a2 − b2) cos 2ω =

[(A2 −B2)(p3

2 − p22)− (q3

2 − q22) + (q1

2 − α)(Zc2 − Yc

2)]

q12 − α

(86)

(a2 − b2) sin 2ω =2 [(A2 −B2)p2p3 − q2q3 + (q1

2 − α)ZcYc]

q12 − α

(87)

(a2 + b2) =(A2 + B2)− (A2 −B2)p1

2 − (q22 + q3

2) + (q12 − α)(Zc

2 + Yc2)

q12 − α

(88)

The choice of combining (a2 − b2) cos 2ω, (a2 − b2) sin 2ω and (a2 + b2) is because theirexpressions in terms of a mixture of the spheroid parameters and other ellipse parametersare much simpler than they are individually. A trivial set of steps is all that is required toconvert these expressions to single expressions for a, b and tan 2ω. It is also in this formthat spheroid reconstruction becomes simpler, however this aspect is not considered in thispaper.

One can see in each of these expressions the relevance of q12 − α and how it plays a

large part in determining the type of conic the projection yields. However the true valueof this expression is seen by linking the approach we have explored back to the approachof homogeneous coordinates and calculating polar planes (see Wylie [15]). The position qand orientation p of the spheroid lie in a subspace of R3 ×R3 defined by the unit constrainton p, where this subspace describes all possible spheroids. Likewise all possible image planeellipses can be described in a 5-dimensional space by the variables given in equations (84) to(88) above. The mapping of the spheroid space to the image plane ellipse space is encapsu-lated by quotients of quadratic combinations of the spheroid parameters with the commondenominator given by q1

2 − α. This is analogous to dividing by the 4th homogeneous co-ordinate in standard projections of R4. Moreover, we can collapse the spheroid down to apoint by taking A = B = 0 in equations (84) to (88) to obtain the traditional homogeneouscoordinate description of a point projection: As α → 0,

Zc =q3

q1

(89a)

Yc =q2

q1

(89b)

(a2 − b2) cos 2ω = 0 (89c)

(a2 − b2) sin 2ω = 0 (89d)

(a2 + b2) = 0 (89e)

Equations (84) to (88) describe the projection mapping from the spheroid space to the spaceof image plane ellipses and shows that there is an equivalence between the homogeneouscoordinate method for the projection of points in R4 and the projection of spheroids inR3 × R3.

Page 23: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

6 ELLIPSE PARAMETERS OF A PERSPECTIVE PROJECTED SPHEROID 23

For completeness, it is now possible to return back to the δi - εi equations (equations(38)-(46) and (59)-(67))and find the coefficient linking them all:

Define κ + 12(q1

2 − α)2

Then δi = κεi , i = 1, . . . , 5

δj =√

2κεj , j = 6, 7, 8δjδ9 = κ2εjε9 , j = 6, 7, 8

(90)

Corollary 6.2. Image Plane Axial SymmetryThe image plane Y and Z axes are arbitrary: A rotation of the spheroid parameters q

and p by an angle φ about the focal axis will result in an equal rotation of the image planeellipse parameters Zc, Yc and ω.

Proof. Define a rotation about the focal axis:

Rφ =

1 0 00 cos φ − sin φ0 sin φ cos φ

(91)

The rotation Rφ takes the camera frame to a rotated frame we define as Sφ. Finallydenote parameters described in Sφ with a bracketed φ subscript.

q(φ)

= RφT q (92a)

p(φ)

= RφT p (92b)

Hence q(0)

= q (92c)

By expanding out terms for Zc(φ) and Yc(φ) (from equations (84) and (85)) we can writethe ellipse centre in terms of the original camera frame coordinates:

Zc(φ) =q1(φ)q3(φ) − (A2 −B2)p1(φ)p3(φ)

q1(φ)2 −B2 − (A2 −B2)p1(φ)

2

=q1(−q2 sin φ + q3 cos φ)− (A2 −B2)p1(−p2 sin φ + p3 cos φ)

q12 −B2 − (A2 −B2)p1

2

= −Yc sin φ + Zc cos φ (93a)

Yc(φ) =q1(φ)q2(φ) − (A2 −B2)p1(φ)p2(φ)

q1(φ)2 −B2 − (A2 −B2)p1(φ)

2

=q1(q2 cos φ + q3 sin φ)− (A2 −B2)p1(p2 cos φ + p3 sin φ)

(q12 −B2 − (A2 −B2)p1

2

= Yc cos φ + Zc sin φ (94a)

Therefore

1Yc(φ)

Zc(φ)

= Rφ

T

1Yc

Zc

(95)

Page 24: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

7 SPHEROID PERSPECTIVE PROJECTION RESULTS 24

As q1(φ) = q1 and rφ = r then q2(φ)2 + q3(φ)

2 = q22 + q3

2, with equivalent relations for pφ

and (1, Yc(φ), Zc(φ)). By considering equation (88), showing that a(φ)2 + b(φ)2 = a2 + b2 isnow trivial with these relations.

Finally we look at the cosine and sine equations given in equations (86) and (87). Considerthe following relation:

p2(φ)p3(φ) =1

2(p3

2 − p22) sin 2φ + p2p3 cos 2φ (96)

The equivalent relations hold for q(φ)

and (1, Yc(φ), Zc(φ)). As such,

(a(φ)2 − b(φ)

2) sin 2ω(φ) =(a2 − b2) cos 2ω sin 2φ + (a2 − b2) sin 2ω cos 2φ (97a)

→ (a(φ)2 − b(φ)

2) sin 2ω(φ) =(a2 − b2) sin 2(ω + φ) (97b)

By repeating a similar process for the expressions found in equation (86), we obtain:

(a(φ)2 − b(φ)

2) cos 2ω(φ) =(a2 − b2) cos 2ω cos 2φ− (a2 − b2) sin 2ω sin 2φ (98a)

→ (a(φ)2 − b(φ)

2) cos 2ω(φ) =(a2 − b2) cos 2(ω + φ) (98b)

Taking the sum of the squares of equations (97) and (98) yields how a2 − b2 is invariant,thus combined with the a2 + b2 invariance the individual terms are unaffected by rotation.Taking the quotient of these equations shows the effect on ω:

tan 2ω(φ) = tan 2(ω + φ) (99)

Therefore the system is rotationally invariant about the focal axis.

7 Spheroid Perspective Projection Results

The nature of perspective projections has been discussed in section (3) and now we see thiseffect for a spheroid projected onto an image plane. Recall that the distances are normalizedsuch that the image plane lies at a distance 1 from the focal point. The conversion from‘real space’ to ‘unit space’ is obtained simply by scaling q, A and B by 1/f , where f is thecamera’s focal length. To translate the image plane ellipse parameters back to ‘real space’just requires multiplying Zc, Yc, a and b by f . The angles p and ω are unchanged.

We first consider the simple example of a sphere projection, of size A = B = 4, placedat q1 = 20. By varying q2 and q3 from −45 to +45 we obtain the perspective stretching infigure (13).

There is an axial symmetry about the focal axis which can be seen in the sphere projectionscenario and this symmetry holds true for all spheroids due to the nature of the projectionmethod. This was more formally stated in corollary (6.2).

Because of the bias in ω that is observed in figure (13) due to perspective stretching itis interesting to ask if there are limitations on the range of ω for a general spheroid in ageneral position. For given values of A, B, Zc, Yc, a and b what are the possible values whichω can take? We can quickly determine an estimate of this restriction by taking advantage

Page 25: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

7 SPHEROID PERSPECTIVE PROJECTION RESULTS 25

−3 −2 −1 0 1 2 3

−2.5

−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

2.5

Image Plane z axis

Imag

e P

lane

y a

xis

Figure 13: Illustrating the perspective projection of a sphere with radius A = 4 and focaldistance q1 = 20, for varying q2 and q3.

of the rotational symmetry about the focal axis proved in corollary (6.2), determining ωas a function of p and numerically searching through p for the greatest variance in ω awayfrom ω0, where ω0 + tan−1 Yc/Zc. The value of (ω − ω0) can take values between ±0◦ to±90◦ so we can numerically generate a graph of the range of (ω − ω0) (from 0◦ to 180◦)against it’s radial distance on the image plane Rc +

√Zc

2 + Yc2. This is shown in figure

(14): q1 is fixed at a distance of 50 and then moved orthogonal to the focal axis to generatea typical ellipse projection with a given value of Rc. The values of Rc, a and b are thenfixed and the range of (ω − ω0) is then assessed. Figure (14) shows the effect on this rangefrom making the spheroid more prolate. For an extreme wide-angle lens camera the focallength can be 6mm with a lens radius of up to 35mm, which is equivalent to seeing pointsat a radial distance of Rc = 6 on the image plane. The semi-major axis of the spheroid goesup to twice the semi-minor axis in this figure and though we should expect some numericalinaccuracy figure (14) shows a limit to the ranges of (ω−ω0). This highlights a fundamentaldifference between perspective projections and orthographic projections: for an orthographicprojection no such constraint exists. One can also consider the extreme cases: when A → Bthere is no freedom on ω and no possible deviation away from ω0; when B → 0 there is noconstraint on what ω can be. Another interesting approach to this problem is by consideringthe limitations of a against b for a given spheroid eccentricity, however this is best answeredby first finding a reconstruction algorithm.

A demonstration of the theory is shown with figures (15) and (16): A spheroid of semi-major axis A = 8 and semi-minor axis B = 3 is given a centre position q = [30, 3, 5] andorientation p = [0.7348,−0.5950, 0.3256] (corresponding to θ = 39◦ and φ = 19◦), shown infigure (15). A picture is then generated in figure (16) using the ray-tracing program POV-Ray(trademark of Persistence of Vision Raytracer Pty. Ltd.) which approximates a perspective

Page 26: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

8 CONCLUSION 26

0 1 2 3 4 5 6 70

20

40

60

80

100

120

140

160

180

Rc

Ran

ge o

f pos

sibl

e va

lues

of o

meg

a

Figure 14: Illustrating the range of possible values for (ω − ω0) against the radial distanceRc of the ellipse centre (Zc, Yc) from the origin. The upper limit gives a constraint upon thepossible angles for a given Rc in order for reconstruction to be possible. q1 = 50, B = 5 andA varies from 1.01×B (light grey line) to 2B (black line).

projection. The analytic projection of this spheroid is calculated (using equations (84)-(88))and scaled so as to match the camera specifications of the simulation: lengths are multipliedby the ratio of the number of pixels to the unit distance on the image plane and the centresshifted to match the frame of the camera. The resulting ellipse boundary is also shown andidentically fits around the spheroid projection.

8 Conclusion

The methodology and governing equations for a spheroid perspective projection onto a planehas been derived, finishing with an exact description of the image plane ellipse parametersin terms of the spheroid parameters. Application of this theory is simple for computersimulations and this is demonstrated in section (7).

Distortions occur in perspective projections and these attributes have been discussed insections (3) and (7). It is identified that there are constraints on the possible values ofthe ellipse orientation for a given spheroid dimensions, a fixed ellipse centre and a fixedellipse semi-major and semi-minor axes. With wide-angle cameras these constraints play alarger role and will have to be considered if the application involves reconstruction of thespheroid from its perspective projection. This raises the obvious question of how the otherellipse parameters are constrained and whether a set of analytic expressions can be found todescribe these.

Page 27: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

8 CONCLUSION 27

05

1015

2025

3035

−10

0

10

−5

0

5

10

xy

Origin

Figure 15: An example scenario with a spheroid of semi-major-axis 8 and semi-minor-axis3 in the image space prior to projection.

z−axis

y−ax

is

100 200 300 400 500 600 700 8000

100

200

300

400

500

600

Figure 16: Comparison between a spheroid perspective projection by ray-tracing and its an-alytical ellipse projection (shown by the occluding contour).

Page 28: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

A PROOF OF INVERSE EQUIVALENCE COROLLARY 28

A Proof of Inverse Equivalence Corollary

This appendix looks at an expanded description of the Inverse Equivalence Corollary. Themethodology is straightforward but analytically intense in places. In these circumstancesonly the theory is described.

Corollary A.1. Inverse Equivalence

δ1

ε1

=δ2

ε2

=δ3

ε3

=δ4

ε4

=δ5

ε5

(100a)

δ6

ε6

=δ7

ε7

=δ8

ε8

=

(δ1

ε1

)2ε9

δ9

(100b)

Proof. First define some new variables:

E1 + δ4 cos γ + δ5 sin γ (101a)

E2 + δ6 + δ7 cos 2γ + δ8 sin 2γ (101b)

D1 + δ1 + δ2 cos 2γ + δ3 sin 2γ (101c)

E3 + ε4 cos γ + ε5 sin γ (101d)

E4 + ε6 + ε7 cos 2γ + ε8 sin 2γ (101e)

D2 + ε1 + ε2 cos 2γ + ε3 sin 2γ (101f)

Then

m±(γ, δi) =E1 ±

√δ9

√E2

D1

(102a)

m±(γ, εi) =E3 ±√ε9

√E4

D2

(102b)

We start with the relation m+/−(γ, δi) = m+/−(γ, εi) for all γ. By considering the sumand difference that these two equations yield we remove the +/− ambiguity:

E1

D1

=E3

D2

(103a)

δ9E2

D12 =

ε9E4

D22 (103b)

Now multiply up the fractions and re-write the trigonometric functions as cos nγ andsin nγ which gives an orthogonal basis in γ. For equation (103b) this is a complicatedexpression but has a similar structure to equation (103a), written here:

[δ4ε1 − δ1ε4 + 1

2δ5ε3 − 1

2δ3ε5 + 1

2δ4ε2 − 1

2δ2ε4

]cos γ

+[δ5ε1 − δ1ε5 − 5

2δ2ε5 + 5

2δ5ε2 − 7

2δ3ε4 + 7

2δ4ε3

]sin γ

+12[δ2ε5 − δ5ε2 + δ3ε4 − δ4ε3] sin 3γ

+12[δ4ε2 − δ2ε4 + δ3ε5 − δ5ε3] cos 3γ = 0

(104)

Page 29: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

A PROOF OF INVERSE EQUIVALENCE COROLLARY 29

These equations must be satisfied for all γ and as such the coefficients of cos nγ andsin nγ must be zero. Using this fact gives us a set of equations which can be described inmatrix format:

−12ε4 −1

2ε5 ε1 + 1

2ε2

12ε3

−52ε5 −7

2ε4

72ε3 ε1 + 5

2ε2

ε5 ε4 −ε3 −ε2

−ε4 ε5 ε2 −ε3

δ2

δ3

δ4

δ5

=

ε4

ε5

00

δ1 (105)

Refer to the above matrix on the left hand side as F . Then we have:

δ2

δ3

δ4

δ5

=

G

det F

ε4

ε5

00

δ1 (106)

where

G + F−1 det F (107a)

G11 = (ε1 − ε2)(ε2ε4 + ε3ε5) (107b)

G12 = (ε1 + ε2)(−ε3ε4 + ε2ε5) (107c)

G13 = (ε1 + ε2)(ε1ε5 +5

2ε2ε5 − 7

2ε3ε4) (107d)

G14 =1

2(ε1 − ε2)(ε3ε5 − ε4(2ε1 + ε2)) (107e)

G21 = ε3ε4(ε1 − ε2)− ε5(ε1ε2 + ε32) (107f)

G22 = (ε1 + ε2)ε3ε5 + (ε1ε2 − ε32)ε4 (107g)

G23 = ε4(ε12 +

5

2ε1ε2)− 7

2ε3

2ε4 +5

2ε3ε5(ε1 + ε2) (107h)

G24 =1

2[(ε2 − ε1)ε3ε4 + ε1ε5(ε1 + ε2) + ε5(ε1

2 − ε32)] (107i)

G31 = ε42(ε1 − ε2) + ε5(ε1ε5 − ε3ε4) (107j)

G32 = ε4(ε2ε5 − ε3ε4) (107k)

G33 = ε4(ε5(ε1 +5

2ε2)− 7

2ε3ε4) (107l)

G34 =1

2[(ε2 − ε1)ε4

2 + ε5(ε1ε5 − ε3ε4)] (107m)

G41 = − ε5(ε2ε4 + ε3ε5) (107n)

G42 = ε52(ε1 + ε2) + ε4(ε1ε4 − ε3ε5) (107o)

G43 =1

2[5ε5

2(ε1 + ε2) + 7ε1ε42 − 7ε3ε4ε5] (107p)

G44 = ε4ε5(ε1 +1

2ε2)− 1

2ε3ε5

2 (107q)

det F = ε1

[ε1(ε4

2 + ε52) + ε2(−ε4

2 + ε52)− 2ε3ε4ε5

](107r)

Page 30: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

REFERENCES 30

Now consider each line in (106) and simplify the expression of ε’s. The first line simplifiesto:

δ2

ε2

=δ1

ε1

(108)

Likewise for the other lines similar relations are deduced. This leads to the relation givenin equation (100a).

To recover equation (100b), the same process is repeated from equation (103b) for thehigher indexed δ’s, but with one exception; use the results from equation (100a) to write δ2,δ3, δ4 and δ5 in terms of δ1, to obtain:

ε12 + 1

2ε2

2 + 12ε3

2 ε1ε2 ε1ε3

2ε1ε2 ε12 + ε3

2 2ε2ε3

2ε1ε3 2ε2ε3 ε12 + ε2

2

δ6δ9

δ7δ9

δ8δ9

=

ν1

ν2

ν3

ε9δ1

2 (109)

where

ν1 + ε7ε2

ε1

+ ε8ε3

ε1

+

(1 +

1

2

(ε2

ε1

)2

+1

2

(ε3

ε1

)2)

ε6 (110a)

ν2 + 2ε2

ε1

(ε6 + ε8

ε3

ε1

)+

(1 +

(ε3

ε1

)2)

ε7 (110b)

ν3 + 2ε3

ε1

(ε6 + ε7

ε2

ε1

)+

(1 +

(ε2

ε1

)2)

ε8 (110c)

From here, repeating the same process as the lower indexed terms we obtain a relationfrom each line. The first reads:

δ6

ε6

=

(δ1

ε1

)2ε9

δ9

(111)

The remaining equations have a similar construct, whereupon we can finally deduceequation (100b).

References

[1] Coxeter, H., Projective Geometry , Springer, 3rd ed., March 1998.

[2] Casey, J., A Treatise on the Analytical Geometry of the Point, Line, Circle, And ConicSections, Containing an Account of Its Most Recent Extensions, With Numerous Ex-amples , University of Michigan Library, 2nd ed., January 2001, Chapter 11, “Theory ofProjections”.

[3] Semple, J. G. and Kneebone, G. T., Algebraic Projective Geometry , Oxford UniversityPress, 6th ed., July 1998.

[4] Duda, R. O. and Hart, P. E., Pattern Classification and Scene Analysis , John Wiley &Sons, 1st ed., January 1973.

Page 31: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

REFERENCES 31

[5] Millar, A. V. and Maclin, E. S., Descriptive Geometry , McGraw-Hill book company,University of Wisconsin - Madison, 1913, Chapter 1.

[6] Jaggi, S. and Karl, W.C. and Willsky, A.S., “Estimation of DynamicallyEvolving Ellipsoids with Applications to Medical Imaging,” IEEE Trans-actions on Medical Imaging , Vol. 14, No. 2, June 1995, pp. 249–258,https://dspace.mit.edu/bitstream/1721.1/3369/1/P-2244-30457235.pdf.

[7] Roberts, L. G., “Machine Perception of Three-Dimensional Solids,” Optical and Electro-optical Information Processing , 1965, pp. 159–197.

[8] Poignet, P. and Ramdani, N. and Vivas, O.A., “Ellipsoidal estimation of parallel robotdynamic parameters,” 2003 IEEE/RSJ International Conference on Intelligent Robotsand Systems , Vol. 4, Las Vegas, Nevada, October 2003, pp. 3300–3305.

[9] Liu, J-S. and Chien, Y-R. and Su, W-K. , “Collision detection based on inner-outer el-lipsoidal approximation: Some improvements,” 2003 IEEE International Symposiumon Computational Intelligence in Robotics and Automation, Vol. 2, Kobe, Japan, July2003, pp. 729–734.

[10] Bouville, C., “Bounding ellipsoids for ray-fractal intersection,” SIGGRAPH ’85: Pro-ceedings of the 12th annual conference on Computer graphics and interactive techniques ,ACM, New York, NY, USA, 1985, pp. 45–52.

[11] Zisserman, A. and Mundy, J. L., Geometric Invariance in Computer Vision, The MITPress, Cambridge, Massachusetts, August 1992.

[12] Horaud, R. and Christy, S. and Dornaika, F. and Lamiroy, B., “Object Pose: Links be-tween Paraperspective and Perspective,” IEEE, 1995, p. 426, Fifth International Con-ference on Computer Vision.

[13] Osterman, M., Stuart, N., Peres, M., Frey, F., Lopez, J. T., Malin, D., Huxlin, K., andWilliams, S., The Focal Encyclopaedia of Photography: Digital Imaging, Theory andApplications History and Science, Focal Press, 4th ed., April 2007.

[14] Eberly, D., “Perspective Projection of an Ellipsoid,” Website, February 2005,http://www.geometrictools.com - unpublished.

[15] Wylie, C. R., Introduction to Projective Geometry , McGraw-Hill, 1970, (isbn for neweditions only).

[16] Springer, C. E., Geometry and Analysis of Projective Spaces , W. H. Freeman and Com-pany, 1964.

[17] Semple, J. G. and Kneebone, G. T., Algebraic Projective Geometry , Oxford at theClarendon Press, Oxford University Press, Amen House, London E.C.4, 1952.

Page 32: Perspective Projection Of A Spheroid Onto An Image Plane...perspective projection of a spheroid onto an image plane in a more readily accessible way. 1 Introduction The projections

REFERENCES 32

[18] Theodorou, K., Kappas, C., Gaboriaud, G., Mazal, A. D., Petrascu, O., and Rosenwald,J. C., “A simple method for 3D lesion reconstruction from two projected angiographicimages: implementation to a stereotactic radiotherapy treatment planning system,”International Journal of Radiotherapy and Oncology , Vol. 43, No. 3, June 1997, pp. 281–284.

[19] Tietz, H., Famous Problems of Mathematics , Graylock Pr, June 1964.