Why Camera Modeling?: Image Processing
Why Camera Modeling?: Image Processing
Why Camera Modeling?: Image Processing
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.
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
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.
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.
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
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
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.
Units:
k,l : pixel/m
f :m
: pixel
Calibration Matrix
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