Lecture 8 Wrp-up Prt1, Mtlb
Homework Polic Plese stple our homework (ou will lose 10% credit if not stpled or secured) Submit ll problems in order. This mens to plce ever item relting to problem 3 (our writeup, code, figures, etc.) before nthing relting to problem 4. Preferred order would be writeup, then figures (if seprte), nd finll code, but we won't be pick bout this. The sme philosoph pplies to multi-prt questions. Submit ll prts of 3() before n prts of 3(b). (We relize there will be situtions is which, for emple, ou write code which is used in severl problems. In this cse, plce the code in the section of the first problem in which it is used.)
Spots nd Oriented Brs (Mlik nd Peron)
Gbor Filters Gbor filters t different scles nd sptil frequencies top row shows nti-smmetric (or odd) filters, bottom row the smmetric (or even) filters. cos( k 2 + + k )ep 2σ 2 2
Gbor filters re emples of Wvelets We know two bses for imges: Piels re loclized in spce. Fourier re loclized in frequenc. Wvelets re little of both. Good for mesuring frequenc locll.
Snthesis with this Representtion (Bergen nd Heeger)
Mrkov Model Cptures locl dependencies. Ech piel depends on neighborhood. Emple, 1D first order model P(p1, p2, pn) = P(p1)*P(p2 p1)*p(p3 p2,p1)* = P(p1)*P(p2 p1)*p(p3 p2)*p(p4 p3)*
Emple 1 st Order Mrkov Model Ech piel is like neighbor to left + noise with some probbilit. Mtlb These cpture much wider rnge of phenomen.
Edge There re dependencies in Filter Outputs Filter responds t one scle, often does t other scles. Filter responds t one orienttion, often doesn t t orthogonl orienttion. Snthesis using wvelets nd Mrkov model for dependencies: DeBonet nd Viol Portill nd Simoncelli
We cn do this without filters Ech piel depends on neighbors. 1. As ou snthesize, look t neighbors. 2. Look for similr neighborhood in smple teture. 3. Cop piel from tht neighborhood. 4. Continue.
This is like coping, but not just repetition Photo Pttern Repeted
With Blocks
Mtlb tutoril nd Liner Algebr Review Tod s gols: Lern enough mtlb to get strted. Review some bsics of Liner Algebr Essentil for geometr of points nd lines. But lso, ll mth is liner lgebr. (ok slight eggertion however most computtion is) Mn slides tod dpted from Octvi Cmps, Penn Stte.
Strting Mtlb For PCs, Mtlb should be progrm. For Sun s: Numericl Anlsis nd Visuliztion Mtlb 6.1
Help help helpcommnd Eg., help plus Help on toolbr demo Tutoril: http://mth.colordo.edu/scico/tutorils/mtlb/
Mtlb interpreter Mn common functions: see help ops
Ordered set of numbers: (1,2,3,4) Emple: (,,z) coordintes of pt in spce. Vectors v = v = ( 1, n i= 1, K, 2 If v = 1, v is i 2 n ) unit vector
Indeing into vectors
Vector Addition v + w = ( 1, 2) + ( 1, 2) = ( 1 + 1, 2 + 2) v V+w w
Product of sclr nd vector v = ( 1, 2) = ( 1, 2) v v
Opertions on vectors sum m, min, men, sort, Pointwise:.^
Inner (dot) Product v α w v. w = ( + 1, 2).( 1, 2) = 1 1 2. 2 The inner product is SCALAR! v. w = 2 ( 1, 2).( 1, ) = v w cosα v. w = 0 v w
Mtrices A n m = M n 11 21 31 1 12 22 32 M n2 L L L O L 1m 2m 3m M nm Sum: C n m = An m + Bn m c = + ij ij A nd B must hve the sme dimensions b ij
Mtrices Product: C n p = An mbm p m c ij = k = 1 ik b kj A nd B must hve comptible dimensions A n nbn n Bn n An n Identit Mtri: 1 0 O 0 0 1 O 0 I = IA = AI = O O O O 0 0 O 1 A
Mtrices Trnspose: T C m n = A n m c = ij ji ( T T A + B) = A + ( T T AB ) = B A T B T If A T = A A is smmetric
Mtrices Determinnt: Determinnt: A must be squre A must be squre 32 31 22 21 13 33 31 23 21 12 33 32 23 22 11 33 32 31 23 22 21 13 12 11 det + = 12 21 22 11 22 21 12 11 22 21 12 11 det = =
Mtrices Inverse: A must be squre 1 1 An n A n n = A n n An n = I 1 11 12 1 21 22 = 11 22 21 12 22 21 11 12
Indeing into mtrices
Eucliden trnsformtions
2D Trnsltion P t P
2D Trnsltion Eqution t P t P P = (, ) t = ( t, t ) t P ' = ( + t, + t ) = P+ t
2D Trnsltion using Mtrices P t t P t ), ( ), ( t t = = t P = + + 1 1 0 0 1 ' t t t t P t P
Scling P P
Scling Eqution P s. s. P s. s. ), ( ' ), ( s s = = P P P P '= s = s s s s 0 0 P' S P S P = '
Rottion P P
Rottion Equtions Counter-clockwise rottion b n ngle θ Y P X θ P ' ' cosθ = sinθ P'= R.P sinθ cosθ
Degrees of Freedom ' ' = R is 22 cosθ sinθ sinθ cosθ 4 elements BUT! There is onl 1 degree of freedom: θ The 4 elements must stisf the following constrints: R R T = R T R = I det( R) = 1
Stretching Eqution P S.. P S.. = s s s s 0 0 P' ), ( ' ), ( s s = = P P S P S P = '
Stretching = tilting nd projecting (with wek perspective) = = s s s s s s s 1 0 0 0 0 P'
Liner Trnsformtion = = s s s s s d c b ϕ ϕ ϕ ϕ θ θ θ θ ϕ ϕ ϕ ϕ θ θ θ θ sin cos cos sin 1 0 0 sin cos cos sin sin cos cos sin 0 0 sin cos cos sin P' SVD
Affine Trnsformtion P' c b d t t 1
Files
Functions Formt: function o = test(,) Nme function nd file the sme. Onl first function in file is visible outside the file.
Imges
Debugging Add print sttements to function b leving off ; kebord debug nd brekpoint
Conclusions Quick tour of mtlb, ou should tech ourself the rest. We ll give hints in problem sets. Liner lgebr llows geometric mnipultion of points. Lern to love SVD.