Visualizing Quadratics 16-385 Computer Vision (Kris Kitani) Carnegie Mellon University
Equation of a circle 1 = x 2 + y 2 Equation of a ‘bowl’ (paraboloid) f ( x, y ) = x 2 + y 2 If you slice the bowl at f ( x, y ) = 1 what do you get?
Equation of a circle 1 = x 2 + y 2 Equation of a ‘bowl’ (paraboloid) f ( x, y ) = x 2 + y 2 If you slice the bowl at f ( x, y ) = 1 what do you get?
f ( x, y ) = x 2 + y 2 can be written in matrix form like this… ⇤ � � 1 0 x ⇥ f ( x, y ) = x y 0 1 y
2 1.5 1 0.5 y ⇤ 1 � x ⇥ x � 0 f ( x, y ) = 0 1 y -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 ‘sliced at 1’ -0.5 -1 -1.5 -2
What happens if you increase coefficient on x ? ⇤ � � 2 0 x ⇥ f ( x, y ) = x y 0 1 y and slice at 1
2 1.5 1 What happens if you increase coefficient on x ? 0.5 ⇤ � � 2 0 x ⇥ f ( x, y ) = x y 0 1 y -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 and slice at 1 -0.5 decrease width in x! -1 -1.5 -2
2 1.5 1 What happens if you increase coefficient on x ? 0.5 ⇤ � � 2 0 x ⇥ f ( x, y ) = x y 0 1 y -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 and slice at 1 -0.5 decrease width in x! -1 What happens to the gradient in x ? -1.5 increases gradient in x ‘thins the bowl in x’ -2
What happens if you increase coefficient on y ? ⇤ � � 1 0 x ⇥ f ( x, y ) = x y 0 2 y and slice at 1
2 1.5 1 decrease width in y What happens if you increase coefficient on y ? 0.5 ⇤ � � 1 0 x ⇥ f ( x, y ) = x y 0 2 y -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 and slice at 1 -0.5 -1 -1.5 -2
2 1.5 1 decrease width in y What happens if you increase coefficient on y ? 0.5 ⇤ � � 1 0 x ⇥ f ( x, y ) = x y 0 2 y -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 and slice at 1 -0.5 -1 What happens to the gradient in y ? -1.5 -2
2 1.5 1 decrease width in y What happens if you increase coefficient on y ? 0.5 ⇤ � � 1 0 x ⇥ f ( x, y ) = x y 0 2 y -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 and slice at 1 -0.5 -1 What happens to the gradient in y ? -1.5 increases gradient in y ‘thins the bowl in y’ -2
f ( x, y ) = x 2 + y 2 can be written in matrix form like this… y ⇤ 1 � x ⇥ x � 0 f ( x, y ) = 0 1 y What’s the shape? What are the eigenvectors? What are the eigenvalues?
f ( x, y ) = x 2 + y 2 can be written in matrix form like this… y ⇤ 1 � x ⇥ x � 0 f ( x, y ) = 0 1 y Result of Singular Value Decomposition (SVD) eigenvalues eigenvectors along diagonal 1 1 � 1 � 1 � > � 0 0 0 0 = 0 1 0 1 0 1 0 1 gradient of the axis of the quadratic along ‘ellipse slice’ the axis
Eigenvectors Eigenvalues T 1 0 1 0 1 0 1 0 Eigenvectors & # & # & # & # A = = $ ! $ ! $ ! $ ! 0 1 0 1 0 1 0 1 % " % " % " % " *not the size of the axis Eigenvector Eigenvector y x y x
Recall: y ⇤ 1 � x ⇥ x � 0 f ( x, y ) = 0 1 y you can smash this bowl in the y direction y ⇤ 1 � x ⇥ x � 0 f ( x, y ) = 0 4 y you can smash this bowl in the x direction y ⇤ 4 � x ⇥ x � 0 f ( x, y ) = 0 1 y
Eigenvalues T 4 0 1 0 4 0 1 0 & # & # & # & # A = = $ ! $ ! $ ! $ ! 0 1 0 1 0 1 0 1 % " % " % " % " Eigenvectors Eigenvectors *not the size of the axis (inverse relation) Eigenvector y Eigenvector x y x
Eigenvalues T 3 . 25 1 . 30 0 . 50 0 . 87 1 0 0 . 50 0 . 87 − − & # & # & # & # A = = $ ! $ ! $ ! $ ! 1 . 30 1 . 75 0 . 87 0 . 50 0 4 0 . 87 0 . 50 − − − − % " % " % " % " Eigenvectors Eigenvectors Eigenvector Eigenvector
Eigenvalues T 7 . 75 3 . 90 0 . 50 0 . 87 1 0 0 . 50 0 . 87 − − & # & # & # & # A = = $ ! $ ! $ ! $ ! 3 . 90 3 . 25 0 . 87 0 . 50 0 10 0 . 87 0 . 50 − − − − % " % " % " % " Eigenvectors Eigenvectors Eigenvector Eigenvector
We will need this to understand… Error function (for Harris corners) The surface E ( u , v ) is locally approximated by a quadratic form
Conic section of Error function Since M is symmetric, we have We can visualize M as an ellipse with axis lengths determined by the eigenvalues and orientation determined by R direction of the fastest change (larger gradient) Ellipse equation: but smaller axis on ‘slice’ u direction of the ⇥ u � slowest change ( λ max ) -1/2 v ⇤ M = 1 (smaller gradient) ( λ min ) -1/2 v but larger axis on ‘slice’ ‘isocontour’
Recommend
More recommend