Top Banner
Computer Vision Geometric Camera Models and Camera Calibration
29
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Computer Vision Geometric Camera Models and Camera Calibration.

Computer Vision

Geometric Camera Models and

Camera Calibration

Page 2: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 2

Coordinate Systems

Let O be the origin of a 3D coordinate system spanned by the unit vectors i, j, and k orthogonal to each other.

i

j

kO

Px OP i

��������������

y OP j��������������

z OP k��������������

OP x y z i j k��������������

x

y

z

PCoordinate vector

Page 3: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 3

Homogeneous Coordinatesn

a

b

c

HH

O

P

x

y

z

P

0HP OH ����������������������������

2 2 2( ) 0ax by cz a b c

0ax by cz d

0

1

x

ya b c d

z

Homogeneous coordinates 0 H P

P

TH

Page 4: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 4

Coordinate System Changes

Translation

BPAP

Page 5: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 5

Coordinate System Changes

Rotation

where

Exercise: Write the rotation matrix for a 2D coordinate system.

ˆ

ˆ

ˆ

AX B

AY B

AZ B

B i P

B j P

B k P

Page 6: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 6

Coordinate System Changes

Rotation + Translation

In homogeneous coordinates

Rigid transformation matrix

Page 7: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 7

Perspective Projection

Perspective projection equations

' ' 'x y z

x y z

Page 8: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 8

Intrinsic Camera Parameters

Perspective projection

( , )u v x

P y

z

Page 9: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 9

Intrinsic Camera Parameters

We need take into account the dimensions of the pixels.

CCD sensor array

Page 10: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 10

Intrinsic Camera Parameters

The center of the sensor chip may not coincide with the pinhole center.

Page 11: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 11

Intrinsic Camera Parameters

The camera coordinate system may be skewed due to some manufacturing error.

Page 12: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 12

Intrinsic Camera Parameters

In homogeneous coordinates

These five parameters are known as intrinsic parameters

Page 13: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 13

Intrinsic Camera Parameters

In a simpler notation: 1K

zp 0 P

With respect to the camera coordinate system

Page 14: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 14

Extrinsic Camera Parameters

Translation and rotation of the camera frame with respect to the world frame

In homogeneous coordinates

1K

zp 0 PUsing , we get 1

11

1

X

C CYW W

TZ

Wu

WR Ov K

Wz

00

Page 15: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 15

Combine Intrinsic & Extrinsic Parameters

We can further simplify to

1

11

1

X

C CYW W

TZ

Wu

WR Ov K

Wz

00

1

11

X

YC CW W

Z

Wu

Wv K R O

Wz

3x4 matrix with 11 degrees of freedom: 5 intrinsic, 3 rotation, and 3 translation parameters.

Page 16: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 16

Camera Calibration

Camera’s intrinsic and extrinsic parameters are found using a setup with known positions in some fixed world coordinate system.

Page 17: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 17

Camera Calibration

courtesy of B. Wilburn

XZ

Y i

i

u

v

wiwiwi

x

y

z

Page 18: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 18

Camera Calibration

Mathematically, we are given n points

We want to find M

i

i

u

v

wiwiwi

x

y

z

1,...,i nand where

Page 19: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 19

Camera Calibration

We can write

Page 20: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 20

Camera Calibration

Scale and subtract last row from first and second rows

to get

Page 21: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 21

Camera Calibration

Write in matrix form for n points

to get

Let m34=1; that is, scale the projection matrix by m34.

Page 22: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 22

Camera Calibration

The least square solution of is

From the matrix M, we can find the intrinsic and extrinsic parameters.

Page 23: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 23

Camera Calibration

Consider the case where skew angle is 90. Since we set m34=1, we need to take that into account at the end.

Notice that

Since R is a rotation matrix,

Therefore,

Page 24: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 24

Camera Calibration

We get

See Forsyth & Ponce for details and skew-angle case.

Page 25: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 25

Applications

courtesy of Sportvision

First-down line

Page 26: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 26

ApplicationsVirtual advertising

courtesy of Princeton Video Image

Page 27: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 27

Parameters of a Stereo System Intrinsic Parameters

Characterize the transformation from camera to pixel coordinate systems of each camera

Focal length, image center, aspect ratio

Extrinsic parameters Describe the relative

position and orientation of the two cameras

Rotation matrix R and translation vector T

pl

pr

P

Ol Or

Xl

Xr

Pl Pr

fl fr

Zl

Yl

Zr

Yr

R, T

Page 28: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 28

Calibrated Camera

( , ,1)[ ( ')] 0 with

' ( ', ',1)

T

T

p u vp t Rp

p u v

' 0Tp Ep

' 0 with Tp Ep E t R Essential matrix

Page 29: Computer Vision Geometric Camera Models and Camera Calibration.

Bahadir K. Gunturk 29

Uncalibrated Camera

' 0 pE p

scoordinate camerain ' and toingcorrespond scoordinate pixelin points ' and pppp

p'MppMp '' and 1int

1int

1int int

' 0

with '

T

T

p F p

F M E M

Fundamental matrix