!"#$%&'()(!"##$%&'(&')*+&'*',*-&.*'/)*/'0%'"1&.3$013'*'#".&45'/.*1%4*/0$1*4'-$/0$16'*1'/)*/' /)&',*-&.*6'(0/)'*'7$,*4'4&13/)'$7'8996'0%'-$+013'(0/)'+&4$,0/5'' :;6<6=>'?':@96'A96'B9>C' *>'D&1&.*4456'()*/'0%'/)&'7$,"%'$7'&E#*1%0$1'7$.'*'-$+013',*-&.*F' G>'=)*/'0%'/)&'4$,*/0$1'$7'/)&'7$,"%'$7'&E#*1%0$1'7$.'/)0%'#*./0,"4*.'-$/0$1F'',>'=)*/'0%'/)&'#*//&.1'$7'/)&'$#/0,*4'74$('+&,/$.%'7$.'/)0%'/5#&'$7'-$/0$1F' >'=)*/'0%'/)&'*#&./".&'#.$G4&-'01',$-#"/013'$#/0,*4'74$(F'H$('0%'0/'.&4*/&'/$'/)&' 401&*.',$1%/.*01/'$1'$#/0,*4'74$(':IG.03)/1&%%',$1%/.*01/I>'&/&.-01&'G5'/)&'077&.&1/0*4' /&,)10J"&'7$.',$-#"/013'74$(F Answer: a) Refer o slides 7 and 8 of lecure. For image flow caused by rigid moion of he scene or camera he moion field in he image can be wrien as U + W ur u = + αy β ( + 1) + γy = + uro V + yw vr v = + α ( y + 1) βy γ = + vro where he erms are as described in class Observing he epression for he ranslaional porion of he flow, we see ha i can be wrien as he focus of epansion or conracion is he poin ( 0,y 0 ) from which he flow vecors due o he ur W W = ( 0), ( y y0) U V where ( 0, y0) = f, f is he focus of epansion (FOE) or focus of conracion (FOC). W W ranslaional componen of a rigid moion appear o originae. b) For his paricular moion we have U V 0 30 ( 0, y0) = f, f =.100,.100 =( 40, 60) W W 50 50 c) he paern of flow vecors for his moion is radially ouwards from he focus of epansion. d) he aperure consrain refers o he fac ha when flow is compued for a poin ha lies along a linear feaure, i is no possible o deermine he eac locaion of he corresponding poin in he second image. hus, i is only possible o deermine he flow ha is normal o he linear feaure. he linear consrain on flow is derived by assuming ha he brighness of a piel is consan. his equaion resrics he flow o lie along a line in velociy space. Again, i is a manifesaion of he problem ha i is possible o only deermine he normal componen of he flow. Problem : K$1/$".%'$7'-*E0-"-'.*/&'$7',)*13&'01'*1'0-*3&',*1'G&'7$"1'G5'4$,*/013'0.&,/0$1*4' -*E0-*'01'/)&'3.*0&1/'-*310/"&'$7'/)&'0-*3&'$.':*4-$%/>'&J"0+*4&1/456'G5'701013' L&.$M,.$%%013%'01'/)&'N*#4*,0*1'$7'/)&'0-*3&C'
:*>'=)5'0%'0/',$1%0&.&'0-#$./*1/'/$',$1+$4+&'/)&'0-*3&'(0/)'*'D*"%%0*1'G&7$.&',$-#"/013'/)&'N*#4*,0*1F' Images aken via cameras/ccds ofen have noise. In addiion, an image may have many feaures ha would lead o edges. he operaion of aking derivaives via finie differences leads o an increase in he noisiness of he image. Using a smoohing filer such as a Gaussian, blurs edges, hereby suppresses he local edges and reaining only he prominen ones. ' :G>' O&,*"%&',$1+$4"/0$1' *1' /)&' N*#4*,0*1' $#&.*/$.' *.&' G$/)' 401&*.6',$1+$4+013' /)&' 0-*3&'(0/)'*'D*"%%0*1'*1'/)&1'/*P013'/)&'N*#4*,0*16': :DQR>>6'0%'&E*,/45'&J"0+*4&1/'/$' /*P013'/)&'N*#4*,0*1'$7'/)&'%*-&'D*"%%0*1'*1'/)&1',$1+$4+013'/)*/'(0/)'/)&'0-*3&6' : D>QRC'=)5'$&%'/)&'%&,$1'7$.-"4*/0$1'4&*'/$'*'-$.&'&770,0&1/'0-#4&-&1/*/0$1F'' o perform he former operaion we would have o apply he filer o he image via a discree convoluion, and hen apply he discree Laplacian operaor o he image. However, we can precompue he acion of he Laplacian on he Gaussian, and apply only one filer o he image, hereby improving he efficiency. :,>'S)&'N*#4*,0*1'$7'*'D*"%%0*1',*1'G&'*##.$E0-*/&'G5'/)&'077&.&1,&'$7'/($'D*"%%0*1' P&.1&4%'(0/)'*##.$#.0*/&45',)$%&1'%/*1*.'&+0*/0$1%C'%'*'.&%"4/6'%)$('/)*/'/)&',$-#"/*/0$1',*1'G&'0-#4&-&1/&'*%': D>QR' 'D QR'MD QR' o show ha Laplacian of he Gaussian can be wrien as G 1 *I-G *I, we can wrie his equaion can be approimaed by he difference of wo Gaussians wih appropriaely chosen sandard deviaions See hp://www.dai.ed.ac.uk/cvonline/local_copies/owens/lec6/node.hml for a discussion. (d) Why is he difference of Gaussians implemenaion even more efficien han he ( G)*I Laplacian of Gaussian implemenaion? Gaussians are separable and can be implemened as wo 1-D kernels ec. Problem 3. ~ (a) he general camera mari is P = K R[ I - C] where C ~ is he posiion of he camera cener in scene coordinaes. Here he scene coordinaes are he camera coordinaes for he firs camera posiion. is he ranslaion of he camera cener from is original posiion o is second posiion in scene coordinaes. herefore, = CC = C ~. For pure ranslaion, he roaion R is he ideniy mari. herefore he camera mari in his case is P = K [I -]. (b) Fundamenal mari as funcion of epipole. + One form of he fundamenal mari is F = [e'] X P' P. For his problem, we have P = K [I 0] and P = K [I -]. Firs, we calculae
K 1 - -1 We have. P = [K 0], herefore P = and P P = KK, so ha (P P ) = K K 0 3 - -1-1 -1 + K - -1 K K K K + K herefore P = K K = = and P' P = [ K - K ] I = 03 03 03 0 3 Going back o he epression of F, his epression is reduced o F = [e'] X (c) he epipolar line of is l' = [e'] X. We wan o show ha is on l, i.e ha l =0. his is he case because [e'] X = 0, a propery resuling from he fac ha [e'] is X skew symmeric (Fundamenal mari, slide 10). (d) If he camera ranslaion is parallel o he -ais, hen e = (1, 0, 0). hen 0 0 0 F = 0 0-1 0 1 0 F = [e'] X becomes Problem 4: ~ (a) As saed above, he general camera mari is P = K R[ I - C] where C ~ is he posiion of he camera cener in scene coordinaes. Here he scene coordinaes are he camera coordinaes for he firs camera posiion. is he ranslaion of he camera cener from is original posiion o is second posiion in scene coordinaes. herefore, = CC = C ~. Using from now on, and he fac ha here K = I, we have for he second camera posiion P' = R[ I - ] = [R - R]. he column R gives he componens of he iniial camera cener C in he new camera coordinae c 0 s sysem. he roaion mari is R = 0 1 0, herefore he coordinaes of he iniial camera s 0 c c s cener C in he new camera coordinae sysem is 0. he camera mari P is + s c c 0 s c s P' = 0 1 0 0 s 0 c s c X u 1 0 0 0 (b) We wrie v = 0 1 0 0 for he firs camera, and w 0 0 1 0 1
X u' c 0 s c s = v' 0 1 0 0 for he second camera. he condiions for ero dispariy w' s 0 c s c 1 are =, and y = y, i.e. u/w = u /w and v/w = v /w. X cx + s c s he firs condiion can be wrien = and he second condiion is sx + c + s c = sx + c + s c. he firs condiion leads o X + X ( ' ) ( ' ) = 0, where =c/s ( is he coangen of he angle of roaion). he second condiion leads o ( sx + ( c 1) + s c ) = 0, anoher quadraic equaion (c) he firs condiion is X + X ( ' ) ( ' ) = 0. I is a 3D surface. Is inersecion wih any horional plane = k is a circle, because he equaion of he inersecion is of he form (X-a) + (-b) = R, where a and b are he coordinaes of he cener of he circle and R is is radius. herefore he surface is a cylinder of revoluion. he second condiion leads o ( sx + ( c 1) + s c ) = 0, i.e. eiher =0, or sx + c + s c = 0, which are he equaions of wo planes, he horional plane and a verical plane. herefore, he locus of poins wih ero dispariy is defined by wo surface inersecions: he inersecion of he cylinder by he horional plane, and he inersecion of he cylinder by he verical plane. he firs inersecion defines a circle in he horional plane of he camera ceners. he second inersecion defines wo verical lines. herefore, he locus of poins wih ero dispariy is defined by he inersecion of he cylinder and he horional plane, or by he inersecion of he cylinder and a verical plane. he equaion of he circle is X + X ( ' ) ( ' ) = 0. he coordinaes of he cener of he circle are ( - )/ and ( + )/. he circle passes hrough a specific poin if he coordinaes of ha poin saisfy is equaion. One verifies ha he circle passes hrough he camera cener C (of coordinaes (0,0)), he camera cener C (of coordinaes (, 0, )), and also he poin of inersecion of he opical aes, (0, + ). I also passes hrough he inersecion of he -aes of he camera coordinae sysems ( -, 0). he verical plane sx + ( c 1) + s c = 0 can be verified o also pass hrough he inersecion of he -aes of he camera coordinae sysems ( -, 0). herefore, ha poin belongs o he verical line ha is he inersecion of he verical plane wih he cylinder. However, ha line is no visible, because i is behind boh image planes (i is he inersecion of he planes defined by he and y aes of each camera).
o find he second inersecion beween he circle and he line sx + ( c 1) + s c = 0 in he plane =0, we do a change of coordinaes o place he origin of he scene a he firs inersecion in order o simplify he equaion of he line. he old coordinaes (X, ) in relaion o he new ones (X, ) are X=X + -, =. he equaion of he circle becomes X ' + ' + X '( ' ) '( ' ) = 0 and he equaion of he line becomes sx ' = ( c 1) '. Plugging his value of X ino he equaion of he circle, we find s ( c +1) ( c + 1) + s X = and = s s Looking a simple configuraions of cameras, we infer ha his poin also happens o be he inersecion beween a line perpendicular o he ranslaion vecor a is midpoin and he circle (his line also goes hrough he cener of he circle). o verify his, we wrie he equaion of such a line: X ( ) / = 0 and we find ha indeed our second inersecion belongs o his line. Since we know i belongs o he circle i is a he inersecion of his line and he circle. o check ha his inersecion is visible from boh cameras, we would have o check ha for each camera i is on he side of he image plane ha does no conain he image cener. Problem 6: U&,*44'/)&'&7010/0$1'$7'*1'&03&1+*4"&'*1'*1'&03&1+&,/$.'*+?λ+C'=&',*1'&701&'' ' f ( ) = A C'' D0+&1' *' -*/.0E' *6'(&',*1'+0&('7:+>'*%'*'%,*4*.'+*4"&'7"1,/0$1'$7'+C:S)0%'7"1,/0$1'0%',*44&'/)&'U*54&03)'J"$/0&1/'01'/)&'40/&.*/".&C>'',-'!)$('/)*/'%/*/0$1*.5'#$01/%'$7'/)&'7':+>'(0/)'.&%#&,/'/$'+'*.&'&03&1+&,/$.%'$7'*6'*1' /)*/'/)&',$..&%#$1013'+*4"&%'$7'7':+>'*.&'&03&1+*4"&%C'' f = 0 o deermine he saionary poins we need o find locaions where. his is mos convenienly done using he summaion convenion. his yields ( )( δ A + Aδ ) ( A )( δ ) f A = = = i ij j l l ki ij j i ij kj i ij j l kl k l l ( l l) ( )( A + A ) ( A )( ) l l kj j i ik i ij j k ( ) l l We are looking for nonrivial soluions. So we wan ( l l)( Akjj + A i ik) = ( A i ij j)( k) 1 A i ij j ( A kj j + A i ik ) = k l l Puing his in mari noaion 1 A ( A + A) = Using he fac ha A is symmeric
A A = Comparing wih eigenvalue relaion we see ha a he saionary poin of f() we saisfy he eigenvalue relaion wih he eigenvalues given by he value of f() and he eigenvecor. ' $-'=.0/&'*'7"1,/0$1'/)*/'.&/".1%'/)&'U*54&03)'J"$/0&1/'$7'*'@'G5'@'-*/.0E'*6' 30+&1' *' 3 3 +&,/$.'+C''S&%/'5$".',$&'"%013'/)&'%J"*.&'-*/.0E'' A = C;%&' /)&' V*/4*G' 3 3 '&./'7"1,/0$1'/$'#4$/'/)&'1&3*/0+&'$7'/)&'U*54&03)'J"$/0&1/6''W7:+>6''()&.&'+'0%'/)&'@X' +&,/$.'E 6'E ['(0/)',$-#$1&1/'+*4"&%'01'/)&'.*13&'W8CB' 'E 6'E ' '8CB':\$"'-*5'(*1/' /$'*+$0'/)&'.&30$1'*.$"1':969>'G5',)$$%013'5$".'#$01/%']"0,0$"%45>C' A possible implemenaion ha uses a global variable o pass he mari is shown below. funcion lam=lambda() global aglobal A=aglobal; 1=A*; lam='*1; if(lam>=1.e-15) lam=lam/('*); else lam=1.; end lam=-lam; his funcion can be called wih a scrip such as global aglobal 1=-1.5:0.03:1.5; ima=ma(sie(1)); =-1.5:0.03:1.5; b=sqr(3) a=[3 b; b 3]; aglobal=a; lam=eros(ima); for i=1:ima =1(i); for j=1:ima y=(j); v=[,y]'; lam(i,j)=lambda(v); end end mesh(1,,lam); (noe: his surface is acually he negaive of wha I asked bu i is accepable)
0-'^01'/)&'',+1''($7'/)0%'7"1,/0$1'"%013'/)&'V*/4*G'7"1,/0$1'3'14.&,"0/C' K$-#*.&'/)&'+*4"&%'5$"'$G/*01'7$.'/)&'&03&1+&,/$.'*1'&03&1+*4"&'"%013'/)&'V*/4*G' 7"1,/0$1'&15C'.&'/)&'+*4"&%'077&.&1/F'=)5F' Adding he line fminsearch('lambda',[0.4 0.1]') o he scrip above does he job. he resul I go is Ans = 0.1553 0.1553 Obaining he resul via he Malab buil in funcion eig, I obain. [v,d]=eig(a) v = 0.7071 0.7071-0.7071 0.7071 d = 1.679 0 0 4.731 he eigenvalue obained is he same, bu he eigenvecor is differen. In general, since eigenvecors are no unique. his is because, if is an eigenvecor, so is s, for s any nonero scalar. (you can observe his in he figure in 6b boh he ma and he min lie on a ridge).