119K - views

Image Deformation Using Moving Least Squares Scott Schaefer Texas AM University

Original image with control points shown in blue a Moving Least Squ ares deforma tions using af64257ne transformations b similarity transfo rmations c and rigid transformations d Abstract We provide an image deformation method based on Moving Least

Embed :
Pdf Download Link

Download Pdf - The PPT/PDF document "Image Deformation Using Moving Least Squ..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

Image Deformation Using Moving Least Squares Scott Schaefer Texas AM University






Presentation on theme: "Image Deformation Using Moving Least Squares Scott Schaefer Texas AM University "— Presentation transcript:

ImageDeformationUsingMovingLeastSquaresScottSchaeferTexasA&MUniversityTravisMcPhail†RiceUniversityJoeWarren‡RiceUniversity (a)(b)(c)(d)Figure1:DeformationusingMovingLeastSquares.Originalimagewithcontrolpointsshowninblue(a).MovingLeastSquaresdeforma-tionsusingafnetransformations(b),similaritytransformations(c)andrigidtransformations(d).AbstractWeprovideanimagedeformationmethodbasedonMovingLeastSquaresusingvariousclassesoflinearfunctionsincludingafne,similarityandrigidtransformations.Thesedeformationsarereal-isticandgivetheusertheimpressionofmanipulatingreal-worldobjects.Wealsoallowtheusertospecifythedeformationsusingeithersetsofpointsorlinesegments,thelaterusefulforcontrol-lingcurvesandprolespresentintheimage.Foreachofthesetechniques,weprovidesimpleclosed-formsolutionsthatyieldfastdeformations,whichcanbeperformedinreal-time.CRCategories:I.3.5[ComputerGraphics]:ComputationalGe-ometryandObjectModeling—Boundaryrepresentations;Curve,surface,solid,andobjectrepresentations;Geometricalgorithms,languages,andsystemsKeywords:Deformations,movingleastsquares,rigidtransforma-tions1IntroductionImagedeformationhasanumberofusesfromanimation,tomor-phing[Smythe1990]andmedicalimaging[Warrenetal.2003].Toperformthesedeformationstheuserselectssomesetofhan-dlestocontrolthedeformation.Thesehandlesmaytaketheformofpoints[Bookstein1989],lines[BeierandNeely1992],orevenpolygongrids[MacCrackenandJoy1996].Astheusermodies email:sschaefe@rice.edu†email:tjice@rice.edu‡email:jwarren@rice.eduthepositionandorientationofthesehandles,theimageshouldde-forminanintuitivefashion.Weviewthisdeformationasafunctionfthatmapspointsintheundeformedimagetothedeformedimage.Applyingthefunctionftoeachpointvintheundeformedimagecreatesthedeformedimage.Nowconsideranimagewithasetofhandlespthattheusermovestonewpositionsq.Forftobeusefulfordeformationsitmustsatisfythefollowingproperties:Interpolation:Thehandlespshouldmapdirectlytoqunderdeformation.(i.e;f(pi)=qi).Smoothness:fshouldproducesmoothdeformationsIdentity:Ifthedeformedhandlesqarethesameasthep,thenfshouldbetheidentityfunction.(i.e;qi=pi)f(v)=v).Thesepropertiesareverysimilartothoseusedinscattereddatainterpolation.Thersttwopropertiessimplystatethatthefunc-tionfinterpolatesthescattereddatavaluesandissmooth.Thelastpropertyissometimesreferredtoaslinearprecisionintheapproxi-mationeld.Itstatesthatifdataissampledfromalinearfunction,thentheinterpolantreproducesthatlinearfunction.Giventhesesimilarities,itcomesasnosurprisethatmanydeformationmeth-odsborrowtechniquesfromscattereddatainterpolation.PreviousWorkPreviousworkonimagedeformationhasfocusedonspecify-ingdeformationsusingdifferenttypesofhandles.Grid-basedtechniquessuchasfree-formdeformations[SederbergandParry1986;Leeetal.1995]parameterizetheimageusingbivariatecubicsplinestocreateC2deformations.Typicallythesemethodsrequirealigninggridlinescorrespondingtothecontrolpointsofthesplinewithfeaturesoftheimage,whichcanbecumbersomefortheuser.Beieretal.[BeierandNeely1992]improveuponthesegrid-basedtechniquesandallowtheusertospecifythedeformationusingsetsoflines.ThismethodisbasedonShepard'sinter-polant[Shepard1968]andcreatessmoothdeformations.However,theauthorsnotethattheirmethodproducescomplicatedwarpsthat Figure2:Deformationofthetestshapefromgure1usingthin-platesplines(left).Thedeformationissmoothbutlacksrealism.OntherightweusethemethodbyIgarashietal.shownwithtri-angulation(right).Thelackofsmoothnessisclearlyvisibleinthewoodgrain.cansometimessufferfrom“ghosts”,undesirablefoldinginthede-formation.Kobaetal.[KobayashiandOotsubo2003]latergener-alizedthistechniquetosurfacedeformations.Veryfewdeformationmethodsinvestigatethetypeoftransfor-mationsthataredesirableforperformingdeformation.Onenotableexceptionisworkedbasedonthin-platesplines[Bookstein1989]thatattemptstominimizetheamountofbendinginthedeforma-tion.Booksteinpresentsadeformationalgorithmusingthesim-plestdeformationhandle,apoint,thatusesradialbasisfunctionswiththin-platesplines.Figure2(left)showsanexampleofthedeformationcreatedwiththin-platesplinesforourexampleing-ure1.Thedeformationappearsverysimilartotheafne-methodingure1.Inbothcases,thetestshapeundergoeslocalnon-uniformscalingandshearing,whichisundesirableinmanyapplications.OurpaperbuildsprimarilyonarecentpaperbyIgarashietal.[Igarashietal.2005]thatproposesapoint-basedimagedefor-mationtechniqueforcartoon-likeimagesinwhichtheresultingde-formationsareas“rigid-as-possible”.Suchdeformationhavethepropertythatamountoflocalscalingandshearingisminimized.(Theconceptofrigid-as-possibletransformationswasitselfrstin-troducedinAlexa[Alexaetal.2000].)Toproducerigid-as-possibledeformations,Igarashietal.trian-gulatetheinputimageandsolvealinearsystemofequationswhosesizeisequaltothenumberofverticesinthetriangulation.Incon-trast,ourmethodcreatesdeformationsbysolvingasmalllinearsystem(22)ateachpointinauniformgrid(seeSection4forde-tails).Since,wesolvemuchsmallersystemsofequations,wecancreateveryfastdeformationsofgridsconsistingoftensofthou-sandsofverticesinreal-timewhereasIgarashietal.reportthattheirmethodsslowsat300verticesona1GHzmachine.Duetotherelativelysmallnumberofvertices,thedeformationsproducedbyIgarashietal.maycontainnoticeablediscontinuitiesasshowningure2.Figure7showsanequivalentdeformationwithourtechnique,whichappearssmooth.ContributionsInthispaper,weproposeanimagedeformationmethodbasedonlinearMovingLeastSquares.Toconstructdeformationsthatmin-imizetheamountoflocalscalingandshear,werestricttheclassesoftransformationsusedinMovingLeastSquarestosimilarityandrigid-bodytransformations.ByusingMLS,weavoidtheneedtotriangulatetheinputimage(asdoneinIgarashietal.)andproducedeformationsthataregloballysmooth.)Next,wederiveclosed-formformulasforbothsimilarityandrigidMLSdeformations.Theseformulaaresimple,easytoimple-mentandprovidereal-timedeformations.Thisderivationreliesonasurprisingandlittle-knownrelationshipbetweensimilaritytrans-formationsandrigidtransformationsthatminimizeacommonleastsquaresproblem.AsopposedtoIgarashietal.,ourformulasdonotrequiretheuseofagenerallinearsolver.Asanaturalextensionofourpoint-basedmethod,weextendourMLSdeformationmethodfromsetsofpointstosetsoflineseg-mentsandagainprovideclosed-formexpressionsfortheresultingdeformationmethod.2MovingLeastSquaresDeformationHereweconsiderbuildingimagedeformationsbasedoncollectionsofpointswithwhichtheusercontrolsthedeformation.Letpbeasetofcontrolpointsandqthedeformedpositionsofthecon-trolpointsp.WeconstructadeformationfunctionfsatisfyingthethreepropertiesoutlinedintheintroductionusingMovingLeastSquares[Levin1998].Givenapointvintheimage,wesolveforthebestafnetransformationlv(x)thatminimizesåiwijlv(pi)qij2(1)wherepiandqiarerowvectorsandtheweightswihavetheformwi=1 jpivj2a:Becausetheweightswiinthisleastsquaresproblemaredependentonthepointofevaluationv,wecallthisaMovingLeastSquaresminimization.Therefore,weobtainadifferenttransformationlv(x)foreachv.Nowwedeneourdeformationfunctionftobef(v)=lv(v).Observethatasvapproachespi,wiapproachesinnityandthefunctionfinterpolates,(i.e;f(pi)=qi).Furthermore,ifqi=pi,theneachlv(x)=xforallxand,therefore,fistheidentitytrans-formationf(v)=v.Finally,thisdeformationfunctionfhasthepropertythatitissmootheverywhere(exceptatthecontrolpointspiwhena1).Nowsincelv(x)isanafnetransformation,lv(x)consistsoftwoparts:alineartransformationmatrixMandatranslationT.lv(x)=xM+T(2)WecanactuallyremovethetranslationTfromthisminimiza-tionproblemfurthersimplifyingtheseequations.Equation1isquadraticinT.Sincetheminimizeriswherethederivativeswithrespecttoeachofthefreevariablesinlv(x)arezero,wecansolvedirectlyforTintermsofthematrixM.Takingthepartialderiva-tiveswithrespecttothefreevariablesinTproducesalinearsystemofequations.SolvingforTyieldsthatT=qpMwherepandqareweightedcentroids.p=åiwipi åiwiq=åiwiqi åiwiWiththisobservationwecansubstituteTintoequation2andrewritelv(x)intermsofthelinearmatrixM.lv(x)=(xp)M+q(3)Basedonthisinsight,theleastsquaresproblemofequation1canberewrittenasåiwijˆpiMˆqij2(4) whereˆpi=pipandˆqi=qiq.NoticethatMovingLeastSquaresisverygeneralinthatthematrixMdoesnothavetobeafullyafnetransformation.Infact,thisframeworkallowsustoinvestigatedifferentclassesoftransformationmatricesM.Inpar-ticular,weareinterestedinthecasewhereMisarigidtransfor-mation.However,werstexaminethecasewhereMisanafnetransformationasthederivationisthesimplest.Nextweconstructdeformationswithsimilaritytransformationsandshowhowthesesolutionscanbeusedtondclosed-formsolutionstoMovingLeastSquaredeformationswithrigidtransformations.2.1AneDeformationsFindinganafnedeformationthatminimizesequation4isstraight-forwardusingtheclassicnormalequationssolution.M= åiˆpTiwiˆpi!1åjwjˆpTjˆqj:Thoughthissolutionrequirestheinversionofamatrix,thematrixisaconstantsize(22)andisfasttoinvert.Withthisclosed-formsolutionforMwecanwriteasimpleexpressionforthedeformationfunctionfa(v).fa(v)=(vp) åiˆpTiwiˆpi!1åjwjˆpTjˆqj+q:(5)Applyingthisdeformationfunctiontoeachpointintheimagecre-atesanew,deformedimage.Whiletheusercreatesthesedeformationsbymanipulatingthepointsq,thepointsparexed.Sincethepdonotchangeduringdeformation,muchofequation5canbeprecomputedyieldingveryfastdeformations.Inparticular,wecanrewriteequation5intheformfa(v)=åjAjˆqj+q:whereAjisasinglescalargivenbyAj=(vp) åiˆpTiwiˆpi!1wjˆpTj:Noticethat,givenapointv,everythinginAjcanbeprecomputedyieldingasimple,weightedsum.Table1providestimingresultsfortheexamplesinthispaper,whichshowsthatthesedeformationsmaybeperformedover500timespersecondinourexamples.Figure1(b)illustratesthisafneMovingLeastSquaresdefor-mationappliedtoourtestimage.Unfortunately,thedeformationdoesnotappearverydesirableduetothestretchinginthearmsandtorso.Theseartifactsarecreatedbecauseafnetransformationsin-cludedeformationssuchasnon-uniformscalingandshear.Toelim-inatetheseundesirabledeformationsweneedtoconsiderrestrict-ingthelineartransformationlv(x).Inparticular,wemodifytheclassofdeformationslv(x)producesbyrestrictingthetransforma-tionmatrixMfrombeingfullylineartosimilarityandrigid-bodytransformations.2.2SimilarityDeformationsWhileafnetransformationsincludeeffectssuchasnon-uniformscalingandshear,manyobjectsinrealitydonotundergoeventhesesimpletransformations.Similaritytransformationsareaspecialsubsetofafnetransformationsthatonlyincludetranslation,ro-tationanduniformscaling.Toalterourdeformationtechniquetoonlyusesimilaritytrans-formations,weconstrainthematrixMtohavethepropertythatMTM=l2Iforsomescalarl.IfMisablockmatrixoftheformM=M1M2whereM1,M2arecolumnvectorsoflength2,thenrestrictingMtobeasimilaritytransformrequiresthatMT1M1=MT2M2=l2andMT1M2=0.ThisconstraintimpliesthatM2=M?1where?isanoperatoron2Dvectorssuchthat(x;y)?=(y;x).Thoughre-stricted,theminimizationproblemfromequation4isstillquadraticinM1andcanberephrasedasndingthecolumnvectorM1thatminimizesåiwi ˆpiˆp?iM1ˆqTi 2:Thisquadraticfunctionhasauniqueminimizer,whichyieldstheoptimaltransformationmatrixMM=1 msåiwiˆpiˆp?i(ˆqTiˆq?Ti)(6)wherems=åiwiˆpiˆpTi:Similartotheafnedeformations,theusermanipulatestheqtoproducethedeformationwhilethepremainxed.Usingthisob-servationwewritethedeformationfunctionfs(v)inaformthatallowsustoprecomputeasmuchinformationaspossible.fs(v)isthenfs(v)=åiˆqi(1 msAi)+qwheremsandAidependonlyonthepi,vandcanbeprecomputedandAiisAi=wiˆpiˆp?ivp(vp)?T:(7)Asexpected,similarityMLSdeformationspreservesanglesintheoriginalimagebetterthanafneMLSdeformations.(Transfor-mationsthatstrictlypreserveanglearecalledconformaltransfor-mationsandhavebeenstudiedextensivelyin[GuandYau2003].)Whileapproximate(orexact)anglepreservationisadesirableprop-ertyinmanycases,allowinglocalscalingcanoftenleadtounde-sirabledeformations.Figure1(c)showsanexampleofapplyingthesimilarityMovingLeastSquaresdeformationtoourtestimage.Theresultisamuchmorerealisticlookingdeformationthan(b).However,thisdeformationscalesthesizeoftheupperarmasitisstretched.Toremovethisscaling,weconsiderbuildingdeforma-tionsusingonlyrigidtransformations.2.3RigidDeformationsRecently,severalworks[Alexaetal.2000;Igarashietal.2005]haveshownthat,forrealisticshapes,deformationsshouldbeasrigidaspossible;thatis,thespaceofdeformationsshouldnotevenincludeuniformscaling.Traditionallyresearchersindeformationhavebeenreluctanttoapproachthisproblemdirectlyduetothenon-linearconstraintthatMTM=I.However,wenotethatclosed-formsolutionstothisproblemareknownfromtheIteratedClosestPointcommunity[Horn1987].Hornshowsthattheoptimalrigidtransformationcanbefoundintermsofeigenvaluesandeigenvec-torsofacovariancematrixinvolvingthepointspiandqi.Weshowthattheserigiddeformationsarerelatedtothesimilaritydeforma-tionsfromsection2.2viathefollowingtheorem. Figure3:Originalimage(left)anditsdeformationusingtherigidMLSmethod(right).Afterdeformation,thefaceisthinnerandsheissmiling.Theorem2.1LetCbethematrixthatminimizesthefollowingsim-ilarityfunctionalminMTM=l2IåiwijˆpiMˆqij2:IfCiswrittenintheformlRwhereRisarotationmatrixandlisascalar,therotationmatrixRminimizestherigidfunctionalminMTM=IåiwijˆpiMˆqij2:Proof:SeeAppendixA.Thistheoremisvalidinarbitrarydimension,however,itisveryeasytoapplyin2D.Usingthistheorem,wendthattherigidtransformationisexactlythesameasequation6exceptthatweuseadifferentconstantmrinthesolutionsothatMTM=Igivenbymr=vuut åiwiˆqiˆpTi!2+ åiwiˆqiˆp?Ti!2:Unlikethesimilaritydeformationfs(v),wecannotprecomputeasmuchinformationfortherigiddeformationfunctionfr(v).How-ever,thedeformationprocesscanstillbemadeveryefcient.Let~fr(v)=åiˆqiAiwhereAiisdenedinequation7,whichmaybeprecomputed.Thisvector~fr(v)isarotatedandscaledversionofthevectorvp.Tocomputefr(v)wenormalize~fr,scalebythelengthofvp(whichalsocanbeprecomputed),andtranslatebyq.fr(v)=jvpj~fr(v) j~fr(v)j+q:(8)Thismethodisslowerthanthesimilaritydeformationduetothenormalization;however,thesedeformationsarestillveryfastasshownintable1.Figure1(d)showsthisrigiddeformappliedtothetestimagein(a).Asopposedtotheothermethods,thisdeformationisquiterealisticandalmostfeelsasiftheuserismanipulatingarealobject.Figures3and4showadditionalexamplesofthisrigiddeformationmethod.InthegurewiththeMonaLisa,wedeformtheimagetocreateathinnerfacialproleandmakehersmile.Inthegurewiththehorse,westretchthehorseslegsandnecktocreateagiraffe.Duetotheuseofrigidtransformations,thedeformationmaintainsrigidityandscalelocallysothatthebodyandheadofthehorseretaintheirrelativeshape. Figure4:Originalimage(left)anditsdeformationusingtherigidMLSmethod(right).3DeformationwithLineSegmentsSofarwehaveconsideredcreatingdeformationswithMovingLeastSquaresusingonlysetsofpointstocontrolthedeformation.Inapplicationswhereprecisecontrolovercurvessuchasprolesintheimageisneeded,pointsmaybeinsufcientforspecifyingthesedeformations.Onesolutionthatallowstheusertocontrolcurvespreciselyistoconvertthesecurvestodensesetsofpointsandap-plyapoint-baseddeformation[Wolberg1998].Thedisadvantageofthisapproachisthatthecomputationtimeofthedeformationisproportionaltothenumberofcontrolpointsusedandcreatinglargenumbersofcontrolpointsadverselyaffectsperformance.Alternatively,wedesireageneralizationoftheseMovingLeastSquaresdeformationsfromsection2toarbitrarycurvesintheplane.First,assumepi(t)istheithcontrolcurveandqi(t)isthede-formedcurvecorrespondingtopi(t).Wegeneralizethequadraticfunctioninequation1byintegratingovereachcontrolcurvepi(t)whereweassumet2[0;1].åiZ10wi(t)jpi(t)M+Tqi(t)j2(9)wherewi(t)iswi(t)=jp0i(t)j jpi(t)vj2aandp0t(t)isthederivativeofpi(t).(Thisfactorofjp0(t)jmakestheintegralsindependentoftheparameterizationofthecurvepi(t).)Nownoticethat,despitetheintegral,equation9isstillquadraticinTandcanbesolvedforintermsofthematrixM.T=qpMwherepandqareagainweightedcentroids.p=åiR10wi(t)pi(t)dt åiR10wi(t)dtq=åiR10wi(t)qi(t)dt åiR10wi(t)dt(10)Therefore,werewriteequation9onlyintermsofMasåiZ10wi(t)jˆpi(t)Mˆqi(t)j2(11)whereˆpi(t)=pi(t)pˆqi(t)=qi(t)q: Figure5:DeformationoftheLeaningTowerofPisa.Fromlefttoright:originalimage,AfneMLS,SimilarityMLSandRigidMLSdeformations.Untilnow,pi(t)andqi(t)havebeenarbitrarycurves.However,theintegralsinequation11maybedifculttoevaluateforarbitraryfunctions.Instead,werestrictthesefunctionstobelinesegmentsandderiveclosed-formsolutionsforthedeformationsintermsoftheend-pointsofthesesegments.Similartosection2,werstcon-siderafnetransformationsduetoitsrelativelysimplederivationandthenmovetosimilaritytransformations,whichweusetocreateclosed-formsolutionstotheequivalentproblemusingrigid-bodytransformations.3.1AneLinesSinceˆpi(t),ˆqi(t)arelinesegments,wecanrepresentthesecurvesasmatrixproductsˆpi(t)=1ttˆaiˆbiˆqi(t)=1ttˆciˆdiwhereˆai,ˆbiaretheend-pointsofˆpi(t)andˆci,ˆdiaretheend-pointsofˆqi(t).Equation11isthenwrittenasåiZ10 (1tt)ˆaiˆbiMˆciˆdi 2(12)whoseminimizerisM= åiˆaiˆbiTWiˆaiˆbi!1åjˆajˆbjTWjˆcjˆdjwhereWiisaweightmatrixgivenbyWi=di00d01id01id11iandthediareintegralsoftheweightfunctionwi(t)multipliedbythedifferentquadraticpolynomials.d00i=R10wi(t)(1t)2dtd01i=R10wi(t)(1t)tdtd11i=R10wi(t)t2dtTheseintegralshaveclosed-formsolutionsforvariousvaluesofa.InappendixBweprovideaclosed-formsolutionfora=2thoughothersolutionscanbecomputedwiththeaidofasymbolicintegra-tionpackage.Notethattheseintegralscanalsobeusedtoevaluatepandqfromequation10.p=åiai(d00i+d01i)+bi(d01i+d11i) åid00i+2d01i+d11iq=åici(d00i+d01i)+di(d01i+d11i) åid00i+2d01i+d11iAsbefore,wewritethedeformationfunctionfa(v)asfa(v)=åjAjˆcjˆdj+qwhereAjisa12matrixoftheformAj=(vp) åiˆaiˆbiTWiˆaiˆbi!1ˆajˆbjTWj:Duringthedeformation,theend-pointsaiandbiofthelinesegmentpi(t)arexedwhiletheusermanipulatestheend-pointscianddiofthelinesegmentsqi(t).SinceAjisindependentofcianddi,Ajcanbeprecomputed.Figure5showsanexampledeformationperformedwithlineseg-mentswherewemodifytheLeaningTowerofPisatoleantheop-positedirectionandshrinkthetower.TheAfneMLSdeformationshearsthetowertothesideinsteadofbeingrotatedanddoesnotappeartoberealistic.Toremovethissheareffect,werestrictthematrixinequation11tobeasimilarityorrigid-bodytransforma-tion.3.2SimilarityLinesRestrictingequation12tosimilaritytransformsrequiresthatMTM=l2Iforsomescalarl.Asnotedinsection2.2,McanbeparameterizedusingasinglecolumnvectorM1yieldingåiZ10 1t0t001t0t0BB@0BB@ˆaiˆa?iˆbiˆb?i1CCAM1ˆcTiˆdTi1CCA 2ThiserrorfunctionisquadraticinM1.Tondtheminimizer,wedifferentiatewithrespecttothefreevariablesinM1andsolvethelinearsystemofequationstoobtainthematrixM.M=1 msåj0BB@ˆajˆa?jˆbjˆb?j1CCATWj ˆcTjˆc?TjˆdTjˆd?Tj!(13)whereWjisaweightmatrixWj=0BBB@d00j0d01j00d00j0d01jd01j0d11j00d01j0d11j1CCCA Figure6:ComparisonofthelinedeformationmethodofBeieretal.(left)withtheRigidMLSdeformation(right).andmsisagainascalingconstant,whichhastheformms=åiˆaiˆaTid00i+2ˆaiˆbTid01i+ˆbiˆbTid11i:Thisdeformationfunctionhasaverysimilarstructuretothepoint-basedsimilaritydeformation.Usingthismatrixwewritefs(v)explicitlyasfs(v)=åj(ˆcjˆdj)(1 msAj)+qwhereAjisa42matrix.Aj=Wj0BB@ˆajˆa?jˆbjˆb?j1CCAvp(vp)?T(14)Figure5showsthetowerdeformedusingthissimilarity-basedmethod.Incontrasttotheafnemethod,thetoweractuallyappearstoberotated,notsheared,totheleftresultinginamorerealisticdeformation.Similaritytransformationscontainuniformscaling,whichisapparentfromthewayinwhichthetowershrinkswiththelinesegment.Rigidtransformationsremovethisuniformscaling.3.3RigidLinesUsingthesolutionfromsection3.2andTheorem2.1,weimme-diatelyhaveaclosedformsolutionforrigid-bodytransformations.Thetransformationmatrixis,therefore,thesameasequation13exceptwechooseadifferentscalingconstantmrsothatMTM=I.mr= åjˆaTjˆa?TjˆbTjˆb?TjWj ˆcTjˆdTj! Thisdeformationisnon-linear,butwecancomputeitinasim-plefashionusingequation8.Thisequationusestherotatedvector Method Figure1 Figure4 Figure5 (7points) (11points) (7lines) AfneMLS 1.5ms 2.2ms 1.5ms SimilarityMLS 2.3ms 3.4ms 1.6ms RigidMLS 2.6ms 3.8ms 3.3ms [Bookstein1989] 2ms 2.7ms N/A [BeierandNeely1992] N/A N/A 1.6ms Table1:Deformationtimesforthevariousmethods.~fr(v),scalesthevectorsothatitslengthisjvpjandtranslatesbyq.Forthisdeformationusinglinesegments,therotatedvectorisgivenby~fr(v)=åj(ˆcjˆdj)AjwhereAjisfromequation14.Figure5(right)showsadeformationofthetowerusingthisrigidmethod.Inthisdeformation,thetowerisrotatedbutdoesnotshrinkasthesimilaritydeformationdoes.Insteadtheeffectisalmostthesameasnon-uniformscalingalongthedirectionofthelineseg-ment.Figure6alsoshowsacomparisonoftherigiddeformationtech-nique(right)withthelinedeformationmethodofBeieretal.[BeierandNeely1992](left).ThewarpscreatedwithBeieretal.'smethodfoldandpullinunrealisticwayswhereastherigidmethoddoesnotsufferfromthesesamedefects.4ImplementationToimplementthesedeformations,weprecomputeasmuchinfor-mationaspossibleforthedeformationfunctionsf(v).Whenweapplythedeformationtoanimage,wetypicallydonotapplyf(v)toeverypixelintheimage.Insteadweapproximatetheimagewithagridandapplythedeformationfunctiontoeachvertexinthegrid.Wethenlltheresultingquadsusingbilinearinterpolation(seeg-ure7). Figure7:Deforminganimagewithauniformgrid(5050).Orig-inalimage(left)andrigidMLSdeformation(right)usingbilinearinterpolationineachquad.Inpractice,thisapproximationtechniqueproducesdeformationsindistinguishablefromthemoreexpensiveprocessofapplyingthedeformationtoeverypixelintheimage.Foralloftheexamplesinthispaper,theimageswereapproximately500500pixels.Tocomputethedeformations,weusedgridsontheorderof100100vertices.Ifdesired,moreaccuratedeformationsmaybeachievedwithdensergridsandthedeformationtimeislinearinthenumberofverticesofthesegrids. Table1showstheamountoftimetakentodeformeachoftheimagesusingvariousmethodsona3GHzIntelmachine.Eachde-formationusesagridofsize100100.Therigidtransformationstakethelongestduetothesquarerootinthedeformationfunction,butarestillquitefast. Figure8:Foldbackcausedduringdeformations.5ConclusionsandFutureWorkWehaveprovidedamethodforcreatingsmoothdeformationsofimagesusingeitherpointsorlinesashandlestocontrolthede-formation.UsingMovingLeastSquareswecreateddeformationsusingafne,similarityandrigidtransformationswhileprovidingclosed-formexpressionsforeachofthesetechniques.Thoughtheleastsquaresminimizationwithrigidtransformationsledtoanon-linearminimization,weshowedhowthesesolutionscouldbecom-puteddirectlyfromtheclosed-formdeformationusingsimilaritytransformationstherebybypassingthenon-linearminimization.Intermsoflimitations,ourmethodmaysufferfromfold-backslikemostotherspacewarpingapproaches.Thesesituationsoc-curwhenthesignoftheJacobianoffchanges.Formanydefor-mations,thesefoldbacksmaynotbenoticeablethoughextremedeformationswillcertainlycausesuchfold-backstohappen(seegure8).Forsomedeformations,fold-backsareacceptablesincethese2Dimagesaremeanttorepresent3Dobjects.Igarashietal.takeadvantageoftheexplicittopologyoftheimageandprovideasimplemethodforrenderingthesedeformations.Ourlackoftopol-ogymakesthistechniquedifcultthoughtopologicalinformationmaybeaddedtoourmethod.Inotherapplications,fold-backsarenotdesirableandmustbeeliminated.Thereisagenericapproachavailableforxingthesefold-backsprovidedbyTiddemanetal.[Tiddemanetal.2001].Givenawarp,Tiddemanetal.createasubsequentwarpsuchthattheproductofthetwowarpsresultsinanon-negativeJacobian.Sinceweprovidesimpleequationsforourdeformations,weintendtoexplorethepossibilityofconstructingclosed-formedformulasfortheJacobianforusewithTiddemanetal.'smethod.Ourwarpingtechniquealsodeformstheentireplanethattheim-ageliesinwithoutregardtothetopologyoftheshapeintheimage.Thislackoftopologyisbothabenetandalimitation.Oneoftheadvantagesofourapproachisthelackofsuchtopology,whichcre-atesasimplewarpingfunction.OthertechniquessuchasIgarashietal.[Igarashietal.2005]constructtriangulationsthatoutlinetheboundaryoftheshapeandbuilddeformationsdependentonthespeciedtopology.Thistopologicalinformationcancreatebetterdeformationsbyseparatingpartsoftheimagessuchasthelegsofthehorseingure4thataregeometricallyclosetogether.Noticethatourmethodisgeneralenoughtoaccommodatedifferentdis-tancemetricsdependentonthetopologyoftheshaperatherthanthesimple,Euclideandistanceusedasourweightfactor.Weintendtoexplorethisissueinfuturework.Finally,inthefuturewewouldliketoexploregeneralizingthesedeformationmethodsto3Dtodeformsurfaces.Suchageneraliza-tionhaspotentialapplicationsinthemotioncaptureeldwherean-imationdatacantaketheformofpointsinspaceforeachframeofanimation.However,thesimilaritytransformationinsection2.2nolongerleadstoaquadraticminimization,butaneigenvectorprob-lemandwearelookingintomethodstoefcientlycomputethesolutiontothisminimization.ReferencesALEXA,M.,COHEN-OR,D.,ANDLEVIN,D.2000.As-rigid-as-possibleshapeinterpolation.InProceedingsofACMSIGGRAPH2000,ACMPress/Addison-WesleyPublishingCo.,NewYork,NY,USA,157–164.BEIER,T.,ANDNEELY,S.1992.Feature-basedimagemetamor-phosis.InSIGGRAPH'92:Proceedingsofthe19thannualcon-ferenceonComputergraphicsandinteractivetechniques,ACMPress,NewYork,NY,USA,35–42.BOOKSTEIN,F.L.1989.Principalwarps:Thin-platesplinesandthedecompositionofdeformations.IEEETrans.PatternAnal.Mach.Intell.11,6,567–585.GU,X.,ANDYAU,S.-T.2003.Globalconformalsurfaceparam-eterization.InSGP'03:Proceedingsofthe2003Eurograph-ics/ACMSIGGRAPHsymposiumonGeometryprocessing,Eu-rographicsAssociation,Aire-la-Ville,Switzerland,Switzerland,127–137.HORN,B.1987.Closed-formsolutionofabsoluteorientationusingunitquaternions.JournaloftheOpticalSocietyofAmericaA4,4(April),629–642.IGARASHI,T.,MOSCOVICH,T.,ANDHUGHES,J.F.2005.As-rigid-as-possibleshapemanipulation.ACMTrans.Graph.24,3,1134–1141.KOBAYASHI,K.G.,ANDOOTSUBO,K.2003.t-ffd:free-formde-formationbyusingtriangularmesh.InSM'03:ProceedingsoftheeighthACMsymposiumonSolidmodelingandapplications,ACMPress,226–234.LEE,S.-Y.,CHWA,K.-Y.,ANDSHIN,S.Y.1995.Imagemeta-morphosisusingsnakesandfree-formdeformations.InSIG-GRAPH'95:Proceedingsofthe22ndannualconferenceonComputergraphicsandinteractivetechniques,ACMPress,NewYork,NY,USA,439–448.LEVIN,D.1998.Theapproximationpowerofmovingleast-squares.MathematicsofComputation67,224,1517–1531.MACCRACKEN,R.,ANDJOY,K.I.1996.Free-formdeforma-tionswithlatticesofarbitrarytopology.InProceedingsofACMSIGGRAPH1996,ACMPress,181–188.SEDERBERG,T.W.,ANDPARRY,S.R.1986.Free-formde-formationofsolidgeometricmodels.InProceedingsofACMSIGGRAPH1986,ACMPress,151–160.SHEPARD,D.1968.Atwo-dimensionalinterpolationfunctionforirregularly-spaceddata.InProceedingsofthe196823rdACMnationalconference,ACMPress,517–524. SMYTHE,D.1990.Atwo-passmeshwarpingalgorithmforobjecttransformationandimageinterpolation.Tech.Rep.1030,ILMComputerGraphicsDepartment,Lucaslm,SanRafael,Calif.TIDDEMAN,B.,DUFFY,N.,ANDRABEY,G.2001.Ageneralmethodforoverlapcontrolinimagewarping.ComputersandGraphics25,1,59–66.WARREN,J.,JU,T.,EICHELE,G.,THALLER,C.,CHIU,W.,ANDCARSON,J.2003.Ageometricdatabaseforgeneex-pressiondata.InSGP'03:Proceedingsofthe2003Eurograph-ics/ACMSIGGRAPHsymposiumonGeometryprocessing,166–176.WOLBERG,G.1998.Imagemorphing:asurvey.TheVisualComputer14,8/9,360–372.AAppendixHereweprovideaproofofTheorem2.1.Theorem2.1LetCbethematrixthatminimizesthefollowingsim-ilarityfunctionalminMTM=l2IåiwijˆpiMˆqij2:IfCiswrittenintheformlRwhereRisarotationmatrixandlisascalar,therotationmatrixRminimizestherigidfunctionalminMTM=IåiwijˆpiMˆqij2:Proof:First,weexpandbothoftheaboveerrorfunctionsintotheirquadraticformsyieldingminRTR=I;låiwil2ˆpiˆpTi2lˆpiRˆqTi+ˆqiˆqTiminRTR=IåiwiˆpiˆpTi2ˆpiMˆqTi+ˆqiˆqTiTheseminimizationproblemsareverysimilar.WendthematricesthatminimizetheseerrorfunctionsbydifferentiatingthefunctionswithrespecttothefreevariablesqjinR.åiwi2lˆpi¶R ¶qjˆqTi=0åiwi2ˆpi¶R ¶qjˆqTi=0Now,unlessl=0,whichimpliesadegeneratetransformation,theseequationsareequal.SinceC=lR,thisimpliesthatRmini-mizesthequadraticfunctionusingrigidtransformations.Thenega-tivesolutioncorrespondstoamaximumwhilethepositivesolutionistheminimum.QEDBAppendixInsection3wederiveclosed-formsolutionsforMovingLeastSquaresdeformationsusinglinesegments.Inordertocompletethederivation,weneedclosed-formsolutionsforintegralsofthreequadraticpolynomialstimestheweightfunctionwi(t)overthelinesegments.Letai,bibetheendpointsofthelinesegmentdescribedbypi(t)andletDi=(aiv)?(aibi)Tqi=tan1(biv)(biai)T (biv)?(biai)Ttan1(aiv)(aibi)T (aiv)?(aibi)Tb00i=(aiv)(aiv)Tb01i=(aiv)(vbi)Tb11i=(vbi)(vbi)T:Theintegralsthenhavetheclosed-formsolutionR10wi(t)(1t)2dt=jaibij 2D2ib01i b00ib11iqi DiR10wi(t)t(1t)dt=jaibij 2D2i1b01iqi DiR10wi(t)t2dt=jaibij 2D2ib01i b11ib00iqi Di:Whenvisonthelinesegmentdenedbyaiandbi,theseintegralsdonotneedtobeevaluatedbecausethefunctionf(v)interpolatesthelinesegments.However,ifvisontheextensionofoneoftheselinesegments,Di=0andtheseintegralsreducetoR10wi(t)(1t)2dt=jaibij5 3((vbi)(biai)T)((aiv)(biai)T)3R10wi(t)t(1t)dt=jaibij5 6((vbi)(biai)T)2((aiv)(biai)T)2R10wi(t)t2dt=jaibij5 3((vbi)(biai)T)3((aiv)(biai)T):