Beruflich Dokumente
Kultur Dokumente
We see a square of
known size
Scaling of Rows and Columns
in Image
• Camera pixels are not necessarily square
• Camera output may be analog (NTSC)
• Image may be obtained by digitizing card
§ A/D converter samples NTSC signal
Monitor
Camera NTSC signal Digitizing display
CCD/
CMOS
Compound Lens Imaging
• Inexpensive single lens systems distort image at
its periphery
• Compound lenses may be used to reduce
chromatic effects and pin-cushion effects
Camera
Image plane
Nodal Point
Principal planes
f
center of (xi , yi , f)
x
projection
z
C
f
Transformation From Lengths to Pixels
Transformation uses: y Image point
ypix
(xi , yi , f)
• image center (x0, y0)
y0 Image center x
• scaling factors kx and ky
x0 xpix
xs xs + zs x0
xi = f x pix = k x xi + x0 = f k x
zs zs
ys y s + z s y0
yi = f y pix = k y yi + y0 = f k y
zs zs
xs
u ' α x 0 x0 0 α x = f kx x pix = u ' / w'
v' = 0 α y0 0 ys
with then
y
zs α y = f ky y pix = v' / w'
w' 0 0 1 0
1
Internal Camera Parameters
xs
u ' α x s x0 0 α x = f kx x pix = u ' / w'
v' = 0 y
α y y0 0 withs
zs α = − f k y pix = v' / w'
w' 0 0 1 0 y y
1
α x s x0 0 α x s x0 1 0 0 0
0 α y0 0 = 0 α y y0 0 1 0 0 = K [I 3 | 03 ]
y
Image point Z
z
(xi , yi , f)
Y
(xs , ys , zs )
M O
(Xs , Ys , Z s ) X
From Camera Coordinates
to World Coordinates 2
x
X
i k z M
j (Xs , Ys , Z s ) in world cordinate system
C
I (xs , ys , zs ) in image cordinate system
CO = T translation vector J
O K Z
CM = CO + OM
xS i + y S j + zS k = Tx i + Ty j + Tz k + X S I + YS J + Z S K
xS = Tx + X S I.i + YS J.i + Z S K.i
xS Tx I.i J.iK.i X S
y = T + I.j J.j K.j YS
S y
z S Tz I.k J.k K.k Z S
Homogeneous Coordinates
xS I.i J.i Tx X S
K.i xS X S
y I.j y T YS
S = J.j Ty YS
K.j S = R
z S I.k J.k K.k Tz Z S z S 0T3 1 Z S
1 0 0 0 1 1 1 1
From Camera Coordinates
to World Coordinates 3
x
X
i k z M
j (Xs , Ys , Z s )
C
I (xs , ys , zs )
J
O K Z
CM = OM - OC
xS i + yS j + z S k = ( X S - X C ) I + (YS - YC ) J + ( Z S - Z C ) K
xS = ( X S - X C ) I.i + (YS - YC ) J.i + ( Z S - Z C ) K.i
~ ~
x cam = R (X - C) (T = -R C)
~
C is vector OC expressed in world coordinate system
Homogeneous Coordinates 2
~
• Here we use - R C instead of T
xS XS
y ~
S = R - R C YS
z S 0T3 1 ZS
1 1
Linear Transformation from
World Coordinates to Pixels
• Combine camera projection and coordinate
transformation matrices into a single matrix P
xs
u' y
v ' = K [I | 0 3 ] s
3
zs XS
w' u' ~
1 R - R C YS
⇒ v' = K [I 3 | 0 3 ] T
xS XS 0 3 1 Z S
w'
y ~ 1
S = R - R C YS
XS
z S 0T3 1 ZS u' Y
⇒ v' = P S x = PX
1 1 ZS
w'
1
Properties of Matrix P
• Further simplification of P:
R ~
- R C
x = K [I 3 | 0 3 ] T X
0 3 1
~
[I 3
R
| 0 3 ] T
- R C
= R -[R
~
C = R I] [
3 | -
~
C ]
0 3 1
[ ~
x = K R I3 | -C X ]
[
~
P = K R I3 | - C ]
• P has 11 degrees of freedom: ~
• 5 from triangular calibration matrix K, 3 from R and 3 from C
• P is a fairly general 3 x 4 matrix
•left 3x3 submatrix KR is non-singular
Calibration
• 1. Estimate matrix P using scene points and
their images
• 2. Estimate the interior parameters and the
exterior parameters
[ ~
P = K R I3 | - C ]
i
§ Use Levenberg-Marquardt iterative minimization
Radial Distortion
• We have assumed that lines are imaged as
lines
• Not quite true for real lenses
§ Significant error for cheap optics and for short
focal lengths
xc − x0 = L(r ) ( x − x0 )
(x, y) yc − y0 = L ( r ) ( y − y0 )
(xc, yc)
(x0, y0) with
Distorted line
r 2 = ( x − x0 ) 2 + ( y − y0 ) 2
And ideal line:
L(r ) = 1 + κ 1 r + κ 2 r 2 + ...
(x, y)
(x’, y’)
• Minimize f (κ 1 ,κ 2 ) = ∑ ( x'i − xci ) 2 + ( y 'i − yci ) 2
i
using lines known to be straight
(x’,y’) is radial projection of (x,y) on straight line
References