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 ID: 3055
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.
ImageDeformationUsingMovingLeastSquaresScottSchaeferTexasA&MUniversityTravisMcPhailRiceUniversityJoeWarrenRiceUniversity (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-ometryandObjectModelingBoundaryrepresentations;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.eduemail:tjice@rice.eduemail: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.cansometimessufferfromghosts,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-formationsareasrigid-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 jpi vj2a: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=q pMwherepandqareweightedcentroids.p=åiwipi åiwiq=åiwiqi åiwiWiththisobservationwecansubstituteTintoequation2andrewritelv(x)intermsofthelinearmatrixM.lv(x)=(x p)M+q(3)Basedonthisinsight,theleastsquaresproblemofequation1canberewrittenasåiwijpiM qij2(4) wherepi=pi pandqi=qi q.NoticethatMovingLeastSquaresisverygeneralinthatthematrixMdoesnothavetobeafullyafnetransformation.Infact,thisframeworkallowsustoinvestigatedifferentclassesoftransformationmatricesM.Inpar-ticular,weareinterestedinthecasewhereMisarigidtransfor-mation.However,werstexaminethecasewhereMisanafnetransformationasthederivationisthesimplest.Nextweconstructdeformationswithsimilaritytransformationsandshowhowthesesolutionscanbeusedtondclosed-formsolutionstoMovingLeastSquaredeformationswithrigidtransformations.2.1AneDeformationsFindinganafnedeformationthatminimizesequation4isstraight-forwardusingtheclassicnormalequationssolution.M= åipTiwipi! 1åjwjpTjqj:Thoughthissolutionrequirestheinversionofamatrix,thematrixisaconstantsize(22)andisfasttoinvert.Withthisclosed-formsolutionforMwecanwriteasimpleexpressionforthedeformationfunctionfa(v).fa(v)=(v p) åipTiwipi! 1åjwjpTjqj+q:(5)Applyingthisdeformationfunctiontoeachpointintheimagecre-atesanew,deformedimage.Whiletheusercreatesthesedeformationsbymanipulatingthepointsq,thepointsparexed.Sincethepdonotchangeduringdeformation,muchofequation5canbeprecomputedyieldingveryfastdeformations.Inparticular,wecanrewriteequation5intheformfa(v)=åjAjqj+q:whereAjisasinglescalargivenbyAj=(v p) åipTiwipi! 1wjpTj: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åiwipi p?iM1 qTi2:Thisquadraticfunctionhasauniqueminimizer,whichyieldstheoptimaltransformationmatrixMM=1 msåiwipi p?i(qTi q?Ti)(6)wherems=åiwipipTi:Similartotheafnedeformations,theusermanipulatestheqtoproducethedeformationwhilethepremainxed.Usingthisob-servationwewritethedeformationfunctionfs(v)inaformthatallowsustoprecomputeasmuchinformationaspossible.fs(v)isthenfs(v)=åiqi(1 msAi)+qwheremsandAidependonlyonthepi,vandcanbeprecomputedandAiisAi=wipi p?iv p (v p)?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åiwijpiM qij2:IfCiswrittenintheformlRwhereRisarotationmatrixandlisascalar,therotationmatrixRminimizestherigidfunctionalminMTM=IåiwijpiM qij2:Proof:SeeAppendixA.Thistheoremisvalidinarbitrarydimension,however,itisveryeasytoapplyin2D.Usingthistheorem,wendthattherigidtransformationisexactlythesameasequation6exceptthatweuseadifferentconstantmrinthesolutionsothatMTM=Igivenbymr=vuut åiwiqipTi!2+ åiwiqip?Ti!2:Unlikethesimilaritydeformationfs(v),wecannotprecomputeasmuchinformationfortherigiddeformationfunctionfr(v).How-ever,thedeformationprocesscanstillbemadeveryefcient.Let~fr(v)=åiqiAiwhereAiisdenedinequation7,whichmaybeprecomputed.Thisvector~fr(v)isarotatedandscaledversionofthevectorv p.Tocomputefr(v)wenormalize~fr,scalebythelengthofv p(whichalsocanbeprecomputed),andtranslatebyq.fr(v)=jv pj~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+T qi(t)j2(9)wherewi(t)iswi(t)=jp0i(t)j jpi(t) vj2aandp0t(t)isthederivativeofpi(t).(Thisfactorofjp0(t)jmakestheintegralsindependentoftheparameterizationofthecurvepi(t).)Nownoticethat,despitetheintegral,equation9isstillquadraticinTandcanbesolvedforintermsofthematrixM.T=q pMwherepandqareagainweightedcentroids.p=åiR10wi(t)pi(t)dt åiR10wi(t)dtq=åiR10wi(t)qi(t)dt åiR10wi(t)dt(10)Therefore,werewriteequation9onlyintermsofMasåiZ10wi(t)jpi(t)M qi(t)j2(11)wherepi(t)=pi(t) pqi(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.1AneLinesSincepi(t),qi(t)arelinesegments,wecanrepresentthesecurvesasmatrixproductspi(t)= 1 ttaibiqi(t)= 1 ttcidiwhereai,biaretheend-pointsofpi(t)andci,diaretheend-pointsofqi(t).Equation11isthenwrittenasåiZ10(1 tt)aibiM cidi2(12)whoseminimizerisM= åiaibiTWiaibi! 1åjajbjTWjcjdjwhereWiisaweightmatrixgivenbyWi=di00d01id01id11iandthediareintegralsoftheweightfunctionwi(t)multipliedbythedifferentquadraticpolynomials.d00i=R10wi(t)(1 t)2dtd01i=R10wi(t)(1 t)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)=åjAjcjdj+qwhereAjisa12matrixoftheformAj=(v p) åiaibiTWiaibi! 1ajbjTWj:Duringthedeformation,theend-pointsaiandbiofthelinesegmentpi(t)arexedwhiletheusermanipulatestheend-pointscianddiofthelinesegmentsqi(t).SinceAjisindependentofcianddi,Ajcanbeprecomputed.Figure5showsanexampledeformationperformedwithlineseg-mentswherewemodifytheLeaningTowerofPisatoleantheop-positedirectionandshrinkthetower.TheAfneMLSdeformationshearsthetowertothesideinsteadofbeingrotatedanddoesnotappeartoberealistic.Toremovethissheareffect,werestrictthematrixinequation11tobeasimilarityorrigid-bodytransforma-tion.3.2SimilarityLinesRestrictingequation12tosimilaritytransformsrequiresthatMTM=l2Iforsomescalarl.Asnotedinsection2.2,McanbeparameterizedusingasinglecolumnvectorM1yieldingåiZ101 t0t001 t0t0BB@0BB@ai a?ibi b?i1CCAM1 cTidTi1CCA2ThiserrorfunctionisquadraticinM1.Tondtheminimizer,wedifferentiatewithrespecttothefreevariablesinM1andsolvethelinearsystemofequationstoobtainthematrixM.M=1 msåj0BB@aj a?jbj b?j1CCATWj cTjc?TjdTjd?Tj!(13)whereWjisaweightmatrixWj=0BBB@d00j0d01j00d00j0d01jd01j0d11j00d01j0d11j1CCCA Figure6:ComparisonofthelinedeformationmethodofBeieretal.(left)withtheRigidMLSdeformation(right).andmsisagainascalingconstant,whichhastheformms=åiaiaTid00i+2aibTid01i+bibTid11i:Thisdeformationfunctionhasaverysimilarstructuretothepoint-basedsimilaritydeformation.Usingthismatrixwewritefs(v)explicitlyasfs(v)=åj(cjdj)(1 msAj)+qwhereAjisa42matrix.Aj=Wj0BB@aj a?jbj b?j1CCAv p (v p)?T(14)Figure5showsthetowerdeformedusingthissimilarity-basedmethod.Incontrasttotheafnemethod,thetoweractuallyappearstoberotated,notsheared,totheleftresultinginamorerealisticdeformation.Similaritytransformationscontainuniformscaling,whichisapparentfromthewayinwhichthetowershrinkswiththelinesegment.Rigidtransformationsremovethisuniformscaling.3.3RigidLinesUsingthesolutionfromsection3.2andTheorem2.1,weimme-diatelyhaveaclosedformsolutionforrigid-bodytransformations.Thetransformationmatrixis,therefore,thesameasequation13exceptwechooseadifferentscalingconstantmrsothatMTM=I.mr=åjaTj a?TjbTj b?TjWj cTjdTj!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),scalesthevectorsothatitslengthisjv pjandtranslatesbyq.Forthisdeformationusinglinesegments,therotatedvectorisgivenby~fr(v)=åj(cjdj)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,157164.BEIER,T.,ANDNEELY,S.1992.Feature-basedimagemetamor-phosis.InSIGGRAPH'92:Proceedingsofthe19thannualcon-ferenceonComputergraphicsandinteractivetechniques,ACMPress,NewYork,NY,USA,3542.BOOKSTEIN,F.L.1989.Principalwarps:Thin-platesplinesandthedecompositionofdeformations.IEEETrans.PatternAnal.Mach.Intell.11,6,567585.GU,X.,ANDYAU,S.-T.2003.Globalconformalsurfaceparam-eterization.InSGP'03:Proceedingsofthe2003Eurograph-ics/ACMSIGGRAPHsymposiumonGeometryprocessing,Eu-rographicsAssociation,Aire-la-Ville,Switzerland,Switzerland,127137.HORN,B.1987.Closed-formsolutionofabsoluteorientationusingunitquaternions.JournaloftheOpticalSocietyofAmericaA4,4(April),629642.IGARASHI,T.,MOSCOVICH,T.,ANDHUGHES,J.F.2005.As-rigid-as-possibleshapemanipulation.ACMTrans.Graph.24,3,11341141.KOBAYASHI,K.G.,ANDOOTSUBO,K.2003.t-ffd:free-formde-formationbyusingtriangularmesh.InSM'03:ProceedingsoftheeighthACMsymposiumonSolidmodelingandapplications,ACMPress,226234.LEE,S.-Y.,CHWA,K.-Y.,ANDSHIN,S.Y.1995.Imagemeta-morphosisusingsnakesandfree-formdeformations.InSIG-GRAPH'95:Proceedingsofthe22ndannualconferenceonComputergraphicsandinteractivetechniques,ACMPress,NewYork,NY,USA,439448.LEVIN,D.1998.Theapproximationpowerofmovingleast-squares.MathematicsofComputation67,224,15171531.MACCRACKEN,R.,ANDJOY,K.I.1996.Free-formdeforma-tionswithlatticesofarbitrarytopology.InProceedingsofACMSIGGRAPH1996,ACMPress,181188.SEDERBERG,T.W.,ANDPARRY,S.R.1986.Free-formde-formationofsolidgeometricmodels.InProceedingsofACMSIGGRAPH1986,ACMPress,151160.SHEPARD,D.1968.Atwo-dimensionalinterpolationfunctionforirregularly-spaceddata.InProceedingsofthe196823rdACMnationalconference,ACMPress,517524. SMYTHE,D.1990.Atwo-passmeshwarpingalgorithmforobjecttransformationandimageinterpolation.Tech.Rep.1030,ILMComputerGraphicsDepartment,Lucaslm,SanRafael,Calif.TIDDEMAN,B.,DUFFY,N.,ANDRABEY,G.2001.Ageneralmethodforoverlapcontrolinimagewarping.ComputersandGraphics25,1,5966.WARREN,J.,JU,T.,EICHELE,G.,THALLER,C.,CHIU,W.,ANDCARSON,J.2003.Ageometricdatabaseforgeneex-pressiondata.InSGP'03:Proceedingsofthe2003Eurograph-ics/ACMSIGGRAPHsymposiumonGeometryprocessing,166176.WOLBERG,G.1998.Imagemorphing:asurvey.TheVisualComputer14,8/9,360372.AAppendixHereweprovideaproofofTheorem2.1.Theorem2.1LetCbethematrixthatminimizesthefollowingsim-ilarityfunctionalminMTM=l2IåiwijpiM qij2:IfCiswrittenintheformlRwhereRisarotationmatrixandlisascalar,therotationmatrixRminimizestherigidfunctionalminMTM=IåiwijpiM qij2:Proof:First,weexpandbothoftheaboveerrorfunctionsintotheirquadraticformsyieldingminRTR=I;låiwi l2pipTi 2lpiRqTi+qiqTiminRTR=Iåiwi pipTi 2piMqTi+qiqTiTheseminimizationproblemsareverysimilar.WendthematricesthatminimizetheseerrorfunctionsbydifferentiatingthefunctionswithrespecttothefreevariablesqjinR.åiwi 2lpi¶R ¶qjqTi=0åiwi 2pi¶R ¶qjqTi=0Now,unlessl=0,whichimpliesadegeneratetransformation,theseequationsareequal.SinceC=lR,thisimpliesthatRmini-mizesthequadraticfunctionusingrigidtransformations.Thenega-tivesolutioncorrespondstoamaximumwhilethepositivesolutionistheminimum.QEDBAppendixInsection3wederiveclosed-formsolutionsforMovingLeastSquaresdeformationsusinglinesegments.Inordertocompletethederivation,weneedclosed-formsolutionsforintegralsofthreequadraticpolynomialstimestheweightfunctionwi(t)overthelinesegments.Letai,bibetheendpointsofthelinesegmentdescribedbypi(t)andletDi=(ai v)?(ai bi)Tqi=tan 1(bi v)(bi ai)T (bi v)?(bi ai)T tan 1(ai v)(ai bi)T (ai v)?(ai bi)Tb00i=(ai v)(ai v)Tb01i=(ai v)(v bi)Tb11i=(v bi)(v bi)T:Theintegralsthenhavetheclosed-formsolutionR10wi(t)(1 t)2dt=jai bij 2D2ib01i b00i b11iqi DiR10wi(t)t(1 t)dt=jai bij 2D2i1 b01iqi DiR10wi(t)t2dt=jai bij 2D2ib01i b11i b00iqi Di:Whenvisonthelinesegmentdenedbyaiandbi,theseintegralsdonotneedtobeevaluatedbecausethefunctionf(v)interpolatesthelinesegments.However,ifvisontheextensionofoneoftheselinesegments,Di=0andtheseintegralsreducetoR10wi(t)(1 t)2dt=jai bij5 3((v bi)(bi ai)T)((ai v)(bi ai)T)3R10wi(t)t(1 t)dt= jai bij5 6((v bi)(bi ai)T)2((ai v)(bi ai)T)2R10wi(t)t2dt=jai bij5 3((v bi)(bi ai)T)3((ai v)(bi ai)T):