Carnegie Mellon University Research Showcase @ CMU Computer Science Department School of Computer Science 1983 The theory of straight homogeneous generalized cylinders and A taxonomy of generalized cylinders Steven A. Shafer Carnegie Mellon University Takeo Kanade Follow this and additional works at: http://repository.cmu.edu/compsci This Technical Report is brought to you for free and open access by the School of Computer Science at Research Showcase @ CMU. It has been accepted for inclusion in Computer Science Department by an authorized administrator of Research Showcase @ CMU. For more information, please contact [email protected]. NOTICE WARNING CONCERNING COPYRIGHT RESTRICTIONS: The copyright law of the United States (title 17, U.S. Code) governs the making of photocopies or other reproductions of copyrighted material. Any copying of this document without permission of its author may be prohibited by law. The Theory of Straight Homogeneous Generalized Cylinders and A Taxonomy of Generalized Cylinders 18 January 1983 Steven A. Shafer Takeo K a n a d e Computer Science Carnegie-Mellon Department University This research was s p o n s o r e d by the Defense A d v a n c e d Research Projects Agency (DOD), ARPA Order No. 3597, monitored by t h e Air Force Avionics Laboratory Under Contract F33615-81 -K-1539. T h e views and c o n c l u s i o n s c o n t a i n e d in this d o c u m e n t are those of the authors and s h o u l d not be interpreted as representing the official policies, either expressed or implied, of t h e Defense Advanced Research Projects A g e n c y or the US Government. The Theory of Straight Homogeneous Generalized Cylinders 15 January 1983 Steven A. Shafer Takeo Kanade Computer Science Department Carnegie-Mellon University Abstract In recent years, Binford's scheme in computer by a lack of analytical generalized cylinders have become vision. However, is presented Generalized Cylinders, coordinates are not curved. Generalized Cylinders, with concerning Then, projections, some subclasses name Right a linear axis, The bulk are formulae contour SHGCs), generalized used shape cylinders a lack of a precise Cylinders important of the paper because is concerned have constant with Straight for which results several of these shapes. Straight object-centered Homogeneous for these shapes. lines, and surface are obtained closed-form hampered shape but vary in size. descriptions The strongest definition natural under which multiple shadow has been the normals generators, representation and for several subclasses. for points and surface the conditions of shapes. Circular for Generalized in which the cross-sections The results begin with deriving shape. involving results at all levels, even including In this paper, a definition are presented research a commonly can exist for a single normals are analyzed for solids of revolution methods Theorems for analyzing (which images solid for we are presented. This research was sponsored by t h e Defense Advanced Research Projects Agency (DOD), ARPA Order No. 3597, monitored by the Air Force Avionics Laboratory Under Contract F33615-81 -K-1539. The views and conclusions contained in this d o c u m e n t are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the Defense Advanced Research Projects Agency or the US Government. T a b l e of Contents 1 . Introduction 1.1 Importance of Generalized Cylinders 1.2 This Presentation 2. C l a s s e s of S h a p e s 2.1 Generalized Cylinders 2.2 Straight Generalized Cylinders 2.3 Straight H o m o g e n e o u s Generalized Cylinders 2.4 Subclasses of SHGC 3 . Fundamental T h e o r e m s and P r o b l e m s 3.1 Coordinates for SHGCs 3.1.1 Points on the Surface 3.2 Descriptions and Shapes 3.3 T h e Equivalent Right SHGC Problem 3.3.1 The Slant Theorem 3.4 T h e Alternate Axis Problem 3.4.1 The Pivot Theorem 3.5 Surface Normals of an SHGC 3.6 The Corresponding Normal Theorem 4 . P r o j e c t i o n s of SHGCs 4.1 Projected Contour Generators 4.1.1 Planarity of Contour Generators 4.2 Images of Right SHGCs 4.2.1 Contour Generators Under Perspective Projection 4.3 Projection and Imaging for Right Circular SHGCs 4.3.1 Occlusions and Singularities in Image Contours 4.3.2 Cross-Sections Described by Fourier Coefficients 4.4 Contour and Silhouette Analysis for Right Circular SHGCs 4.4.1 Contour Analysis 4.4.2 O c c l u d e d Contours and Silhouettes 4.4.3 Aligning the Image 4.5 Contour and Silhouette Analysis for Other RSHGCs 4.5.1 Contours of Right Linear SHGCs 4.5.2 Contours of Right Polygonal SHGCs 4.6 Contour Generators in Two Views 4.7 Analysis of Surface Normals 4.7.1 Individual Surface Normals of an RCSHGC 4.7.2 Aligning the Image for Analysis of Surface Normals 4.7.3 Cross-Sections For a Given Surface Normal 4.7.4 S h a d o w Geometry for RCSHGCs 4.7.5 Range Data Analysis for RCSHGCs 4.7.5.1 Method of Minimizing Derivatives 4.7.5.2 M e t h o d of Interpolating Normals 5. Conclusions 5.1 Future Work 5.2 A c k n o w l e d g e m e n t s 6 . Bibliography I. S y m b o l s II. P r o p e r t i e s of SHGCs 11.1 Straight H o m o g e n e o u s GC: SHGC 11.2 Right SHGC: RSHGC 11.3 Linear SHGC: LSHGC 11.4 Circular SHGC: CSHGC 11.5 Polygonal SHGC: PSHGC iii List of Figures F i g u i re 1 : Concept of a Generalized Cylinder 1 F i g u i re 2 : Examples of Generalized Cylinders 2 F i g u i re 3 : Imaging and S h a d o w Volumes are Generalized Cylinders 2 F i g u i re 4 : Generalized Cylinder 4 F i g u i re 5 : Straight Generalized Cylinder 6 F i g u i re 6 : Straight H o m o g e n e o u s Generalized Cylinder 6 F i g u re 7 : Linear SHGC 7 F i g u re 8 : Circular SHGC 7 F i g u i re 9 : Polygonal SHGC 8 9 F i g u re 1 0 : Coordinate Axes for SHGCs F i g u re 1 1 : Coordinates of a Point on an SHGC 10 F i g u re 1 2 : T h e Equivalent Right SHGC Problem 11 F i g u re 1 3 : T h e Slant T h e o r e m 14 F i g u re 1 4 : T h e Alternate Axis Problem 16 F i g u re 1 5 : T h e Pivot T h e o r e m 18 F i g u re 1 6 : Surface Normal of an S H G C 20 F i g u re 1 7 : The C o r r e s p o n d i n g Normal T h e o r e m 21 F i g u re 1 8 : Surface Normals of the S h a d o w Volume 23 F i g u re 1 9 : C o n t o u r s and Contour Generators 24 F i g u re 2 0 : Viewing Direction and Angle 25 F i g u re 2 1 : End, Side, and O b l i q u e Views 26 F i g u re 2 2 : Object and W o r l d Coordinate Systems 28 F i g u re 2 3 : Image of a Point on a Right SHGC 29 F i g u re 2 4 : Imaging Under Perspective Projection 29 F i g u re 2 5 : C o n t o u r Generator on a Right Circular SHGC 31 F i g u re 2 6 : C o n t o u r Generator in Side View 33 F i g u re 2 7 : C o n t o u r Generator in Near-Side View 34 F i g u re 2 8 : C o n t o u r Generator Singular W h e n Tangent to Line of Sight 35 F i g u re 2 9 : C o n t o u r Generator Split at Near-End View 36 F i g u re 3 0 : C o n t o u r Pieces Correspond to Disjoint Intervals of s 36 F i g u re 3 1 : Aligned Image of an SHGC 38 F i g u re 3 2 : C o n t o u r Analysis Results in Shape Description 39 F i g u re 3 3 : RCSHGC With Near End Flat 41 F i g u re 3 4 : Tangents at C o r r e s p o n d i n g Points Intersect on the Axis 43 F i g u re 3 5 : C o n t o u r Generators Need Not Be At Vertical Extrema 44 F i g u re 3 6 : Crease Contours for a Right Polygonal SHGC 44 F i g u re 3 7 : Tangents of Crease C o n t o u r s Intersect on the Axis 45 F i g u re 3 8 : C o n t o u r Generators From T w o Points of View 47 IV Figure 39: S h a d o w Line is a C o n t o u r Generator for t h e Light S o u r c e 47 Figure 40: Two Angles Define t h e Illumination Direction 48 Figure 4 1 : S h a d o w Line on a Right Circular SHGC 49 Figure 42: K n o w l e d g e of a Single Surface Normal 50 Figure 43: Analyzing a Single S u r f a c e Normal 52 Figure 44: Complete and Partial Alignment of the Image 53 Figure 45: S o u r c e s of K n o w l e d g e A b o u t S u r f a c e Normals 53 Figure 46: Cross-Section of a Right Circular SHGC T h r o u g h a Point 54 Figure 47: S h a d o w Geometry Provides Surface Normals Along S h a d o w Line 56 Figure 48: C o r r e s p o n d i n g Point on T a n g e n c y C o n t o u r Generator 57 Figure 49: At Most O n e C o r r e s p o n d i n g Point Exists 57 Figure 50: Range Data Yields an Image of Surface Normals 58 Figure 5 1 : T w o S u r f a c e Normals on the Same Cross-Section 59 Figure 52: T w o Surface Normals on Different Cross-Sections 59 Figure 53: Only C o m p a r e S u r f a c e Normals with Similar Values of x 61 Figure 54: Fitting Ellipses to Interpolated Surface Normals 62 1 1 . Introduction In recent years, t h e generalized cylinders proposed by Binford [2] have become an increasingly important tool for shape description in image understanding. However, generalized cylinders have in the past been defined primarily in informal terms, leading to several different definitions for "generalized cylinder" (or "generalized c o n e " ) and resulting in a lack of rigorous geometric analysis of these shapes. In this paper, w e present a formal definition of generalized cylinders and several interesting subclasses. A number of theorems and results are then derived, including formulas for the coordinates of the constituent points and surface normals, and several results relevant to projections (i.e. images) of generalized cylinders. 1.1 Importance of Generalized Cylinders F i g u re 1 : C o n c e p t of a Generalized Cylinder A generalized cylinder is loosely characterized by having an axis (a space curve w h i c h forms a spine for the shape), a cross-section (a 2-D c o n t o u r w h i c h sweeps along the axis), and a sweeping rule <a rule for transforming the cross-section as it is swept along the axis) (figure 1) [2]. Generalized cylinders are an important class of shapes for several reasons. They are primarily important because of the wide variety of man-made and natural objects w h i c h can be represented as generalized cylinders. For example, many objects w h i c h stand up have a vertical axis (counteracting gravity) and a horizontal cross-section w h i c h c h a n g e s only slightly (if at all) as it follows the axis: a vase, a lamp, a flower stem, a skyscraper, a c u p , a blade of grass, a box (figure 2). For many of these shapes, representation as a polyhedron requires defining many identical facets, w h i c h fails to take into a c c o u n t the simplicity of the basic structure involved. In addition, machining processes may F i g u re 2 : Examples of Generalized Cylinders p r o d u c e shapes w h i c h are r o u n d e d generalized cylinders, for w h i c h polyhedral or surface patch approximations introduce undesirable edges and corners. Generalized cylinders have been used for describing pottery types for anthropology [6] and for modelling biological cell shapes [18]. eye F i g u re 3 : Imaging and S h a d o w Volumes are Generalized Cylinders Generalized cylinders are important in c o m p u t e r image processing because of the fact that a region of an image c o r r e s p o n d s to s o m e volume in space, defined by the imaging projection (orthography or perspective). The volume so defined is a generalized cylinder, with axis along the optical axis of the eye or camera (figure 3). Similarly, w h e n an object casts a shadow, there is a volume of space behind the object w h i c h will be shaded from the light s o u r c e . generalized cylinder. This volume is a Thus, the problem of determining the shape of a s h a d o w is equivalent to the geometric problem of determining the intersection of a generalized cylinder with another object (such as a planar surface). 3 Generalized cylinders also have several properties w h i c h render them appropriate for geometric modeling tasks, as pointed out by Marr and Nishihara [12]: generalized cylinders are volumetric, w h i c h means they are characterized as o c c u p y i n g a volume of space rather than being a collection of flat or curved patches; they have object-centered coordinates, w h i c h allow for rotations etc. for model instantiation or to represent motion of limbs; they have a principal axis w h i c h itself can be used as a gross approximation to the volume represented; and they can be organized hierarchically to represent coarse and fine details. 1.2 This Presentation In this paper, w e begin by defining several classes of solid shapes. Various definitions of "generalized cylinder" or "generalized c o n e " in the literature are identified as corresponding to certain of these classes. A particular class, called Straight Generalized Cylinders (SGC), is fundamental since the natural object-centered coordinate system has no curvature in the axes, and hence is a linear transformation from world space coordinates. Homogeneous Generalized Cylinders A subset of SGC, Straight (SHGC), contains those SGCs w h o s e cross-sections have the same shape but may vary in size; this allows a d e c o m p o s i t i o n of the shape description into size and shape functions, u p o n w h i c h this work is based. Several subclasses of SHGC are defined, with particular properties w h i c h allow stronger statements to be made about them in various situations. The remainder of the paper consists of the elaboration of important properties of Straight Homogeneous Generalized Cylinders and of these subclasses. The next section presents the most important formulae: the coordinates of points on an SHGC, and the surface normal vector at each point. Two important problems are identified: the existence of different representations for the same solid shape, and the constancy of surface normals in certain locations. Theorems are proven in each case, showing that t h e Linear SHGCs (LSHGC) (SHGCs w h i c h expand the c o n t o u r by a scaling factor proportional to distance along the axis) are a very important class by themselves. Since the imaging volumes and shadow volumes (discussed above) are LSHGCs, these results may be especially useful. The c o n s e q u e n c e s of projection of SHGCs (i.e. imaging) are then explored. This includes a general formulation of the imaging geometry, followed by an analysis of the problem of mapping image points to points on the SHGC. The analysis of silhouettes of SHGCs is explored, including the difficult problem of determing the contour generators -- points on the SHGC w h i c h are imaged on the outline of the silhouette [11]. Next, the problem is addressed of interpreting the contour generators from one point of view as seen from another: this arises in stereo and shadow geometry analysis. The use of range-finder data for description of SHGCs is also discussed. 4 2. Classes of Shapes W e will begin by defining some classes of solid shapes. We begin with Generalized Cylinders, w h i c h introduce the most basic ideas in the definition, then specialize this to Straight Cylinders, Straight Homogeneous Generalized Cylinders, and several subclasses Homogeneous Generalized Cylinders w h i c h w e call Linear, Right, Circular, Generalized of and Polygonal Straight SHGCs. T h e names of these classes will be capitalized w h e n used to refer to their formal definitions. This terminology c o r r e s p o n d s to that of the authors in related work [16]. A summary of the symbols used will be found in an Appendix. 2.1 Generalized Cylinders V Figure 4: A Generalized Cylinder Generalized Cylinder (GO, as s h o w n in figure 4, is a function w h i c h maps two parameters onto a set of points in x-y-z space (i.e. the world). T h e two parameters are s, w h i c h measures distance along the axis, and t, w h i c h indirectly measures distance along the cross-section contour; both s and t have as domain the unit interval [0,1]. This development is similar to that of Ballard and Brown [1]. A Generalized Cylinder is specified by a three-tuple (A, E, a). A is the axis, w h i c h is a curve in space defined in parametric form by A{s) = ( x , y , z ) (s). A A A The remainder of this discussion will desribe features of the shape relative to the axis itself rather than in absolute x-y-z coordinates. At each point A(s) on the axis, let the cross-section be described on a u-v plane, with A(s) at the 5 origin, and defined by the (constant) angle a. T h e ty-axis will be the direction of steepest descent of the u-v plane from the tangent to the axis, a, the angle of inclination, is the angle from the a-axis to the tangent to the axis at A(s); a = 0 means that the a-axis is pointing t o w a r d s A(1), and a = <n means that the u-axis is pointing t o w a r d s A(0). On each u-v plane, the cross-section c o n t o u r is defined by the envelope function E(s,t) = (u , E V) E (s,f). On t h e u-v cross-section plane for each value of s, the cross-section c o n t o u r is the set of points E(s,t) for values of t from 0 to 1, inclusive. T h e c o n t o u r is normally expected to be closed, i.e. E{s,0) = E(s,1). The union of the c o n t o u r s is the Generalized Cylinder. A c c o r d i n g to this strict definition, s o m e very peculiar shapes are admitted in GC, including those with intersecting c o n t o u r s on different cross sections, those with singular points or arcs, and those with cross-section c o n t o u r s w h i c h are open arcs, points, or even space-filling curves. Since our ultimate goal is the analysis of the shapes of c o m m o n objects, w e will generally e x c l u d e s u c h bizarre cases from further consideration. However, since shapes with degenerate cross-sections (open arcs or points) d o have several important properties, w e will note them w h e n appropriate. The class GC includes very many shapes: all for w h i c h there exists a space curve (axis) s u c h that each cross-section of the object on s o m e set of planes can be defined by a single c o n n e c t e d component. Binford [2] defines "generalized cylinder" to be a superset of GC, allowing rotational sweeps and non-planar cross-sections. Since this definition includes s u c h strange shapes as those described above, it is likely that some assumptions of normalcy were intended, t h o u g h not explicitly stated, by Binford. Nevatia [13] has defined "generalized c o n e s " to be GC, with the condition that a be equal to TT/2, i.e. the cross-section planes are orthogonal to t h e axis. 2 . 2 Straight Generalized Cylinders Interesting subclasses of GC arise from imposing suitable restrictions on the various c o m p o n e n t functions. The most important of these is the set of Straight Generalized Cylinders (SGC), in w h i c h the axis A is linear (figure 5). The axis is t h u s a line segment, and all u-v planes are parallel. This class is important because all tangents to A(s) are parallel, as are all u-axes and all v-axes. W e can therefore define vectors S, U, and V pointing in these directions, and assign a local (objectcentered) coordinate system using u-v-s coordinates. S u c h coordinates can of c o u r s e be defined for all Generalized Cylinders; however, there will be no curvature in the coordinate axes for SGCs. The local coordinates of an SGC are a linear transformation of world (x-y-z) coordinates. 6 F i g u re 5 : Straight Generalized Cylinder 2.3 Straight Homogeneous Generalized Cylinders F i g u r e 6 : Straight H o m o g e n e o u s Generalized Cylinder W e define a Straight Homogeneous Generalized Cylinder (SHGC) (figure 6) to be an SGC in w h i c h the envelope E c a n be d e c o m p o s e d into two functions by E(s,f) = r(s)C(0. T h e contour = (u ,v ) c Q function (t) describes the shape of the cross-section; the radius function r(s) describes its size. C(t) So, the cross-section has a constant shape but may vary in size. An SHGC is specified by a four-tuple ( A C, r, a). We impose the restriction that the functions A and r be c o n t i n u o u s and differentiable everywhere, and that the c o n t o u r C be c o n t i n u o u s and differentiable almost everywhere. required, that the u-v origin be in the interior of the contour. s c a l i n g " of s and f, i.e. | | d / \ / d s | | and ||dC/df|| are constants. It is usual, but not In addition, we will presume " u n i f o r m 7 This definition of generalized cylinder is essentially the same as Marr's "generalized c o n e " [11]. The bulk of this paper describes the properties of SHGCs. 2.4 Subclasses of SHGC Additional restrictions on t h e various functions give rise to several subclasses of SHGC with particular interesting properties: Figure 8: Circular SHGC Linear SHGC (LSHGC) - SHGC with r linear (figure 7) T h e size of the c o n t o u r varies linearly with distance along the axis. r(s) can be written as r(s) = m ( s - s ) for s o m e values of m and s . Q LSHGCs: r(s ) Q Q Important relations for = O a n d d r / d s = m. In the special case that r is constant, r(s) = r for some value r . Q In this case, d r / d s = 0. LSHGCs are ruled surfaces being Generalized Cylinders [5]. Q as well as 8 Figure 9: Right SHGC (RSHGC) Polygonal SHGC SHGC with a = TT/2 The u-v planes are normal t o the axis. There is no " d i r e c t i o n of steepest d e s c e n t " relative to the axis, so the u-axis may be c h o s e n in any direction on the crosssection planes. Circular SHGC (CSHGC) SHGC with C a circle centered at the origin (figure 8) Without loss of generality, let C be a unit circle, C(f) = (u Qi 2irt). v ) (t) = (cos 2mt, sin Q All surfaces of solids of revolution are Right Circular SHGCs (but with o p e n ends unless r(0) = 0 or r(1) = 0 ) . Polygonal SHGC (PSHGC) - SHGC with C polygonal (piecewise linear) (figure 9) If C{t ) is a vertex for some t Q then the set of points P{sJ ) Qi Q is a crease (ridge if C convex there, valley if concave). Otherwise, P(s,f) is on a face; note that faces are not necessarily planar in this definition. On a face, C(t) is linear, s o it c a n b e expressed as: C(f) = ( u ( 0 , v (t)) c Q = (mj for s o m e m , £> , m , and b . u u vertices C(tJ m v and C(t ) v u = 0 L f -f = (u ,v ), 2 u -u. and 2 b u v u v bj f v then 2 \ M = with similar definitions for n? and 5 . (/77 ,m ). + u If the c o r r e s p o n d i n g s e g m e n t of C is b o u n d e d by y = (u vj + b , mj 0 - t t u. ~ 0 a L In addition, d C / d f = (dt; /df,d\/ /dO c c = By t h e uniform scaling assumptions, t measures distance a r o u n d t h e polygon. In various situations, the c o n s e q u e n c e s of these properties will be s h o w n to be of special interest. 9 3. Fundamental Theorems and Problems In this section, the formulae for the coordinates of a point and the direction of a surface normal for an SHGC are presented. These give rise to some important problems w h i c h are explored, and several relevant theorems are presented. These formulae and theorems provide the basis for the imaging discussion in the next section. 3.1 Coordinates forSHGCs For any SHGC, there is a natural u-v-s preceding definitions. object-centered coordinate system imposed by the We will adopt t h e convention that the v-axis is c h o s e n to provide a right- handed u-v-s c o o r d i n a t e system. T h e unit vectors in the axis directions will be denoted U, V, and S, as s h o w n in figure 10. F i g u re 1 0 : Coordinate Axes for SHGCs However, l / _ L S o n l y if a = t t / 2 , i.e. in a Right SHGC. Therefore, it will be convenient to define an orthogonal w-v-s coordinate system using W perpendicular to V a n d S. W lies in the US plane, with an angle of m/2 - a between M/and U. For any point (u, v, s ) u v s (where u v s denotes coordinates in the u-v-s system), the corresponding coordinates in w-v-s are (u sin a, v, s + u cos CL)^ S The w-v-s coordinates are important since the axes are independent of the c o m p o n e n t s of any particular Generalized Cylinder. In an RSHGC, u-v-s and w-v-s coordinates are identical. Except w h e r e otherwise stated, all coordinates in this paper will be given in the w-v-s system. 10 3.1.1 Points on the S u r f a c e F i g u re 1 1 : Coordinates of a Point on an SHGC For any values s and f, the point P(s, t) on the surface of the SHGC has u-v-s coordinates (figure 11) P(s,f) = ( u ( 0 r(s), v (t) r(s), s ) c c y v s and hence w-v-s coordinates P(s,f) = (u (t) Q r(s) sin a, v (t) r(s), s + u (t) Q Q r{s) cos a) (3-1) 3.2 Descriptions and Shapes A subtle problem arises from our definition of SHGCs (and other s h a p e classes): defined t h e m , an SHGC is actually a description itself. as w e have of a shape rather than being a specific solid s h a p e Of course, each such description describes a unique shape; however, w e must attempt t o decide when a single shape may have several different descriptions. Since a solid shape c o r r e s p o n d s to an equivalence class of descriptions (i.e. SHGCs), w e will call two descriptions equivalent when they describe the same solid shape, as d i d Marr and Nishihara in [12]. There are four trivial changes possible in the s and t coordinates themselves while preserving equivalence: • the axis can be flipped end-over-end to yield a new SHGC (reversing the sense of the s coordinate) • the sense of t can be likewise reversed, a n d , if the c o n t o u r C(t) is closed, the point at w h i c h t = 0 can be shifted to a n y w h e r e on the c u r v e • the radius function r(s) can be multiplied by any constant scale factor, while the cross section contour C(t) is divided by the same factor 11 • an RSHGC can have the u-v axes rotated about t h e origin arbitrarily (shifting the t coordinate). These transformations are sufficiently simple that no deeper discussion is needed. There are, however, more significant variations in the possible descriptions of a specific shape as an SHGC. We will investigate two of the principal types of variation: altering the orientation of the cross-section planes, and altering the direction of the axis. 3.3 The Equivalent Right SHGC Problem F i g u r e 1 2 : T h e Equivalent Right SHGC Problem In figure 12, w e see a shape described as two different SHGCs, with cross-section planes at different orientations. What properties of the shape make this possible? Since this question is so general, w e will limit our attention to a more restricted (but still difficult) question: For what SHGCs are there equivalent Right SHGCs? This is interesting since the RSHGC seems to be a natural " c a n o n i c a l " form of representation for a shape. We will ignore the effect of " b e v e l e d " ends resulting from values of a not equal to 7 r / 2 . 12 To make this problem somewhat more tractable, w e will presume that the same axis A and radius function r are to be used for the SHGC and RSHGC. (We conjecture, but have not proven, that this presumption implies no loss of generality.) T h e problem can then be stated this way: Given an SHGC G 1 = (A, C G 2 = (A, C , r, 7r/2) contains the same points as G^> v r, a), with C , = (u vj v can some function C % 2 = {u ,v ) 2 2 be f o u n d such that the RSHGC 2 Now for each s and 1 , w e must have 1 1 PfiytJ = {u^tjrisjsin for s o m e s , with P on G 2 1 v a, v^(tjr{sj, s 1 + u^tj r(sj cos a) P on G , and with C ( f ) c o r r e s p o n d i n g to C , ^ ) for all t 2 2 2 1 r Equating s-coordinates, s 2 = S 1 + u (tJ ($Jcos a r A Equating ^-coordinates, = v,(tjr(sj v {tjr[sj 2 so Now, since v {tj 9s 2 w e must have _ 9 r(s + 1 u^Jffc^cosa) 9s r^) i.e. the ratio between r(s ) and /-(s^ is independent of s. So, 2 0 = 2 V^J — r ( s i + w J f J r t s ) c o s a ) - r(s W e can differentiate this by f, using the fact that v t / ( f ) r ( s j cos a ) — J 13 3 3 dr . dr I "97"d7' . Ht "d7' s2 = du . | A = r(s,)cosa— s1+u1(t1)r(s1)cosa d r • -^2-| du 2 t 1 s 1 + u 1 ( t 1 ) r ( s 1 ) c o s a | 1 d r • 2 = ^ o s a - ^ ^ - l ^ to obtain the c o n d i t i o n : du. , d r , _ | _ | 2 2 0 , ^ , c o s a t i s dt/ , - r ( s j cos a — H df M , t 1 du 2 , r(Si) cos a _| 1 I t i + r ( S i ) c o s a dr , _ | s , s 1 _ 3 ( f t 7 i ( f i ) dr _ | s 2 , s 2 d r , 2 _ i dr , dr , Li Lo ds ds 1 1 2 ) s 2 2 + r(Si) , do. | d r , . = r i s / c o s a - ^ - ^ — ? ] ^ _| Ui(fi)cos a 2 u,(t,)— + dr • | s 1 du. , _| t i dr , _ s i d r 2 l s 2 . ) So, one of the above terms must be 0. If r(s) = 0, G is degenerate (cross-section is a single point). 1 If cos a = 0, G is already a Right SHGC. If d ^ / d f = 0, G is degenerate (C(f) is a line of constant u). 1 1 If 0 = d r / d s , G is a Linear SHGC. A n d finally, if 0 = 1 + u^{t) d r / d s , w e can differentiate by s to 2 2 1 yield 0 = u^(t) d r / d s and G is either degenerate (0 = u^{t)) or Linear (0 = d r / d s ) . 2 2 2 2 1 So, if an SHGC G has an equivalent representation as an RSHGC, then either (1) G is degenerate, 1 1 (2) G is an LSHGC, or (3) G is already an RSHGC. 1 1 3.3.1 The Slant Theorem T h e Equivalent RSHGC Problem suggests that t h e only nondegenerate SHGCs with equivalent representation as RSHGCs are LSHGCs. T h e converse is also true: Every Linear SHGC has an equivalent representation that is also an RSHGC. In other w o r d s , the set of all LSHGCs is a subset of all RSHGCs. This statement is called the Slant Theorem, w h i c h says in effect that it doesn't matter what direction the cross-section planes are taken relative to the axis of an LSHGC: for any direction, some c o n t o u r function C can be found to describe t h e shape (ignoring the possible beveling of the ends) (figure 13). To prove the theorem, let G 1 = (A, C r, a) be an LSHGC with r = m (s - s ) and C , = {u v Q (We will deal with the special case r{s) = r below.) T h e constituent points are Q P (s ,? ) = ( a ( f ) m ( s 1 1 1 1 1 1 - s )sina, Q ^ (f )m(s 1 1 1 - s ), s Q 1 + u (f )/r?(s 1 1 1 - s )cosa) Q v vj. 14 F i g u r e 1 3 : The Slant Theorem Now consider G = ' 2^ v L e t 2 w 2 a n 2 = {A, C , r, d v 2 b e w h i c h is an LSHGC and RSHGC with A and r as above, and C 1 7 / 2 ) , 2 d e f i n e c l 2 by-' u At) sin a uJf) * = vJf) = 3 1 + m cos a ^ ( 0 1 + u^(t) m cos a (This definition violates the uniform scaling assumption for f; however, the c o n t o u r can be d e f o r m e d along its length t o eliminate this problem, and in any event this condition is not central to t h e derivation being presented.) Each point of G has coordinates 2 P ($ >t ) 2 2 = (u (t ) 2 2 2 r(s ), v (f ) r(s ), s ) 2 ^ u {t )m{s 1 2 1 ' = 2 f 2 2 - s )sina 2 Now, for each s and f 2 2 v,(t )m(s Q 2 - s ) 2 Q ^ ^ define s and t by: v 2 2 i Then , , t / ^ ) rn ( s 1 + u ^ ) m (s * 1 + u^tj v^(t ) m ( s A 1 1 - s ) cos a - s ) s/n a 0 m cos a + ufi J m {s^ - s ) cos a - s ) Q 1 + t / ( ^ ) m cos a r s 1 + u (f )m(s 1 1 Q l - s )cosa ) Q Q 15 = ( u ^ ) m (s - s ) sin a, v^(tj 1 m (s - s ), s Q 1 Thus, for e a c h s and f , there exists a point P {s ,t ) 1 G v 2 2 2 Q 1 + uftj m (s 1 - s ) cos a) Q on G w h i c h is t h e same as the point P ( s , f ) on 2 1 i.e. G and G c o n t a i n the same points. T h e beveling of the ends of G., but not G 1 2 2 1 1 is reflected in the restriction t h a t s must lie in t h e interval [0,1]. 2 In t h e special case that r(s) is constant, w e have r(s) = r . Q PfeytJ = (u (f )r s/no,v (f )r ,s 1 1 0 1 1 0 + 1 Then u^/^^cosa) So let u a n d v be defined by: 2 2 u {t) = u.,(f)s/n a 2 T h e n , for each s and t n <2 v define s and f by: 2 2 - N Then w e have: P ( s , f ) = ( u ^ f j ) r s/n a, v ^ f g ) f , s ) 2 2 2 = Q Q 2 P^Vt) and the above c o n c l u s i o n s hold true for this case. So, for each LSHGC, there exists another description of the same shape w h i c h is both an LSHGC and RSHGC, c o n t a i n i n g all the same points (but without beveled ends). In this sense, the set of LSHGCs is a subset of the set of RSHGCs. 3.4 The Alternate Axis Problem Having explored t h e issue of c h a n g i n g t h e cross-section planes, w e can ask about moving the axis: For what SHGCs are there equivalent representations with different axes, using the same crosssection planes (figure 14)? (This is k n o w n to involve a loss of generality with respect to the question: For what SHGCs are there equivalent representations with different axes? For example, a sphere satisfies t h e latter c o n d i t i o n , but not t h e c o n d i t i o n w e are addressing here. We c o n j e c t u r e that only shapes resembling certain regular polyhedra, of w h i c h the sphere is the limiting case, are excluded from our analysis herein by the restriction to use the same cross-section planes.) W e will begin by restricting the problem so that the t w o axes intersect s o m e w h e r e , and so that both axes intersect the cross-section planes (i.e. the axes of t h e SHGCs are not parallel to the cross-section planes). 16 F i g u r e 1 4 : T h e Alternate Axis Problem Suppose G 1 = ( A C V r V a J and G r with the same u-v planes, and with oriented identically for G = ( A , C , r , a ) are SHGCs representing the same s h a p e , 2 2 AFI ) 2 2 A {s ) = 0 2 2 for s o m e s . Q (We will presume t h e t/-axis is Q a n d G , w i t h o u t loss of generality since t h e u-v axes c o u l d be rotated 1 2 w i t h o u t affecting the following line of reasoning. Similarly, the exact definition of a is not of interest 2 here -- it is sufficient to note that it is in fact constant since A is a line s e g m e n t and all u-v planes a r e 2 parallel.) Let 2 + 1) = ( u > A 2 ) u 1 v 1 V A (S Q 5 L e A2 ' ( A2* V of t h e u-v plane for G , for t h e value s = s 2 A (s) = (0, 0 ) 2 a A2^ U Q r e t h e c o o r d i n a t e s i n t h e U ' V P l a n e f o r G 1 o f t h e o r i 9 i n + 1. Then for any s, u 2 v 2 since t h e axes A and A are linear. 1 2 For any point P(s,f) on P(s,f) = {ufi) = G rfi), v vfi) - u IUFI)RJS) A 2 since the origin is translated by ( u ^(s), s ) ( s - s ) , vfi)r (s) Q A 2 A (s - s ) , v Q P(s,f) = (u (t) r ( s ) , v (f) r(s), s ) 2 2 u 1 v 1 s 2 A 2 u 2 v 2 s Equating u-coordinates, ufi)r^(s) - ^ A 2 (s-s ) = u (t)r {s) Q 2 Differentiating by s, dr 1 dr p 2 - % (s-s ), s) 2 0 u 2 v 2 s (s - s )). But since P(s,f) must also be a point on G , Q 2 17 and differentiating by s again, dV d % _u (0__d r _ _ d 2 1 ^ 2 L u {t) ds 2 " 2 ds 2 Now differentiating by f, d \ d uM) df uJt) *— = o 1 ds 2 So, d r 2 1 ds If d r / d s 2 2 n f- = 0 or 2 d uJt) — = 0 uJt) 3 df = 0, G is an LSHGC. 1 Suppose d ^ / d s 2 * 0. T h e n d / d f i/.,(f)/u (f) = 0, and u ( f ) = /(u.,(f) for s o m e constant k. But, w e 2 2 already k n o w that u (t)r (s) 2 2 = ^(0^(8) - u (s~s ) M Q so uAt) 1 u (s-s ) = —^ — ^(s) kr (s) A 2 Q 2 2 Differentiating by f, w e have df so u ^ f ) = u for s o m e constant u . Q Q By similarly equating iz-coordinates, w e have v^{t) = v for some Q constant i/ , i.e. the cross-section is a single point, and G is thus a degenerate Generalized Cylinder. Q 1 Thus, a nondegenerate shape can be represented as SHGCs with different (intersecting) axes only if the shape is an LSHGC. 18 3.4.1 The Pivot T h e o r e m Figure 15: The Pivot Theorem The alternate axis problem suggests that the only SHGCs with equivalent representations with different axes are LSHGCs. T h e converse is also true: each LSHGC can be represented with the axis pointing in any d i r e c t i o n , so long as it c o n t a i n s the apex point of the s h a p e (the point at w h i c h its radius is 0) (figure 15). (We will observe a minor restriction on the direction of t h e axis later in this section). This statement is called the Pivot Theorem since it states that the axis of an LSHGC c a n effectively be pivoted about the apex into any d i r e c t i o n . To prove the t h e o r e m , let G = (A 1 V C r, V and G 2 = (A , 2 C , r, a ) be LGCs describing t h e 2 2 same shape, with r(s) = m ( s - s ) , with the same u-v planes (possibly rotated as in the previous Q section), and with A^Sq) = A {s ). 2 Let the u-v coordinates of A (s 2 A (s) 2 = (u A 2 (s-s ), 0 since the axes are b o t h linear. Q is the apex of the shape, since r(s ) {A^SQ) Q + 1) on the u-v plane for G be ( t / , v 1 ^ (s-s )) 2 = 0.) Q 0 u 1 v 1 A 2 A 2 ) u 1 v 1 - T h e n f o r a " S f 19 Now, let C A = (u u (t) and C v = u (t) 2 2 and For any point P ( s , 0 on G = 2 - A P(s,f) = ( u , v ) where: 2 ^ ( O r f s ) , - u A 2 A 2 ( [ ^ ( f ) - - ^ - ] m ( s - s r(s), w h i c h is a point on G . and G 1 v (f) 2 v 1 a " A 2 ( S - S r(s), s ) ) , 0 u 0 2 v 2 ) , ^(f)/77 [ ^ ( 0 2 - - ^ A 2 (s-s ), ( S - S 2 s) Q Q ) - u 2 v 2 s ^ ( S - S q ) , - ] a t 7 ( s - s 0 m ) , s ) u S ) 2 v 2 u 2 v 2 s s s So, each point of G 2 reasoning). Thus, G - m 1 1 T = Q u Q ( S - S 2 ^ 2 . ( s - s ) , v (f)r(s) - v (¿^(0/77 (i/ (f) ) s ) = = - A 1 f ( i / ^ O ^ s ) , = (u (t)r{s) v (f) = v (t) 1 is also a point of G 2 (and vice versa, by similar describe the same shape. By two applications of the Slant T h e o r e m , w e can eliminate the requirement that A the u-v planes of G 2 pass through So, for any LSHGC, the axis may be defined in any direction, but must pass y t h r o u g h the apex. T w o additional restrictions must be noted: the shape may be beveled differently in the two representations just as in the Equivalent RSHGC Problem; and, the u-v planes must pass completely t h r o u g h t h e shape, so the axis is actually prevented from pointing directly away from t h e shape. This latter restriction excludes the axis from belonging to the projection of the shape t h r o u g h its own apex (figure 15). 3.5 Surface Normals of an SHGC The surface normals for an. SHGC can be defined wherever the c o n t o u r function C{i) is d i f f e r e n t i a t e (figure 16). Equation (3-1) gave the coordinates of a point P(s,f) on an SHGC. From this, w e can calculate the tangent vector to the surface in the direction of increasing s as dP 3s t = ( u {t) n c sin a ór ds , v {i) c n ór ds , 1 + u {t) and the tangent in the direction of increasing t as c n cos a ór ds x ) 20 dP/dt F i g u re 1 6 : 3P , du = ( r{s) sin. a — r { s ) dt dv — r { s ) dt r dt r du dv = r(s) ( sin a — — c o dt dt f r Surface Normal of an SHGC r cos a du a— dt r s x So, the outward-pointing surface normal vector N'{s,t) DP du — dt r x ) j at P(s,0 is the cross p r o d u c t of these: DP DS DT , du d r r ^ - n + — dt d s c dv n = r{s) ( - v (t) cos a ^ - + M dt O 0 dr cos a — ds dv r f * - dt d U ç -sin a • u (t) r = rls) ( dt sin a h(t) cos a ds v {t) sin a Q dt + — ~, u ds df sin a — df dr du ds dt - Q ) h(t) sin a —— ) ds w h e r e h(t), defined by du /7(f) = is the Wronskian u (t) c r du /dt df dv /dt Q of the c o n t o u r f u n c t i o n s u Q Q and v Q [14]; h{t) = 0 implies that the SHGC has a line segment for a cross-section contour, i.e. is degenerate. W e will use N{s,t) parallel to N'(s,t), defined by 21 A/(s,f) = N'{s,t) . dr = ( /7(f) c o s a ds r(s) dv + — df du sin a — dt r r h(t) sin a dr ds x ) 3.6 The Corresponding Normal Theorem F i g u r e 1 7 : The Corresponding Normal Theorem Figure 17 shows that the surface normals on a Linear SHGC are parallel along c o n t o u r s of constant i, and for a Polygonal SHGC they are parallel along c o n t o u r s of constant s within a face. stated in the Corresponding Normal Theorem: SHGC is Polygonal iff for almost all t, dN/dt An SHGC is Linear iff for all s, dN/ds = (0,0,0). For the first part of the t h e o r e m , we begin by noting that dr dr = ( h(t) cos a — r - , 0 , - /7(f) sin a — 5 - ) ds* ds* 2 = ( 0 , 0 , 0 ) ; an This says that the surface normals for an LSHGC d e p e n d only on f, and for a face of a PSHGC d e p e n d only on s. dN —— 3s This is 2 x 22 Now for an LSHGC, 6 r/ds 2 Conversely, if dN/ds = 0, so dN/ds 2 = (0,0,0) for all s. = (0,0,0) for all s, then either h(t) = 0, sin a and cos a are both 0, or d r / d s 2 2 = 0. If h(t) = 0, the shape is degenerate. It is impossible for sin a and cos a to both be 0. So, t h e only interesting case is that in w h i c h d r / d s 2 2 = 0, i.e. the shape is an LSHGC. For the s e c o n d part of the t h e o r e m , note that dN dt , ( cos dr dh Kill VJI a A~ ds d VV f > d V-i u1 4 drI I V - sin a — 5 - , - sin a At*r A*. d ds 2 VJ + At df At*r d dh % At df ' Kill ) where dh d v d u 2 2 r = c" W dt - ^ - 'c ( ) — " " df u dt c v v 2 Now for a PSHGC, d u / d f 2 _ 2 c O a n d dN/dt f c v w r S L 2 = 0 and d v / d f 2 2 c = 0 for almost all t (except at t h e vertices), so dA?/df = = (0,0,0). Conversely, suppose dN/dt = (0,0,0) almost everywhere. Using the v-coordinate, since sin a = 0 is impossible (it implies that a = 0, i.e. the axis is c o n t a i n e d in the cross-section planes), it must be thatd u /df 2 2 c dN dt = 0. T h e n wherever dN/dt , dr d V cos a — ) — f - , ds dr (1 + uJt) c So from the s-coordinate, either u (t) Q degenerate (planar). If dr/ds case is that in w h i c h d i v / d f 2 c = (0,0,0), w e have 0, - uJt) ° sin a dr ds = 0 or d r / d s = 0 or d v /dt 2 = 0, using the u-coordinate, d v /dt Q 2 = 0. If i / ( f ) = 0, the SHGC is 2 Q 2 = 0 and d v / d f 2 Q 2 dV. j f - ) dr c 2 = 0. So, the only interesting = 0, i.e. the c o n t o u r C(t) is locally linear. W h e n this is true for almost all t, C(t) is piecewise linear and the shape must be a Polygonal SHGC. The Corresponding Normal Theorem is especially useful in s h a d o w geometry, since the " s h a d o w v o l u m e " (the volume of space shaded by an object) is an LSHGC (figure 18) [17]. 23 F i g u re 1 8 : Surface Normals of t h e S h a d o w Volume 24 4. Projections of SHGCs In this section, w e will begin by exploring the projections of SHGCs onto images. T h e n , w e will describe how images can be analyzed to determine the SHGCs d e p i c t e d . Although the formulations will begin with the most general cases, most of our attention will be given to the case of Right Circular SHGCs, since these are sufficiently constrained to allow interesting analysis from imagery without additional knowledge sources. 4.1 Projected Coniour Generators F i g u r e 1 9 : Contours and Contour Generators Suppose w e have an SHGC, and w e project it along the direction of a vector F = ( f w> f , f ) , as in v s figure 19. The c o n t o u r s along w h i c h the surface is tangent to the line of sight as seen from direction F (i.e. o c c l u s i o n , or parallelism to F ) will be projected by the ends of the SHGC, or w h e r e N ± F , i.e. N • F = 0. The points on the SHGC projected onto s u c h c o n t o u r s are called coniour generators [11]. (Of course, if the SHGC is opaque, some of the c o n t o u r s may be hidden from view.) From this point on, we will use the term " c o n t o u r " to mean " i m a g e of a c o n t o u r generator" (in the above sense), a n d "cross-section f u n c t i o n " to refer to C{t). On the contour generators, 0 = N 'F = f w V , dr ( h(t) cos a ds dv + — ) df n x du - f sin a —^dt r v where h(t) is the contour Wronskian, as previously d e s c r i b e d . - f h(i) sin a 3 dr ds 25 eye Figuré 2 0 : Viewing Direction and Angle Unless otherwise stated, w e will presume in the following discussion of projection and imaging that w e are dealing only with Right SHGCs, i.e. SHGCs with cross-sections perpendicular to thè axis. This allows the simplification of rotating the w-v axes as desired; in particular, w e will presume that F i s in the MAS plane, i.e. f = 0. Without loss of generality, w e can then presume that F i s between - l,Vand S; if the angle from F to S (the viewing angle) is <r, then F = ( - sin a, 0, cos a) (figure 20). Additional simplification arises for an RSHGC since sin a = 1 and cos a = 0. T h e n , for an RSHGC, the contour generator points satisfy dv 0 = sin a — ^ dt n + h(t) cos a dr ds There are three interesting cases, illustrated in figure 2 1 : e n d , side, and oblique views. (4-1) If F || S ("end v i e w " ) , sin a = 0 and the c o n t o u r generator points satisfy 0 dr = M o ds dr In this case, either h{t) = 0 o r — = 0. But, h{t) = 0 only if the RSHGC is degenerate (planar), so the ds only interesting case is dr/ds = 0, i.e. the c o n t o u r generators are cross-sections at extrema (relative maxima and minima) of r(s) (Marr's "radial extremities" [11]). l f F | | W ("side v i e w " ) , cos a = 0 and the contour generator points satisfy 26 F i g u r e 2 1 : End, Side, and Oblique Views So, the c o n t o u r generators are at the extrema of v ( f ) . c If F f t S a n d F}f M/("oblique v i e w " ) , there is no simplification from equation (4-1). It is easy to imagine a dichotomy for oblique views between " e n d - l i k e " views and " s i d e - l i k e " views as if there were an abrupt c h a n g e from one to the other as F swings from S t o W. However, there is actually no abrupt c h a n g e , but rather a steady c h a n g e in the c o n t o u r generators. 4 . 1 . 1 P l a n a r i t y of C o n t o u r G e n e r a t o r s A set of points { P } = { ( p , p , p ) } is planar iff there exist constants a, £>, c, and d s u c h that, for all w points in the set, ap v + bp W s + cp + d = 0. W e can use this to determine some conditions on s V planarity of c o n t o u r generators. In an end view, 0 = d r / d s along a c o n t o u r generator. satisfy p s = s where d r / d s = 0. So, u rt °Pw + °Pv + P s - Thus, the points on a c o n t o u r generator S 0 = 0 and the contour generator must therefore be planar. Further, the plane containing the c o n t o u r generator is perpendicular to the viewing direction F = (0, 0,1) for an end view since F* P - s Q = 0. 27 In a side view, 0 = dv /dt. But this is a function of f, so dv /dt n n . = 0 for some f . n Each s u c h value of t defines a single contour generator. On this c o n t o u r generator, t = ? a n d Q Q P(s,f ) = ( P . P > P ) = (u (t )r{sh 0 v W V S c( o)Pw- c( o)Pv f u f c + 0 ^s so the contour generator is planar. can be simplified to p w v ( f ) r ( s ) , s) Q + 0 = c Q 0 In addition, if for s u c h t w e have u (t ) Q Q Q = 0, then the equation = 0, i.e. the plane containing the c o n t o u r generator is perpendicular to F ( a n d parallel to the image plane). However, for oblique views, the c o n t o u r generators are generally not planar. There is no easy method for evaluating the planarity of the c o n t o u r generator defined by equation (4-1). Instead of the above criterion, if specific functions t / ( 0 . Q(t)> v c a n d r ( s ) are? k n o w n , the torsion of the c o n t o u r generator can be evaluated; it must be 0 for the c o n t o u r generator to be planar [4]. In the special case of LSHGCs, w e have r = m (s-s ) Q and dr/ds = m. So, the contour generator satisfies: dv 0 = sin a — + dt c m h{t) cos a (4-2) The above expression is only a function of t. Thus, for a given c o n t o u r generator, the above equation holds true for some value of t Qi and the c o n t o u r generator is planar by the same reasoning as used for a side view. So, for an LSHGC, every c o n t o u r generator is planar. 4.2 Images of Right SHGCs The world coordinate system is defined as s h o w n in figure 22, by aligning X and Y horizontally and vertically (respectively) on the image plane, and letting Z point towards the eye (or camera) The viewing direction F i s then the same as Z , i.e. F = ( 0 » 0 , 1 ) xyz (where x y z denotes world coordinates). The discussion of imaging in this paper will be primarily limited to orthographic world point (x,y,z) is mapped onto the image point (x,y) xyz projection, in w h i c h a . xy Suppose we are looking at an RSHGC. Without loss of generality, w e can presume that S is in the X - Z p l a n e , between Z a n d X. Then the viewing angle o is measured from Z t o w a r d s S ( s i n c e F = Z ) . Since WV-S is right-handed, W is in the XZ upward, V = Y. The important vectors are t h e n : plane between X and - Z and 1/ points vertically 28 .Y=V Z=F \ eye P' F i g u r e 2 2 : Object and W o r l d Coordinate Systems F = ( - sin O, 0, cos A)wvs W = ( 1 , 0, 0) V = (0, 1, 0) S = (0, 0, wvs wvs 1) wvs » <°' °' V = (cos a, 0, - sin A) xyz = (0, 1 , o = (sin a, 0, cos A) xyz )xyz For any point P, p = s ) ^ = w IV + v V + s S = (w cos a + s s/n a, v, - w s/n A point P(s,f) on an RSHGC is therefore P(s,0 = (u (t) Q a + s cos a) xyz r(s), v ( f ) r(s), s ) ^ c = (u (t) r(s) cos A + s s/n a, v ( f ) r(s), - a ( f ) r(s) s/n A + s c o s a) Q c Q and its image under orthography is (figure 23) /(s,0 = (x,y) ( s , f ) xy = ( u ( f ) r(s) cos G + s s/n a, f ( f ) r f s ) ) ^ c c W e will presume that the image of t h e origin of the RSHGC is (0,0) ; otherwise, an additional xy translation of the image points will occur. In addition, w e are presuming here that there is no scaling difference between w-v-s and x-y-z coordinates. 4.2.1 Contour Generators Under Perspective Projection While the bulk of this discussion c o n c e r n s orthographic projection, in w h i c h the image of a point (x, y, z) is (x, y) xyz projection, , it is also possible to analyze the c o n t o u r s of RSHGCs viewed under xy in w h i c h the image of (x, / , z) is ( - x / z , - y/z) xyz perspective if the unit of measure is t h e focal length xy 29 Figure 23: Image of a Point on a Right SHGC of the lens (this is the same coordinate system as that of Shafer et al. [15]). Since translation in space affects a perspective image, it is necessary to generalize the imaging model used above to allow for the position of the object in the scene, as well as the possibility that the axis of the image of the object does not pass t h r o u g h the origin of t h e image. eye = Pe Figure 24: Imaging Under Perspective Projection The contour generator analysis itself can be accomplished by considering the eye (center of the lens) to be located at a point P Q = (w &1 v Qf s ) in the object-centered coordinate system, as in figure Q 24. Then, at each point P{s,t) on the surface of the object, the line of sight is the vector F(s,0 from the eye to P(s,0, defined by: 30 F(s,f) = P(s,/) = (u {t) P e r(s) - w , v {t) r(s) - v , s - Q e Q Q s ) e Along a c o n t o u r generator, w e still have N _L F , so 0 = A/ * F . While both the imaging and c o n t o u r generator problems are therefore more difficult under perspective projection, they may still be solvable, particularly for relatively constrained cases s u c h as the analysis of Right Circular SHGCs. 4.3 Projection and Imaging for Right Circular SHGCs For Right SHGCs w h i c h are also Circular SHGCs (CSHGCs), there is considerable simplification in the orthographic projection a n d imaging relationships. Recall that, for a Circular SHGC, u (t) = cos 2MT Q and v {t) sin 2MT and Q = sin 2MT So, 2TT dt cos 2MT = 2M and dv h(t) = u = { 0 n dt d i / . ( 2IR cos 2 0 2MT + 2M sin 2 2MT dt 2tt The c o n t o u r generators for an RCSHGC therefore satisfy dr 0 = 2M sin <j cos 2MT + 2 7 r cos a ds i.e. (figure 25) 1 t = cos" ( 1 -cota 2M (4-3) ) So along the c o n t o u r generator, dr u {t) n u = COS2MT = -cota ds where v ( f ) > 0 on the upper half of the shape, and v (t)<0 c Q on the lower half. 31 eye F i g u r e 2 5 : Contour Generator on a Right Circular SHGC Now, since t is a function of s along the c o n t o u r generator, the points P(s,f) along the contour generator can be specified as P ( s ) , a function of s only: C G P C G ( s ) = ( -cotar(s)—, ±r{s) yj 1 - cot 2 <x ( d r / d s ) , s ) 2 ds and the c o n t o u r generator includes points s u c h that v (t) is defined, i.e. Q 1 - cot dr ds a ( — ) ds 2 > 0 ~ 2 < \tan a\ The c o n t o u r generator is not generally planar in an oblique view. On an RCSHGC, the image of a point P(s,f) is /(s,f) = (r(s) cos 2mt cos a + s sin a, r{s) sin 2irt) (4-4) xy and for a point on a c o n t o u r generator, = < X C G ' ( W( >xy = V ~ (s) S cos 2 a dr r sin a ds + s sin a , r[s) V l Further, the slope of the image contour, d y the following derivation: - cot 2 a (dr/ds) 2 ) w xy C Q /dx C G , can be determined as a function of dr/ds (4-5) using 32 d x — 2 a . n cos _ n = ds a , 2 ( sin i = s / n a 2 ( s d r _ _ ) + ( _ ) 2 ) ds G o 1 ( dr r - c o x + s / n Q ds d G r 0 2 r r(s) — 5 - - cor d s " 2 d G 2 r ( \ ) d 1 j s dr d r 2 d y p g ds = V l - c o f 2 a ( d r / d ) s 2 4 ^ " ds - 0 / V - ! - c ? o ( d r / d s ) 2 2 ) c o f d = ( 1 / V l - c o f a 2 ( d r / d s ) 2 ) ( 1 - c o f a 2 r(s) d y ^ dx C Q = dy c g ds ds dx = ( 1 / ^ ^ c d Q $ 2 ^ ( d r / d g ) 2 } r ( s ) ds ds d 2 — 5 - d s <r 2 - c o f 2 a s dr^ C Q ( ) d 2 ) s ( 4 6 ) ds 4.3.1 Occlusions a n d Singularities in image C o n t o u r s W h e r e | d r / d s j > ifan <x|, there will be n o points o n t h e c o n t o u r generator. This causes occlusion of t h e c o n t o u r generator from view, with resulting discontinuities in t h e visible c o n t o u r s . To study this p h e n o m e n o n , suppose w e begin with t h e object at a side view (<r = t t / 2 ) , a n d let us study t h e c o n t o u r generator as w e rotate the object t o w a r d s an end view ( a = 0). At t h e start, tan G is infinite a n d | d r / d s | < tan G for all s. T h e r e will b e a single c o n t i n u o u s c o n t o u r generator o n t h e object, w h i c h will in fact be planar (running along t h e t o p a n d b o t t o m of t h e object) (figure 26). As w e rotate t h e object slightly, decreasing G a n d hence tan a , as long as | d r / d s | < tan G t o w a r d s that e n d . t h e c o n t o u r generator will still be c o n t i n u o u s (figure 27). However, it will n o longer b e planar (unless the object is also a Linear SHGC, w h i c h w e will n o t consider further here). From equation (4-3), w e see that w h e r e d r / d s is 0, t = 1/4, i.e. t h e c o n t o u r generator is on " t o p " of t h e object. (Of course, there is also an identical c o n t o u r generator on the bottom.) Where d r / d s < 0, t > 1/4 a n d the c o n t o u r generator is pushed away from us; w h e r e dr/ds > 0, t h e c o n t o u r generator is pulled towards us. T h e variation in t as w e travel along t h e shape is expressed by: dt . I I I T v d r = ( 1 / 27r cos G ysin' G - cos* G (dr/ds)* ) — o " ds ds* Since | d r / d s | < |fan G\ along t h e c o n t o u r generators, t h e sign of d r / d s d e p e n d s only on t h e sign of d r/ds . 2 2 Note also that | d r / d s | > \tan G\ at t h e ends of t h e object, hence t h e contour generator no longer includes the ends as t h e object is slightly rotated away from a side view. 33 image top view showing contour generator t ^eye dr/ds Figure 2 6 : Contour Generator in Side View Let us presume for the moment that the object is thinner at the near e n d , i.e. d r / d s < 0 everywhere. Eventually, we rotate the object so m u c h that d r / d s = -tan is at a minimum (figure 28). At this value, since d r / d s | C Q generator is tangent to the line of sight at s . /ds | = - fan a and d r / d s 2 m j is a relative minimum for d r / d s ) , we have d x a at some value of s, say s m C Q /ds | m If w e rotate the object yet farther, there will be an interval (s , s.) around s a b | where d r / d s = 0 (because s m m I = 0 and d y 2 t = 0 . Thus, the contour m in w h i c h d r / d s < - tan a, i.e. for w h i c h no c o n t o u r generator points.exist (figure 29). What has happened is that the former, single contour generator has been split into two separate c o n t o u r generators, corresponding to values of s s u c h that s > s and s < s . Along the c o n t o u r for s > s , all points will be visible in the b a b image (i.e. none are o c c l u d e d by the object itself in this vicinity). ^cg^^cg ' s ' ^ ' n n t e a s w e approach s b Further, note that the limit of from above, i.e. the c o n t o u r in the image becomes asymptotically vertical as w e travel towards s : the c o n t o u r thus "flares o u t " towards the vertical in b this region. 34 image top view showing contour generator Figure 2 7 : Contour Generator in Near-Side View Meanwhile, along the c o n t o u r for s < s . t h e object itself will o c c l u d e part of the c o n t o u r generator, for values of s above some value s a c (where s „ < s J (segment X in figure 30). S u p p o s e the c o n t o u r c a generator is o c c l u d e d for s o m e s , w h e r e s < s < s . T h e n Q 3 s > s s u c h that x ^ f s ^ = * 1 b c C G Q a ( s ) and l y ^ s ^ l > | y 0 C G (s )| n This, unfortunately, c a n n o t be further simplified to a c o n d i t i o n on s without s o m e k n o w l e d g e about the behavior of r(s) (the fact that d r / d s > - tan a above s b gives no useful constraint here) - thus, segment X (in figure 30) is hard to characterize. In any event, r(s) can be determined for segments A, e , and V. What w e have seen is a single image c o n t o u r splitting into two parts c o n n e c t e d by a sort of " T " j u n c t i o n ; the split o c c u r r e d at the point at w h i c h the c o n t o u r generator was tangent to the line of sight. This illustrates an important kind of "special v i e w p o i n t " for curved surfaces: If a visible arc in the scene is tangent to the line of sight, then a small variation in the viewpoint can cause a topological c h a n g e in the image of the arc. 35 4 . 3 . 2 C r o s s - S e c t i o n s D e s c r i b e d by Fourier C o e f f i c i e n t s T h e use of Fourier coefficients for t h e functions u {t) and v (t) allows more complex cross-sections Q c than circular ones to be d e s c r i b e d , while retaining some degree of mathematical tractability. Suppose, for example, that the cross-section of an RSHGC is described by one set of Fourier coefficients, w h i c h allows ellipses with arbitrary position, rotation, scale, and eccentricity. Using the notation of Kuhl and Giardina [10], w e have: C(t) = (u Q1 v )(i) Q = (>A + a cos 2<n\ + 0 1 so du r v dt = - 2773, sin 2mt + 2mb. cos 2<nt 1 1 sin 2*nt, C Q + c cos 2it\ + 1 sin 2irt) 36 top view image showing contour generator dr/ds Figu re 2 9 : Contour Generator Split at Near-End View image r(s) Se F i g u re 3 0 : àv dt Sa V J , M Sb Contour Pieces Correspond to Disjoint Intervals of s = - 2 7 T C , sin 2*nt + 2md. cos 2irt 37 h(t) = 2TT ( {A d^ + C bJ Q cos 2irt - ( A c Q Q + C ^ ) s/n 2?rf + afi 1 + A ) The points on the c o n t o u r generators must obey: 0 = Sin <7 (c^ COS 27Tf - C S/H 27Tf) 1 dr , - cos a x v (A d Q t = (1 / 2 7 r ) s / n - 1 1 + C ^ ) cos 27rf - ( / \ c Q ( (-eg + f\/e 2 + ? - g )/(e 2 2 1 + C ^ ) s/n 27rf + + b ^ ) + f ) ) 2 where dr e = -c+sinv + (>A c. + C L a J c o s a n 1 0 1 0 V d s dr f = s//7 a - ( A d . + C b J cos a n n o 1 1 g = -(a cf 1 1 + b^cjcoso d s dr — Since f has been expressed here as a function of s along t h e c o n t o u r generators, w e can presumably express points along the c o n t o u r generators as P C G ( s ) and c o n t o u r points as / C G (s). M u c h of the following analysis of Right Circular SHGCs will therefore be applicable for RSHGCs with arbitrary ellipses as cross-sections; while the closed-form expressions will be complex, actual numeric analysis should not be difficult. For cross-sections described by two sets of Fourier coefficients (i.e. A , a Q d ) , analysis is yet more difficult but still conceivable. 2 v a , b 2 v b , C , c 2 Q v c , 2 d v For additional coefficients, however, s u c h closed-form analysis seems beyond tractability. 4.4 Contour and Silhouette Analysis for Right Circular SHGCs In image understanding, we are faced with the problem of analyzing image c o n t o u r s rather than predicting them. W e can accomplish this task using the above description of the properties of c o n t o u r generators. S u p p o s e we have a line drawing consisting of visible (i.e. unoccluded) c o n t o u r s , each of w h i c h is the image of some c o n t o u r generator on a Right Circular SHGC. By analyzing the c o n t o u r s , we can construct a description of the solid shape portrayed. F i g u r e 3 1 : Aligned Image of an SHGC First, w e need to determine the viewing angle a and to align the image as in figure 3 1 , so t h e images of the endpoints of the axis A(0) and 4 ( 1 ) are at (0,0) and (sin <x, 0) xy , respectively; this xy c o n f o r m s to the imaging model presented previously. T h e n , w e can analyze t h e c o n t o u r s to recover the shape; for a Right Circular SHGC, w e need only determine r(s), t h e radius f u n c t i o n , to have a complete description of the shape. W e will begin by addressing the latter problem -- analysis of c o n t o u r s when the image is aligned and a k n o w n . T h e n , w e will examine h o w to determine or and perform the alignment. 4.4.1 Contour Analysis Along a c o n t o u r generator of a Right Circular SHGC, recall that equations (4-5) and (4-6) give * C G (s), y C G ( s ) , and d y C Q /dx C G as functions of s, r(s), and d r / d s . These allow us to solve for s, r(s), and d r / d s , the shape description, as functions of * (s), y ( )> s C G C G measured in the image. We obtain: W > - W > s s c o s 2 sin a ° ( ^r/ d d x CG) CG a n d d VcG / d x CG' w h i c h c a n ^ e 39 image x,y description r(s) Figure 3 2 : Contour Analysis Results in Shape Description So, given any c o n t o u r point ( * ( s ) , / c G ^ ^ x y ' C G a n c l ^ e s '°P e d ^cG / c l x C G °* t h e c o n t o u r a t t h a t point, we can determine s, r(s), and d r / d s at that point. By doing this for all c o n t o u r points, w e can determine as much as possible about r(s) from the image (figure 32). As stated earlier, this analysis presumes that a is k n o w n and that the image is appropriately aligned. 4.4.2 Occluded Contours and Silhouettes W e have seen how to analyze c o n t o u r s to determine values of r(s); now, w e will discuss h o w m u c h of r(s) can be reconstructed in this manner (i.e. over what range of values of s). As w e already know, there is a contour generator only where | d r / d s | < \tan a|; values of s for w h i c h | d r / d s | > \tan a\ therefore d o not c o r r e s p o n d to any points on a c o n t o u r generator, and r(s) c a n n o t be determined for these values by examination of image c o n t o u r s . In addition, as described in section 4.3.1, the object itself may o c c l u d e portions of the c o n t o u r generator from view. For analyzing a silhouette, exactly the same methods and conditions apply, except that, using the notation of section 4.3.1, the c o n t o u r for s < s will render invisible the c o n t o u r for s > s. w h i c h lies to — c — 0 the left of ' C G ( s ) ; thus, in figure 30, only segments A and B will be visible. This may be stated as c follows: The contour generator for s is o c c l u d e d or invisible if Q 3s^s Q s u c h that x C G ( S l ) = * C G (s )and I W M n * IW o>l s The only difference between this case and the above discussion for s < s is that the requirement s a s b has been generalized to s 1 1 > * s . Thus, silhouettes are simply images of c o n t o u r s in w h i c h certain Q portions of some c o n t o u r s are not visible. If dr/ds > 0, the situation is just the above viewed from the opposite direction (i.e. segments A, B, 40 and X in figure 30 will be visible, and segment V will be occluded). In this case, when the c o n t o u r generator splits, the arc for s < s is still o c c l u d e d , but t h e arc for s > s is a closed curve in the image a b rather than flaring out as above. Silhouette analysis will be identical; indeed, the silhouette of an object is identical (to within a reflection) viewed from opposite directions. In any of these cases, there will be an interval of s over w h i c h r(s) c a n n o t be c o m p u t e d , say (s., s.). However, w e can c o m p u t e r(s.), r(s.), d r / d s | , and d r / d s | . For p r a c t i c a l image analysis, it is ' i i possible to estimate r(s) over (s., Sj) by fitting a function w h i c h c o n f o r m s to these constraints. For 1 example, a cubic polynomial can be fit to the data: r(s) = a s 3 + bs + cs + d 2 so dr ds = 3as 2 + 25s + c Then the following system of linear equations can easily be solved to determine the values of a, 5, c, and d: " 3 2 b r(s,) dr/ds | J J, 3s. ; dr/ds * •s. J J L 3s. J 2 2 i 2s. 2 s J 1 a 1 b 1 0 c 1 0 d s. 1 4.4.3 Aligning the Image The above analysis has presumed that w e k n o w t h e viewing angle a and have aligned the images of the axis endpoints A(0) and 4 ( 1 ) onto (0,0) and (sin a, 0) xy , respectively. W e will now address t h e xy problems of aligning the image and determining a. Suppose w e are given an image of the c o n t o u r s of a Right Circular SHGC, arbitrarily scaled, rotated, and translated, and viewed from an u n k n o w n angle. W e can immediately determine the image of the axis, since this will be an axis of symmetry in the image, and rotate the image so this is horizontal. By translating the image, this axis can be made to line up with the x-axis. Brooks [3] and Marr and Nishihara [12] discuss this issue of finding the image of the axis of a generalized cylinder. W e must next determine w h i c h end of the object is nearer, so this can be placed on the right as in our imaging model. If the left end is closer, we will need to reflect the image about the / - a x i s , or e q u i v a l e n t s rotate it 180° about the origin. 41 W e must also determine a and find the images of the axis endpoints. Determining a is more important, since it affects both the image alignment and the shape of the reconstructed function r(s). The axis endpoints, on the other hand, affect only the scale and shifting (along s) of r(s). Figure 3 3 : RCSHGC With Near End Flat If the closer end of the object is flat as in figure 33, i.e. r(1) > 0, then the edge of the cross-section at that end will produce a contour in the image, w h i c h will be a vertically elongated ellipse. This is a very useful configuration, since w e can easily determine w h i c h end of the object is closer. T h e n , w e know that the center of the ellipse must be the image of the axis endpoint A(1); further, w e can c o m p u t e the viewing angle a from the eccentricity of the ellipse, using cos a = b / a , w h e r e a and b are the semimajor and semiminor axis lengths, respectively. If the farther end of the object is flat and not o c c l u d e d , i.e. r(0) > 0 and d r / d s | < fan <x, then w e will Q se exactly half of an ellipse, w h i c h can be analyzed as above to determine w h i c h end of the object is farther, the image of /1(0), and a. If neither end can be analyzed as above, w e may be able to determine whether any " T " - s h a p e d occlusions o c c u r along the contour; if so, the o c c l u d i n g c o n t o u r generator is on the nearer portion of the object. Failing this, w e c a n n o t from c o n t o u r s alone decide w h i c h end of the object is nearer. Fortunately, there are many other potential sources for alignment information, s u c h as the object's length or width, or surface normals as determined by photometry or range data. It should be noted that, for a curved surface, scaling the figure along s and altering the viewing angle a are not complementary; i.e. w e c a n n o t keep the image c o n t o u r s constant by altering the viewing angle and compensating with elongation of the object. The reason is that elongation does not alter the position of the contour generators on the shape, but when the viewing angle is altered, the c o n t o u r generators " c r e e p " along the surface to a different position. This o c c u r s because within 42 a local neighborhood of a point, the angle between the surface normal N and the viewing direction F varies. This may be contrasted, for example, with polyhedra under orthography, in w h i c h this angle is constant, causing c o n t o u r generators to remain in place, and allowing elongation and rotation of the viewing direction to compensate to keep the image constant. The d é p e n d a n c e of c o n t o u r generator position upon the viewing angle is the reason that s and r(s) d e p e n d u p o n a in a complicated manner rather than being, say, proportional to sin a or cos a. 4.5 Contour and Silhouette Analysis for Other RSHGCs There are several steps to be performed w h e n analyzing c o n t o u r s of any Right SHGC, as illustrated in the above discussion of Right Circular SHGCs: 1. Finding the image of the axis line. 2. Finding the images of the axis endpoints. 3. Deciding w h i c h end of the axis is nearer. 4. Determining the viewing angle, a. 5. Determining t h e cross-section, C(f). 6. Determining the radius f u n c t i o n , r(s). Steps 1-4 are required to align the image; t h e n , c o n t o u r analysis can proceed to perform steps 5-6. If the near end of the RSHGC is flat and b o u n d e d by a sharp edge, i.e. r(1) > 0 and — L is finite, its ds edge produces a c o n t o u r w h i c h can be analyzed to assist in steps 1, 2, and 4, and to solve 3 and 5. If the near end is not flat but the far e n d is flat and p r o d u c e s a visible contour, it can be used to assist in steps 1, 2 , 4 , and 5, and to solve 3. For solving step 1, w e can also use the fact that, for any two points with the same s-value but different f-values, the tangents to the surface in the direction of increasing s will intersect at a point on the axis (figure 34). This can be seen by noting that on an RSHGC, for given values of s and f, P(s,f) = (u (t) Q r(s), v {t) r(s), s) Q dr ds So the vector from P in the direction dP/ds intersects the axis at the point 43 Figu re 3 4 : ( 0, 0, s - Tangents at Corresponding Points Intersect on the Axis r(s) dr/ds Since this is independent of f, w e can take two points with the same s-coordinate, draw the respective tangents dP/ds, and the intersection of these latter will be some point on the axis. In the image, the same relationship holds, using tangents to visible c o n t o u r s , providing the c o n t o u r generators are arcs of constant i (so that their tangents are in fact dP/ds). Of ocurse, to make use of this p h e n o m e n o n , some means w o u l d be required for finding points with the same s-coordinate. Surface markings or knowledge of C{i) might make this possible. 4 . 5 . 1 C o n t o u r s of R i g h t L i n e a r S H G C s Right Linear SHGCs have some additional properties that can aid in c o n t o u r analysis. First, recall that equation (4-2) gives the condition satisfied by points on the contour generator of a Right Linear SHGC. This is a condition only on f, so the c o n t o u r generators are curves of constant f. implied also by the Corresponding Normal Theorem, dN/ds This is = (0,0,0) for an LSHGC. So, each contour generator is a straight line of constant t on the surface. These lines must all pass through the apex of the shape, so any two such contours in the image must intersect at the image of the apex. This is one point on the axis; by the the Pivot T h e o r e m , the axis can then be defined in any direction passing through this point. On the other hand, it may be very difficult to determine a unless the cross-section function C(t) is k n o w n in advance, since so little information is contained in the image contours. Interestingly, the c o n t o u r generators in an oblique view need not c o r r e s p o n d to relative maxima 44 side view oblique view Figu re 3 5 : end view Contour Generators Need Not Be At Vertical Extrema and minima of v (t), i.e. the c o n t o u r generators need not be on the " t o p " and " b o t t o m " of t h e shape, Q but may o c c u r where dv /dt Q * 0. For example, figure 35 s h o w s a c o n e with a vertical stripe. In an oblique or end view, parts of the surface will be visible on both sides of t h e stripe. On a Right Linear SHGC, there will be no partially o c c l u d e d c o n t o u r s (except possibly at the near end of the shape), since all c o n t o u r generators are linear. 4 . 5 . 2 C o n t o u r s of Right Polygonal SHGCs A Right Polygonal SHGC has t w o types of c o n t o u r generators: faces tangent to the line of sight, and creases. A c o n t o u r generator on a face obeys 0 = N ' F, s o dr m tan a w Figure 3 6 : Crease Contours for a Right Polygonal SHGC 45 In addition, each vertex of the polygonal cross-section creates a crease on the surface w h i c h might be visible in the image, so each crease is in effect a c o n t o u r generator (though not normally tangent to the line of sight) (figure 36). If C(t ) = {u , v ) is a vertex, then Q P{sJ ) Q = P C Q C G Q ( s ) = ( t f r ( s ) , v r ( s ) , s) 0 /(s,f ) = / ( s ) = ( x 0 Q C G Q ,y C G ) (s) x y = (u r(s)cosa 0 + ss/na, v r{s)) Q xy Since crease c o n t o u r s provide so m u c h information in the image of a Right Polygonal SHGC, we will limit our attention to creases in the following discussion. First, we note that tangents to crease c o n t o u r s for corresponding points intersect at a point on the image of the axis, just as described above for c o n t o u r generators on an RSHGC. It is especially easy to find pairs of corresponding points on a Polygonal RSHGC, as in figure 37. Suppose C{tJ = (u v and C ( f ) = ( u , v ) are vertices c o r r e s p o n d i n g to visible crease contours. Then for any s, the slope 2 2 2 of the image line joining /(s,^) and l(sJ ) 2 is: Ay v r(s) - v r{s) Ax u r{s) cos a + s sin a - i / r(s) cos a - s sin a 2 2 v A 1 (u 0 2 - - u ) cos a A ^—^ F i g u r e 3 7 : Tangents of Crease Contours Intersect on the Axis w h i c h is independent of s. Thus, the slope of the line joining corresponding points on the two crease contours is constant. By examining either end of the PRSHGC, we can pick two vertices, find the slope of the line joining these, and thus find pairs of c o r r e s p o n d i n g points all along the associated crease contours. In this way, the image of the axis can be f o u n d . This will only fail in the event that the crease c o n t o u r s have constant slope, i.e. the shape is also a Linear SHGC. In s u c h a case, however, as described above, the apex is easily f o u n d , and other points on the axis can be arbitrary. 46 Unfortunately, there seems to be little direct evidence in the crease c o n t o u r s to indicate the viewing angle a . Similarly, while the authors believe the images of the axis endpoints ought to be easily determined, no direct method has yet been f o u n d . Perhaps this problem is deceptive in its apparent simplicity. In any event, at the present time, outside k n o w l e d g e seems necessary in order to align t h e image for contour analysis. Supposing that the image has in fact been aligned in a c c o r d a n c e with our imaging model, t h e analysis of the crease c o n t o u r s is straightforward, and is based on these formulae: dx — = ds r r n 0 ~ ds u 0 9 "n< sin a d r / d s > sin <j + U q COS a ( d r / d s ) C Q So, at any point / + ds ds «frcfl dx dr u cos a C G (s) = (* _ C G ,y C G ) (s), VnXr.rM)-Unyc.rSs)c° ° s v stn a Q r(s) = Ç Q o v dr d s sin a ( d y ~ o~ ^o v r G c o s o r ( d /dx C G ) W CG d x ) A "special v i e w p o i n t " will not normally arise with crease c o n t o u r s , since a crease c o n t o u r is tangent to the line of sight only if d x C Q / d s = 0 and d y C Q / d s = 0, i.e. in one of t w o situations: • d r / d s = 0 and a = 0: an end view • v Q = 0 and d r / d s = -tan a / u\ Q a vertex on the u-axis, w h i c h creates a horizontal crease w h o s e image c a n n o t o c c l u d e (nor be o c c l u d e d by) that of any other crease. 47 4.6 Contour Generators in Two Views generator 2 Figu re 3 8 : Figu re 3 9 : generator 1 C o n t o u r Generators From Two Points of View Shadow Line is a Contour Generator for the Light S o u r c e Suppose we have an object w h i c h is being viewed by t w o cameras, from two different directions. What will the c o n t o u r generators from one point of view look like in t h e image as seen from the other point of view? This is an important question for image understanding, since it bears on three different imaging situations: • Stereo -- Commonly, two different cameras are viewing the same scene, and corresponding points in the two views must be f o u n d . However, the c o n t o u r generators from one view generally d o not match the c o n t o u r generators from the other view (figure 38). So, w e need to determine how t h e c o n t o u r generators from one image appear in the other image. • Range Finders -- A c o m m o n type of range-finder has a separate illuminator and camera, 48 and uses triangulation to determine the distance to various points in the scene. However, points o c c l u d e d from illumination are generally not the same as the points o c c l u d e d from the camera. Since the boundaries of occluded areas are the projections of c o n t o u r generators onto b a c k g r o u n d objects, w e want to know how the c o n t o u r generators as pertains to the illuminator are viewed by the camera. • Shadow Geometry -- In images with strong light sources and low ambient ("diffuse") light levels, shadows will frequently appear. (usually highly visible) "shadow line" If an object is illuminated, there will appear a (also called "terminator") separating the illuminated part of the object from the self-shaded part of the object (the part facing away from the light source) (figure 39). This s h a d o w line is simply a c o n t o u r generator from the point of view of t h e light source, a n d w e want to k n o w how to analyze its image as seen by the camera. eye F i g u re 4 0 : T w o Angles Define the Illumination Direction Since this last situation is highly intuitive, w e will c o u c h the following discussion in terms of shadows. W e will use L = ( / , / , / ) to d e n o t e the direction pointing at t h e light source. T h e angle of W V s illumination, A, will represent the angle from L to S , and /? will be the dihedral angle at S from t h e S - F plane to the S - L plane (figure 40). Then L = ( / , / , / J = ( - cos fi sin \ , sin /? sin \ , COS \) w w 49 On a Right SHGC, the shadow lines must obey N ± L, i.e. 0 = N'L dv = cos B sin X — + dt du sin B sin X — + dt r dr r h(t) cos X ds F i g u r e 4 1 : S h a d o w Line on a Right Circular SHGC In the case of a Right Circular SHGC, as s h o w n in figure 4 1 , the shadow line condition simplifies to: 0 = sin X cos {2irt i = p 4- 2TT 1 cos' - /?) + cos X , 1 \ - cot X 2TT dr ds dr . ds ) This is similar to the relation between s and t for c o n t o u r generators seen from F, except for the addition of the term $/2m w h i c h represents the shift in f-coordinates d u e to the dihedral illumination angle relative to the axis. On the s h a d o w line, uJt) = cos 2mt = - c o s /? cot X — ficotX ds v {t) = sin 2irt = V Q = \lcos 2 1 - " (0 - sin ft /8 V 1 - cot* cot X i 2 (dr/ds) 4 2 c fi - cos 2)3 c o f X ( d r / d s ) 2 2 - s/n 2 £ c o f X ( d r / d s ) [1 - cot 2 2 2 X (dr/ds) ] 2 1 / 2 From this point, while derivation of P(s), /(s), and d x / d s is achievable, the derivation of d y / d s , and hence d y / d x , s, r(s), and d r / d s seems to be very difficult. The exhaustive analysis of s u c h image contours is thus beyond our reach at present, even for the relatively simple case of Right Circular SHGCs. 50 One c o n c l u s i o n , however, can be reached: since the interval of uncertainty of r(s) decreases with an increase in the viewing angle a or t h e illumination angle X, w e get additional information from t h e shadow line for Right Circular SHGC only w h e n X > a, i.e. the illumination direction is more nearly perpendicular to the axis than is the line of sight. Under perspective projection from the s e c o n d (illuminator) point of view, for example if t h e light s o u r c e is a point s o u r c e rather than being infinitely far away, t h e illumination direction b e c o m e s L(s,/), a function of s and f, and shadow-line analysis is far more difficult. 4.7 Analysis of Surface Normals In an image understanding situation, information about surface normals may be available from s u c h sources as photometric analysis, texture analysis, shadow geometry, or range-finder data. Surface normals can be used to aid in the analysis of an image of an SHGC. 4 . 7 . 1 I n d i v i d u a l S u r f a c e N o r m a l s of a n R C S H G C F i g u re 4 2 : Knowledge of a Single Surface Normal W e will begin with the simplest case: a single surface normal of a Right Circular SHGC (figure 42). With the image aligned as above, let /(s,f) be the image point at w h i c h the surface normal is given. Equation (4-4) above gives /(s,f) as a function of s, t, r(s), and a. The surface normal itself has t w o degrees of freedom, specifying its direction, since its length is irrelevant. The surface normal of an RCSHGC is: 51 N(s,t) = (cos 2mt) W + (sin 2mt) V - ( d r / d s ) S / = ( c o s a c o s 2itt - s/n a dr , sin 2mt ds ì - s/n a c o s 27rf - c o s a We can describe the direction of the normal by its gradient n , n ) (s,f) dr ds x ) x y z [15]: if the normal vector is Af(s,f) = (n , x . then its gradient is G(s,0 = (p,Q) (s,f) p(s,f) = n n = z s/n a ( d r / d s ) - cos a c o s 27rf — sin a cos 27rf + cos a ( d r / d s ) : : n , - sin 2irt = -x- = n s/n a c o s 27rf + cos a ( d r / d s ) q(s t) ì (4-7) (4-8) z When /(s,f) and G(s,0 are k n o w n , therefore, w e have four equations (x, y, p, q) in five u n k n o w n s (s, f, r(s), d r / d s , a ) . Thus, if o n e of the u n k n o w n s is given, the other four can be d e t e r m i n e d . Suppose, for example, that the viewing angle a has been determined by s o m e other means. Then w e c a n solve for the four remaining u n k n o w n s : first p and q are used to determine t and d r / d s ; then y is used to determine r(s); finally, x is used to solve for s. T h e resulting equations are: s = xq - y cos a (p cos a - sin a) q sin a t = s/n 2m r(s) = 1 —=Vk yVk Q dr ds - 1 - sin a (p cos a - s/n a) cos a / c 1 / 2 where k = (p c o s a - s/n a ) 2 + q 2 Thus, from a single surface normal on a Right Circular SHGC, when the viewing angle is k n o w n , w e can determine the position of the c o r r e s p o n d i n g point on the surface (s and f), the radius at that point (r(s)), and the derivative of the radius function at that point ( d r / d s ) (figure 43). 52 description r(s) image x.y.p.q dr/ds Figure 4 3 : Analyzing a Single Surface Normal 4 . 7 . 2 Aligning t h e Image for A n a l y s i s of S u r f a c e Normals The above analysis holds only w h e n t h e image is aligned in a c c o r d a n c e with these rules: 1. The image of the axis is on t h e h o r i z o n t a l x-axis in t h e image. 2. The viewing angle a is k n o w n . 3. The image of the far axis endpoint is at (0,0) , and the near endpoint image is at (sin xy In general, condition (1) will not be difficult to establish, but conditions (2) and (3) may require considerable analysis. completely aligned We will call an image partially aligned if it c o n f o r m s to (1), and aligned or if it c o n f o r m s to (1)-(3). In addition, for partial alignment, w e will require that the images of the axis endpoints are at ( 0 , 0 ) aligned image are denoted x x p y p and (1 > 0 ) x p y p (figure 44). If the coordinates of a partially and y , then they are related to aligned coordinates x and y by t h e p formula: l VVxpyp = * s / n a ' s i n a The division of both coordinates is required to preserve the relative proportions of the shape and its description. To completely align an image w h i c h is already partially aligned, it is necessary to determine the endpoints of the axis and the viewing angle. The axis endpoints may be completely invisible, thus presenting an unavoidable ambiguity; also, in the event that the axis endpoints c a n n o t in fact be determined, the only penalty is a translation and scaling of r(s) relative to s, w h i c h is probably only a minor problem for shape recognition. However, the determination of the viewing angle is an interesting problem in its own right, and the penalty for guessing w r o n g may be a considerable distortion of r(s). Therefore, w e will c o n c e n t r a t e on the problem of determining the viewing angle. 53 In real images, where surface normals of curved surfaces are being analyzed, one or more of the following types of information are frequently being used (figure 45): 54 • texture gradients Using texture gradients, including photometric analysis, a one- dimensional constraint can be determined between the c o m p o n e n t s p and q of the surface gradient [ 7 , 8 , 9 ] . • shadow geometry Using shadow geometry, the surface normal can be determined at every point along the shadow line [17]. • range data Using a range-finder, the raw distance data can be used to determine approximate surface normals at many points (almost every point) in the image. While analysis of t h e constraints p r o d u c e d by texture gradients is beyond the s c o p e of this paper, the following sections explore the latter two kinds of information and how they can be used to determine the viewing angle a. The discussion herein will be limited to Right Circular SHGCs, for the sake of simplicity. 4 . 7 . 3 C r o s s - S e c t i o n s For a Given S u r f a c e N o r m a l Suppose w e have a partially aligned image of a Right Circular SHGC, and s u p p o s e further that w e are given a single surface normal. W e k n o w its position in the image, given by: x(s,f) = r(s) cot a cos 2mt + s r(s) sin 2irt y(s,t) = sin a and the gradient of the surface normal, p and q as previously d e f i n e d . (Note that p and q are the same for aligned and partially aligned images.) Figu re 4 6 : Cross-Section of a Right Circular SHGC T h r o u g h a Point As shown in figure 46, the cross-section of t h e shape t h r o u g h this point, an arc of constant s on t h e surface, is a circle whose projection in the image is an ellipse. We can determine its equation using x and y. First, w e determine: 55 sin 2MT = y sin (J and r(s) X cos 2MT s - r(s) cot A So , (x - s) sin <x 1 = ( r{s) cos A , y sin + ( x 2 ) A r{s) X ) 2 w h i c h is the equation of an ellipse with center at (s,0), vertical semimajor axis of r(s) / sin <x, and horizontal semiminor axis of r(s) cos A / sin A. We c a n n o t yet determine the specific paramaters of the ellipse yet, since w e d o not know s, r(s), or a. However, w e do have a surface normal given by N = (p, q, 1) with p and q defined by equations (4-7) and (4-8) above. Using x, y, p, and q, w e can solve for s, f, r(s), and d r / d s all as functions of t h e u n k n o w n viewing angle, a, for a partially aligned image of an RCSHGC: K = (p cos a - s/n a ) s = xq - y cos a 1 . -1 2TT r(s) = dr ds 2 + Q 2 (p cos a - sin A) « VK y sin A VK - 1 - sin a (p cos cos A - s/n a ) AK} /2 Thus, given a single surface normal in a partially aligned image, the image of the c o r r e s p o n d i n g cross-section is an ellipse; this ellipse is determined as a function of the viewing angle, a. 4.7.4 Shadow Geometry for RCSHGCs In figure 47, w e have a line drawing of a Right Circular SHGC, w h o s e shadow is visible and is cast upon a flat surface. If the direction of illumination is k n o w n , w e can determine the surface normals along the shadow line [17]. This information can be c o m b i n e d with the o c c l u d i n g c o n t o u r of the RCSHGC, to determine the viewing angle. We begin by partially aligning the image. Now, select a single point / = (x,y) line. At this point, the surface gradient (p,q) can be obtained. n along the shadow 56 Figure 4 7 : S h a d o w Geometry Provides Surface Normals Along S h a d o w Line For each value of the viewing angle a, w e can c o m p u t e the implied values of s, t, r(s), and d r / d s at /. Now w e can easily derive the following formulas for ' C G x p y p i the image of the c o n t o u r generator in a partially aligned image, from the previously seen equations for / C Q , the image of the c o n t o u r generator in an aligned image: 'cGxpyp ^CG'^CG^xpyp = = - r(s) cos 2 d r a + s ds ris) CG y dx cot = 2 a (dr/ds) 2 sm a = ( 1 / \Jsin 2 a - cos a (dr/ds) ) 2 2 CG — ds Now, if \tan a | > | d r / d s | , there must be some point on the c o n t o u r generator c o r r e s p o n d i n g to the value of s at the given point / (figure 48). At this point, t h e values of x C Q , y C Q , and d y determined by substituting for s, r(s), and d r / d s in the above equations, to yield: y cos o (sin a + c o s a [sin a - p cos a]) 2 CG ~ X x + y ([q z + 2] sin 2 a - 2p sin a cos a - 1) 1/2 q sin a C Q /dx C G can be 57 DYCC/DXCG F i g u re 4 8 : dy dx Corresponding Point on Tangency Contour Generator - p sin a - cos or C G ([q 2 C Q + 2] sin 2 a - 2p sin a cos a - 1) 1 / 2 with k defined as above. possible points Peg with slopes dy/dx indicated F i g u re 4 9 : At Most One Corresponding Point Exists In an image of a Right Circular SHGC, it is guaranteed that at most one point on the o c c l u d i n g contour (and, of course, its reflection about the x-axis) will c o r r e s p o n d to the same value of s as the given point /. Thus, it is possible to search along the points ( x C G ,y C G ) for all values of a, as s h o w n in figure 4 9 , looking for a point w h i c h lies on the outline of the shape in the image. There may be more 58 than one such point on the outline; however, at most o n e s u c h point will have the correct c o n t o u r slope d y C G /dx C G in the image. When this point is f o u n d , the value of a w h i c h determined it i s i h e viewing angle for image. Full alignment can n o w be c o m p l e t e d , and recovery of r(s) can p r o c e e d . A summary of the process is this: An image of an RCSHGC is partially aligned. Now, given a surface normal at a specific point, the c o r r e s p o n d i n g point (and slope) of the o c c l u d i n g c o n t o u r for the same value of s can be determined as a function of t h e viewing angle cr. By searching the image for these points for all values of a , looking for a crossing of the o c c l u d i n g c o n t o u r exhibiting t h e predicted slope, the viewing angle a can be d e t e r m i n e d . The image can then be completely aligned for more detailed analysis of the shape. 4.7.5 Range Data A n a l y s i s for RCSHGCs F i g u re 5 0 : Range Data Yields an Image of Surface Normals When a range finder is used to p r o d u c e an image, the result is a set of distances to points in t h e field of view. By fitting local tangent planes, surface orientations (e.g. gradients) can be determined at many points in the image - almost at every pixel (but with some gaps, if a c o m m o n triangulationbased range finder is used) (figure 50). The r e d u n d a n c y provided by s u c h a large number of surface gradients can be used to estimate the viewing angle in a partially aligned image. Here, as above, the discussion will be limited to Right Circular SHGCs for simplicity. 4 . 7 . 5 . 1 M e t h o d of M i n i m i z i n g D e r i v a t i v e s Suppose w e have used a range finder to determine the surface gradient at many points in a partially aligned image of an RCSHGC. For each value of t h e viewing angle a, w e can c o m p u t e t h e corresponding values of s, f, r(s), and d r / d s at each surface normal, using the above formulae. 59 image x,y,p,q description r(s) dr/ds F i g u re 5 1 : Two Surface Normals on the Same Cross-Section If w e had any two surface normals c o r r e s p o n d i n g to exactly the same value of s, as in figure 5 1 , w e could determine the viewing angle as that value of cr for w h i c h the two normals p r o d u c e d identical values of s, r(s), and d r / d s . (The authors speculate that this value will be unique.) In general, however, w e c a n n o t assume that s u c h a pair of surface normals will be present in the range data. Instead, w e can use each pair of surface normals to indicate the value of a w h i c h produces the best consistency between the c o r r e s p o n d i n g estimates of s, r(s), and d r / d s . T h e n , using some voting scheme, the most preferred value of a c a n be selected for performing complete alignment of the image and further analysis of the shape. image x,y,p,q Figure 5 2 : description r(s) Two Surface Normals on Different Cross-Sections Consider a pair of points ^ and / at w h i c h the surface gradients (i.e. normals) ( p 2 v and ( p , q ) 2 are k n o w n , as s h o w n in figure 52. For any value of the viewing angle a, w e can c o m p u t e s v d r / d s | , s , r ( s ) , and d r / d s | s 1 2 2 2 r{sj, . We w o u l d like to define a " c o m p l e x i t y " measurement for r(s); t h e n , we can determine the value of a w h i c h minimizes this complexity, and say that this value of cr is the value indicated by our pair of surface normals. Now, for any value of a, there exist an infinite number of functions r{s) w h i c h c o r r e s p o n d to the 60 constraints at s and s . A useful kind of complexity might be the highest-order non-zero derivative of 1 2 r(s): the function r(s) with the fewest non-zero derivatives might be called the " s i m p l e s t " . With four constaints on r(s) (r(s) at t w o points, a n d d r / d s at t w o points), the f u n c t i o n with the fewest non-zero derivatives will be a cubic polynomial, with three non-zero derivatives, of the f o r m : r(s) = a s 3 + bs 2 + cs + d with the coeffecients a, fc>, c, and d determined as in section 4.4.2. Thus, for each value of a, the coefficients a, b, c, and d can be determined for the cubic polynomial function r(s) relating t w o surface normals. W e wish to select t h e value of a minimizing complexity, i.e. minimizing the number of non-zero derivatives. Thus, w e can c h o o s e a m o n g those c u b i c f u n c t i o n s s o m e "least c o m p l e x " f u n c t i o n , a n d let the c o r r e s p o n d i n g value of a be the value indicated by our pair of surface normals. O n e measure of complexity for these c u b i c s might be |a|; since the third derivative d r / d s 3 3 = 6a, minimizing |a| is equivalent to minimizing the magnitude of the third derivative of r(s). Ideally, w e w o u l d hope to find a value of a for w h i c h |a| = 0 , i.e. a quadratic function r(s) sufficient to a c c o u n t for our pair of s u r f a c e normals. Unfortunately, the expression for a is a c o m p l i c a t e d f u n c t i o n : _ (s 2 - sj (dr/ds| s 1 + d r / d s [ ) + 2(r{s ) s 2 A - r(s )) 2 Substituting for s, r(s), and d r / d s in terms of a does not yield any simplification of the above result. Because it seems difficult to find a useful analytic f o r m u l a for a , some numeric t e c h n i q u e to minimize |a| may be necessary. On the other h a n d , not every pair of surface normals need be analyzed. Only those surface normals at points with similar values of s need be considered to provide meaningful constraint; this is equivalent to saying that the assumption that r(s) is quadratic should only be applied locally, over small intervals of s. As an approximation to this criterion, only surface normals at points with similar values of x need be c o m p a r e d (figure 53). The proposed method for the analysis of range finder images of Right Circular SHGCs is thus: First, fit local surfaces to the range data, to yield an image of surface orientations. Partially align this image. Now examine each pair of s u r f a c e normals at points within vertical bands of s o m e size (i.e. with similar x-coordinates). For each s u c h pair, determine the value of a w h i c h minimizes |a| (i.e. the 61 A > < V - - t T / \ N t V F i g u re 5 3 : Only C o m p a r e Surface Normals with Similar Values of x magnitude of the third derivative of the c u b i c approximation to r(s)); that pair of surface normals will " v o t e " for this value of a, possibly weighted by s o m e c o n f i d e n c e measure s u c h as the c o m p u t e d value of | s 1 - s |. 2 Find the value of a with the strongest support; assume this is the true viewing angle. Now, the image can be completely aligned for more detailed reconstruction of the RCSHGC description. While this method involves considerable assumptions about the true nature of the object being observed, it is still significant that the analysis is attempting to minimize a viewpoint-independent measure of the complexity of the object. 4 . 7 . 5 . 2 M e t h o d of I n t e r p o l a t i n g N o r m a l s There is an alternative a p p r o a c h to analyzng range data, w h i c h avoids the approximation to r(s) in the previous method, relying instead on a smoothing assumption. In this t e c n h i q u e , processing relies on a surface normal interpolation f u n c t i o n , capable of determining the (approximate) gradient of the surface normal anywhere in the object's image, by interpolating between k n o w n values of the gradient. With s u c h a function available, w h o l e ellipses can be fit to the data. Consider a surface normal w h o s e gradient (p,q) at a point (x,y) in a partially aligned image is k n o w n . Now, for each value of the (unknown) viewing angle a, not only is the elliptic image of the cross-section t h r o u g h (x,y) determined, but also the gradient at each point on this ellipse is determined (figure 54). For, at any value of f, the c o r r e s p o n d i n g image point (x ,y ) and gradient ( p , 9 ) are given by: t t t t 62 F i g u r e 5 4 : Fitting Ellipses to Interpolated Surface Normals y cos (/c A 1/2 cos 2IRT + sin A - p cos A) x =x + t yk U2 p = -tan t sin 2MT cos 1 cos : A A (1 -/c + TJZ sin A [P cos w h e r e k = (p c o s a - s/n a) A - sin A + k* cos u 2IRT]) sin 2MT 1 / 2 1 + sin A (p c o s a - sin A + / c x 2G 2 + q. 2 1 / 2 c o s 27rf) (These are obtained from the formulae in section 4.7.3, substituting t h e equations for s, r(s), and d r / d s into those for x, y, p, and qr.) At any s u c h point (x ,y ), t h e interpolated gradient (p q.) v can be determined from the interpolation function, using t h e image data in that n e i g h b o r h o o d . An error measure c a n then be derived t o t t indicate how far the (interpolated) d a t a is from the d a t a predicted from t h e given point a n d t h e assumed viewing angle a . O n e s u c h error measure might be t h e angle between the predicted normal N = (p ,Q ,1) and t h e interpolated normal N = ( p ^ , ! ) , given by: - { t } t * E(a,F) = cos N ' N. — = cos' 1 l|Af || t ll^ll 1 1 5 (P + 2 t pn. + q q + 1 5— \ / o A 5 Q + D 1 / 2 ( P + <7 2 X 2 T7T 2 +D 1 / 2 63 For a given value of o~, an error measure E(a) might be c o m p u t e d by taking the average of E(a,f) over some range of values of t between approx. 1/4 and 3 / 4 (i.e. on t h e near side of the object). Note that, for s o m e values of f, the object's surface might be o c c l u d e d . T h e point (x,y) used to determine all the values of £(cr) might then " v o t e " for that value of a w h i c h minimizes £(<r). This method for analyzing range finder images is this: First, fit local surfaces to the range data, to yield a (sparse) image of surface orientations. Partially align this image. Now, for each surface normal in some set of surface normals, determine the value of <r w h i c h minimizes £ ( a ) , the average angle between the surface normals prediced by the selected normal and the interpolated normals determined from the surrounding data. value of a. Each of the selected normals will " v o t e " for the indicated Select the value of a receiving the strongest support; assume this is the true viewing angle. Now, the image can be completely aligned for more detailed analysis. This method makes weaker assumptions about r(s) than the previous technique, and probably requires less c o m p u t a t i o n . However, it does d e p e n d u p o n the existence of an interpolation function for surface normals, and might also be more sensitive to noise in the data. 64 5. Conclusions In this paper, w e have presented several kinds of results. First, there have been specific observations and formulae relating to: • Parameterization of shapes, in particular Straight H o m o g e n e o u s Generalized Cylinders. • Theorems about equivalence of descriptions, and behavior of surface normals, for SHGCs. • Formulae for several attributes of SHGCs, s u c h as coordinates of points, surface normals, and images of these. • Observations about c o n t o u r generators, s u c h as planarity and points of singularity. These observations were derived for SHGCs, but in general will apply to more c o m p l e x shapes as well. • Analysis techniques for tangency c o n t o u r s and surface normals of Right Circular SHGCs and Right Polygonal SHGCs, including line d r a w i n g s , images with s h a d o w s , and rangefinder data. This w o r k has been theoretical, u n a c c o m p a n i e d so far by implementation; it might be t h o u g h t of as preliminary, exploratory work aimed at outlining goals for eventual implementation efforts. In addition to these specific observations, a methodology has been p r o d u c e d and demonstrated for analyzing the imaging properties of shapes described parametrically: 1. Parameterize the shape using s o m e set of functions. 2. Parameterize the surface of the shape by s and t. 3. Assign a local (surface-based) c o o r d i n a t e system and find points P(sJ) a n d surface normals A/(s,f). 4. Assign a global (object-centered) coordinate system and convert P and N to global coordinates. 5. Invoke a tangency argument with viewing direction F ( i n global coordinates) to determine the condition on c o n t o u r generators. 6. Imbed the object in the world coordinate system (x-y-z) with F = Z . 7. Determine equations for the images of points /(s,/), note the specialization to t a n g e n c y contours, and solve for shape parameters in terms of image c o n t o u r s . 8. For surface normal analysis, convert Afto world coordinates, solve for gradient (or other representation), solve for shape parameters at arbitrary point in terms of / and image of N. This methodology is being applied to shapes other than SGCs, in work in progress by the authors. Finally, it has been discovered that there are several problems w h o s e solutions are very difficult to grasp intuitively; analysis has revealed some important facts not suspected by the authors based on their own intuition. These problems include: • The conditions for uniqueness or equivalence of shape descriptions. 65 • The planarity (or lack thereof) for c o n t o u r generators. • The c o n d i t i o n s under w h i c h c o n t o u r generators exhibit singularities. • The characterization of the image c o n t o u r s in pictures of even relatively simple shapes. 5.1 Future Work Although intended applications must g u i d e the direction of future development of s u c h theoretical w o r k as this, there are several open areas already revealed by this research. The analysis of c o n t o u r s has been carried out in some detail for Right Circular SHGCs; it* w o u l d be useful to extend these results to other types of Generalized Cylinders as well. In addition, no specific algorithms have been suggested for analyzing arbitrary image c o n t o u r s , even if the object being viewed is of a k n o w n type. T h e results will all be more useful w h e n extended to images under perspective projection. The analysis of c o n t o u r generators from t w o viewpoints s h o u l d be able to provide at least some cues as to the solid shape. All of these suggestions pertain to generalizing the results in this paper; in situations w h e r e the authors have been d a u n t e d by mathematical tractability, the use of some symbolmanipulation system s u c h as MACSYMA might allow for further achievement. Of equal interest, some considerable s p a c e has been devoted in this paper to the description of images and image analysis for Right Circular SHGCs (i.e. solids of revolution), yet several problems are still unsolved. These problems include characterizing and analyzing shading and highlights, analyzing the position of the shadow line in detail, and finding the images of the axis endpoints in an image. This kind of very detailed analysis of simple shapes may yield quite interesting insights for image understanding in general. Finally, implementation is important as an e m b o d i m e n t of these theoretical results, and for providing feedback for directing further analysis. An important problem to deal with will be that of d e c i d i n g w h e t h e r an object is in fact a member of a specific shape class, a problem w h i c h is not addressed in this paper. 5.2 Acknowledgements J o h n Kender at C o l u m b i a University provided several useful ideas and helped make the basic definitions more rigorous. Chris B r o w n at Rochester suggested the torus problem, w h i c h led to the formalization of the methodology outlined in the Conclusions. 66 6. Bibliography [1] Ballard, D. H. and B r o w n , C. M. Computer Vision. Prentice-Hall, E n g l e w o o d Cliffs, NJ, 1982. [2] Binford,T.O. . Visual perception by computer. In Proc. IEEE Conf. on Systems and Control. [3] Miami, December, 1 9 7 1 . Brooks, R. A. Symbolic reasoning a m o n g 3-D models and 2-D images. Artificial Intelligence 17:285-348,1981. Special volume on c o m p u t e r vision. [4] Davis, H. F. and Snider, A. D. Introduction to Vector Analysis, 3rd ed. Allyn and B a c o n , Boston, 1975. [5] Hilbert, D. and Cohn-Vossen, S. Geometry and the Imagination. Chelsea Publishing Co., New York, 1952. [6] Hollerbach, J . M. Hierarchical Shape Description of Objects by Selection and Modification of Prototypes. AI-TR 346, MIT, November, 1975. [7] Horn, B. K. P. Understanding Image Intensities. Artificial [8] Intelligence 8:201 - 2 3 1 , 1 9 7 7 . Kanade, T. a n d Kender, J . Mapping Image Properties into Shape Constraints: Skewed Symmetry, Affine-Transformable Patterns, and the Shape-from-Texture Paradigm. In IEEE Workshop on Picture Data Description and Management, pages 130-135. Asilomar, CA, August, 1980. [9] Kender, J . Shape From Texture: A Computational Paradigm. In B a u m a n n , L. S. (editor), Proc. ARPA IUS Workshop, pages 134-138. April, 1979. 67 [10] Kuhl, F. P. and Giardina, C. R. Elliptic Fourier features of a closed c o n t o u r . Computer [11] Graphics and Image Processing 18:236-258,1982. Marr, D. Analysis of o c c l u d i n g contour. Proc. Royal Society [12] of London B-197:441-475,1977. Marr, D. and Nishihara, H. K. Representation and recognition of t h e spatial organization of three-dimensional shapes. Proc. Royal Society of London [13] B-200:269-294,1978. Nevatia, R. Machine Perception. Prentice-Hall, E n g l e w o o d Cliffs, NJ, 1982. [14] Rubinstein, Z. A Course in Ordinary and Partial Differential Equations. Academic Press, New York, 1969. [15] Shafer, S. A., Kanade, T., and Kender, J . R. Gradient S p a c e Under O r t h o g r a p h y and Perspective. In IEEE Workshop on Computer Vision: Representation and Control, pages 26-33. August, 1982. [16] Shafer, S. A. A T a x o n o m y of Generalized Cylinders. IEEE Transactions on Pattern Analysis and Machine Intelligence , 1983. Submitted for C o r r e s p o n d e n c e s . [17] Shafer, S. A. and Kanade, T. Using S h a d o w s in Finding Surface Orientations. Computer Graphics and Image Processing , 1983. To appear. Also available as technical report from Carnegie-Mellon University C o m p u t e r Science Department. [18] Soroka, B. I. Generalized cones from serial sections. Computer Graphics and Image Processing 15(2): 154-166, February, 1 9 8 1 . 68 I. Symbols Constants and coordinates are s h o w n in italics (s, W), functions are in boldface italics (r, AO. Scalar values are in lower-case (f, u ), c vector or n-tuple values in upper case (G, P), angles in Greek letters (a, a). Generalized Cylinders G Generalized Cylinder Classes of Shapes GC Generalized Cylinders LSHGC Linear SHGCs SGC Straight Generalized Cylinders RSHGC Right SHGCs SHGC Straight H o m o g e n e o u s GCs CSHGC Circular SHGCs PSHGC Polygonal SHGCs Components of a Generalized Cylinder A(s) axis f u n c t i o n r(s) radius function a angle of inclination E(s,t) envelope f u n c t i o n C{t) contour function u c c c o m p o n e n t s of c o n t o u r v Coordinates of a Generalized Cylinder s distance along axis S axis vector t distance along c o n t o u r U horizontal on cross-section u,v cross-section coordinates V vertical on cross-section w normalized u W normalized horizontal Measures of a Generalized Cylinder P(s,f) p ,p ,P w v m s point on surface W(s,f) coordinates of point n ,n /7 slope of r(s) for LSHGC h(t) x yJ surface normal z c o m p o n e n t s of normal c o n t o u r Wronskian Projections of Generalized Cylinders viewing direction X horizontal in image viewing direction coordinates Y vertical in image a viewing angle ( F t o S) Z direction of eye L illumination direction x,y,z w o r l d and image coordinates 'w'Vs ilium, direction coordinates /(s,0 image of point on SHGC F W V s 69 illumination angle x(s,t),y(s,t) image coordinates of SHGC point dihedral illumination angle G = (p,g) surface gradient 70 II. Properties of SHGCs 11.1 Straight Homogeneous GC: SHGC Definition G = ( A C, r, a) axis A(s) linear c o n t o u r C(f) = {u ,v )(t) c Q continuous radius r(s) differentiable inclination a constant Description GC with straight axis, all cross-section planes parallel, all cross-sections of same shape but varying size. Point on the Surface P(s,f) = (u {t) r{s) sin a , v (t) r(s), s + u (t) r(s) cos a) Q Q Q Contour Wronskian h{t) = u it)—£dt c c - v c (t)—£df hit) = 0 iff the SHGC can be imbedded in a plane. Surface Normal N(s,f) = ( hit) cos a dr dv + — ^ ds df n du - sin a — 7 * - , df r % - h{t) sin a dr — ds 71 Il.2 Right SHGC: RSHGC Definition G = ( A C, r, t t / 2 ) A, C, r as for SHGC. Description SHGC with cross-section planes perpendicular to axis. Special Properties There is no preferred direction for u and v axes on cross-section planes, so imaging geometry can be simplified. Also, U = W. Point on t h e Surface P(s,0 = (u (0 r(s), v (t) r(s), s) c Q Contour Wronskian Same as SHGC - no simplification. Surface Normal A/(s,f) = ( Image of a Point /(s,0 = (x,y) ( s , 0 xy = ( i i ( f ) r(s) cos a + s sin a, v (t) r f s ) ) ^ c c World Coordinates P = (w, s) w v s = (w cos a + s s/'n a , v, - w s/n a + s cos a). Oblique View Contour Generator Condition 0 = sin a dt + h(t) cos a dr ds Oblique View Contour Generator Domain Intractable. Oblique View Contour Generator Point Intractable. Oblique View Contour Generator Planarity Intractable. 73 1.1.3 Linear SHGC: LSHGC Definition G = ( A C, r, a , 0) r(s) = m ( s - s ) 0 A C, a as for SHGC. Description SHGC with linear radius f u n c t i o n . Apex is at s = s . Q Special Properties: • Slant Theorem: Can describe an LSHGC with cross-section planes at any orientation (as long as they cut completely t h r o u g h shape). • Pivot Theorem: Can describe an LSHGC with any axis passing t h r o u g h apex (excluding projection of shape t h r o u g h apex). • Corresponding Normal Theorem: dN/ds = (0,0,0) Point on t h e Surface P(s,f) = (m (s - s ) u (t) sin a , m (s - s ) v (t), Q Q Q s + m (s-s ) Q Q u (t) c cos a) Contour Wronskian Same as SHGC no simplification. Surface Normal A/(s,f) = \ m h{t) cos a + — dt sin a — - m h(t) sin a ) dt Right LSHGC: Image of a Point /(s,0 = (x,y) ( s , 0 x y = (m (s - s ) u ( f ) cos a + s s/n a, m (s - s ) ^ ( f ) ) ^ Q c Oblique View Contour Generator Condition dv 0 = sin a —^— + m h(t) cos a dt r Q 74 Oblique View Contour Generator Domain i satisfying above c o n d i t i o n . Q Oblique View Contour Generator Point Intractable. Oblique View Contour Generator Planarity Always. 75 11.4 Circular SHGC: CSHGC Definition G = r, a) (A, C, C(t) = {u ,v ) Q (t) = (cos 2mt, sin 2mt) c A r, a as for SHGC. Description SHGC with circular cross-section. Point on the Surface P(s,f) = (r(s) sin a cos 2mt, r(s) sin 2mt, s + r(s) cos a cos 2mt) Contour Wronskian M O = 2tt Surface Normal , dr A/(s,f) = ( 27T (cos 27rt + cos a ), 2tt sin a sin 2mt, ds - 2m sin a dr x ds ) Right CHGC: Image of a Point /(s,f) = (x,y) (s,f) xy = (r(s) cos a cos 2mt + s sin a, r(s) sin 2mt)^ xy Oblique View Contour Generator Condition i = 1 27T cos -1 / ( - cot a d r ds \ j Oblique View Contour Generator Domain dr I— ds I < I tan a | Oblique View Contour Generator Point P(s,0 = P C G ( s ) = {cota r ( s ) — , r(s) V1 ds Oblique View Contour Generator Planarity Difficult to evaluate. - cot 2 a (dr/dsf , s ) 76 Oblique View C o n t o u r W > S ( CG'W( >xy = X S cos a , = ( - r(s) s/n a dr or 2 = ( 1 / \Jsin I T a (dr/ds) x ) ds a - cos a (dr/ds) ) 2 dx / + s sin a , r(s) V 1 - cot 2 2 C Q — ds Oblique View C o n t o u r Analysis o —* s/n a r{s) = y — ds C G (s) V l = (sin a/ + cos a ( d y ^ / d x ^ ) 2 V 1 + cos a ( d y 2 C r r G /dx C 2 r r G ) 2 ) dx Image of a S u r f a c e Normal N(s,t) = ( c o s a c o s 2ttJ - s/n a , sin 2tit, ds Surface Gradient G(s,f) = (p,q) (s,f) p(s,t) = g(s,f) = s/'n a ( d r / d s ) - c o s <r cos 2-at sin a cos 2irt + cos or ( d r / d s ) - sin 2mt sin a cos 2mt + c o s a ( d r / d s ) - sin a c o s 2irt - cos a ) . ds 77 Surface Normal Analysis k = (p cos a - sin a) 2 + q 2 xg - y cos a (p cos a - s/n a) s = * t = q sin a 2m r(s) = dr ds • -1 1 sin ' q Vk — yVk - 1 - sin a (p cos a - sin a) cos a kV 2 78 11.5 Polygonal SHGC: PSHGC Definition G = ( A C, r, a) C{t) = {u ,v ) c (0 is piecewise linear Q Between vertices, C(t) - (u v ) Qi (f) = (mj c + 6 , m f + y v b) y A r, a as for SHGC. Description SHGC with polygonal cross-section. Special Properties Corresponding Normal Theorem: dN/dt = (0,0,0) on face. Point on the Surface P(s,f) = ({mj + bj r(s) sin a , {mj + bj r(s), s + (mj + bj r(s) cos a) C o n t o u r Wronskian for a Face h(t) = /77 d v mb u u y Surface Normal for a Face N(sj) , = ( m, + (m b v dr - m b ) cos a — , u u v - m sin a , ( m t o - m ù ) sin a u u v v u Right PSHGC: Image of a Point /(s,f) = (x,/) ( s , 0 = ((#n f + b ) r(s) cos a + s s/n a, ( m f + b ) xy u u Oblique View C o n t o u r Generator C o n d i t i o n for a Face dr ds m tan o y m ö u v - m ö v u Oblique View Contour Generator Domain for a Face s satisfying above c o n d i t i o n Q Oblique View Contour Generator Point for a Face Intractable y y r(s))^ dr — 79 Oblique View Contour Generator Planarity for a Face Difficult to determine Image of a Point on a Crease l{sj ) 0 = / C G (s) = (* C G ,y C G ) (s) x y = {u r(s) cos a + s sin a, v Oblique View Contour Analysis for a Crease v sin a Q r(s) = C df ds G s/n g ( d y v 0 C G /dx C G ) - u cos a ( d / c Q / d x ^ ) Q Q Q r{s))^ A Taxonomy of Generalized Cylinders 29 November 1982 Steven A. Shafer Computer Science Department Carnegie-Mellon University Abstract A number of researchers representation, but different standardization subclasses used people of the meaning a proposal of interesting corresponding have defined subclasses, Finally, this terminology describe common mathematical these terms in different terms, for a definition and is presented, classes. (or generalized cones,) for and research results ways. shape There has been are sometimes limited no to terminology. is made terminology generalized cylinders of these for which there is no In this paper, number have for of Generalized the description including is used to compare Cylinder, of the abbreviations "ends" for the definition of such shapes. A of these shape the shape classes used in past research, and to shapes such as "solid of for the names of a revolution". This research was sponsored by the Defense Advanced Research Projects Agency (DOD), ARPA Order No. 3597, monitored by the Air Force Avionics Laboratory Under Contract F33615-81 -K-1539. The views and conclusions contained in this d o c u m e n t are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the Defense Advanced Research Projects Agency or the US Government. T a b l e of Contents 1 . Introduction 2. The Taxonomy 2.1 Generalized Cylinders 2.2 Subsets of GC 2.2.1 Restricting t h e Axis 2.2.2 Restricting t h e Cross-Section Planes 2.2.3 Restricting t h e Cross-Section 2.2.4 Restricting t h e Transformation Rule 2.3 Supersets of GC 2.4 Describing t h e Ends of a Generalized Cylinder 3 . A p p l i c a t i o n of t h e T a x o n o m y 3.1 C o m m o n Mathematical Shape Classes 3.2 Shape Classes Used in Past Research 4. Summary 4.1 A c k n o w l e d g e m e n t s 5. Bibiography List of Figures F i g u re 1 : T a x o n o m y of Generalized Cylinders 1 1. Introduction Since the introduction of generalized cylinders by Binford in 1971 [3], a number of researchers have used this s c h e m e for representation of solid shapes [ 1 , 6 , 7, 8, 9 , 1 1 , 1 2 , 1 3 , 1 4 , 1 5 ] . However, different people have used the term to refer to somewhat different classes of shapes; indeed, an alternate term, generalized cone, has been used by some. There has been no clear-cut definition of these terms w h i c h might be universally a c c e p t e d , nor has there even been a suitable terminology for expressing the different shape classes referred to by different researchers using these terms. In this paper, a set of terminology is introduced for describing generalized cylinders and several subsets and supersets thereof, along with a notation for naming these shape classes. The presentation takes the form of a t a x o n o m y of shapes. It is hoped and intended that this set of terms will be sufficiently general to allow the definition and comparison of the various shape classes used in past and present research efforts. To illustrate the sufficiency of this terminology, the shape classes used by several researchers are described using the terms presented herein. Finally, the terms for several c o m m o n mathematical classes, s u c h as cylinders and solids of revolution, are presented, as defined in this taxonomy. It is beyond the s c o p e of this w o r k to address s u c h issues as t h e parameterization of specific shapes, or the existence of multiple descriptions of the same shape. However, this terminology may contribute to the future investigation of these problems by facilitating a precise formulation of the questions involved. 2 2. The Taxonomy T h e taxonomy begins with the definition of Generalized Cylinders. This definition involves four parts: by imposing suitable restrictions on each part, a number of subclasses are defined. By allowing generalizations, supersets are defined. T h e terminology uses Generalized Cylinders as a basis; this class of shapes may be abbreviated "GC". Each subclass introduces a new adjective (e.g. " C i r c u l a r " ) ; the name of that shape class is thus "Circular Generalized C y l i n d e r s " . Frequently, it will be desirable to cascade s u c h adjectives, as in " R i g h t Circular Generalized C y l i n d e r s " . Each adjective is normally abbreviated with a single letter; the name of the class may be abbreviated in part or in full, as desired, for example, " R C G C " , " R i g h t C G C " , "Circular R G C " , and " R i g h t Circular Generalized Cylinders" are all terms for the same shape class. (The s e c o n d and third terms might be useful for emphasizing a particular property of the class in some situations.) T h e names of shape classes will be capitalized w h e n used to refer to the definitions presented herein. As noted in the taxonomy, certain restrictions imply others. In s u c h cases, the redundant terms may be omitted. For example, all Circular GCs are also H o m o g e n e o u s GCs. Thus, "Circular G C " is another name for "Circular H o m o g e n e o u s G C " . In addition to the basic t a x o n o m y of shapes, definitions are presented for describing t h e ends of a Generalized Cylinder. These allow a somewhat finer grain of description than the basic terminology. 2.1 Generalized Cylinders A Generalized Cylinder (GC) is defined by four parts: • There is a s p a c e curve, calfed the axis of the shape. • At each point on the axis, at s o m e fixed angle to the tangent to the axis, there is a cross-section • O n . each cross-section plane defined. such cross-section plane, there a planar curve w h i c h constitutes the of the object on that plane. • There is a transformation rule w h i c h specifies the transformation of the cross-section as the cross-section plane is swept along the axis. This rule always imposes (at least) the constraint that the cross-section c h a n g e s smoothly. 3 The surface of the object is the union of the cross-sections. than a descriptive This is a generative definition, rather definition, of Generalized Cylinders. T h e term Generalized Cone may be considered s y n o n y m o u s with Generalized Cylinder, since there has been no clear distinction between the t w o in the past. 2.2 Subsets of GC The various subclasses of Generalized Cylinders are formed by imposing restrictions u p o n the four parts of the definition above. WGC SGC TGC RGC \ Skewed GC GC CGC / \ Layered GC PGC OGC HGC BLGC V I LGC UGC F i g u r e 1 : Taxonomy of Generalized Cylinders The taxonomy is illustrated in Figure 1, in w h i c h the nodes are shape classes. The lower classes are subsets of those above t h e m . Adjacent branches are not generally mutually exclusive; thus, the figure is a sort of abbreviated set diagram rather than a strict " t r e e " . 4 2.2.1 Restricting the Axis Straight GC (SGC) (opposite: Curved) A Straight Generalized Cylinder has a line segment in s p a c e for its axis. Toroidal GC (TGC) A Toroidal Generalized Cylinder has a closed curve in s p a c e as its axis. 2.2.2 Restricting the Cross-Section Planes Right GC (RGC) (opposite: Oblique) A Right Generalized Cylinder has cross-section planes perpendicular to the tangent to the axis. (In a Straight GC, perpendicular to t h e axis itself.) 2.2.3 Restricting the Cross-Section Circular GC (CGC) A Circular Generalized Cylinder has cross-sections w h i c h are all circles: Circular GCs are thus also R o u n d e d and Closed (see below). T h e axis is generally defined to pass t h r o u g h the centers of the circles, in w h i c h case the Circular GC is also H o m o g e n e o u s (see below). Polygonal GC (PGC) (opposite: Rounded) A Polygonal Generalized Cylinder has cross-sections w h i c h are piecewise linear. Open GC (OGC) (opposite: Closed) An Open Generalized Cylinder has cross-sections w h i c h are not Jordan curves, i.e. the cross-section is not a simple closed curve. Usually, an Open GC will have a cross-section w h i c h is s o m e arc on the cross-section plane; the shape is t h u s a piece of a warped sheet in space. 2.2.4 Restricting t h e T r a n s f o r m a t i o n Rule Homogeneous GC (HGC) (opposite: Heterogeneous) A H o m o g e n e o u s Generalized Cylinder has a transformation rule w h i c h allows only uniform scaling of the cross-section as it is swept along the axis; thus, all crosssections have the same shape, but may vary in size. Linear GC (LGC) A Linear Generalized Cylinder is a H o m o g e n e o u s Generalized Cylinder in w h i c h the size of the cross-section is proportional to distance along the axis, measured from some point called the apex of the shape. Uniform GC (UGC) A Uniform Generalized Cylinder is a Linear Generalized Cylinder in w h i c h all cross-sections are identical in size as well as shape. 5 Bilinear GC (BLGC) A- Bilinear Generalized Cylinder is a Generalized Cylinder in w h i c h the crosssection size varies with distance from the apex, but the two orthogonal directions on the cross-section planes have different factors of proportionality, i.e. the crosssection shape is scaled differently in t h e two directions. 2.3 Supersets of GC The following are generalizations of Generalized Cylinders: Warped GC (WGC) A Warped Generalized Cylinder is defined in a similar manner to a Generalized Cylinder, but the cross-sections need not be planar. T h e cross-sections are thus space curves defined relative to t h e cross-section planes, but need not be contained within t h e m . This is t h e class of shapes originally defined as "generalized c y l i n d e r s " by Binford [3]. It may be interesting to discover whether each shape that is a Warped GC may also be described as a GC (aside from the obvious difference in the planarity of the ends of the shape); if so, WGC = GC. The author conjectures that this is true. Skewed GC A Skewed Generalized Cylinder is defined similarly to a Generalized Cylinder, but the cross-section planes need not all be at the same angle with respect to t h e axis. This allows "rotational s w e e p s " of the cross-section planes, as well as translation of the cross-section planes along the axis. Layered GC A Layered Generalized Cylinder is a Skewed GC in w h i c h the cross-section planes, while not at a fixed angle to the axis, are parallel to each other. This situation arises, for example, w h e n examining serial sections of Curved GCs. Layered GCs d o not actually constitute a superset of GCs: a Layered GC with a straight (linear) axis is a Straight GC; whereas a Layered GC with a non-linear axis is a Skewed GC but not a GC. 2.4 Describing the Ends of a Generalized Cylinder Each end of a Generalized Cylinder may be characterized, independently of the characterization of the shape as a whole. Blunt An end of a GC is Blunt if the surface normals c o n v e r g e in orientation to be perpendicular to the final cross-section plane at that end (i.e. the surface smoothly a p p r o a c h e s the final cross-section). Flat An end of a GC is Flat if it is not Blunt, and the final cross-section is a closed 6 curve. The surface normals are d i s c o n t i n u o u s along the final cross-section, i.e. between the side(s) of the shape and the Flat e n d . Chiseled An end of a GC is Chiseled if it is not Blunt, and the final cross-section is an arc. T h e surface normals are discontinuous along the final cross-section arc. Pointed An end of a GC is Pointed if it is not Blunt and if the final cross-section consists of a single point. The surface normal at this point is u n d e f i n e d . It is especially interesting to note that a Linear GC always has one end Flat, and the other end may be either Flat or Pointed (but not Blunt or Chiseled). A Uniform GC always has two Flat ends. A Bilinear GC may have one Flat and the other Flat, Chiseled, or Pointed; or it may have both ends Chiseled. The ends of other GCs may be of any type. 7 3. Application of the Taxonomy 3.1 Common Mathematical Shape Classes This terminology can be used to define several c o m m o n mathematical shape classes. In general, the terms used to restrict those mathematical classes are the same terms presented here for restricting the class of Generalized Cylinders (i.e. Right, Circular). cylinder A cylinder is a Straight Uniform Generalized Cylinder, i.e. SUGC. Subclasses: right, circular. cone A cone is a Non-Uniform Straight Linear GC (Non-Uniform SLGC), with one end (the apex) Pointed. Subclasses: right, circular. frustrum A frustrum is a Non-Uniform Straight Linear GC (Non-Uniform SLGC) with both ends Flat. solid of revolution A solid of revolution parallelopiped A parallelopiped is a Straight Right Circular Generalized Cylinder (SRCGC). is a Straight Uniform Polygonal Generalized Cylinder (SUPGC). Subclasses: right. pyramid A pyramid is a Non-Uniform Linear Polygonal Straight Right Generalized Cylinder (Non-Uniform LPSRGC), with o n e end Pointed. torus A torus is a Uniform Right Toroidal Generalized Cylinder (URTGC). T h e shape of the axis and the cross-section must be described separately; in this terminology, a "Circular URTGC" implies that the cross-section is circular, but does not constrain the axis to be a circle. 2 - 1 / 2 D shape The two-and-a-half-D shape class used in C A D / C A M is somewhat loosely defined, but usually consists of two polygonal faces linked by quadrilateral or triangular facets [5]. This corresponds to Polygonal Straight GCs with Flat ends, usually Right, but possibly Oblique and with nonparallel ends. Sometimes, shapes with curved axes are also called 2 - 1 / 2 D shapes. This type of shape should not be confused with the 2 - 7 / 2 D sketch, a representational s c h e m e used by Marr [9]. 8 3.2 Shape Classes Used in Past Research T h e terms generalized various shape classes. cylinder and generalized cone have been used in past research, to refer to Binford [3] de fined "generalized c y l i n d e r s " to be the class here called W a r p e d GCs. Agin [1] defined the term similarly, but his results were limited to Right Circular Linear GCs, i.e. those with circular cross-section perpendicular to the axis, a n d linear scaling of t h e crosssection, but with any s p a c e curve as axis. Hollerbach [7] defined "generalized c y l i n d e r " as RGC, and limited his attention to HRGCs w h o s e axes were planar (but not necessarily straight). Ballard and Brown [2] defined "generalized cylinder" to be Closed GC, i.e. GCs with cross-sections w h i c h are closed arcs; Shani [13] defined "generalized c y l i n d e r s " as Closed RGCs, i.e. GCs with cross-sections w h i c h are closed arcs and lie at right angles with the axis. Nevatia and Binford [11], and Miyamoto and Binford [10], used the term "generalized c o n e " to indicate Right GCs, i.e. GCs with cross-sections perpendicular to t h e axis. Marr and Nishihara [9] used the same term to indicate H o m o g e n e o u s GCs, those w h o s e cross-sections have constant shape but varying size, but Marr in [8] a d d e d the restriction that t h e axis be straight (i.e. SHGCs). W o o d h a m [15] also referred to SHGCs as "generalized c o n e s " . In describing the A C R O N Y M p r o g r a m , Brooks [6] uses the term "generalized c o n e " , defined (as here) to be GC. The p r o g r a m ' s repertoire of shapes, however, is limited to those GCs w h i c h are: 1. Either Circular or Polygonal. 2. Bilinear (including Linear and Uniform as special cases). 3. Either Straight; or Right Toroidal with circular axis. However, Brooks' co-researcher Binford [4] uses the term "generalized cylinder" to refer to ACRONYM'S shape descriptions. S o r o k a [ 1 4 ] defined "Elliptical C o n e s " to be S B L G C with elliptical cross-sections; i.e. GCs with straight axes and elliptical cross-sections scaled independently (but linearly) in t w o orthogonal directions. Soroka allowed both Right and Oblique GCs. In research related to this paper, Shafer and K a n a d e [ 1 2 ] use the terminology described herein. Their attention is limited to Straight H o m o g e n e o u s GCs, for w h i c h they present fundamental theorems derived from the definition, and an analysis of image c o n t o u r s and surface normals for SHGCs. 9 4. Summary This paper is intended to be a step towards the development of a precise set of terms to be used for describing shape classes. These might be used to c o m p a r e or describe the classes of shapes dealt with by various researchers; they might even be used to help formulate some of the more difficult problems involved in shape description. To this e n d , a taxonomy and terminology have been presented for the shapes k n o w n generalized cylinders. as The taxonomy begins with the definition of Generalized Cylinders, a n d includes subsets and supersets of this class of shapes. T h e terminology introduces terms and abbreviations for each shape class. C o m m o n mathematical shape classes are equivalent to some of these classes, and the shapes dealt with by other researchers can be described in this terminology. Doing so may allow the reader to better understand what assumptions have been made in various research efforts. 4.1 Acknowledgements Takeo Kanade provided g u i d a n c e for this work. T o m Binford c o n t r i b u t e d several useful ideas. 10 5. Bibiography [1] Agin, G. J . and Binford, T. O. C o m p u t e r Description of Curved Objects. IEEE Trans, on Computers [2] C-25:439-449, April, 1976. Ballard, D. H. a n d B r o w n , C. M. Computer Vision. Prentice-Hall, Englewood Cliffs, NJ, 1982. [3] Binford, T. O. Visual perception by computer. In Proc. IEEE Conf. on Systems and Control. [4] Miami, December, 1 9 7 1 . Binford, T. O. Spatial Representation. In Baumann, L. S. (editor), Proc. ARPA IUS Workshop, [5] pages 140-143. November, 1979. Braid, I. C. Designing with volumes. PhD thesis, C o m p u t e r Aided Design G r o u p , University of Cambridge Computer Laboratory, 1973. [6] Brooks, R. A. Symbolic reasoning a m o n g 3-D models and 2-D images. Artificial Intelligence 17:285-348, 1 9 8 1 . Special volume on c o m p u t e r vision. [7] Hollerbach, J . M. Hierarchical Shape Description of Objects by Selection and Modification of Prototypes. AI-TR 346, MIT, November, 1975. [8] Marr, D. Analysis of o c c l u d i n g contour. Proc. Royal Society of London [9] B-197:441 - 4 7 5 , 1 9 7 7 . Marr, D. and Nishihara, H. K. Representation and recognition of the spatial organization of three-dimensional shapes. Proc. Royal Society of London B-200:269-294,1978. 11 Miyamoto, E. a n d Binford, T. O. Display Generated by a Generalized C o n e Representation. In Conf. on Computer Graphics, Pattern Recognition, and Data Structure, pages 385-387. IEEE C o m p u t e r Society and A C M S I G G R A P H , May, 1975. Nevatia, R. a n d Binford, T. O. Description a n d recognition of c u r v e d objects. Artificial Intelligence 8:77-98,1977. Shafer, S. A. and Kanade, T. The Theory of Straight Homogeneous Generalized Cylinders. Technical Report, Carnegie-Mellon University, C o m p u t e r S c i e n c e Department, 1982. In preparation. Shani, U. A 3-D model-driven system for t h e recognition of abdnominal anatomy from CT scans. In International Joint Conf. on Pattern Recognition, pages 5 8 5 - 5 9 1 . Miami B e a c h , Florida, December, 1980. Soroka, B. I. Generalized c o n e s from serial sections. Computer Graphics and Image Processing 15(2): 154-166, February, 1 9 8 1 . W o o d h a m , R. J . Reflectance Map Techniques for Analyzing PhD thesis, MIT Al Lab, J u n e , 1978. Available as MIT AI-TR-457. Surface Defects in Metal Castings.
© Copyright 2026 Paperzz