structure from motion - politecnico di...

71
Structure from Motion Prof. Marco Marcon

Upload: others

Post on 25-Mar-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Structure from Motion

Prof. Marco Marcon

Page 2: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Summing-up

Stereo is the most powerful clue for determining the structure of a scene

Another important clue is the relative motion between the scene and (mono) camera

If scene stationary, camera moving →passive navigation

If camera stationary, scene/objects moving → object-based (requires segmentation)

Determining the 3-D information from the displacements of points at different time instants is called “structure from motion”

2

Page 3: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

3-D Motion Models

According to classical kinematics, 3-D motion is classified into •

Rigid (body) motion : X’=RX+T

Non-rigid (deformable) motion : X’=(D+R)X+Twhere R : rotation , D : deformation matrices, T : translation vectorDeformation matrix does not have any constraintRotation is represented using an orthonormal matrix (RTR=I) with various representations :•

Euler angles

Euler angles with small angle approximations•

Rotation around an arbitrary axis

Unit Quanternions

3

Page 4: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Modeling 3-D Velocity

Note that X’=RX+T gives a relation to represent “displacements”between two points at two time instantsIn order to find instantaneous velocity one should find the displacement as time difference goes to zeroConsider the relation X’=RX+T for small angles

Dividing both sides by t (time difference) and taking limit t→0

4

Page 5: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

3-D Motion & Structure Estimation

3-D motion estimation is equivalent to “relative orientation” problem in photogrammetryFinding structure is relatively easy after determining motionThere are three main approaches to 3-D motion/structure estimation problem•

Optical flow-based methodsRelates the “instantaneous velocity”

to optical flow (2-D motion) field to find a solution

Direct approaches•

Relates spatio-temporal gradients to 3-D motion parametersPoint correspondence-based approaches•

Requires initial point correspondences (conjugate pairs) in order to solve the unknown parameters

5

Page 6: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Optical Flow-based Methods

Recall 3-D velocity vector for small angular rotation :

In order to relate 3-D velocity to that of 2-D, use projection:

6

Page 7: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Optical Flow-based Methods

Substituting 3-D velocity relation (in terms of angles):

7

Page 8: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Optical Flow-based methods

Pure Translational Case : The integral below is minimized by differentiating with respect to Z first, then (Vx,Vy,Vz):

Pure Rotational Case : The integral below is minimized by differentiating with respect to three angular velocities

8

Page 9: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Optical Flow-based Methods

First eliminate Z from the two equations above to obtain a single equation.After defining new variables e1 and e2 , convert this equation into a linear (matrix) equation:

Where

9

Page 10: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Optical flow solution

The solution steps of the previous equation are:•

Solve it using at least 8 image point correspondences•

Recover 5 motion parameters from the elements of H•

Solve for depth using one of the two equations above

10

Page 11: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Direct Methods

Direct methods utilize only the spatio-temporal image intensity gradients to estimate 3-D motion and structure parametersNote that almost all optical flow-based methods can be extended as direct methods by replacing optical flow motion vectors with their estimates in terms of spatio-temporal gradients :

11

Page 12: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Point Correspondence-based Methods

Point correspondence-based algorithms is similar to relative orientation methods in photogrammetryUsing conjugate pairs, displacement (not velocity) between frames is determined in terms of a rotation matrix and a translation vector [X’=RX+T, (X,Y,Z)→(x,y), (X’,Y’,Z’) →(x’,y’)]

Solution of this equation is obtained for two different cases :•

Planar surface : aX+bY+cZ=1•

General surface[Note that “scaling ambiguity” exits as in relative orientation]

12

Page 13: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Point Correspondence-based Methods

Planar Surfaces : Assume that the surface is approximated by a number of planar patches (similar to wireframe modeling)

These set of parameters are called pure parameters and solved using at least 4 point correspondencesRotation, translation values, as well as plane normal, are obtained from vector a using Singular Value Decomposition of ‘a’ in a linear fashion

13

Page 14: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Point Correspondence-based Methods: the planar patches

The definition of A requires, at least, 4 point correspondences

14

1

2

3

4

5

6

7

8

1 0 0 0 ' ' '0 0 0 1 ' ' '

aaaax y xx yx xax y xy yy yaaa

⎡ ⎤⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥− −⎡ ⎤ ⎡ ⎤⎢ ⎥ =⎢ ⎥ ⎢ ⎥⎢ ⎥− −⎣ ⎦ ⎣ ⎦⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦

Page 15: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Point Correspondence-based Methods: general surfaces

General Surfaces : There are two well-known linear methods fordetermining motion and structure of arbitrary 3-D surfaces :•

Essential (E)-matrix method : for calibrated cameras•

Original formulation•

Robust solution•

Fundamental (F)-matrix method : for uncalibrated

cameras

15

Page 16: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Structure from Motion 16

Page 17: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 17

Single view Metrology

Is it possible to extract 3D geometric information from single images?

YESHow?Why?

Page 18: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Background

2D3D

Optical

centre

Painter,Linear perspective

Real or imaginary

object

Painting

Camera,Laws of Optics

Real object

Photograph

Architect,Descriptive Geometry

A mental model

DrawingProjective Geometry

Reconstructed

3D model

Flat image

Page 19: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Introduction

3D affine measurements may be measured from a single perspective image

Page 20: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Introduction

1.

Measurements of the distance between any of the planes2.

Measurements on these planes3.

Determine the camera’s position

Results are sufficient for a partial or complete 3D reconstruction of the observed scene

Page 21: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Sample

La Flagellazione di Cristo

Page 22: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

22

Geometry

OverviewMeasurements between parallel linesMeasurements on parallel planesDetermining the camera position

Page 23: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Geometry Overview

Possible to obtain geometric interpretations for key features in a sceneDerive how 3D affine measurements may be extracted from the imageUse results to analyze and/or model the scene

Page 24: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Assumptions

Assume that images are obtained by perspective projectionAssume that, from the image, a:•

vanishing line of a reference plane•

vanishing point of another reference directionmay be determined from the image

Page 25: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 25

Geometric Cues

Vanishing Line ℓProjection of the line at infinity of the reference plane into the image

Page 26: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 26

Geometric Cues

Vanishing Point(s) v

A point at infinity in the reference direction•

Reference direction is NOT parallel to reference plane

Also known as the vertical vanishing point

Page 27: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Vanishing

point

Vanishing

line

Vanishing

point

Vertical vanishing

point

(at infinity)

Geometric Cues

Page 28: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Generic Algorithm

1)

Edge detection and straight line fitting to obtain the set of straight edge segments SA

2)

Repeata)

Randomly select two segments s1

, s2

SA

and intersect them to give point p

b)

The support set Sp

is the set of straight edges in SA

going through point p

3)

Set the dominant vanishing point as the point p with the largest support Sp

4)

Remove all edges in Sp

from SA

and repeat step 2

Page 29: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 29

Automatic estimation of vanishing points and lines

RANSAC algorithm

Candidate vanishing point

Page 30: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 30

Automatic estimation of vanishing points and lines

Page 31: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 31

Measurements between Parallel Lines

Wish to measure the distance between two parallel planes, in thereference direction•

The aim is to compute the height of an object relative to a reference

Page 32: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 32

Cross Ratio

Point b on plane πcorrespond to point t on plane π’

Aligned to vanishing point v

Point i is the intersection with the vanishing line

Page 33: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 33

Cross Ratio

The cross ratio is between the points provides an affine length ratio

The value of the cross ratio determines a ratio of distances between planes in the world

Thus, if we know the length for an object in the scene, we can use it as a reference to calculate the length of other objects

Page 34: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 34

Estimating Height

•The distance || tr – br || is known

•Used to estimate the height of the man in the scene

Page 35: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 35

Measurements on Parallel Planes

If the reference plane is affine calibrated, then from the image measurements the following can be computed:

i. Ratios of lengths of parallel line segments on the plane

ii.

Ratios of areas on the plane

Page 36: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 36

Parallel Line Segments

•Basis points are manually selected and measured in the real world

•Using ratios of lengths, the size of the windows are calculated

Page 37: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Planar Homology

Using the same principals, affine measurements can be made on two separate planes, so long as the planes are parallel to each other

A map in the world between parallel planes induces a map betweenimages of points on the two planes

Page 38: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 38

Homology Mapping between Parallel PlanesA point X on plane π is mapped into the point X’ on π’ by a parallel projection

Page 39: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 39

Planar Homology

Points in one plane are mapped into the corresponding points in the other plane as follows:

X’

= HXwhere (in homogeneous coordinates):•

X is an image point

X’ is its corresponding point•

H is the 3 x 3 matrix representing the homography

transformation

Page 40: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 40

Measurements on Parallel Planes

This means that we can compare measurements made on two separate planes by mapping between the planes in the reference direction via the homology

Page 41: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 41

Parallel Line Segments lying on two Parallel Planes

Page 42: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Camera Position

Using the techniques we developed in the previous sections, we can:•

Determine the distance of the camera from the scene•

Determine the height of the camera relative to the reference plane

Page 43: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Camera Distance from Scene

In Measurements between Parallel Lines, distances between planes are computed as a ratio relative to the camera’s distance from the reference planeThus we can compute the camera’s distance from a particular frame knowing a single reference distance

Page 44: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 44

Camera Position Relative to Reference PlaneThe location of the camera relative to the reference plane is the back-projection of the vanishing point onto the reference plane

Page 45: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 45

Algebraic Representation

OverviewMeasurements between parallel linesMeasurements on parallel planesDetermining the camera position

Page 46: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 46

Overview

Algebraic approach offers many advantages (over direct geometry):1.

Avoid potential problems with ordering for the cross ratio

2.

Minimal and over-constrained configurations can be dealt with uniformly

3.

Unifies the different types of measurements4.

Are able to develop an uncertainty analysis

Page 47: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 47

Coordinate Systems

Define an affine coordinate system XYZ in space•

Origin lies on reference plane•

X, Y axes span the reference plane•

Z axis is the reference directionDefine image coordinate system xy•

y in the vertical direction•

x in the horizontal direction

Page 48: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 48

Coordinate Systems

Page 49: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 49

Projection Matrix

If X’ is a point in world space, it is projected to an image point x’ in image space via a 3 x 4 projection matrix Px’ = PX’ = [ p1 p2 p3 p4 ]X’

where x’

and X’

are homogeneous vectors:x’

= (x, y ,w) and X’

= (X, Y, Z, W)

Page 50: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 50

Vanishing Points

Denote the vanishing points for the X, Y and Z directions as vX, vY, and vBy inspection, the first 3 columns of matrix P are the vanishing points:•

p1

= vX

p2

= vY

p3

= v

Origin of the world coordinate system is p4

Page 51: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 51

Vanishing Line

Furthermore, vX and vY are on the vanishing line l•

Choosing these points fixes the X and Y affine coordinate axes

Denote them as l1

, l2

where li

·

l

= 0Note:•

Columns 1, 2 and 4 make up the reference plane to image homography

matrix H

TT T

Page 52: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 52

Projection Matrix Reduction

o = p4 = l/|| l || = l^

o is the Origin of the coordinate system

Thus, the parametrization of P is:

P = [ l1 l2

αv l^

]

T T

αα

is the affine scale factoris the affine scale factor

Page 53: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 53

Measurements between Parallel Lines

The aim is to compute the height of an object relative to a reference

Height is measured in the Z direction

Page 54: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Measurements between Parallel LinesBase point B on the reference planeTop point T in the scene

b = n(Xp1

+ Yp2

+ p4

)t = m(Xp1

+ Yp2

+ Zp3

+ p4

)n and m are unknown scale factors

Page 55: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 55

Affine Scale Factor

If α is known, then we can obtain Z

If Z is known, we can compute α, removing affine ambiguity

Page 56: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 56

Representation

Page 57: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 57

Measurements on Parallel Planes

Projection matrix P from the world to the image is defined with respect to a coordinate frame on the reference planeThe translation from the reference plane to another plane along the reference direction can be parametrized into a new projection matrix P’

Page 58: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 58

Plane to Image Homographies

P = [ l1

l2

αv l^

]

P’

= [ l1

l2

αv αZv + l^

]

where Z is the distance between the planesT T

TT

Page 59: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 59

Plane to Image Homographies

Homographies can be extracted:

H = [ p1

p2

αZv + l^

]

H’

= [ p1

p2

l^

]

Then H” = H’H-1 maps points from the reference plane to the second plane, and so defines the homology

Page 60: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 60

Generic Algorithm

1. Given an image of a planar surface estimate the image-to-world homography

matrix H

2. Repeat

a)

Select two points x1

and x2

on the image plane

b)

Back-project each image point into the world plane using H to obtain the two world points X1

and X2

c)

Compute the Euclidean distance dist(X1

, X2

)i. dist(A, B) = || A –

B ||

Page 61: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

March 24, 2005 Single View Metrology 61

Camera Position

Camera position C = (Xc, Yc, Zc, Wc)PC = 0Implies:

Using Cramer’s Rule:

Page 62: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 62

Camera In Scene

Page 63: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 63

Uncertainty Analysis

Errors arise from the finite accuracy of the feature detection and extraction•

ie-

edge detection, point specificationsUncertainty analysis attempts to quantify this error

Page 64: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 64

Uncertainty Analysis

Uncertainty in •

Projection matrix P•

Top point t•

Base point b•

Location of vanishing line l

Affine scale factor α

As the number of reference distances increases, so the uncertainty decreases

Page 65: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 65

Illustration

Ellipses are user specified

t and b are then aligned to the vertical vanishing point

Alignment constraint v ·

(t X b) = 0

Page 66: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 66

Applications

Forensic Science•

Height of suspectVirtual Modeling•

3D reconstruction of a sceneArt History•

Modeling paintings

Page 67: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 67

Forensic Science

Page 68: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 68

Virtual Modeling

Page 69: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 69

Art History

Page 70: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Single View Metrology 70

Conclusions

Affine structure of 3D space may be partially recovered from perspective imagesMeasurements between and on parallel planes can be determinedPractical applications can be derived

Page 71: Structure from Motion - Politecnico di Milanohome.deib.polimi.it/.../3DSFVM/StructureFromMotion.pdfDefine an affine coordinate system XYZ in space • Origin lies on reference plane

Non Rigid Structure from Motion 71