You are on page 1of 10

Why Camera Modeling?

Think it this way: You look at the world


Image Processing: trough the lens of a camera and take a
picture.
1. Camera Models
WORLD CAMERA PICTURE
Now you show the photo to a friend. S/he
Aleix M. Martinez
needs to interpret the image; i.e.,
aleix@ece.osu.edu
WORLD CAMERA PICTURE
MODEL

Definition: A camera is an imaging device that


captures light and imprints it into a translucent plate
(which is usually located at the back of the device).

Another applications of camera


modeling: Rendering
Imagine you want to superimpose a graphic
animation on top of a football field. To be
able to draw the projection of a 3D object
on a 2D image of a 3D surface, you first
need to recover the 3D parameters of the
wo rld.
This is known as rendering.

1
What do we need to do, then? Pinhole Cameras
In this part of the course, we will formulate
the most useful model: the pinhole camera.
Pinhole cameras can be modeled using two
main types of projections:
Prespective projection.
Affine projections.
These do not consider lenses. These are This is the actual picture
more difficult to model and not as useful. This is the same image,
rectified and normalized.

They are formed by the projection of 3D objects.


Perspective Projection
We now know what a pinhole camera is.
Le tsseehowwec anmo delt hepr oject i
on
of a 3D world point to a 2D image point.
We will start defining the most realistic
projection.
Later, we will define simplifications of this.
Simplifications are useful for computational
reasons only.

Pinhole Perspective Equation


Focal length
The perspective equation
We have a 3D world point P=(x,y,x)T.
The image point (as described by the 3D
world coordinate system) is P=(x,y,
z)T.
Note that P, Pa ndtheo riginO are
collinear. This means: OP=OP.
x
x' f ' NOTE: z is always negative. x' x
z
You can normalize the image I.e., y ' y
y ' f ' y plane (in front of the
z ' z f ' z

z pinhole) to solve this problem.

2
x' x Some properties of the
perspective projection
From: y ' y
z ' z f ' z

we have /
= x /
x = yy=f
/z.

x
Hence, x' f '
z p'

x'

( x' , y ' ) .
T

y ' f ' y y '

z Image Point

1. The image obtained using perspective


projection is inverted.
2. The apparent size of objects depends on
their distance from the camera. E.g., some
vectors have the same length on the
image, but not in the 3D word (see
previous slide).
This second property is the physics behind
two well-known visual illusions (see the
two slides that follow).

3D recovery:I t
sbe ensug gest
edt hatthisma ybeus edt o
discern between convex and concave plane intersections.
1. The (perspective) projection of two
parallel lines from 3D to 2D converges
into a point. This point is known as: the
vanishing point (see next slide).
2. The line where all parallel lines converge
is known as: the horizon.
Note that two parallel lines that are also
parallel to the image plane will converge
at infinity.

3
Other distortions:
Vanishing point
The picture of a
picture is a distorted
Horizon image.

Note the difference in


shape between the
candida t
ea sseen
above and below.

We can change the values of f and z for a


Affine Projections single constant (to be specified by us, m =
f/z). That is, x' mx

We have seen that in perspective projection, y ' my.
we need to know the focal length of the This projection is known as weak-
camera f and the depth values for each of perspective.
the image points z, because In this case, m can be the ratio between a
x
x' f ' known f and the average distance from the
z
camera to the object, or any other option.
y ' f ' y . When m=1, this projection is called

z orthographic.

Affine Projection: Weak- Affine: Orthographic


perspective projection

x' mx f' x' x


where m is the magnification. When the camera is at a
y ' my z0 (roughly constant) distance
y ' y from the scene, take m=1.
When the scene relief is small compared to its distance from
the camera, m can be assumed to be constant.

4
Modeling Lenses Are we interested in lenses?
Most of the time, we can (and will) ignore
lenses. When one wants to improve
precision (e.g., in rendering), lens modeling
is needed.
The problem with pinhole cameras is that:
To be precise, the pinhole has to be infinitely
small. Otherwise the image is blurred.
To allow light to reach all image points, the
pinhole needs be large.

The reason for lenses


Sne
ll
sla
w

n1 sin 1 = n2 sin 2

De
sca
rte
sl
aw

Thin Lenses
Paraxial (1st order) optics

x
x' z '
z 1 1 1 R
Snellsl aw: , where and f .
Small angles: n1 n2 n2 n1 y ' z ' y z' z f 2( n 1)
n1 sin a1 = n2 sin a2 n1 a1 n2a2
d1 d 2 R z

5
Spherical aberration
Thick Lenses

Euclidean Coordinate Systems


Geometric Camera Models
The pinhole camera model and the three
projections introduced so far are very useful
in practice.
However, these need to be define in an
appropriate manner to facilitate the use of
simple, basic linear algebra operations.
x OP.i
x
Otherwise, these would required non-linear
computations. y OP.j OP xi yj zk P
y

z OP.k
z

Planes HOMOGENEOUS
COORDINATES
This way of defining vectors is key to much
of what we will do in the first part of the
course.
This is called homogenous coordinates.
AP. n 0 ax by cz d 0 . P 0 A vector P=(x,y,z)T can be written in
homogenoeous coordinates by simply
addi nga 1a tthee nd,i.e.,P=(x,y,z,1)T.
a
x
b
y To go back to non-homogeneous, simply
where and P remove the last component of the vector as
c
z homogeneous coordinates
follows P=(x,y,z,d)T P=(x/d,y/d,z/d)T.


d
1

6
Coordinate Changes: Pure Translations
Coordinate System Change
Moving the camera from one location to
another can be interpreted as a simple
translation and rotation of the 3D coordinate
system O.
This can also be used when we have more Camera B
than one camera.
If we have two cameras, A and B, we can
Camera A
write OA and OB. 3D (world) point

Coordinate Changes: Pure Rotations Coordinate Changes: Rotations about the z axis

cos sin 0
i A .i B j A .i B k A .i B A i TB B
R
sin cos 0

A T
A
i .j k A .j B
A jBT
B B B
0
B
R j A . jB iA jA kA
A A B 0 1
k A .k B k
i A .k B j A .k B B

Coordinate Changes: Pure Rotations


Coordinate Changes: Rigid Transformations

A x B x
A B
OP
iA jA k A
y iB jB kB
y
A z B z
B
P ABR AP BO A
P ABR AP
B

7
Rigid Transformations as Mappings: Rotation about the k Axis

Camera Model
We can also use the formulation we have
seen thus far to define the parameters of a
camera.
There are two types of parameters:
Intrinsic:r
e latetothec ame rasco ordinate
systemt oan i
deali
ze dc oordinates yste
m.
Extrinsic:re l
a t
esthec ame rascoor dinate
system to a fixed world coordinate system.

The Intrinsic Parameters of a Camera The Intrinsic Parameters of a Camera

Units:
k,l : pixel/m
f :m

: pixel

Calibration Matrix

Physical Image Coordinates

Normalized Image
Coordinates
The Perspective
Projection Equation

Extrinsic Parameters

Models to remember:

1. Perspective projection.
2. Weak-perspective.
3. Parallel projection.
4. Orthographic (orthogonal).

8
The Human Eye

9
Diopters

10

You might also like