Image Processing Reference
In-Depth Information
100-
010-
001-
000 1
dx
dy
dz
xTdx
=
(
)
=
x
(9.9)
i
h
h
for clockwise rotation about the z axis by an angle
, the new vector of co-ordinates x r is
obtained from a rotation matrix R z as:
cos(
)
sin(
)
0
0
-sin(
)
cos(
)
0
0
xR x
=
( )
=
x
(9.10)
r
z
h
h
0
0
1
0
0
0
0
1
If this rotation matrix is applied to an image then points will be unspecified in the rotated
image, and appear as (say) black, as in Figure 3.21 (a). This is why practical implementation
of image rotation is usually by texture mapping ; further details can be found in Parker
(1994). The matrix in Equation 9.10 can be used to rotate a shape, notwithstanding inherent
discretisation difficulties. Other rotation matrices can be similarly defined for rotation
about the x and y axes, R x and R y , respectively. Finally, for image scaling, we derive a new
set of co-ordinates x s according to a scale factor s by multiplication by a scaling matrix S ( s )
as:
000
0 0 0
00 0
0001
s
s
xSx
= ( )
s
=
x
(9.11)
t
h
h
s
Each transform, perspective, translation, rotation and scaling is expressed in matrix form.
Accordingly, in general, a set of co-ordinates of image points first transformed by d 1 , then
scaled by s 1 , then rotated about the z axis by q 1 and, finally, with perspective change by f 1 ,
is expressed as
x t = P ( f 1 ) R z ( q 1 ) S ( s 1 ) T ( d 1 ) x h (9.12)
Note that these operations do not commute and that order is important. This gives a linear
and general co-ordinate system where image transformations are expressed as simple
matrix operations. Furthermore, the conventional Cartesian system can easily be recovered
from them. Naturally, homogeneous co-ordinates are most usually found in texts which
include 3D imaging (a good coverage is given in Shalkoff (1989) and naturally in texts on
graphics (see, for example, Parker (1994)).
9.1.1
References
Shalkoff, R. J., Digital Image Processing and Computer Vision , John Wiley and Sons Inc.,
NY USA, 1989
Parker, J. R., Practical Computer Vision using C , Wiley & Sons Inc., NY USA, 1994
Search WWH ::




Custom Search