6.1 visualizing quadratics

21
Visualizing Quadratics 16-385 Computer Vision (Kris Kitani) Carnegie Mellon University

Upload: others

Post on 13-Nov-2021

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 6.1 Visualizing Quadratics

Visualizing Quadratics16-385 Computer Vision (Kris Kitani)

Carnegie Mellon University

Page 2: 6.1 Visualizing Quadratics

f(x, y) = x

2 + y

2

1 = x

2 + y

2

Equation of a circle

Equation of a ‘bowl’ (paraboloid)

If you slice the bowl atf(x, y) = 1

what do you get?

Page 3: 6.1 Visualizing Quadratics

f(x, y) = x

2 + y

2

1 = x

2 + y

2

Equation of a circle

Equation of a ‘bowl’ (paraboloid)

If you slice the bowl atf(x, y) = 1

what do you get?

Page 4: 6.1 Visualizing Quadratics

f(x, y) = x

2 + y

2

can be written in matrix form like this…

f(x, y) =⇥x y

⇤ 1 00 1

� x

y

Page 5: 6.1 Visualizing Quadratics

-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5

-2

-1.5

-1

-0.5

0.5

1

1.5

2

f(x, y) =⇥x y

⇤ 1 00 1

� x

y

‘sliced at 1’

Page 6: 6.1 Visualizing Quadratics

f(x, y) =⇥x y

⇤ 2 00 1

� x

y

What happens if you increase coefficient on x?

and slice at 1

Page 7: 6.1 Visualizing Quadratics

-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5

-2

-1.5

-1

-0.5

0.5

1

1.5

2

f(x, y) =⇥x y

⇤ 2 00 1

� x

y

What happens if you increase coefficient on x?

and slice at 1decrease width in x!

Page 8: 6.1 Visualizing Quadratics

-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5

-2

-1.5

-1

-0.5

0.5

1

1.5

2

f(x, y) =⇥x y

⇤ 2 00 1

� x

y

What happens if you increase coefficient on x?

and slice at 1decrease width in x!

What happens to the gradient in x?

increases gradient in x‘thins the bowl in x’

Page 9: 6.1 Visualizing Quadratics

f(x, y) =⇥x y

⇤ 1 00 2

� x

y

What happens if you increase coefficient on y?

and slice at 1

Page 10: 6.1 Visualizing Quadratics

f(x, y) =⇥x y

⇤ 1 00 2

� x

y

What happens if you increase coefficient on y?

and slice at 1

-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5

-2

-1.5

-1

-0.5

0.5

1

1.5

2

decrease width in y

Page 11: 6.1 Visualizing Quadratics

f(x, y) =⇥x y

⇤ 1 00 2

� x

y

What happens if you increase coefficient on y?

and slice at 1

-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5

-2

-1.5

-1

-0.5

0.5

1

1.5

2

decrease width in y

What happens to the gradient in y?

Page 12: 6.1 Visualizing Quadratics

f(x, y) =⇥x y

⇤ 1 00 2

� x

y

What happens if you increase coefficient on y?

and slice at 1

-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5

-2

-1.5

-1

-0.5

0.5

1

1.5

2

decrease width in y

What happens to the gradient in y?

increases gradient in y‘thins the bowl in y’

Page 13: 6.1 Visualizing Quadratics

f(x, y) = x

2 + y

2

can be written in matrix form like this…

f(x, y) =⇥x y

⇤ 1 00 1

� x

y

What’s the shape? What are the eigenvectors? What are the eigenvalues?

Page 14: 6.1 Visualizing Quadratics

f(x, y) = x

2 + y

2

can be written in matrix form like this…

f(x, y) =⇥x y

⇤ 1 00 1

� x

y

1 00 1

�=

1 00 1

� 1 00 1

� 1 00 1

�>eigenvalues

along diagonaleigenvectors

Result of Singular Value Decomposition (SVD)

axis of the ‘ellipse slice’

gradient of the quadratic along

the axis

Page 15: 6.1 Visualizing Quadratics

T

!"

#$%

&!"

#$%

&!"

#$%

&=!

"

#$%

&=

1001

1001

1001

1001

A

EigenvaluesEigenvectors

Eigenvectors

Eigenvector

Eige

nvec

tor

x yx

y

*not the size of the axis

Page 16: 6.1 Visualizing Quadratics

f(x, y) =⇥x y

⇤ 1 00 1

� x

y

you can smash this bowl in the y direction

f(x, y) =⇥x y

⇤ 1 00 4

� x

y

you can smash this bowl in the x direction

f(x, y) =⇥x y

⇤ 4 00 1

� x

y

Recall:

Page 17: 6.1 Visualizing Quadratics

T

!"

#$%

&!"

#$%

&!"

#$%

&=!

"

#$%

&=

1001

1004

1001

1004

AEigenvalues

Eigenvectors Eigenvectors

Eigenvector

Eige

nvec

tor

x yx

y

*not the size of the axis (inverse relation)

Page 18: 6.1 Visualizing Quadratics

T

!"

#$%

&

−−

−!"

#$%

&!"

#$%

&

−−

−=!

"

#$%

&=

50.087.087.050.0

4001

50.087.087.050.0

75.130.130.125.3

A

Eigenvalues

Eigenvectors Eigenvectors

Eige

nvec

tor

Eigenvector

Page 19: 6.1 Visualizing Quadratics

T

!"

#$%

&

−−

−!"

#$%

&!"

#$%

&

−−

−=!

"

#$%

&=

50.087.087.050.0

10001

50.087.087.050.0

25.390.390.375.7

A

Eigenvalues

Eigenvectors Eigenvectors

Eige

nvec

tor

Eigenvector

Page 20: 6.1 Visualizing Quadratics

Error function (for Harris corners)

The surface E(u,v) is locally approximated by a quadratic form

We will need this to understand…

Page 21: 6.1 Visualizing Quadratics

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 slowest change (smaller gradient)

direction of the fastest change (larger gradient)

(λmax)-1/2(λmin)-1/2

Ellipse equation:⇥u v

⇤M

uv

�= 1

‘isocontour’

but smaller axis on ‘slice’

but larger axis on ‘slice’