Surface interrogation methods

Surface interrogation methods

ComFlut. Pergamon & Graphics, Vol. 19, No. 4, pp. 557-574, 1995 Copyright Q 1995 Elsevier Science Ltd Printed in Great Britain. All rights reserved ...

4MB Sizes 0 Downloads 66 Views

ComFlut.

Pergamon

& Graphics, Vol. 19, No. 4, pp. 557-574, 1995 Copyright Q 1995 Elsevier Science Ltd Printed in Great Britain. All rights reserved

0097-8493/95 $9.50+ 0.00

0097-8493(95)ooo34-8 Technical Section

SURFACE

INTERROGATION

METHODS

NIKOLA GUID,+ CRTOMIR OBLONSEK and BORUT iALIK Department of Computer Science, University of Maribor, SI-62000 Maribor, Smetanova 17, Slovenia Abstract-This paper deals with an overview and analysis of methods for inspecting surface quality. The overview is done by a new classification based on common mathematical concept yielding four groups of methods. First, techniques based on curvature, such as colour-coded map, lines of curvature, isolines of curvature, and focal surfaces are considered. They are followed by methods based on illumination models like isophotes, Iv-curves, reflection lines, highlight lines, and shaded-image rendering. Then, methods using special linear transformations are included: polar and orthonomic surfaces. The final methods studied are contour lines. At the end, the results of a comparative analysis of all considered methods, such as their suitability for determining continuities, inflection points, and convex/concave regions, their speed, sensitivity to surface changes, and invariance to geometric transformations, which could be very interesting and useful for a user, are presented

1. INTRODUCTION

The surfacemust have a shapewhich the humaneye considersto be smoothand fair. This criterion is used in both car and aircraft industries.It is an aesthetic criterion which, at the sametime, makesthe resulting surface easy to use in CAD/CAM systems.A fair surfaceshould be smooth (without a cusp or edge), convex, and without local flatness[1, 21. When a surfaceis observedon the screen,it is hard to tell whetherits shapeis acceptableor not because of the limited resolutionof the screen.In the caseof a surfacecompoundedof many patches,continuity of an appropriate order at the joints betweenpatches cannot be revealed. Sometimes,it may appear that the surface on the screenis completely flat, but in reality it is twisted.Theseunwanteddeviationscan be noticed if the correspondingsurfacepart is enlarged on the screenor if the whole surfaceis drawn on a large plotter. Unfortunately, the use of a plotter is time-consuming and expensive, especially in an interactive modellingprocess. Therefore, it is necessaryto use other more convenient techniqueswhich help us to declareif a surface is fair or not. Local concave shapes can be detectedby inflection points, while local flatnesscan be inspectedby curvature. We can usethe curvature of curves obtained with the intersectionbetweenan arbitrary plane, normal to the surface, and the surface. Unfortunately, in practice, this is not possibleto achieve owing to an infinite number of curves. Therefore, we must be satisfied with the Gaussian curvature, the average curvature, the principal curvatures, or the absolute curvature. Some authors define a measureof fairness with strain energy of the surface [3]. According to that + Author for correspondence. 557

definition, a surfaceor a part of a surfacewhich is more curved or distorted is lessfair. Several interrogation methodsare currently used to inspect the geometric quality of surfaces.These methodscan be appliedalsoto measurethe effectsof variouschang,es (control points, twist vectors, etc. [46]). Finally, it shouldalsobe noted that they are also useful as important tools in many 3-D vision problems,such as surfacematching, object recognition, and pose determination [7-91, owing to their invariance to surface reparameterization, to rigid body geometricaltransformations, and their independenceof viewpoint. Themainpurposeof this paperisto presenta survey of surfaceinterrogation methodsusedin CAGD and CAD, followed by their validation. First, a brief overview of :surfacedifferential geometry is made owing to its significantrole in the surfaceinspection. In the recentpast, there have beensomeattempts to survey surface interrogation methods. Beck, Farouki, and Hinds review contour maps, shaded image rendering,methodsbasedon surfacecurvature analysis(curvature maps, lines of curvature, directions of principal curvatures), and geodesicpaths [lo]. Two methods,displayingdirectionsof principal curvatureson a regulargrid stretchedover the whole surfaceand geodesicsrepresentingpaths with rninima1length betweentwo points on a surface,give a usernearly no information and until today they have not found imitators. Therefore we have decidedto eliminatethem from our overview and analysis. The next survey precededby Higashi,Kushimoto, and Hosaka [111is done by Hosaka [12]. He divides interrogation methods or characteristic curves of surfaces,as he calls them, into three categories.His classificationis basedon the method dependenceon geometrictransformations and/or illumination. He does not mention the methods using transformed

558

N. Guid, e. Obloniek and B. ialik

surfaces and methods where information is presented by coloured regions. Curves of the first category are inherent to surface geometry, in general independent of geometric transformations, such as lines of curvature, curves of zero Gaussian or zero mean curvature, and curves of the extremum principal curvature. Those of the second category, such as contour curves, contour orthogonal curves, extremum search curves and so on, are dependent on their positions and orientations in space. The third category, like isophotes and equihighlight curves, includes in addition to dependence on geometric transformations dependence on illumination. The recently published overview of surface interrogation algorithms is made by Hagen et al. [13]. After the description of orthonomics, isophotes, and reflection lines, they introduce focal surfaces as a new interrogation method. Our presentation of methods derives from a classification based on a common mathematical concept. It yields four groups of methods. The first group exploits various curvatures. Thus, at first, a colour map of curvature is considered. It is followed by representing lines of curvature and by displaying isolines of curvature. The last method based on curvature is a focal surface as some kind of a transformed surface stressing irregularities on an interrogated surface. The second group is based on simple illumination models. First, Iv-curves are introduced. They are followed by a method for analysing surfaces with lines of the equal light intensity, named isophotes. In the car industry, special rooms with parallel fluorescent lights on the ceiling are used for evaluating the quality of car sheet. This idea is exploited in the method, which performs drawing of so called reflection lines. Then the recently invented method called highlight lines is described [14]. Surface fairness can also be inspected with shaded-image rendering, enabling user manipulation over the viewpoint position and the characteristics of light sources, such as position or intensity. The third group is obtained by special linear transformations. Two such techniques are touched, polar surfaces and orthonomic surfaces stressing undesirable properties of surfaces. Intersection between a plane and a surface is the basis for the fourth group. The result of this idea are contour lines obtained by the intersection between a sequence of parallel planes and a surface. The surface interrogation methods may be classified into two categories if various display approaches are considered. In the first category, there are methods where information as the result of analysis is displayed over the same surfaces in the form of coloured regions or curves. The second category uses an auxiliary or transformed surface. In the latter category, there are focal, polar, and orthonomic surfaces, whereas, the majority of remaining methods belong only to the first category. Some of these considered methods can be based on both display approaches.

At the end of this paper, all of the presented methods are compared, and their merits and disadvantages are consIdered. Our comparison consists of two parts. In the first part, an investigation ofconsidered methods in the sense of suitability for determining continuities, inflection points, and convex/concave regions is done. The second part interrogates their speed, sensitivity to surface changes, and invariance to various geometric transformations.

2. A SHORT

OVERVIEW

OF SURFACE GEOMETRY

DIFFERENTIAL

Differential geometry plays an important role in surface interrogation. Therefore, we provide a review of its basic results. Let p be a surface defined in a parametric form with P = P(K v) = Mu, V) Y(U, V) z(u, 41, (u, 4 E [a, 4 x

[c, 41. The unit surface normal is the most elementary differential characteristic of a surface and determines the tangent plane at a surface point. It is defined with the parametric derivatives pU and p” by PU x P’ n=/p”xp’j The surface normal is not defined at points lying on a cusp, a ridge, or a self-intersection of the surface and when p” and p” are parallel, or if one of the derivatives has zero magnitude. On the surface p, the infinitesimal distance element between two adjaecent points p(u, v) and p(u+du, v+dv) is given by a’s2 = dCd T,

d=[dudv],

C=

[ 1 (1) ;

;

where

Ezp”.

p”,

F=p”.

p’,

Gcp”.

p’.

Equation (1) is known as the Jirst fundamental form of a surface, while E, F, and G are the coefficients of the lirst fundamental form. Since the distance ds lies on the tangent plane of the surface at p(u, v), it carries no information about how the surface is curved at this point. For this purpose, the following equation is defined: dh2=dDdT,

D=

[ 1 ;

;

(4

Equation (2) is called the secondjiindamental form of the surface. Scalar values L, M, and N can be calculated by:

L z n p”“, The normal

M = n . p”‘,

N = n p”.

vector at each surface point

deter-

Surface interrogation methods mines a family of normal planes(a normal plane contains the normal vector and passesthrough a point on a surface)creating with the intersectionof a surface a family of normal section curves. To each normal sectioncurve p,(t) = p(u(t), v(t)), the direction on the surface, determinedby the derivatives [d, v’], is assigned.The normal curvature is the curvature of the normal sectioncurve and is defined by (someauthors usethe negative sign[ 10, 15, 161):

559

able. A similarfeatureis valid for the meancurvature H, which is always zero for minimal surfaces

(saddles).Conversely, we can say that the absolute curvature alwaysrecognizesa curvature in a surface alsoin the casesof K=O or H=O. Taking thi: directions of principal curvatures as coordinate axes, the Dupin indicatrix at a point p on a surface is a conic lying in a plane close and parallel to the tangent plane at that point [17]. If K>O, the Dupin indicatrix is an ellipse, if K-CO, it consistsof two hyperbolas;if ICI= ~2, it becomesa dh* dDdT lc=-&pdCdT. circle; if K=O (but H#O), it degeneratesinto a pair of parallel lines; if ~1 = rc2= 0, it is a void. The normal curvature is an intrinsic property of Knapman points to the role that the Dupin the surface, that is, it is not dependenton para- indicatrix has for object recognition in machine meterization. It also has a maximum and minimum vision where the Gaussianand mean curvature do not seemto be useful [18]. with appropriate directions.The condition Points for which K>O are called elliptic. If K
M-rcF N-ICG

I[ 1 u’ v’

=o.

(3)

System(3) has a consistentsolution if K satisfiesthe following quadratic equation: n*-~HK+K=O

where the mean curvature curvature K are definedby: H=ENfGL-2FM

2det(C)

(4) H

and the Gaussian

det(D) ) K=det(C).

The maximal and minimal normal curvature (ICI and ~2) are the solution of Eq. (4): icl,* = H f m ~1 and ~2 are also calledthe principal

curvatures. The corresponding directions of principal curvatures, named also principal directions dt = [u’ Y’], are obtained by inserting ~1 or ~2 in Eq. (3). The mean and Gaussian curvatures are the average and the product of principal curvatures, respectively: H=&

+1c2),

K=IC~K~.

3. ANALYSIS

BASED

ON CURVATURE

One of the most important tools for surface analysis is its curvature. Results of this analysis are useful in CAD/CAM applications, for example, if we want to machine a modelled surface on a milling machine. In such a case, it may occur that the curvature at somepoint of the surface is too great with regard to the tool dimensions. Velocity and accuracy of milling depend on the use of an appropriate cutter for each curvature region. Since: tool changes are time-consuming operations, they should be minimized. Minimization can be achieved by subdividing the surface into regions with various curvature bounds [19]. Another application field of curvature analysis is in many 3-D vision problemswhere the curvaturebased representation of objects from range data (images)is used. When analysinga surface,we areoften interestedin its featuresand characteristicpoints, such as inflection points,saddles,hills, pits, etc., and continuitiesat the border between patches in the case of a compounded surface. Surface fairness analysis is started first, by calculating the Gaussianor other curvature and then by displayingit over the sameor auxiliary surface. The following possibilities are known:

Another type of curvature is the absolute curvature K& definedby:

1. colour-coded or intensity-coded map of curvature 2. linesof curvature 3. isolinesof curvature 4. focal surfaces.

Although rc=O, we can still have a highly curved surface. If K = 0 everywhere, the surfaceis akvelop-

All methodspresentedhere are basedon numerical calculation of curvatures and therefore they are independentof a surfacerepresentation.

UIG19:4-D

560

N. Guid, c. OblonSek andB. ialik

3.1. Colour-coded or intensity-coded map of curvature A convenient method for displaying the variation of different curvature types, for instance the Gaussian, the mean, the principal curvatures, etc. over a surface, is by meansof a colour-coded or intensity-coded map. In Fig. 1, we can see the Gaussian curvature mapping on an almost flat surface.Yellow and blue colours denotethe positive and negative Gaussiancurvatures, respectively.The darker yellow areasrepresentpoints with the greater positive Gaussiancurvature, while the darker blue areas represent points with the greater negative Gaussiancurvature. It can be seenthat the surface is not absolutelyflat, sincethe Gaussiancurvature is not equalto zero acrossthe whole surface(it changes in interval [-0.000035, 0.0000031). Figure 2 shows the curvature mapping of the surface compounded of four patches with C* continuity between them. In the middle of the surface, there is a band with the positive Gaussian curvature, while on both sides,the Gaussiancurvature is negative. The Gaussiancurvature changesin interval [-0.000598, 0.000560].The derivative of the curvature (the rate of curvature change)is discontinuous at the patch boundaries resulting in Mach banding effect. For someapplicationsin cutting with a spherical cutter, however, the principal curvatures are interesting. The cutter radius must be smallerthan the smallestconcave radius of the surface curvature if gouging is to be avoided [lo]. For this purpose,we can use the colour-coded maps of max(K1, Q) for concave regions. This kind of analysiscan also be exploited for determining a more optimal surface milling process[191.Thus, convex regionsareusually milled using flat-end cutters which, as opposedto ball-end cutters, can mill faster and remove more material. A searchof region boundson a surfacecan be effectively madewith different quadric functions of the principal curvatures. Bamhill et al. recommendedto usefiguresof three curvatures simultaneously,the Gaussian,mean,and absolutecurvature, wheninspectinga surface[5]. The

Fig. 2. Colour-coded map of the Gaussian curvature on a bicubic B-spline surface (C* continuity).

Gaussian curvature results as insufficient by any cylindrical or conical surfaceswhen it is zero everywhere,while the other two curvatureswill still give us information about surfaceshape.This equally holds true for the mean curvature in connection with minimal surfaces. In many cases,the extra information that is offered with colour can be confusingrather than enlightening. Therefore, grey bands are used [5]. If colour values are cyclically mapped on black and white when curvature regions are presented, black and white bands are shown. These bands are actually isolinesof the correspondingcurvatures. Koenderink and van Doom have found that it is easy to use a larger number of shapecategoriesif obtained with only one shapeindicator called the shape index [8]. The shapeindex is independentof the amount of curvature and is a number in the range [-1, + l] (Table 1). It is definedby 2 s = - arctan x2”

II

x2

+ fcl -

,

KI

2

K2

Kl

The shapeindex can be determinedfor all surface shapes,except for a planar patch. Convexities and concavitieshe on oppositesidesof the shapescale. Umbilics have Is] = 1, while parabolic lines (or isolinesof zero Gaussiancurvature) consistof points Table 1. Surface shape categories based on the shape index. Mnemonic

Fig. 1. Colour-coded map of the Gaussian curvature on an almost plane surface.

Spherical pit Trough Valley Saddle valley Saddle Saddle ridge Ridge Dome Spherical peak

Shape index range

Colour Green Cyan Blue Pale Blue White Pale Yellow Yellow Orange Red

Surface interrogation methods

with Is] = 0.5. The shapeindex can be mappedupon a colour or intensity scalein order to get information about the local shapeof a surface.In Fig. 3, we can seeshapecategorieson an almostflat surface,while Fig. 4 representsa saddlelike surface. The shape index is a single shape indicator in contrast to a pair of the classicalsurfacecurvature measures,such asthe Gaussianand meancurvature. Table 2 revealsthe relation betweenthe shapeindex and the classicalmeasures.It makessenseto distinguishbetweenrows 1and 3 only ifwe dealwith a closed surface,when differencebetweeninner and outer side of the surfaceis clear. Koenderink and van Doom haveintroduced yet anothernovel measure,calledthe curvedness. It is a positivenumberthat determinesthe amount of curvature and is definedby

561

The curvednessyieldsa similar effect as the absolute curvature. While the shapeindex is invariant to the object size (homogenousscaling), the curvednessis inverselyproportional to the sizeof the object and it vanishesonly at the planar points. 3.2. Lines of curvature The curve p,(t) = p(u(t), v(t)) lying on the surface p with directions [u’(t) v’(t)] satisfying one of the equationsin :system(3), is called a line of curvature

and is tangentto a principal direction at every point. This might more correctly be named a curve of curvature, but the customary terminology is used here. It indicates a directional flow for principal curvaturesacrossa surfaceand can be definedby the following differential equation [lo]:

; = B[A(u, v) - B(u) ~91

C= where 1 I

p = &([-A(u,

v) - B(u, v)]C[-A(u,

v) - B(u, v)]‘)-~‘~,

Fig. 3. Shape index on the surface from Fig. 1 using Table 1.

A(u,

v) = M-

KF,

B(u, v) = L - KE

and K is ~1 or Q . The differential equation (5) can be integrated by a simple numerical integration. The initial conditionsare the parametervalues(~0, ve)of a start point on the surfaceboundary. It can be Seenin the above equations that the derivatives of u(s) and V(S)are determinedby the secondderivativesof the surfaceand, hence,a line of curvature hasat eachsurfacepoint a continuity order equalto a degreeof the surfaceminusone. Therefore, lines of curvature can be used for detecting C’ continuity betweenpatchesof a compoundedsurface. Meanwhile, isophotesget the sameresult and can be easierto determine. Figure 5 shows a biquadratic B-spline surface compounded of two patches with C’ continuity betweenthem. The lines of curvature are therefore broken (only Co continuous).The surfacein Fig. 6 is fair (two patcheswith C2 continuity betweenthem), sincethe lines of curvature are smooth. Patcheswhoseborder curvesare linesof curvature are called principal patches [20]. A special case representsthe Dupin cyciide asa nonsphericalsurface with circular lines of curvature. They are used to modelsurfacesand to approximateblendingsurfaces in computer aided geometric design. Further, they are exploited to recognize the object shape in machinevision [ 181. In many cases,the linesof curvature give a natural parameterization

of a surface. Surface representation

basedon linesof curvature avoids problemsof local flattening of the surface. Brady et al. prove that planar lines of curvature

are useful for depicting

the

surface,suchas a surfaceof revolution [21]. The use of lines of curvature remains limited becauseof their cumbersomecalculationand the lack Fig. 4. Shape index on C2 surface from Fig. 2 using Table 1.

of experience for interpreting

their results. They show

N. Guid, (?I.OblonBek and B. ialik Table 2. Connection between the classical curvature measures and the shape index

Fig. 5. Lines of curvature on a biquadratic S-spfine surface (C’ continuous surface).

an existence of umbilics. The integration process, offset surfaceare easily derived from those of the neededfor calculating them, becomesunstablenear original surface,they can be usedin the analysisof an umbilic [ll]. Since the lines of curvature of an offset surfaces[12].

Surface interrogation methods

563

Fig. 6. Linesof curvatureon a bicubicB-splinesurface(C* continuoussurface). which can be consideredasa new surface: If we connect all surface points with the same curvature (e.g., Gaussian,mean,principal), we get a q(u, v) = [u v o(u, v)] = [u v o(p(u, v))]. curve called an isoline of correspondingcurvature. Sometimes,this curve is nameda contour of proper In the next step, intersectionsbetweenthe surfaceq curvature [3]. Isolinesof curvature can be determined and a family of planesr are calculated by the following method.First, a new scalarfunction o over a given parametricsurfacep is definedby: r = [0 0 c] + kAo[O0 11, k E [O: num-o] 3.3. Isolines of curvature

q

4%

4 = O(Pb,

v,),

o E {the Gaussiancurvature, the meancurvature, . . .} (6)

where num-o + 1 is the number of isolinesto be displayed.After the isolinesin the parametric space are obtained, ihey are mappedfrom the parametric spaceon the surfacep.

Fig. 7. Isolinesof theGaussian curvatureon C2 continuous surfacefrom Fig. 2.

564

N. Guid,e. OblonbekandB. ialik

Fig. 8. Focalsurfaceever C2 surfacefrom Fig. 2 (z=30,000). Sincethe calculation of an intersectionbetweenan arbitrary surface and a plane could be timeconsuming, the following approximation method could be used for determining isolines[22]. First, the surface q must be defined. At the equally spaced points in the parametric space, values of correspondingcurvature (i.e. values of the surface q) are calculated. On the basisof thesecalculated points, the surface is approximated with small triangles. Then, intersections between the plane z= o =const and all triangles are determined. A polyline approximating an isoline of curvature is obtained. If the number of the triangles is large enough, the angularity is not spotted at all. More advanced methodsfor calculating intersectionscan be found in [23, 241. Figure 7 displays a surface with two isolinesof zero Gaussiancurvature (bold lines) corresponding to two inflections of the surface. On the band between both lines, the Gaussiancurvature has a positive value, while, at both opposite sides,it is negative. The isolinesalso reveal that the surfaceis compounded of four patches with C2 continuity betweenthem (the bordersbetweenthe patchesare not marked) since the isolines of the Gaussian curvature are broken there (Co continuity). The broken isolinesare easierto detect than in Fig. 2. The interval of the Gaussiancurvature is the same in both figures.

b(u, v) = p(u, v) + tc;‘n(u, v) where Ki = ~1 or ~2. As mentioned in Section 2, more information about the surfacecurvature at a point can be reached by including both principal curvatures. Therefore, a generalizedfocal surfaceis introduced by q(u, v) = p(u, 4 + zwk

v)

where JC~= K: + rc:. z is a scaling factor giving a better result on an individual graphic system. The focal surfacefrom Fig. 8 is Co continuous over the patch borders of C2 surface. 4. AN.QLYSIS

BASED

ON SIMPLE

ILLUMINATION

MODELS

The second group of surface interrogation methods is based on simple illumination models, such as the diffuse model and the Phong model. It includesthe following methods: 1. Iv-curves, 2. isophotes, 3. reflection lines, 4. highlight lines,and 5. shaded-image rendering. All thesemethodsdependon the surfacenormal n and the first derivatives of the surface,respectively.

4.1. Iv-curves Iv-curves are curveson a surface,which dependon light rays (l) and projection rays (v) [25]. 1 is the 3.4. Focal surfaces A focal surfaceof a surfacep is definedasa special direction vector to a light source, while v is the direction vector to the viewpoint. They representa surfacein a normal congruenceby [13]:

Surfaceinterrogation methods generalizationof well-known isophotes.A function g for u, v E [0, l] is definedas

565

An intersectionbetweenthe curve of glitter and the curve of brilliancedeterminesapoint of reflection. i curves and r curves dependonly on the surface g(u, v) = cos0 cos4 normal II and the first derivatives of the surface, respectively.Thereforethey can be usedfor detecting Co and C’ continuity between patches. Similar where 0 = L(1,n) and 4 = L(v, n). Iv-curve is a curve on the surfacep = p(u, v) if and resultscan be obtained by isophotesas we shall see only if g(u, v) = const. If v=n and l=const, Iv-curve later in Fig. 10and Fig. 11.In Fig. 9, we can seehow an ir net can be usedfor detectinga reflection point. becomesan isophote.The angle0 must bebetween0 and 90” if the light sourceis to have any direct effect The curve of glitter and the curve of brilliance are on the point. When 0=90” the isophoterepresents presented wrth bold lines and the intersection the shadowoutline curve. If v-n and l#const (the betweenthem is a reflection point. The existenceof viewpoint is not in infinity), Iv-curve becomesa reflection points is proved also by isophotesderived pseudocentral isophote. If I=const and v=const, lv- with the Phong illumination model (also called curve is called an isopheng. When lfconst and highlight equr-brightnesscurves[12]). v=const, Iv-curve is nameda pseudocentral isopheng. The anglebetweenthe plane through the vectors 1 4.2. Zsophotes and n and the plane through the vectors v and n is Connecting all surface points with the same called an inzection angle with respectto 1and v and illumination intensity, we get a curve called an denoted as Y. The ratio Q, is named a congruence isophote or an equi-brightness curve [ll]. As menratio of an arbitrary point on the surfacewith respect tioned in the previoussection,the isophoteis a special to 1and v and is defined by: Iv-curve with v=n and l=const, which meansthat the parallel illumination is assumed[ 13,261.The method by Poeschlrequiresthat the surfacemust be without qu, v) = $ planar regions(n” = 0). To removethis deficiency, a new method for determining isophotes has been i curveisdefinedby the condition Y(u, v)=const, while developed.We define the isophoteas a curve on the r curve is determinedby (9(u, v)=const. i curvesand r surfacep, given with p(u(t), v(t)). The light sourceis curvesrepresenta net on the surfacecalledir net. The alsomovedfrom infinity, sothat lbecomesa function curve of brilliance isan i curve if Y = 0 (de@ v, n) = 0), of u and v. Then, the isophote is defined by the the curve of glitter isan r curve if @= 1 (l . n = v . n). equation:

Curve of brilliance

curve of glitter

- - i-curves r-curves - Phong illumination Fig. 9. ir net,thecurveof brilliance,the curve of glitter,andisophotes derived with the Phong illumination model on a BCzier surface.

566

N. Gnid, e. OblonSek and B. ialik

Fig. 10. Isophotes on Co surface.

Fig. 11. Isophotes on CT’ surface.

placed over the surfacecentre, the isophotesin the form of concentric circlesare determined.From Eq. (7), it follows that if the surfaceis C’ continuous, This differential equationis solvedby integratingEq. then the isophotesare C’-’ continuouscurves. This is the reason why isophotesare very suitable for (5), whereA(u, v) and B(u, V)are: detecting the continuity order betweenpatchesof a compounded surface. Figure 10 shows a Bezier A(u, v) =n”~l+l”~n, B(u, v)=nU~l+lu~n. surface compounded of two patches with Co (7) continuity between them. Owing to that, the isophol:esare not continuous at the patch joint. Figure With this method,correct resultsare obtainedeven 11 presentsisophoteson a B-spline surface comin the caseof totally flat surfaces.If the light sourceis poundedof four patheswith C ’ continuity between $ (n(tr, v) . l(z4, v)) = 0

Surface interrogation methods

567

lines

(a) The light source is over the centre of the

Isophote ___ Line of curvature

Fig. 13. Isophotes, lines of curvature, and parabolic lines on C 2 surface from Fig. 2 (large black dots denote extrema of illumination). surface. (b) The light source is moved aside.

Paral$ic

Parabolic lines

Surface interrogation methods

569

them. The isophotesare therefore broken (only Co continuity). Therearethe closestor the remotestpointsfrom the referenceplaneonanisophote. Connectingthesepoints fromallisophotes,wegetridgeorvalleycurves.Atthese extremumpoints, the isophote,the line of curvature, andthe contour linehave a commontangent[111.This canbeseenin Fig. 12,wherelargeblack dotsdenotethe isophoteextremum points. For calculating both the differencein illumination betweentwo adjacentisophotes and the distance between two contiguous contour line planes,a logarithmicscaleis used. Yuille showsthat extremaof illuminationusuallylie on the paraboliclines(i.e., the linewith zero Gaussian curvature) that typically correspondto ridgesor valleys ofilluminationintensity [27](seeFig. 13).Then,healso demonstratesthat an isophotehasa commontangent with the line of curvature at paraboliclines.From this fact, it follows that isophotescut parabolic lines at angles,which are independentof the position of light source,asseenin Fig. 13.

surfacewhidh can be seenfrom the viewpoint if the light line is reflected on the surface. It can be calculatedusing contouring operation on an auxiliary surface or by a numerical integration of the differential equation. The auxiliary surface can be definedas

4.3. ReJection

To obtain a reflection line on surfacep, first we have to find the intersection between plane z = 0 and surface q(u, v) and then project resulting curve(s) from uv plane back on surfacep. This can be done easily using a contouring operation. More precise resultscan be:obtainedby a numericalintegration of the following differential equation

lines

Reflection lines are a standard surfaceinterrogation tool by car manufacturers, first describedby Klass [4] and later by [6, 13, 171. They are the patterns created on the shiny car surface by the mirror imagesof a number of parallel fluorescent strip lights. If the mirror imagesare nice, then the surfaceis fair. A fluorescentstrip light is modelledwith a light line, given in parametric form: s(t) = qo+ tqd, t E R. A reflectionline is the projection of the light line on a

q(u, v) = [u v 4(u, v)]. d,(u, v) is a pseudo signed distance function and measuresthe distancebetween the reflected projection ray b and the light line q: d(u, v) = (s, %f, 90- P(% v)) where s=-v+2(v.n).n

b(r) = p(u, v) + ts, t E R.

qu,

v)du + qu,

v)dv = 0.

In Fig. 14, reflection lines, calculated by a contouring operation, are discontinuous since the surface compoundedof two patcheshas Co continuity at the patch joint.

Fig. 14.Reflectionlineson Co surfacefrom Fig. 10.

N. Guid,

e. Obloniek

and B. ialik

Highlight

Fig. Fig.

15. Highlight

4.4. Highright

lines

and bands Fig. 11.

on C’

surface

from

lines

A method very similar to reflection lines was recently presentedin [14]. The method performs displaying of highlight lines, which are view independent(reflectionlinesare not). A highlight line is a set of points on a surfacefor which the orthogonal distancebetweenthe surfacenormal and a light line is zero. To display the highlight line, the intersection betweenplane z=O and the auxiliary surface

q(u,v)= [uvdh(%VI]

16. Shaded

image

of Co surface

in Fig.

10.

Figure 16 illustrates the shaded image of the surfacepresentedin Fig. 10. The ambient and point sourceintensitiesare equal and the Phong exponent is chosento be 200. The surfaceis Co continuous sincethere is a discontinuoustransition of intensity at the border betweentwo patches.The motion of the point light sourcecausesthe motion of the specular highlights acrossthe surface,giving us information about the surfaceshape. Unfortunately, analysiswith shaded-image rendering is relatively time-consuming.The sameresult can be reached much more quickly with isophotes obtainedby the Phong illumination model including specularreflection. 5. ANALYSIS

BASED

ON LINEAR

TRANSFORMATIONS

where dh(U, v) denotes a pseudo signed distance 5.1. Polar surface function Supposethat neither a parametricsurfacenor one of its tangent planes passthrough the origin. A dh(u, 4 = (n, qd, 90- P(K v)) polarity with respectto the complex unit sphereis used.It is a linear transformation that mapsa point must be found. This can be done in the sameway as p(u, 19)on a surfaceinto the polar plane [28]: describedin previoussection. If instead of the light line a light cylinder with I: . x(u, v) + 7. y(u, v) + 6 . z(u, v) + 1 = 0. radius r is used, then so called highlight band is obtained on the surface.Two curvesdenotingborder of this light bandcan be computedwith the useof the If the parametersu and v run through the whole rangeof definition, the resulting family of the polar alternative signeddistancefunctions: planesenvelopsthe polar surfacex of the surfacep: d&,

19 = (n, qd, % - P(% VI> - (+r)tn

x %I.

In Fig. 15, highlight lines and bands,obtainedby singlelight line and cylinder (r== 16) respectively,on C t surfacefrom Fig. 11 are presented.One of the highlight linesis broken (Co continuity) at the patch border. 4.5. Shaded-image

The -parametricrepresentationof the polar surface can be achievedby partial differentiation with respect to u and v as:

rendering

The fairnessof a surfacecan be analysedalsowith complex rendering techniqueson a high resolution graphical terminal. By that analysis,a usermust be capableto manipulatethe viewpoint andlight sources. The basisof this methodis equalto oneof shading.

With the polar surface, we can recognize an undesirablezero Gaussiancurvature often causing waved regions. Then, the polar surface has a singularity at the correspondingpoint. Singularities can be cusps,edges,or dovetails.The polar surfacein

Surface interrogation methods

Fig. 17. Polar surface of C* surface from Fig. 2.

Fig. 18. 2-orthonomic surface of the surface from Fig. 2 with C* continuity

Fig. 17 has obvious singularities, which are two edges corresponding to two isolines of zero Gaussian curvature on the original surface.

respect to R. Its generalization 4th surface ok is defined by the equation: ok(u,

5.2. Orthonomic surface For a given surface p and a point R, that is not lying on the surface p or on any of its tangent planes, we can define a new surface by reflecting the point R across the tangent planes of p [13, 291. The obtained surface is called an orthonomic surface of p with

V) =

r +

k((p(u,

v) -

r)

. n(u,

orthonomic

v))

n(u,

v)

where n(u, v) is a unit normal vector of the surface p. kth orthononiic surface has a singularity in (4, ve), if and only if the Gaussian curvature of the original surface is zero. Figure 18 presents the 2-orthonomic surface of the original surface displayed in Fig. 2. It has two edges

N. Guid, 6 Obloniek and B. ialik

512 (singularities), each corresponding zero Gaussian curvature.

to an isoline of

Contour lines, sometimescalled cross-sectional contours [30, 311or often only in short contours [lo, 23, 321,are planar curves, eachparallelto a tixed referenceplane and lying on a surface.Contour lines are usually spacedat equalintervals. A surfaceis fair if contour lines change in a regular manner. Local maxima and minima of a surfacewith respectto the given reference direction are encircled by closed contour lines,while saddlepoints appearaspasses. Different methods exist for producing contour lines [23, 24, 321.For determiningthem, we usethe method describedin Section 3.3. The scalarfunction hasto be changedonly in order to representnow an - Extremum searchcurve altitude or a level. An exampleof contour linesover a surfaceis presentedin Fig. 19 (16 uniformly placed Fig. l!). Contour lines with extremum search curves on C2 curves are produced). surface from Fig. 2. Sometimes,we like to know locations of the maximum

or the minimum

height, saddle points, or

pathsfrom the lowestto the highestpointsof asurface. tion and searching inflection points or convex/ The extremum values of a surface p in the vertical concave regions. Results of our observations are direction II~(the unit normal vector of cutting planes) gatheredand presentedin Table 3. are obtainedby solvingthe following equations: Colour-codedor intensity-codedmap of curvature is appropriate for detecting wavenessand searching extreme curvatures. It can serve successfullyfor 4 (9. P(u, v)) = 0, $ (nf . ~(24,v)) = 0. detectingC ’ and C2 continuity betweenpatchesof a surfata. It can helpa programmerfor NC machinesin The resulting curves are the loci of the extremum choosingcorrespondingcutters. At the point with Co points on the curvesof constantparameterI( or v of continuity, a curveon the surfacecan beapproximated p(u, v), called extremum search curves [12]. They do by an osculatingcircle with the infinitesimalradius not only give the extremum points at their intersecwhichcausestheinfinite curvature [26].That isdifficult tion, but also depict, although roughly, the shapeof to representqwing to a scanlinealgorithm. Therefore, the surfacetogetherwith contour lines.An exampleof none of the methodsbasedon curvature can be used thesecurvesis displayedtogetherwith contour linesin for detectionof Co continuity. Inflection points and Fig. 19. convex/concaveregionsmay beproperly detected. Lines of curvature are appropriate for detecting 7. COMPARATIVE ANALYSIS only C’ continuity betweenpatches.Problemsraise In the first part of our comparativeanalysis,we try with Co continuity because of the normal vector Inflection points and convex/concave to investigate consideredmethodsin the senseof discontinuity. regions can be rarely distinguished. Isolines of their suitability for determining surface fairness. Therefore, we are interestedin continuity investiga- curvature possess the same characteristics as colourTable 3. Suitability of surface interrogation methods for determining continuities, inflection points, and convex/concave regions contin.

contin.

contin.

c2

Inflection points

Conv./conc. regions

Colour-coded map of curvature Lines of curvature Isolines of curvature Focal surfaces

No No No No

Yes Yes Yes Yes

Yes No Yes Yes

Iv-curves

Yes

Yes

No

Isophotes Reflection lines Hi&light lines Shaded-image rendering Polar surfaces Ortbonomic surface Contour lines

Yes Yes Yes Yes No No Yes

Yes Yes Yes Difficulty No No No

No No No No No No No

Yes Rarely Yes No No Rarely No No No Yes Yes Difficulty

Yes Rarely Yes No No Rarely No No No Difficulty Difficulty Difficulty

Method

co

c’

Surface interrogation methods

573

Table 4. Run-time, sensitivity to changes, and invariance to geometric transformations of considered methods Method Colour-coded map of curvature Lines of curvature Isolines of curvature Focal surfaces Iv-curves Isophotes Reflection lines Highlight lines Shaded-image rendering Polar surfaces Orthonomic surfaces Contour lines

Run-time*

Sensitivity to changes

Translation

Rotation

Homog. scaling

Long Medium Medium Short Medium Medium Medium Medium Long Short Short Medium

Fair Fair High High High High High High Poor High** High** Poor

Yes Yes Yes Yes No No No No N’O N’O N’3 Yest

Yes Yes Yes Yes No No No No No No No No

Yes+ Yes Yes+ Yes+ No No No No No No No Yed

* Long (wloos), medium (wlOs), short (N) ** If new inflection points are produced, otherwise medium sensitivity. + See text. r See text. coded map of curvature.

Focal surfaces are suitable

only for confirming C ’ and C2 continuity between patches of a surface. Their pictures are sometimes difficult to interpret if hidden linesare not removed. All methods based on illumination models are convenient for detection of Co and C’ continuity between patches. An exception representsshadedimage rendering, which is less appropriate for determining C’ continuity. These methodscannot be used for detecting C2 continuity and parabolic lines. Only isophotescan sometimeslocalize parabolic lines (seeFig. 13). For finding ridges,valleys, maxima, and minima, shadedimagerenderingis the most suitablemethod. Recognition of thesefeatures is improved by changingsystemparameters,suchas the viewpoint position or a light source position. Reflection linesresultas the most sensitiveto setting of both above mentioned systemparameterswhile highlight lines are sensitiveonly to the light source position. With Iv-curves, it is possibleto find exact points of reflection. Polar surface can be useful for detecting zero Gaussiancurvature but, unfortunately, the results are often unclear becauseof unusual shapes.It is important that neither the original surfacenor one of its tangent planespassesthrough the origin. Orthonomic surface has characteristicssimilar to onesof polar surface.Great care must be taken that none of the tangent planes on the original surface goes through the point R. Contour linesare appropriate for detectingsurface shapes,suchasridges,valleys, maxima,and minima. Only Co continuity betweenpatchesof a surfacecan be distinguished.Parabolic linesand convex/concave regions can be recognizedwith difficulty and only approximately. The secondpart of our comparisonincludesruntime, sensitivity to changes, and invariance to geometrictransformations,suchastranslation, rotation, and homogeneousscaling(Table 4). Run-timesare measuredon IBM compatiblePC486. The methodsthat calculatean intensity level for

each pixel such as colour-coded map of curvature and shaded-imagerenderingare the slowest.In the group of the fastestmethods,there are focal surfaces, polar surfaces,and orthonomic surfaces.The remaining consideredmethodspossess a mediumrun-time. The most sensitivemethodsto minute changesin the surface are isolines of curvature and focal surfaces.The same could be said for highlight lines if the light sources are set properly. Iv-curves, isophotes,and reflection lines are also among the most sensitivemethodsif the viewpoint and the light sourcesare chosenconveniently. Polar and orthonomic surfaces also result in great sensitivity if changesproduce new inflection points, otherwise they are characterizedby medium sensitivity. Some methods, such as shaded-imagerendering and contour lines, have poor sensitivity to changesin surface,whereasthe remainingmethodspossess fair sensitivity. The methodsbasedon curvature are invariant to geometric transformations. If a surface is scaled homogeneously by the factor a, the normal, the mean, and absolutecurvature are reduceda times,whereas the Gaussiancurvatureis reduceda2times.If the same number of colours is used for changeddomain of curvature, colour-coded map of curvature is not altered. Otherwise, if colours present unchanged domain of curvature, then it ismodified. The sameis valid for isolinesof curvature and focal surfaces. The methodsbasedon illumination modelsor on linear transformations are variant to geometric transformations.If the number of intersectionswith parallel planesremainsthe same(it is necessaryto change only one coefficient in plane equations), contour lines also result invariant to translation and homogeneousscaling. All consideredmethodsare invariant to changesin surfaceparameterization. In order to make possibleour analysis, a programmepackage,called SURFAN, has been developed.All methodspresentedhereare implementedin it. It is written in C++ and runs on IBM PC

574

N. Guid, C. OblonSek and B. Zalik

compatible system.

computers

under the MS-DOS

8. CONCLUSIONS

A comprehensive overview of surface interrogation methods is made. The order of study of methods derives from the classification based on a common mathematical concept. Our most important concern is to present the interrogation power of methods used in CAGD and CAD/CAM systems. We are interested also in possible applications of these methods in 3-D vision problems. At the end, a comparison of all considered methods is made. First, the methods are analysed in the sense of their suitability for determining surface continuities, inflection points, and convex/concave regions. In the second part of our comparison, we confront ourselves with algorithm speed, sensitivity to changes, and invariance to geometrical transformations, such as translation, rotation, and homogeneous scaling. Results of the comparison have revealed the pros and cons of the use of the methods considered. Acknowledgements-This work was financially supported by the Ministry of Science and Technology of the Republic of Slovenia under Contract P2-5147-0796-93. REFERENCES

1. D. Quilin Geometry

2. 3. 4. 5. 6. 7. 8. 9. 10. 11.

and B. J. Davies, Surface for

Computer-Aided

Design-and

evaluating

operating

Engineering Ma&facture,

Ellis Horwood Limited. Chichester (1987). S. Bu-qing and L. Ding-yuan, &mp&tionol Geometry-Curve and Surface Modeling, Academic Press, Boston (1989). N. J. Lott and D. I. Pullin, Methods for fairing B-spline surfaces. Computer-Aided Design 20, 597-604 (1988). R. Klass, Correction of local surface irregularities using reflection lines. Computer-Aided Design 12, 73-77 (1980). R. E. Bamhill, G. Farin, L. Fayard and H. Hagen, Twists, curvatures and surface interogation. ComputerAided Design 20, 341-346 (1988). E. Kaufmann and R. Klass, Smoothing surfaces using reflection lines for families of splines. Computer-Aided Design 20, 312-316 (1988). B. C. Vemuri, A. Mitchie, and J. K. Aggarwal, Curvature-based representation of objects from range data. Image Vision Comp. 4, 107-l 14 (1986). J. J. Koenderink and A. J. van Doom, Surface shape and curvature scales. Image and Vision Comp. 10, 557565 (1992). S. Z. Li, Invariant surface segmentation through energy minimization with discontinuities. Int. J. Comp. Vision 5, 161-194 (1990). J. M. Beck, R. T. Farouki, and J. K. Hinds, Surface analysis methods. IEEE Comput. Graphics and Applications 6(12), 18-36 (1986). M. Higashi, T. Kushimoto, and M. Hosaka, On formulation and display for visualizing features and

quality

EUROGRAPHICS

of free-form surfaces. In Proc. North-Holland, Amsterdam,

‘90,

299-309 (1990). 12. M. Hosaka, Modeling of Curves and Surfaces in CAD/ C.AM, Springer-Verlag, Berlin (1992). 13. H. Hagen, S. Hahman, T. Schreiber, Y. Nakajima, B. Wiirdenweber, and P. Hollemann, Surface interrogation al,gorithms. IEEE Comput. Graphics and Applications 12(5), 53-60 (1992). 14. K-P. Beier and Y. Chen, Highlight-line algorithm for realtime surface-quality assessment. Computer-Aided Design 26, 268-277 (1994). 15. R T. Farouki, The approximations of non-degenerate offset surfaces. Comp. Aided Geom. Design 3, 1543 (1986). 16. C J. K. Williams, Use of structural analogy in generation of smooth surfaces for engineering pi117)oses. Commuter-Aided Desipn 19, 310-322 (1987). 17. G. Farin, Cuives and Surfa& fo; Compute; Aiied Geometric Design-A Practical Guide, (2nd Ed.), Academic Press, Boston (1990). 18. J. Knapman, Dupin’s cyclide and the cyclide patch. Image and Vision Comp. 5, 167-173 (1987). 19. G Elber and E. Cohen, Second-order surface analysis using hybrid symbolic and numeric operators. ACM Trans. on Graphics 12, 160-178 (1993). 20. V. Chandru, D. Dutta, and C. M. Hoffman, On the geometry of Dupin cyclides. The Visual Comp. 5, 277290 (1989). 21. M. J. Brady, J. Ponce, A. Yuille, and H. Asada, Describing surfaces. Comput. Vision, Graphics, and Image Process$g 32, l-28 (1985). 22. N Guid and C. Oblonbek, Surface Fairness Determinatbn, Computer graphics report series, l(5), Faculty of Technical Sciences, Maribor (1994). 23. S. G. Satterfield and D. F. Rogers, A procedure for generating contour lines from a B-spline surface. ZE’EE Comput.

24.

25. 26. 27.

Graphics

and Applications

5(4),

71-75

(1!)85). J. L. Zheng and C. B. Millham, A linear pivoting method for detecting and tracing planar section curves of free-form surfaces. Comput. & Graphics 16, 41 l-420 (1!)92). J. Lang, On illuminations of C2-surfaces in vector graphic description. Comput. & Graphics 12, 33-38 (1988). T. Poeschl, Detecting surface irregularities using isophotes. Comp. Aided Geom. Design 1, 163-168 (1!)84). A. L. Yuille, Zero crossings on lines of curvature. Cornput.

Vision,

Graphics,

and Image Processing

45,68-

87 (1989). 28. J. Hoschek, Detecting regions with undesirable curvature. Comp. AidedGeom. Design 1,183-192 (1984). 29. J. Hoschek, Smoothing of curves and surfaces. Comp. Aided Geom. Design 2, 97-105 (1985). 30. N. Kehtamavaz, L. R. Simar, and R. J. P. de Figuiredo, A syntactic/semantic technique for surface reconstruction from cross-sectional contours. Comput. Vision,

Graphics,

and Image

Processing

42, 399-409

(1!)88). 3 1. J. D. Boissonat, Shape reconstruction from planar cross sections. Comput. Vision, Graphics, and Image Processing 44, l-24 (1988). 32. C. S. Petersen, Adaptive contouring of three-dimensional surfaces. Comp. Aided Geom. Design 1, 61-74 (1984).