Transcription of An In - Stanford Artificial Intelligence Laboratory
1 AnIntroductiontoProjectiveGeometry(forco mputervision)StanBirch ,thesidesofobjectshavelengths,inter-sect inglinesdetermineanglesbetweenthem, ,thesepropertiesdonotchangewhentheEuclid eantransformations(translationandrotatio n) ,itisat rsttemptingtothinkthatitistheonlytypeofg eometry.(Indeed,thewordgeometrymeans\mea surementoftheearth.")However,whenweconsi dertheimagingprocessofacamera,itbecomesc learthatEuclideangeometryisinsu cient:Lengthsandanglesarenolongerpreserv ed, , ,therearetwogeometriesbetweenthem:simila rityanda erentgeometries, , ,thedrawbackisthatfewermeasuresarepreser ved|certainlynotlengths,angles, (thatis,pointsremainpointsandlinesremain lines),incidence(thatis,whetherapointlie sonaline),andameasureknownasthecrossrati o, , ,whichwedenotebyP1,isanalogoustoaone-dim ensionalEuclideanworld;theprojectiveplan e,P2,correspondstotheEuclideanplane.
2 Andpro-jectivespace,P3, , ,wewillspendthebulkofoure ort,indeedallofsection2,studyingP2, nalsectionthenbrie ydiscussestherelevanceofprojectivegeomet rytocomputervision, neprojectiveTransformationsrotationXXXX translationXXXX uniformscalingXXXnonuniformscalingXXshea rXXperspectiveprojectionXcompositionofpr ojectionsXInvariantslengthXangleXXratioo flengthsXXparallelismXXXincidenceXXXX crossratioXXXXF igure1:Thefourdi erentgeometries,thetransformationsallowe dineach, rst-timereadermay ndsomeoftheexamplesandderivationsexcessi velydetailed,butthisthoroughnessshouldpr ovehelpfulforreadingthemoreadvancedtexts , ,IsuggesttheexcellentbookbyFaugeras[2]an dappendixbyMundyandZisserman[5]. [3].Themostimportantoftheseforourpurpose sishomogeneouscoordinates, ,andproceedingtoeachoftheotherthreemodel s,wewillattempttogainintuitiononthenatur eoftheprojectiveplane,whoseconcisede (x;y) ,wesimplyaddathirdcoordinateof1attheend: (x;y;1).
3 1 Overallscalingisunimportant,sothepoint(x ;y;1)isthesameasthepoint( x; y; ),foranynonzero .Inotherwords,(X;Y;W)=( X; Y; W)forany 6=0(Thusthepoint(0;0;0)isdisallowed).Bec ausescalingisunimportant,thecoordinates( X;Y;W) ,wewillusecapitalletterstodenotehomogene ouscoordinatesofpoints,andwewillusetheco ordinatenotation(X;Y;W)interchangeablywi ththevectornotation[X;Y;W] ,webeginwithastandardEuclideanformulafor alineax+by+c=0;andusethefactthattheequat ionisuna ectedbyscalingtoarriveatthefollowing:aX+ bY+cW=0uTp=pTu=0;(1)whereu=[a;b;c]Tisthe lineandp=[X;Y;W] : a=bistheslope, c=aisthex-intercept,and c= ,wesim-plydividebythethirdcoordinate:(x; y)=(X=W;Y=W).Immediatelyweseethattheproj ectiveplanecontainsmorepointsthantheEucl ideanplane,thatis, ,orpointsatin ;forexample,thepoints(1;0;0)and(0;1;0)ar eassociatedwiththehorizontalandverticald irections, ,calledtheidealline,orthelineatin nity,which,onceagain, (0;0;1).
4 Supposewewantto ,thetwolinesu1=(a1;b1;c1)andu2=(a2;b2;c2 )arefoundtointersectatthepointp=(b1c2 b2c1;a2c1 a1c2;a1b2 a2b1).Thisformulaismoreeasilyremembereda sthecrossproduct:p=u1 , , a1=b1= a2=b2,thepointofintersectionissimply(b1c 2 b2c1;a2c1 a1c2;0),whichistheidealpointassociatedwi ththedirectionwhoseslopeis a1= ,giventwopointsp1andp2,theequationofthel inepassingthroughthemisgivenbyu=p1 ,apointinann-dimensionalEuclideanspaceis representedasapointinan(n+1) (X;Y;W)incidencepTu=0collinearityjp1p2p3 j=0joinof2pointsu=p1 p2idealpoints(X;Y;0)(a)lineu=(a;b;c)inci dencepTu=0concurrenceju1u2u3j=0intersect ionof2linesp=u1 u2idealline(0;0;c)(b)Figure2:Summaryofho mogeneouscoordinates:(a)points,and(b) ,p2, rsttwopointsisp1 (p1 p2)=0,or,moresuccinctly,ifthedeterminant ofthe3 3matrixcontainingthepointsiszero:det[p1p 2p3]=0:Similarly,threelinesu1,u2,andu3in tersectatthesamepoint( ,theyareconcurrent),ifthefollowingequati onholds:det[u1u2u3]=0 ,consultthenotesbyGuibas[3].
5 (4;2;2)andu2=(6;5;1),thepointofintersect ionisgivenby: ijk422651 =(2 10)i+(12 4)j+(20 12)k=( 8;8;8)=( 1;1;1) ,recallthatX=WxandY=Wy,yieldingXY=W2fort hehyperbolaandY= (W;W;W),whichisthesameasthepoint(1;1)int heEuclideanplane, , (X;0;0), ,ingoingfromEuclideantoprojective, ,apointp=(X;Y;W)inP2canbevisualizedasa\l ine"2inthree-dimensionalspacepassingthro ughtheoriginandthepointp(Technicallyspea king,thelinedoesnotincludetheorigin).Thi sthree-dimensionalspaceisknownastheraysp ace(amongothernames) ,alineu=(a;b;c)inP2canbevisualizedasa\pl ane" \plane",andtheidealpointsare\lines"inthi s\plane." ectedbyscalarmultiplication,P2istwo-dime nsional, , (X;Y;W),representedasa\line"inrayspace,c anbeprojectedontotheunitspheretoobtainth epoint1pX2+Y2+W2(X;Y;W)(Noticethattheden ominatorisneverzero,sincethepoint(0;0;0) isnotallowed).Thus,pointsintheprojective planecanbevisualizedaspointsontheunitsph ere,asshownin gure4(Sinceeach\line"inrayspacepiercesth espheretwice,boththeseintersectionsrepre sentthesamepoint;thatis,antipodalpointsa reidenti ed).
6 Similarly,the\planes"thatrepresentlinesi nrayspaceintersecttheunitspherealonggrea tcircles, , neplaneTocompleteourgeometricaltourofP2, letusprojecttheunitsphereontotheplaneW= (X;Y;W)onthesphereisthusmappedtothepoint (XW;YW;1)whichliesattheintersectionofthe W=1planewiththe\line" ,linesaremappedtotheintersectionoftheW=1 planewiththe\plane" ,respectively,topointsatin nityandtheline2 Sinceitcanbecomeconfusingtoreadstatement ssuchas,\Apointisrepresentedasa`line,'"w ewillalwaysencloseinquotationmarkstheent itieswhosesolepurposeisvisualizationinn+ lineideal pointaffineplaneuWYXF igure5:Thea nity,asshownin nitionoftheprojectiveplanecannowbegiven: De nition1 Theprojectiveplane,P2,isthea neplaneaugmentedbyasingleideallineandase tofidealpoints,oneforeachdirection, gure2, ,forexample,areidentical, ,anytheoremorstatementthatistrueforthepr ojectiveplanecanberewordedbysubstituting pointsforlinesandlinesforpoints, ,thatis,asetoflinespassingthroughthesame point, , ,thecrossratio,whichisaratioofratiosofdi stances, ,p2,p3,andp4inP2,denotetheEuclideandista ncebetweentwopointspiandpjas ,onede nitionofthecrossratioisthefollowing:Cr(p 1;p2;p3;p4)= 13 24 14 23:(2)Inotherwords,selectoneofthepoints, sayp1, , ,inthiscasep2, [Xi;Yi;Wi]Tandpj=[Xj;Yj;Wj]Tiscomputedfr omthe2 DEuclideanpointsobtainedbydividingbythet hirdcoordinate, : ij=vuut XiWi XjWj!
7 2+ YiWi YjWj!2:Actually,thecrossratioisthesameno matterwhichcoordinateisusedasthedivisor( aslongasthesamecoordinateisusedforallthe points);thus,ifallthepointslieontheideal line(Wi=0foralli), , ,simplycancelthetermscontainingthepoint( becauseitliesatin nity);forexample,ifthesecondpointisthecu lprit(W2=0;W1;W3;W46=0),then 23= 24=1,whichcanceleachother:Cr(p1;p2;p3;p4 )= 13 14:Althoughthecrossratioisinvariantoncew hattheorderofthepointshasbeenchosen,itsv alueisdi !=24ways,butinfactonlysixdistinctvaluesa reproduced,whicharerelatedbythesetf ;1 ;1 ;11 ; 1 ; 1g:7(a)(b)Figure6:Thecrossratiocanbeused with ,thereareothermeasuresofthecrossratio, ,dualityleadstoacrossratioforfourconcurr entlinesbyreplacingtheEuclideandistanceb etweentwopointswiththesineoftheanglebetw eentwolines(Ihavenotcon rmedwhetherthecosinealsoworks).Anotherle ssobviouswaytomeasurethecrossratiobetwee nfourconcurrentlinesistouseanew,arbitrar ylinethatintersectsthem;thecrossratiooft helinesisthende nedasthecrossratioofthefourpointsofinter section(Thecrossratiowillbethesamenomatt erwhichlineisused).
8 Asa nalcommentonthecrossratio, ,given vepointsinastarcon guration,asshownin gure6,wecanconnectthedotsasshownin(a)toy ieldlinescontainingfourcollinearpoints,t hepointsofintersection, ,asshownin(b), ,thesecond-orderconicsections(ellipses,p arabolas,andhyperbolas)areimportantpheno mena,beyondthe ,parabolas,andhyperbolaslosetheirdistinc tioninprojectivegeometrybecausetheyareal lprojectivelyequivalent,thatis, ,thesecurvesarereferredtoasconics,withno distinctionbetweenthedi nedasalocusofpointswithaconstantdistance fromthecenter,soaconicinprojectivegeomet ryisde nedasalocusofpointswithaconstantcrossrat iotofour xedpoints, nedwithrespecttoaninvariantoftheparticul argeometry,distanceinthecaseofEuclidean, :pTCp=0;orc11X2+c22Y2+c33W2+2c12XY+2c13X W+2c23YW=0;8wherepisa3 1vectorandCisasymmetric3 ,itisnotsurprisingthataconicisaself-dual ,itcanbeconsideredasalocusofpoints(asweh avejustdone),oritcanbeconsideredasanenve lopeoftangentlines(thesetoflinesthataret angenttotheconic).
9 TheequationfortheenvelopeoflinesisuTjCjC ,W=0,attwo ,notethatacircleisaconicwithallo -diagonalelements(c12,c13,andc23)settoze roandalldiagonalelementsequal:X2+Y2+W2=0 ;whichthereforeintersectstheideallineW=0 atX2+Y2=0:Thisequationhastwocomplexroots ,knownastheabsolutepoints:i=(1;i;0)andj= (1; i;0).(Althoughwehave,forsimplicity,assum edthathomogeneouscoordinatesarereal,they caningeneralbetheelementsofanycommutativ e eldinwhich1+16=0[1, ].)Itwillbeshowninthenexttwosubsectionst hattheabsolutepointsremaininvariantunder similaritytransformations, :p0= , ,sinceeachpointcontainstwoindependentval ues, ,wenotethatcollinearitymustbepreserved,t hatis,ifapointpliesonthelineu, ,pTu=0=(T 1p0)Tu=(p0)T(T Tu);whichindicatesthatu0=T Tu:Fromtheseresults,itisnothardtoshowtha tapointconicCtransformstoT TCT 1,andalineconicjCjC 1transformstoTjCjC ,recallthatprojective a ne similarity ' ,forreference:Tprojective=24t11t12t13t21 t22t23t31t32t3335:Thea ,a netransformationsmustpreservetheideallin eandtheidealpoints,thatis,anypoint[X;Y;0 ]Tmustbetransformedinto[ X; Y;0]Tforsomearbitraryscaling : 24XY035=T24XY035;whichimpliesthatt31=t32 = netransformation,then,isTaffine=24t11t12 t13t21t22t2300t3335.
10 Whereonceagainonlysixoftheseparametersar eindependent, netransformations, ,wesimplystatetheresult:Tsimilarity=24co s sin t13 sin cos t2300t3335;(3)where ,scaleisimportant,andthereforethepointpm ust x0y0 = cos sin sin cos xy + txty :Inclosingthissection,weo erone nalproposition,alongwithitsproof:Proposi tion1 Atransformationisasimilaritytransformati onifandonlyifitpreservestheabsolutepoint s,[1; i;0].The\onlyif"israthereasytosee:Theabs olutepoint[1; i;0]Tistransformedthroughequation(3)toth epointe i [1; i;0]T, \if"isalittlemorecomplicated, ,T=24t11t12t13t21t22t23t31t32t3335;thefa ctthat[1;i;0]Tispreservedyieldsthefollow ingtwoequations:t11+it12t21+it22=1it31+i t32=0:SincetheelementsofTareconstrainedt obereal,thisleadstothefollowingthreecon- straintsontheelementsofT:t11=t22t12= t21t31=t32=0:SothematrixofTlookslikethis :T=24t11t12t13 t12t11t2300t3335:Giventwoarbitrarynumber st11andt12,wecanalwaysreparameterizethem ast11=kcos andt12=ksin ,where (whichislegalbecauseweareworkinginhomoge neouscoordinates),wethengetT=24cos sin t13=k sin cos t23=k00t33=k35;whichisseentobetheequatio nofasimilaritytransformationwhencompared withequation(3).