+ All Categories
Home > Documents > Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon,...

Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon,...

Date post: 28-Jul-2020
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
31
Single-view geometry Odilon Redon, Cyclops, 1914
Transcript
Page 1: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Single-view geometry

Odilon Redon, Cyclops, 1914

Page 2: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Our goal: Recovery of 3D structure• Recovery of structure from one image is

inherently ambiguous

X?X?

X?X?

x

Page 3: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Our goal: Recovery of 3D structure• Recovery of structure from one image is

inherently ambiguous

Page 4: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Our goal: Recovery of 3D structure• Recovery of structure from one image is

inherently ambiguous

Page 5: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Ames Room

http://en.wikipedia.org/wiki/Ames_room

Page 6: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Our goal: Recovery of 3D structure• We will need multi-view geometry

Page 7: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Recall: Pinhole camera model

• Principal axis: line from the camera center• Principal axis: line from the camera center perpendicular to the image plane

• Normalized (camera) coordinate system: camera center is at the origin and the principal axis is the z-axis

Page 8: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Recall: Pinhole camera model

)/,/(),,( ZYfZXfZYX a ),(),,( ff

⎟⎞

⎜⎛⎤⎡

⎟⎞

⎜⎛⎟

⎞⎜⎛

0X

fXfX

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

⎥⎥⎥

⎢⎢⎢

⎡=

⎟⎟⎟

⎜⎜⎜

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

0100

ZY

ff

ZYfXf

ZY

a PXx =⎟⎟⎠

⎜⎜⎝⎥⎦⎢⎣

⎟⎠

⎜⎝⎟⎟

⎠⎜⎜⎝ 1

011

Z

Page 9: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Principal point

py

Principal point (p) point here principal a is intersects the

px

• Principal point (p): point where principal axis intersects the image plane (origin of normalized coordinate system)

• Normalized coordinate system: origin is at the principal pointy g p p p• Image coordinate system: origin is in the corner• How to go from normalized coordinate system to image

coordinate system?

Page 10: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Principal point offset

)(principal point: ),( yx pppy

)/,/(),,( pZYfpZXfZYX ++a

px

)/,/(),,( yx pZYfpZXfZYX ++a

⎟⎞

⎜⎛⎤⎡⎞⎛ +⎟

⎞⎜⎛

0X

pfpZXfX

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

⎥⎥⎥

⎢⎢⎢

⎡=

⎟⎟⎟

⎜⎜⎜

⎛++

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

0100

ZY

pfpf

ZpZYfpZXf

ZY

y

x

y

x

a

⎟⎟⎠

⎜⎜⎝⎥⎦⎢⎣

⎟⎠

⎜⎝⎟⎟

⎠⎜⎜⎝ 1

011

Z

Page 11: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Principal point offset

)(principal point: ),( yx pp

⎟⎟⎞

⎜⎜⎛

⎥⎤

⎢⎡⎥⎤

⎢⎡

⎟⎞

⎜⎛ + 01

YX

pfZpXf xx

⎟⎟⎟⎟

⎠⎜⎜⎜⎜

⎝⎥⎥⎥

⎦⎢⎢⎢

⎣⎥⎥⎥

⎦⎢⎢⎢

=⎟⎟⎟

⎠⎜⎜⎜

+

10101

1ZY

pfZ

ZpYf yy

⎠⎝ 1

⎥⎥⎤

⎢⎢⎡

=x

pfpf

K calibration matrix [ ]0|IKP =⎥⎥⎦⎢

⎢⎣ 1

ypfK calibration matrix [ ]0|IKP

Page 12: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Pixel coordinates

11Pixel size:

yx mm11

×

mx pixels per meter in horizontal direction, m pixels per meter in vertical direction

⎥⎤

⎢⎡

⎥⎤

⎢⎡⎥⎤

⎢⎡ xxxx pfm βα

my pixels per meter in vertical direction

⎥⎥⎥

⎦⎢⎢⎢

=⎥⎥⎥

⎦⎢⎢⎢

⎣⎥⎥⎥

⎦⎢⎢⎢

=111

yyyy pfmK βα

⎦⎣⎦⎣⎦⎣pixels/m m pixels

Page 13: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Camera rotation and translation

• In general, the camera di t f illcoordinate frame will

be related to the world coordinate frame by a yrotation and a translation

( )C~-X~RX~ cam = ( )cam

coords. of point in camera frame

coords. of camera center in world frame

d f i tcoords. of a pointin world frame (nonhomogeneous)

Page 14: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Camera rotation and translation

In non-homogeneouscoordinates:

( )C~-X~RX~ cam =

coordinates:

~~~ ⎤⎡⎞⎛⎤⎡X

10CRR

1X

10CRRXcam ⎥

⎤⎢⎣

⎡ −=⎟⎟

⎞⎜⎜⎝

⎛⎥⎦

⎤⎢⎣

⎡ −=

[ ] [ ]XC~R|RKX0|IKx −== [ ],t|RKP = C~Rt −=[ ] [ ]XCR|RKX0|IKx cam [ ],t|RKP CRt

Note: C is the null space of the camera projection matrix (PC=0)

Page 15: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Camera parameters• Intrinsic parameters

• Principal point coordinates• Focal length ⎥

⎤⎢⎡

⎥⎤

⎢⎡⎥⎤

⎢⎡ xxxx pfm βα

• Focal length• Pixel magnification factors• Skew (non-rectangular pixels)

⎥⎥⎥

⎦⎢⎢⎢

=⎥⎥⎥

⎦⎢⎢⎢

⎣⎥⎥⎥

⎦⎢⎢⎢

=111

yyyy pfmK βα

• Radial distortion

Page 16: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Camera parameters• Intrinsic parameters

• Principal point coordinates• Focal length• Focal length• Pixel magnification factors• Skew (non-rectangular pixels)• Radial distortion

• Extrinsic parameters• Rotation and translation relative to world coordinate system• Rotation and translation relative to world coordinate system

Page 17: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Camera calibration

[ ]XRK[ ]XtRKx =

⎥⎤

⎢⎡

⎥⎤

⎢⎡

⎥⎤

⎢⎡ ****

YX

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥

⎢⎢⎢=

⎥⎥⎥

⎢⎢⎢ ****

ZY

⎥⎦

⎢⎣

⎥⎦⎢⎣⎥⎦⎢⎣ 1****λ

Source: D. Hoiem

Page 18: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Camera calibration• Given n points with known 3D coordinates Xi

and known image projections xi, estimate the tcamera parameters

XXi

xi

?P

Page 19: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Camera calibration: Linear method

ii PXx =λ 0PXx =× ii0XP

XP

2

1

=⎥⎥⎥⎤

⎢⎢⎢⎡

×⎥⎥⎤

⎢⎢⎡

iT

iT

i

i

yx

ii iiXP1 3⎥⎦⎢⎣⎥

⎥⎦⎢

⎢⎣ i

T

PXX0 ⎞⎛⎤⎡ TT

0PP

X0XXX0

2

1

=⎟⎟⎟⎞

⎜⎜⎜⎛

⎥⎥⎥⎤

⎢⎢⎢⎡

−−

Tii

Ti

Tii

Ti

xy

P0XX 3⎟⎠

⎜⎝⎥⎦⎢⎣−

Tii

Tii xy

Two linearly independent equations

Page 20: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Camera calibration: Linear method

PX0XXX0

1

111

⎟⎞

⎜⎛⎥⎥⎤

⎢⎢⎡

−−

TTT

TTT

xy

0pA =0PPP

XX0

X0X

2

1111

=⎟⎟⎟

⎜⎜⎜

⎥⎥⎥⎥

⎢⎢⎢⎢

TTT

xLLL

PX0XXX0 3

⎟⎠

⎜⎝⎥⎥⎦⎢

⎢⎣ −

−Tnn

TTn

Tnn

Tn

T

xy

• P has 11 degrees of freedom (12 parameters, but scale is arbitrary)

• One 2D/3D correspondence gives us two linearly independent equationsH l t• Homogeneous least squares

• 6 correspondences needed for a minimal solution

Page 21: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Camera calibration: Linear method

PX0XXX0

1

111

⎟⎞

⎜⎛⎥⎥⎤

⎢⎢⎡

−−

TTT

TTT

xy

0Ap =0PPP

XX0

X0X

2

1111

=⎟⎟⎟

⎜⎜⎜

⎥⎥⎥⎥

⎢⎢⎢⎢

TTT

xLLL

PX0XXX0 3

⎟⎠

⎜⎝⎥⎥⎦⎢

⎢⎣ −

−Tnn

TTn

Tnn

Tn

T

xy

• Note: for coplanar points that satisfy ΠTX=0,we will get degenerate solutions (Π 0 0)we will get degenerate solutions (Π,0,0), (0,Π,0), or (0,0,Π)

Page 22: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Camera calibration: Linear method• Advantages: easy to formulate and solve• Disadvantages

• Doesn’t directly tell you camera parameters• Doesn’t model radial distortion• Can’t impose constraints, such as known focal length andCan t impose constraints, such as known focal length and

orthogonality

• Non linear methods are preferred• Non-linear methods are preferred• Define error as difference between projected points and

measured points• Minimize error using Newton’s method or other non-linear

optimization

Source: D. Hoiem

Page 23: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Multi-view geometry problems• Structure: Given projections of the same 3D point in two

or more images, compute the 3D coordinates of that point

?

Camera 3R3,t3 Slide credit:

Noah Snavely

Camera 1Camera 2R1,t1 R2,t2

Page 24: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Multi-view geometry problems• Stereo correspondence: Given a point in one of the

images, where could its corresponding points be in the other images?other images?

Camera 3R3,t3

Camera 1Camera 2R1,t1 R2,t2 Slide credit:

Noah Snavely

Page 25: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Multi-view geometry problems• Motion: Given a set of corresponding points in two or

more images, compute the camera parameters

Camera 1Camera 2 Camera 3

R1,t1 R2,t2 R3,t3? ? ? Slide credit:

Noah Snavely

Page 26: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Triangulation• Given projections of a 3D point in two or more

images (with known camera matrices), find th di t f th i tthe coordinates of the point

X?

x x2x12

O1 O2

Page 27: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Triangulation• We want to intersect the two visual rays

corresponding to x1 and x2, but because of i d i l th d ’t tnoise and numerical errors, they don’t meet

exactlyR1R2

X?2

x x2x12

O1 O2

Page 28: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Triangulation: Geometric approach• Find shortest segment connecting the two

viewing rays and let X be the midpoint of that tsegment

X

x x2x12

O1 O2

Page 29: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Triangulation: Linear approach

XPXPx 111 =

λλ

0XP0XPx 11 =×

0XP][x0XP][x 11 =×

XPx 222 =λ 0XPx 22 =× 0XP][x 22 =×

0 ⎤⎡⎤⎡ − baa

Cross product as matrix multiplication:

baba ][0

00

×=⎥⎥⎥

⎢⎢⎢

⎥⎥⎥

⎢⎢⎢

−=× y

x

xz

yz

bbb

aaaa

0 ⎥⎦⎢⎣⎥⎦⎢⎣− zxy baa

Page 30: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Triangulation: Linear approach

XPXPx 111 =

λλ

0XP0XPx 11 =×

0XP][x0XP][x 11 =×

XPx 222 =λ 0XPx 22 =× 0XP][x 22 =×

Two independent equations each in terms of three unknown entries of X

Page 31: Odilon Redon, Cyclops, 1914 - Computer Sciencelazebnik/spring11/lec13_single_view.pdfOdilon Redon, Cyclops, 1914. Our goal: Recovery of 3D structure • Recovery of structure from

Triangulation: Nonlinear approachFind X that minimizes

)()( 22 XPxdXPxd + ),(),( 2211 XPxdXPxd +

X?

x x2

x’1x1

2x’2

O1 O2


Recommended