0% found this document useful (0 votes)
55 views27 pages

Camera Calibration

The principal point is not at the centre of the photosite array. The focal length of a lens correct only if the lens is focused at infinity. The only Intrinsic Parameters that it may be possible to obtain are the photosite dimensions rw and rh from the sensor manufacturer's data sheet.

Uploaded by

Sajith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views27 pages

Camera Calibration

The principal point is not at the centre of the photosite array. The focal length of a lens correct only if the lens is focused at infinity. The only Intrinsic Parameters that it may be possible to obtain are the photosite dimensions rw and rh from the sensor manufacturer's data sheet.

Uploaded by

Sajith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

1

CAMERA CALIBRATION

Introduction
2

Problem: Estimate cameras extrinsic & intrinsic parameters.

Method: Use image(s) of known scene.

Tools:

Geometric camera models.

SVD and constrained least-squares.

Algorithm for camera calibration proposed by Zhengyou Zhang in A Flexible


New Technique for Camera Calibration

Camera Calibration
3

Perspective
Equations

Feature
Extraction

Perspective Projection,
Remember?
4

Image formation
geometry for
a thin convex lens

The central-projection
model.

From Sebastian Thrun and Jana Kosecka

Intrinsic Parameters
5

pixel size s x , s y

X
xf
Z

Image center(ox, oy)

lens distortion k1 , k 2

Z
focal length f

Intrinsic Camera Parameters


6

Intrinsic Parameters:
Focal Length f
Pixel size s , s
x
y

Image center ox , oy

(Nonlinear radial distortion coefficients k1 , k2)

Calibration = Determine the intrinsic parameters of a camera

Extrinsic Parameters
7

Pc=R(Pw-T)
Translation followed by rotation

Coordinate Frames
8

Camera Coordinate Frame

Pixel Coordinates

Zc
Yc
Zw
Yw

Extrinsic
Parameters

Xc

World Coordinate Frame


Xw

Intrinsic
Parameters
Image Coordinate Frame

Why Calibrate?
9

In general the principal point is not at the centre of the photosite array.

The focal length of a lens correct only if the lens is focused at infinity.

It is also common experience that the intrinsic parameters change if a


lenses is detached and reattached, or adjusted for focus or aperture.

The only intrinsic parameters that it may be possible to obtain are the
photosite dimensions w and h from the sensor manufacturers data
sheet.

Perspective Camera Model


10

Step 1: Transform into camera coordinates


~
XC
~
YC
~ C
Z

cos
sin
0

sin
cos
0

0
1

cos
0
sin

0
1
0

sin

0
cos

0
0

0
cos
sin

0
sin
cos

W
X

W
Y
ZW

Step 2: Transform into image coordinates


~
f Xc
xim
~ c ox
sx Z
~
f Yc
yim
~ c o y From Sebastian Thrun and Jana Kosecka
sy Z

TX

TY

T
Z

Image and Camera Frames


11

Zcamera

Ycamera
(xim, yim)

Xcamera
(ox,oy)

Yimage

Ximage

Geometric Model
12

x=
y=
Transformation from Image
to Camera Frame.
(ox,oy,sx,sy)
No distortion!

XcT
ZcT
YcT
ZcT

3D Point in
Camera
Coordinate
Frame

Transformation from
World to Camera Frame.
Perspective projection
(f, R, T)
Point in Camera Frame

Camera Calibration: Issues


13

Which parameters need to be estimated.


Focal length, image center, aspect ratio
Radial distortions
What kind of accuracy is needed.
Application dependent
What kind of calibration object is used.
One plane, many planes
Complicated three dimensional object

Basic Equation - Notation


14

Assumption : Camera is pinhole


2D point
point

3D
S
[R t]
A

- Arbitrary scale factor


- Extrinsic parameters
- Camera intrinsic matrix
- coordinate of the principle points
- scale factors in image u and v axes
- skewness of the two image axes

Basic Equation - Homography between


the model plane and its image
15

Assumption : the model plane is on Z = 0 of the world coordinate


system
From 1 ->

Therefore, a model point M and its image m is related by a homography H:

Basic Equation - Constraints


on the intrinsic parameters
16

Given an image of the model plane, H =


From 2 ->
Using the knowledge that r1 and r2 are orthonormal, we have

Solving Camera Calibration


Closed form solution
17

Let

ote that B is symmetric, defined by a 6D vector

Solving Camera Calibration


Closed form solution
18

Let the ith column vector of H be hi = [hi1; hi2; hi3]T . Then, we have

with

Solving Camera Calibration


Closed form solution
19

Therefore, the two fundamental constraints (3) and (4), from a given
homography, can be rewritten as 2 homogeneous equations in b:

If n images of the model plane are observed, by stacking n such equations


as (8) we have,

Solving Camera Calibration


Closed form solution
20

The solution to (9) is well known as the eigenvector of VTV associated with
the smallest eigenvalue.
Once b is estimated, we can compute all camera intrinsic matrix A.
Once A is known, the extrinsic parameters for each image is readily
computed. From (2), we have

Maximum likelihood
estimation
21

We are given n images of a model plane and there are m points on the
model plane.
Assume that the image points are corrupted by independent and
identically distributed noise. The maximum likelihood estimate can be
obtained by minimizing the following functional:

Dealing with radial distortion


22

Let (u; v) be the ideal (non observable distortion-free) pixel image


coordinates, and (u; v) the corresponding real observed image coordinates.

d=

Complete Maximum Likelihood


Estimation
23

A natural extension to (10) is then to estimate the complete set of


parameters by minimizing the following functional,

The recommended calibration


procedure by
By Zhengyou Zhang in A Flexible New Technique for Camera Calibration
24

1. Print a pattern and attach it to a planar surface;


2. Take a few images of the model plane under different orientations by moving either the
plane or the camera;
3. Detect the feature points in the images;
4. Estimate the five intrinsic parameters and all the extrinsic parameters using the closedform solution as described;
5. Estimate the coefficients of the radial distortion by solving the linear least-squares (13);
6. Refine all parameters by minimizing (14).

Known planar surfaces


25

Demo
ZHANGS CAMERA CALIBRATION
(zhang2D_with_demo)

26

Reference
27

Zhang, Zhengyou. "A flexible new technique for camera


calibration."Pattern Analysis and Machine Intelligence, IEEE
Transactions on22, no. 11 (2000): 1330-1334.
P.I. Corke, Robotics, Vision & Control,Springer 2011, ISBN
978-3-642-20143-1.
http://www.vision.caltech.edu/bouguetj/calib_doc/ : Camera
Calibration Toolbox for Matlab ,Sebastian Thrun and Jana
Kosecka

You might also like