Sie sind auf Seite 1von 9

Geometric Camera Parameters

• What assumptions have we made so far?

- All equations we have derived for far are written in the camera reference frames.

- These equations are valid only when:

(1) all distances are measured in the camera’s reference frame.

(2) the image coordinates have their origin at the principal point.

- In general, the world and pixel coordinate systems are related by a set of physical
parameters such as:

* the focal length of the lens


* the size of the pixels
* the position of the principal point
* the position and orientation of the camera
-2-

• Types of parameters (Trucco 2.4)

- Two types of parameters need to be recovered in order for us to reconstruct the 3D


structure of a scene from the pixel coordinates of its image points:

Extrinsic camera parameters: the parameters that define the location and orientation
of the camera reference frame with respect to a known world reference frame.

Intrinsic camera parameters: the parameters necessary to link the pixel coordinates of
an image point with the corresponding coordinates in the camera reference frame.

Object Coordinates (3D)

World Coordinates (3D)

extrinsic camera
parameters
Camera Coordinates (3D)

Image Plane Coordinates (2D)


intrinsic camera
parameters

Pixel Coordinates (2D, int)


-3-

• Extrinsic camera parameters

- These are the parameters that identify uniquely the transformation between the
unknown camera reference frame and the known world reference frame.

- Typically, determining these parameters means:

(1) finding the translation vector between the relative positions of the origins of
the two reference frames.

(2) finding the rotation matrix that brings the corresponding axes of the two
frames into alignment (i.e., onto each other)
-4-

- Using the extrinsic camera parameters, we can find the relation between the coordi-
nates of a point P in world (P w ) and camera (P c ) coordinates:

 r 11 r 12 r 13 
P c = R(P w − T ) where R =  r 21 r 22 r 23 
 
 r 31 r 32 r 33 

 Xc   Xw 
- If P c =  Y c  and P w =  Y w , then
   
 Zc   Zw 

 X c   r 11 r 12 r 13   X w − T x 
Y  = r r 22 r 23   Y w − T y 
 c   21  
 Z c   r 31 r 32 r 33   Z w − T z 

or

X c = RT1 (P w − T )

Y c = RT2 (P w − T )

Z c = RT3 (P w − T )

where RTi corresponds to the i-th row of the rotation matrix


-5-

• Intrinsic camera parameters

- These are the parameters that characterize the optical, geometric, and digital charac-
teristics of the camera:

(1) the perspective projection (focal length f ).


(2) the transformation between image plane coordinates and pixel coordinates.
(3) the geometric distortion introduced by the optics.

From Camera Coordinates to Image Plane Coordinates

- Apply perspective projection:

Xc RT1 (P w − T ) Yc RT2 (P w − T )
x= f = f T , y= f = f T
Zc R3 (P w − T ) Zc R3 (P w − T )

From Image Plane Coordinates to Pixel coordinates

pixel frame P
x im
yim

Yc
Xc y
Camera Yw
Frame optical axis x Xw
Zc ox ,oy World
Frame
center of Zw
perspective projection image principal point
plane
frame

x = − (x im − o x )s x or x im = − x/s x + o x

y = − (y im − o y )s y or y im = − y/s y + o y

where (o x , o y ) are the coordinates of the principal point (in pixels, e.g., o x = N /2,
o y = M/2 if the principal point is the center of the image) and s x , s y correspond
to the effective size of the pixels in the horizontal and vertical directions (in mil-
limeters).
-6-

- Using matrix notation:

x  −1/s x 0 ox  x
 im    
 y im  =  0 −1/s y oy   y 

 1   0 0 1  1

Relating pixel coordinates to world coordinates

RT1 (P w − T ) RT2 (P w − T )
−(x im − o x )s x = f T , −(y im − o y )s y = f T
R3 (P w − T ) R3 (P w − T )

or

RT1 (P w − T ) RT2 (P w − T )
x im = − fs x T + ox, y im = − fs y T + oy
R3 (P w − T ) R3 (P w − T )

Image distortions due to optics

Assuming radial distortion:


x = x d (1 + k 1 r 2 + k 2 r 4 )

y = y d (1 + k 1 r 2 + k 2 r 4 )

where (x d , y d ) are the coordinates of the distorted points (r 2 = x 2d + y 2d )

k 1 and k 2 are intrinsic parameters too but will not be considered here...
-7-

• Combine extrinsic with intrinsic camera parameters

- The matrix containing the intrinsic camera parameters:

 − f /s x 0 ox 
M in =  0 − f /s y oy 
 
 0 0 1 

- The matrix containing the extrinsic camera parameters:

 r 11 r 12 r 13 −RT1 T 
M ex =  r 21 r 22 r 23 −RT2 T 
 
 r 31 r 32 r 33 −RT3 T 

- Using homogeneous coordinates:

 Xw   Xw   m m 14  
Xw 
 xh   Yw   Y w   11
m 12 m 13
 Yw 
y = M M  =M   =  m 21 m 22 m 23 m 24   
 h in ex
 Z w   Z w   m 31
  Zw 
w  1   1 
m 32 m 33 m 34 
 1 

- Homogenization is needed to obtain the pixel coordinates:

x h m 11 X w + m 12Y w + m 13 Z w + m 14
x im = =
w m 31 X w + m 32Y w + m 33 Z w + m 34
y h m 21 X w + m 22Y w + m 23 Z w + m 24
y im = =
w m 31 X w + m 32Y w + m 33 Z w + m 34

- M is called the projection matrix (it is a 3 x 4 matrix).

Note: the relation of 3D points and their 2D projections can be seen as a linear trans-
formation from the projective space (X w , Y w , Z w , 1)T to the projective plane
(x h , y h , w)T .
-8-

• The perspective camera model (using matrix notation)

- Assuming o x = o y = 0 and s x = s y = 1

 − fr 11 − fr 12 − fr 13 fRT1 T 
M p =  − fr 21 − fr 22 − fr 23 fRT2 T 
 
 r 31 r 32 r 33 −RT3 T 

- Let’s verify the correctness of the above matrix:

 − fRT1 fRT1 T   − fRT1 (P w − T ) 


Pw  
p = M p P w =  − fRT2 fRT2 T   = − fRT2 (P w − T ) 
 T  1   T 
 R3 −RT3 T   R3 (P w − T ) 

- After homogenization (we get the same equations as in page 23):

RT1 (P w − T ) RT2 (P w − T )
x=− f T y=− f T
R3 (P w − T ) R3 (P w − T )

• The weak perspective camera model (using matrix notation)

 − fr 11 − fr 12 − fr 13 fRT1 T 
M wp =  − fr 21 − fr 22 − fr 23 fRT2 T 
 
 0 0 0 RT3 (P − T ) 

where P is the centroid of the object (i.e., object’s average distance from the camera)

- We can verify the correctness of the above matrix:

 − fRT1 fRT1 T   − fRT1 (P w − T ) 


P
p = M wp P w =  − fRT2 fRT2 T   w  =  − fRT2 (P w − T ) 
  1   
0 0 0 RT3 (P − T )   R T
3 (P − T ) 

- After homogenization:

RT1 (P w − T ) RT2 (P w − T )
x=− f y=− f
RT3 (P − T ) RT3 (P − T )
-9-

• The affine camera model

- The entries of the projection matrix are totally unconstrained:

 a11 a12 a13 a14 


M a =  a21 a22 a23 a24 
 
 0 0 0 a34 

- The affine model does not appear to correspond to any physical camera.

- Leads to simple equations and appealing geometric properties.

- Does not preserve angles but does preserve parallelism.

Das könnte Ihnen auch gefallen