a34 geometric verification - micc€¦ · movie poster recognion content‐based retrieval from...

15
15-11-2011 1 Geometric verifica-on of matching The correspondence problem The correspondence problem tries to figure out which parts of an image correspond to which parts of another image, a;er the camera has moved, -me has elapsed, and/or the objects have moved around. Given two or more images of the same 3D scene, taken from different points of view, at different -mes, and with objects in the scene in general mo-on rela-ve to the camera, the correspondence problem is: to find a set of points in one image which can be iden-fied as the same points in another image i.e. verify if they belong to a consistent configura-on Image content is transformed into local features that are invariant to transla-on, rota-on, and scale and the correspondence is assessed by checking if the layout of a subset of features is similar in the two images.

Upload: others

Post on 27-May-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A34 Geometric verification - MICC€¦ · Movie Poster Recognion Content‐based retrieval from mobile phone From Quack, Leibe, Van Gool, CIVR’08 Image Auto‐Annotaon Le: Wikipedia

15-11-2011

1

Geometricverifica-onofmatching

Thecorrespondenceproblem

•  Thecorrespondenceproblemtriestofigureoutwhichpartsofanimagecorrespondtowhichpartsofanotherimage,a;erthecamerahasmoved,-mehaselapsed,and/ortheobjectshavemovedaround.

•  Giventwoormoreimagesofthesame3Dscene,takenfromdifferentpointsofview,atdifferent-mes,andwithobjectsinthesceneingeneralmo-onrela-vetothecamera,thecorrespondenceproblemis:

–  tofindasetofpointsinoneimagewhichcanbeiden-fiedasthesamepointsinanotherimagei.e.verifyiftheybelongtoaconsistentconfigura-on

•  Imagecontentistransformedintolocalfeaturesthatareinvarianttotransla-on,rota-on,andscaleandthecorrespondenceisassessedbycheckingifthelayoutofasubsetoffeaturesissimilarinthetwoimages.

Page 2: A34 Geometric verification - MICC€¦ · Movie Poster Recognion Content‐based retrieval from mobile phone From Quack, Leibe, Van Gool, CIVR’08 Image Auto‐Annotaon Le: Wikipedia

15-11-2011

2

•  Aclassicalsolu-ontothecorrespondenceproblemistheRANSACalgorithm[Fischler81].RANSACpermitsthees-ma-onofparametersofamathema-calmodelbyrandomsampling.

•  Thebasicassump-onisthatthedataconsistsof"inliers",i.e.,datawhosedistribu-oncanbeexplainedbysomesetofmodelparameters,and"outliers"whicharedatathatdonotfitthemodel.RANSACalsoassumesthat,givena(usuallysmall)setofinliers,thereexistsaprocedurewhichcanes-matetheparametersofamodelthatop-mallyexplainsorfitsthisdata:

–  Itassumesthatobjectsareplanar,(validformanystructuresonbuildingsandmanmadeobjects;sufficientforsmallviewpointvaria-onson3Dobjects)

–  Itisnon‐determinis-cinthatitproducesareasonableresultonlywithacertainprobability,withthisprobabilityincreasingasmoreitera-onsareallowed.

–  Themaindisadvantageisthatnoupperboundexistsonthe-merequiredtocomputetheparameters.

RANSACRANdomSAmpleConsensus

TheRANSACalgorithm

•  Input:–  asetofobserveddatavalues;–  aparameterizedmodelwhichcanexplainorbefiYedtotheobserva-ons;–  confidenceparameters.

•  Generatek(apredeterminednumber)modelhypotheses,eachofthemiscomputedusingaminimalsubsetmofpoints

•  Foreachmodelhypothesis–  Drawasampleofm pointsfromdataatrandom–  Theparametersofthemodelarereconstructedfromthesetofpoints–  Computetheresidualswithrespecttoalldatapoints.Pointswithresidualslessthan

somethresholdt areclassifiedashypothe(calinliers–  Thees-matedmodelisreasonablygoodifsufficientlymanypointshavebeen

classifiedashypothe-calinliers.

–  Themodelisrees-matedfromallhypothe-calinliers(itwasonlybeenes-matedfromtheini-alsetofhypothe-calinliers).

–  Themodelisevaluatedbyes-ma-ngtheerroroftheinliersrela-vetothemodel.•  end

•  Ateachitera-onamodelisproducedthateitherisrejectedbecausetoofewpointsareclassifiedasinliersoraisarefinedmodelwithacorrespondingerrormeasure.Therefinedmodelisacceptedifitserrorislowerthanthelastsavedmodel.

Page 3: A34 Geometric verification - MICC€¦ · Movie Poster Recognion Content‐based retrieval from mobile phone From Quack, Leibe, Van Gool, CIVR’08 Image Auto‐Annotaon Le: Wikipedia

15-11-2011

3

Example:fi\ngaline

Leastsquaresfit

FromD.Forsyth

• Selectsampleofmpointsatrandom:toes-matealine,2pointsareminimal.

Page 4: A34 Geometric verification - MICC€¦ · Movie Poster Recognion Content‐based retrieval from mobile phone From Quack, Leibe, Van Gool, CIVR’08 Image Auto‐Annotaon Le: Wikipedia

15-11-2011

4

• Calculatemodelparametersthatfitthedatainthesample

• Calculateerrorfunc-onforeachdatapoint

Page 5: A34 Geometric verification - MICC€¦ · Movie Poster Recognion Content‐based retrieval from mobile phone From Quack, Leibe, Van Gool, CIVR’08 Image Auto‐Annotaon Le: Wikipedia

15-11-2011

5

• Selectdatathatsupportcurrenthypothesis(pointswithresidualslessthansomethresholdareclassifiedasitsinliers)

• Repeatsampling

• Calculatemodelparametersthatfitthedatainthesample

• Calculateerrorfunc-onforeachdatapoint

• Selectdatathatsupportcurrenthypothesis(pointswithresidualslessthansomethresholdareclassifiedasitsinliers)

Page 6: A34 Geometric verification - MICC€¦ · Movie Poster Recognion Content‐based retrieval from mobile phone From Quack, Leibe, Van Gool, CIVR’08 Image Auto‐Annotaon Le: Wikipedia

15-11-2011

6

• Repeatsampling

• Calculatemodelparametersthatfitthedatainthesample

• Calculateerrorfunc-onforeachdatapoint

• Selectdatathatsupportcurrenthypothesis(pointswithresidualslessthansomethresholdareclassifiedasitsinliers)

• …….Repeatun-lk

• Selectthehypothesiswiththemaximalnumberofinliersandre‐es-matethemodelparameterusingitsiden-fiedinliers.

Finalfi\ng

Page 7: A34 Geometric verification - MICC€¦ · Movie Poster Recognion Content‐based retrieval from mobile phone From Quack, Leibe, Van Gool, CIVR’08 Image Auto‐Annotaon Le: Wikipedia

15-11-2011

7

Example:fi\ngaffinetransforma-on

•  Affinetransformof[x,y]to[u,v]:

•  Rewritetosolvefortransformparameters(6):

u, v x, y

Whatdowedoaboutthe“bad”matches?

FromS.Seitz,R.SzeliskiandA.Efros

Page 8: A34 Geometric verification - MICC€¦ · Movie Poster Recognion Content‐based retrieval from mobile phone From Quack, Leibe, Van Gool, CIVR’08 Image Auto‐Annotaon Le: Wikipedia

15-11-2011

8

Whatdowedoaboutthe“bad”matches?

FromS.Seitz,R.SzeliskiandA.Efros

Selectonematch,countinliers

Page 9: A34 Geometric verification - MICC€¦ · Movie Poster Recognion Content‐based retrieval from mobile phone From Quack, Leibe, Van Gool, CIVR’08 Image Auto‐Annotaon Le: Wikipedia

15-11-2011

9

Selectonematch,countinliers

Leastsquaresfit

Find“average”transla-onvector

Page 10: A34 Geometric verification - MICC€¦ · Movie Poster Recognion Content‐based retrieval from mobile phone From Quack, Leibe, Van Gool, CIVR’08 Image Auto‐Annotaon Le: Wikipedia

15-11-2011

10

Howmanyitera-ons/samples?

•  Suppose:

wnumberofinliersindata/numberofpointsindatanisthenumberofpointsneededfores(ma(ngamodelselectedindependently,wnistheprobabilitythatallnpointsareinliers1−wnistheprobabilitythatatleastoneofthenpointsisanoutlierptheprobabilitythatthealgorithmproducesausefulresul

•  Theore-callythenumberofitera-onsk(thenumberofsamples)canbeobtainedfrom:

Itmustbechosenhighenoughtokeepthisbelowdesiredfailurerate.

Slidecredit:DavidLowe

•  Fordatawithmanyoutliers,therequirednumberofsamplesincreasesdrama-cally.Inprac-cethetheore-cales-matesareop-mis-candtheactualnumberofrequiredsamplesismuchhigher.

•  Theore-calnumberofsampleskneededtoensure95%confidencethatatleastoneoutlierfreesample:

Propor-onofinliersw[%]

samplesize(#

pointstakenatra

ndom

)

Page 11: A34 Geometric verification - MICC€¦ · Movie Poster Recognion Content‐based retrieval from mobile phone From Quack, Leibe, Van Gool, CIVR’08 Image Auto‐Annotaon Le: Wikipedia

15-11-2011

11

RANSACsummary

•  Advantages–  Generalmethodsuitedtolargerangeofproblems–  Easytoimplement–  Independentofnumberofdimensions

•  Disadvantages–  Onlyhandlesmoderatenumberofoutliers(<50%)–  Noupperboundexistsonthe-merequiredtocomputetheseparameters−  Requiresalargenumberofsamplesfordatawithmanyoutliersthusheavycomputa-on−  Needstoknowtheoutlierra-otoes-matethenumberofsamples.Ifnopriorinforma-on,a

conserva-venumberneedtobeused,forinstance,60%forwidebaselinematchingresultstoensuresuccessfulrun.

−  Requiresathresholdfordeterminingwhetherpointsareinliers

•  Variousimprovementstostandardapproach[Nister,2004;Matas2005,SuYer2005,…….].Manyvariantsavailable

–  PROSAC:ProgressiveRANSAC[Chum,2005]–  Preemp-veRANSAC[Nister,2005]–  ….

ExampleApplica-ons

Mobiletouristguideself‐localiza-on,object/buildingrecogni-on,photo/videoaugmenta-on

AachenCathedral

[Quack,Leibe,VanGool,CIVR’08]

FromQuack,Leibe,VanGool,CIVR’08

Page 12: A34 Geometric verification - MICC€¦ · Movie Poster Recognion Content‐based retrieval from mobile phone From Quack, Leibe, Van Gool, CIVR’08 Image Auto‐Annotaon Le: Wikipedia

15-11-2011

12

MoviePosterRecogni-on

Content‐basedretrievalfrommobilephone

FromQuack,Leibe,VanGool,CIVR’08

ImageAuto‐Annota-on

Le;:WikipediaimageRight:closestmatchfromFlickr

MoulinRouge

TourMontparnasse Colosseum

ViktualienmarktMaypole

OldTownSquare(Prague)

FromQuack,Leibe,VanGool,CIVR’08

Page 13: A34 Geometric verification - MICC€¦ · Movie Poster Recognion Content‐based retrieval from mobile phone From Quack, Leibe, Van Gool, CIVR’08 Image Auto‐Annotaon Le: Wikipedia

15-11-2011

13

GeneralizedHoughTransform

•  Generaliza-onofHoughtransformforanarbitrarycontourorshape[Ballard,1981]–  Choosereferencepointforthecontour(e.g.thecenter)–  Foreachpointonthecontourrememberwhereitislocatedw.r.t.tothereferencepoint

(i.e.rememberradiusrandangleφrela-vetothecontourtangent)–  Recogni-on:wheneveryoufindacontourpoint,calculatethetangentangleand‘vote’

forallpossiblereferencepoints

•  Toassessatransforma-onbetweenimages,thesameideacanapplytolocalfeaturesversusatransforma-on

Slide credit: Bernt Schiele

• Ifthereistheneedtorecognizeclustersofjustasmallnumberofconsistentfeaturesamongalargenumberoffeaturematchhypotheses(e.g.1%vs99%)RANSACdoesnotwork.GeneralizedHoughtransformistheappropriatesolu-on.

•  Thekeytoefficiencyistohaveeachfeaturedetermineasmanyparametersaspossible–  Forexample,linescanbedetectedmuchmoreefficientlyfromsmalledgeelements(or

pointswithlocalgradients)thanfromjustpoints–  Forobjectrecogni-on,eachfeatureshouldpredictloca-on,scale,andorienta-on

•  ExamineallclustersinHoughtransformwithatleastmfeatures

•  Performleast‐squaresaffinefittomodel.

•  Discardoutliersandperformtop‐downcheckforaddi-onalfeatures.

•  Evaluateprobabilitythatmatchiscorrect

–  UseBayesianmodel,withprobabilitythatfeatureswouldarisebychanceifobjectwasnotpresent

–  Takesaccountofobjectsizeinimage,texturedregions,modelfeaturecountindatabase,accuracyoffit(D.Lowe,2001)

•  TheHoughtransformcanextractfeaturegroupingsfromcluYerinlinear-me

Slide credit: David Lowe

TheGeneralizedHoughalgorithm

Page 14: A34 Geometric verification - MICC€¦ · Movie Poster Recognion Content‐based retrieval from mobile phone From Quack, Leibe, Van Gool, CIVR’08 Image Auto‐Annotaon Le: Wikipedia

15-11-2011

14

FromK.Grauman,B.Leibe

Example:recogni-onwithlocalfeatures

•  Foreveryfeature,storeallpossible“occurrences”

– Objectiden-ty– Pose– Rela-veposi-on

•  Fornewimage,letthematchedfeaturesvoteforpossibleobjectposi-ons

ExampleApplica-ons

FromPhilbinCVPR’07

Query Resultsfrom5kFlickrimages(demoavailablefor100kset)

Large‐ScaleRetrieval

Page 15: A34 Geometric verification - MICC€¦ · Movie Poster Recognion Content‐based retrieval from mobile phone From Quack, Leibe, Van Gool, CIVR’08 Image Auto‐Annotaon Le: Wikipedia

15-11-2011

15

•  ModelsforplanarsurfaceswithSIFTkeys•  Planarsurfacescanbereliablyrecognizedatarota-on

of60°awayfromthecamera

•  Affinefitapproximatesperspec-veprojec-on

•  Only3pointsareneededforrecogni-on

Planarrecogni-on

FromK.Grauman,B.Leibe

3DObjectRecogni-on

•  Extractoutlineswithbackgroundsubtrac-on•  Only3keypointsareneededforrecogni-on,soextrakeypointsproviderobustness

•  Affinemodelisnolongerasaccurate

FromK.Grauman,B.Leibe