2 FROM IMAGE TO THE
GROUND
In order to transform the coordinates from the image
to the planar ground, a plane projection transforma-
tion is used. At the moment no distortion of the cam-
era lens is assumed. A point in the projective plane
is represented by three coordinates, p = (x
1
,x
2
,x
3
)
T
,
which represents a ray through the origin in the 3D
space (Mundy and Zisserman, 1992). Only the di-
rection of the ray is relevant, so all points written as
λp = (λx
1
,λx
2
,λx
3
)
T
are equivalent. The classical
Cartesian coordinates of the point (x,y) can be ob-
tained intersecting the ray with a special plane per-
pendicular to x
3
axis and located at unit distance along
x
3
. This is equivalent to scale p as, p = (x,y,1)
T
. Pro-
jected points in an image and real points in a planar
ground are both represented in this way.
A projective transformation between two projec-
tive planes (1 and 2) can be represented by a linear
transformation p
2
= T
21
p
1
. If the transformation is
represented in Cartesian coordinates it results non-
linear. Since points and lines are dual in the projec-
tive plane, the transformation for the line coordinates
is also linear, being
T
−1
21
T
the corresponding trans-
formation matrix for lines.
2.1 Computing the Transformation to
Calibrate the Camera
Let it be p
c
= (x
i
,y
i
,1)
T
the coordinates of a point i
in the camera reference system. Let it be (x
g
i
,y
g
i
) the
coordinates of the corresponding point in a reference
system of the planar ground obtained from the plane
of the building, and therefore let it be p
g
= (x
g
i
,y
g
i
,1)
its homogeneous coordinates.
Figure 1: Diagram depicting the transformation of coordi-
nates from image to the ground.
We obtain the projective transformation T
gc
up to
a non-zero scale factor, for points, p
g
= T
gc
p
c
. For
each couple i of corresponding points, two homo-
geneous equations to compute the projective trans-
formation are considered. They can be written as,
(λ
i
x
g
i
,λ
i
y
g
i
,λ
i
)
T
= T
gc
(x
i
,y
i
,1)
T
. Developing them in
function of the elements of the homography matrix,
we have
x
i
y
i
1 0 0 0 −x
g
i
x
i
−x
g
i
y
i
−x
g
i
0 0 0 x
i
y
i
1 −y
g
i
x
i
−y
g
i
y
i
−y
g
i
t =
0
0
where t = (t
11
t
12
t
13
t
21
t
22
t
23
t
31
t
32
t
33
)
T
is a vector
with the elements of the homography matrix T
gc
.
Using four pairs of corresponding points (no three
of them being collinear), we can construct a 8x9 ma-
trix M, where Mt = 0. Then, the solution t corre-
sponds with the eigenvector associated to the least
eigenvalue (in this case the null eigenvalue) of the
matrix M
T
M, which can be easily solved by singu-
lar value decomposition (svd) of matrix M. In order
to have a reliable transformation, more than the min-
imum number of point correspondences must be con-
sidered, solving in a similar way (Hartley and Zisser-
man, 2000).
It is known that a previous normalization of data
is suitable to avoid numerical computation problems
(Hartley, 1997). We have transformed the coordinates
of the points (in the image and in the ground) before
the computation of the homography to reference sys-
tems located in the centroid of the points and scaled
in such that the maximum distance of the points to its
centroid is 1. After computation of the homography,
it is inversely transformed by simple matrix compu-
tation to express the homography in the desired refer-
ence systems.
2.2 Automatic Camera Re-calibration
Once we have calibrated the camera using at least 4
pairs of corresponding points in the image and in the
ground, it cannot be moved, which is the main lim-
itation of this proposal. In practice, due for exam-
ple to the flexibility of the camera support, the ori-
entation of the camera changes. A little change of
orientation has a great influence in the image coor-
dinates of a point, and therefore invalidates previous
calibration. However if the camera is not changed in
position, or position change is small with respect to
the depth of the observed scene, the homography can
be re-calibrated automatically with high robustness
and without 3D computations. As camera position
changes suppose main reconfiguration of the surveil-
lance system, but orientation changes are usual, the
automatic re-calibration procedure presented below
eliminates the limitation in practice. Besides that, this
re-calibration procedure can also be used for changes
in zoom lens or motions in pan-tilt cameras demanded
by the user.
The re-calibration can be made using features ex-
tracted in the image like points and/or lines. We pro-
pose to do it using lines because they are plentiful in
ICINCO 2008 - International Conference on Informatics in Control, Automation and Robotics
46