geometric surface smoothing via anisotropic diffusion of normals · first is the use of level set...

8
Geometric Surface Smoothing via Anisotropic Diffusion of Normals Tolga Tasdizen School of Computing Univ. of Utah Ross Whitaker School of Computing Univ. of Utah Paul Burchard Dept. of Mathematics UCLA Stanley Osher Dept. of Mathematics UCLA In Proceedings of IEEE Visualization 2002, pp. 125–132 (a) (b) (c) Figure 1: Processing results on the MRI head model: (a) original isosurface, (b) isotropic diffusion (intrinsic Laplacian of mean curvature ¤ow), and (c) anisotropic diffusion. The small protrusion under the nose is a physical marker used for registration. ABSTRACT This paper introduces a method for smoothing complex, noisy sur- faces, while preserving (and enhancing) sharp, geometric features. It has two main advantages over previous approaches to feature pre- serving surface smoothing. First is the use of level set surface mod- els, which allows us to process very complex shapes of arbitrary and changing topology. This generality makes it well suited for processing surfaces that are derived directly from measured data. The second advantage is that the proposed method derives from a well-founded formulation, which is a natural generalization of anisotropic diffusion, as used in image processing. This formula- tion is based on the proposition that the generalization of image £ltering entails £ltering the normals of the surface, rather than pro- cessing the positions of points on a mesh. CR Categories: I.3.5 [Computer Graphics]: Computational Ge- ometry and Object Modeling—Curve, surface, solid and object rep- resentations Keywords: anisotropic diffusion, surface fairing, geometric sur- face processing, intrinsic Laplacian of curvature, level sets 1 INTRODUCTION The fundamental principles of signal processing give rise to a wide range of useful tools for manipulating and transforming signals and images. The generalization of these principles to the processing of 3D surfaces has become an important problem in computer graph- ics, visualization, and vision. For instance, 3D range sensing tech- nologies produce high resolution descriptions of objects, but they often suffer from noise. Medical imaging modalities such as MRI and CT scans produce large volumes of scalar or tensor measure- ments, but surfaces of interest must be extracted through some seg- mentation process or £tted directly to the measurements. One of the most prevalent uses of image processing, is for smoothing or denoising images. Often denoising of images is done with a low-pass £lter, which reduces noise, but also blurs sharp features and details, such as edges. The literature demonstrates a variety of nonlinear processes that reduce noise while preserving edges. Likewise, when we build surfaces from measured data, we would like to reduce the effects of noise on visualization or subse- quent processing. However, the question of how to apply nonlinear image-smoothing processes to surfaces remains open. In this paper, we focus on the generalization of anisotropic dif- fusion, a PDE-based, edge-preserving, image-smoothing technique, to surface processing. The proposed method offers two advantages over previous work on feature-preserving smoothing of surfaces. First is the use of level set surface models, which allows us to process very complex shapes of arbitrary and changing topology. This generality makes the method well suited for processing and visualizing surfaces that are derived directly from measured data. The second advantage is that the proposed method follows from a well-founded variational formulation, which is a natural generaliza- tion of anisotropic diffusion, as proposed by Perona and Malik [21] (P&M) for images. This formulation will alleviate the need for de- veloping heuristics, which are sometimes used to achieve the qual- itative effects of the P&M diffusion in the absence of a complete, mathematical generalization for surfaces [6]. Figure 1 demonstrates these concepts on an isosurface extracted from a MRI scan. The original isosurface is a good example of the kind of noisy, mea- sured data with which this paper is concerned. Isotropic diffusion which behaves like a low pass £lter on the surface normals is not particularly effective for denoising; the noise is removed but surface features are deformed or lost in the process. Anisotropic diffusion is a much better candidate for denoising as can be seen in Figure 1(c). Note that all of the surfaces in this paper are represented and pro- cessed volumetrically and rendered using the marching cubes algo- rithm [14]. The use of a level set formulation enables us to achieve a “black box” behavior, which is re¤ected in the nature of the results pre- sented in this paper. Hence, the techniques presented in this paper offer a new set of capabilities that are especially interesting when processing measured data. Measured data can be acquired directly in volumetric form or acquired as a surface mesh and converted

Upload: others

Post on 22-Jul-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Geometric Surface Smoothing via Anisotropic Diffusion of Normals · First is the use of level set surface mod-els, which allows us to process very complex shapes of arbitrary and

Geometric Surface Smoothing via Anisotropic Diffusion of Normals

Tolga TasdizenSchool of Computing

Univ. of Utah

Ross WhitakerSchool of Computing

Univ. of Utah

Paul BurchardDept. of Mathematics

UCLA

Stanley OsherDept. of Mathematics

UCLA

In Proceedingsof IEEE Visualization 2002,pp. 125–132

(a) (b) (c)

Figure 1: Processing results on the MRI head model: (a) original isosurface, (b) isotropic diffusion (intrinsic Laplacian of meancurvature ¤ow), and (c) anisotropic diffusion. The small protrusion under the nose is a physical marker used for registration.

ABSTRACT

This paperintroducesa methodfor smoothingcomplex, noisysur-faces,while preserving(andenhancing)sharp,geometricfeatures.It hastwo mainadvantagesoverpreviousapproachesto featurepre-servingsurfacesmoothing.First is theuseof level setsurfacemod-els, which allows us to processvery complex shapesof arbitraryand changingtopology. This generalitymakes it well suitedforprocessingsurfacesthat are derived directly from measureddata.The secondadvantageis that the proposedmethodderives froma well-foundedformulation, which is a naturalgeneralizationofanisotropicdiffusion, asusedin imageprocessing.This formula-tion is basedon the propositionthat the generalizationof image£lteringentails£lteringthenormalsof thesurface,ratherthanpro-cessingthepositionsof pointson a mesh.

CR Categories: I.3.5 [ComputerGraphics]:ComputationalGe-ometryandObjectModeling—Curve,surface,solidandobjectrep-resentations

Keywords: anisotropicdiffusion, surfacefairing, geometricsur-faceprocessing,intrinsic Laplacianof curvature,level sets

1 INTRODUCTIONThefundamentalprinciplesof signalprocessinggive riseto a widerangeof usefultoolsfor manipulatingandtransformingsignalsandimages.Thegeneralizationof theseprinciplesto theprocessingof3D surfaceshasbecomeanimportantproblemin computergraph-ics, visualization,andvision. For instance,3D rangesensingtech-nologiesproducehigh resolutiondescriptionsof objects,but theyoften suffer from noise. Medical imagingmodalitiessuchasMRIandCT scansproducelarge volumesof scalaror tensormeasure-ments,but surfacesof interestmustbeextractedthroughsomeseg-mentationprocessor £tteddirectly to themeasurements.

One of the most prevalent usesof image processing,is forsmoothing or denoising images.Oftendenoisingof imagesis donewith a low-pass£lter, which reducesnoise,but also blurs sharp

featuresanddetails,suchasedges.The literaturedemonstratesavariety of nonlinearprocessesthat reducenoisewhile preservingedges.Likewise,whenwe build surfaces from measureddata,wewould like to reducetheeffectsof noiseon visualizationor subse-quentprocessing.However, thequestionof how to applynonlinearimage-smoothingprocessesto surfacesremainsopen.

In this paper, we focuson the generalizationof anisotropicdif-fusion,aPDE-based,edge-preserving,image-smoothingtechnique,to surfaceprocessing.Theproposedmethodofferstwo advantagesover previous work on feature-preservingsmoothingof surfaces.First is the use of level set surface models,which allows us toprocessvery complex shapesof arbitraryandchangingtopology.This generalitymakes the methodwell suitedfor processingandvisualizingsurfacesthat arederived directly from measureddata.The secondadvantageis that the proposedmethodfollows from awell-foundedvariationalformulation,whichis anaturalgeneraliza-tion of anisotropicdiffusion,asproposedby PeronaandMalik [21](P&M) for images.This formulationwill alleviatetheneedfor de-velopingheuristics,which aresometimesusedto achieve thequal-itative effectsof the P&M diffusion in the absenceof a complete,mathematicalgeneralizationfor surfaces[6]. Figure1 demonstratestheseconceptson an isosurfaceextractedfrom a MRI scan. Theoriginal isosurfaceis a good exampleof the kind of noisy, mea-sureddatawith which this paperis concerned.Isotropicdiffusionwhich behaveslike a low pass£lter on the surfacenormalsis notparticularlyeffectivefor denoising;thenoiseis removedbut surfacefeaturesaredeformedor lostin theprocess.Anisotropicdiffusionisamuchbettercandidatefor denoisingascanbeseenin Figure1(c).Note that all of the surfacesin this paperarerepresentedandpro-cessedvolumetricallyandrenderedusingthemarchingcubesalgo-rithm [14].

Theuseof a level setformulationenablesusto achieve a “blackbox” behavior, which is re¤ectedin the natureof the resultspre-sentedin this paper. Hence,the techniquespresentedin this paperoffer a new setof capabilitiesthat areespeciallyinterestingwhenprocessingmeasureddata.Measureddatacanbeacquireddirectlyin volumetric form or acquiredas a surfacemeshand converted

Page 2: Geometric Surface Smoothing via Anisotropic Diffusion of Normals · First is the use of level set surface mod-els, which allows us to process very complex shapes of arbitrary and

into a volume[4]. In someapplications,suchasanimation,mod-elsare� manuallygeneratedby a designerandtheparameterizationis not arbitrarybut is an importantaspectof the geometricmodel.In thesecasesmesh-basedprocessingmethodsoffer a powerful setof tools, suchashierarchicalediting [11], which arenot yet pos-siblewith theproposedrepresentation.However, in otherapplica-tions,suchas3D segmentationandsurfacereconstruction[16, 32],the processingis datadriven, surfacescan deform quite far fromtheir initial shapesand changetopology, and userintervention isnot practical.Furthermore,whenconsideringprocessesotherthanisotropicsmoothing,suchasnonlinearsmoothing,the creationorsharpeningof small featurescan exhibit noticeableeffects of themeshtopology—featuresthatarealignedwith themesharetreateddifferentlythanthosethatarenot.

The proposedmethodrelies on a novel techniquefor solvingfourth-order¤ows on level setsurfaces[19, 26]. Our strategy is tosplit thesurfacedeformationinto a two stepprocessthat(i) solvesanisotropicdiffusionon thenormalmapof thesurface,and(ii) de-forms the surfaceso that it £ts the smoothednormals. This ap-proachis basedon the propositionthat the naturalgeneralizationof imageprocessingto surfacesis via the surface normal vectors.The variationof the normalshasmoreintuitive meaningthanthevariation of points on the surface. A smoothsurfaceis one thathassmoothlyvarying normalsandcreaseson a piecewise smoothsurfaceappearasdiscontinuitiesin the normals.For instance,thede£nitionof a creasebecomesmuch more complicatedand tiedto the parameterizationif the variationof pointson the surfaceisusedinsteadof thenormals;see[27] for moredetails.In this light,the differencesbetweensurfaceprocessingand imageprocessingare threefold. Normalslive on a manifold (the surface)and can-notnecessarilybeprocessedusinga¤atmetric,asis typically donewith images.Normalsarevectorvaluedandconstrainedto beunitlength;theprocessingtechniquesmustaccommodatethis. Normalsare coupledwith the surfaceshape,and thus the normalsshoulddragthesurfacealongastheir valuesaremodi£edduringprocess-ing. Thisgeneralmechanismwill alsoopenthedoorof possibilitiesfor mappingothertypesof imageprocessingalgorithmsto surfaces.

The rest of this paperis organizedas follows: Section2 willpresentabrief overview of relatedwork in theliterature.Themath-ematicalformulationfor our approachwill be discussedin Sec.3.Examplesof isotropicandanisotropicdiffusion will be presentedin Sec.4. Section5 will summarizethe resultsof this paperandoutlinedirectionsfor futurework. Thedetailsof thenumericalim-plementationof our methodis coveredin AppendixA.

2 RELATED WORKThe majority of surfacesmoothingresearchhasbeenin the con-text of surface fairing with themotivationof creatingaestheticallypleasingsurfacesusingtriangulatedmeshes.Surfacefairing typi-cally operatesby minimizing a fairnessor penaltyfunctionthatfa-vorssmoothsurfaces[17,30]. Fairnessfunctionscandependonthegeometryof thesurfaceor theparameterization.Geometricpenaltyfunctionsmake useof invariantssuchasprincipal curvatures,andthereforeproduceresultsthat arenot signi£cantlyaffectedby ar-bitrary decisionsaboutthe parameterization.The proposedworkrelieson geometricpenaltyfunctions.

Oneway to smootha surfaceis to incrementallyreduceits sur-facearea.Thiscanbeaccomplishedby meancurvature¤ow (MCF)which is asecondordergeometric¤ow. MCF canreducenoise,butalsohassomeunsatisfactorysideeffects,includingthecreationofsingularitiesandshrinkage(seeSec.3). A greatdealof researchhasfocusedon modi£edsecond-order¤ows thatproducebetterre-sultsthanMCF. Using level setmodels,several authorshave pro-posedsmoothingsurfacesby weightedcombinationsof principlecurvatures. For instance,Whitaker [31] hasproposeda nonlinearreweightingschemethatfavorsthesmallercurvatureandpreserves

cylindrical structures.Faugeraus[15] proposesa smoothingby theminimum curvature. A variety of other combinationshave beenproposed[24].

A similarsetof curvature-basedalgorithmshavebeendevelopedfor surfacemeshes. For instance,Clarenz et al. [6] proposeamodi£edMCF as an anisotropicdiffusion of the surface. Theythresholda weightedsumof the principle curvaturesto determinethesurfacelocationswhereedgesharpeningis needed.Tangentialdisplacementis addedto the standardMCF at theselocationsforsharpeningtheedges.Although,this¤ow producesresultsthattendto preserve sharpfeatures,it is not a strict generalizationof P&Mdiffusion from imagesto surfaces. Anothermesh-basedmodi£edMCF is proposedin [18] wherea thresholdon themeancurvatureis usedto stopover-smoothing. Anisotropicdiffusion asa modi-£edsurfaceareaminimizationfor heightfunctionswasproposedin[9]. Taubinproposesa “linear anisotropicLaplacianoperator”formeshesthat is basedon a separateprocessingof thenormals[29].As with [6, 18], it is essentiallyareweightingof theLaplacian.It issimilar to our approachin thesensethatsurfacepositionsarere£t-tedto theprocessednormals;however, our approachuseslevel setsurfacesthatarere£ttedto thenormalswith a secondorderPDEasopposedto theleastsquaresmesh£tting in [29].

Theselevel set and meshbasedmethodsare all modi£cationsof curvature¤ows, and are thereforeall second-orderprocesses.Becausethey arebasedon reweightingsof curvature,thesemeth-ods always smooththe surfacein onedirectionor another. Theydo not exhibit a sharpeningof details,which is achieved by theP&M equation(for images)throughan inversediffusion process.Hence,thesemethodsare not satisfactory generalizationsof theP&M anisotropicdiffusionequation.

Thegeneralizationof P&M to surfacesrequiresa high-orderge-ometric¤ow. Usinga variationalframework, a usefulsecond-orderpenaltyfunctionis total curvature�

Sκ2

1 � κ22 dS � (1)

whereκ1 andκ2 arethe principal curvatures.Minimizing (1) hasbeenshown to deformsurfacesinto spheres[22], whichareasteadystatesolution.Totalcurvatureis ageometric(invariant)propertyofthesurface.Themeshfairingapproachof [30] whichminimizes(1)involves£tting local polynomialbasisfunctionsto local neighbor-hoodsfor thecomputationof total curvature.The£rstvariationoftotal curvatureis intrinsic Laplacianof meancurvature(ILMCF),a fourth orderequation. Insteadof solving fourth orderPDEsdi-rectly, Kobbelt et al. decouplethe fourth orderexpressioninto apair of second-orderequations[25]. However, this approachworksonly for meshes,and relies on analytic propertiesof the steady-statesolutions,∆H � 0, by £ttingsurfaceprimitivesthathavethoseproperties. Thus, it doesnot apply to other typesof smoothingprocesses,suchasthosethatminimizenonlinearfeature-preservingpenalties.

If we penalizethe parameterization(i.e. non-geometric),totalcurvaturebecomesthethin plateenergy functional.Thevariationalderivative of thin plate energy is the linear biharmonicoperator.Weightedaveragesof thin plateandmembraneenergiesareusedtoconstructmesh£lterswith desirableproperties[28, 13]. Modi£ca-tionsto themeshoperatorsalleviateparameterizationdependencies[8, 11]. In this paper, we focus on geometricsurfacesmoothingstrategieson level setsurfacesusingnonlinearpenaltyfunctions.

The work in this paperis also motivatedby that of Chopp&Sethian[5], who derive the intrinsic Laplacianof curvaturefor animplicit curve, andsolve theresultingfourth-ordernonlinearPDE.However, they arguethatthenumericalmethodsusedto solve sec-ond order¤ows arenot practical,becausethey lack long term sta-bility. They proposeseveralnew numericalschemes,but nonearefound to be completelysatisfactorydueto their slow computation

Page 3: Geometric Surface Smoothing via Anisotropic Diffusion of Normals · First is the use of level set surface mod-els, which allows us to process very complex shapes of arbitrary and

Figure2: Second-andfourth-ordersurfacesmoothing.Fromleft toright: Original model,meancurvature¤ow, andintrinsic Laplacianof meancurvature¤ow.

Figure3: Shown herein 2D, the processbegins with a shapeandconstructsa normalmapfrom the distancetransform(left), mod-i£es the normal map accordingto a PDE derived from a penaltyfunction(center),andre£tstheshapeto thenormalmap(right).

andinability to handlesingularities.Theresultsin this paperallowusto solvethisequationmoreeffectively, in 3D, with anadditional,nonlineartermthatpreservessharpdetails.

3 MINIMIZING TOTAL CURVATURESeveral authors have observed the advantagesof higher-orderderivatives for smoothingsurfaces[13, 8]. As an illustration ofthe importanceof higher-ordergeometricprocessing,considertheresults in Fig. 2, which demonstratesthe differencesbetweenprocessingsurfaceswith meancurvature¤ow (MCF) and intrin-sic Laplacianof meancurvature ¤ow (ILMCF). The amountofsmoothingfor both waschosento be qualitatively similar, andyetimportantdifferencescanbeobservedonthesmallerfeaturesof themodel.MCF hasshortenedthehorns,andyet they remainsharp—not a desirablebehavior for a “smoothing”process.This behaviorfor MCF is well documentedasapinchingoff of cylindrical objectsandis expectedfrom thevariationalpointof view: MCF minimizessurfaceareaandthereforewill quickly eliminatesmallerpartsof amodel.Someauthors[24] have proposedvolumepreservingformsof second-order¤ows,but theseprocessescompensateby enlargingthe object as a whole, whichexhibits,qualitatively, thesamebehav-ior on small features.ILMCF, in Fig. 2, preservesthe structureofthesefeaturesmuchbetterwhile smoothingthem.

In this section,we will introducea methodfor solving generalfourth order surface¤ows by breakingthem into two secondor-der PDEs. The speci£c¤ows we are interestedin are isotropic(ILMCF) andanisotropicdiffusion.Thispairof equationsis solvedby allowing the surfaceshapeto lag the normalsas they are £l-teredandthenre£ttedby a separateprocess.Figure3 shows thisthreestepprocessgraphicallyin 2D for ILMCF—shapesgive riseto normalmaps,which,when£ltered,give riseto new shapes.

3.1 NotationTo facilitate the discussion,we usethe Einsteinnotationconven-tion, where the subscriptsindicate tensor indices, and repeatedsubscriptswithin a productrepresenta summationover the index(acrossthe dimensionsof the underlyingspace).Furthermore,weusethe convention that subscriptson quantitiesrepresentderiva-tives,exceptwherethey arein parenthesis,in which casethey referto a vector-valuedvariable. Thus, φi is the gradientvector of ascalarquantityφ : IRn �� IR. TheHessianis φi j, andtheLaplacianis φii. A vector£eldis v � i� , wherev : IRn �� IRn, andthedivergence

of that£eldis v � i� i. Scalaroperators,suchasdifferentialsbehave in

theusualway. Thus,gradientmagnitudeis φi � φiφi andthedifferentialfor a coordinatesystemis dx � i� � dx1dx2 ����� dxn.

Level setsurfacemodelsrely on thenotionof a regularsurface,which is a collectionof 3D points, , with a topologythatallowseachpoint to bemodeledlocally asa functionof two variables.Wecandescribethedeformationof suchasurfaceusingthe3D velocityof eachof its constituentpoints,i.e.,ds � i��� t ��� dt for all s � i��� . Ifwe representthesurfaceimplicitly at eachtime t, then

�� s � i��� t ��� φ s � i��� t ��� t � 0 � (2)

Surfacesde£nedin this way divide a volumeinto two parts:inside(φ � 0) andoutside(φ � 0). It is commonto chooseφ to be thesigneddistancetransformof , or anapproximationthereof.Thesurfaceremainsa level setof φ over time, andthustakingthetotalderivative with respectto time (usingthechainrule) gives

∂φ∂ t

��� φ j

ds � j�dt � (3)

3.2 Total Curvature of Normal MapsWhenusingimplicit representationsonemustaccountfor the factthatderivativesof functionsde£nedonthesurfacearecomputedbyprojectingtheir3D derivativesontothetangentplaneof thesurface.Let N � i� : IR3 � S3 bethenormalmap,which is a £eldof normalsthat areeverywhereperpendicularto the family of embeddediso-surfacesof φ—thusN � i� � φi � φkφk. The3 � 3 projectionmatrixfor the implicit surfacenormalis P� i j� � N � i� N � j� , andP� i j� V � i� re-turnstheprojectionof V � i� ontoN � i� . Let I � i j� betheidentitymatrix.Thentheprojectionontotheplanethat is perpendicularto thevec-tor £eldN � i� is the tangent projection operator, T� i j� � I � i j� � P� i j � .Under typical circumstancesthe normalmapN � i� is derived fromthegradientof φ , andT� i j� projectsvectorsontothetangentplanesof the level setsof φ . However, thecomputationalstrategy we areproposingallows φ to lag the normalmap. Therefore,the tangentprojectionoperatorsdiffer, andwe useT φ� i j� to denoteprojections

onto the tangentplanesof the level setsof φ and T N� i j� to denoteprojectionsontoplanesperpendicularto thenormalmap.

The shapematrix [10] of a surfacedescribesits curvature in-dependentof theparameterization.Theshapematrix of animplicitsurfaceis obtainedby differentiatingthenormalmapandprojectingthatderivative ontothetangentplaneof thesurface.TheEuclideannormof theshapematrix is squaredcurvature

κ2 � N � i� jTφ� jk� 2 � (4)

If N � i� is deriveddirectly from φ , this gives

κ2 � T φ� il � φl jTφ� jk� 2 � (5)

Thegenericpenaltyfunctionof total curvatureis

�κ2 � ��� g � κ2 � dx � i� � (6)

whereg � κ2 � is monotonicallyincreasingscalarfunction. Notice,that if we take the £rst variationof (6) with respectto φ using(5)for totalcurvatureweobtainafourth-orderPDEonφ . Ontheotherhand,if we use(4) for total curvatureandtake the £rst variation

Page 4: Geometric Surface Smoothing via Anisotropic Diffusion of Normals · First is the use of level set surface mod-els, which allows us to process very complex shapes of arbitrary and

of (6) with respectto N � i� , allowing φ to remain£xed,we obtainasecond-orderPDEonN � i� . Wetakethelatterapproachin thispaper.

As weprocessthenormalmapN � i� , lettingφ lag,wemustensurethat it maintainsthe unit length constraint,N � i� N � i� � 1. This isexpressedin thepenaltyfunctionusingLagrangemultipliers. Theconstrainedpenaltyfunctionis

�κ2

���λ � x � l � � N � k� N � k� � 1 dx � l � � (7)

whereλ � x � l � � is theLagrangemultiplier at x � l � . Thenext stepis toderive the£rstvariation.Curvaturegivenby (4) canbewritten as

κ2 � N � i� j

2 � N � i� jφ j

2

φkφk� (8)

Using(8) andsolvingfor λ in (7) introducesa projectionoperatorT N� i j� on the£rstvariationof

�, which keepsN � i� unit length.Then

the£rstvariationof (7) with respectto N � i� is

T N� i j� d�

dN � j� � 2 T N� i j� g κ2 N � j� k � N � j� lφlφk

φmφmk

� (9)

whereg is thederivativeof g with respectto κ2. A gradientdescenton this metric ∂N � i� � ∂ t �!� T N� i j� d � � dN � j� , resultsin a PDE that

minimizesg � κ2 � on the normalmap. Notice that this is preciselythesameassolvingtheconstraineddiffusionequationonN � i� usingthemethodof solvingPDEsonimplicit manifoldsdescribedby [3].We will discussseveralchoicesfor g in Sec.4.

3.3 Surface Evolution via Normal MapsWehaveshown how to evolvethenormalsto minimizefunctionsofcurvature;however, the £nal goal is to processthe surface,whichrequiresdeformingφ . Hence,thenext stepis to relatetheevolutionof φ to theevolution of N � i� . Supposethatwe aregiventhenormalmapN � i� to somesetof surfaces,but not necessarilylevel setsofφ—asis thecaseif we£lterN � i� andlet φ lag. Wecanmanipulateφsothatit £tsthenormal£eldN � i� by minimizing a penaltyfunctionthatquanti£esthediscrepancy. This penaltyfunctionis

" � φ �#� � Uφiφi � φiN � i� dx � j� � (10)

whereU $ IR3 is thedomainof φ . The£rstvariationwith respectto φ is

d"

dφ�%�&�'� φk �'� φ j

φmφm j� N � j� j ���(�'� ∇φ �'� Hφ � HN (11)

whereHφ is the meancurvatureof the level setsurfaceandHN istheinducedcurvatureof thenormalmap. A gradientdescenton φthat minimizesthis penaltyfunction is ∂φ � ∂ t �)� d

" � dφ . Thus,thesurfacemovesasthedifferencebetweenits own curvatureandthatof thenormal£eld.Thefactorof ∇φ , which is typical withlevel setformulations,comesfrom thefactthatwearemanipulatingtheshapeof thelevel set,which is embeddedin φ , asin (3).

We proposeto solve fourth-order¤ows on thelevel setsof φ bya splitting strategy, which entailsprocessingthe normalsand al-lowing φ to lag andthenbere£ttedlater, in a separateprocess.In arelatedwork, joint interpolationof vector£eldsandgraylevel func-tionswasusedfor successfully£lling-in missingpartsof imagesin

φn

φinit

* φn

Nn

dGdN

Iterate to process N

Nn+1

dDdφ

φn lags

Iterate for φ to catch N

φn+1

+φnfixed

φfinal

Figure4: Flow chart

[2]. We have deriveda gradientdescentfor thenormalmapbasedon a certainclassof penaltyfunctionsthat usetotal curvatureinSec.3.2. This processis denotedin Fig. 4 asthed

� � dN loop. Thesurfacere£ttingto thenormalmapis formulatedin Sec.3.3. Thisprocessis thed

" � dφ loop in Fig. 4. Theoverall algorithmshownin Fig. 4 repeatsthesetwo stepsto minimizethepenaltyfunctionsin termsof the surface. We refer to both of theseprocesses,backto back,asoneiterationof our algorithm. In [27] we have shownthat the overall processof simultaneouslysolving thesetwo PDEsasshown is equivalentto thefourth-order¤ow on theoriginal sur-face.This establishesthemathematicalfoundationof theproposedmethod.

4 APPLICATIONSThe¤exible normalmapenergy minimizationandsurfacere£ttingmethodologyintroducedin Sec.3 allowsusto experimentwith var-ious forms of g in (6) that give rise to differentclassesof penaltyfunctions.Thechoiceof g � κ2 �,� κ2 leadsto ILMCF whichwewillrefer to asisotropicdiffusion. Minimizing the total curvatureof asurfaceworks well for smoothingsurfacesandeliminatingnoise,but it also deformsor removes important features. This type ofsmoothingis calledisotropicbecauseit correspondsto solvingtheheatequationonthenormalmapwith aconstant,scalarconductioncoef£cient. Isotropic diffusion is not particularly effective if thegoal is to denoisea surfacethat hasan underlyingstructurewith£nefeatures.

Figure1(a) showed an exampleof the skin surface,which wasextracted,via isosurfacing, from an magneticresonanceimaging(MRI) dataset. The roughnessof the skin is noise,an artifact ofthe measurementprocess.This model is also topologically com-plex because,despiteour bestefforts to avoid it, the isosurfacesincludemany convolutedpassagesup in thesinusesandaroundtheneck. As an indicationof this complexity, considerthat marchingcubesproduces543,000trianglesfrom this 256 � 256 � 175 vol-ume.Isotropicdiffusion,shown in Fig. 1(b), is marginally effectivefor denoisingtheheadsurface.Noticethat thesharpedgesaroundtheeyes,nose,lips andearsarelost in this process.

The problemof preservingfeatureswhile smoothingnoisehasbeenstudiedextensively in computervision. Perona& Malik [21]proposedto replaceLaplaciansmoothing,whichis equivalentto theheatequation∂ I � ∂ t � ∇ - ∇I, with a nonlinear, anisotropicPDE

∂ I � ∂ t � ∇ - g ∇I 2 ∇I � (12)

where I is generallythe grey-level image. This PDE is the £rst

Page 5: Geometric Surface Smoothing via Anisotropic Diffusion of Normals · First is the use of level set surface mod-els, which allows us to process very complex shapes of arbitrary and

variationof �U

g ∇I 2 dx dy (13)

whereg ∇I 2 is the edgestoppingfunction, g is its deriva-tive with respectto ∇I 2, andU is the imagedomain. Perona& Malik suggestedusingg � x �.� e /#0∇I 0 21 2µ , whereµ is a positive,free parameterthat controlsthe level of contrastof edgesthat canaffect the smoothingprocess.Notice that g � ∇I � approaches1for ∇I 32 µ and 0 for ∇I 34 µ . Edgesare generallyasso-ciatedwith large imagegradients,andthusdiffusion acrossedgesis stoppedwhile regionsthatarerelatively ¤atundergo smoothing.A mathematicalanalysisshows that solutionsto (12) canactuallyexhibit aninversediffusionnearedges,andcanenhanceor sharpensmoothedgesthathave gradientsgreaterthanµ [24].

The generalizationof P&M anisotropicdiffusion to surfacesisachieved from variationalprinciplesby choosingthe appropriatefunctionof thesquaredcurvaturein (6). For instance,

g � κ2 �5� 2µ2 1 � e / κ2

2µ2 � and g � κ2 �5� e / κ2

2µ2 � (14)

whereg is the derivative of g with respectto κ2. The £rst vari-ation with respectto the surface normalsgives a vector-valuedanisotropicdiffusion on the level set surface—astraightforwardgeneralizationof (12). This ¤ow is a modi£edversionof ILMCFthat preservesor enhancesareasof high curvature,which we willcall creases. Creasesare the generalizationof edgesin imagesto surfaces. The differencesbetweenanisotropicdiffusion andisotropic diffusion can clearly be observed in Fig. 1(c). Aroundthesmoothareasof theoriginalmodelsuchastheforeheadandthecheeks,thereis no noticeabledifferencein the resultsof the twoprocesses.However, very signi£cantdifferencesexist aroundthelips andtheeyes.Thecreasesin theseareas,whichhavebeenelim-inatedby isotropicdiffusion,arepreservedby theanisotropicpro-cess.The computationtime requiredfor oneiterationof the mainprocessingloop operatingon this modelis approximately20 min-uteson a 1.7 Ghz Intel processor for bothisotropicandanisotropicdiffusion. The resultsshown in Fig. 1(b) and(c) areboth after 3iterationswhich translatesto around60 minutesof processing.

Thegeneralityof theproposedapproachcomesatthecostof sig-ni£cantcomputationtime. However, the methodis practicalwithstate-of-the-artcomputersandis well-poisedto bene£tfrom paral-lel computingarchitectures,due to its relianceon local, iterativecomputations. Furthermore,the computationtimes for the pro-posedmethodare quite competitive if one comparesthem to theend-to-endcomputationtimesfor meshes,whichcanincludemanu-ally establishingbasemeshesand/or“£xing” topologicalproblems,which canrequireseveralhoursof computation[12].

Anotherexampleof denoisingby anisotropicdiffusionis shownin Fig. 5. IndependentGaussiannoisewith standarddeviation 1 � 0wasaddedto theoriginalmodelwhich in thiscaseis a221 � 221 �161volume.Thenoisewasaddedto thevoxel valuesin thevolumewhich aredistancesto the surface. After 3 iterationsof the mainprocessingloop (seeFig. 4) the noisewas successfullyremovedwhile preservingthe featuresof the original model. A qualitative,visualcomparisonof theseresultswith resultsfrom thesamemodelshown in [6](Fig. 2) suggeststhat theresultsin this paperdemon-stratebetterpreservationof £ne,sharpdetails,suchasthosearoundtheeyesandin thehair. Thecomputationtimesperiterationfor thisexampleareapproximately7 minuteson a 1.7 Ghz Intel processorcomparedto 20minutesperiterationfor theexamplein Fig. 1. Thisis indicative of therelatively high degreeof complexity of theMRIbasedmodel.

Figure 6(a) shows a different isosurface(the cortex) extractedfrom the sameMRI scanasthe model in Fig. 1. The complexityof this model,i.e. the many tightly nestedfolds, make it ill suited

(a) (b)

Figure5: (a) Noisy venusheadmodel,and(b) smoothedversionafter3 iterationsof anisotropicdiffusion.

for meshbaseddeformations.Also the main cortical surfacehasmany detachedpieces,anartifactof thesegmentationprocess.Theapproachproposedin this papercanautomaticallysimplify topo-logically noisy featuresdueto the level set implementation— animportantaspectof denoisingmeasuredsurfaces.

The examplein Fig. 7 demonstratesanotheraspectof the pro-posedmethod. Although this modelwasconstructedasa volumedirectlyfrom 3D rangedata[7], it doesnotexhibit signi£cantnoise.Whenrunningtheproposedmethodfor anisotropicdiffusion,how-ever, surfacestend toward solutionsthat have piecewise constantnormalswith sharpdiscontinuitiesin the normalmap—analogousto the behavior of the P&M equationfor intensity images. Suchpropertiesin the normal map correspondto surfacesconsistingof planarpatchesboundedby sharpcreases.Thus, the proposedmethodgeneratesa featurepreservingscalespace,very muchlikethat of P&M for images. Theseresultssupportour propositionthat processingthe normalsof a surfaceis the naturalgeneraliza-tion of imageprocessing.The non-linearprogressionof elimina-tion of detailsfrom the smallestscaleto the largestin Fig. 7 alsosuggestsapplicationsof this methodto surfacecompressionandmulti-resolutionmodeling.

5 CONCLUSIONA generalizationof anisotropicdiffusion for surfacesleadsto asmoothingprocessthat enhancescreaseswhile reducing small-scalenoise. Our approachis basedon the propositionthat thenatural generalizationof imageprocessingto surfacesis via thenormals. Variationalexpressionsfor the surfacehave correspond-ing variationalformulationson the surfacenormals. This philos-ophy leadsto a cleargeneralizationof P&M anisotropicdiffusionto surfaces.As a resultthe behavior for surfacesthat mirrors thatof images—weseepiecewise smoothsurfacepatchesboundedbyhigh curvaturecreases.Processingthenormalsseparatelyfrom thesurfaceleadsto apairof coupledsecond-orderequationsinsteadofa fourth-orderequation.

We solve the surfacedeformationusing level sets,an implicitrepresentationthatrelieson a discretegrid, which is a volume.Be-causeof this implementation,the proposedmethodappliesto anyshapethatcanbemodeledasan isosurface.Consequently, our re-sultsshow resultswith a level of surfacecomplexity that goesbe-yondthatof previousmethods.For example,theproposedmethodcanbeusedon isosurfacesthatareextracteddirectly from 3D med-ical data—adif£cult taskfor meshbasedapproaches.

Futurework will study the usefulnessof other interestingim-ageprocessingtechniquessuchas total variation [23]. To date,we have dealtwith postprocessingnoisy surfaces.The noiseen-

Page 6: Geometric Surface Smoothing via Anisotropic Diffusion of Normals · First is the use of level set surface mod-els, which allows us to process very complex shapes of arbitrary and

(a) (b) (c)

Figure6: (a) Original brainisosurfacefrom MRI dataset,(b) resultof MCF, and(c) after5 iterationsof anisotropicdiffusion.

(a) (b) (c)

Figure7: Variousstagesof anisotropicdiffusion: (a) original model,(b) after10 iterations,and(c) after20 iterations.

counteredin theseexamples,suchastheMRI scans,wereadditivenoisein the volumeelements.Othersurfaceprocessingproblemsexhibits differenttypesof noise,suchasthe line-of-sightnoiseinreconstructionfrom laserrange£nderdata[32]. Futurework willcombinethe proposedmethodwith segmentationandreconstruc-tion from rangedatatechniques.The currentshortcomingof thismethodis thecomputationtime,which is signi£cant.However, theprocesslendsitself to parallelism,and the advent of cheap,spe-cialized, vector-processinghardware promisessigni£cantlyfasterimplementations.Multi-grid adaptive level setsandimplicit PDEsolversarepossibilitiesfor researchtowardsreductionsin thecom-putationalcomplexity of themethod.

REFERENCES

[1] D. Adalsteinsonand J. A. Sethian. A fast level set methodfor propogating interfaces. J. Computational Physics, pages269–277,1995.

[2] C. Ballester, M. Bertalmio, V. Caselles,G. Sapiro, andJ.Verdera.Filling-in by joint interpolationof vector£eldsandgray levels. IEEE Trans. on Image Processing, 10(8):1200–1211,August2001.

[3] M. Bertalmio, L.-T. Cheng,S. Osher, and G. Sapiro. Vari-ationalmethodsandpartial differentialequationson implicitsurfaces.J. Computational Physics, 174:759–780,2001.

[4] David Breen,SeanMauch,andRossWhitaker. 3d scancon-versionof csgmodelsinto distancevolumes.In Proceedings

of the 1998 Symposium on Volume Visualization, ACM SIG-GRAPH, pages7–14,October1998.

[5] D. L. ChoppandJ. A. Sethian.Motion by intrinsic laplacianof curvature.Interfaces and Free Boundaries, 1:1–18,1999.

[6] U. Clarenz,U. Diewald,andM. Rumpf. Anisotropicgeomet-ric diffusion in surfaceprocessing.In Proceedings of IEEEVisualization, pages397–405,2000.

[7] Brian Curlessand Marc Levoy. A volumetric methodforbuilding complex models from range images. ComputerGraphics (SIGGRAPH ’96 Proceedings), July 1996.

[8] M. Desbrun,M. Meyer, M. Schroder, andA. Barr. Implicitfairingof irregularmeshesusingdiffusionandcurvature¤ow.In Proceedings of SIGGRAPH’99, pages317–324,1999.

[9] M. Desbrun, M. Meyer, P. Schroder, and A. H. Barr.Anisotropicfeature-preservingdenoisingof height£eldsandbivariatedata.In Graphics Interface, 2000.

[10] M. P. DoCarmo. Differential Geometry of Curves and Sur-faces. PrenticeHall, 1976.

[11] I. Guskov, W. Sweldens,andP. Schroder. Multiresolutionsig-nalprocessingfor meshes.In Proceedings of SIGGRAPH’99,pages325–334,1999.

[12] I. Guskov and Z. J. Wood. Topologicalnoiseremoval. InGraphics Interface, 2001.

Page 7: Geometric Surface Smoothing via Anisotropic Diffusion of Normals · First is the use of level set surface mod-els, which allows us to process very complex shapes of arbitrary and

[13] L. Kobbelt, S. Campagna,J. Vorsatz,and H.-P. Seidel. In-teractive multi-resolutionmodelingon arbitrary meshes. InProceedings of SIGGRAPH’98, pages105–114,1998.

[14] W. LorensonandH. Cline. Marchingcubes:A high resolu-tion 3d surfacereconstructionalgorithm. In Proceedings ofSIGGRAPH’87, pages163–169,1987.

[15] Liana Lorigo, Olivier Faugeras, Eric Grimson, RenaudKeriven,RonKikinis, Arya Nabavi, andCarl-FredrikWestin.Co-dimension2 geodesicactivecontoursfor thesegmentationof tubular strucures.In Proceedings of Computer Vision andPattern Recognition, 2000.

[16] Ravikanth Malladi, JamesA. Sethian,andBabaC. Vemuri.Shapemodelingwith front propagation: A level setapproach.IEEE Trans. on PAMI, 17(2):158–175,1995.

[17] H. P. MoretonandC. H. Sequin.Functionaloptimizationforfair surfacedesign. In Proceedings of SIGGRAPH’92, pages167–176,1992.

[18] Y. Ohtake, A. G. Belyaev, andI. A. Bogaevski. Polyhedralsurfacesmoothingwith simultaneousmeshregularization.InGeometric Modeling and Processing, 2000.

[19] S. OsherandJ. A. Sethian. Frontspropagating with curva-ture dependentspeed:Algorithms basedon hamilton-jacobiformulation.J. Computational Physics, 79:12–49,1988.

[20] D. Peng,B. Merriman, S. Osher, H-K Zhao, and M. Kang.A pde basedfast local level set method. J. ComputationalPhysics, 155:410–438,1999.

[21] P. PeronaandJ. Malik. Scalespaceandedgedetectionusinganisotropicdiffusion. IEEE Trans. on Pattern Analysis andMachine Intelligence, 12(7):629–639,July 1990.

[22] A. Polden.Compactsurfacesof leasttotal curvature.Techni-cal report,Universityof Tubingen,Germany, 1997.

[23] L. Rudin, S. Osher, and C. Fatemi. Nonlinear total varia-tion basednoiseremoval algorithms.Physica D, 60:259–268,1992.

[24] Guillermo Sapiro. Geometric Partial Differential Equationsand Image Analysis. CambridgeUniversityPress,2001.

[25] R. SchneiderandL. Kobbelt.Generatingfair mesheswith g1

boundaryconditions.In Geometric Modeling and ProcessingProceedings, pages251–261,2000.

[26] J. A. Sethian.Level Set Methods: Evolving Interfaces in Ge-ometry, Fluid Mechanics, Computer Vision, and Material Sci-ences. CambridgeUniversityPress,1996.

[27] T. Tasdizen,R. Whitaker, P. Burchard,and S. Osher. Geo-metricsurfaceprocessingvia normalmaps.TechnicalReportUUCS-02-03,Universityof Utah,January2002.

[28] G. Taubin. A signal processingapproachto fair surfacedesign. In Proceedings of SIGGRAPH’95, pages351–358,1995.

[29] G. Taubin. Linear anisotropicmesh£ltering. TechnicalRe-port RC22213,IBM ResearchDivision,October2001.

[30] W. Welch andA. Witkin. Free-formshapedesignusingtri-angulatedsurfaces.In Proceedings of SIGGRAPH’94, pages247–256,1994.

[31] RossT. Whitaker. Volumetric deformablemodels: Activeblobs. In RichardA. Robb,editor, Visualization In Biomedi-cal Computing. SPIE,1994.

[32] RossT. Whitaker. A level-set approachto 3D reconstruc-tion from rangedata.Int. J. Computer Vision, 29(3):203–231,1998.

A NUMERICAL IMPLEMENTATIONBy embeddingsurfacemodelsin volumes,wehaveconvertedequa-tions that describethe movementof surface points to nonlinearPDEsde£nedon a volume. The next step is to discretizethesePDEsin spaceandtime. In this paper, the embeddingfunction φis de£nedon thevolumedomainU andtime. ThePDEsaresolvedusinga discretesamplingwith forward differencesalongthe timeaxis. Therearetwo issueswith discretization:(i) theaccuracy andstability of the numericalsolutions,(ii) the increasein computa-tional complexity introducedby thedimensionalityof thedomain.

For brevity, we will discussthe numericalimplementationin2D— theextensionto 3D is straightforward.Thefunctionφ : U ��IR hasa discretesamplingφ 6 p � q 7 , where 6 p � q 7 is a grid locationandφ 6 p � q 73� φ � xp � yq � . We will referto a speci£ctime instanceofthis function with superscripts,i.e. φ n 6 p � q 78� φ � xp � yq � tn � . For avectorin 2-spacev, we usev � x� andv � y� to refer to its componentsconsistentwith thenotationof Sec.3. In our calculations,we needthreedifferent approximationsto £rst-orderderivatives: forward,backward andcentraldifferences.We denotethe type of discretedifferenceusingsuperscriptson a differenceoperator, i.e.,δ

� 9 � forforwarddifferences,δ

� / � for backwarddifferences,andδ for cen-tral differences.For instance,thedifferencesin thex directionon adiscretegrid with unit spacingare

δ� 9 �x φ 6 p � q 7;:� φ 6 p � 1 � q 7<� φ 6 p � q 7=�

δ� / �x φ 6 p � q 7 :� φ 6 p � q 7� φ 6 p � 1� q 7=� and (15)

δxφ 6 p � q 7;:� � φ 6 p � 1 � q 7<� φ 6 p � 1� q 7'�8� 2 �wherethe time superscripthasbeenleft off for conciseness.Theapplicationof thesedifferenceoperatorsto vector-valuedfunctionsdenotescomponentwisedifferentiation.

The positionsof derivatives computedwith forward and back-wards differencesare staggeredoff the grid by 1� 2 pixels. Forinstance,δ

� 9 �x φ 6 p � q 7 asde£nedin (15) usesinformationfrom po-

sitions 6 p � 1 � q 7 and 6 p � q 7 with equalweights;hence,it exists at6 p � 1 � 2� q 7 . This is staggeredby 1 � 2 pixelsin thex directionfromthegrid. To keeptrackof staggeredlocations,we will usethefol-

lowing notation:α ,x >α, and

y >α will denotethevariableα computed

at 6 p � q 7 , 6 p � 1� 2 � q 7 , and 6 p � q � 1 � 27 , respectively.In describingthenumericalimplementation,we will referto the

¤ow chartin Fig. 4 for onetime stepof themain loop. Hence,the£rststepin our numericalimplementationis thecalculationof thesurfacenormalvectorsfrom φ n. Recall that the surfaceis a levelsetof φ n asde£nedin (2). Hence,the surfacenormalvectorscanbe computedasthe unit vector in the directionof the gradientofφ n. Thegradientof φ n is computedwith centraldifferencesas

φ ni 6 p � q 7@? δxφ n 6 p � q 7

δyφ n 6 p � q 7 ; (16)

andthenormalvectorsareinitialized as

NuA 0� i� 6 p � q 7B� φ ni 6 p � q 7=�C φ n

k 6 p � q 78 � (17)

Becauseφ n is £xed and allowed to lag behind the evolution ofN � i� , the time stepsin the evolution of N � i� aredenotedwith a dif-

ferent superscript,u. For this evolution, ∂N � i� � ∂ t �D� d� � dN � i�

Page 8: Geometric Surface Smoothing via Anisotropic Diffusion of Normals · First is the use of level set surface mod-els, which allows us to process very complex shapes of arbitrary and

grid for N(i)[p,q] and φ[p,q]

p-1 p p+1

q-1

q

q+1

[p,q][p-1,q]

[p,q]

[p,q-1]

Figure8: Computationgrid

is implementedwith smallestsupportareaoperators.For ILMCFandanisotropicdiffusion d

� � dN � i� is given by (9) which we willrewrite herecomponentby component.TheLaplacianof afunctioncanbe appliedin two steps,£rst the gradientand then the diver-gence.In 2D, thegradientof thenormalsproducesa 2 � 2 matrix,andthe divergenceoperatorin (9) collapsesthis to a 2 � 1 vector.Thediffusionof thenormalvectorsin thetangentplaneof thelevelsetsof φ , requiresusto computethe¤ux in thex andy directions.The“columns” of the¤ux matrix arecomputedindependentlyas

x >Mu� i� ? δ

� 9 �x Nu� i� � x >

Cu� i� δ� 9 �x φ n � (18)

y >Mu� i� ? δ

� 9 �y Nu� i� � y >

Cu� i� δ� 9 �y φ n (19)

wherethetime index n remains£xedaswe incrementu, andwhere

x >Cu� i� � x >

Nu� i� j

x >φ n

j � � x >φ n

k

x >φ n

k ��� andy >

Cu� i� � y >Nu� i� j

y >φ n

j � � y >φ n

k

y >φ n

k � � (20)

Derivativesarecomputedwith forward differences;thereforetheyarestaggered,locatedon a grid thatis offsetfrom thegrid whereφandN � i� arede£ned,asshown Fig. 8 for the2D case.Furthermore,noticethatsincetheoffset is half pixel only in thedirectionof thedifferentiation,thelocationsof δ

� 9 �x N � i� andδ

� 9 �y N � i� aredifferent,

but are the samelocationsas the ¤ux (18) and (19) respectively.To evaluate(20), derivativesof φ andN � i� mustcomputedat 6 p �1 � 2� q 7 and 6 p � q � 1 � 27 , respectively. Thesecomputationsaredonewith thesmallestsupportareaoperators,usingthesymmetric2 � 3grid of samplesaroundeachstaggeredpoint, as shown in Fig. 8with theheavy rectangle.For instance,thestaggeredgradientsof φare

x >φ n

j � φ nj 6 p � 1

2� q 7E? δ

� 9 �x φ 6 p � q 7

12 δyφ 6 p � q 7 � δyφ 6 p � 1� q 7 �

y >φ n

j � φ nj 6 p � q � 1

27E? 1

2 � δxφ 6 p � q 7 � δxφ 6 p � q � 17'�δ� 9 �y φ 6 p � q 7 (21)

The staggeredgradientsof the normalsarecomputedin the sameway as(21). To evaluate(9), we alsoneedto computeg � κ2 � at thepreciselocationswherethe¤ux (18) and(19) arelocated.For this,we needthetotal intrinsic curvature

x >κ2 � x >

Nu� i� j

x >Nu� i� j � x >

Cu� i� x >Cu� i� � and

y >κ2 � y >

Nu� i� j

y >Nu� i� j � y >

Cu� i� y >Cu� i� (22)

at therequiredlocations.Backwardsdifferencesof the¤ux areusedto computethediver-

genceoperationin (9)

� d�

dN � i�u ? δ

� / �x gx >κ2

x >Mu� i� � δ

� / �y gy >κ2

y >Mu� i� (23)

Notice that thesebackwardsdifferencesarede£nedat the originalφ grid location 6 p � q 7 becausethey undothe forward staggeringinthe¤ux locations.Thusbothcomponentsof d

� � dN � i� arelocatedon theoriginal grid for φ . Usingthetangentialprojectionoperatorin (9), thenew setof normalvectorsarecomputedas

Nu9 1� i� � Nu� i� � T N d�

dN � i�u � Nu� i� � d

�dN � i�

u

I � i j� � Nu� j� Nu� i� �(24)

Startingwith theinitialization in (17) for u � 0, we iterate(24) fora£xednumberof steps,25 iterationsfor theexamplesin thispaper.In otherwords,wedonotaimatminimizingtheenergy givenin (7)in thed

� � dN loop of Fig. 4; we only reduceit. Theminimizationof total meancurvatureasa function of φ is achieved by iteratingthemainloop in (17).

Oncethe evolution of N is concluded,φ is evolved to catchupwith the new normal vectorsaccordingto (11). We denotetheevolvednormalsby Nn9 1� i� . To compute(11) we mustcalculateHφ

andHNn > 1. HNn > 1

is theinducedmeancurvatureof thenormalmap;in otherwords,it is thecurvatureof thehypotheticaltargetsurfacethat £ts the normalmap. Calculationof curvaturefrom a £eld ofnormalsis

HNn > 1 ? δxNn9 1x � δyNn9 1

y � (25)

wherewe have usedcentraldifferenceson the componentsof thenormalvectors.HNn > 1

needsto becomputedonceat initializationasthenormalvectorsremain£xedduringthecatchup phase.Let vbethetime stepindex in thed

" � dφ loop. Hφ vis themeancurva-

tureof themoving level setsurfaceat time stepv andis calculatedfrom φ with thesmallestareaof support

Hφ v ? δ� / �x δ

� 9 �x φ v � � x >

φ vj

x >φ v

j � � δ� / �y δ

� 9 �y φ v � � y >

φ vj

y >φ v

j � (26)

wherethegradientsin thedenominatorsarestaggeredto matchthelocationsof the forward differencesin the numerator. The stag-geredgradientsof φ in the denominatorare calculatedusing the2 � 3 neighborhoodasin (21).

ThePDE∂φ � ∂ t ��� d" � dφ is solvedwith a £niteforwarddif-

ferences,but with the up-wind schemefor the gradientmagnitude[19], to avoid overshootingand maintainstability. The up-windmethodcomputesa one-sidedderivative that looks in the up-winddirectionof themoving wave front, andtherebyavoidsovershoot-ing. Moreover, becausewe areinterestedin only a singlelevel setof φ , solving the PDE over all of U is not necessary. Differentlevel setsevolve independently, andwe cancomputetheevolutionof φ only in a narrow bandaroundthe level setof interestandre-initialize this bandasnecessary[1, 20]. See[26] for moredetailson numericalschemesandef£cientsolutionsfor level setmethods.Usingtheupwindschemeandnarrow bandmethods,φ v9 1 is com-putedfrom φ v usingthecurvaturescomputedin (25)and(26). Thisloop is iterateduntil theenergy in (10) ceasesto decrease;let v f inal

denotethe £nal iterationof this loop. Thenwe setφ for the nextiterationof themain loop (seeFig. 4) asφ n9 1 � φ v f inal

andrepeattheentireprocedure.Thenumberof iterationsof themainloop is afreeparameterthatgenerallydeterminestheextentof processing.