a metric for spatial lines

5
ELSEVIER Pattern Recognition Letters 17 (1996) 1265-1269 Pattern Recognition Letters A metric for spatial lines Atsushi Imiya * Department of Computer, Information, and Cognitive Sciences, Chiba University, !-33 Yayoi-cho, Inage-ku, Chiba 263, Japan Received 18 December 1995; revised 15 August 1996 Abstract This paper defines a distance measure among spatial lines. The existence of a one-to-one mapping between spatial lines and points on the positive semi-sphere is proven. Furthermore, the geodesic distance between two points on the positive unit semi-sphere defines a distance measure among special lines. Finally, by using the proposed metric, we also construct a method for the classification of spatial lines by nearest-neighbor discrimination on the positive unit semi-sphere. Keywords: Projective geometry; Distance measure; Spatial lines; Nearest-neighbor discrimination 1. Introduction Classical pattern recognition provides some re- suits on the recognition of planar shapes and com- puter vision provides some results on the reconstruc- tion of spatial shapes. Classical pattern recognition focusses on classification of figures and pictures such as characters and telemetric images, and classi- cal computer vision focusses on identification of three-dimensional objects from two-dimensional im- ages on an imaging plane. However, the ultimate purpose of pattern recognition and computer vision is the recognition of a three-dimensional world from two-dimensional images which are obtained by imaging systems. For the execution of the program of pattern recognition and computer vision, a theoret- ical foundation which considers reconstruction, iden- tification and classification of images and objects in the same context is desired. In computer vision, lines, conics and planes are fundamental data in the * E-mail: [email protected]. reconstruction of objects from measured images (Ballard and Brown, 1982; Kanatani, 1993). These data are categorized into algebraic manifolds. Thus, for the discrimination of fundamental data and for the estimation of accuracy of reconstructed data in computer vision, metrics among these algebraic man- ifolds are required. In this paper, we define distance measures for spatial lines. We prove that there is a one-to-one mapping between spatial lines and points on the positive unit semi-sphere, and we define a distance measure among spatial lines as the geodesic distance between two points on the positive unit semi-sphere. Furthermore, by using the proposed metric, we also construct a method for the classification of spatial lines by nearest-neighbor discrimination on the posi- tive unit semi-sphere. Results of differential geome- try and projective geometry are not familiar to the pattern recognition and computer vision communi- ties. Thus, in Section 2, we summarize some funda- mental results on differential geometry, and in Sec- tion 3, we summarize correspondences between a spatial line and a point on the unit sphere in six-di- 0167-8655/96/$12.00 © 1996 Elsevier Science B.V. All rights reserved PH S0167-8655(96)00100-6

Upload: atsushi-imiya

Post on 21-Jun-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A metric for spatial lines

ELSEVIER Pattern Recognition Letters 17 (1996) 1265-1269

Pattern Recognition Letters

A metric for spatial lines

Atsushi Imiya *

Department of Computer, Information, and Cognitive Sciences, Chiba University, !-33 Yayoi-cho, Inage-ku, Chiba 263, Japan

Received 18 December 1995; revised 15 August 1996

Abstract

This paper defines a distance measure among spatial lines. The existence of a one-to-one mapping between spatial lines and points on the positive semi-sphere is proven. Furthermore, the geodesic distance between two points on the positive unit semi-sphere defines a distance measure among special lines. Finally, by using the proposed metric, we also construct a method for the classification of spatial lines by nearest-neighbor discrimination on the positive unit semi-sphere.

Keywords: Projective geometry; Distance measure; Spatial lines; Nearest-neighbor discrimination

1. Introduct ion

Classical pattern recognition provides some re- suits on the recognition of planar shapes and com- puter vision provides some results on the reconstruc- tion of spatial shapes. Classical pattern recognition focusses on classification of figures and pictures such as characters and telemetric images, and classi- cal computer vision focusses on identification of three-dimensional objects from two-dimensional im- ages on an imaging plane. However, the ultimate purpose of pattern recognition and computer vision is the recognition of a three-dimensional world from two-dimensional images which are obtained by imaging systems. For the execution of the program of pattern recognition and computer vision, a theoret- ical foundation which considers reconstruction, iden- tification and classification of images and objects in the same context is desired. In computer vision, lines, conics and planes are fundamental data in the

* E-mail: [email protected].

reconstruction of objects from measured images (Ballard and Brown, 1982; Kanatani, 1993). These data are categorized into algebraic manifolds. Thus, for the discrimination of fundamental data and for the estimation of accuracy of reconstructed data in computer vision, metrics among these algebraic man- ifolds are required.

In this paper, we define distance measures for spatial lines. We prove that there is a one-to-one mapping between spatial lines and points on the positive unit semi-sphere, and we define a distance measure among spatial lines as the geodesic distance between two points on the positive unit semi-sphere. Furthermore, by using the proposed metric, we also construct a method for the classification of spatial lines by nearest-neighbor discrimination on the posi- tive unit semi-sphere. Results of differential geome- try and projective geometry are not familiar to the pattern recognition and computer vision communi- ties. Thus, in Section 2, we summarize some funda- mental results on differential geometry, and in Sec- tion 3, we summarize correspondences between a spatial line and a point on the unit sphere in six-di-

0167-8655/96/$12.00 © 1996 Elsevier Science B.V. All rights reserved PH S0167-8655(96)00100-6

Page 2: A metric for spatial lines

1266 A. lmiya / Pattern Recognition Letters 17 (1996) 1265-1269

mensional Euclidean space, which is proven by F. O Klein and J. Pliicker (Sommerville, 1934). 1 x:

2. Manifold and metric

Let R" be n-dimensional Euclidean spaces for n >/1. In this paper, we are concerned with •3 and ~6. Furthermore, defining the orthogonal coordinate system x~-x2-x 3 . . . . . x, in R", a vector in R" is expressed by x = (x l, x 2 . . . . . xn) T where .T is the transpose of a vector. The inner product of vectors is defined by xTy and the distance between x and y by

I x - y [ = ~( x--y)T( x - -y ) . (1)

Setting

x = (x , . . . . . x~_,, 0) T (2)

for 2 ~< k ~< n, x ~ ~ k- 1 is embedded in R k. More- over, for m < n and x ~ R m, by setting

x(x~, x 2 . . . . . x m, 0, 0 . . . . . 0) t , (3)

x ~ R '~ is embedded in E". The homogeneous coor- dinate of x E ~3 (Cox et al., 1992; Sommerville, 1934) is defined by

g = ( x 0 , x l, x 2 ,X3) T. (4)

We can set x 0 = 1 for a point in R". Let S"- ~ be the unit sphere of N" consisting of

all points x with distance 1 from the origin. We call S . - i the n-sphere (Conway and Sloane, 1993). Here, we define the n-dimensional positive unit semi- sphere S~_-J. For n = 1, S o = [ - 1 , 1]. The positive half-space is defined by

P , + = ( x l x . > O ) . n>~l. (5)

Now, by setting

H + - ' = S " - J A R + , n>~l, (6)

the positive unit semi-sphere is defined by

S+-I=S+-ZOH+ -1, n>>-2. (7)

Fig. 1 shows SO+, S1+ and S2+.

S

~X 2

w

Xl

X3

",, 1 X2

Fig. 1. Positive unit semi-spheres in R l , R 2 and R 3.

Next, the geodesic distance (Guggenheimer, 1970; Morgan, 1992) between x and y in n-POUSS, denoted by g (x , y), is computed by

g(x , y ) = c o s -1 xTy. (8)

3. Metric of spatial lines

A directed line

x = a + t ( b - a ) , -oc~<t~<vc, (9)

passes through a pair of points a = (al , a2 , a3 )T and b = (bl, b2, b3) T from a to b. Setting the homoge- neous coordinates of a and b to be t~ = (a o, a 1, a 2, a3 )T and fl =- (b0, bt, b2, b3 )T, r e s p e c - t ive ly , we define a 2 by 4 matrix P such that

( a° al a2 a3 ) ( 1 0 ) p = bo bl b2 b 3 •

Page 3: A metric for spatial lines

A. lmiya / Pattern Recognition Letters 17 (1996) 1265-1269 1267

Setting 2 by 2 minor determinants of P to be

a i a j , Pi j= bi bs O~<i<j~<3, (11)

we obtain a point

P = (Pol , P02, P03, PI2, PI3, P23) T, (12)

on S 5 such that

P,: (13)

PiJ= IP21 + P22 + P~3 + P~2 + P23 + P23

Conversely, from a point on S 5, the direction vector of a line is computed by

U = ( P01, P02, P03) T,

since P and

p, = ( a0 a l a 2

b 0 - a 0 b l - a 1 b 2 - a 2

(14)

a3) b 3 -- a 3

(15)

define the same vector on S 5 (Sommerville, 1934). Furthermore, a point on a line is obtained as the solution of the equation

P02 -P01 0

P~3 0 --Pol

P03 --P02

a' / a2 = / P l 3 / . a3 ~ P23 ]

(16)

For example, setting P01 = I, Po2 = m and Po3 = n, if lmn 4= 0, the solution of Eq. (16) is

= lm - m 2 - m n Pl3 • (17) a2 2lmn l 2 lm In P23 a 3

Then, a point in S 5 determines a line

ix)/a/ x 2 = a 2 + t i P 0 2 l , (18) X3 a3 ~ P03 ]

where - ~ ~< t ~< ~. The following relation between spatial lines and points on the unit sphere is proven by F. Klein and J. Pliicker (Sommerville, 1934).

Proposition 1. There is a one-to-one mapping be- tween directed spatial lines in R 3 and points in S 5, the unit sphere in ~6.

A pair of directed lines

x = a + t( b - a ) , -o~ <~ t << oc, (19)

which passes through a pair of points a and b from a to b, and

x = a + t ( a - b ) , -oc~<t~<o% (20)

which passes through a pair of points a and b from b to a, define the same line if we disregard the directions of lines. For a matrix

bo bl b2 b,/, (21) Q = a o a, a 2 a31

which corresponds to the directed line x = a + t (a - b), setting the 2 by 2 minor determinants to be

= ~i b j , 0 ~ < i < j ~ < 3 , (22) ai j aj

we also obtain a point

q ( q m , q02, q03, ql2, q13, q23) T, (23)

on S 5 such that

a i j (24)

qi j = iQ2 + 022 + Q2 Q2 03 + Q22 + 023 + 23

Vector p which is computed from matrix P and vector q which is computed from matrix Q satisfy the relation p = - q because Pij = - q i j . Further- more, Eqs. (14)-(16) determine the same line for p and - p . These relations lead to the following theo- rem.

Theorem 1. There is a one-to-one mapping between spatial lines in •3 and points in S 5 the positive +, unit semi-sphere in ~6.

We call a point defined by Eqs. (10)-(13) the coordinate of a line. From Theorem 1, we can deter- mine a point on $5+ for the coordinate of a line by selecting the sign of a vector computed by Eqs. (10)-(13). Since the coordinate of a line is a point on S 5, we can define a metric of spatial lines by using the geodesic distance on the unit semi-sphere.

Page 4: A metric for spatial lines

1268 A. lmiya / Pattern Recognition Letters 17 (1996) 1265-1269

Definition 1. The distance between two lines li and lj of which the coordinates in $5+ are Pi and pj, respectively, is

D(I i, lj) = cos -1 PTPj. (25)

Here, we show an example. For a pair of lines which pass through the origin, setting to and ~r to be the normalized direction vectors of a pair of spatial lines 1,o and l~, respectively, 2 by 4 matrices for l,o and 1. are

(1 0 0 O ) P'= 1 Ca) 1 0.) 2 0) 3

and

(26)

p = ( 1 0 0 0 ) (27) 1 71" 1 "/7" 2 7"1" 3 '

respectively. Thus, the corresponding vectors onSS+ a r e

P,o = ( to,, to2, to3, O, O, 0) T (28)

and

P,n-~-- (971, '//2, 7/'3, O, O, O) T , (29)

respectively, if to and 7r are selected such that they are elements of S 3. Eqs. (28) and (29) lead to

D(1,o, l~)=cos -1 toz'n'. (30)

Eq. (30) shows that the distance between two lines which pass through the origin is the smallest angle between the direction vectors of them.

4. Discrimination of spatial lines

For a set of finite points ff = {pi}~= ~ on S~, a set

V ( p i ) = { p J D ( p , pi)<~O(p, pj) , i~: j} (31)

is called the Voronoi region of Pv Each V(p~) is a convex spherical polytope (Coxeter, 1973). Here, if V(p~) and V(p) have common points, then these common points lie on a common edge of V(p) and V(pj). Furthermore, a collection of sets which is

defined by Eq. (31) divides S~ into finite sets; that is, the relation

N

U v(p,) (32) i=1

holds. This is called the Voronoi tessellation (Okabe et al., 1992) of the positive unit semi-sphere. One can obtain a set of generators ~' by using an appro- priate clustering method in pattern recognition (Schalkoff, 1992), vector quantization (Linde et al., 1980) and geometric search (Okabe et al., 1992).'

For a set of generators the following theorem holds.

Theorem 2. By setting

V i j = Pi - - Pj, (33)

if v~p > 0 for a fixed i, p is an element of V( pi).

Proof. From Eq. (31), if p is an element of V(pi), the relation

D(p, pi)<~D(p, pg), i # j , (34)

holds. This relation is equivalent to

COS-'(pTpi)<~COS-I(pTpj), i # j . (35)

Since p, Pi and pj are elements of SS+, Eq. (35) is equivalent to

pTp~>~pTpj, i--/=j. (36)

ThUS, we have the theorem. []

Theorem 2 implies that the quantization of vectors on $5+ through nearest-neighbor discrimination is achieved by the transform Q from $5+ onto ~" such that

Q(P) =Pi if v~ .p>0, for i--/=j. (37)

vii is required only for i > j because

vii = - vii. (38)

This means that we can discriminate spatial lines only using the inner product of vectors on $5+. Consequently, the total number of v/j required for the discrimination is ( N - 2 ) ( N - 1)/2 if the num- ber of generators is N.

Page 5: A metric for spatial lines

A. lmiya / Pattern Recognition Letters 17 (1996) 1265-1269 1269

5. Discussion and concluding remarks

In this paper, we have defined distance measures for spatial lines. The one-to-one correspondence be- tween spatial lines and points on the positive unit semi-sphere defines a distance measure among spa- tial lines as the geodesic distance between two points on the positive unit semi-sphere. Furthermore, by using the proposed metric we also construct a method for the classification of spatial lines by nearest- neighbor discrimination on the positive unit semi- sphere.

For a pair of lines

x = a + tu, - o c <~ t ~ oc,

and

x = b + tv, -oc <~ t <~ oo,

(39)

(40) the Euclidean distance d between these lines is defined by

d = min ( min ( l ( a + s u ) - ( b + t v ) [ ) } . -- ct <~ s <~ ~ -- ~c <~ t <~ ~

(41)

Fig. 2 shows two lines which are not parallel and do not cross.

If two lines of a pair are not parallel and do not cross, d is computed by

I(ux v)Y(.-b)l d = , (42)

lu×vl since d is the distance between a line defined by (39) and a plane which is parallel to a line defined by (39) and includes a line defined by Eq. (40). If

~ e = a + t u

~ = b + s v

Fig. 2. The Euclidean distance between a pair of spatial lines.

two lines of a pair are parallel, u = v and d is computed by

d= ( a - b ) ( a - - b l T U u . lu]- 7 (43)

However, the Euclidean distance between two crossing spatial lines is zero. These properties imply that we cannot discriminate crossing lines by using Euclidean distance among lines, although our defini- tion of a metric for spatial lines determines a dis- tance between two crossing lines.

Acknowledgements

The revised version was prepared while the author was visiting the Department of Applied Mathemat- ics, University of Hamburg. The author expresses many thanks to Professor Dr. Ulrich Eckhardt for his hospitality. While staying in Germany the author was supported by the research fellow program in abroad of the Ministry of Education, Culture, and Sciences of Japan.

References

Ballard, D. and Ch.M. Brown (1982). Computer Vision. Prentice- Hall, Englewood Cliffs, NJ.

Conway, J.H and N.J.A. Sloane (1993). Sphere Packing, Lattices and Groups, second edition. Springer, New York.

Cox, D., J. Little and D. O'Shea (1992). Ideals, Varieties, and Algorithms: An Introduction to Computational Algebraic Ge- ometry and Commutative Algebra. Springer, New York.

Coxeter, H.S.M. (1973). Regular Polytopes. Dover, New York. Guggenheimer, H.W. (1977). Differential Geometry. Dover,

New York. Kanatani, K. (1993). Geometric Computation for Machine Vision.

Oxford University Press, Oxford. Morgan, F. (1992). Riemannian Geometry, A Beginner's Guide.

Jones and Bartlett Publishers Intemat., Boston, MA. Okabe, A., B. Boots and K. Sugihara (1992). Spatial Tessella-

tions: Concepts and Applications of Voronoi Diagrams. Wiley, New York.

Linde, Y., A. Buzo and R.M. Gray (1980), An algorithm for vector quantizer design. IEEE Trans. Commun. 28, 84-95.

Schalkoff, R. (1992). Pattern Recognition: Statistical, Structural and Neural Approaches. Wiley, New York.

Sommerville, D.M.Y. (1934). Analytical Geometry of Three-di- mensions. Cambridge University Press, Cambridge.