36
Single View Metrology Class 3

Single View Metrology Class 3

  • Upload
    erling

  • View
    99

  • Download
    4

Embed Size (px)

DESCRIPTION

Single View Metrology Class 3. 3D photography course schedule (tentative). Single View Metrology. Measuring in a plane. Need to compute H as well as uncertainty. Direct Linear Transformation (DLT). Direct Linear Transformation (DLT). Equations are linear in h. - PowerPoint PPT Presentation

Citation preview

Page 1: Single View Metrology Class 3

Single View MetrologyClass 3

Page 2: Single View Metrology Class 3

3D photography course schedule(tentative)

Lecture Exercise

Sept 26 Introduction -

Oct. 3 Geometry & Camera model Camera calibration

Oct. 10 Single View Metrology Measuring in images

Oct. 17 Feature Tracking/matching(Friedrich Fraundorfer)

Correspondence computation

Oct. 24 Epipolar Geometry F-matrix computation

Oct. 31 Shape-from-Silhouettes(Li Guan)

Visual-hull computation

Nov. 7 Stereo matching Project proposals

Nov. 14 Structured light and active range sensing

Papers

Nov. 21 Structure from motion Papers

Nov. 28 Multi-view geometry and self-calibration

Papers

Dec. 5 Shape-from-X Papers

Dec. 12 3D modeling and registration Papers

Dec. 19 Appearance modeling and image-based rendering

Final project presentations

Page 3: Single View Metrology Class 3

Single View Metrology

Page 4: Single View Metrology Class 3

Measuring in a plane

Need to compute H as well as uncertainty

Page 5: Single View Metrology Class 3

Direct Linear Transformation(DLT)

ii Hxx 0Hxx ii

i

i

i

i

xh

xh

xh

Hx3

2

1

T

T

T

iiii

iiii

iiii

ii

yx

xw

wy

xhxh

xhxh

xhxh

Hxx12

31

23

TT

TT

TT

0

h

h

h

0xx

x0x

xx0

3

2

1

TTT

TTT

TTT

iiii

iiii

iiii

xy

xw

yw

Tiiii wyx ,,x

0hA i

Page 6: Single View Metrology Class 3

Direct Linear Transformation(DLT)

• Equations are linear in h

0

h

h

h

0xx

x0x

xx0

3

2

1

TTT

TTT

TTT

iiii

iiii

iiii

xy

xw

yw

0AAA 321 iiiiii wyx

0hA i• Only 2 out of 3 are linearly independent

(indeed, 2 eq/pt)

0

h

h

h

x0x

xx0

3

2

1

TTT

TTT

iiii

iiii

xw

yw

(only drop third row if wi’≠0)• Holds for any homogeneous

representation, e.g. (xi’,yi’,1)

Page 7: Single View Metrology Class 3

Direct Linear Transformation(DLT)

• Solving for H

0Ah 0h

A

A

A

A

4

3

2

1

size A is 8x9 or 12x9, but rank 8

Trivial solution is h=09T is not interesting

1-D null-space yields solution of interestpick for example the one with 1h

Page 8: Single View Metrology Class 3

Direct Linear Transformation(DLT)

• Over-determined solution

No exact solution because of inexact measurementi.e. “noise”

0Ah 0h

A

A

A

n

2

1

Find approximate solution- Additional constraint needed to avoid 0, e.g.

- not possible, so minimize

1h Ah0Ah

Page 9: Single View Metrology Class 3

DLT algorithmObjective

Given n≥4 2D to 2D point correspondences {xi↔xi’}, determine the 2D homography matrix H such that xi’=Hxi

Algorithm

(i) For each correspondence xi ↔xi’ compute Ai. Usually only two first rows needed.

(ii) Assemble n 2x9 matrices Ai into a single 2nx9 matrix A

(iii) Obtain SVD of A. Solution for h is last column of V

(iv) Determine H from h

Page 10: Single View Metrology Class 3

Importance of normalization

0

h

h

h

0001

1000

3

2

1

iiiiiii

iiiiiii

xyxxxyx

yyyxyyx

~102 ~102 ~102 ~102 ~104 ~104 ~10211

orders of magnitude difference!

Monte Carlo simulation for identity computation based on 5 points

(not normalized ↔ normalized)

Page 11: Single View Metrology Class 3

Normalized DLT algorithmObjective

Given n≥4 2D to 2D point correspondences {xi↔xi’}, determine the 2D homography matrix H such that xi’=Hxi

Algorithm

(i) Normalize points

(ii) Apply DLT algorithm to

(iii) Denormalize solution

,x~x~ ii inormiinormi xTx~,xTx~

norm-1

norm TH~

TH

1

norm

100

2/0

2/0

T

hhw

whw

Page 12: Single View Metrology Class 3

Geometric distancemeasured coordinatesestimated coordinatestrue coordinates

xxx

2

HxH,xargminH ii

i

d Error in one image

e.g. calibration pattern

221-

HHx,xxH,xargminH iiii

i

dd Symmetric transfer error

d(.,.) Euclidean distance (in image)

ii

iiiii

ii ddii

xHx subject to

x,xx,xargminx,x,H 22

x,xH,

Reprojection error

Page 13: Single View Metrology Class 3

Reprojection error

221- Hx,xxHx, dd

22 x,xxx, dd

Page 14: Single View Metrology Class 3

Statistical cost function and Maximum Likelihood

Estimation• Optimal cost function related to noise

model• Assume zero-mean isotropic Gaussian

noise (assume outliers removed) 22 2/xx,2πσ2

1xPr de

22i 2xH,x /

2iπσ2

1H|xPr ide

i

constantxH,xH|xPrlog 2i2i

σ2

1id

Error in one image

Maximum Likelihood Estimate

2i xH,x id

Page 15: Single View Metrology Class 3

Statistical cost function and Maximum Likelihood

Estimation• Optimal cost function related to noise

model• Assume zero-mean isotropic Gaussian

noise (assume outliers removed) 22 2/xx,2πσ2

1xPr de

22i

2i 2xH,xx,x /

2iπσ2

1H|xPr

ii dd

ei

Error in both images

Maximum Likelihood Estimate

2i

2i x,xx,x ii dd

Page 16: Single View Metrology Class 3

Gold Standard algorithmObjective

Given n≥4 2D to 2D point correspondences {xi↔xi’}, determine the Maximum Likelyhood Estimation of H

(this also implies computing optimal xi’=Hxi)

Algorithm

(i) Initialization: compute an initial estimate using normalized DLT or RANSAC

(ii) Geometric minimization of reprojection error:

● Minimize using Levenberg-Marquardt over 9 entries of h

or Gold Standard error:

● compute initial estimate for optimal {xi}

● minimize cost over {H,x1,x2,…,xn}

● if many points, use sparse method

2i

2i x,xx,x ii dd

Page 17: Single View Metrology Class 3

Uncertainty: error in one image

(i) Estimate the transformation from the data(ii) Compute Jacobian , evaluated at(iii) The covariance matrix of the estimated is

given by JJ 1

xT

h

h/XJ f

Hh

h

TT

TT

x~x~0

x~0x~1h/xJ

iii

iii

iii

y

x

w

iiii JJJJ 1T1

xT

h

Page 18: Single View Metrology Class 3

Uncertainty: error in both images

BBAB

BAAAJJ

1X

T1X

T

1X

T1X

T1

XT

B|AJ

separate in homography and point parameters

nnxx...xx|hP 11

Page 19: Single View Metrology Class 3

Using covariance matrix in point transfer

Thhhx JJ

Error in one image

Txxx

Thhhx JJJJ

Error in two images

(if h and x independent, i.e. new points)

Page 20: Single View Metrology Class 3

=1 pixel =0.5cm (Criminisi’97)

Example:

Page 21: Single View Metrology Class 3

=1 pixel =0.5cm

Example:

(Criminisi’97)

Page 22: Single View Metrology Class 3

Example:

(Criminisi’97)

Page 23: Single View Metrology Class 3

Monte Carlo estimation of covariance

• To be used when previous assumptions do not hold (e.g. non-flat within variance) or to complicate to compute.

• Simple and general, but expensive

• Generate samples according to assumed noise distribution, carry out computations, observe distribution of result

Page 24: Single View Metrology Class 3

Single view measurements:3D scene

Page 25: Single View Metrology Class 3

Background: Projective geometry of 1D

x'x 22H

The cross ratio

Invariant under projective transformations

T21, xx

3DOF (2x2-1)

02 x

4231

4321

4321 x,xx,x

x,xx,xx,x;x,x

22

11detx,x

ji

ji

ji xx

xx

Page 26: Single View Metrology Class 3

Vanishing points

• Under perspective projection points at infinity can have a finite image

• The projection of 3D parallel lines intersect at vanishing points in the image

Page 27: Single View Metrology Class 3

Basic geometry

Page 28: Single View Metrology Class 3

Basic geometry

• Allows to relate height of point to height of camera

Page 29: Single View Metrology Class 3

Homology mapping between parallel planes

• Allows to transfer point from one plane to another

Page 30: Single View Metrology Class 3

Single view measurements

Page 31: Single View Metrology Class 3

Single view measurements

Page 32: Single View Metrology Class 3

Forensic applications

190.6±2.9 cm

190.6±4.1 cm

A. Criminisi, I. Reid, and A. Zisserman. Computing 3D euclidean distance from a single view. Technical Report OUEL 2158/98, Dept. Eng. Science, University of Oxford, 1998.

Page 33: Single View Metrology Class 3

Example

courtesy of Antonio Criminisi

Page 34: Single View Metrology Class 3

La Flagellazione di Cristo (1460) Galleria Nazionale delle Marche

by Piero della Francesca (1416-1492)

http://www.robots.ox.ac.uk/~vgg/projects/SingleView/

Page 35: Single View Metrology Class 3

More interesting stuff

• Criminisi demo http://www.robots.ox.ac.uk/~vgg/presentations/spie98/criminis/index.html

• work by Derek Hoiem on learning single view 3D structure and apps http://www.cs.cmu.edu/~dhoiem/

• similar work by Ashutosh Saxena on learning single view depth http://ai.stanford.edu/~asaxena/learningdepth/

Page 36: Single View Metrology Class 3

Next class

• Feature tracking and matching