X hits on this document

35 views

0 shares

0 downloads

0 comments

5 / 13

Photoshop version (perspective crop)

  • +

    you control reflection and perspective independently

Least Squares Example

  • Say we have a set of data points (X1,X1’), (X2,X2’), (X3,X3’),

etc. (e.g. person’s height vs. weight)

  • We want a nice compact formula (line) to predict X’s from Xs:

Xa + b = X’

  • We want to find a and b

  • How many (X,X’) pairs do we need?

X1a + b = X X 2a + b = X

' 1

' 2

2 1 X X

1 1 b a

=

' 2 ' 1 X X

Ax=B

  • What if the data is noisy?

... 3 1 X X2 X

. . . 1 1 1 b a

=

. . . 3 2 1 X X X

min Ax B

2

overconstrained

Solving for homographies

p = Hp

w w y ' w x '

d = g a

b e h

1 y x i f c

  • Can set scale factor i=1. So, there are 8 unkowns.

  • Set up a system of linear equations:

  • Ah = b

  • where vector of unknowns h = [a,b,c,d,e,f,g,h]T

  • Need at least 8 eqs, but the more the better…

S o l v e f o r h . I f o v e r c o n s t r a i n e d , s o l v e u s i n g l e a s t - s q u a r e s : min Ah b 2

  • Can be done in Matlab using “\” command

  • see “help lmdivide”

Back to Image rectification

p

p

To unwarp (rectify) an image

  • Find the homography H given a set of p and p pairs

  • How many correspondences are needed?

  • Tricky to write H analytically, but we can solve for it!

    • Find such H that “best” transforms points p into p’

    • Use least-squares!

Solving for homographies

p = Hp

w w y ' w x '

d = g a

b e h

1 y x i f c

  • Can set scale factor i=1. So, there are 8 unkowns.

  • Set up a system of linear equations:

  • Ah = b

  • where vector of unknowns h = [a,b,c,d,e,f,g,h]T

  • Note: we do not know w but we can compute it from x & y

w=gx+hy+1

  • The equations are linear in the unknown

Panoramas

  • 1.

    Pick one image (red)

  • 2.

    Warp the other images towards it (usually, one by

one) 3. blend

5

Document info
Document views35
Page views35
Page last viewedTue Dec 06 12:39:37 UTC 2016
Pages13
Paragraphs605
Words2308

Comments