single view geometry - electrical and computer engineering

11
1 Camera Models Acknowledgements Used slides/content with permission from Marc Pollefeys for the slides Hartley and Zisserman: book figures from the web Matthew Turk: for the slides April 2004 Camera Models 2 Camera model Camera calibration Single view geom. Single view geometry

Upload: others

Post on 25-Mar-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

1

Camera Models

Acknowledgements

Used slides/content with permission fromMarc Pollefeys for the slides

Hartley and Zisserman: book figures from the webMatthew Turk: for the slides

April 2004 Camera Models 2

Camera model

Camera calibration

Single view geom.

Single view geometry

2

April 2004 Camera Models 3

Pinhole camera geometry

• A general projective camera P maps world points X toimage points x according to x = PX.

April 2004 Camera Models 4

TT ZfYZfXZYX )/,/(),,( a

=

101

0

0

1

Z

Y

X

f

f

Z

fY

fX

Z

Y

X

a

Central projection in homogeneous coordinates

3

April 2004 Camera Models 5

=

101

0

0

Z

Y

X

f

f

Z

fY

fX

=

101

01

01

1Z

Y

X

f

f

Z

fY

fXPXx =

[ ]0|I)1,,(diagP ff=

Camera projection matrix P

P: principal point

Principal plane

April 2004 Camera Models 6

Tyx

T pZfYpZfXZYX )/,/(),,( ++a

principal pointT

yx pp ),(

=

+

+

101

0

0

1

Z

Y

X

pf

pf

Z

ZpfY

ZpfX

Z

Y

X

y

x

x

x

a

Pinhole point offset

Image (x,y) and camera(x_cam, y_cam) coordinate systems.

4

April 2004 Camera Models 7

=

+

+

101

0

0

Z

Y

X

pf

pf

Z

ZpfY

ZpfX

y

x

x

x

x =K I | 0[ ]Xcam

=

1y

x

pf

pf

Kcalibration matrix

camera is assumed to be located at the center of aEuclidean coordinate system with the principal axisof the camera point in the direction of z-axis.

Camera calibration matrix K

April 2004 Camera Models 8

( )C~-X~RX~cam =

Xcam =R −R ˜ C 0 1

XYZ1

=R −R ˜ C 0 1

X

x = K I | 0[ ] Xcam = KR I | - ˜ C [ ] X[ ]t|RKP = C

~Rt −=

PXx =

Camera rotation and translation

Euclidean transformation between worldand camera coordinate frames

Inhomogeneous 3-vectorof coordinates of a point inthe world coordinate frame.

Same point in the cameracoordinate frame

Coordinates of cameracenter in worldcoordinates

5

April 2004 Camera Models 9

Internal and exterior orientation

• has 9 dof– 3 for K (f, px, py)

– 3 for R

– 3 for

• Parameters contained in K are called the internal cameraparameters, or the internal orientation of the camera.

• The parameters of R and which relate the cameraorientation and position to a world coordinate system arecalled the external parameters or exterior orientation.

• Often convenient not to make the camera center explicit,and instead to represent the world->image transformationas , where

April 2004 Camera Models 10

K =

αx x0αy y0

1

K =

mx

my

1

f pxf py

1

CCD camera: 10 dof

CCD Cameras

CCD Cameras: may havenon-square pixels!

6

April 2004 Camera Models 11

Finite projective camera

S: skew parameter;0 for most normal cameras

A camera

with K as above is called a a finite projective camera.

A finite projective camera has 11 degrees of freedom. This isthe same number of degrees of freedom as a 3 x 4 matrix,defined up to an arbitrary scale.

Note that the left hand 3 x 3 submatrix of P, equal to KR, is non-singular.

any 3 x 4 matrix P for which the left hand 3 x 3 submatrix isnon-singular is the camera matrix for some finite projectivecamera.

April 2004 Camera Models 12

Camera centerColumn pointsPrincipal planeAxis planePrincipal pointPrincipal ray

Camera anatomy

7

April 2004 Camera Models 13

0PC =null-space camera projection matrixConsider:

For all A all points on ray AC project on imageof A, therefore C is camera center

Image of camera center is (0,0,0)T, i.e. undefined

Camera Center

Consider the line containing C and any other point A in 3-space.

April 2004 Camera Models 14

[ ] [ ]

=

0

0

1

0

ppppp 43212

Column Vectors

: image of the world origin.

The columns of the projectivecamera are 3-vectors that have ageometric meaning as particularimage points.

P1: vanishing point of the world coordinate x-axisP2: vanishing point of y-axisP3: vanishing point of z axis

8

April 2004 Camera Models 15

Row Vectors and the Principal Plane

The principal plane is the plane through the camera centerparallel to the image plane. It consists of the set of points Xwhich are imaged on the line at infinity of the image.i.e.,

⇒A point X lies on the image plane iff

⇒In particular, the camera center C lies on the principal plane.P3 is the vector representing the principal plane of the camera,

April 2004 Camera Models 16

Principal Plane

9

April 2004 Camera Models 17

Axis planes

note: p1,p2 dependent on image x and y axis(choice of image coordinage system).

Consider the set of points X on plane P1. This set satisfies:

These are imaged at PX = (0,y,w)^Tthese are points on the image y-axis.Plane P1 is defined by the camera center and theline x=0 in the image.Similarly, P2 is given by P2.X =0,

April 2004 Camera Models 18

principal point

( )0,,,p̂ 3332313 ppp=

The principal point

Principal axis: is the line passing through the camera center C,with direction perpendicular to the principal plane P3.The axis intersects the image plane at the principal point.

10

April 2004 Camera Models 19

ii xX ↔

? P

Resectioning

Estimating the camera projectionmatrix from corresponding 3-spaceand image measurements ->resectioning.

⇒Similar to the 2D projective transformation H.⇒H was 3x3 whereas P is 3x4.

April 2004 Camera Models 20

ii PXx =

0Ap =

Basic equations

: is a 4-vector, the i-th row of P.

Each point correspondence gives 2independent equations.A = 2n x 12 matrixp: 12 x 1 column vector.

11

April 2004 Camera Models 21

0Ap =

minimal solution

Over-determined solution

⇒ 5.5 correspondences needed (say 6)

P has 11 dof, 2 independent eq./points

n ≥ 6 points

Apminimize subject to constraint

1p =

1p̂3 =3p̂

=P

Camera matrix P

April 2004 Camera Models 22

HW #3: Computing P

• Will be posted soon.

• Will be due next week.